Skip to contentSkip to conversation

Add sata version of the quartz64-a board

PATCH In review Alessandro Carminati 2 participants 4 messages Sep 16, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Add sata version of the quartz64-a board

The Quartz64 board is built upon Rockchip RK3566.
Rockchip RK3566 has two combo phys.
The first connects USB3 and SATA ctrl1, and the second PCIe lane and SATA ctrl2.
The second combo phy is hardwired to the PCIe slot, where for the first, the hardware on the board provides both the USB3 connector and the SATA connector.
This DT allows the users to switch the combo phy to the SATA connector.

---
 arch/arm64/boot/dts/rockchip/Makefile                   | 1 +
 arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts | 9 +++++++++
 2 files changed, 10 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index 97ec6c156346..5c82881a92d3 100644
@@ -60,6 +60,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399pro-rock-pi-n10.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.1.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.usb3.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.sata.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-roc-pc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts new file +9 -0
new file mode 100644
index 000000000000..8620df7ec01e
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "rk3566-quartz64-a.dtsi"
+
+&sata1 {
+	status = "okay";
+};
Signature · 1 line
2.34.1
maintainer
#1 lore raw

Hi Alessandro,

Am Freitag, 16. September 2022, 14:53:27 CEST schrieb Alessandro Carminati:

Quoted 10 lines

The Quartz64 board is built upon Rockchip RK3566.
Rockchip RK3566 has two combo phys.
The first connects USB3 and SATA ctrl1, and the second PCIe lane and SATA ctrl2.
The second combo phy is hardwired to the PCIe slot, where for the first, the hardware on the board provides both the USB3 connector and the SATA connector.
This DT allows the users to switch the combo phy to the SATA connector.

I'm not really sure what the best way to do this is.

For one, this is mainly a configuration thing, so I was more thinking about a devicetree-overlay as the right thing to use.

On the other hand this is touches essential a device you may want to boot from. Though an initramfs may be able to solve this.

So I'm really not sure - maybe the dt-maintainers can provide some direction :-)

Some more general stuff below (and here):

Please always use prefixes in your patch subject matching the subsystem - can be found by just using "git log" on the directory.

Here it would be "arm64: dts: rockchip: foo"

Quoted 24 lines
---
 arch/arm64/boot/dts/rockchip/Makefile                   | 1 +
 arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts | 9 +++++++++
 2 files changed, 10 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index 97ec6c156346..5c82881a92d3 100644
@@ -60,6 +60,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399pro-rock-pi-n10.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.1.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.usb3.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.sata.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-roc-pc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts new file +0 -0
new file mode 100644
index 000000000000..8620df7ec01e

arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts line 9

Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts new file +9 -0
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "rk3566-quartz64-a.dtsi"
+
+&sata1 {
+	status = "okay";
+};

I guess you may want to disable the now unused usb controller?

Heiko

maintainer
#2 lore raw

Hi again,

Am Freitag, 16. September 2022, 15:12:10 CEST schrieb Heiko Stuebner:

Quoted 5 lines

arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts line 9

Quoted 3 lines

+&sata1 {

arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts new file +2 -0
+	status = "okay";
+};

I guess you may want to disable the now unused usb controller?

ignore that ... I just realized that is was kept disabled by patch1

Heiko

#3 lore raw

Thank you for the review.
While I wait for the dt-maintainers direction, I will fix the patch following your advice. Shortly, I'll post the new version.

Alessandro

Quoted 15 lines · Heiko Stuebner

Hi again,

Am Freitag, 16. September 2022, 15:12:10 CEST schrieb Heiko Stuebner:

Quoted 5 lines

arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts line 9

Quoted 3 lines

+&sata1 {

arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.sata.dts new file +2 -0
+	status = "okay";
+};

I guess you may want to disable the now unused usb controller?

ignore that ... I just realized that is was kept disabled by patch1

Heiko