983c7fc03e9e6c526aa02f6985727e37189312a4
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_onion_omega2.dtsi
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "onion,omega2", "mediatek,mt7628an-soc";
8
9 aliases {
10 led-boot = &led_system;
11 led-failsafe = &led_system;
12 led-running = &led_system;
13 led-upgrade = &led_system;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_system: system {
24 label = "amber:system";
25 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
26 };
27 };
28
29 keys {
30 compatible = "gpio-keys";
31
32 reset {
33 label = "reset";
34 gpios = <&gpio 38 GPIO_ACTIVE_HIGH>;
35 linux,code = <KEY_RESTART>;
36 };
37 };
38 };
39
40 &state_default {
41 gpio {
42 groups = "gpio";
43 function = "gpio";
44 };
45
46 perst {
47 groups = "perst";
48 function = "gpio";
49 };
50
51 refclk {
52 groups = "refclk";
53 function = "gpio";
54 };
55
56 i2s {
57 groups = "i2s";
58 function = "gpio";
59 };
60
61 spis {
62 groups = "spis";
63 function = "gpio";
64 };
65
66 wled_kn {
67 groups = "wled_kn";
68 function = "gpio";
69 };
70
71 wled_an {
72 groups = "wled_an";
73 function = "gpio";
74 };
75
76 wdt {
77 groups = "wdt";
78 function = "gpio";
79 };
80
81 pwm0 {
82 groups = "pwm0";
83 function = "gpio";
84 };
85
86 pwm1 {
87 groups = "pwm1";
88 function = "gpio";
89 };
90 };
91
92 &spi0 {
93 status = "okay";
94
95 pinctrl-names = "default";
96 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
97
98 flash0: flash@0 {
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <40000000>;
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 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_28: macaddr@28 {
135 reg = <0x28 0x6>;
136 };
137 };
138 };
139
140 firmware: partition@50000 {
141 compatible = "denx,uimage";
142 label = "firmware";
143 };
144 };
145 };
146
147 spidev@1 {
148 #address-cells = <1>;
149 #size-cells = <1>;
150 compatible = "linux,spidev";
151 reg = <1>;
152 spi-max-frequency = <40000000>;
153 };
154 };
155
156 &i2c {
157 status = "okay";
158 };
159
160 &uart1 {
161 status = "okay";
162 };
163
164 &uart2 {
165 status = "okay";
166 };
167
168 &ethernet {
169 nvmem-cells = <&macaddr_factory_28>;
170 nvmem-cell-names = "mac-address";
171 };
172
173 &sdhci {
174 status = "okay";
175 mediatek,cd-low;
176 };
177
178 &wmac {
179 status = "okay";
180
181 nvmem-cells = <&eeprom_factory_0>;
182 nvmem-cell-names = "eeprom";
183 };