[openwrt/openwrt] realtek: Add Lexra bus clock

LEDE Commits lede-commits at lists.infradead.org
Wed Nov 24 12:20:23 PST 2021


stintel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d3a62bea085ddd959d195671dcbeba9829e47dae

commit d3a62bea085ddd959d195671dcbeba9829e47dae
Author: Sander Vanheule <sander at svanheule.net>
AuthorDate: Sun Nov 14 19:45:31 2021 +0100

    realtek: Add Lexra bus clock
    
    The CPU peripherals on RTL83xx/RTL930x are connected to the CPU via the
    Lexra bus. This bus can provide a clock signal to these peripherals, but
    no clock driver is currently available. Instead, use a fixed-clock to
    provide the clock frequency, and update the dependent peripherals.
    
    Lexra bus clock frequencies:
    - RTL838x: 200MHz
    - RTL839x: 200MHz
    - RTL930x: 175MHz
    
    Signed-off-by: Sander Vanheule <sander at svanheule.net>
    Tested-by: Stijn Segers <foss at volatilesystems.org>
    Tested-by: Paul Fertser <fercerpav at gmail.com>
    Tested-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 target/linux/realtek/dts-5.10/rtl838x.dtsi | 10 ++++++++--
 target/linux/realtek/dts-5.10/rtl930x.dtsi | 11 +++++------
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/target/linux/realtek/dts-5.10/rtl838x.dtsi b/target/linux/realtek/dts-5.10/rtl838x.dtsi
index a33b6d899e..dc60e12bad 100644
--- a/target/linux/realtek/dts-5.10/rtl838x.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl838x.dtsi
@@ -68,6 +68,12 @@
 		bootargs = "console=ttyS0,115200";
 	};
 
+	lx_clk: lx_clk {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <200000000>;
+	};
+
 	cpuintc: cpuintc {
 		compatible = "mti,cpu-interrupt-controller";
 		#address-cells = <0>;
@@ -116,7 +122,7 @@
 			compatible = "ns16550a";
 			reg = <0x2000 0x100>;
 
-			clock-frequency = <200000000>;
+			clocks = <&lx_clk>;
 
 			interrupt-parent = <&intc>;
 			interrupts = <31>;
@@ -134,7 +140,7 @@
 			compatible = "ns16550a";
 			reg = <0x2100 0x100>;
 
-			clock-frequency = <200000000>;
+			clocks = <&lx_clk>;
 
 			interrupt-parent = <&intc>;
 			interrupts = <30>;
diff --git a/target/linux/realtek/dts-5.10/rtl930x.dtsi b/target/linux/realtek/dts-5.10/rtl930x.dtsi
index e53f506a95..9e9501d51a 100644
--- a/target/linux/realtek/dts-5.10/rtl930x.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl930x.dtsi
@@ -80,11 +80,10 @@
 		interrupt-controller;
 	};
 
-	osc: oscillator {
+	lx_clk: lx_clk {
 		compatible = "fixed-clock";
-		#clock-cells = <1>;
+		#clock-cells = <0>;
 		clock-frequency  = <175000000>;
-		clock-output-names = "osc";
 	};
 
 	soc: soc {
@@ -119,7 +118,7 @@
 			interrupt-parent = <&intc>;
 			interrupts = <8>;
 			interrupt-names = "ostimer";
-			clocks = <&osc 0>;
+			clocks = <&lx_clk>;
 		};
 
 		spi0: spi at 1200 {
@@ -134,7 +133,7 @@
 			compatible = "ns16550a";
 			reg = <0x2000 0x100>;
 
-			clock-frequency = <175000000>;
+			clocks = <&lx_clk>;
 
 			interrupt-parent = <&intc>;
 			interrupts = <30>;
@@ -149,7 +148,7 @@
 			compatible = "ns16550a";
 			reg = <0x2100 0x100>;
 
-			clock-frequency = <175000000>;
+			clocks = <&lx_clk>;
 
 			interrupt-parent = <&intc>;
 			interrupts = <31>;



More information about the lede-commits mailing list