Skip to contentSkip to conversation

riscv: starfive: jh7110: move uart0 clock frequency to config header

PATCH In review E Shattow 2 participants 2 messages May 3, 2025 – May 12, 2025 RISC-V

lore
Share & tools
lore

E Shattow

author
#0 lore raw

PATCH 1/1 riscv: starfive: jh7110: move uart0 clock frequency to config header

Move unnecessary clock frequency assignment out of device-tree and into the board config header so that the ns16550 serial driver can successfully init during SPL after failing to resolve the parent clock from upstream dts. The serial driver will then resolve clock frequency from device-tree node parent clock at init during Main app as it is expected by upstream.

---
 arch/riscv/dts/jh7110-common-u-boot.dtsi | 1 -
 include/configs/starfive-visionfive2.h   | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/riscv/dts/jh7110-common-u-boot.dtsi +0 -1
index 6d85b2d91a7..049b0a7ce28 100644
@@ -27,7 +27,6 @@
 	bootph-pre-ram;
 	reg-offset = <0>;
 	current-speed = <115200>;
-	clock-frequency = <24000000>;
 };
 
 &mmc0 {
include/configs/starfive-visionfive2.h +2 -0
index 049b0a06301..e7001b26abf 100644
@@ -39,4 +39,6 @@
 	"partitions=" PARTS_DEFAULT "\0" \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"
 
+#define CFG_SYS_NS16550_CLK		24000000
+
 #endif /* _STARFIVE_VISIONFIVE2_H */

base-commit: 6cc812f8cc55c132458c7da5b9fb7666315cbe8c

Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · E Shattow

Move unnecessary clock frequency assignment out of device-tree and into the board config header so that the ns16550 serial driver can successfully init during SPL after failing to resolve the parent clock from upstream dts. The serial driver will then resolve clock frequency from device-tree node parent clock at init during Main app as it is expected by upstream.

---
 arch/riscv/dts/jh7110-common-u-boot.dtsi | 1 -
 include/configs/starfive-visionfive2.h   | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)