d84290d4c12354d40032634ff540b4e9ca8f4681
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_glinet_gl-mt300n-v2.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 /{
7 compatible = "glinet,gl-mt300n-v2", "mediatek,mt7628an-soc";
8 model = "GL-MT300N-V2";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 label-mac-device = &ethernet;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led_power: power {
26 label = "green:power";
27 default-state = "on";
28 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
29 };
30
31 wan {
32 label = "green:wan";
33 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
34 };
35
36 wlan {
37 label = "red:wlan";
38 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50
51 BTN_0 {
52 label = "BTN_0";
53 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
54 linux,code = <BTN_0>;
55 };
56
57 BTN_1 {
58 label = "BTN_1";
59 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
60 linux,code = <BTN_1>;
61 };
62 };
63
64 gpio_export {
65 compatible = "gpio-export";
66 #size-cells = <0>;
67
68 usb {
69 gpio-export,name = "usb";
70 gpio-export,output = <1>;
71 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
72 };
73 };
74 };
75
76 &state_default {
77 gpio {
78 groups = "wdt", "gpio", "wled_an", "p0led_an", "p1led_an", "i2s", "i2c";
79 function = "gpio";
80 };
81 };
82
83 &ethernet {
84 nvmem-cells = <&macaddr_factory_4>;
85 nvmem-cell-names = "mac-address";
86 };
87
88 &wmac {
89 status = "okay";
90
91 nvmem-cells = <&eeprom_factory_0>;
92 nvmem-cell-names = "eeprom";
93 };
94
95 &spi0 {
96 status = "okay";
97
98 flash@0 {
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <10000000>;
102
103 partitions {
104 compatible = "fixed-partitions";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 partition@0 {
109 label = "u-boot";
110 reg = <0x0 0x30000>;
111 read-only;
112 };
113
114 partition@30000 {
115 label = "u-boot-env";
116 reg = <0x30000 0x10000>;
117 read-only;
118 };
119
120 factory: partition@40000 {
121 label = "factory";
122 reg = <0x40000 0x10000>;
123 read-only;
124
125 nvmem-layout {
126 compatible = "fixed-layout";
127 #address-cells = <1>;
128 #size-cells = <1>;
129
130 eeprom_factory_0: eeprom@0 {
131 reg = <0x0 0x400>;
132 };
133
134 macaddr_factory_4: macaddr@4 {
135 reg = <0x4 0x6>;
136 };
137 };
138 };
139
140 partition@50000 {
141 compatible = "denx,uimage";
142 label = "firmware";
143 reg = <0x50000 0xfb0000>;
144 };
145 };
146 };
147 };
148
149 &uart1 {
150 status = "okay";
151 };