feb57fecffc93debfc8909b1463043b28f087f48
[openwrt/staging/dedeckeh.git] / target / linux / realtek / dts-5.10 / rtl8380_engenius_ews2910p.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "rtl838x.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 compatible = "engenius,ews2910p", "realtek,rtl838x-soc";
10 model = "EnGenius EWS2910P";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_fault;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 memory@0 {
20 device_type = "memory";
21 reg = <0x0 0x10000000>;
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 led_mode {
34 label = "led-mode";
35 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
36 linux,code = <BTN_0>;
37 };
38 };
39
40 gpio1: rtl8231-gpio {
41 compatible = "realtek,rtl8231-gpio";
42 #gpio-cells = <2>;
43 gpio-controller;
44 indirect-access-bus-id = <0>;
45 };
46
47 gpio-restart {
48 compatible = "gpio-restart";
49 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
50 };
51
52 leds {
53 compatible = "gpio-leds";
54
55 led_power: led-0 {
56 label = "green:power";
57 gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
58 };
59
60 led_lan_mode: led-1 {
61 label = "green:lan-mode";
62 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
63 };
64
65 led_fault: led-2 {
66 label = "amber:fault";
67 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
68 };
69
70 led_poe_max: led-3 {
71 label = "amber:poe-max";
72 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
73 };
74 };
75 };
76
77 &spi0 {
78 status = "okay";
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 reg = <0>;
83 spi-max-frequency = <10000000>;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x0 0x80000>;
93 read-only;
94 };
95 partition@80000 {
96 label = "u-boot-env";
97 reg = <0x80000 0x10000>;
98 read-only;
99 };
100 partition@90000 {
101 label = "u-boot-env2";
102 reg = <0x90000 0x10000>;
103 };
104 partition@a0000 {
105 label = "jffs2-cfg";
106 reg = <0xa0000 0xd60000>;
107 };
108 partition@e00000 {
109 label = "jffs2-log";
110 reg = <0xe00000 0x200000>;
111 };
112 partition@1000000 {
113 compatible = "openwrt,uimage";
114 label = "firmware";
115 reg = <0x1000000 0x800000>;
116 openwrt,ih-magic = <0x03802910>;
117 };
118 partition@1800000 {
119 label = "firmware2";
120 reg = <0x1800000 0x800000>;
121 };
122 };
123 };
124 };
125
126 &ethernet0 {
127 mdio: mdio-bus {
128 compatible = "realtek,rtl838x-mdio";
129 regmap = <&ethernet0>;
130 #address-cells = <1>;
131 #size-cells = <0>;
132
133 INTERNAL_PHY(8)
134 INTERNAL_PHY(9)
135 INTERNAL_PHY(10)
136 INTERNAL_PHY(11)
137 INTERNAL_PHY(12)
138 INTERNAL_PHY(13)
139 INTERNAL_PHY(14)
140 INTERNAL_PHY(15)
141 };
142 };
143
144 &switch0 {
145 ports {
146 #address-cells = <1>;
147 #size-cells = <0>;
148
149 SWITCH_PORT(8, 1, internal)
150 SWITCH_PORT(9, 2, internal)
151 SWITCH_PORT(10, 3, internal)
152 SWITCH_PORT(11, 4, internal)
153 SWITCH_PORT(12, 5, internal)
154 SWITCH_PORT(13, 6, internal)
155 SWITCH_PORT(14, 7, internal)
156 SWITCH_PORT(15, 8, internal)
157
158 port@28 {
159 ethernet = <&ethernet0>;
160 reg = <28>;
161 phy-mode = "internal";
162
163 fixed-link {
164 speed = <1000>;
165 full-duplex;
166 };
167 };
168 };
169 };
170
171 &uart1 {
172 status = "okay";
173 };