kernel: bump 5.4 to 5.4.80
[openwrt/openwrt.git] / target / linux / rtl838x / dts / rtl838x.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #define STRINGIZE(s) #s
6 #define LAN_LABEL(p, s) STRINGIZE(p ## s)
7 #define SWITCH_PORT_LABEL(n) LAN_LABEL(lan, n)
8
9 #define INTERNAL_PHY(n) \
10 phy##n: ethernet-phy@##n { \
11 reg = <##n>; \
12 compatible = "ethernet-phy-ieee802.3-c22"; \
13 phy-is-integrated; \
14 };
15
16 #define EXTERNAL_PHY(n) \
17 phy##n: ethernet-phy@##n { \
18 reg = <##n>; \
19 compatible = "ethernet-phy-ieee802.3-c22"; \
20 };
21
22 #define EXTERNAL_SFP_PHY(n) \
23 phy##n: ethernet-phy@##n { \
24 compatible = "ethernet-phy-ieee802.3-c22"; \
25 sfp; \
26 media = "fibre"; \
27 reg = <##n>; \
28 };
29
30 #define SWITCH_PORT(n, s, m) \
31 port@##n { \
32 reg = <##n>; \
33 label = SWITCH_PORT_LABEL(s) ; \
34 phy-handle = <&phy##n>; \
35 phy-mode = #m ; \
36 };
37
38 / {
39 #address-cells = <1>;
40 #size-cells = <1>;
41
42 compatible = "realtek,rtl838x-soc";
43
44 cpus {
45 #address-cells = <1>;
46 #size-cells = <0>;
47 frequency = <500000000>;
48
49 cpu@0 {
50 compatible = "mips,mips4KEc";
51 reg = <0>;
52 };
53 };
54
55 memory@0 {
56 device_type = "memory";
57 reg = <0x0 0x8000000>;
58 };
59
60 chosen {
61 bootargs = "console=ttyS0,38400";
62 };
63
64 cpuintc: cpuintc {
65 #address-cells = <0>;
66 #interrupt-cells = <1>;
67 interrupt-controller;
68 compatible = "rtl838x,icu";
69 reg = <0xb8003000 0x20>;
70 };
71
72 spi0: spi@b8001200 {
73 status = "okay";
74
75 compatible = "realtek,rtl838x-nor";
76 reg = <0xb8001200 0x100>;
77
78 #address-cells = <1>;
79 #size-cells = <0>;
80 };
81
82 uart0: uart@b8002000 {
83 status = "disabled";
84
85 compatible = "ns16550a";
86 reg = <0xb8002000 0x100>;
87
88 clock-frequency = <200000000>;
89
90 interrupt-parent = <&cpuintc>;
91 interrupts = <31>;
92
93 reg-io-width = <1>;
94 reg-shift = <2>;
95 fifo-size = <1>;
96 no-loopback-test;
97 };
98
99 uart1: uart@b8002100 {
100 status = "okay";
101
102 compatible = "ns16550a";
103 reg = <0xb8002100 0x100>;
104
105 clock-frequency = <200000000>;
106
107 interrupt-parent = <&cpuintc>;
108 interrupts = <30>;
109
110 reg-io-width = <1>;
111 reg-shift = <2>;
112 fifo-size = <1>;
113 no-loopback-test;
114 };
115
116 gpio0: gpio-controller@b8003500 {
117 compatible = "realtek,rtl838x-gpio";
118 reg = <0xb8003500 0x20>;
119 gpio-controller;
120 #gpio-cells = <2>;
121 interrupt-parent = <&cpuintc>;
122 interrupts = <23>;
123 };
124
125 ethernet0: ethernet@bb00a300 {
126 status = "okay";
127
128 compatible = "realtek,rtl838x-eth";
129 reg = <0xbb00a300 0x100>;
130 interrupt-parent = <&cpuintc>;
131 interrupts = <24>;
132 #interrupt-cells = <1>;
133 phy-mode = "internal";
134
135 fixed-link {
136 speed = <1000>;
137 full-duplex;
138 };
139 };
140
141 switch0: switch@bb000000 {
142 status = "okay";
143
144 compatible = "realtek,rtl838x-switch";
145 };
146 };