2022-03-01 15:36:07

by Frank Wunderlich

[permalink] [raw]
Subject: [PATCH v4 0/5] Add sata nodes to rk356x

From: Frank Wunderlich <[email protected]>

This Series converts the binding for ahci-platform to yaml and adds
sata nodes to rockchip rk356x device trees.

v4:
YAML binding:
- fix min vs. max
- fix indention of examples
- move up sata-common.yaml
- reorder compatible
- add descriptions/maxitems
- fix compatible-structure
- fix typo in example achi vs. ahci
- add clock-names and reg-names
DTS-Patches:
- drop newline in dts
- re-add clock-names
- add soc specific compatible
- fix sata nodename in arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
v3:
- add conversion to sata-series
- fix some errors in dt_binding_check and dtbs_check
- move to unevaluated properties = false
- add power-domain to yaml
- move sata0 to rk3568.dtsi
- drop clock-names and interrupt-names

Frank Wunderlich (5):
dt-bindings: Convert ahci-platform DT bindings to yaml
arm64: dts: broadcom: Fix sata nodename
dt-bindings: Add power-domains property to ahci-platform
dt-bindings: Add rk3568-dwc3-ahci compatible
arm64: dts: rockchip: Add sata nodes to rk356x

.../devicetree/bindings/ata/ahci-platform.txt | 79 --------
.../bindings/ata/ahci-platform.yaml | 169 ++++++++++++++++++
.../boot/dts/broadcom/northstar2/ns2.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 14 ++
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 28 +++
5 files changed, 212 insertions(+), 80 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/ata/ahci-platform.txt
create mode 100644 Documentation/devicetree/bindings/ata/ahci-platform.yaml

--
2.25.1


2022-03-01 16:16:05

by Frank Wunderlich

[permalink] [raw]
Subject: [PATCH v4 4/5] dt-bindings: Add rk3568-dwc3-ahci compatible

From: Frank Wunderlich <[email protected]>

Add SoC specific compatible for rk3568 ahci controller

Signed-off-by: Frank Wunderlich <[email protected]>
---
v4: new Patch
Documentation/devicetree/bindings/ata/ahci-platform.yaml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.yaml b/Documentation/devicetree/bindings/ata/ahci-platform.yaml
index ea1af283d125..7111cf448f45 100644
--- a/Documentation/devicetree/bindings/ata/ahci-platform.yaml
+++ b/Documentation/devicetree/bindings/ata/ahci-platform.yaml
@@ -29,6 +29,10 @@ properties:
- marvell,armada-8k-ahci
- marvell,berlin2q-ahci
- const: generic-ahci
+ - items:
+ - enum:
+ - rockchip,rk3568-dwc-ahci
+ - const: snps,dwc-ahci
- enum:
- brcm,iproc-ahci
- cavium,octeon-7130-ahci
--
2.25.1

2022-03-01 16:18:16

by Frank Wunderlich

[permalink] [raw]
Subject: [PATCH v4 3/5] dt-bindings: Add power-domains property to ahci-platform

From: Frank Wunderlich <[email protected]>

Some SoC using power-domains property so add it here

Signed-off-by: Frank Wunderlich <[email protected]>
---
changes in v4: none
changes in v3:
- new patch
---
Documentation/devicetree/bindings/ata/ahci-platform.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.yaml b/Documentation/devicetree/bindings/ata/ahci-platform.yaml
index cf67ddfc6afb..ea1af283d125 100644
--- a/Documentation/devicetree/bindings/ata/ahci-platform.yaml
+++ b/Documentation/devicetree/bindings/ata/ahci-platform.yaml
@@ -89,6 +89,9 @@ properties:
some embedded SoCs.
maxItems: 1

+ power-domains:
+ maxItems: 1
+
reg-names:
maxItems: 1

--
2.25.1

2022-03-01 17:54:24

by Frank Wunderlich

[permalink] [raw]
Subject: [PATCH v4 2/5] arm64: dts: broadcom: Fix sata nodename

From: Frank Wunderlich <[email protected]>

After converting ahci-platform txt binding to yaml nodename is reported
as not matching the standard:

arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dt.yaml:
ahci@663f2000: $nodename:0: 'ahci@663f2000' does not match '^sata(@.*)?$'

Fix it to match binding.

Fixes: ac9aae00f0fc ("arm64: dts: Add SATA3 AHCI and SATA3 PHY DT nodes for NS2")
Signed-off-by: Frank Wunderlich <[email protected]>
---
v4:
- new Patch
---
arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
index 2cfeaf3b0a87..8c218689fef7 100644
--- a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
+++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
@@ -687,7 +687,7 @@ sata_phy1: sata-phy@1 {
};
};

- sata: ahci@663f2000 {
+ sata: sata@663f2000 {
compatible = "brcm,iproc-ahci", "generic-ahci";
reg = <0x663f2000 0x1000>;
dma-coherent;
--
2.25.1

2022-03-01 22:58:48

by Frank Wunderlich

[permalink] [raw]
Subject: [PATCH v4 5/5] arm64: dts: rockchip: Add sata nodes to rk356x

From: Frank Wunderlich <[email protected]>

RK356x supports up to 3 sata controllers which were compatible with the
existing snps,dwc-ahci binding.

Signed-off-by: Frank Wunderlich <[email protected]>
---
changes in v4:
- drop newline in dts
- re-add clock-names
- add soc specific compatible
changes in v3:
- fix combphy error by moving sata0 to rk3568.dtsi
- remove clock-names and interrupt-names
changes in v2:
- added sata0 + 1, but have only tested sata2
---
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 14 ++++++++++++
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 28 ++++++++++++++++++++++++
2 files changed, 42 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
index 5b0f528d6818..3e07d9f6a2d1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
@@ -8,6 +8,20 @@
/ {
compatible = "rockchip,rk3568";

+ sata0: sata@fc000000 {
+ compatible = "rockchip,rk3568-dwc-ahci", "snps,dwc-ahci";
+ reg = <0 0xfc000000 0 0x1000>;
+ clocks = <&cru ACLK_SATA0>, <&cru CLK_SATA0_PMALIVE>,
+ <&cru CLK_SATA0_RXOOB>;
+ clock-names = "sata", "pmalive", "rxoob";
+ interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&combphy0 PHY_TYPE_SATA>;
+ phy-names = "sata-phy";
+ ports-implemented = <0x1>;
+ power-domains = <&power RK3568_PD_PIPE>;
+ status = "disabled";
+ };
+
pipe_phy_grf0: syscon@fdc70000 {
compatible = "rockchip,rk3568-pipe-phy-grf", "syscon";
reg = <0x0 0xfdc70000 0x0 0x1000>;
diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
index 7cdef800cb3c..264dd030e703 100644
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
@@ -230,6 +230,34 @@ scmi_shmem: sram@0 {
};
};

+ sata1: sata@fc400000 {
+ compatible = "rockchip,rk3568-dwc-ahci", "snps,dwc-ahci";
+ reg = <0 0xfc400000 0 0x1000>;
+ clocks = <&cru ACLK_SATA1>, <&cru CLK_SATA1_PMALIVE>,
+ <&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>;
+ status = "disabled";
+ };
+
+ sata2: sata@fc800000 {
+ compatible = "rockchip,rk3568-dwc-ahci", "snps,dwc-ahci";
+ reg = <0 0xfc800000 0 0x1000>;
+ clocks = <&cru ACLK_SATA2>, <&cru CLK_SATA2_PMALIVE>,
+ <&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>;
+ status = "disabled";
+ };
+
gic: interrupt-controller@fd400000 {
compatible = "arm,gic-v3";
reg = <0x0 0xfd400000 0 0x10000>, /* GICD */
--
2.25.1

2022-03-01 23:50:54

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH v4 2/5] arm64: dts: broadcom: Fix sata nodename

On Tue, 1 Mar 2022 16:24:18 +0100, Frank Wunderlich <[email protected]> wrote:
> From: Frank Wunderlich <[email protected]>
>
> After converting ahci-platform txt binding to yaml nodename is reported
> as not matching the standard:
>
> arch/arm64/boot/dts/broadcom/northstar2/ns2-svk.dt.yaml:
> ahci@663f2000: $nodename:0: 'ahci@663f2000' does not match '^sata(@.*)?$'
>
> Fix it to match binding.
>
> Fixes: ac9aae00f0fc ("arm64: dts: Add SATA3 AHCI and SATA3 PHY DT nodes for NS2")
> Signed-off-by: Frank Wunderlich <[email protected]>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree-arm64/next, thanks!
--
Florian

2022-03-02 20:49:22

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 3/5] dt-bindings: Add power-domains property to ahci-platform

On 01/03/2022 16:24, Frank Wunderlich wrote:
> From: Frank Wunderlich <[email protected]>
>
> Some SoC using power-domains property so add it here
>
> Signed-off-by: Frank Wunderlich <[email protected]>
> ---
> changes in v4: none
> changes in v3:
> - new patch
> ---
> Documentation/devicetree/bindings/ata/ahci-platform.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>


Reviewed-by: Krzysztof Kozlowski <[email protected]>


Best regards,
Krzysztof

2022-03-02 21:36:56

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 4/5] dt-bindings: Add rk3568-dwc3-ahci compatible

On 01/03/2022 16:24, Frank Wunderlich wrote:
> From: Frank Wunderlich <[email protected]>
>
> Add SoC specific compatible for rk3568 ahci controller
>
> Signed-off-by: Frank Wunderlich <[email protected]>
> ---
> v4: new Patch
> Documentation/devicetree/bindings/ata/ahci-platform.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>

Here and in previous bindings patches - you have wrong subject. I
already said it with v3. I gave you exact subject prefix to use.


Best regards,
Krzysztof