ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/wigyori.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 compatible = "nvmem-cells";
79 label = "factory";
80 reg = <0x40000 0x10000>;
81 #address-cells = <1>;
82 #size-cells = <1>;
83 read-only;
84
85 eeprom_factory_0: eeprom@0 {
86 reg = <0x0 0x200>;
87 };
88
89 macaddr_factory_4: macaddr@4 {
90 reg = <0x4 0x6>;
91 };
92 };
93
94 firmware: partition@50000 {
95 compatible = "denx,uimage";
96 label = "firmware";
97 /* reg property is set based on flash size in DTS files */
98 };
99 };
100 };
101 };
102
103 &gpio1 {
104 status = "okay";
105 };
106
107 &gpio3 {
108 status = "okay";
109 };
110
111 &sdhci {
112 status = "okay";
113 };
114
115 &ehci {
116 status = "okay";
117 };
118
119 &ohci {
120 status = "okay";
121 };
122
123 &ethernet {
124 nvmem-cells = <&macaddr_factory_4>;
125 nvmem-cell-names = "mac-address";
126
127 mediatek,portmap = "llllw";
128 };
129
130 &wmac {
131 nvmem-cells = <&eeprom_factory_0>;
132 nvmem-cell-names = "eeprom";
133 };
134
135 &state_default {
136 default {
137 groups = "i2c", "uartf", "wled", "spi refclk", "pa";
138 function = "gpio";
139 };
140 };
141
142 &pcie {
143 status = "okay";
144 };