2121a217268a9c480971954dbeaffc0a445ccb82
[openwrt/openwrt.git] / target / linux / ramips / dts / DIR-810L.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dir-810l", "ralink,mt7620a-soc";
10 model = "D-Link DIR-810L";
11
12 aliases {
13 led-status = &led_power_green;
14 };
15
16 gpio-keys-polled {
17 compatible = "gpio-keys-polled";
18 poll-interval = <20>;
19
20 reset {
21 label = "reset";
22 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
23 linux,code = <BTN_0>;
24 };
25
26 wps {
27 label = "wps";
28 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
29 linux,code = <BTN_0>;
30 };
31 };
32
33 gpio-leds {
34 compatible = "gpio-leds";
35
36 led_power_green: power {
37 label = "dir-810l:green:power";
38 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
39 };
40
41 wan {
42 label = "dir-810l:orange:wan";
43 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
44 };
45
46 power2 {
47 label = "dir-810l:orange:power";
48 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
49 };
50 };
51 };
52
53 &spi0 {
54 status = "okay";
55
56 m25p80@0 {
57 compatible = "jedec,spi-nor";
58 reg = <0>;
59 spi-max-frequency = <10000000>;
60
61 partitions {
62 compatible = "fixed-partitions";
63 #address-cells = <1>;
64 #size-cells = <1>;
65
66 partition@0 {
67 label = "u-boot";
68 reg = <0x0 0x30000>;
69 read-only;
70 };
71
72 partition@30000 {
73 label = "u-boot-env";
74 reg = <0x30000 0x10000>;
75 read-only;
76 };
77
78 factory: partition@40000 {
79 label = "factory";
80 reg = <0x40000 0x10000>;
81 read-only;
82 };
83
84 factory5g: partition@50000 {
85 label = "factory5g";
86 reg = <0x50000 0x10000>;
87 read-only;
88 };
89
90 partition@60000 {
91 label = "Wolf_Config";
92 reg = <0x60000 0x10000>;
93 read-only;
94 };
95
96 partition@70000 {
97 label = "MyDlink";
98 reg = <0x70000 0x80000>;
99 read-only;
100 };
101
102 partition@e0000 {
103 label = "Jffs2";
104 reg = <0xe0000 0x80000>;
105 read-only;
106 };
107
108 partition@170000 {
109 label = "firmware";
110 reg = <0x170000 0x690000>;
111 };
112 };
113 };
114 };
115
116 &pinctrl {
117 state_default: pinctrl0 {
118 gpio {
119 ralink,group = "mdio", "rgmii1", "i2c", "wled", "uartf";
120 ralink,function = "gpio";
121 };
122 };
123 };
124
125 &ethernet {
126 mtd-mac-address = <&factory 0x28>;
127 mediatek,portmap = "llllw";
128 };
129
130 &gsw {
131 mediatek,port4 = "ephy";
132 pinctrl-names = "default";
133 pinctrl-0 = <&ephy_pins>;
134 };
135
136 &pcie {
137 status = "okay";
138 };
139
140 &wmac {
141 ralink,mtd-eeprom = <&factory 0>;
142 };