Re: [PATCH v2 09/26] arm: dts: k3-am654: remove duplicate timer

2024-01-02 Thread Nishanth Menon
On 11:47-20231229, Bryan Brattlof wrote:
> timer1 is really just the mcu_timer0 node redefined for the WKUP SPL.
> Remove the timer1 and replace it with the mcu_timer0 from the Linux
> device tree we imported into U-Boot.
> 
> Tested-by: Tom Rini 
> Signed-off-by: Bryan Brattlof 
> ---
[...]
Reviewed-by: Nishanth Menon 
-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 
849D 1736 249D


[PATCH v2 09/26] arm: dts: k3-am654: remove duplicate timer

2023-12-29 Thread Bryan Brattlof
timer1 is really just the mcu_timer0 node redefined for the WKUP SPL.
Remove the timer1 and replace it with the mcu_timer0 from the Linux
device tree we imported into U-Boot.

Tested-by: Tom Rini 
Signed-off-by: Bryan Brattlof 
---
 arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 12 
 arch/arm/dts/k3-am654-r5-base-board.dts  | 30 ++--
 2 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi 
b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
index 4b1e8ce2c920c..a008af5b4a047 100644
--- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
@@ -5,6 +5,18 @@
 
 #include "k3-am65x-binman.dtsi"
 
+/ {
+   chosen {
+   tick-timer = _timer0;
+   };
+};
+
+_timer0 {
+   ti,timer-alwon;
+   clock-frequency = <2500>;
+   bootph-all;
+};
+
 _supply {
bootph-pre-ram;
 };
diff --git a/arch/arm/dts/k3-am654-r5-base-board.dts 
b/arch/arm/dts/k3-am654-r5-base-board.dts
index fb13a17b1dc64..f462262b9aaac 100644
--- a/arch/arm/dts/k3-am654-r5-base-board.dts
+++ b/arch/arm/dts/k3-am654-r5-base-board.dts
@@ -26,11 +26,6 @@
usb1 = 
};
 
-   chosen {
-   stdout-path = "serial2:115200n8";
-   tick-timer = 
-   };
-
a53_0: a53@0 {
compatible = "ti,am654-rproc";
reg = <0x0 0x00a9 0x0 0x10>;
@@ -47,16 +42,6 @@
};
 };
 
-_main {
-   timer1: timer@4040 {
-   compatible = "ti,omap5430-timer";
-   reg = <0x0 0x4040 0x0 0x80>;
-   ti,timer-alwon;
-   clock-frequency = <2500>;
-   bootph-all;
-   };
-};
-
 _mcu {
mcu_secproxy: secproxy@2838 {
compatible = "ti,am654-secure-proxy";
@@ -108,6 +93,21 @@
};
 };
 
+/*
+ * timer init is called as part of rproc_start() while
+ * starting System Firmware, so any clock/power-domain
+ * operations will fail as SYSFW is not yet up and running.
+ * Delete all clock/power-domain properties to avoid
+ * timer init failure.
+ * This is an always on timer at 20MHz.
+ */
+_timer0 {
+   /delete-property/ clocks;
+   /delete-property/ assigned-clocks;
+   /delete-property/ assigned-clock-parents;
+   /delete-property/ power-domains;
+};
+
  {
mboxes= <_secproxy 8>, <_secproxy 6>, <_secproxy 5>;
mbox-names = "tx", "rx", "notify";
-- 
2.43.0