mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Leonard <David.Leonard@digi.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
	Dong Aisheng <aisheng.dong@nxp.com>,
	 Fabio Estevam <festevam@gmail.com>,
	Shawn Guo <shawnguo@kernel.org>,  Jacky Bai <ping.bai@nxp.com>,
	 Pengutronix Kernel Team <kernel@pengutronix.de>,
	 Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	linux-gpio@vger.kernel.org,  devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] dt-bindings: pinctrl: Add fsl,ls1012a-pinctrl yaml file
Date: Wed, 28 Aug 2024 12:51:24 +1000 (AEST)	[thread overview]
Message-ID: <557150a3-aef5-40e7-d656-73ca6bba5857@digi.com> (raw)
In-Reply-To: <6ddcd97d-7d60-8e4f-fede-42bf7f99e2b0@digi.com>

On Wed, 28 Aug 2024, David Leonard wrote:

>> OK, but I still wonder why is it here. Without it the hardware will work
>> in little-endian?
>
> Well, it's here firstly because I was trying to follow a perceived convention 
> in
> dts/freescale/fsl,ls1012a.dtsi. That DT uses big-endian in child
> nodes of /soc that match up with memory map tables from the datasheet.
> (Not only do different and adjacent parts of the register map have
> opposing endianess, some register layouts also seem to be reversed
> bitwise, others bytewise.)
>
> The second reason is practical/dodgy. The pinctrl driver should logically
> be a child of the scfg node, but the syscon driver doesn't populate its
> child nodes. To get the pinctrl driver to work meant making it a sibling
> node with an unsatisfactory overlap with the scfg's address region
> 0x1570000+0x10000. (No driver binds to "fsl,ls1012a-scfg".)

Sorry, my examples had mixed up some ls1046a with ls1012a, which
must be confusing. Corrections follow, should the meaning have been lost:

         soc {
                 compatible = "simple-bus";
                 #address-cells = <2>;
                 #size-cells = <2>;
                 ...

                 scfg: scfg@1570000 {
                         compatible = "fsl,ls1012a-scfg", "syscon";
                         reg = <0x0 0x1570000 0x0 0x10000>;
                         big-endian;
                 };

                 pinctrl: pinctrl@1570430 {
                         compatible = "fsl,ls1012a-pinctrl";
                         reg = <0x0 0x1570430 0x0 0x4>; /* SCFG PMUXCR0 */
                         big-endian;
                         fsl,dcfg-regmap = <&dcfg>;
                         ...
                 };
         };

> The better device tree would be:

         soc {
                 compatible = "simple-bus";
                 #address-cells = <2>;
                 #size-cells = <2>;
                 ...

                 scfg: scfg@1570000 {
                         compatible = "fsl,ls1012a-scfg", "syscon";
                         reg = <0x0 0x1570000 0x0 0x10000>;
                         big-endian;
                         #address-cells = <1>;
                         #size-cells = <1>;
                         ...

                         pinctrl: pinctrl@430 {
                                 compatible = "fsl,ls1012a-pinctrl";
                                 reg = <0x430 0x4>; /* SCFG PMUXCR0 */
                                 fsl,dcfg-regmap = <&dcfg (416/8)>;
                                 ...
                         };
                 };
         };

> And this would resolve the big-endian property issue.
>
> There was a discussion of syscon populating its child nodes at
> https://lore.kernel.org/lkml/1403513950.4136.34.camel@paszta.hi.pengutronix.de/T/

  reply	other threads:[~2024-08-28  2:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27  2:10 David Leonard
2024-08-27  3:22 ` Rob Herring (Arm)
2024-08-27  6:17 ` Krzysztof Kozlowski
2024-08-27 16:51   ` David Leonard
2024-08-27 17:28     ` Krzysztof Kozlowski
2024-08-28  0:43       ` David Leonard
2024-08-28  2:51         ` David Leonard [this message]
2024-08-28  5:43         ` Krzysztof Kozlowski

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=557150a3-aef5-40e7-d656-73ca6bba5857@digi.com \
    --to=david.leonard@digi.com \
    --cc=aisheng.dong@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ping.bai@nxp.com \
    --cc=robh@kernel.org \
    --cc=shawnguo@kernel.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

all inboxes | Powered by JetHome®