| // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| /* |
| * Copyright (c) 2021 Rockchip Electronics Co., Ltd. |
| * Copyright (c) 2024 Uwe Kleine-König |
| */ |
| |
| /dts-v1/; |
| |
| #include <dt-bindings/gpio/gpio.h> |
| #include "rk3568.dtsi" |
| |
| / { |
| model = "Qnap TS-433-4G NAS System 4-Bay"; |
| compatible = "qnap,ts433", "rockchip,rk3568"; |
| |
| aliases { |
| ethernet0 = &gmac0; |
| mmc0 = &sdhci; |
| rtc0 = &rtc_rv8263; |
| }; |
| |
| chosen { |
| stdout-path = "serial2:115200n8"; |
| }; |
| |
| dc_12v: regulator-dc-12v { |
| compatible = "regulator-fixed"; |
| regulator-name = "dc_12v"; |
| regulator-always-on; |
| regulator-boot-on; |
| regulator-min-microvolt = <12000000>; |
| regulator-max-microvolt = <12000000>; |
| }; |
| |
| vcc3v3_pcie: regulator-vcc3v3-pcie { |
| compatible = "regulator-fixed"; |
| regulator-name = "vcc3v3_pcie"; |
| regulator-min-microvolt = <3300000>; |
| regulator-max-microvolt = <3300000>; |
| enable-active-high; |
| gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; |
| vin-supply = <&dc_12v>; |
| }; |
| |
| vcc5v0_host: regulator-vcc5v0-host { |
| compatible = "regulator-fixed"; |
| enable-active-high; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&vcc5v0_host_en>; |
| gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; |
| regulator-name = "vcc5v0_host"; |
| regulator-always-on; |
| regulator-boot-on; |
| regulator-min-microvolt = <5000000>; |
| regulator-max-microvolt = <5000000>; |
| vin-supply = <&vcc5v0_usb>; |
| }; |
| |
| vcc5v0_otg: regulator-vcc5v0-otg { |
| compatible = "regulator-fixed"; |
| enable-active-high; |
| gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&vcc5v0_otg_en>; |
| regulator-name = "vcc5v0_otg"; |
| regulator-always-on; |
| regulator-boot-on; |
| regulator-min-microvolt = <5000000>; |
| regulator-max-microvolt = <5000000>; |
| vin-supply = <&vcc5v0_usb>; |
| }; |
| |
| vcc5v0_usb: regulator-vcc5v0-usb { |
| compatible = "regulator-fixed"; |
| regulator-name = "vcc5v0_usb"; |
| regulator-always-on; |
| regulator-boot-on; |
| regulator-min-microvolt = <5000000>; |
| regulator-max-microvolt = <5000000>; |
| vin-supply = <&dc_12v>; |
| }; |
| }; |
| |
| /* connected to usb_host0_xhci */ |
| &combphy0 { |
| status = "okay"; |
| }; |
| |
| /* connected to sata1 */ |
| &combphy1 { |
| status = "okay"; |
| }; |
| |
| /* connected to sata2 */ |
| &combphy2 { |
| status = "okay"; |
| }; |
| |
| &gmac0 { |
| assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; |
| assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>; |
| assigned-clock-rates = <0>, <125000000>; |
| clock_in_out = "output"; |
| phy-handle = <&rgmii_phy0>; |
| phy-mode = "rgmii"; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&gmac0_miim |
| &gmac0_tx_bus2 |
| &gmac0_rx_bus2 |
| &gmac0_rgmii_clk |
| &gmac0_rgmii_bus>; |
| rx_delay = <0x2f>; |
| tx_delay = <0x3c>; |
| status = "okay"; |
| }; |
| |
| &i2c0 { |
| pmic@20 { |
| compatible = "rockchip,rk809"; |
| reg = <0x20>; |
| interrupt-parent = <&gpio0>; |
| interrupts = <3 IRQ_TYPE_LEVEL_LOW>; |
| }; |
| }; |
| |
| &i2c1 { |
| status = "okay"; |
| |
| rtc_rv8263: rtc@51 { |
| compatible = "microcrystal,rv8263"; |
| reg = <0x51>; |
| wakeup-source; |
| }; |
| }; |
| |
| &mdio0 { |
| rgmii_phy0: ethernet-phy@0 { |
| compatible = "ethernet-phy-ieee802.3-c22"; |
| reg = <0x0>; |
| }; |
| }; |
| |
| &pcie30phy { |
| data-lanes = <1 2>; |
| status = "okay"; |
| }; |
| |
| /* Connected to a JMicron AHCI SATA controller */ |
| &pcie3x1 { |
| reset-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; |
| vpcie3v3-supply = <&vcc3v3_pcie>; |
| status = "okay"; |
| }; |
| |
| /* Connected to the 2.5G NIC for the upper network jack */ |
| &pcie3x2 { |
| num-lanes = <1>; |
| reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; |
| vpcie3v3-supply = <&vcc3v3_pcie>; |
| status = "okay"; |
| }; |
| |
| &pinctrl { |
| usb { |
| vcc5v0_host_en: vcc5v0-host-en { |
| rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; |
| }; |
| |
| vcc5v0_otg_en: vcc5v0-otg-en { |
| rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; |
| }; |
| }; |
| }; |
| |
| &sata1 { |
| status = "okay"; |
| }; |
| |
| &sata2 { |
| status = "okay"; |
| }; |
| |
| &sdhci { |
| bus-width = <8>; |
| max-frequency = <200000000>; |
| non-removable; |
| status = "okay"; |
| }; |
| |
| /* |
| * Connected to an MCU, that provides access to more LEDs, |
| * buzzer, fan control and more. |
| */ |
| &uart0 { |
| status = "okay"; |
| }; |
| |
| /* |
| * Pins available on CN3 connector at TTL voltage level (3V3). |
| * ,_ _. |
| * |1234| 1=TX 2=VCC |
| * `----' 3=RX 4=GND |
| */ |
| &uart2 { |
| status = "okay"; |
| }; |
| |
| &usb2phy0 { |
| status = "okay"; |
| }; |
| |
| /* connected to usb_host0_xhci */ |
| &usb2phy0_otg { |
| phy-supply = <&vcc5v0_otg>; |
| status = "okay"; |
| }; |
| |
| &usb2phy1 { |
| status = "okay"; |
| }; |
| |
| /* connected to usb_host1_ehci/ohci */ |
| &usb2phy1_host { |
| phy-supply = <&vcc5v0_host>; |
| status = "okay"; |
| }; |
| |
| /* connected to usb_host0_ehci/ohci */ |
| &usb2phy1_otg { |
| phy-supply = <&vcc5v0_host>; |
| status = "okay"; |
| }; |
| |
| /* right port backside */ |
| &usb_host0_ehci { |
| status = "okay"; |
| }; |
| |
| &usb_host0_ohci { |
| status = "okay"; |
| }; |
| |
| /* front port */ |
| &usb_host0_xhci { |
| dr_mode = "host"; |
| status = "okay"; |
| }; |
| |
| /* left port backside */ |
| &usb_host1_ehci { |
| status = "okay"; |
| }; |
| |
| &usb_host1_ohci { |
| status = "okay"; |
| }; |