ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3352_zte_mf283plus.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "rt3352.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "zte,mf283plus", "ralink,rt3352-soc";
10 model = "ZTE MF283+";
11
12 aliases {
13 led-boot = &led_wwan_green;
14 led-failsafe = &led_wwan_red;
15 led-upgrade = &led_wwan_red;
16 label-mac-device = &ethernet;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_wwan_blue: wwan_blue {
23 label = "blue:wwan";
24 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
25 };
26
27 led_wwan_green: wwan_green {
28 label = "green:wwan";
29 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
30 };
31
32 led_wwan_red: wwan_red {
33 label = "red:wwan";
34 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
35 };
36
37 signal {
38 label = "blue:signal";
39 gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys-polled";
45 poll-interval = <20>;
46
47 reset {
48 label = "reset";
49 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52
53 wps {
54 label = "wps";
55 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_WPS_BUTTON>;
57 };
58 };
59 };
60
61 &spi0 {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <50000000>;
68 m25p,fast-read;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "u-boot";
77 reg = <0x0 0x60000>;
78 read-only;
79 };
80
81 partition@60000 {
82 label = "u-boot-env";
83 reg = <0x60000 0x10000>;
84 read-only;
85 };
86
87 factory: partition@70000 {
88 compatible = "nvmem-cells";
89 label = "factory";
90 reg = <0x70000 0x10000>;
91 #address-cells = <1>;
92 #size-cells = <1>;
93 read-only;
94
95 eeprom_factory_0: eeprom@0 {
96 reg = <0x0 0x200>;
97 };
98
99 macaddr_factory_28: macaddr@28 {
100 reg = <0x28 0x6>;
101 };
102 };
103
104 partition@80000 {
105 compatible = "denx,uimage";
106 label = "firmware";
107 reg = <0x80000 0xf80000>;
108 };
109 };
110 };
111 };
112
113 &state_default {
114 gpio {
115 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
116 function = "gpio";
117 };
118 };
119
120 &gpio1 {
121 status = "okay";
122 };
123
124 &ethernet {
125 nvmem-cells = <&macaddr_factory_28>;
126 nvmem-cell-names = "mac-address";
127 };
128
129 &esw {
130 mediatek,portmap = <0x2f>;
131 };
132
133 &wmac {
134 nvmem-cells = <&eeprom_factory_0>;
135 nvmem-cell-names = "eeprom";
136 };
137
138 &ehci {
139 status = "okay";
140 };
141
142 &ohci {
143 status = "okay";
144 };