[Letux-kernel] Strange problem with non-LPAE letux-4.20-rc kernels on 4GB Pyra only

H. Nikolaus Schaller hns at goldelico.com
Fri Dec 7 20:13:07 CET 2018


> Am 07.12.2018 um 15:16 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> 
>> Am 07.12.2018 um 12:09 schrieb Andreas Kemnade <andreas at kemnade.info>:
>> 
>> On Fri, 7 Dec 2018 09:22:12 +0100
>> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>> 
>> [...]
>>> This pin has a 100k pullup to 1.8V and 800mV is a typical symptom that
>>> the gpio pin does have a pull-down enabled and not a pull-up or internal
>>> pull disabled..
>>> 
>> And this 800mV has probably a big tolerance, so depending on the phase of the
>> moon or something like that, it might work or not.
>> I had the sd card disappearing here once. I just thought it was an adapter
>> problem but it is probably just the voltage level at that pin.

Well you have a v5.1 or v5.2 board (like my older 2GB Pyra).
There, the card detect gpio has the pullup enabled.

> 
> Indeed...
> 
> After doing
> 
> 	/usr/bin/arm-linux-gnueabihf/devmem2 0x4a002974 w 0x11e011e
> 
> SD card insertion/removal is detected and I can measure 0V <-> 1.8V voltage swing
> on the CD input.
> 
> The value after boot is 0x1060106 which matches (omap5-letux-cortex15-v5.3.dts):
> 
> /* the hardware bug of earlier releases has been fixed and
> * external pull-up for gpio8_228 and gpio8_229 is installed.
> * Hence we can disable pullup/down.
> */
> 
> &mmc1_pins {
> 	pinctrl-single,pins = <
> 		OMAP5_IOPAD(0x174, PIN_INPUT | MUX_MODE6)	/* 0x174:[15:0] sdcard_cd/gpio8_228 */
> 		OMAP5_IOPAD(0x176, PIN_INPUT | MUX_MODE6)	/* 0x175:[31:16] sdcard_wp/gpio8_229 */
> 	>;
> };
> 
> Therefore, it is not a pinmux issue.
> 
> Hm. But why is the pull-down enabled or the external pull-up not effective if we define PIN_INPUT only?
> 
> And it still does not explain the difference between 4.19 and 4.20 kernels.
> 
> Maybe the 4.19 kernel does more polling of the mmc interface to detect than 4.20.
> While 4.20 only relies on proper CD gpio?
> 
> And maybe the pull-up resisor isn't soldered properly. So it might be a mix of HW and SW
> changes which happened to come in parallel...
> 
> Anyways I can't simply fix it in SW by adding INPUT_PULLUP if it is a HW issue of this single unit.

Well, it is not a problem of this single unit but the production run of the v5.3 prototype
version of the LC15 board...

I have removed the CPU board and looked on the PCB. The 100k pullup is simply not installed.
And it is marked as "DNP" (do not place) in the parts list for unknown/undocumented reasons.

Why does it work with 4.19. And why didn't it come up with earlier tests of 4.20-rc1?

Well, if there is no pull-up and the input is switched to PIN_INPUT it is "floating".
And then it might have been pulled up in u-boot and the kernel reprograms the pinmux
to "floating" just for this board. Then it depends on leakage currents how fast the
line is discharged to a level that is treated as a "0" meaning that a card is inserted...

So it is not really predictable.

More difficult to decide is what we should do to fix it. Changing the DT entry is wrong,
because the mass production devices will have the missing external pullup installed and
then we have two in parallel.

Adding the resisors is something I can do for this board for testing, but not for the
other 20 spread all over the world... But if I add it for my testing board, I can't
reproduce the issue any more.

Well, we could switch off the CD by setting it to "broken-cd" or try to understand what
has changed between 4.19 and 4.20.

Or we can simply overwrite the omap5-letux-cortex15-v5.3.dtb to omap5-letux-cortex15-v5.2.dtb
on these prototype boards...

BR,
Nikolaus


More information about the Letux-kernel mailing list