ramips: Use dts alias based status led
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / TL-WR840NV5.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,tl-wr840n-v5", "mediatek,mt7628an-soc";
10 model = "TP-Link TL-WR840N v5";
11
12 aliases {
13 led-status = &led_power_green;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 memory@0 {
21 device_type = "memory";
22 reg = <0x0 0x4000000>;
23 };
24
25 gpio-keys-polled {
26 compatible = "gpio-keys-polled";
27 #address-cells = <1>;
28 #size-cells = <0>;
29 poll-interval = <20>;
30
31 reset {
32 label = "reset";
33 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };
36 };
37 /* LED used is dual-color,dual lead LED */
38 gpio-leds {
39 compatible = "gpio-leds";
40
41 led_power_green: power {
42 label = "tl-wr840n-v5:green:power";
43 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
44 };
45
46 orange {
47 label = "tl-wr840n-v5:orange:power";
48 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
49 };
50 };
51 };
52
53 &spi0 {
54 status = "okay";
55
56 m25p80@0 {
57 #address-cells = <1>;
58 #size-cells = <1>;
59 compatible = "jedec,spi-nor";
60 reg = <0>;
61 spi-max-frequency = <10000000>;
62 m25p,chunked-io = <32>;
63
64 partition@0 {
65 label = "boot";
66 reg = <0x0 0x20000>;
67 read-only;
68 };
69
70 partition@20000 {
71 label = "firmware";
72 reg = <0x20000 0x3d0000>;
73 };
74
75 factory: partition@3f0000 {
76 label = "factory";
77 reg = <0x3f0000 0x10000>;
78 read-only;
79 };
80 };
81 };
82
83 &ehci {
84 status = "disabled";
85 };
86
87 &ohci {
88 status = "disabled";
89 };
90
91 &wmac {
92 status = "okay";
93 mtd-mac-address = <&factory 0xf100>;
94 mediatek,mtd-eeprom = <&factory 0x10000>;
95 };
96
97 &ethernet {
98 mtd-mac-address = <&factory 0xf100>;
99 mediatek,portmap = "wllll";
100 };
101
102 &pinctrl {
103 state_default: pinctrl0 {
104 gpio {
105 ralink,group = "p0led_an", "p2led_an", "perst";
106 ralink,function = "gpio";
107 };
108 };
109 };