mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: dts. i.MX7: add stopgap solution for barebox UART clock breakage
@ 2020-04-15 10:14 Ahmad Fatoum
  2020-04-20 13:10 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2020-04-15 10:14 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov, Juergen Borleis, Ahmad Fatoum

Commit 8b2104d740 ("driver: Call of_clk_set_defaults for each probed device")
made barebox act on the assigned-clock-parents property everywhere, not
only for clock provider nodes. This breaks at least the serial console on
the i.MX7 SabreSD board; only garbage is output if the patch is not
reverted. As stopgap measure, override these properties for all enabled
uart nodes in the barebox i.MX7 device tree. This reverts the behavior
to what it was like before the offending commit.

This is of course no real solution, as obviously Linux was fine dealing
with these properties before. But this hack should at least fix the
serial console for the boards that were broken in v2020.03.0.

When a proper fix follows, this patch can be reverted.

Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Hello Sascha,

please apply to master, so the boards broken in v2020.03.0
aren't broken in v2020.04.0 as well.

Cheers,
---
 arch/arm/dts/imx7d-sdb.dts      | 11 +++++++++++
 arch/arm/dts/imx7d-zii-rmu2.dts | 11 +++++++++++
 arch/arm/dts/imx7d-zii-rpu2.dts | 11 +++++++++++
 arch/arm/dts/imx7s-warp.dts     | 16 ++++++++++++++++
 4 files changed, 49 insertions(+)

diff --git a/arch/arm/dts/imx7d-sdb.dts b/arch/arm/dts/imx7d-sdb.dts
index b90ada61b805..16bfabe9b358 100644
--- a/arch/arm/dts/imx7d-sdb.dts
+++ b/arch/arm/dts/imx7d-sdb.dts
@@ -28,3 +28,14 @@
 		line-name = "enet-rst-b";
 	};
 };
+
+/* FIXME: barebox serial is broken when barebox applies requested reparenting */
+&uart1 {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+};
+
+&uart6 {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+};
diff --git a/arch/arm/dts/imx7d-zii-rmu2.dts b/arch/arm/dts/imx7d-zii-rmu2.dts
index 1d0d631de7d2..a9e35aadf7a4 100644
--- a/arch/arm/dts/imx7d-zii-rmu2.dts
+++ b/arch/arm/dts/imx7d-zii-rmu2.dts
@@ -6,3 +6,14 @@
 
 #include "imx7d-zii-rmu2.dtsi"
 #include "imx7d-ddrc.dtsi"
+
+/* FIXME: barebox serial is broken when barebox applies requested reparenting */
+&uart2 {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+};
+
+&uart4 {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+};
diff --git a/arch/arm/dts/imx7d-zii-rpu2.dts b/arch/arm/dts/imx7d-zii-rpu2.dts
index f8d6e89046d7..af5991b16458 100644
--- a/arch/arm/dts/imx7d-zii-rpu2.dts
+++ b/arch/arm/dts/imx7d-zii-rpu2.dts
@@ -26,3 +26,14 @@
 		switch-eeprom = &switch;
 	};
 };
+
+/* FIXME: barebox serial is broken when barebox applies requested reparenting */
+&uart2 {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+};
+
+&uart4 {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+};
diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
index 49d4c7f2941a..c90147778346 100644
--- a/arch/arm/dts/imx7s-warp.dts
+++ b/arch/arm/dts/imx7s-warp.dts
@@ -42,3 +42,19 @@
 		};
 	};
 };
+
+/* FIXME: barebox serial is broken when barebox applies requested reparenting */
+&uart1 {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+};
+
+&uart3  {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+};
+
+&uart6 {
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-parents;
+};
-- 
2.26.0.rc2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2020-04-20 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 10:14 [PATCH] ARM: dts. i.MX7: add stopgap solution for barebox UART clock breakage Ahmad Fatoum
2020-04-20 13:10 ` Sascha Hauer

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