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