2023-05-01 21:26:47

by Andrew Halaney

[permalink] [raw]
Subject: [PATCH v4 v0/4] sa8155p-adp devicetree ethernet cleanup

This series cleans up some devicetree conventions in sa8155p-adp based
on feedback from other platforms.

The hope is that by getting it right here, future contributors won't
repeat the same mistakes as I did!

v3: https://lore.kernel.org/linux-arm-msm/[email protected]/

Thanks,
Andrew

Andrew Halaney (4):
arm64: dts: qcom: sa8155p-adp: Make compatible the first property
arm64: dts: qcom: Make -cells decimal
arm64: dts: qcom: sa8155p-adp: Remove unneeded rgmii_phy information
arm64: dts: qcom: sa8155p-adp: Move mtl nodes into ethernet node

arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +-
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 14 ++---
arch/arm64/boot/dts/qcom/msm8953.dtsi | 4 +-
arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts | 4 +-
arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 56 ++++++++++----------
5 files changed, 39 insertions(+), 41 deletions(-)

--
2.40.0


2023-05-01 21:26:52

by Andrew Halaney

[permalink] [raw]
Subject: [PATCH v4 1/4] arm64: dts: qcom: sa8155p-adp: Make compatible the first property

As stated at the below link in another review, compatible is always the
first property.

Follow suit here to avoid copying incorrectly in the future.

Link: https://lore.kernel.org/netdev/[email protected]/T/#ma76b4116bbb9e49ee4bcf699e40935d80965b3f3
Reviewed-by: Konrad Dybcio <[email protected]>
Signed-off-by: Andrew Halaney <[email protected]>
---

Changes since v3:
* None
Changes since v2:
* Collect tags
Changes since v1:
* None

arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
index 339fea522509..029b23198b3a 100644
--- a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
+++ b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
@@ -352,19 +352,18 @@ &ethernet {
max-speed = <1000>;

mdio {
+ compatible = "snps,dwmac-mdio";
#address-cells = <0x1>;
#size-cells = <0x0>;

- compatible = "snps,dwmac-mdio";
-
/* Micrel KSZ9031RNZ PHY */
rgmii_phy: phy@7 {
+ compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x7>;

interrupt-parent = <&tlmm>;
interrupts-extended = <&tlmm 124 IRQ_TYPE_EDGE_FALLING>; /* phy intr */
device_type = "ethernet-phy";
- compatible = "ethernet-phy-ieee802.3-c22";
};
};
};
--
2.40.0

2023-05-01 21:27:02

by Andrew Halaney

[permalink] [raw]
Subject: [PATCH v4 2/4] arm64: dts: qcom: Make -cells decimal

The property logically makes sense in decimal, and is the standard used
elsewhere.

Suggested-by: Konrad Dybcio <[email protected]>
Signed-off-by: Andrew Halaney <[email protected]>
---

Changes since v3:
* Treat all of arm64/qcom at once (Krzysztof)
* Dropped Konrad's RB tag since the scope expanded
Changes since v2:
* Collect tags
Changes since v1:
* New patch (Konrad)

arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +-
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 14 +++++++-------
arch/arm64/boot/dts/qcom/msm8953.dtsi | 4 ++--
arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts | 4 ++--
arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 4 ++--
5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
index 9ff4e9d45065..ccaf8e57668a 100644
--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
@@ -571,7 +571,7 @@ intc: interrupt-controller@b000000 {
#address-cells = <2>;
#size-cells = <2>;
interrupt-controller;
- #interrupt-cells = <0x3>;
+ #interrupt-cells = <3>;
reg = <0x0 0x0b000000 0x0 0x1000>, /*GICD*/
<0x0 0x0b002000 0x0 0x1000>, /*GICC*/
<0x0 0x0b001000 0x0 0x1000>, /*GICH*/
diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
index 84e715aa4310..0bde1303bb9d 100644
--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -29,8 +29,8 @@ xo: xo {
};

cpus {
- #address-cells = <0x1>;
- #size-cells = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <0>;

CPU0: cpu@0 {
device_type = "cpu";
@@ -106,8 +106,8 @@ scm {
};

soc: soc {
- #address-cells = <0x1>;
- #size-cells = <0x1>;
+ #address-cells = <1>;
+ #size-cells = <1>;
ranges = <0 0 0 0xffffffff>;
compatible = "simple-bus";

@@ -321,9 +321,9 @@ tlmm: pinctrl@1000000 {
interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
gpio-ranges = <&tlmm 0 0 70>;
- #gpio-cells = <0x2>;
+ #gpio-cells = <2>;
interrupt-controller;
- #interrupt-cells = <0x2>;
+ #interrupt-cells = <2>;

serial_4_pins: serial4-state {
pins = "gpio23", "gpio24";
@@ -666,7 +666,7 @@ intc: interrupt-controller@b000000 {
#address-cells = <1>;
#size-cells = <1>;
interrupt-controller;
- #interrupt-cells = <0x3>;
+ #interrupt-cells = <3>;
reg = <0x0b000000 0x1000>, <0x0b002000 0x1000>;
ranges = <0 0xb00a000 0xffd>;

diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi b/arch/arm64/boot/dts/qcom/msm8953.dtsi
index 602cb188a635..eeebdab58c04 100644
--- a/arch/arm64/boot/dts/qcom/msm8953.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi
@@ -1505,8 +1505,8 @@ apcs: mailbox@b011000 {
timer@b120000 {
compatible = "arm,armv7-timer-mem";
reg = <0x0b120000 0x1000>;
- #address-cells = <0x01>;
- #size-cells = <0x01>;
+ #address-cells = <1>;
+ #size-cells = <1>;
ranges;

frame@b121000 {
diff --git a/arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts b/arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts
index 59702ba24f35..358827c2fbd3 100644
--- a/arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts
+++ b/arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts
@@ -27,8 +27,8 @@ &ethernet {
phy-handle = <&phy1>;
phy-mode = "rgmii";
mdio {
- #address-cells = <0x1>;
- #size-cells = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy1: phy@4 {
compatible = "ethernet-phy-ieee802.3-c22";
diff --git a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
index 029b23198b3a..ac52a8dfeba1 100644
--- a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
+++ b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
@@ -353,8 +353,8 @@ &ethernet {

mdio {
compatible = "snps,dwmac-mdio";
- #address-cells = <0x1>;
- #size-cells = <0x0>;
+ #address-cells = <1>;
+ #size-cells = <0>;

/* Micrel KSZ9031RNZ PHY */
rgmii_phy: phy@7 {
--
2.40.0

2023-05-01 21:27:03

by Andrew Halaney

[permalink] [raw]
Subject: [PATCH v4 3/4] arm64: dts: qcom: sa8155p-adp: Remove unneeded rgmii_phy information

Using interrupts-extended already indicates what the interrupt-parent
is, so drop the explicit interrupt-parent.

The comment about this being the phy-intr is not helpful either, since
this is the only interrupt in the phy node.

Suggested-by: Konrad Dybcio <[email protected]>
Reviewed-by: Konrad Dybcio <[email protected]>
Signed-off-by: Andrew Halaney <[email protected]>
---

Changes since v3:
* None
Changes since v2:
* Collect tags
Changes since v1:
* New patch (Konrad)

arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
index ac52a8dfeba1..b65e0203d783 100644
--- a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
+++ b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
@@ -361,8 +361,7 @@ rgmii_phy: phy@7 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x7>;

- interrupt-parent = <&tlmm>;
- interrupts-extended = <&tlmm 124 IRQ_TYPE_EDGE_FALLING>; /* phy intr */
+ interrupts-extended = <&tlmm 124 IRQ_TYPE_EDGE_FALLING>;
device_type = "ethernet-phy";
};
};
--
2.40.0

2023-05-01 21:27:50

by Andrew Halaney

[permalink] [raw]
Subject: [PATCH v4 4/4] arm64: dts: qcom: sa8155p-adp: Move mtl nodes into ethernet node

The mtl nodes aren't evaluated unless they're under the node with the
compatible. Move them so they're now evaluated in case future patchsets
modify them incorrectly.

An example of this can be seen in the link.

Link: https://lore.kernel.org/linux-arm-msm/20230414145844.wyg6pt623pzqwh5l@halaney-x13s/
Signed-off-by: Andrew Halaney <[email protected]>
---

Changes since v3:
* None
Changes since v2:
* New patch (me, after realizing this on another platform)

arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 46 ++++++++++++------------
1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
index b65e0203d783..02d04ce877c9 100644
--- a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
+++ b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts
@@ -47,29 +47,6 @@ vreg_s4a_1p8: smps4 {

vin-supply = <&vreg_3p3>;
};
-
- mtl_rx_setup: rx-queues-config {
- snps,rx-queues-to-use = <1>;
- snps,rx-sched-sp;
-
- queue0 {
- snps,dcb-algorithm;
- snps,map-to-dma-channel = <0x0>;
- snps,route-up;
- snps,priority = <0x1>;
- };
- };
-
- mtl_tx_setup: tx-queues-config {
- snps,tx-queues-to-use = <1>;
- snps,tx-sched-wrr;
-
- queue0 {
- snps,weight = <0x10>;
- snps,dcb-algorithm;
- snps,priority = <0x0>;
- };
- };
};

&apps_rsc {
@@ -365,6 +342,29 @@ rgmii_phy: phy@7 {
device_type = "ethernet-phy";
};
};
+
+ mtl_rx_setup: rx-queues-config {
+ snps,rx-queues-to-use = <1>;
+ snps,rx-sched-sp;
+
+ queue0 {
+ snps,dcb-algorithm;
+ snps,map-to-dma-channel = <0x0>;
+ snps,route-up;
+ snps,priority = <0x1>;
+ };
+ };
+
+ mtl_tx_setup: tx-queues-config {
+ snps,tx-queues-to-use = <1>;
+ snps,tx-sched-wrr;
+
+ queue0 {
+ snps,weight = <0x10>;
+ snps,dcb-algorithm;
+ snps,priority = <0x0>;
+ };
+ };
};

&qupv3_id_1 {
--
2.40.0

2023-05-02 07:05:43

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 2/4] arm64: dts: qcom: Make -cells decimal

On 01/05/2023 23:24, Andrew Halaney wrote:
> The property logically makes sense in decimal, and is the standard used
> elsewhere.
>
> Suggested-by: Konrad Dybcio <[email protected]>
> Signed-off-by: Andrew Halaney <[email protected]>
> ---
>
> Changes since v3:
> * Treat all of arm64/qcom at once (Krzysztof)
> * Dropped Konrad's RB tag since the scope expanded
> Changes since v2:
> * Collect tags
> Changes since v1:
> * New patch (Konrad)


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

Best regards,
Krzysztof

2023-05-04 11:34:17

by Brian Masney

[permalink] [raw]
Subject: Re: [PATCH v4 v0/4] sa8155p-adp devicetree ethernet cleanup

On Mon, May 01, 2023 at 04:24:42PM -0500, Andrew Halaney wrote:
> This series cleans up some devicetree conventions in sa8155p-adp based
> on feedback from other platforms.
>
> The hope is that by getting it right here, future contributors won't
> repeat the same mistakes as I did!

Reviewed-by: Brian Masney <[email protected]>

2023-05-19 17:06:54

by Andrew Halaney

[permalink] [raw]
Subject: Re: [PATCH v4 v0/4] sa8155p-adp devicetree ethernet cleanup

Hey Bjorn,

I think this one is ready to be picked up. Just a gentle reminder, I
almost forgot about it until I cleaned my inbox this morning :)

Thanks,
Andrew

On Mon, May 01, 2023 at 04:24:42PM -0500, Andrew Halaney wrote:
> This series cleans up some devicetree conventions in sa8155p-adp based
> on feedback from other platforms.
>
> The hope is that by getting it right here, future contributors won't
> repeat the same mistakes as I did!
>
> v3: https://lore.kernel.org/linux-arm-msm/[email protected]/
>
> Thanks,
> Andrew
>
> Andrew Halaney (4):
> arm64: dts: qcom: sa8155p-adp: Make compatible the first property
> arm64: dts: qcom: Make -cells decimal
> arm64: dts: qcom: sa8155p-adp: Remove unneeded rgmii_phy information
> arm64: dts: qcom: sa8155p-adp: Move mtl nodes into ethernet node
>
> arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +-
> arch/arm64/boot/dts/qcom/ipq8074.dtsi | 14 ++---
> arch/arm64/boot/dts/qcom/msm8953.dtsi | 4 +-
> arch/arm64/boot/dts/qcom/qcs404-evb-4000.dts | 4 +-
> arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 56 ++++++++++----------
> 5 files changed, 39 insertions(+), 41 deletions(-)
>
> --
> 2.40.0
>


2023-05-25 04:54:57

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v4 v0/4] sa8155p-adp devicetree ethernet cleanup

On Mon, 1 May 2023 16:24:42 -0500, Andrew Halaney wrote:
> This series cleans up some devicetree conventions in sa8155p-adp based
> on feedback from other platforms.
>
> The hope is that by getting it right here, future contributors won't
> repeat the same mistakes as I did!
>
> v3: https://lore.kernel.org/linux-arm-msm/[email protected]/
>
> [...]

Applied, thanks!

[1/4] arm64: dts: qcom: sa8155p-adp: Make compatible the first property
commit: eee7369de0c3cca7aacab3874663d460fb7a5b06
[2/4] arm64: dts: qcom: Make -cells decimal
commit: 674631c35f8670017d3bbd51a5b52f8b953f6816
[3/4] arm64: dts: qcom: sa8155p-adp: Remove unneeded rgmii_phy information
commit: 0ff4f6a380214fcf85a5b5ad64ff481d9bd1dfc6
[4/4] arm64: dts: qcom: sa8155p-adp: Move mtl nodes into ethernet node
commit: 93fe463652504bba298a68b56334729cdf92c0c3

Best regards,
--
Bjorn Andersson <[email protected]>