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