linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Michal Simek <michal.simek@xilinx.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>,
	Frank Rowand <frowand.list@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: DT overlay applied via pinctrl description
Date: Tue, 16 Feb 2021 23:33:23 -0600	[thread overview]
Message-ID: <929190e9-1195-4381-ae18-b71d17444569@gmail.com> (raw)
In-Reply-To: <63d610ba-5f63-2be1-6215-f44bd88d94d2@xilinx.com>

+Frank, Rob, devicetree list

On 2/16/21 9:35 AM, Michal Simek wrote:
> Hi,
> 
> I have a question about expectations when pinctrl setting is applied. In
> DTS all nodes are described in the order available in DT.
> 
> uart-default {
> 	mux {
> 		...
> 	};
> 
> 	conf {
> 		...
> 	};
> };
> 
> I don't know if this standard description or not. I definitely see other
> pinctrl drivers which are using different structure.
> 
> Anyway when overlay is applied the order has changed to
> uart-default {
> 	conf {
> 		...
> 	};
> 
> 	mux {
> 		...
> 	};
> };
> 
> which is causing issue because pin is configured first via conf node
> before it is requested via mux. This is something what firmware is
> checking and error out.
> 
> That's why I want to check with you if this is issue with DT binding
> description we use in zynqmp pinctrl driver posted here
> https://lore.kernel.org/linux-arm-kernel/1613131643-60062-1-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com/
> 
> I have also tried to use init and default configuration where init is
> called just with mux setting and then default is called just with config
> but the issue is there as well because in pinctrl_commit_state()
> previous state is checked and for MUXes pinmux_disable_setting() is
> called which release a pin. And then configuration in default is called
> but without requesting pin which fails for the same reason as above.
> 
> That's why my questions are:
> Are we using incorrect DT description?
> And is there a need sort subnodes in a way that mux should be called
> first by core before configuration?
> Or is there any different way how to do it?

Node ordering and property ordering within a node are not defined
in the Linux kernel.  If a subsystem or property is depending upon
a certain order, they must implement a method other than the
order as accessed by of_* functions.  And as you noted, use of an
overlay may also change ordering.

-Frank

> 
> Thanks,
> Michal
> 


  reply	other threads:[~2021-02-17  5:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 15:35 DT overlay applied via pinctrl description Michal Simek
2021-02-17  5:33 ` Frank Rowand [this message]
2021-03-01  9:19 ` Linus Walleij
2021-03-01  9:31   ` Michal Simek
2021-03-01 14:13     ` Linus Walleij
2021-03-01 15:04       ` Michal Simek

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=929190e9-1195-4381-ae18-b71d17444569@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lakshmi.sai.krishna.potthuri@xilinx.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).