79d1fbc335e0b1e6977825bc2d015dacb27c5067
[openwrt/staging/stintel.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 factory: partition@40000 {
121 compatible = "nvmem-cells";
122 label = "factory";
123 reg = <0x40000 0x10000>;
124 #address-cells = <1>;
125 #size-cells = <1>;
126 read-only;
127
128 eeprom_factory_0: eeprom@0 {
129 reg = <0x0 0x400>;
130 };
131
132 macaddr_factory_28: macaddr@28 {
133 reg = <0x28 0x6>;
134 };
135 };
136
137 firmware: partition@50000 {
138 compatible = "denx,uimage";
139 label = "firmware";
140 };
141 };
142 };
143
144 spidev@1 {
145 #address-cells = <1>;
146 #size-cells = <1>;
147 compatible = "linux,spidev";
148 reg = <1>;
149 spi-max-frequency = <40000000>;
150 };
151 };
152
153 &i2c {
154 status = "okay";
155 };
156
157 &uart1 {
158 status = "okay";
159 };
160
161 &uart2 {
162 status = "okay";
163 };
164
165 &ethernet {
166 nvmem-cells = <&macaddr_factory_28>;
167 nvmem-cell-names = "mac-address";
168 };
169
170 &sdhci {
171 status = "okay";
172 mediatek,cd-low;
173 };
174
175 &wmac {
176 status = "okay";
177
178 nvmem-cells = <&eeprom_factory_0>;
179 nvmem-cell-names = "eeprom";
180 };