Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3568-qnap-ts433.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4 * Copyright (c) 2024 Uwe Kleine-König
5 */
6
7 /dts-v1/;
8
9 #include "rk3568.dtsi"
10 #include "rk3568-qnap-tsx33.dtsi"
11
12 / {
13 model = "Qnap TS-433-4G NAS System 4-Bay";
14 compatible = "qnap,ts433", "rockchip,rk3568";
15
16 aliases {
17 ethernet0 = &gmac0;
18 };
19
20 vcc3v3_pcie: regulator-vcc3v3-pcie {
21 compatible = "regulator-fixed";
22 regulator-name = "vcc3v3_pcie";
23 regulator-min-microvolt = <3300000>;
24 regulator-max-microvolt = <3300000>;
25 enable-active-high;
26 gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
27 vin-supply = <&dc_12v>;
28 };
29 };
30
31 /* Connected to usb_host0_xhci */
32 &combphy0 {
33 status = "okay";
34 };
35
36 &gmac0 {
37 assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
38 assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
39 assigned-clock-rates = <0>, <125000000>;
40 clock_in_out = "output";
41 phy-handle = <&rgmii_phy0>;
42 phy-mode = "rgmii-id";
43 pinctrl-names = "default";
44 pinctrl-0 = <&gmac0_miim
45 &gmac0_tx_bus2
46 &gmac0_rx_bus2
47 &gmac0_rgmii_clk
48 &gmac0_rgmii_bus>;
49 status = "okay";
50 };
51
52 &i2c1 {
53 /* eeprom for vital-product-data on the backplane */
54 eeprom@56 {
55 compatible = "giantec,gt24c04a", "atmel,24c04";
56 reg = <0x56>;
57 label = "VPD_BP";
58 num-addresses = <2>;
59 pagesize = <16>;
60 read-only;
61 };
62 };
63
64 &keys {
65 pinctrl-names = "default";
66 pinctrl-0 = <&copy_button_pin>, <&reset_button_pin>;
67
68 key-copy {
69 label = "copy";
70 gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
71 linux,code = <KEY_COPY>;
72 };
73 };
74
75 &leds {
76 led-1 {
77 color = <LED_COLOR_ID_GREEN>;
78 function = LED_FUNCTION_DISK;
79 gpios = <&gpio1 RK_PD6 GPIO_ACTIVE_LOW>;
80 label = "hdd2:green:disk";
81 linux,default-trigger = "disk-activity";
82 pinctrl-names = "default";
83 pinctrl-0 = <&hdd2_led_pin>;
84 };
85
86 led-2 {
87 color = <LED_COLOR_ID_GREEN>;
88 function = LED_FUNCTION_DISK;
89 gpios = <&gpio1 RK_PD7 GPIO_ACTIVE_LOW>;
90 label = "hdd3:green:disk";
91 linux,default-trigger = "disk-activity";
92 pinctrl-names = "default";
93 pinctrl-0 = <&hdd3_led_pin>;
94 };
95
96 led-3 {
97 color = <LED_COLOR_ID_GREEN>;
98 function = LED_FUNCTION_DISK;
99 gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
100 label = "hdd4:green:disk";
101 linux,default-trigger = "disk-activity";
102 pinctrl-names = "default";
103 pinctrl-0 = <&hdd4_led_pin>;
104 };
105 };
106
107 &mcu {
108 compatible = "qnap,ts433-mcu";
109 };
110
111 &mdio0 {
112 rgmii_phy0: ethernet-phy@3 {
113 /* Motorcomm YT8521 phy */
114 compatible = "ethernet-phy-ieee802.3-c22";
115 reg = <0x3>;
116 pinctrl-0 = <&eth_phy0_reset_pin>;
117 pinctrl-names = "default";
118 reset-assert-us = <10000>;
119 reset-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>;
120 };
121 };
122
123 &pcie30phy {
124 data-lanes = <1 2>;
125 status = "okay";
126 };
127
128 /* Connected to a JMicron AHCI SATA controller */
129 &pcie3x1 {
130 reset-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
131 vpcie3v3-supply = <&vcc3v3_pcie>;
132 status = "okay";
133 };
134
135 /* Connected to the 2.5G NIC for the upper network jack */
136 &pcie3x2 {
137 num-lanes = <1>;
138 reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
139 vpcie3v3-supply = <&vcc3v3_pcie>;
140 status = "okay";
141 };
142
143 &pinctrl {
144 gmac0 {
145 eth_phy0_reset_pin: eth-phy0-reset-pin {
146 rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
147 };
148 };
149
150 leds {
151 hdd2_led_pin: hdd2-led-pin {
152 rockchip,pins = <1 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
153 };
154
155 hdd3_led_pin: hdd3-led-pin {
156 rockchip,pins = <1 RK_PD7 RK_FUNC_GPIO &pcfg_pull_up>;
157 };
158
159 hdd4_led_pin: hdd4_led-pin {
160 rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
161 };
162 };
163 };
164
165 &sata1 {
166 status = "okay";
167 };
168
169 &usb2phy1 {
170 status = "okay";
171 };
172
173 /* connected to usb_host1_ehci/ohci */
174 &usb2phy1_host {
175 phy-supply = <&vcc5v0_host>;
176 status = "okay";
177 };
178
179 /* connected to usb_host0_ehci/ohci */
180 &usb2phy1_otg {
181 phy-supply = <&vcc5v0_host>;
182 status = "okay";
183 };
184
185 /* right port backside */
186 &usb_host0_ehci {
187 status = "okay";
188 };
189
190 &usb_host0_ohci {
191 status = "okay";
192 };
193
194 /* left port backside */
195 &usb_host1_ehci {
196 status = "okay";
197 };
198
199 &usb_host1_ohci {
200 status = "okay";
201 };