ath79: convert devices to interrupt-driven gpio-keys
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9533_comfast_cf-e110n-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "qca953x.dtsi"
8
9 / {
10         compatible = "comfast,cf-e110n-v2", "qca,qca9533";
11         model = "COMFAST CF-E110N v2";
12
13         aliases {
14                 serial0 = &uart;
15                 led-boot = &wan;
16                 led-failsafe = &wan;
17                 led-upgrade = &wan;
18         };
19
20         leds {
21                 compatible = "gpio-leds";
22
23                 pinctrl-names = "default";
24                 pinctrl-0 = <&jtag_disable_pins &led_rssilow_pin &led_rssimediumhigh_pin &led_rssihigh_pin>;
25
26                 wan: wan {
27                         label = "cf-e110n-v2:green:wan";
28                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
29                 };
30
31                 lan {
32                         label = "cf-e110n-v2:green:lan";
33                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
34                 };
35
36                 rssilow {
37                         label = "cf-e110n-v2:red:rssilow";
38                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
39                 };
40
41                 rssimediumlow {
42                         label = "cf-e110n-v2:red:rssimediumlow";
43                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
44                 };
45
46                 rssimediumhigh {
47                         label = "cf-e110n-v2:green:rssimediumhigh";
48                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
49                 };
50
51                 rssihigh {
52                         label = "cf-e110n-v2:green:rssihigh";
53                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
54                 };
55         };
56
57         ath9k-leds {
58                 compatible = "gpio-leds";
59
60                 wlan {
61                         label = "cf-e110n-v2:green:wlan";
62                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
63                         linux,default-trigger = "phy0tpt";
64                 };
65         };
66
67         keys {
68                 compatible = "gpio-keys";
69
70                 reset {
71                         label = "reset";
72                         linux,code = <KEY_RESTART>;
73                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
74                         debounce-interval = <60>;
75                 };
76         };
77 };
78
79 &pinmux {
80         led_rssilow_pin: pinmux_rssilow_pin {
81                 pinctrl-single,bits = <0x8 0x0 0xff000000>;
82         };
83
84         led_rssimediumhigh_pin: pinmux_rssimediumhigh_pin {
85                 pinctrl-single,bits = <0xc 0x0 0x00ff0000>;
86         };
87
88         led_rssihigh_pin: pinmux_rssihigh_pin {
89                 pinctrl-single,bits = <0x10 0x0 0x000000ff>;
90         };
91 };
92
93 &spi {
94         status = "okay";
95         num-cs = <1>;
96
97         flash@0 {
98                 compatible = "winbond,w25q128", "jedec,spi-nor";
99                 reg = <0>;
100                 spi-max-frequency = <25000000>;
101
102                 partitions {
103                         compatible = "fixed-partitions";
104                         #address-cells = <1>;
105                         #size-cells = <1>;
106
107                         partition@0 {
108                                 label = "u-boot";
109                                 reg = <0x000000 0x010000>;
110                                 read-only;
111                         };
112
113                         art: partition@10000 {
114                                 label = "art";
115                                 reg = <0x010000 0x010000>;
116                                 read-only;
117                         };
118
119                         partition@20000 {
120                                 compatible = "denx,uimage";
121                                 label = "firmware";
122                                 reg = <0x020000 0xfd0000>;
123                         };
124
125                         partition@ff0000 {
126                                 label = "nvram";
127                                 reg = <0xff0000 0x010000>;
128                                 read-only;
129                         };
130                 };
131         };
132 };
133
134 &uart {
135         status = "okay";
136 };
137
138 &eth0 {
139         status = "okay";
140         mtd-mac-address = <&art 0x0>;
141         phy-handle = <&swphy4>;
142 };
143
144 &eth1 {
145         status = "okay";
146         mtd-mac-address = <&art 0x1002>;
147
148         gmac-config {
149                 device = <&gmac>;
150         };
151 };
152
153 &wmac {
154         status = "okay";
155         mtd-cal-data = <&art 0x1000>;
156         mtd-mac-address = <&art 0x6>;
157 };