ipq806x: add support for ASRock G10
[openwrt/openwrt.git] / target / linux / ipq806x / files-5.4 / arch / arm / boot / dts / qcom-ipq8064-g10.dts
1 // SPDX-License-Identifier: GPL-2.0
2 #include "qcom-ipq8064-v2.0.dtsi"
3
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/soc/qcom,tcsr.h>
6
7 / {
8 compatible = "asrock,g10", "qcom,ipq8064";
9 model = "ASRock G10";
10
11 aliases {
12 ethernet0 = &gmac1;
13 ethernet1 = &gmac0;
14
15 led-boot = &led_status_blue;
16 led-failsafe = &led_status_amber;
17 led-running = &led_status_blue;
18 led-upgrade = &led_status_amber;
19 };
20
21 chosen {
22 bootargs-override = "console=ttyMSM0,115200n8";
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 pinctrl-0 = <&led_pins>;
29 pinctrl-names = "default";
30
31 /*
32 * this is a bit misleading. Because there are about seven
33 * multicolor LEDs connected all wired together in parallel.
34 */
35
36 status_yellow {
37 label = "yellow:status";
38 gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
39 };
40
41 led_status_amber: status_amber {
42 label = "amber:status";
43 gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
44 };
45
46 led_status_blue: status_blue {
47 label = "blue:status";
48 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
49 };
50
51 /*
52 * LED is declared in vendors boardfile but it's not
53 * working and the manual doesn't mention anything
54 * about the LED being white.
55
56 status_white {
57 label = "white:status";
58 gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
59 };
60 */
61 };
62
63 i2c-gpio {
64 #address-cells = <1>;
65 #size-cells = <0>;
66
67 compatible = "i2c-gpio";
68 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>, /* sda */
69 <&qcom_pinmux 54 GPIO_ACTIVE_HIGH>; /* scl */
70 i2c-gpio,delay-us = <5>;
71 i2c-gpio,scl-output-only;
72
73 mcu@50 {
74 reg = <0x50>;
75 compatible = "sonix,sn8f25e21";
76 };
77 };
78
79 keys {
80 compatible = "gpio-keys";
81
82 pinctrl-0 = <&button_pins>;
83 pinctrl-names = "default";
84
85 ir-remote {
86 label = "ir-remote";
87 gpios = <&qcom_pinmux 15 GPIO_ACTIVE_LOW>;
88 linux,code = <BTN_0>;
89 };
90
91 reset {
92 label = "reset";
93 gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
94 linux,code = <KEY_RESTART>;
95 };
96
97 wps5g {
98 label = "wps5g";
99 gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
100 linux,code = <KEY_WPS_BUTTON>;
101 };
102
103 wps2g {
104 label = "wps2g";
105 gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
106 linux,code = <KEY_WPS_BUTTON>;
107 };
108 };
109 };
110
111 &adm_dma {
112 status = "okay";
113 };
114
115 &gmac1 {
116 status = "okay";
117
118 pinctrl-0 = <&rgmii2_pins>;
119 pinctrl-names = "default";
120
121 phy-mode = "rgmii";
122 qcom,id = <1>;
123
124 fixed-link {
125 speed = <1000>;
126 full-duplex;
127 };
128 };
129
130 &gmac2 {
131 status = "okay";
132
133 phy-mode = "sgmii";
134 qcom,id = <2>;
135
136 fixed-link {
137 speed = <1000>;
138 full-duplex;
139 };
140 };
141
142 &gsbi4_serial {
143 pinctrl-0 = <&uart0_pins>;
144 pinctrl-names = "default";
145 };
146
147 &mdio0 {
148 status = "okay";
149
150 pinctrl-0 = <&mdio0_pins>;
151 pinctrl-names = "default";
152
153 ethernet-phy@0 {
154 reg = <0>;
155 qca,ar8327-initvals = <
156 0x00004 0x7600000 /* PAD0_MODE */
157 0x00008 0x1000000 /* PAD5_MODE */
158 0x0000c 0x80 /* PAD6_MODE */
159 0x000e4 0x6a545 /* MAC_POWER_SEL */
160 0x000e0 0xc74164de /* SGMII_CTRL */
161 0x0007c 0x4e /* PORT0_STATUS */
162 0x00094 0x4e /* PORT6_STATUS */
163 >;
164 };
165 };
166
167 &nand_controller {
168 status = "okay";
169
170 pinctrl-0 = <&nand_pins>;
171 pinctrl-names = "default";
172
173 nand@0 {
174 reg = <0>;
175 compatible = "qcom,nandcs";
176
177 nand-ecc-strength = <4>;
178 nand-bus-width = <8>;
179 nand-ecc-step-size = <512>;
180
181 partitions {
182 compatible = "qcom,smem";
183 };
184 };
185 };
186
187 &pcie0 {
188 status = "okay";
189 };
190
191 &pcie1 {
192 status = "okay";
193 };
194
195 &qcom_pinmux {
196 led_pins: led_pins {
197 mux {
198 pins = "gpio7", "gpio8", "gpio9", "gpio26";
199 function = "gpio";
200 drive-strength = <2>;
201 bias-pull-up;
202 };
203 };
204
205 button_pins: button_pins {
206 mux {
207 pins = "gpio15", "gpio16", "gpio64", "gpio65";
208 function = "gpio";
209 drive-strength = <2>;
210 bias-pull-up;
211 };
212 };
213
214 uart0_pins: uart0_pins {
215 mux {
216 pins = "gpio10", "gpio11";
217 function = "gsbi4";
218 drive-strength = <10>;
219 bias-disable;
220 };
221 };
222 };
223
224 &rpm {
225 pinctrl-0 = <&i2c4_pins>;
226 pinctrl-names = "default";
227 };
228
229 &usb3_0 {
230 status = "okay";
231 };
232
233 &usb3_1 {
234 status = "okay";
235 };
236
237 &tcsr {
238 qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>;
239 };
240
241 /delete-node/ &pcie2_pins;
242 /delete-node/ &pcie2;