Skip to contentSkip to conversation

Support for QNAP TS133 variant

PATCH Applied Heiko Stuebner 2 participants 8 messages Jan 4 – Jan 13

Subsystems (2)
lore
Share & tools
lore

Heiko Stuebner

author maintainer
#0 lore raw

cover Support for QNAP TS133 variant

This adds support for the TS133 variant of the NAS series.

It turns out this variant is build around the RK3566 instead of RK3568 as all the other are. This is "fixable" by not including the soc dtsi in the board files and not in the shared tsx33 dtsi.

While adding the devicetree I also realized that some things are wrong in the common dtsi:
- the shared sata controller for all variants is sata2
- the TS133 does not have a "copy-key"

The specific mcu-compatible of course needs the mfd series from [0] to be merged first.

[0] https://lore.kernel.org/linux-devicetree/[email protected]/

Heiko Stuebner (5):
arm64: dts: rockchip: Move SoC include to individual QNAP TSx33 boards
arm64: dts: rockchip: Fix the common combophy + SATA on QNAP TSx33
devices
arm64: dts: rockchip: Move copy-key to TSx33 board files
dt-bindings: arm: rockchip: add TS133 to RK356x-based QNAP NAS devices
arm64: dts: rockchip: Add TS133 variant of the QNAP NAS series

 .../devicetree/bindings/arm/rockchip.yaml     | 14 ++--
 arch/arm64/boot/dts/rockchip/Makefile         |  1 +
 .../boot/dts/rockchip/rk3566-qnap-ts133.dts   | 71 +++++++++++++++++++
 .../boot/dts/rockchip/rk3568-qnap-ts233.dts   | 18 ++++-
 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 18 ++++-
 .../boot/dts/rockchip/rk3568-qnap-tsx33.dtsi  | 21 ++----
 6 files changed, 118 insertions(+), 25 deletions(-)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-qnap-ts133.dts
Signature · 1 line
2.47.2
author maintainer
#1 lore raw

PATCH 1/5 arm64: dts: rockchip: Move SoC include to individual QNAP TSx33 boards

The TS133 while mostly similar, is based around the RK3566 variant, so needs a different SoC include.

By moving the SoC include to the board devicetrees, we can still keep the shared common setup, while supporting the different base SoCs.

---
 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233.dts  | 1 +
 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts  | 1 +
 arch/arm64/boot/dts/rockchip/rk3568-qnap-tsx33.dtsi | 1 -
 3 files changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233.dts +1 -0
index f16d1c628793..9a7d58e7ccc0 100644
@@ -6,6 +6,7 @@
 
 /dts-v1/;
 
+#include "rk3568.dtsi"
 #include "rk3568-qnap-tsx33.dtsi"
 
 / {
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts +1 -0
index d1e3b7e7a280..02d0974d79be 100644
@@ -6,6 +6,7 @@
 
 /dts-v1/;
 
+#include "rk3568.dtsi"
 #include "rk3568-qnap-tsx33.dtsi"
 
 / {
arch/arm64/boot/dts/rockchip/rk3568-qnap-tsx33.dtsi +0 -1
index f009275c72c8..c372ca40fd50 100644
@@ -1,7 +1,6 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
-#include "rk3568.dtsi"
 
 / {
 	aliases {
Signature · 1 line
2.47.2
author maintainer
#2 lore raw

PATCH 2/5 arm64: dts: rockchip: Fix the common combophy + SATA on QNAP TSx33 devices

In reply to Heiko Stuebner

The common used SATA controller on all TSx33 devices is actually SATA2. So move the SATA controller + combophy enablement to their correct position between shared dtsi and board devicetrees.

---
 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233.dts  |  6 +++---
 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts  |  6 +++---
 arch/arm64/boot/dts/rockchip/rk3568-qnap-tsx33.dtsi | 10 +++++-----
 3 files changed, 11 insertions(+), 11 deletions(-)
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233.dts +3 -3
index 9a7d58e7ccc0..e76502180788 100644
@@ -18,8 +18,8 @@ aliases {
 	};
 };
 
-/* connected to sata2 */
-&combphy2 {
+/* Connected to usb_host0_xhci */
+&combphy0 {
 	status = "okay";
 };
 
@@ -93,7 +93,7 @@ hdd2_led_pin: hdd2-led-pin {
 	};
 };
 
-&sata2 {
+&sata1 {
 	status = "okay";
 };
 
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts +3 -3
index 02d0974d79be..708e7f1f8d0d 100644
@@ -28,8 +28,8 @@ vcc3v3_pcie: regulator-vcc3v3-pcie {
 	};
 };
 
-/* connected to sata2 */
-&combphy2 {
+/* Connected to usb_host0_xhci */
+&combphy0 {
 	status = "okay";
 };
 
@@ -151,7 +151,7 @@ hdd4_led_pin: hdd4_led-pin {
 	};
 };
 
-&sata2 {
+&sata1 {
 	status = "okay";
 };
 
arch/arm64/boot/dts/rockchip/rk3568-qnap-tsx33.dtsi +5 -5
index c372ca40fd50..482d8584ec88 100644
@@ -112,13 +112,13 @@ vcc5v0_usb: regulator-vcc5v0-usb {
 	};
 };
 
-/* connected to usb_host0_xhci */
-&combphy0 {
+/* Connected USB3 on TS133 / SATA1 on all the others */
+&combphy1 {
 	status = "okay";
 };
 
-/* connected to sata1 */
-&combphy1 {
+/* Connected to SATA2 */
+&combphy2 {
 	status = "okay";
 };
 
@@ -484,7 +484,7 @@ &pmu_io_domains {
 	status = "okay";
 };
 
-&sata1 {
+&sata2 {
 	status = "okay";
 };
 
Signature · 1 line
2.47.2
author maintainer
#3 lore raw

PATCH 3/5 arm64: dts: rockchip: Move copy-key to TSx33 board files

In reply to Heiko Stuebner

The copy-key is not present on all device variants, so move it to the individual boards that have this key.

---
 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233.dts  | 11 +++++++++++
 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts  | 11 +++++++++++
 arch/arm64/boot/dts/rockchip/rk3568-qnap-tsx33.dtsi | 10 ++--------
 3 files changed, 24 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233.dts +11 -0
index e76502180788..52b741376ef5 100644
@@ -51,6 +51,17 @@ eeprom@56 {
 	};
 };
 
+&keys {
+		pinctrl-names = "default";
+		pinctrl-0 = <&copy_button_pin>, <&reset_button_pin>;
+
+		key-copy {
+			label = "copy";
+			gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_COPY>;
+		};
+};
+
 &leds {
 	led-1 {
 		color = <LED_COLOR_ID_GREEN>;
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts +11 -0
index 708e7f1f8d0d..7d2aedfe616d 100644
@@ -61,6 +61,17 @@ eeprom@56 {
 	};
 };
 
+&keys {
+		pinctrl-names = "default";
+		pinctrl-0 = <&copy_button_pin>, <&reset_button_pin>;
+
+		key-copy {
+			label = "copy";
+			gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_COPY>;
+		};
+};
+
 &leds {
 	led-1 {
 		color = <LED_COLOR_ID_GREEN>;
arch/arm64/boot/dts/rockchip/rk3568-qnap-tsx33.dtsi +2 -8
index 482d8584ec88..cca7b7d0685f 100644
@@ -12,17 +12,11 @@ chosen {
 		stdout-path = "serial2:115200n8";
 	};
 
-	keys {
+	keys: keys {
 		compatible = "gpio-keys";
-		pinctrl-0 = <&copy_button_pin>, <&reset_button_pin>;
+		pinctrl-0 = <&reset_button_pin>;
 		pinctrl-names = "default";
 
-		key-copy {
-			label = "copy";
-			gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_COPY>;
-		};
-
 		key-reset {
 			label = "reset";
 			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_LOW>;
Signature · 1 line
2.47.2
author maintainer
#4 lore raw

PATCH 4/5 dt-bindings: arm: rockchip: add TS133 to RK356x-based QNAP NAS devices

In reply to Heiko Stuebner

QNAP builds a number of variants of the RK356x-based NAS design.

Add the 1-bay TS133 variant.

This one is a tiny bit special as it is based around the RK3566 variant of the mostly similar RK3566/RK3568 SoCs.

---
 .../devicetree/bindings/arm/rockchip.yaml          | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/arm/rockchip.yaml +9 -5
index d496421dbd87..2a5105be3d34 100644
@@ -894,11 +894,15 @@ properties:
           - const: rockchip,rk3568
 
       - description: QNAP TS-x33 NAS devices
-        items:
-          - enum:
-              - qnap,ts233
-              - qnap,ts433
-          - const: rockchip,rk3568
+        oneOf:
+          - items:
+              - const: qnap,ts133
+              - const: rockchip,rk3566
+          - items:
+              - enum:
+                  - qnap,ts233
+                  - qnap,ts433
+              - const: rockchip,rk3568
 
       - description: Radxa Compute Module 3 (CM3)
         items:
Signature · 1 line
2.47.2
maintainer Acked-by on v1 4/5
#5 lore raw

Re: [PATCH 4/5] dt-bindings: arm: rockchip: add TS133 to RK356x-based QNAP NAS devices

Quoted 4 lines · Heiko Stuebner

QNAP builds a number of variants of the RK356x-based NAS design.

Add the 1-bay TS133 variant.

Quoted 8 lines

This one is a tiny bit special as it is based around the RK3566 variant of the mostly similar RK3566/RK3568 SoCs.

---
 .../devicetree/bindings/arm/rockchip.yaml          | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
author maintainer
#6 lore raw

PATCH 5/5 arm64: dts: rockchip: Add TS133 variant of the QNAP NAS series

In reply to Heiko Stuebner

The TS133 is a one-bay NAS mostly similar to the other devices in the series. The main difference is that it is build around the RK3566 SoC instead of the RK3568 variant.

The RK3566/RK3568 are mostly similar with only slight variants in both speed and some specific peripherals - the RK3568 has more.

The specific for the NAS series stay the same though.

---
 arch/arm64/boot/dts/rockchip/Makefile         |  1 +
 .../boot/dts/rockchip/rk3566-qnap-ts133.dts   | 71 +++++++++++++++++++
 2 files changed, 72 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-qnap-ts133.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index dbdda9783e93..ba992860c8a2 100644
@@ -114,6 +114,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rgb20sx.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rgb30.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rk2023.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-x55.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-qnap-ts133.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-radxa-cm3-io.dtb
arch/arm64/boot/dts/rockchip/rk3566-qnap-ts133.dts new file +71 -0

71 lines not on this page · raw message

Signature · 1 line
2.47.2
author maintainer Applied
#7 lore raw
In reply to Heiko Stuebner
Quoted 6 lines · Heiko Stuebner

This adds support for the TS133 variant of the NAS series.

It turns out this variant is build around the RK3566 instead of RK3568 as all the other are. This is "fixable" by not including the soc dtsi in the board files and not in the shared tsx33 dtsi.

Quoted 6 lines

While adding the devicetree I also realized that some things are wrong in the common dtsi:
- the shared sata controller for all variants is sata2
- the TS133 does not have a "copy-key"

[...]

Applied, thanks!

[1/5] arm64: dts: rockchip: Move SoC include to individual QNAP TSx33 boards

      commit: f0761f6be5ed62bc282349c46784d676571ace83
[2/5] arm64: dts: rockchip: Fix the common combophy + SATA on QNAP TSx33 devices
      commit: 5a16e131ddbacdd7acfb8cab6ff0ca1c57339600
[3/5] arm64: dts: rockchip: Move copy-key to TSx33 board files
      commit: a81a2d211344675de4d945eb2070e3ef1202060f
[4/5] dt-bindings: arm: rockchip: add TS133 to RK356x-based QNAP NAS devices
      commit: ae2208dfa2ac3872f2a0d4c72f1a29fcce7b56a8
[5/5] arm64: dts: rockchip: Add TS133 variant of the QNAP NAS series
      commit: 26cfaee2972c95a6d3ad85549df089a4ee93a551

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>