ARM: dts: rmobile: Zap redundant USB/SDHI nodes on M3N
PATCH v2 1/1 ARM: dts: rmobile: Zap redundant USB/SDHI nodes on M3N
v2019.01 commit cbff9f80cedd ("ARM: dts: rmobile: Sync Gen3 DTs with Linux 4.19.6") made the sdhi/usb nodes available in r8a77965.dtsi.
Hence, remove the SDHI/USB nodes from r8a77965-u-boot.dtsi. This is equivalent to partially reverting below v2019.01 commits:
- f529bc551b6d ("ARM: dts: rmobile: Extract USB nodes on M3N")
- 830b94f76867 ("ARM: dts: rmobile: Extract SDHI nodes on M3N")
Duplicating the nodes from <soc>.dtsi to <soc>-u-boot.dtsi is obviously:
- not needed if no U-boot-specific changes are needed in those nodes.
- potentially dangerous/error-prone, since the duplicated properties override the properties originally defined in <soc>.dtsi. One possible consequence is that <soc>.dtsi is getting an update from Linux, while <soc>-u-boot.dtsi stays unchanged. In this situation, the obsolete property values from <soc>-u-boot.dtsi will take precedence masking some of the <soc>.dtsi updates, potentially leading to all kind of obscure issues.
Below is the dtdiff of r8a77965-salvator-x-u-boot.dtb (the only "user" of r8a77965-u-boot.dtsi) before and after the patch (slightly reformatted to avoid 'git am/apply' issues and to reduce the width).
What below output means is there is already a mismatch in some of SDHI/USB nodes between r8a77965.dtsi and r8a77965-u-boot.dtsi. Since no U-Boot customization is needed in SDHI/USB DT nodes, get rid of them in r8a77965-u-boot.dtsi.
$> dtdiff before-r8a77965-salvator-x-u-boot.dtb \
after-r8a77965-salvator-x-u-boot.dtb
--- /dev/fd/63 2019-03-09 12:57:40.877963983 +0100
+++ /dev/fd/62 2019-03-09 12:57:40.877963983 +0100
@@ -1471,7 +1471,7 @@
bus-width = <0x4>;
cd-gpios = <0x51 0xc 0x1>;
clocks = <0x6 0x1 0x13a>;
- compatible = "renesas,sdhi-r8a77965";
+ compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi";
interrupts = <0x0 0xa5 0x4>;
max-frequency = <0xc65d400>;
pinctrl-0 = <0x4d>;@@ -1492,7 +1492,7 @@
sd at ee120000 {
clocks = <0x6 0x1 0x139>;
- compatible = "renesas,sdhi-r8a77965";
+ compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi";
interrupts = <0x0 0xa6 0x4>;
max-frequency = <0xbebc200>;
power-domains = <0x1 0x20>;
@@ -1504,7 +1504,7 @@
sd at ee140000 {
bus-width = <0x8>;
clocks = <0x6 0x1 0x138>;
- compatible = "renesas,sdhi-r8a77965";
+ compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi";
fixed-emmc-driver-type = <0x1>;
interrupts = <0x0 0xa7 0x4>;
max-frequency = <0xbebc200>;
@@ -1526,7 +1526,7 @@
bus-width = <0x4>;
cd-gpios = <0x5a 0xf 0x1>;
clocks = <0x6 0x1 0x137>;
- compatible = "renesas,sdhi-r8a77965";
+ compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi";
interrupts = <0x0 0xa8 0x4>;
max-frequency = <0xc65d400>;
pinctrl-0 = <0x56>;@@ -1868,14 +1868,14 @@
usb-phy at ee0a0200 {
#phy-cells = <0x0>;
- clocks = <0x6 0x1 0x2be>;
+ clocks = <0x6 0x1 0x2bf>;
compatible = "renesas,usb2-phy-r8a77965", "renesas,rcar-gen3-usb2-phy";
phandle = <0x47>;
pinctrl-0 = <0x4c>;
pinctrl-names = "default";
power-domains = <0x1 0x20>;
reg = <0x0 0xee0a0200 0x0 0x700>;
- resets = <0x6 0x2be>;
+ resets = <0x6 0x2bf>;
status = "okay";
};---
v2:
- no code change
- reworked the description
--- arch/arm/dts/r8a77965-u-boot.dtsi | 99 ------------------------------- 1 file changed, 99 deletions(-)
arch/arm/dts/r8a77965-u-boot.dtsi +0 -99
@@ -19,103 +19,4 @@ bank-width = <2>; status = "disabled"; }; - - sdhi0: sd at ee100000 { - compatible = "renesas,sdhi-r8a77965"; - reg = <0 0xee100000 0 0x2000>; - interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cpg CPG_MOD 314>; - max-frequency = <200000000>; - power-domains = <&sysc 32>; - resets = <&cpg 314>; - status = "disabled"; - }; - - sdhi1: sd at ee120000 { - compatible = "renesas,sdhi-r8a77965"; - reg = <0 0xee120000 0 0x2000>; - interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cpg CPG_MOD 313>; - max-frequency = <200000000>; - power-domains = <&sysc 32>; - resets = <&cpg 313>; - status = "disabled"; - }; - - sdhi2: sd at ee140000 { - compatible = "renesas,sdhi-r8a77965"; - reg = <0 0xee140000 0 0x2000>; - interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cpg CPG_MOD 312>; - max-frequency = <200000000>; - power-domains = <&sysc 32>; - resets = <&cpg 312>; - status = "disabled"; - }; - - sdhi3: sd at ee160000 { - compatible = "renesas,sdhi-r8a77965"; - reg = <0 0xee160000 0 0x2000>; - interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cpg CPG_MOD 311>; - max-frequency = <200000000>; - power-domains = <&sysc 32>; - resets = <&cpg 311>; - status = "disabled"; - }; - - ehci0: usb at ee080100 { - compatible = "generic-ehci"; - reg = <0 0xee080100 0 0x100>; - interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cpg CPG_MOD 703>; - phys = <&usb2_phy0>; - phy-names = "usb"; - companion= <&ohci0>; - power-domains = <&sysc 32>; - resets = <&cpg 703>; - }; - - usb2_phy0: usb-phy at ee080200 { - compatible = "renesas,usb2-phy-r8a77965", - "renesas,rcar-gen3-usb2-phy"; - reg = <0 0xee080200 0 0x700>; - interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cpg CPG_MOD 703>; - power-domains = <&sysc 32>; - resets = <&cpg 703>; - #phy-cells = <0>; - }; - - ehci1: usb at ee0a0100 { - compatible = "generic-ehci"; - reg = <0 0xee0a0100 0 0x100>; - interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cpg CPG_MOD 702>; - phys = <&usb2_phy1>; - phy-names = "usb"; - companion= <&ohci1>; - power-domains = <&sysc 32>; - resets = <&cpg 702>; - }; - - usb2_phy1: usb-phy at ee0a0200 { - compatible = "renesas,usb2-phy-r8a77965", - "renesas,rcar-gen3-usb2-phy"; - reg = <0 0xee0a0200 0 0x700>; - clocks = <&cpg CPG_MOD 702>; - power-domains = <&sysc 32>; - resets = <&cpg 702>; - #phy-cells = <0>; - }; - - xhci0: usb at ee000000 { - compatible = "renesas,xhci-r8a77965", - "renesas,rcar-gen3-xhci"; - reg = <0 0xee000000 0 0xc00>; - interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&cpg CPG_MOD 328>; - power-domains = <&sysc 32>; - resets = <&cpg 328>; - }; };
Signature · 1 line
2.21.0
Marek Vasut
AppliedPATCH v2 1/1 ARM: dts: rmobile: Zap redundant USB/SDHI nodes on M3N
Quoted 69 lines · Eugeniu Rosca
v2019.01 commit
cbff9f80cedd("ARM: dts: rmobile: Sync Gen3 DTs with Linux 4.19.6") made the sdhi/usb nodes available inr8a77965.dtsi.Hence, remove the SDHI/USB nodes from
r8a77965-u-boot.dtsi. This is equivalent to partially reverting below v2019.01 commits:
-f529bc551b6d("ARM: dts: rmobile: Extract USB nodes on M3N")
-830b94f76867("ARM: dts: rmobile: Extract SDHI nodes on M3N")Duplicating the nodes from <soc>.dtsi to <soc>-u-boot.dtsi is obviously:
- not needed if no U-boot-specific changes are needed in those nodes.
- potentially dangerous/error-prone, since the duplicated properties override the properties originally defined in <soc>.dtsi. One possible consequence is that <soc>.dtsi is getting an update from Linux, while <soc>-u-boot.dtsi stays unchanged. In this situation, the obsolete property values from <soc>-u-boot.dtsi will take precedence masking some of the <soc>.dtsi updates, potentially leading to all kind of obscure issues.Below is the dtdiff of r8a77965-salvator-x-u-boot.dtb (the only "user" of
r8a77965-u-boot.dtsi) before and after the patch (slightly reformatted to avoid 'git am/apply' issues and to reduce the width).What below output means is there is already a mismatch in some of SDHI/USB nodes between
r8a77965.dtsiandr8a77965-u-boot.dtsi. Since no U-Boot customization is needed in SDHI/USB DT nodes, get rid of them inr8a77965-u-boot.dtsi.$> dtdiff before-r8a77965-salvator-x-u-boot.dtb \ after-r8a77965-salvator-x-u-boot.dtb --- /dev/fd/63 2019-03-09 12:57:40.877963983 +0100 +++ /dev/fd/62 2019-03-09 12:57:40.877963983 +0100 @@ -1471,7 +1471,7 @@ bus-width = <0x4>; cd-gpios = <0x51 0xc 0x1>; clocks = <0x6 0x1 0x13a>; - compatible = "renesas,sdhi-r8a77965"; + compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi"; interrupts = <0x0 0xa5 0x4>; max-frequency = <0xc65d400>; pinctrl-0 = <0x4d>;@@ -1492,7 +1492,7 @@
sd at ee120000 { clocks = <0x6 0x1 0x139>; - compatible = "renesas,sdhi-r8a77965"; + compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi"; interrupts = <0x0 0xa6 0x4>; max-frequency = <0xbebc200>; power-domains = <0x1 0x20>; @@ -1504,7 +1504,7 @@ sd at ee140000 { bus-width = <0x8>; clocks = <0x6 0x1 0x138>; - compatible = "renesas,sdhi-r8a77965"; + compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi"; fixed-emmc-driver-type = <0x1>; interrupts = <0x0 0xa7 0x4>; max-frequency = <0xbebc200>; @@ -1526,7 +1526,7 @@ bus-width = <0x4>; cd-gpios = <0x5a 0xf 0x1>; clocks = <0x6 0x1 0x137>; - compatible = "renesas,sdhi-r8a77965"; + compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi"; interrupts = <0x0 0xa8 0x4>; max-frequency = <0xc65d400>; pinctrl-0 = <0x56>;@@ -1868,14 +1868,14 @@
Quoted 14 lines
usb-phy at ee0a0200 {
#phy-cells = <0x0>;
- clocks = <0x6 0x1 0x2be>;
+ clocks = <0x6 0x1 0x2bf>;
compatible = "renesas,usb2-phy-r8a77965", "renesas,rcar-gen3-usb2-phy";
phandle = <0x47>;
pinctrl-0 = <0x4c>;
pinctrl-names = "default";
power-domains = <0x1 0x20>;
reg = <0x0 0xee0a0200 0x0 0x700>;
- resets = <0x6 0x2be>;
+ resets = <0x6 0x2bf>;
status = "okay";
};Applied, thanks.
Signature · 2 lines
Best regards, Marek Vasut
PATCH v2 1/1 ARM: dts: rmobile: Zap redundant USB/SDHI nodes on M3N
On Sat, Mar 09, 2019 at 05:58:03PM +0100, Marek Vasut wrote:
[..]
Quoted 5 lines
Applied, thanks.
Signature · 2 lines
Best regards, Marek Vasut
JFTR, apparently on a parallel track, Renesas pushed same changes to rcar-3.9.3.rc2 via:
- https://github.com/renesas-rcar/u-boot/commit/6013d5005e5b ("ARM:
dts: rmobile: Fix duplicate definition SDHI on M3N")
- https://github.com/renesas-rcar/u-boot/commit/fcb60eaeca09 ("ARM:
dts: rmobile: Fix duplicate definition USB on M3N")
Best regards,
Eugeniu.
PATCH v2 1/1 ARM: dts: rmobile: Zap redundant USB/SDHI nodes on M3N
Quoted 9 lines · Eugeniu Rosca
On Sat, Mar 09, 2019 at 05:58:03PM +0100, Marek Vasut wrote:
[..]Quoted 5 lines
Applied, thanks.
Signature · 2 lines
Best regards, Marek Vasut
Quoted 6 lines
JFTR, apparently on a parallel track, Renesas pushed same changes to rcar-3.9.3.rc2 via:
- https://github.com/renesas-rcar/u-boot/commit/6013d5005e5b ("ARM:
dts: rmobile: Fix duplicate definition SDHI on M3N")
- https://github.com/renesas-rcar/u-boot/commit/fcb60eaeca09 ("ARM:
dts: rmobile: Fix duplicate definition USB on M3N")
Thanks for the heads up. I think all should be in order with your patch, right ?
Signature · 2 lines
Best regards, Marek Vasut
PATCH v2 1/1 ARM: dts: rmobile: Zap redundant USB/SDHI nodes on M3N
Quoted 17 lines · Marek Vasut
Quoted 9 lines · Eugeniu Rosca
On Sat, Mar 09, 2019 at 05:58:03PM +0100, Marek Vasut wrote:
[..]Quoted 5 lines
Applied, thanks.
Signature · 2 lines
Best regards, Marek VasutQuoted 6 lines
JFTR, apparently on a parallel track, Renesas pushed same changes to rcar-3.9.3.rc2 via:
- https://github.com/renesas-rcar/u-boot/commit/6013d5005e5b ("ARM:
dts: rmobile: Fix duplicate definition SDHI on M3N")
- https://github.com/renesas-rcar/u-boot/commit/fcb60eaeca09 ("ARM:
dts: rmobile: Fix duplicate definition USB on M3N")
Quoted 2 lines
Thanks for the heads up. I think all should be in order with your patch, right ?
The mentioned rcar-3.9.3.rc2 commits are equal (if squashed) to this patch, which means Renesas went through the same problems internally and fixed them the same way.
No, I don't have any concerns about my patch.
Best regards,
Eugeniu.