lantiq: flag FritzBox 7360 family buttons active-low
[openwrt/staging/mkresin.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / vr9_avm_fritz736x.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "vr9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
7
8 / {
9 compatible = "avm,fritz736x", "lantiq,xway", "lantiq,vr9";
10
11 chosen {
12 bootargs = "console=ttyLTQ0,115200";
13 };
14
15 aliases {
16 led-boot = &led_power_green;
17 led-failsafe = &led_power_red;
18 led-running = &led_power_green;
19 led-upgrade = &led_power_red;
20
21 led-dsl = &led_info_green;
22 led-wifi = &led_wifi;
23 };
24
25 memory@0 {
26 device_type = "memory";
27 reg = <0x0 0x8000000>;
28 };
29
30 keys {
31 compatible = "gpio-keys-polled";
32 poll-interval = <100>;
33
34 dect {
35 label = "dect";
36 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_PHONE>;
38 };
39
40 wifi {
41 label = "wifi";
42 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RFKILL>;
44 };
45 };
46
47 leds: leds {
48 compatible = "gpio-leds";
49
50 led_power_green: power_green {
51 label = "green:power";
52 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
53 default-state = "keep";
54 };
55
56 led_power_red: power_red {
57 label = "red:power";
58 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
59 };
60
61 led_info_green: info_green {
62 label = "green:info";
63 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
64 };
65
66 led_wifi: wifi {
67 label = "green:wlan";
68 gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
69 };
70
71 info_red {
72 label = "red:info";
73 gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
74 };
75
76 dect {
77 label = "green:dect";
78 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
79 };
80 };
81 };
82
83 &gphy0 {
84 lantiq,gphy-mode = <GPHY_MODE_GE>;
85 };
86
87 &gphy1 {
88 lantiq,gphy-mode = <GPHY_MODE_GE>;
89 };
90
91 &gpio {
92 pinctrl-names = "default";
93 pinctrl-0 = <&state_default>;
94
95 state_default: pinmux {
96 phy-rst {
97 lantiq,pins = "io37", "io44";
98 lantiq,pull = <0>;
99 lantiq,open-drain;
100 lantiq,output = <1>;
101 };
102 };
103
104 };
105
106 &gswip {
107 pinctrl-0 = <&mdio_pins>;
108 pinctrl-names = "default";
109 };
110
111 &gswip_mdio {
112 phy0: ethernet-phy@0 {
113 reg = <0x00>;
114 reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
115 };
116
117 phy1: ethernet-phy@1 {
118 reg = <0x01>;
119 reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
120 };
121
122 phy11: ethernet-phy@11 {
123 reg = <0x11>;
124 };
125
126 phy13: ethernet-phy@13 {
127 reg = <0x13>;
128 };
129 };
130
131 &gswip_ports {
132 port@0 {
133 reg = <0>;
134 label = "lan3";
135 phy-mode = "rmii";
136 phy-handle = <&phy0>;
137 };
138
139 port@1 {
140 reg = <1>;
141 label = "lan4";
142 phy-mode = "rmii";
143 phy-handle = <&phy1>;
144 };
145
146 port@2 {
147 reg = <2>;
148 label = "lan2";
149 phy-mode = "internal";
150 phy-handle = <&phy11>;
151 };
152
153 port@4 {
154 reg = <4>;
155 label = "lan1";
156 phy-mode = "internal";
157 phy-handle = <&phy13>;
158 };
159 };
160
161 &pcie0 {
162 status = "okay";
163
164 pcie@0 {
165 reg = <0 0 0 0 0>;
166 #interrupt-cells = <1>;
167 #size-cells = <1>;
168 #address-cells = <2>;
169 device_type = "pci";
170
171 wifi@168c,002e {
172 compatible = "pci168c,002e";
173 reg = <0 0 0 0 0>;
174 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */
175 };
176 };
177 };
178
179 &usb_phy0 {
180 status = "okay";
181 };
182
183 &usb_phy1 {
184 status = "okay";
185 };
186
187 &usb0 {
188 status = "okay";
189 };
190
191 &usb1 {
192 status = "okay";
193 };