ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7620n_zbtlink_zbt-cpe102.dts
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "zbtlink,zbt-cpe102", "ralink,mt7620n-soc";
8 model = "Zbtlink ZBT-CPE102";
9
10 chosen {
11 bootargs = "console=ttyS0,115200";
12 };
13
14 aliases {
15 led-boot = &led_4g_0;
16 led-failsafe = &led_4g_0;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_4g_0: 4g-0 {
23 label = "green:4g-0";
24 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
25 };
26
27 4g-1 {
28 label = "green:4g-1";
29 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
30 };
31
32 4g-2 {
33 label = "green:4g-2";
34 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46 };
47 };
48
49 &gpio1 {
50 status = "okay";
51 };
52
53 &spi0 {
54 status = "okay";
55
56 flash@0 {
57 compatible = "jedec,spi-nor";
58 reg = <0>;
59 spi-max-frequency = <10000000>;
60
61 partitions {
62 compatible = "fixed-partitions";
63 #address-cells = <1>;
64 #size-cells = <1>;
65
66 partition@0 {
67 label = "u-boot";
68 reg = <0x0 0x30000>;
69 read-only;
70 };
71
72 partition@30000 {
73 label = "u-boot-env";
74 reg = <0x30000 0x10000>;
75 read-only;
76 };
77
78 factory: partition@40000 {
79 compatible = "nvmem-cells";
80 label = "factory";
81 reg = <0x40000 0x10000>;
82 #address-cells = <1>;
83 #size-cells = <1>;
84 read-only;
85
86 eeprom_factory_0: eeprom@0 {
87 reg = <0x0 0x200>;
88 };
89
90 macaddr_factory_4: macaddr@4 {
91 reg = <0x4 0x6>;
92 };
93 };
94
95 partition@50000 {
96 compatible = "denx,uimage";
97 label = "firmware";
98 reg = <0x50000 0x760000>;
99 };
100 };
101 };
102 };
103
104 &ehci {
105 status = "okay";
106 };
107
108 &ohci {
109 status = "okay";
110 };
111
112 &ethernet {
113 nvmem-cells = <&macaddr_factory_4>;
114 nvmem-cell-names = "mac-address";
115
116 mediatek,portmap = "wllll";
117 };
118
119 &wmac {
120 nvmem-cells = <&eeprom_factory_0>;
121 nvmem-cell-names = "eeprom";
122 };
123
124 &state_default {
125 default {
126 groups = "i2c", "spi refclk", "wled";
127 function = "gpio";
128 };
129 };