istoreos/target/linux/rockchip/dts/rk3568/rk3568-hnas.dts
Liangbin Lian 99075b24e3
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
target/rockchip: add hinlink rk3568 series
2025-04-09 18:12:43 +08:00

250 lines
5.1 KiB
Plaintext

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2020 Rockchip Electronics Co., Ltd.
*/
/dts-v1/;
#include "rk3568-hinlink.dtsi"
#include <dt-bindings/leds/common.h>
/ {
model = "HINLINK HNAS Board";
compatible = "hinlink,hnas", "rockchip,rk3568";
reg-sata-pm-pwr {
compatible = "regulator-fixed";
regulator-name = "reg_sata_pm_pwr";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
regulator-boot-on;
enable-active-high;
gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&sata_pm_pwr>, <&sata_pm_reset_low>;
vin-supply = <&vcc5v0_sys>;
};
reg-sata-pm-reset {
compatible = "regulator-fixed";
regulator-name = "reg_sata_pm_reset";
regulator-always-on;
regulator-boot-on;
startup-delay-us = <12000>;
enable-active-high;
gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&sata_pm_reset>;
/**
* kernel boot slow with log
* `ata1: link is slow to respond, please be patient`
* disable it now, and enable it after system startup
*
* UPDATE: above error just because CONFIG_SATA_PMP not enabled on kernel
* but we keep this disabled to avoiding scan rootfs from SATA
*/
status = "disabled";
};
vcc5v0_sata0_pwr: vcc5v0-sata0-pwr {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sata0_pwr";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_sata0_pwr_en>;
vin-supply = <&vcc5v0_sys>;
};
disk-leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 =
<&led_disk1_en>,
<&led_disk2_en>,
<&led_disk3_en>,
<&led_disk4_en>;
led-disk1 {
function = LED_FUNCTION_DISK_ACTIVITY;
gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_HIGH>;
label = "green:disk1";
linux,default-trigger = "ata1p3";
};
led-disk2 {
function = LED_FUNCTION_DISK_ACTIVITY;
gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
label = "green:disk2";
linux,default-trigger = "ata1p0";
};
led-disk3 {
function = LED_FUNCTION_DISK_ACTIVITY;
gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>;
label = "green:disk3";
linux,default-trigger = "ata1p2";
};
led-disk4 {
function = LED_FUNCTION_DISK_ACTIVITY;
gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>;
label = "green:disk4";
linux,default-trigger = "ata1p1";
};
};
fan: pwm-fan {
compatible = "pwm-fan";
cooling-levels = <0 0x55 0x66 0x77 0x88 0x99 0xbb 0xcc 0xff>;
#cooling-cells = <2>;
fan-supply = <&vcc5v0_sys>;
pwms = <&pwm0 0 50000 0>;
};
};
&chosen {
default-firewall = "nas";
};
&gmac0 {
status = "disabled";
};
&gmac1 {
status = "disabled";
};
&pwm0 {
status = "okay";
};
&i2c5 {
status = "disabled";
};
&combphy0 {
// pinctrl-names = "default";
// pinctrl-0 = <&sata_pm_reset_high>;
status = "okay";
};
&sata0 {
/**
* Uncomment this line to enable FBS
*/
compatible = "rockchip,rk-ahci", "rockchip,rk3568-dwc-ahci", "snps,dwc-ahci";
target-supply = <&vcc5v0_sata0_pwr>;
};
&usb2phy0_host {
phy-supply = <&vcc5v0_sys>;
status = "okay";
};
&usb2phy0_otg {
vbus-supply = <&vcc5v0_sys>;
rockchip,vbus-always-on;
status = "okay";
};
&usb2phy1_host {
phy-supply = <&vcc5v0_sys>;
status = "okay";
};
&usb2phy1_otg {
phy-supply = <&vcc5v0_sys>;
status = "okay";
};
&usb_host0_xhci {
status = "okay";
};
&cpu_thermal {
trips {
cpu_warm: cpu_warm {
temperature = <65000>;
hysteresis = <5000>;
type = "active";
};
cpu_hot: cpu_hot {
temperature = <85000>;
hysteresis = <5000>;
type = "active";
};
cpu_hall: cpu_hall {
temperature = <95000>;
hysteresis = <5000>;
type = "active";
};
cpu_idle: cpu_idle {
temperature = <47000>;
hysteresis = <5000>;
type = "passive";
};
};
cooling-maps {
map2 {
trip = <&cpu_idle>;
cooling-device = <&fan THERMAL_NO_LIMIT 2>;
};
map3 {
trip = <&cpu_warm>;
cooling-device = <&fan 2 4>;
};
map4 {
trip = <&cpu_hot>;
cooling-device = <&fan 4 6>;
};
map5 {
trip = <&cpu_hall>;
cooling-device = <&fan 6 THERMAL_NO_LIMIT>;
};
};
};
&pinctrl {
sata {
sata_pm_pwr: sata-pm-pwr {
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
};
sata_pm_reset: sata-pm-reset {
rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
};
sata_pm_reset_low: sata-pm-reset-low {
rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_output_low>;
};
sata_pm_reset_high: sata-pm-reset-high {
rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_output_high>;
};
vcc5v0_sata0_pwr_en: vcc5v0-sata0-pwr-en {
rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
leds {
led_disk1_en: led-disk1-en {
rockchip,pins = <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
};
led_disk2_en: led-disk2-en {
rockchip,pins = <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
};
led_disk3_en: led-disk3-en {
rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
};
led_disk4_en: led-disk4-en {
rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};