[Letux-kernel] [PATCH pre-upstream RFC] ARM: dts: omap3-gta04: add pulldown/up settings for twl4030 gpio

H. Nikolaus Schaller hns at goldelico.com
Mon Sep 24 13:37:36 CEST 2018


> Am 24.09.2018 um 12:54 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> Hi Nikolaus,
> 
> On Mon, 24 Sep 2018 11:49:20 +0200
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> 
> [...]
>> 
>> P12	gpio0/cd1
>> N12	gpio1/cd2
>> L4	gpio2
>> P13	gpio15
>> M4	gpio6/pwm0
>> N14	gpio7/vibra/pwm1
>> D8	gpio8/uart1.rxd
>> L14	stp/gpio9
>> L13	dir/gpio10
>> M13	nxt/gpio11
>> J13	data3/uart4.ctso/gpio12
>> G14	data4/gpio14
>> G13	data5/gpio3
>> F14	data6/gpio4
>> F13	data7/gpio5
>> G11	gpio13/ledsync
>> C3	gpio16/bt.pcm.vdr/dig.mic.clk0
>> C5	gpio17/bt.pcm.vdx/dig.mic.clk1
>> 
>> Table 2.2 describes the signals and it appears that they are explicitly
>> allowed to be floating if unused, because they have internal pull-downs
>> active after reset.
>> 
> Well that is the theory. For the corresponding register, the default
> after-reset values represent that. But in reality after boot everything
> is disabled because twl4030-gpio sets them to 0 if not specified!

Ah, interesting!

We have never checked and did not notice when updating to DT...
The feature seems to be quite old:

commit f74ce8fb849e9f9c54a494cff5fc30d53ca4e963
Author: Florian Vaussard <florian.vaussard at epfl.ch>
Date:   Wed Sep 5 09:46:25 2012 +0200

    gpio/twl4030: get platform data from device tree

And beagleboard did hide it in a n USB related patch:

commit 2e5f78aeceb6f203b514ca03a48e3fd056025524
Author: Roger Quadros <rogerq at ti.com>
Date:   Wed Mar 20 17:45:00 2013 +0200

> 
> Regards,
> Andreas
> PS: twl4030-gpio should be compiled statically because:
>        /* maybe setup IRQs */
>        if (is_module()) {
>                dev_err(&pdev->dev, "can't dispatch IRQs from modules\n");
>                goto no_irqs;
>        }

Ok, this is understandable then.

Do you send a new patch for PU/PD setup?

BR and thanks for the good research!
Nikolaus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20180924/952a8ca8/attachment.asc>


More information about the Letux-kernel mailing list