devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
To: Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Grygorii Strashko
	<grygorii.strashko-l0cyMroinI0@public.gmane.org>
Subject: gpio-syscon for Keystone 2 - DT bindings mismatch code expectation?
Date: Mon, 23 Mar 2015 21:55:45 +0000	[thread overview]
Message-ID: <20150323215545.GT8656@n2100.arm.linux.org.uk> (raw)

Linus, Grygorii,

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

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

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

                dspgpio0: keystone_dsp_gpio@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 <grygorii.strashko-l0cyMroinI0@public.gmane.org>
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 <grygorii.strashko-l0cyMroinI0@public.gmane.org>
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.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2015-03-23 21:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 21:55 Russell King - ARM Linux [this message]
     [not found] ` <20150323215545.GT8656-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-03-27 10:12   ` gpio-syscon for Keystone 2 - DT bindings mismatch code expectation? Linus Walleij
     [not found]     ` <CACRpkdYVkdLEEae8JHSsBEtMyhMx0yqN8RLhP2reoV+r5gA+JA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-27 10:21       ` Grygorii Strashko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150323215545.GT8656@n2100.arm.linux.org.uk \
    --to=linux-lfz/pmaqli7xmaaqvzeohq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=grygorii.strashko-l0cyMroinI0@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).