Skip to content

Commit

Permalink
realtek: Add Lexra bus clock
Browse files Browse the repository at this point in the history
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@svanheule.net>
Tested-by: Stijn Segers <foss@volatilesystems.org>
Tested-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
  • Loading branch information
svanheule authored and stintel committed Nov 24, 2021
1 parent af2cfbd commit d3a62be
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
10 changes: 8 additions & 2 deletions target/linux/realtek/dts-5.10/rtl838x.dtsi
Expand Up @@ -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>;
Expand Down Expand Up @@ -116,7 +122,7 @@
compatible = "ns16550a";
reg = <0x2000 0x100>;

clock-frequency = <200000000>;
clocks = <&lx_clk>;

interrupt-parent = <&intc>;
interrupts = <31>;
Expand All @@ -134,7 +140,7 @@
compatible = "ns16550a";
reg = <0x2100 0x100>;

clock-frequency = <200000000>;
clocks = <&lx_clk>;

interrupt-parent = <&intc>;
interrupts = <30>;
Expand Down
11 changes: 5 additions & 6 deletions target/linux/realtek/dts-5.10/rtl930x.dtsi
Expand Up @@ -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 {
Expand Down Expand Up @@ -119,7 +118,7 @@
interrupt-parent = <&intc>;
interrupts = <8>;
interrupt-names = "ostimer";
clocks = <&osc 0>;
clocks = <&lx_clk>;
};

spi0: spi@1200 {
Expand All @@ -134,7 +133,7 @@
compatible = "ns16550a";
reg = <0x2000 0x100>;

clock-frequency = <175000000>;
clocks = <&lx_clk>;

interrupt-parent = <&intc>;
interrupts = <30>;
Expand All @@ -149,7 +148,7 @@
compatible = "ns16550a";
reg = <0x2100 0x100>;

clock-frequency = <175000000>;
clocks = <&lx_clk>;

interrupt-parent = <&intc>;
interrupts = <31>;
Expand Down

0 comments on commit d3a62be

Please sign in to comment.