mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
	Juergen Borleis <jbe@pengutronix.de>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] ARM: dts. i.MX7: add stopgap solution for barebox UART clock breakage
Date: Wed, 15 Apr 2020 12:14:22 +0200	[thread overview]
Message-ID: <20200415101422.14405-1-a.fatoum@pengutronix.de> (raw)

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

             reply	other threads:[~2020-04-15 10:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15 10:14 Ahmad Fatoum [this message]
2020-04-20 13:10 ` Sascha Hauer

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=20200415101422.14405-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=jbe@pengutronix.de \
    /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