Revision overlays for QNAP TSx33 devices
Subsystems (2)
Heiko Stuebner
maintainercover Revision overlays for QNAP TSx33 devices
The QNAP NAS devices actually got device revisions at some point, so there are different board variants in the wild.
Above certain PCB revisions, the devices gained additional GPIOs for controlling individual power to the sata ports and also could detect the presence via GPIOs.
They are not really necessary for normal functionality, as the PINs start in a sane setting, but still it's nice to document things.
The overlays should be applied by the bootloader, where I have a series pending to do this by reading the PCB ids from the EEPROMs.
Heiko Stuebner (4):
arm64: dts: rockchip: Add port subnodes to RK356x SATA controllers
arm64: dts: rockchip: add overlay for qnap-ts433 device revision
arm64: dts: rockchip: add overlay for qnap-ts233 device revision
arm64: dts: rockchip: add overlay for qnap-ts133 device revision
arch/arm64/boot/dts/rockchip/Makefile | 15 ++ .../rockchip/rk3566-qnap-ts133-pcb-13.dtso | 64 ++++++++ .../rockchip/rk3568-qnap-ts233-pcb-12-11.dtso | 93 +++++++++++ .../rockchip/rk3568-qnap-ts433-pcb-12-10.dtso | 151 ++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 27 +++- 5 files changed, 346 insertions(+), 4 deletions(-) create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-qnap-ts133-pcb-13.dtso create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233-pcb-12-11.dtso create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433-pcb-12-10.dtso
Signature · 1 line
2.47.2
Heiko Stuebner
maintainerPATCH 1/4 arm64: dts: rockchip: Add port subnodes to RK356x SATA controllers
The SATA controllers on RK356x are identical to the ones found on RK3588, but don't yet provide a port sub-node. Per the datasheet the RK356x also supports the fbscp capability and has the same queue maximums.
So add port sub-nodes to both sata controllers on RK356x, and move the phy properties to it. Also add phandles to the ports, so that boards can add their target-supply when available.
--- arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +23 -4
@@ -3,6 +3,7 @@ * Copyright (c) 2021 Rockchip Electronics Co., Ltd. */ +#include <dt-bindings/ata/ahci.h> #include <dt-bindings/clock/rk3568-cru.h> #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/interrupt-controller/irq.h>
@@ -234,11 +235,20 @@ sata1: sata@fc400000 { <&cru CLK_SATA1_RXOOB>; clock-names = "sata", "pmalive", "rxoob"; interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>; - phys = <&combphy1 PHY_TYPE_SATA>; - phy-names = "sata-phy"; ports-implemented = <0x1>; power-domains = <&power RK3568_PD_PIPE>; + #address-cells = <1>; + #size-cells = <0>; status = "disabled"; + + sata1_port0: sata-port@0 { + reg = <0>; + hba-port-cap = <HBA_PORT_FBSCP>; + phys = <&combphy1 PHY_TYPE_SATA>; + phy-names = "sata-phy"; + snps,rx-ts-max = <32>; + snps,tx-ts-max = <32>; + }; }; sata2: sata@fc800000 {
@@ -248,11 +258,20 @@ sata2: sata@fc800000 { <&cru CLK_SATA2_RXOOB>; clock-names = "sata", "pmalive", "rxoob"; interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>; - phys = <&combphy2 PHY_TYPE_SATA>; - phy-names = "sata-phy"; ports-implemented = <0x1>; power-domains = <&power RK3568_PD_PIPE>; + #address-cells = <1>; + #size-cells = <0>; status = "disabled"; + + sata2_port0: sata-port@0 { + reg = <0>; + hba-port-cap = <HBA_PORT_FBSCP>; + phys = <&combphy2 PHY_TYPE_SATA>; + phy-names = "sata-phy"; + snps,rx-ts-max = <32>; + snps,tx-ts-max = <32>; + }; }; usb_host0_xhci: usb@fcc00000 {
Signature · 1 line
2.47.2
Heiko Stuebner
maintainerPATCH 2/4 arm64: dts: rockchip: add overlay for qnap-ts433 device revision
In reply to Heiko StuebnerTS433 devices received a board revision adding gpios for per hard-disk presence-detection and power-control. These board have a PCB-id of at least 12 (mainboard) and 10 (backplane), which can be read from an EEPROM.
The presence detection is not really necessary and there are also no existing bindings for doing something with it. So add them as gpio hogs to at least document them and allow their state to be read from debugfs.
The power-control is modelled as regulators, with the hdd1+hdd2 variants connected to the RK3568's SATA controllers as target-supplies. The JMicron AHCI controller on PCIe didn't have bindings for that, I could find, so they get an always-on state for now.
--- arch/arm64/boot/dts/rockchip/Makefile | 5 + .../rockchip/rk3568-qnap-ts433-pcb-12-10.dtso | 151 ++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433-pcb-12-10.dtso
arch/arm64/boot/dts/rockchip/Makefile +5 -0
@@ -145,6 +145,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-photonicat.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts233.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts433.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts433-pcb-12-10.dtbo dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-roc-pc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
@@ -245,6 +246,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64-v2-screen.dtb rk3399-rockpro64-v2-screen-dtbs := rk3399-rockpro64-v2.dtb \ rk3399-rockpro64-screen.dtbo +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts433-pcb-12-10.dtb +rk3568-qnap-ts433-pcb-12-10-dtbs := rk3568-qnap-ts433.dtb \ + rk3568-qnap-ts433-pcb-12-10.dtbo + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-vz-2-uhd.dtb rk3568-wolfvision-pf5-vz-2-uhd-dtbs := rk3568-wolfvision-pf5.dtb \ rk3568-wolfvision-pf5-display-vz.dtbo \
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433-pcb-12-10.dtso new file +151 -0
151 lines not on this page · raw message
Signature · 1 line
2.47.2
Heiko Stuebner
maintainerPATCH 3/4 arm64: dts: rockchip: add overlay for qnap-ts233 device revision
In reply to Heiko StuebnerTS233 devices received a board revision adding gpios for per hard-disk presence-detection and power-control. These boards have a PCB-id of at least 12 (mainboard) and 11 (backplane), which can be read from an EEPROM.
The presence detection is not really necessary and there are also no existing bindings for doing something with it. So add them as gpio hogs to at least document them and allow their state to be read from debugfs.
The power-control is modelled as regulators, with the hdd1+hdd2 variants connected to the RK3568's SATA controllers as target-supplies.
--- arch/arm64/boot/dts/rockchip/Makefile | 5 + .../rockchip/rk3568-qnap-ts233-pcb-12-11.dtso | 93 +++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233-pcb-12-11.dtso
arch/arm64/boot/dts/rockchip/Makefile +5 -0
@@ -144,6 +144,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-photonicat.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts233.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts233-pcb-12-11.dtbo dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts433.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts433-pcb-12-10.dtbo dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb
@@ -246,6 +247,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64-v2-screen.dtb rk3399-rockpro64-v2-screen-dtbs := rk3399-rockpro64-v2.dtb \ rk3399-rockpro64-screen.dtbo +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts233-pcb-12-11.dtb +rk3568-qnap-ts233-pcb-12-11-dtbs := rk3568-qnap-ts233.dtb \ + rk3568-qnap-ts233-pcb-12-11.dtbo + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts433-pcb-12-10.dtb rk3568-qnap-ts433-pcb-12-10-dtbs := rk3568-qnap-ts433.dtb \ rk3568-qnap-ts433-pcb-12-10.dtbo
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts233-pcb-12-11.dtso new file +93 -0
93 lines not on this page · raw message
Signature · 1 line
2.47.2
Heiko Stuebner
maintainerPATCH 4/4 arm64: dts: rockchip: add overlay for qnap-ts133 device revision
In reply to Heiko StuebnerTS433 devices received a board revision adding gpios for per hard-disk presence-detection and power-control. These boards have a PCB-id of at least 13 which can be read from an EEPROM.
The presence detection is not really necessary and there are also no existing bindings for doing something with it. So add them as gpio hog to at least document them and allow its state to be read from debugfs.
The power-control is modelled as regulator, with connected to the RK3568's SATA controller as target-supply.
--- arch/arm64/boot/dts/rockchip/Makefile | 5 ++ .../rockchip/rk3566-qnap-ts133-pcb-13.dtso | 64 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-qnap-ts133-pcb-13.dtso
arch/arm64/boot/dts/rockchip/Makefile +5 -0
@@ -115,6 +115,7 @@ 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-qnap-ts133-pcb-13.dtbo 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
@@ -247,6 +248,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64-v2-screen.dtb rk3399-rockpro64-v2-screen-dtbs := rk3399-rockpro64-v2.dtb \ rk3399-rockpro64-screen.dtbo +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-qnap-ts133-pcb-13.dtb +rk3566-qnap-ts133-pcb-13-dtbs := rk3566-qnap-ts133.dtb \ + rk3566-qnap-ts133-pcb-13.dtbo + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts233-pcb-12-11.dtb rk3568-qnap-ts233-pcb-12-11-dtbs := rk3568-qnap-ts233.dtb \ rk3568-qnap-ts233-pcb-12-11.dtbo
arch/arm64/boot/dts/rockchip/rk3566-qnap-ts133-pcb-13.dtso new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
2.47.2
Quoted 8 lines · Heiko Stuebner
The QNAP NAS devices actually got device revisions at some point, so there are different board variants in the wild.
Above certain PCB revisions, the devices gained additional GPIOs for controlling individual power to the sata ports and also could detect the presence via GPIOs.
[...]
Applied, thanks!
[1/4] arm64: dts: rockchip: Add port subnodes to RK356x SATA controllers
commit: 5918bf2a17f4689abfb94d341c5240088f8bd16e
[2/4] arm64: dts: rockchip: add overlay for qnap-ts433 device revision
commit: 406c5515eb62fe6837fc1257855024b1ac6c52e1
[3/4] arm64: dts: rockchip: add overlay for qnap-ts233 device revision
commit: a12bd8d24f2f942a6684431af9f885b4a4ae84fe
[4/4] arm64: dts: rockchip: add overlay for qnap-ts133 device revision
commit: 5fdd6701fad197d0dfe21de3beed8ac45343aa73Best regards,
Signature · 1 line
Heiko Stuebner <[email protected]>