bd1e47b103155174be9ba75e3311e53060ef0255
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_planex_vr500.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "planex,vr500", "mediatek,mt7621-soc";
9 model = "Planex VR500";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_power: power {
22 function = LED_FUNCTION_POWER;
23 color = <LED_COLOR_ID_GREEN>;
24 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
25 };
26 };
27
28 keys {
29 compatible = "gpio-keys";
30
31 reset {
32 label = "reset";
33 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };
36 };
37 };
38
39 &spi0 {
40 status = "okay";
41
42 flash@0 {
43 compatible = "jedec,spi-nor";
44 reg = <0>;
45 spi-max-frequency = <10000000>;
46
47 partitions {
48 compatible = "fixed-partitions";
49 #address-cells = <1>;
50 #size-cells = <1>;
51
52 partition@0 {
53 label = "u-boot";
54 reg = <0x0 0x30000>;
55 read-only;
56 };
57
58 partition@30000 {
59 label = "u-boot-env";
60 reg = <0x30000 0x10000>;
61 read-only;
62 };
63
64 factory: partition@40000 {
65 label = "factory";
66 reg = <0x40000 0x10000>;
67 read-only;
68
69 nvmem-layout {
70 compatible = "fixed-layout";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 macaddr_factory_e000: macaddr@e000 {
75 reg = <0xe000 0x6>;
76 };
77
78 macaddr_factory_e006: macaddr@e006 {
79 reg = <0xe006 0x6>;
80 };
81 };
82 };
83
84 partition@50000 {
85 compatible = "denx,uimage";
86 label = "firmware";
87 reg = <0x50000 0x3fb0000>;
88 };
89 };
90 };
91 };
92
93 &gmac0 {
94 nvmem-cells = <&macaddr_factory_e000>;
95 nvmem-cell-names = "mac-address";
96 };
97
98 &gmac1 {
99 status = "okay";
100 label = "wan";
101 phy-handle = <&ethphy4>;
102
103 nvmem-cells = <&macaddr_factory_e006>;
104 nvmem-cell-names = "mac-address";
105 };
106
107 &mdio {
108 ethphy4: ethernet-phy@4 {
109 reg = <4>;
110 };
111 };
112
113 &switch0 {
114 ports {
115 port@0 {
116 status = "okay";
117 label = "lan1";
118 };
119
120 port@1 {
121 status = "okay";
122 label = "lan2";
123 };
124
125 port@2 {
126 status = "okay";
127 label = "lan3";
128 };
129
130 port@3 {
131 status = "okay";
132 label = "lan4";
133 };
134 };
135 };
136
137 &state_default {
138 gpio {
139 groups = "sdhci";
140 function = "gpio";
141 };
142 };