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