[Letux-kernel] replacement for omap_hsmmc: hackish try to enable sdio interrupts

Andreas Kemnade andreas at kemnade.info
Sat Sep 1 08:21:58 CEST 2018


Hi,

On Fri, 31 Aug 2018 19:51:48 +0200
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:

[...] 
> 
> Ah, ok!
> 
> Hm. Well...
> 
> Then we should carefully study schematics + required pinmux settings.
> 
> 
> 
> So this means
> * AF4, AG4, AH4, AH5 are mmc2 bidirectional
> * AG5 is cmda
> * AE2 is clka
> * AE3 is clkf
> * AF3 is cmddir
> * AH3 is dat123dir
> * AE4 is dat0dir
> 
> now we have to look up the pinmux mode for these pads in the dm3730 data sheet...
> * AF4	mmc2_dat3 = mode 0	gpio 135	I/O
> * AG4	mmc2_dat2 = mode 0	gpio 134	I/O
> * AH4	mmc2_dat1 = mode 0	gpio 133	I/O
> * AH5	mmc2_dat0 = mode 0	gpio 132	I/O
> * AG5	mmc2_cmd = mode 0	gpio 131	O
> * AE2	mmc2_clk = mode 0	gpio 130	I/O
> * AE3	mmc2_clkin = mode 1	gpio 139	I
> * AF3	mmc2_dir_cmd = mode 1	gpio 138	O
> * AH3	mmc2_dir_dat1 = mode 1	gpio 137	O
> * AE4	mmc2_dir_dat0 = mode 1	gpio 136	O
> 
> in other words: all mmc2 pads are mode 0 and the 4 pads (re)used from mmc3 are to be mode 1.
> 
well, ok, that is the theory. When it hits reality, things are a bit
different. Runtime suspend switches off the clock of the mmc module in
the dm3730. If that clock is switched off, the module cannot react on
sdio irqs coming in through dat1. To work around that you either have to
a) disable runtime suspend for mmc2 through systs
b) use my old patch which disables runtime suspend which sdio irqs are
enabled
c) provide another mechanism for the sdio irq (and specify a second
irq in the dts) to come in which could be either
  1. a mechanism called SWAKEUP (which is not available on all omaps)
  2. gpio irq (which includes remuxing dat1 to gpio)  which is what my
  new patch does

> and finally find out the pin mux register addresses in the TRM (but I assume that this is already ok).
> 
> So you can compare my theory with the code you find and plan to use...
> 
> BTW: the GTA04A5 has no level shifter. I haven't looked up if it sets a different mode?

Well, that is one thing to consider. And the patch does only work on
A5. I hope I will find out why. Hmm, I have to ensure, that DAT123Dir
is set to the right direction.

Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20180901/ba61d22d/attachment.asc>


More information about the Letux-kernel mailing list