lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 11 Apr 2022 14:11:08 +0200
From:   Matthias Schiffer <matthias.schiffer@...tq-group.com>
To:     Nishanth Menon <nm@...com>, Vignesh Raghavendra <vigneshr@...com>,
        Tero Kristo <kristo@...nel.org>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Matthias Schiffer <matthias.schiffer@...tq-group.com>
Subject: [PATCH] arm64: dts: ti: k3-am64-mcu: explicitly assign UART base clock rates

We found that (at least some versions of) the sci-fw do not assign the
expected base clock rate of 48 MHz for the UARTs in the MCU domain,
leading to incorrect baud rates when used from Linux. Use
assigned-clock-rates to fix this issue.

Fixes: 8abae9389bdb ("arm64: dts: ti: Add support for AM642 SoC")
Signed-off-by: Matthias Schiffer <matthias.schiffer@...tq-group.com>
---

I'm not sure if this is the best fix. Should the clock-frequency
property simply be removed, so the frequency is queried from the clock
driver instead?

 arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi
index 2bb5c9ff172c..69b0f127eea5 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi
@@ -15,6 +15,8 @@ mcu_uart0: serial@...0000 {
 		power-domains = <&k3_pds 149 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 149 0>;
 		clock-names = "fclk";
+		assigned-clocks = <&k3_clks 149 0>;
+		assigned-clock-rates = <48000000>;
 	};
 
 	mcu_uart1: serial@...0000 {
@@ -26,6 +28,8 @@ mcu_uart1: serial@...0000 {
 		power-domains = <&k3_pds 160 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 160 0>;
 		clock-names = "fclk";
+		assigned-clocks = <&k3_clks 160 0>;
+		assigned-clock-rates = <48000000>;
 	};
 
 	mcu_i2c0: i2c@...0000 {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ