ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / rt5350_zyxel_keenetic-start.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "zyxel,keenetic-start", "ralink,rt5350-soc";
10 model = "ZyXEL Keenetic Start";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &ethernet;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_power: power {
24 label = "green:power";
25 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
26 };
27
28 internet {
29 label = "green:internet";
30 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys-polled";
36 poll-interval = <20>;
37
38 reset {
39 label = "reset";
40 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43
44 wps {
45 label = "wps";
46 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_WPS_BUTTON>;
48 };
49 };
50 };
51
52 &spi0 {
53 status = "okay";
54
55 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_28: macaddr@28 {
90 reg = <0x28 0x6>;
91 };
92 };
93
94 partition@50000 {
95 compatible = "denx,uimage";
96 label = "firmware";
97 reg = <0x50000 0x3b0000>;
98 };
99 };
100 };
101 };
102
103 &state_default {
104 gpio {
105 groups = "i2c", "jtag", "uartf";
106 function = "gpio";
107 };
108 };
109
110 &ethernet {
111 nvmem-cells = <&macaddr_factory_28>;
112 nvmem-cell-names = "mac-address";
113 };
114
115 &esw {
116 mediatek,portmap = <0x2f>;
117 mediatek,led_polarity = <0x17>;
118 };
119
120 &wmac {
121 status = "okay";
122 ralink,led-polarity = <1>;
123 nvmem-cells = <&eeprom_factory_0>;
124 nvmem-cell-names = "eeprom";
125 };