xref: /linux/scripts/dtc/include-prefixes/arm64/rockchip/rk3568-qnap-ts233.dts (revision 0cac5ce06e524755b3dac1e0a060b05992076d93)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4 * Copyright (c) 2024 Heiko Stuebner <heiko@sntech.de>
5 */
6
7/dts-v1/;
8
9#include "rk3568-qnap-tsx33.dtsi"
10
11/ {
12	model = "Qnap TS-233-2G NAS System 2-Bay";
13	compatible = "qnap,ts233", "rockchip,rk3568";
14
15	aliases {
16		ethernet0 = &gmac0;
17	};
18};
19
20/* connected to sata2 */
21&combphy2 {
22	status = "okay";
23};
24
25&gmac0 {
26	assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
27	assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
28	assigned-clock-rates = <0>, <125000000>;
29	clock_in_out = "output";
30	phy-handle = <&rgmii_phy0>;
31	phy-mode = "rgmii-id";
32	pinctrl-names = "default";
33	pinctrl-0 = <&gmac0_miim
34		     &gmac0_tx_bus2
35		     &gmac0_rx_bus2
36		     &gmac0_rgmii_clk
37		     &gmac0_rgmii_bus>;
38	status = "okay";
39};
40
41&i2c1 {
42	/* eeprom for vital-product-data on the backplane */
43	eeprom@56 {
44		compatible = "giantec,gt24c04a", "atmel,24c04";
45		reg = <0x56>;
46		label = "VPD_BP";
47		num-addresses = <2>;
48		pagesize = <16>;
49		read-only;
50	};
51};
52
53&leds {
54	led-1 {
55		color = <LED_COLOR_ID_GREEN>;
56		function = LED_FUNCTION_DISK;
57		gpios = <&gpio1 RK_PD6 GPIO_ACTIVE_LOW>;
58		label = "hdd2:green:disk";
59		linux,default-trigger = "disk-activity";
60		pinctrl-names = "default";
61		pinctrl-0 = <&hdd2_led_pin>;
62	};
63};
64
65&mcu {
66	compatible = "qnap,ts233-mcu";
67};
68
69&mdio0 {
70	rgmii_phy0: ethernet-phy@3 {
71		/* Motorcomm YT8521 phy */
72		compatible = "ethernet-phy-ieee802.3-c22";
73		reg = <0x3>;
74		pinctrl-0 = <&eth_phy0_reset_pin>;
75		pinctrl-names = "default";
76		reset-assert-us = <10000>;
77		reset-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>;
78	};
79};
80
81&pinctrl {
82	gmac0 {
83		eth_phy0_reset_pin: eth-phy0-reset-pin {
84			rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
85		};
86	};
87
88	leds {
89		hdd2_led_pin: hdd2-led-pin {
90			rockchip,pins = <1 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
91		};
92	};
93};
94
95&sata2 {
96	status = "okay";
97};
98
99&usb2phy1 {
100	status = "okay";
101};
102
103/* connected to usb_host1_ehci/ohci */
104&usb2phy1_host {
105	phy-supply = <&vcc5v0_host>;
106	status = "okay";
107};
108
109/* connected to usb_host0_ehci/ohci */
110&usb2phy1_otg {
111	phy-supply = <&vcc5v0_host>;
112	status = "okay";
113};
114
115/* right port backside */
116&usb_host0_ehci {
117	status = "okay";
118};
119
120&usb_host0_ohci {
121	status = "okay";
122};
123
124/* left port backside */
125&usb_host1_ehci {
126	status = "okay";
127};
128
129&usb_host1_ohci {
130	status = "okay";
131};
132