1// SPDX-License-Identifier: GPL-2.0
2#include "qcom-ipq8064.dtsi"
3#include <dt-bindings/input/input.h>
4#include <dt-bindings/leds/common.h>
5
6/ {
7	model = "Qualcomm Technologies, Inc. IPQ8064-v1.0";
8
9	aliases {
10		serial0 = &gsbi4_serial;
11	};
12
13	chosen {
14		stdout-path = "serial0:115200n8";
15	};
16
17	soc {
18		gsbi@16300000 {
19			qcom,mode = <GSBI_PROT_I2C_UART>;
20			status = "okay";
21
22			serial@16340000 {
23				status = "okay";
24			};
25		};
26
27		gsbi5: gsbi@1a200000 {
28			qcom,mode = <GSBI_PROT_SPI>;
29			status = "okay";
30
31			spi4: spi@1a280000 {
32				status = "okay";
33				spi-max-frequency = <50000000>;
34
35				pinctrl-0 = <&spi_pins>;
36				pinctrl-names = "default";
37
38				cs-gpios = <&qcom_pinmux 20 0>;
39
40				flash: flash@0 {
41					compatible = "s25fl256s1";
42					#address-cells = <1>;
43					#size-cells = <1>;
44					spi-max-frequency = <50000000>;
45					reg = <0>;
46
47					partition@0 {
48						label = "rootfs";
49						reg = <0x0 0x1000000>;
50					};
51
52					partition@1 {
53						label = "scratch";
54						reg = <0x1000000 0x1000000>;
55					};
56				};
57			};
58		};
59
60		sata-phy@1b400000 {
61			status = "okay";
62		};
63
64		sata@29000000 {
65			ports-implemented = <0x1>;
66			status = "okay";
67		};
68
69		gpio-keys {
70			compatible = "gpio-keys";
71			pinctrl-0 = <&buttons_pins>;
72			pinctrl-names = "default";
73
74			button-1 {
75				label = "reset";
76				linux,code = <KEY_RESTART>;
77				gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
78				linux,input-type = <1>;
79				debounce-interval = <60>;
80			};
81			button-2 {
82				label = "wps";
83				linux,code = <KEY_WPS_BUTTON>;
84				gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
85				linux,input-type = <1>;
86				debounce-interval = <60>;
87			};
88		};
89
90		leds {
91			compatible = "gpio-leds";
92			pinctrl-0 = <&leds_pins>;
93			pinctrl-names = "default";
94
95			led-0 {
96				label = "led_usb1";
97				gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
98				linux,default-trigger = "usbdev";
99				default-state = "off";
100			};
101
102			led-1 {
103				label = "led_usb3";
104				gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
105				linux,default-trigger = "usbdev";
106				default-state = "off";
107			};
108
109			led-2 {
110				label = "status_led_fail";
111				function = LED_FUNCTION_STATUS;
112				gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
113				default-state = "off";
114			};
115
116			led-3 {
117				label = "sata_led";
118				gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
119				default-state = "off";
120			};
121
122			led-4 {
123				label = "status_led_pass";
124				function = LED_FUNCTION_STATUS;
125				gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
126				default-state = "off";
127			};
128		};
129	};
130};
131