mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/1] STM32MP: protonic/phycore: warn about potential DT breakage
@ 2023-02-17 16:28 Ahmad Fatoum
  2023-02-17 16:28 ` [PATCH 1/1] ARM: dts: STM32MP: protonic/phycore: add note about potential breakage Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-02-17 16:28 UTC (permalink / raw)
  To: str, ore; +Cc: ejo, barebox

Hello Steffen, Oleksij,

during some DT cleanup I noticed potential subtle breakage in:

  arch/arm/dts/stm32mp151-prtt1c.dts
  arch/arm/dts/stm32mp151-prtt1l-net.dtsi
  arch/arm/dts/stm32mp151-prtt1l.dtsi
  arch/arm/dts/stm32mp157c-phycore-stm32mp15-pinctrl.dtsi
  arch/arm/dts/stm32mp157c-phycore-stm32mp15-som.dtsi

You are duplicating pinctrl nodes defined in dts/src/arm/stm32mp15-pinctrl.dtsi.
These nodes have subnodes called either pins or pins1,2...
Upstream has already moved around nodes that the device trees override,
which may break your board or silently alter your pinmux.

Please either use upstream DT pinctrl nodes without any change or
define your own fully-defined nodes, so they don't clash (e.g.
named rgmii-phycore-barebox without reliance on upstream).

DT may already be partially broken. I see potential issue with
Phycore RGMII for example which changed upstream.

Cheers,
Ahmad (1):
  ARM: dts: STM32MP: protonic/phycore: add note about potential breakage

 arch/arm/dts/stm32mp151-prtt1c.dts                      | 5 +++++
 arch/arm/dts/stm32mp151-prtt1l-net.dtsi                 | 5 +++++
 arch/arm/dts/stm32mp151-prtt1l.dtsi                     | 6 ++++++
 arch/arm/dts/stm32mp157c-phycore-stm32mp15-pinctrl.dtsi | 5 +++++
 4 files changed, 21 insertions(+)

-- 
2.30.2




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

* [PATCH 1/1] ARM: dts: STM32MP: protonic/phycore: add note about potential breakage
  2023-02-17 16:28 [PATCH 0/1] STM32MP: protonic/phycore: warn about potential DT breakage Ahmad Fatoum
@ 2023-02-17 16:28 ` Ahmad Fatoum
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2023-02-17 16:28 UTC (permalink / raw)
  To: str, ore; +Cc: ejo, barebox, Ahmad Fatoum

Extending upstream STM32MP1 pinctrl group nodes is a bad idea. They tend
to be split and pinmux entries are moved between subnodes, which may
induce subtle breakage and may have already happened for RGMII in
Phycore DT. Upstream pinctrl nodes should either be used fully as-is
or new fully-specified nodes be created that are safe from upstream changes.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/dts/stm32mp151-prtt1c.dts                      | 5 +++++
 arch/arm/dts/stm32mp151-prtt1l-net.dtsi                 | 5 +++++
 arch/arm/dts/stm32mp151-prtt1l.dtsi                     | 6 ++++++
 arch/arm/dts/stm32mp157c-phycore-stm32mp15-pinctrl.dtsi | 5 +++++
 4 files changed, 21 insertions(+)

diff --git a/arch/arm/dts/stm32mp151-prtt1c.dts b/arch/arm/dts/stm32mp151-prtt1c.dts
index 4eaf6712a5d6..f754deacf0e9 100644
--- a/arch/arm/dts/stm32mp151-prtt1c.dts
+++ b/arch/arm/dts/stm32mp151-prtt1c.dts
@@ -171,6 +171,11 @@
 	status = "okay";
 };
 
+/*
+ * FIXME: Below nodes should be fleshed out into complete pinctrl groups in their
+ * own right. Otherwise, they will eventually be broken by upstream rework.
+ */
+
 &ethernet0_rmii_pins_a {
 	pins1 {
 		pinmux = <STM32_PINMUX('B', 12, AF11)>, /* ETH1_RMII_TXD0 */
diff --git a/arch/arm/dts/stm32mp151-prtt1l-net.dtsi b/arch/arm/dts/stm32mp151-prtt1l-net.dtsi
index 04f4d64aaaa5..a10e696e7d7e 100644
--- a/arch/arm/dts/stm32mp151-prtt1l-net.dtsi
+++ b/arch/arm/dts/stm32mp151-prtt1l-net.dtsi
@@ -2,6 +2,11 @@
 // SPDX-FileCopyrightText: 2021 David Jander, Protonic Holland
 // SPDX-FileCopyrightText: 2021 Oleksij Rempel, Pengutronix
 
+/*
+ * FIXME: Below nodes should be fleshed out into complete pinctrl groups in their
+ * own right. Otherwise, they will eventually be broken by upstream rework.
+ */
+
 &ethernet0 {
 	pinctrl-0 = <&ethernet0_rmii_pins_a>;
 	pinctrl-names = "default";
diff --git a/arch/arm/dts/stm32mp151-prtt1l.dtsi b/arch/arm/dts/stm32mp151-prtt1l.dtsi
index 80ae72dee22a..6c67bb936def 100644
--- a/arch/arm/dts/stm32mp151-prtt1l.dtsi
+++ b/arch/arm/dts/stm32mp151-prtt1l.dtsi
@@ -80,6 +80,12 @@
 	status = "okay";
 };
 
+/*
+ * FIXME: Below nodes should be fleshed out into complete pinctrl groups in their
+ * own right. Otherwise, they will eventually be broken by upstream rework.
+ */
+
+
 &sdmmc1_b4_pins_a {
 	pins1 {
 		bias-pull-up;
diff --git a/arch/arm/dts/stm32mp157c-phycore-stm32mp15-pinctrl.dtsi b/arch/arm/dts/stm32mp157c-phycore-stm32mp15-pinctrl.dtsi
index 011d73ec3f1a..18fbecc906e4 100644
--- a/arch/arm/dts/stm32mp157c-phycore-stm32mp15-pinctrl.dtsi
+++ b/arch/arm/dts/stm32mp157c-phycore-stm32mp15-pinctrl.dtsi
@@ -5,6 +5,11 @@
  */
 #include <arm/stm32mp15-pinctrl.dtsi>
 
+/*
+ * FIXME: Below nodes should be fleshed out into complete pinctrl groups in their
+ * own right. Otherwise, they will eventually be broken by upstream rework.
+ */
+
 &ethernet0_rgmii_pins_a {
 	pins1 {
 		pinmux = <STM32_PINMUX('G', 4, AF11)>,	/* ETH_RGMII_GTX_CLK */
-- 
2.30.2




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

end of thread, other threads:[~2023-02-17 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17 16:28 [PATCH 0/1] STM32MP: protonic/phycore: warn about potential DT breakage Ahmad Fatoum
2023-02-17 16:28 ` [PATCH 1/1] ARM: dts: STM32MP: protonic/phycore: add note about potential breakage Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox