linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Expand available features on Qnap TS433
@ 2024-07-20 21:08 Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 1/8] arm64: dts: rockchip: add PCIe supply regulator to Qnap-TS433 Heiko Stuebner
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Heiko Stuebner @ 2024-07-20 21:08 UTC (permalink / raw)
  To: heiko; +Cc: ukleinek, linux-arm-kernel, linux-rockchip, linux-kernel

Thanks to the nicely supported rk3568, the hardest part for adding things,
is to pull things from the vendor-kernel and translating them to mainline
standards.

This series allows the TS433 to use all 4 bays [0], wiggle some LEDs and
access devices connected to all 3 usb ports.


[0] I only have two drives right now, but I tested both the internal
sata connector as well as the PCIe connected sata controller.


Heiko Stuebner (8):
  arm64: dts: rockchip: add PCIe supply regulator to Qnap TS433
  arm64: dts: rockchip: enable second PCIe controller on the Qnap ts433
  arm64: dts: rockchip: enable uart0 on qnap ts433
  arm64: dts: rockchip: enable usb ports on qnap ts433
  arm64: dts: rockchip: add stdout path on Qnap TS433
  arm64: dts: rockchip: enable sata1+2 on Qnap-TS433
  arm64: dts: rockchip: add board-aliases for Qnap-TS433
  arm64: dts: rockchip: add hdd leds to Qnap-TS433

 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 224 +++++++++++++++++-
 1 file changed, 223 insertions(+), 1 deletion(-)

-- 
2.39.2



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/8] arm64: dts: rockchip: add PCIe supply regulator to Qnap-TS433
  2024-07-20 21:08 [PATCH 0/8] Expand available features on Qnap TS433 Heiko Stuebner
@ 2024-07-20 21:08 ` Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 2/8] arm64: dts: rockchip: enable second PCIe controller on the Qnap-TS433 Heiko Stuebner
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Heiko Stuebner @ 2024-07-20 21:08 UTC (permalink / raw)
  To: heiko; +Cc: ukleinek, linux-arm-kernel, linux-rockchip, linux-kernel

Add the vcc3v3-supply regulator and its link to the pcie controllers.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index 6a998166003c9..889838b4079ae 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -12,6 +12,25 @@
 / {
 	model = "Qnap TS-433-4G NAS System 4-Bay";
 	compatible = "qnap,ts433", "rockchip,rk3568";
+
+	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>;
+	};
 };
 
 &gmac0 {
@@ -65,6 +84,7 @@ &pcie30phy {
 &pcie3x1 {
 	/* The downstream dts has: rockchip,bifurcation, XXX: find out what this is about */
 	reset-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
+	vpcie3v3-supply = <&vcc3v3_pcie>;
 	status = "okay";
 };
 
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/8] arm64: dts: rockchip: enable second PCIe controller on the Qnap-TS433
  2024-07-20 21:08 [PATCH 0/8] Expand available features on Qnap TS433 Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 1/8] arm64: dts: rockchip: add PCIe supply regulator to Qnap-TS433 Heiko Stuebner
@ 2024-07-20 21:08 ` Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 3/8] arm64: dts: rockchip: enable uart0 on qnap ts433 Heiko Stuebner
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Heiko Stuebner @ 2024-07-20 21:08 UTC (permalink / raw)
  To: heiko; +Cc: ukleinek, linux-arm-kernel, linux-rockchip, linux-kernel

The TS433 uses both pcie controllers for sata and the 2nd network
interface. Set the needed data-lanes in the pcie3 phy and enable
the second pcie controller, as well as remove the bifurcation comment.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index 889838b4079ae..0636a08986572 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -78,16 +78,23 @@ rgmii_phy0: ethernet-phy@0 {
 };
 
 &pcie30phy {
+	data-lanes = <1 2>;
 	status = "okay";
 };
 
 &pcie3x1 {
-	/* The downstream dts has: rockchip,bifurcation, XXX: find out what this is about */
 	reset-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
 	vpcie3v3-supply = <&vcc3v3_pcie>;
 	status = "okay";
 };
 
+&pcie3x2 {
+	num-lanes = <1>;
+	reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
+	vpcie3v3-supply = <&vcc3v3_pcie>;
+	status = "okay";
+};
+
 &sdhci {
 	bus-width = <8>;
 	max-frequency = <200000000>;
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/8] arm64: dts: rockchip: enable uart0 on qnap ts433
  2024-07-20 21:08 [PATCH 0/8] Expand available features on Qnap TS433 Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 1/8] arm64: dts: rockchip: add PCIe supply regulator to Qnap-TS433 Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 2/8] arm64: dts: rockchip: enable second PCIe controller on the Qnap-TS433 Heiko Stuebner
@ 2024-07-20 21:08 ` Heiko Stuebner
  2024-07-20 21:11   ` Heiko Stübner
  2024-07-20 21:08 ` [PATCH 3/8] arm64: dts: rockchip: enable uart0 on Qnap-TS433 Heiko Stuebner
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 13+ messages in thread
From: Heiko Stuebner @ 2024-07-20 21:08 UTC (permalink / raw)
  To: heiko; +Cc: ukleinek, linux-arm-kernel, linux-rockchip, linux-kernel

Uart0 is connected to an MCU on the board that handles system control
like the fan-speed. So far no driver for it is available though.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index 0636a08986572..f3ce3cc4598db 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -102,6 +102,10 @@ &sdhci {
 	status = "okay";
 };
 
+&uart0 {
+	status = "okay";
+};
+
 /*
  * Pins available on CN3 connector at TTL voltage level (3V3).
  * ,_  _.
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/8] arm64: dts: rockchip: enable uart0 on Qnap-TS433
  2024-07-20 21:08 [PATCH 0/8] Expand available features on Qnap TS433 Heiko Stuebner
                   ` (2 preceding siblings ...)
  2024-07-20 21:08 ` [PATCH 3/8] arm64: dts: rockchip: enable uart0 on qnap ts433 Heiko Stuebner
@ 2024-07-20 21:08 ` Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 4/8] arm64: dts: rockchip: enable usb ports on qnap ts433 Heiko Stuebner
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Heiko Stuebner @ 2024-07-20 21:08 UTC (permalink / raw)
  To: heiko; +Cc: ukleinek, linux-arm-kernel, linux-rockchip, linux-kernel

Uart0 is connected to an MCU on the board that handles system control
like the fan-speed. So far no driver for it is available though.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index 0636a08986572..f3ce3cc4598db 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -102,6 +102,10 @@ &sdhci {
 	status = "okay";
 };
 
+&uart0 {
+	status = "okay";
+};
+
 /*
  * Pins available on CN3 connector at TTL voltage level (3V3).
  * ,_  _.
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/8] arm64: dts: rockchip: enable usb ports on qnap ts433
  2024-07-20 21:08 [PATCH 0/8] Expand available features on Qnap TS433 Heiko Stuebner
                   ` (3 preceding siblings ...)
  2024-07-20 21:08 ` [PATCH 3/8] arm64: dts: rockchip: enable uart0 on Qnap-TS433 Heiko Stuebner
@ 2024-07-20 21:08 ` Heiko Stuebner
  2024-07-20 21:11   ` Heiko Stübner
  2024-07-20 21:08 ` [PATCH 4/8] arm64: dts: rockchip: enable usb ports on Qnap-TS433 Heiko Stuebner
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 13+ messages in thread
From: Heiko Stuebner @ 2024-07-20 21:08 UTC (permalink / raw)
  To: heiko; +Cc: ukleinek, linux-arm-kernel, linux-rockchip, linux-kernel

Enable usb controllers and phys and add regulator infrastructure for the
usb ports on the ts433.

Of course there are no schematics available for the device, so the
regulator information comes from the vendor-devicetree with unknown
accuracy.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 105 ++++++++++++++++++
 1 file changed, 105 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index f3ce3cc4598db..3fa1670e596cb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -31,6 +31,49 @@ vcc3v3_pcie: regulator-vcc3v3-pcie {
 		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";
 };
 
 &gmac0 {
@@ -95,6 +138,18 @@ &pcie3x2 {
 	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>;
+		};
+	};
+};
+
 &sdhci {
 	bus-width = <8>;
 	max-frequency = <200000000>;
@@ -115,3 +170,53 @@ &uart0 {
 &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";
+};
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/8] arm64: dts: rockchip: enable usb ports on Qnap-TS433
  2024-07-20 21:08 [PATCH 0/8] Expand available features on Qnap TS433 Heiko Stuebner
                   ` (4 preceding siblings ...)
  2024-07-20 21:08 ` [PATCH 4/8] arm64: dts: rockchip: enable usb ports on qnap ts433 Heiko Stuebner
@ 2024-07-20 21:08 ` Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 5/8] arm64: dts: rockchip: add stdout path " Heiko Stuebner
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Heiko Stuebner @ 2024-07-20 21:08 UTC (permalink / raw)
  To: heiko; +Cc: ukleinek, linux-arm-kernel, linux-rockchip, linux-kernel

Enable usb controllers and phys and add regulator infrastructure for the
usb ports on the TS433.

Of course there are no schematics available for the device, so the
regulator information comes from the vendor-devicetree with unknown
accuracy.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 105 ++++++++++++++++++
 1 file changed, 105 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index f3ce3cc4598db..3fa1670e596cb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -31,6 +31,49 @@ vcc3v3_pcie: regulator-vcc3v3-pcie {
 		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";
 };
 
 &gmac0 {
@@ -95,6 +138,18 @@ &pcie3x2 {
 	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>;
+		};
+	};
+};
+
 &sdhci {
 	bus-width = <8>;
 	max-frequency = <200000000>;
@@ -115,3 +170,53 @@ &uart0 {
 &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";
+};
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/8] arm64: dts: rockchip: add stdout path on Qnap-TS433
  2024-07-20 21:08 [PATCH 0/8] Expand available features on Qnap TS433 Heiko Stuebner
                   ` (5 preceding siblings ...)
  2024-07-20 21:08 ` [PATCH 4/8] arm64: dts: rockchip: enable usb ports on Qnap-TS433 Heiko Stuebner
@ 2024-07-20 21:08 ` Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 6/8] arm64: dts: rockchip: enable sata1+2 " Heiko Stuebner
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Heiko Stuebner @ 2024-07-20 21:08 UTC (permalink / raw)
  To: heiko; +Cc: ukleinek, linux-arm-kernel, linux-rockchip, linux-kernel

As most Rockchip boards do, the TS433 also uses uart2 for its serial
output. Set the correct chosen entry for it.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index 3fa1670e596cb..4fbbdb735eb58 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -13,6 +13,10 @@ / {
 	model = "Qnap TS-433-4G NAS System 4-Bay";
 	compatible = "qnap,ts433", "rockchip,rk3568";
 
+	chosen: chosen {
+		stdout-path = "serial2:115200n8";
+	};
+
 	dc_12v: regulator-dc-12v {
 		compatible = "regulator-fixed";
 		regulator-name = "dc_12v";
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 6/8] arm64: dts: rockchip: enable sata1+2 on Qnap-TS433
  2024-07-20 21:08 [PATCH 0/8] Expand available features on Qnap TS433 Heiko Stuebner
                   ` (6 preceding siblings ...)
  2024-07-20 21:08 ` [PATCH 5/8] arm64: dts: rockchip: add stdout path " Heiko Stuebner
@ 2024-07-20 21:08 ` Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 7/8] arm64: dts: rockchip: add board-aliases for Qnap-TS433 Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 8/8] arm64: dts: rockchip: add hdd leds to Qnap-TS433 Heiko Stuebner
  9 siblings, 0 replies; 13+ messages in thread
From: Heiko Stuebner @ 2024-07-20 21:08 UTC (permalink / raw)
  To: heiko; +Cc: ukleinek, linux-arm-kernel, linux-rockchip, linux-kernel

The TS433 has 4 bays. The last two are accessed via a pci-connected
sata controller, while the first two are accessed via the rk3568's
sata controllers. Enable these two now.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 .../boot/dts/rockchip/rk3568-qnap-ts433.dts    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index 4fbbdb735eb58..69bed01cbe4ed 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -80,6 +80,16 @@ &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>;
@@ -154,6 +164,14 @@ vcc5v0_otg_en: vcc5v0-otg-en {
 	};
 };
 
+&sata1 {
+	status = "okay";
+};
+
+&sata2 {
+	status = "okay";
+};
+
 &sdhci {
 	bus-width = <8>;
 	max-frequency = <200000000>;
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 7/8] arm64: dts: rockchip: add board-aliases for Qnap-TS433
  2024-07-20 21:08 [PATCH 0/8] Expand available features on Qnap TS433 Heiko Stuebner
                   ` (7 preceding siblings ...)
  2024-07-20 21:08 ` [PATCH 6/8] arm64: dts: rockchip: enable sata1+2 " Heiko Stuebner
@ 2024-07-20 21:08 ` Heiko Stuebner
  2024-07-20 21:08 ` [PATCH 8/8] arm64: dts: rockchip: add hdd leds to Qnap-TS433 Heiko Stuebner
  9 siblings, 0 replies; 13+ messages in thread
From: Heiko Stuebner @ 2024-07-20 21:08 UTC (permalink / raw)
  To: heiko; +Cc: ukleinek, linux-arm-kernel, linux-rockchip, linux-kernel

Add the aliases for the internal network interface as well as the
emmc on the board.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index 69bed01cbe4ed..c05433ca7dda4 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -13,6 +13,11 @@ / {
 	model = "Qnap TS-433-4G NAS System 4-Bay";
 	compatible = "qnap,ts433", "rockchip,rk3568";
 
+	aliases {
+		ethernet0 = &gmac0;
+		mmc0 = &sdhci;
+	};
+
 	chosen: chosen {
 		stdout-path = "serial2:115200n8";
 	};
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 8/8] arm64: dts: rockchip: add hdd leds to Qnap-TS433
  2024-07-20 21:08 [PATCH 0/8] Expand available features on Qnap TS433 Heiko Stuebner
                   ` (8 preceding siblings ...)
  2024-07-20 21:08 ` [PATCH 7/8] arm64: dts: rockchip: add board-aliases for Qnap-TS433 Heiko Stuebner
@ 2024-07-20 21:08 ` Heiko Stuebner
  9 siblings, 0 replies; 13+ messages in thread
From: Heiko Stuebner @ 2024-07-20 21:08 UTC (permalink / raw)
  To: heiko; +Cc: ukleinek, linux-arm-kernel, linux-rockchip, linux-kernel

Add the 4 gpio-controlled LEDs to the Qnap-TS433.

They are meant for individual disk activitivy, but I haven't found a
way for how to connect them to their individual sata slot yet.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 59 +++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index c05433ca7dda4..d36467c2baf02 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -6,6 +6,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
 #include "rk3568.dtsi"
 
@@ -22,6 +23,46 @@ chosen: chosen {
 		stdout-path = "serial2:115200n8";
 	};
 
+	leds {
+		compatible = "gpio-leds";
+
+		led_hdd1: led-0 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_DISK;
+			gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "disk-activity";
+			pinctrl-names = "default";
+			pinctrl-0 = <&hdd1_led_pin>;
+		};
+
+		led_hdd2: led-1 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_DISK;
+			gpios = <&gpio1 RK_PD6 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "disk-activity";
+			pinctrl-names = "default";
+			pinctrl-0 = <&hdd2_led_pin>;
+		};
+
+		led_hdd3: led-2 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_DISK;
+			gpios = <&gpio1 RK_PD7 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "disk-activity";
+			pinctrl-names = "default";
+			pinctrl-0 = <&hdd3_led_pin>;
+		};
+
+		led_hdd4: led-3 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_DISK;
+			gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "disk-activity";
+			pinctrl-names = "default";
+			pinctrl-0 = <&hdd4_led_pin>;
+		};
+	};
+
 	dc_12v: regulator-dc-12v {
 		compatible = "regulator-fixed";
 		regulator-name = "dc_12v";
@@ -158,6 +199,24 @@ &pcie3x2 {
 };
 
 &pinctrl {
+	leds {
+		hdd1_led_pin: hdd1-led-pin {
+			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+
+		hdd2_led_pin: hdd2-led-pin {
+			rockchip,pins = <1 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+
+		hdd3_led_pin: hdd3-led-pin {
+			rockchip,pins = <1 RK_PD7 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+
+		hdd4_led_pin: hdd4_led-pin {
+			rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
 	usb {
 		vcc5v0_host_en: vcc5v0-host-en {
 			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/8] arm64: dts: rockchip: enable uart0 on qnap ts433
  2024-07-20 21:08 ` [PATCH 3/8] arm64: dts: rockchip: enable uart0 on qnap ts433 Heiko Stuebner
@ 2024-07-20 21:11   ` Heiko Stübner
  0 siblings, 0 replies; 13+ messages in thread
From: Heiko Stübner @ 2024-07-20 21:11 UTC (permalink / raw)
  To: linux-rockchip; +Cc: ukleinek, linux-arm-kernel, linux-kernel

Am Samstag, 20. Juli 2024, 23:08:49 CEST schrieb Heiko Stuebner:
> Uart0 is connected to an MCU on the board that handles system control
> like the fan-speed. So far no driver for it is available though.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

ignore this one ;-)

I updated the subject and them fumbled with git-format-patch




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 4/8] arm64: dts: rockchip: enable usb ports on qnap ts433
  2024-07-20 21:08 ` [PATCH 4/8] arm64: dts: rockchip: enable usb ports on qnap ts433 Heiko Stuebner
@ 2024-07-20 21:11   ` Heiko Stübner
  0 siblings, 0 replies; 13+ messages in thread
From: Heiko Stübner @ 2024-07-20 21:11 UTC (permalink / raw)
  To: linux-rockchip; +Cc: ukleinek, linux-arm-kernel, linux-kernel

Am Samstag, 20. Juli 2024, 23:08:51 CEST schrieb Heiko Stuebner:
> Enable usb controllers and phys and add regulator infrastructure for the
> usb ports on the ts433.
> 
> Of course there are no schematics available for the device, so the
> regulator information comes from the vendor-devicetree with unknown
> accuracy.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

ignore this one ;-)

I updated the subject and them fumbled with git-format-patch




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-07-20 21:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-20 21:08 [PATCH 0/8] Expand available features on Qnap TS433 Heiko Stuebner
2024-07-20 21:08 ` [PATCH 1/8] arm64: dts: rockchip: add PCIe supply regulator to Qnap-TS433 Heiko Stuebner
2024-07-20 21:08 ` [PATCH 2/8] arm64: dts: rockchip: enable second PCIe controller on the Qnap-TS433 Heiko Stuebner
2024-07-20 21:08 ` [PATCH 3/8] arm64: dts: rockchip: enable uart0 on qnap ts433 Heiko Stuebner
2024-07-20 21:11   ` Heiko Stübner
2024-07-20 21:08 ` [PATCH 3/8] arm64: dts: rockchip: enable uart0 on Qnap-TS433 Heiko Stuebner
2024-07-20 21:08 ` [PATCH 4/8] arm64: dts: rockchip: enable usb ports on qnap ts433 Heiko Stuebner
2024-07-20 21:11   ` Heiko Stübner
2024-07-20 21:08 ` [PATCH 4/8] arm64: dts: rockchip: enable usb ports on Qnap-TS433 Heiko Stuebner
2024-07-20 21:08 ` [PATCH 5/8] arm64: dts: rockchip: add stdout path " Heiko Stuebner
2024-07-20 21:08 ` [PATCH 6/8] arm64: dts: rockchip: enable sata1+2 " Heiko Stuebner
2024-07-20 21:08 ` [PATCH 7/8] arm64: dts: rockchip: add board-aliases for Qnap-TS433 Heiko Stuebner
2024-07-20 21:08 ` [PATCH 8/8] arm64: dts: rockchip: add hdd leds to Qnap-TS433 Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).