Skip to content

Commit 74beefb

Browse files
cpackham-atlnztsbogend
authored andcommitted
mips: dts: realtek: Add RTL9302C board
Add support for the RTL9302 SoC and the RTL9302C_2xRTL8224_2XGE reference board. The RTL930x family of SoCs are Realtek switches with an embedded MIPS core (800MHz 34Kc). Most of the peripherals are similar to the RTL838x SoC and can make use of many existing drivers. Add in full DSA switch support is still a work in progress. Signed-off-by: Chris Packham <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 662c000 commit 74beefb

File tree

3 files changed

+153
-0
lines changed

3 files changed

+153
-0
lines changed

arch/mips/boot/dts/realtek/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# SPDX-License-Identifier: GPL-2.0
22
dtb-y += cisco_sg220-26.dtb
3+
dtb-y += cameo-rtl9302c-2x-rtl8224-2xge.dtb
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
/dts-v1/;
3+
4+
#include "rtl930x.dtsi"
5+
6+
#include <dt-bindings/input/input.h>
7+
#include <dt-bindings/gpio/gpio.h>
8+
#include <dt-bindings/leds/common.h>
9+
#include <dt-bindings/thermal/thermal.h>
10+
11+
/ {
12+
compatible = "cameo,rtl9302c-2x-rtl8224-2xge", "realtek,rtl9302-soc";
13+
model = "RTL9302C Development Board";
14+
15+
memory@0 {
16+
device_type = "memory";
17+
reg = <0x0 0x8000000>;
18+
};
19+
20+
chosen {
21+
stdout-path = "serial0:115200n8";
22+
};
23+
};
24+
25+
&uart0 {
26+
status = "okay";
27+
};
28+
29+
&spi0 {
30+
status = "okay";
31+
flash@0 {
32+
compatible = "jedec,spi-nor";
33+
reg = <0>;
34+
spi-max-frequency = <10000000>;
35+
36+
partitions {
37+
compatible = "fixed-partitions";
38+
#address-cells = <1>;
39+
#size-cells = <1>;
40+
41+
partition@0 {
42+
label = "LOADER";
43+
reg = <0x0 0xe0000>;
44+
read-only;
45+
};
46+
partition@e0000 {
47+
label = "BDINFO";
48+
reg = <0xe0000 0x10000>;
49+
};
50+
partition@f0000 {
51+
label = "SYSINFO";
52+
reg = <0xf0000 0x10000>;
53+
read-only;
54+
};
55+
partition@100000 {
56+
label = "JFFS2 CFG";
57+
reg = <0x100000 0x100000>;
58+
};
59+
partition@200000 {
60+
label = "JFFS2 LOG";
61+
reg = <0x200000 0x100000>;
62+
};
63+
partition@300000 {
64+
label = "RUNTIME";
65+
reg = <0x300000 0xe80000>;
66+
};
67+
partition@1180000 {
68+
label = "RUNTIME2";
69+
reg = <0x1180000 0xe80000>;
70+
};
71+
};
72+
};
73+
};
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
2+
3+
#include "rtl83xx.dtsi"
4+
5+
/ {
6+
compatible = "realtek,rtl9302-soc";
7+
8+
cpus {
9+
#address-cells = <1>;
10+
#size-cells = <0>;
11+
12+
cpu@0 {
13+
device_type = "cpu";
14+
compatible = "mips,mips34Kc";
15+
reg = <0>;
16+
clocks = <&baseclk 0>;
17+
clock-names = "cpu";
18+
};
19+
};
20+
21+
baseclk: clock-800mhz {
22+
compatible = "fixed-clock";
23+
#clock-cells = <0>;
24+
clock-frequency = <800000000>;
25+
};
26+
27+
lx_clk: clock-175mhz {
28+
compatible = "fixed-clock";
29+
#clock-cells = <0>;
30+
clock-frequency = <175000000>;
31+
};
32+
};
33+
34+
&soc {
35+
intc: interrupt-controller@3000 {
36+
compatible = "realtek,rtl9300-intc", "realtek,rtl-intc";
37+
reg = <0x3000 0x18>, <0x3018 0x18>;
38+
interrupt-controller;
39+
#interrupt-cells = <1>;
40+
41+
interrupt-parent = <&cpuintc>;
42+
interrupts = <2>, <3>, <4>, <5>, <6>, <7>;
43+
};
44+
45+
spi0: spi@1200 {
46+
compatible = "realtek,rtl8380-spi";
47+
reg = <0x1200 0x100>;
48+
49+
#address-cells = <1>;
50+
#size-cells = <0>;
51+
};
52+
53+
timer0: timer@3200 {
54+
compatible = "realtek,rtl9302-timer", "realtek,otto-timer";
55+
reg = <0x3200 0x10>, <0x3210 0x10>, <0x3220 0x10>,
56+
<0x3230 0x10>, <0x3240 0x10>;
57+
58+
interrupt-parent = <&intc>;
59+
interrupts = <7>, <8>, <9>, <10>, <11>;
60+
clocks = <&lx_clk>;
61+
};
62+
};
63+
64+
&uart0 {
65+
/delete-property/ clock-frequency;
66+
clocks = <&lx_clk>;
67+
68+
interrupt-parent = <&intc>;
69+
interrupts = <30>;
70+
};
71+
72+
&uart1 {
73+
/delete-property/ clock-frequency;
74+
clocks = <&lx_clk>;
75+
76+
interrupt-parent = <&intc>;
77+
interrupts = <31>;
78+
};
79+

0 commit comments

Comments
 (0)