linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* DT overlay applied via pinctrl description
@ 2021-02-16 15:35 Michal Simek
  2021-02-17  5:33 ` Frank Rowand
  2021-03-01  9:19 ` Linus Walleij
  0 siblings, 2 replies; 6+ messages in thread
From: Michal Simek @ 2021-02-16 15:35 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Linux Kernel Mailing List, open list:GPIO SUBSYSTEM,
	Sai Krishna Potthuri

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?

Thanks,
Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-01 15:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16 15:35 DT overlay applied via pinctrl description Michal Simek
2021-02-17  5:33 ` Frank Rowand
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

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).