ramips: add support for TP-Link RE205 v3
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620n_zbtlink_zbt-wr8305rt.dts
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "zbtlink,zbt-wr8305rt", "ralink,mt7620n-soc";
9 model = "Zbtlink ZBT-WR8305RT";
10
11 aliases {
12 led-boot = &led_sys;
13 led-failsafe = &led_sys;
14 led-running = &led_sys;
15 led-upgrade = &led_sys;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_sys: sys {
22 label = "green:sys";
23 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
24 };
25
26 lan {
27 function = LED_FUNCTION_USB;
28 color = <LED_COLOR_ID_GREEN>;
29 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
30 trigger-sources = <&ohci_port1>, <&ehci_port1>;
31 linux,default-trigger = "usbport";
32 };
33
34 wifi {
35 label = "green:wifi";
36 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
37 };
38 };
39
40 keys {
41 compatible = "gpio-keys";
42
43 reset {
44 label = "reset";
45 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 };
48 };
49 };
50
51 &gpio1 {
52 status = "okay";
53 };
54
55 &gpio3 {
56 status = "okay";
57 };
58
59 &spi0 {
60 status = "okay";
61
62 flash@0 {
63 compatible = "jedec,spi-nor";
64 reg = <0>;
65 spi-max-frequency = <10000000>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "u-boot";
74 reg = <0x0 0x30000>;
75 read-only;
76 };
77
78 partition@30000 {
79 label = "u-boot-env";
80 reg = <0x30000 0x10000>;
81 read-only;
82 };
83
84 partition@40000 {
85 label = "factory";
86 reg = <0x40000 0x10000>;
87 read-only;
88
89 nvmem-layout {
90 compatible = "fixed-layout";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 eeprom_factory_0: eeprom@0 {
95 reg = <0x0 0x200>;
96 };
97
98 macaddr_factory_4: macaddr@4 {
99 reg = <0x4 0x6>;
100 };
101 };
102 };
103
104 partition@50000 {
105 compatible = "denx,uimage";
106 label = "firmware";
107 reg = <0x50000 0x7b0000>;
108 };
109 };
110 };
111 };
112
113 &ehci {
114 status = "okay";
115 };
116
117 &ohci {
118 status = "okay";
119 };
120
121 &ethernet {
122 pinctrl-names = "default";
123 pinctrl-0 = <&ephy_pins>;
124
125 nvmem-cells = <&macaddr_factory_4>;
126 nvmem-cell-names = "mac-address";
127
128 mediatek,portmap = "llllw";
129 };
130
131 &wmac {
132 nvmem-cells = <&eeprom_factory_0>;
133 nvmem-cell-names = "eeprom";
134 };
135
136 &state_default {
137 default {
138 groups = "i2c", "uartf", "spi refclk", "wled";
139 function = "gpio";
140 };
141 };