ramips: mt7628: use mac-base
[openwrt/openwrt.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 nvmem-layout {
87 compatible = "fixed-layout";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 eeprom_factory_0: eeprom@0 {
92 reg = <0x0 0x200>;
93 };
94
95 macaddr_factory_4: macaddr@4 {
96 reg = <0x4 0x6>;
97 };
98 };
99 };
100
101 partition@60000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x60000 0x3a0000>;
105 };
106 };
107 };
108 };
109
110 &state_default {
111 gpio {
112 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
113 function = "gpio";
114 };
115 };
116
117 &ethernet {
118 nvmem-cells = <&macaddr_factory_4>;
119 nvmem-cell-names = "mac-address";
120 };
121
122 &esw {
123 mediatek,portmap = <0x2f>;
124 };
125
126 &wmac {
127 nvmem-cells = <&eeprom_factory_0>;
128 nvmem-cell-names = "eeprom";
129 };
130
131 &otg {
132 status = "okay";
133 };