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