ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / DB-WRT01.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 = "planex,db-wrt01", "ralink,mt7620a-soc";
10 model = "Planex DB-WRT01";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_power: power {
20 label = "db-wrt01:orange:power";
21 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
22 };
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 s1 {
32 label = "wps";
33 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_WPS_BUTTON>;
35 };
36 };
37 };
38
39 &gpio1 {
40 status = "okay";
41 };
42
43 &spi0 {
44 status = "okay";
45
46 m25p80@0 {
47 #address-cells = <1>;
48 #size-cells = <1>;
49 compatible = "jedec,spi-nor";
50 reg = <0>;
51 spi-max-frequency = <10000000>;
52
53 partition@0 {
54 label = "u-boot";
55 reg = <0x0 0x30000>;
56 read-only;
57 };
58
59 partition@30000 {
60 label = "u-boot-env";
61 reg = <0x30000 0x10000>;
62 read-only;
63 };
64
65 factory: partition@40000 {
66 label = "factory";
67 reg = <0x40000 0x10000>;
68 read-only;
69 };
70
71 partition@50000 {
72 label = "firmware";
73 reg = <0x50000 0x7b0000>;
74 };
75 };
76 };
77
78 &pinctrl {
79 state_default: pinctrl0 {
80 gpio {
81 ralink,group = "i2c", "spi refclk", "rgmii1";
82 ralink,function = "gpio";
83 };
84 };
85 };
86
87 &ethernet {
88 pinctrl-names = "default";
89 pinctrl-0 = <&ephy_pins>;
90 mtd-mac-address = <&factory 0x4>;
91 mediatek,portmap = "llllw";
92 };
93
94 &gsw {
95 mediatek,port4 = "ephy";
96 };
97
98 &wmac {
99 ralink,mtd-eeprom = <&factory 0>;
100 };
101
102 &pcie {
103 status = "okay";
104 };