ramips: convert MT7628 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_wrtnode_wrtnode2.dtsi
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "wrtnode,wrtnode2", "mediatek,mt7628an-soc";
8
9 chosen {
10 bootargs = "console=ttyS0,115200";
11 };
12
13 keys {
14 compatible = "gpio-keys";
15
16 reset {
17 label = "reset";
18 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
19 linux,code = <KEY_RESTART>;
20 };
21 };
22 };
23
24 &spi0 {
25 status = "okay";
26
27 flash@0 {
28 compatible = "jedec,spi-nor";
29 reg = <0>;
30 spi-max-frequency = <10000000>;
31 broken-flash-reset;
32
33 partitions {
34 compatible = "fixed-partitions";
35 #address-cells = <1>;
36 #size-cells = <1>;
37
38 partition@0 {
39 label = "u-boot";
40 reg = <0x0 0x30000>;
41 read-only;
42 };
43
44 partition@30000 {
45 label = "u-boot-env";
46 reg = <0x30000 0x10000>;
47 read-only;
48 };
49
50 factory: partition@40000 {
51 compatible = "nvmem-cells";
52 label = "factory";
53 reg = <0x40000 0x10000>;
54 #address-cells = <1>;
55 #size-cells = <1>;
56 read-only;
57
58 eeprom_factory_0: eeprom@0 {
59 reg = <0x0 0x400>;
60 };
61
62 macaddr_factory_4: macaddr@4 {
63 reg = <0x4 0x6>;
64 };
65 };
66
67 partition@50000 {
68 compatible = "denx,uimage";
69 label = "firmware";
70 reg = <0x50000 0x1fb0000>;
71 };
72 };
73 };
74 };
75
76 &uart1 {
77 status = "okay";
78 };
79
80 &i2c {
81 status = "okay";
82 };
83
84 &ethernet {
85 nvmem-cells = <&macaddr_factory_4>;
86 nvmem-cell-names = "mac-address";
87 };
88
89 &esw {
90 mediatek,portmap = <0x3e>;
91 };
92
93 &sdhci {
94 status = "okay";
95 };
96
97 &pcie {
98 status = "okay";
99 };
100
101 &wmac {
102 status = "okay";
103
104 nvmem-cells = <&eeprom_factory_0>;
105 nvmem-cell-names = "eeprom";
106 };