ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / SK-WB8.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/gpio/gpio.h>
6
7 / {
8 compatible = "samknows,whitebox-v8", "mediatek,mt7621-soc";
9 model = "SamKnows Whitebox 8";
10
11 aliases {
12 led-status = &led_wps;
13 };
14
15 memory@0 {
16 device_type = "memory";
17 reg = <0x0 0x8000000>;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,57600";
22 };
23
24 gpio-leds {
25 compatible = "gpio-leds";
26
27 led_wps: wps {
28 label = "sk-wb8:green:wps";
29 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
30 };
31
32 usb {
33 label = "sk-wb8:green:usb";
34 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 gpio-keys-polled {
39 compatible = "gpio-keys-polled";
40 #address-cells = <1>;
41 #size-cells = <0>;
42 poll-interval = <20>;
43 wps {
44 label = "wps";
45 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_WPS_BUTTON>;
47 };
48 reset {
49 label = "reset";
50 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54 };
55
56 &spi0 {
57 status = "okay";
58
59 m25p80@0 {
60 #address-cells = <1>;
61 #size-cells = <1>;
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <10000000>;
65 m25p,chunked-io = <32>;
66
67 partition@0 {
68 label = "u-boot";
69 reg = <0x0 0x30000>;
70 read-only;
71 };
72
73 partition@30000 {
74 label = "u-boot-env";
75 reg = <0x30000 0x10000>;
76 };
77
78 factory: partition@40000 {
79 label = "factory";
80 reg = <0x40000 0x10000>;
81 read-only;
82 };
83
84 partition@50000 {
85 label = "firmware";
86 reg = <0x50000 0xfb0000>;
87 };
88
89 };
90 };
91
92 &pcie {
93 status = "okay";
94
95 pcie0 {
96 mt76@0,0 {
97 reg = <0x0000 0 0 0 0>;
98 device_type = "pci";
99 mediatek,mtd-eeprom = <&factory 0x8000>;
100 ieee80211-freq-limit = <5000000 6000000>;
101 };
102 };
103
104 pcie1 {
105 mt76@1,0 {
106 reg = <0x0000 0 0 0 0>;
107 device_type = "pci";
108 mediatek,mtd-eeprom = <&factory 0x0000>;
109 };
110 };
111 };
112
113 &ethernet {
114 mtd-mac-address = <&factory 0xe000>;
115 };
116
117 &pinctrl {
118 state_default: pinctrl0 {
119 gpio {
120 ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
121 ralink,function = "gpio";
122 };
123 };
124 };