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