e0445c61dd02411344e1b79b0d523abd2eda8498
[openwrt/staging/mkresin.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";
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
92 &spi0 {
93 status = "okay";
94
95 flash@0 {
96 compatible = "jedec,spi-nor";
97 reg = <0>;
98 spi-max-frequency = <10000000>;
99
100 partitions {
101 compatible = "fixed-partitions";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 partition@0 {
106 label = "u-boot";
107 reg = <0x0 0x30000>;
108 read-only;
109 };
110
111 partition@30000 {
112 label = "u-boot-env";
113 reg = <0x30000 0x10000>;
114 read-only;
115 };
116
117 factory: partition@40000 {
118 label = "factory";
119 reg = <0x40000 0x10000>;
120 read-only;
121 };
122
123 partition@50000 {
124 compatible = "denx,uimage";
125 label = "firmware";
126 reg = <0x50000 0xfb0000>;
127 };
128 };
129 };
130 };
131
132 &uart1 {
133 status = "okay";
134 };
135
136 &factory {
137 compatible = "nvmem-cells";
138 #address-cells = <1>;
139 #size-cells = <1>;
140
141 macaddr_factory_4: macaddr@4 {
142 reg = <0x4 0x6>;
143 };
144 };