c957388228eab727b20b1c5bac9447b80e6bcf14
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_xiaomi_miwifi-nano.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "xiaomi,miwifi-nano", "mediatek,mt7628an-soc";
8 model = "Xiaomi MiWiFi Nano";
9
10 aliases {
11 led-boot = &led_status_amber;
12 led-failsafe = &led_status_red;
13 led-running = &led_status_blue;
14 led-upgrade = &led_status_amber;
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_status_blue: status_blue {
26 label = "blue:status";
27 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
28 };
29
30 led_status_red: status_red {
31 label = "red:status";
32 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
33 };
34
35 led_status_amber: status_amber {
36 label = "amber:status";
37 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
38 };
39 };
40
41 keys {
42 compatible = "gpio-keys";
43
44 reset {
45 label = "reset";
46 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_RESTART>;
48 };
49 };
50 };
51
52 &state_default {
53 gpio {
54 groups = "gpio", "refclk", "wdt", "wled_an";
55 function = "gpio";
56 };
57 };
58
59 &ehci {
60 status = "disabled";
61 };
62
63 &ohci {
64 status = "disabled";
65 };
66
67 &esw {
68 mediatek,portmap = <0x2f>;
69 mediatek,portdisable = <0x2a>;
70 };
71
72 &wmac {
73 status = "okay";
74
75 nvmem-cells = <&eeprom_factory_0>;
76 nvmem-cell-names = "eeprom";
77 };
78
79 &ethernet {
80 nvmem-cells = <&macaddr_factory_28>;
81 nvmem-cell-names = "mac-address";
82 };
83
84 &spi0 {
85 status = "okay";
86
87 flash@0 {
88 compatible = "jedec,spi-nor";
89 reg = <0>;
90 spi-max-frequency = <40000000>;
91
92 partitions {
93 compatible = "fixed-partitions";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 partition@0 {
98 label = "u-boot";
99 reg = <0x0 0x30000>;
100 read-only;
101 };
102
103 partition@30000 {
104 label = "u-boot-env";
105 reg = <0x30000 0x10000>;
106 };
107
108 factory: partition@40000 {
109 compatible = "nvmem-cells";
110 label = "factory";
111 reg = <0x40000 0x10000>;
112 #address-cells = <1>;
113 #size-cells = <1>;
114 read-only;
115
116 eeprom_factory_0: eeprom@0 {
117 reg = <0x0 0x400>;
118 };
119
120 macaddr_factory_28: macaddr@28 {
121 reg = <0x28 0x6>;
122 };
123 };
124
125 partition@50000 {
126 compatible = "denx,uimage";
127 label = "firmware";
128 reg = <0x50000 0xfb0000>;
129 };
130 };
131 };
132 };