Skip to contentSkip to conversation

gpio-syscon for Keystone 2 - DT bindings mismatch code expectation?

DISCUSSION Russell King - ARM Linux 3 participants 3 messages Mar 23, 2015 – Mar 27, 2015

lore
Share & tools
lore
#0 lore raw

Linus, Grygorii,

I'm trying to understand what's happening to make Keystone2 print this at boot:

gpio-syscon soc:keystone_dsp_gpio at 02620240: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620244: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620248: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 262024c: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620250: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620254: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620258: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 262025c: can't read the dir register offset!

Quoted 1 line

From what I can see in DT, these are defined as:

                dspgpio0: keystone_dsp_gpio at 02620240 {
                        compatible = "ti,keystone-dsp-gpio";
                        gpio-controller;
                        #gpio-cells = <2>;
                        gpio,syscon-dev = <&devctrl 0x240>;
                };

However, the patch set which introduced the code included:

commit 5a3e3f88b0a10f8b5baf224ebda5916195fb8745

Author: Grygorii Strashko <[email protected]>
Date:   Wed Sep 3 20:05:33 2014 +0300

gpio: syscon: retrive syscon node and regs offsets from dt

which wants gpio,syscon-dev to contain a phandle and two offsets, not a single offset. Moreover, the following patch:

commit 2134cb997f2f1b2d960ad8705d67dc8d690ba59c

Author: Grygorii Strashko <[email protected]>
Date:   Wed Sep 3 20:05:34 2014 +0300

gpio: syscon: reuse for keystone 2 socs

added documentation which indicates that for keystone 2, only one offset is necessary in gpio,syscon-dev, yet there is no "compatible" string to stop the code requiring two offsets.

This looks like a complete trainwreck. What's going on here?

Please can this get fixed... Thanks.

Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
#1 lore raw
Quoted 5 lines · Russell King - ARM Linux

Linus, Grygorii,

I'm trying to understand what's happening to make Keystone2 print this at boot:

Quoted 8 lines

gpio-syscon soc:keystone_dsp_gpio at 02620240: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620244: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620248: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 262024c: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620250: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620254: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620258: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 262025c: can't read the dir register offset!

Grygorii are you looking into this?

Yours,
Linus Walleij

#2 lore raw
Quoted 17 lines · Linus Walleij
Quoted 5 lines · Russell King - ARM Linux

Linus, Grygorii,

I'm trying to understand what's happening to make Keystone2 print this at boot:

Quoted 8 lines

gpio-syscon soc:keystone_dsp_gpio at 02620240: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620244: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620248: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 262024c: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620250: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620254: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 2620258: can't read the dir register offset! gpio-syscon soc:keystone_dsp_gpio at 262025c: can't read the dir register offset!

Quoted 1 line

Grygorii are you looking into this?

Yes. Seems you've found the patch already )
https://lkml.org/lkml/2015/3/24/908

regards,
-grygorii