ramips: convert most mtd-mac-address cases in DTSI to nvmem
[openwrt/openwrt.git] / target / linux / ramips / dts / rt5350_nexx_wt1520.dtsi
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "nexx,wt1520", "ralink,rt5350-soc";
8
9 keys {
10 compatible = "gpio-keys-polled";
11 poll-interval = <20>;
12
13 reset {
14 label = "reset";
15 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
16 linux,code = <KEY_RESTART>;
17 };
18 };
19 };
20
21 &spi0 {
22 status = "okay";
23
24 flash@0 {
25 compatible = "jedec,spi-nor";
26 reg = <0>;
27 spi-max-frequency = <10000000>;
28
29 partitions {
30 compatible = "fixed-partitions";
31 #address-cells = <1>;
32 #size-cells = <1>;
33
34 partition@0 {
35 label = "u-boot";
36 reg = <0x0 0x30000>;
37 read-only;
38 };
39
40 partition@30000 {
41 label = "u-boot-env";
42 reg = <0x30000 0x10000>;
43 read-only;
44 };
45
46 factory: partition@40000 {
47 label = "factory";
48 reg = <0x40000 0x10000>;
49 read-only;
50 };
51
52 firmware: partition@50000 {
53 compatible = "denx,uimage";
54 label = "firmware";
55 /* reg property is set based on flash size in DTS files */
56 };
57 };
58 };
59 };
60
61 &state_default {
62 gpio {
63 groups = "jtag", "uartf";
64 function = "gpio";
65 };
66 };
67
68 &ethernet {
69 nvmem-cells = <&macaddr_factory_4>;
70 nvmem-cell-names = "mac-address";
71 };
72
73 &wmac {
74 ralink,mtd-eeprom = <&factory 0x0>;
75 };
76
77 &factory {
78 compatible = "nvmem-cells";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 macaddr_factory_4: macaddr@4 {
83 reg = <0x4 0x6>;
84 };
85 };