ramips: mt7620: fix 5GHz WiFi LED on DWR-118-A1
[oweals/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-boot = &led_wps;
13                 led-failsafe = &led_wps;
14                 led-running = &led_wps;
15                 led-upgrade = &led_wps;
16         };
17
18         memory@0 {
19                 device_type = "memory";
20                 reg = <0x0 0x8000000>;
21         };
22
23         chosen {
24                 bootargs = "console=ttyS0,57600";
25         };
26
27         leds {
28                 compatible = "gpio-leds";
29
30                 led_wps: wps {
31                         label = "sk-wb8:green:wps";
32                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
33                 };
34
35                 usb {
36                         label = "sk-wb8:green:usb";
37                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
38                         trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
39                         linux,default-trigger = "usbport";
40                 };
41         };
42
43         keys {
44                 compatible = "gpio-keys-polled";
45                 poll-interval = <20>;
46                 wps {
47                         label = "wps";
48                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
49                         linux,code = <KEY_WPS_BUTTON>;
50                 };
51                 reset {
52                         label = "reset";
53                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
54                         linux,code = <KEY_RESTART>;
55                 };
56         };
57 };
58
59 &spi0 {
60         status = "okay";
61
62         m25p80@0 {
63                 compatible = "jedec,spi-nor";
64                 reg = <0>;
65                 spi-max-frequency = <10000000>;
66
67                 partitions {
68                         compatible = "fixed-partitions";
69                         #address-cells = <1>;
70                         #size-cells = <1>;
71
72                         partition@0 {
73                                 label = "u-boot";
74                                 reg = <0x0 0x30000>;
75                                 read-only;
76                         };
77
78                         partition@30000 {
79                                 label = "u-boot-env";
80                                 reg = <0x30000 0x10000>;
81                         };
82
83                         factory: partition@40000 {
84                                 label = "factory";
85                                 reg = <0x40000 0x10000>;
86                                 read-only;
87                         };
88
89                         partition@50000 {
90                                 compatible = "denx,uimage";
91                                 label = "firmware";
92                                 reg = <0x50000 0xfb0000>;
93                         };
94                 };
95         };
96 };
97
98 &pcie {
99         status = "okay";
100 };
101
102 &pcie0 {
103         mt76@0,0 {
104                 reg = <0x0000 0 0 0 0>;
105                 mediatek,mtd-eeprom = <&factory 0x8000>;
106                 ieee80211-freq-limit = <5000000 6000000>;
107         };
108 };
109
110 &pcie1 {
111         mt76@0,0 {
112                 reg = <0x0000 0 0 0 0>;
113                 mediatek,mtd-eeprom = <&factory 0x0000>;
114         };
115 };
116
117 &ethernet {
118         mtd-mac-address = <&factory 0xe000>;
119 };
120
121 &pinctrl {
122         state_default: pinctrl0 {
123                 gpio {
124                         ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
125                         ralink,function = "gpio";
126                 };
127         };
128 };