ramips: add support for Netcore NW5212
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_netcore_nw5212.dts
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 = "netcore,nw5212", "ralink,mt7620a-soc";
10 model = "Netcore NW5212";
11
12 aliases {
13 label-mac-device = &ethernet;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 lan4 {
20 label = "green:lan4";
21 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
22 };
23
24 lan3 {
25 label = "green:lan3";
26 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
27 };
28
29 lan2 {
30 label = "green:lan2";
31 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
32 };
33
34 lan1 {
35 label = "green:lan1";
36 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
37 };
38
39 wan {
40 label = "green:wan";
41 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
42 };
43
44 wlan2g {
45 label = "green:wlan2g";
46 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
47 linux,default-trigger = "phy0tpt";
48 };
49 };
50
51 keys {
52 compatible = "gpio-keys";
53
54 reset {
55 label = "reset";
56 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
58 };
59 };
60 };
61
62 &gpio2 {
63 status = "okay";
64 };
65
66 &gpio3 {
67 status = "okay";
68 };
69
70 &spi0 {
71 status = "okay";
72
73 flash@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <70000000>;
77 m25p,fast-read;
78
79 partitions {
80 compatible = "fixed-partitions";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 partition@0 {
85 label = "u-boot";
86 reg = <0x0 0x30000>;
87 read-only;
88 };
89
90 partition@30000 {
91 label = "u-boot-env";
92 reg = <0x30000 0x10000>;
93 };
94
95 factory: partition@40000 {
96 label = "factory";
97 reg = <0x40000 0x10000>;
98 read-only;
99 };
100
101 partition@50000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x50000 0xfb0000>;
105 };
106 };
107 };
108 };
109
110 &state_default {
111 gpio {
112 groups = "uartf", "wled", "ephy";
113 function = "gpio";
114 };
115 };
116
117 &ethernet {
118 mtd-mac-address = <&factory 0x28>;
119 mediatek,portmap = "llllw";
120 };
121
122 &ehci {
123 status = "okay";
124 };
125
126 &ohci {
127 status = "okay";
128 };
129
130 &wmac {
131 ralink,mtd-eeprom = <&factory 0x0>;
132 };