ramips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / rt3050_netcore_nw718.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "netcore,nw718", "ralink,rt3050-soc";
8 model = "Netcore NW718";
9
10 aliases {
11 led-boot = &led_cpu;
12 led-failsafe = &led_cpu;
13 led-running = &led_cpu;
14 led-upgrade = &led_cpu;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_cpu: cpu {
21 label = "amber:cpu";
22 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
23 };
24
25 usb {
26 label = "amber:usb";
27 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
28 trigger-sources = <&otg_port1>;
29 linux,default-trigger = "usbport";
30 };
31
32 wps {
33 label = "amber:wps";
34 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys-polled";
40 poll-interval = <20>;
41
42 reset {
43 label = "reset";
44 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 };
47
48 wps {
49 label = "wps";
50 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_WPS_BUTTON>;
52 };
53 };
54 };
55
56 &spi0 {
57 status = "okay";
58
59 flash@0 {
60 compatible = "jedec,spi-nor";
61 reg = <0>;
62 spi-max-frequency = <25000000>;
63
64 partitions {
65 compatible = "fixed-partitions";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 partition@0 {
70 label = "u-boot";
71 reg = <0x0 0x30000>;
72 read-only;
73 };
74
75 partition@30000 {
76 label = "config";
77 reg = <0x30000 0x20000>;
78 read-only;
79 };
80
81 factory: partition@50000 {
82 label = "factory";
83 reg = <0x50000 0x10000>;
84 read-only;
85 };
86
87 partition@60000 {
88 compatible = "denx,uimage";
89 label = "firmware";
90 reg = <0x60000 0x3a0000>;
91 };
92 };
93 };
94 };
95
96 &state_default {
97 gpio {
98 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
99 function = "gpio";
100 };
101 };
102
103 &ethernet {
104 nvmem-cells = <&macaddr_factory_4>;
105 nvmem-cell-names = "mac-address";
106 };
107
108 &esw {
109 mediatek,portmap = <0x2f>;
110 };
111
112 &wmac {
113 ralink,mtd-eeprom = <&factory 0x0>;
114 };
115
116 &otg {
117 status = "okay";
118 };
119
120 &factory {
121 compatible = "nvmem-cells";
122 #address-cells = <1>;
123 #size-cells = <1>;
124
125 macaddr_factory_4: macaddr@4 {
126 reg = <0x4 0x6>;
127 };
128 };