ramips: Use dts alias based status led
[openwrt/staging/chunkeey.git] / target / linux / ramips / dts / MZK-750DHP.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,mzk-750dhp", "ralink,mt7620a-soc";
10 model = "Planex MZK-750DHP";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 wps {
20 label = "mzk-750dhp:green:wps";
21 gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
22 };
23
24 led_power: power {
25 label = "mzk-750dhp:green:power";
26 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
27 };
28
29 wlan5g {
30 label = "mzk-750dhp:green:wlan5g";
31 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 gpio-keys-polled {
36 compatible = "gpio-keys-polled";
37 #address-cells = <1>;
38 #size-cells = <0>;
39 poll-interval = <20>;
40
41 s1 {
42 label = "reset";
43 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46
47 s2 {
48 label = "wps";
49 gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52 };
53 };
54
55 &gpio1 {
56 status = "okay";
57 };
58
59 &gpio2 {
60 status = "okay";
61 };
62
63 &spi0 {
64 status = "okay";
65
66 m25p80@0 {
67 #address-cells = <1>;
68 #size-cells = <1>;
69 compatible = "jedec,spi-nor";
70 reg = <0>;
71 spi-max-frequency = <10000000>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x0 0x30000>;
76 read-only;
77 };
78
79 partition@30000 {
80 label = "u-boot-env";
81 reg = <0x30000 0x10000>;
82 read-only;
83 };
84
85 factory: partition@40000 {
86 label = "factory";
87 reg = <0x40000 0x10000>;
88 read-only;
89 };
90
91 partition@50000 {
92 label = "firmware";
93 reg = <0x50000 0x7b0000>;
94 };
95 };
96 };
97
98 &pinctrl {
99 state_default: pinctrl0 {
100 gpio {
101 ralink,group = "i2c", "spi refclk", "rgmii1", "nd_sd";
102 ralink,function = "gpio";
103 };
104 };
105 };
106
107 &ethernet {
108 pinctrl-names = "default";
109 pinctrl-0 = <&ephy_pins>;
110 mtd-mac-address = <&factory 0x4>;
111 mediatek,portmap = "llllw";
112 };
113
114 &gsw {
115 mediatek,port4 = "ephy";
116 };
117
118 &wmac {
119 ralink,mtd-eeprom = <&factory 0>;
120 };
121
122 &pcie {
123 status = "okay";
124
125 pcie-bridge {
126 mt76@0,0 {
127 reg = <0x0000 0 0 0 0>;
128 device_type = "pci";
129 mediatek,mtd-eeprom = <&factory 0x8000>;
130 };
131 };
132 };