[U-Boot] [PATCH] 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")
Not doing that results in MMC devices being undetected on M3NULCB:
=> mmc list No MMC device available
Signed-off-by: Eugeniu Rosca erosca@de.adit-jv.com --- arch/arm/dts/r8a77965-u-boot.dtsi | 99 ------------------------------- 1 file changed, 99 deletions(-)
diff --git a/arch/arm/dts/r8a77965-u-boot.dtsi b/arch/arm/dts/r8a77965-u-boot.dtsi index cbd29b3aed68..ca80ef8f29ee 100644 --- a/arch/arm/dts/r8a77965-u-boot.dtsi +++ b/arch/arm/dts/r8a77965-u-boot.dtsi @@ -19,103 +19,4 @@ bank-width = <2>; status = "disabled"; }; - - sdhi0: sd@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@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@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@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@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@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@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@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@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>; - }; };

On 3/6/19 6:55 PM, Eugeniu Rosca wrote:
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")
Not doing that results in MMC devices being undetected on M3NULCB:
M3N ULCB is not supported yet, so how can this be broken ?
I am planning to add support for it [1], however that is work in progress and the patches still need more work. Can you rebase your changes on top of that branch and if you have M3N ULCB, test it ? The branch also contains sync with Linux 5.0 DTs, however it is also work in progress and there's likely to be breakage.
[1] https://github.com/marex/u-boot-sh/tree/m3nulcb-v1
=> mmc list No MMC device available
Signed-off-by: Eugeniu Rosca erosca@de.adit-jv.com
arch/arm/dts/r8a77965-u-boot.dtsi | 99 ------------------------------- 1 file changed, 99 deletions(-)
diff --git a/arch/arm/dts/r8a77965-u-boot.dtsi b/arch/arm/dts/r8a77965-u-boot.dtsi index cbd29b3aed68..ca80ef8f29ee 100644 --- a/arch/arm/dts/r8a77965-u-boot.dtsi +++ b/arch/arm/dts/r8a77965-u-boot.dtsi @@ -19,103 +19,4 @@ bank-width = <2>; status = "disabled"; };
- sdhi0: sd@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@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@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@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@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@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@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@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@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>;
- };
};

Hi Marek,
On Thu, Mar 07, 2019 at 01:53:29AM +0100, Marek Vasut wrote:
On 3/6/19 6:55 PM, Eugeniu Rosca wrote:
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")
Not doing that results in MMC devices being undetected on M3NULCB:
M3N ULCB is not supported yet, so how can this be broken ?
My description is not about the mainline status of M3NULCB, but rather about why the patch was sent to you. Most likely the same issue occurs on r8a77965-salvator-x{s} (which I don't have at hand), since their DTS also include r8a77965-u-boot.dtsi.
Common sense tells that you should not factor out DT nodes to <soc>_u-boot.dtsi when they are properly defined and supported in <soc>.dtsi, so may I hope for a second review?
I am planning to add support for it [1], however that is work in progress and the patches still need more work. Can you rebase your changes on top of that branch and if you have M3N ULCB, test it ? The branch also contains sync with Linux 5.0 DTs, however it is also work in progress and there's likely to be breakage.
Unfortunately, [1] doesn't compile [2].
What I can tell you is that running rcar-3.9.3.rc1 U-Boot on M3NULCB results in:
* w/o the fix: => mmc list No MMC device available
* with the fix: => mmc list sd@ee100000: 0 sd@ee140000: 1 (eMMC)
Your branch [1] doesn't touch arch/arm/dts/r8a77965-u-boot.dtsi, so I expect it exhibits the same issue as Renesas RC [3].
[2] https://gist.github.com/erosca/9d2dd0ea16fb9f208effc89226e2b27f [3] https://github.com/renesas-rcar/u-boot/tree/v2018.09/rcar-3.9.3.rc1
Thanks, Eugeniu.

On 3/7/19 8:20 PM, Eugeniu Rosca wrote:
Hi Marek,
Hi,
On Thu, Mar 07, 2019 at 01:53:29AM +0100, Marek Vasut wrote:
On 3/6/19 6:55 PM, Eugeniu Rosca wrote:
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")
Not doing that results in MMC devices being undetected on M3NULCB:
M3N ULCB is not supported yet, so how can this be broken ?
My description is not about the mainline status of M3NULCB, but rather about why the patch was sent to you. Most likely the same issue occurs on r8a77965-salvator-x{s} (which I don't have at hand), since their DTS also include r8a77965-u-boot.dtsi.
I does not, see log at the end. In fact, with this patch applied, the DT for r8a77965-salvator-x is the same as without this patch.
Common sense tells that you should not factor out DT nodes to <soc>_u-boot.dtsi when they are properly defined and supported in <soc>.dtsi, so may I hope for a second review?
I am reluctant to queue it up for this release, since we're already past RC3 and this is not fixing anything. Given that it doesn't break anything either and might improve situation for others, I'll think about queueing it up though.
However, I am not happy with the commit message explanation, for one because we do not support M3N ULCB and also because this doesn't fix a bug on the M3N S-XS either, so ultimately this is a cleanup. Can you reword the commit message in such a way ?
I think I know what your problem with the M3N ULCB is, the sdhiX nodes in r8a77965-u-boot.dtsi add status = "disabled" property, and in your patched U-Boot it gets somehow mixed into the final DT, so your SDHIs are actually disabled on the DT level.
I am planning to add support for it [1], however that is work in progress and the patches still need more work. Can you rebase your changes on top of that branch and if you have M3N ULCB, test it ? The branch also contains sync with Linux 5.0 DTs, however it is also work in progress and there's likely to be breakage.
Unfortunately, [1] doesn't compile [2].
OK, that branch clearly needs more work.
What I can tell you is that running rcar-3.9.3.rc1 U-Boot on M3NULCB results in:
- w/o the fix:
=> mmc list No MMC device available
- with the fix:
=> mmc list sd@ee100000: 0 sd@ee140000: 1 (eMMC)
Wait, is this patch against the renesas BSP U-Boot ?
Your branch [1] doesn't touch arch/arm/dts/r8a77965-u-boot.dtsi, so I expect it exhibits the same issue as Renesas RC [3].
[2] https://gist.github.com/erosca/9d2dd0ea16fb9f208effc89226e2b27f [3] https://github.com/renesas-rcar/u-boot/tree/v2018.09/rcar-3.9.3.rc1
Thanks, Eugeniu.
INFO: ARM GICv2 driver initialized NOTICE: BL2: R-Car Gen3 Initial Program Loader(CA57) Rev.2.0.1 NOTICE: BL2: PRR is R-Car M3N Ver.1.0 NOTICE: BL2: Board is Salvator-XS Rev.1.0 NOTICE: BL2: Boot device is HyperFlash(80MHz) NOTICE: BL2: LCM state is CM NOTICE: AVS setting succeeded. DVFS_SetVID=0x53 NOTICE: BL2: DDR1600(rev.0.35rc01) NOTICE: BL2: [COLD_BOOT] NOTICE: BL2: DRAM Split is OFF NOTICE: BL2: QoS is default setting(rev.0.08) NOTICE: BL2: DRAM refresh interval 1.95 usec NOTICE: BL2: CH0: 400000000 - 47fffffff, 2 GiB NOTICE: BL2: FDT at 0xe6322d00 NOTICE: BL2: v2.0(release):v2.0-958-gef1e53829 NOTICE: BL2: Built : 16:54:24, Mar 2 2019 NOTICE: BL2: Normal boot INFO: BL2: Doing platform setup INFO: BL2: Loading image id 3 NOTICE: BL2: dst=0xe6321000 src=0x8180000 len=512(0x200) NOTICE: BL2: dst=0x43f00000 src=0x8180400 len=6144(0x1800) WARNING: r-car ignoring the BL31 size from certificate,using RCAR_TRUSTED_SRAM_SIZE instead INFO: Loading image id=3 at address 0x44000000 NOTICE: rcar_file_len: len: 0x0003e000 NOTICE: BL2: dst=0x44000000 src=0x81c0000 len=253952(0x3e000) INFO: Image id=3 loaded: 0x44000000 - 0x4403e000 INFO: BL2: Loading image id 4 INFO: Loading image id=4 at address 0x44100000 NOTICE: rcar_file_len: len: 0x00100000 NOTICE: BL2: dst=0x44100000 src=0x8200000 len=1048576(0x100000) INFO: Image id=4 loaded: 0x44100000 - 0x44200000 INFO: BL2: Loading image id 5 INFO: Loading image id=5 at address 0x50000000 NOTICE: rcar_file_len: len: 0x00100000 NOTICE: BL2: dst=0x50000000 src=0x8640000 len=1048576(0x100000) INFO: Image id=5 loaded: 0x50000000 - 0x50100000 NOTICE: BL2: Booting BL31 INFO: Entry point address = 0x44000000 INFO: SPSR = 0x3cd VERBOSE: Argument #0 = 0xe63213f8 VERBOSE: Argument #1 = 0x0 VERBOSE: Argument #2 = 0x0 VERBOSE: Argument #3 = 0x0 VERBOSE: Argument #4 = 0x0 VERBOSE: Argument #5 = 0x0 VERBOSE: Argument #6 = 0x0 VERBOSE: Argument #7 = 0x0
U-Boot 2019.04-rc3-00029-g6929486ef7 (Mar 07 2019 - 20:53:12 +0100)
CPU: Renesas Electronics R8A77965 rev 1.0 Model: Renesas Salvator-X board based on r8a77965 DRAM: 1.9 GiB Flash: 64 MiB MMC: sd@ee100000: 0, sd@ee140000: 1, sd@ee160000: 2 Loading Environment from MMC... OK In: serial@e6e88000 Out: serial@e6e88000 Err: serial@e6e88000 Net: eth0: ethernet@e6800000 Hit any key to stop autoboot: 0 => => mmc l sd@ee100000: 0 sd@ee140000: 1 (eMMC) sd@ee160000: 2 => dm t Class Index Probed Driver Name ----------------------------------------------------------- root 0 [ + ] root_driver root_driver clk 0 [ ] fixed_rate_clock |-- audio_clk_a clk 1 [ ] fixed_rate_clock |-- audio_clk_b clk 2 [ ] fixed_rate_clock |-- audio_clk_c clk 3 [ ] fixed_rate_clock |-- can clk 4 [ + ] fixed_rate_clock |-- extal clk 5 [ + ] fixed_rate_clock |-- extalr clk 6 [ ] fixed_rate_clock |-- pcie_bus firmware 0 [ ] psci |-- psci clk 7 [ ] fixed_rate_clock |-- scif simple_bus 0 [ + ] generic_simple_bus |-- soc gpio 0 [ ] rcar-gpio | |-- gpio@e6050000 gpio 1 [ ] rcar-gpio | |-- gpio@e6051000 gpio 2 [ + ] rcar-gpio | |-- gpio@e6052000 gpio 3 [ + ] rcar-gpio | |-- gpio@e6053000 gpio 4 [ ] rcar-gpio | |-- gpio@e6054000 gpio 5 [ + ] rcar-gpio | |-- gpio@e6055000 gpio 6 [ ] rcar-gpio | |-- gpio@e6055400 gpio 7 [ ] rcar-gpio | |-- gpio@e6055800 pinctrl 0 [ + ] sh_pfc_pinctrl | |-- pin-controller@e6060000 pinconfig 0 [ + ] pinconfig | | |-- avb pinconfig 1 [ ] pinconfig | | | |-- mux pinconfig 2 [ ] pinconfig | | | |-- pins_mdio pinconfig 3 [ ] pinconfig | | | `-- pins_mii_tx pinconfig 4 [ ] pinconfig | | |-- du pinconfig 5 [ ] pinconfig | | |-- hscif1 pinconfig 6 [ ] pinconfig | | |-- i2c2 pinconfig 7 [ ] pinconfig | | |-- irq0 pinconfig 8 [ ] pinconfig | | |-- pwm1 pinconfig 9 [ ] pinconfig | | |-- scif1 pinconfig 10 [ + ] pinconfig | | |-- scif2 pinconfig 11 [ + ] pinconfig | | |-- scif_clk pinconfig 12 [ + ] pinconfig | | |-- sd0 pinconfig 13 [ ] pinconfig | | |-- sd0_uhs pinconfig 14 [ + ] pinconfig | | |-- sd2 pinconfig 15 [ + ] pinconfig | | |-- sd2_uhs pinconfig 16 [ + ] pinconfig | | |-- sd3 pinconfig 17 [ ] pinconfig | | |-- sd3_uhs pinconfig 18 [ ] pinconfig | | |-- sound pinconfig 19 [ ] pinconfig | | |-- sound_clk pinconfig 20 [ ] pinconfig | | |-- usb0 pinconfig 21 [ ] pinconfig | | |-- usb1 pinconfig 22 [ ] pinconfig | | | |-- mux pinconfig 23 [ ] pinconfig | | | |-- ovc pinconfig 24 [ ] pinconfig | | | `-- pwen pinconfig 25 [ ] pinconfig | | `-- usb30 clk 8 [ + ] clk_r8a7796 | |-- clock-controller@e6150000 i2c 0 [ ] iic_rcar | |-- i2c@e60b0000 eth 0 [ + ] ravb | |-- ethernet@e6800000 serial 0 [ + ] serial_sh | |-- serial@e6e88000 usb 0 [ ] xhci_rcar | |-- usb@ee000000 usb 1 [ ] ehci_generic | |-- usb@ee080100 usb 2 [ ] ehci_generic | |-- usb@ee0a0100 phy 0 [ ] rcar-gen3-phy | |-- usb-phy@ee080200 phy 1 [ ] rcar-gen3-phy | |-- usb-phy@ee0a0200 mmc 0 [ + ] renesas-sdhi | |-- sd@ee100000 blk 0 [ ] mmc_blk | | `-- sd@ee100000.blk mmc 1 [ + ] renesas-sdhi | |-- sd@ee140000 blk 1 [ + ] mmc_blk | | `-- sd@ee140000.blk mmc 2 [ + ] renesas-sdhi | |-- sd@ee160000 blk 2 [ ] mmc_blk | | `-- sd@ee160000.blk mtd 0 [ + ] rpc_hf | `-- rpc@0xee200000 clk 9 [ ] fixed_rate_clock |-- usb3s0 clk 10 [ ] fixed_rate_clock |-- usb_extal clk 11 [ ] fixed_rate_clock |-- audio-clkout regulator 0 [ + ] fixed regulator |-- regulator0 regulator 1 [ + ] fixed regulator |-- regulator1 regulator 2 [ ] fixed regulator |-- regulator2 regulator 3 [ ] fixed regulator |-- regulator-vbus0-usb2 regulator 4 [ ] fixed regulator |-- regulator-vcc-sdhi0 regulator 5 [ + ] gpio regulator |-- regulator-vccq-sdhi0 regulator 6 [ ] fixed regulator |-- regulator-vcc-sdhi3 regulator 7 [ + ] gpio regulator |-- regulator-vccq-sdhi3 clk 12 [ ] fixed_rate_clock |-- x12 clk 13 [ ] fixed_rate_clock |-- x21-clock clk 14 [ ] fixed_rate_clock |-- x22-clock clk 15 [ ] fixed_rate_clock `-- x23-clock

On 3/7/19 9:14 PM, Marek Vasut wrote:
On 3/7/19 8:20 PM, Eugeniu Rosca wrote:
Hi Marek,
Hi,
[...]
I am planning to add support for it [1], however that is work in progress and the patches still need more work. Can you rebase your changes on top of that branch and if you have M3N ULCB, test it ? The branch also contains sync with Linux 5.0 DTs, however it is also work in progress and there's likely to be breakage.
Unfortunately, [1] doesn't compile [2].
OK, that branch clearly needs more work.
[1] should now compile, can you give it a try on M3N ULCB ?
[...]
[2] https://gist.github.com/erosca/9d2dd0ea16fb9f208effc89226e2b27f [3] https://github.com/renesas-rcar/u-boot/tree/v2018.09/rcar-3.9.3.rc1
[...]

Hi Marek,
On Fri, Mar 08, 2019 at 03:09:32AM +0100, Marek Vasut wrote:
On 3/7/19 9:14 PM, Marek Vasut wrote:
On 3/7/19 8:20 PM, Eugeniu Rosca wrote:
Hi Marek,
Hi,
[...]
I am planning to add support for it [1], however that is work in progress and the patches still need more work. Can you rebase your changes on top of that branch and if you have M3N ULCB, test it ? The branch also contains sync with Linux 5.0 DTs, however it is also work in progress and there's likely to be breakage.
Unfortunately, [1] doesn't compile [2].
OK, that branch clearly needs more work.
[1] should now compile, can you give it a try on M3N ULCB ?
[1] builds fine, but doesn't boot on my M3N-ES1.1-ULCB (no console output after exiting ATF). JFTR, my board has the following serial numbers imprinted on the PCB: - No. 20008 - RTP0RC77965SKBX010SA00
Doing some bisecting, I am able to boot the ULCB target after reverting below commits on your branch (so the issue looks PFC-related?): - 9ae6283956a6 ("pinctrl: renesas: Synchronize Gen3 tables with Linux 5.0") - 6c987dc822df ("pinctrl: renesas: Add R8A77965 pin control tables")
With the above reverts, I am able to boot the target and see the MMC devices in U-Boot: => mmc list sd@ee100000: 0 sd@ee140000: 1 (eMMC)
So, strictly speaking, my patch is not needed in the context of [1]. However, comparing the DT blobs before and after applying my patch to [1] using dtdiff [4], I get some interesting results (see [5]).
What this tells me is that the duplicated SDHI/USB nodes from r8a77965-u-boot.dtsi are not fully in sync with r8a77965.dtsi, which can lead to all kind of obscure issues. To avoid those issues, the redundant nodes has to be removed, just as my patch does, with slight modifications in the description of the patch.
[...]
[2] https://gist.github.com/erosca/9d2dd0ea16fb9f208effc89226e2b27f [3] https://github.com/renesas-rcar/u-boot/tree/v2018.09/rcar-3.9.3.rc1
[4] https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tree/dtdiff [5] dtdiff r8a77965-m3nulcb-u-boot-old.dtb r8a77965-m3nulcb-u-boot-new.dtb --- /dev/fd/63 2019-03-08 14:26:43.739829001 +0100 +++ /dev/fd/62 2019-03-08 14:26:43.743829067 +0100 @@ -1425,7 +1425,7 @@ bus-width = <0x4>; cd-gpios = <0x4e 0xc 0x1>; clocks = <0x3 0x1 0x13a>; - compatible = "renesas,sdhi-r8a77965"; + compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi"; interrupts = <0x0 0xa5 0x4>; max-frequency = <0xc65d400>; pinctrl-0 = <0x4a>; @@ -1445,7 +1445,7 @@
sd@ee120000 { clocks = <0x3 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>; @@ -1457,7 +1457,7 @@ sd@ee140000 { bus-width = <0x8>; clocks = <0x3 0x1 0x138>; - compatible = "renesas,sdhi-r8a77965"; + compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi"; interrupts = <0x0 0xa7 0x4>; max-frequency = <0xbebc200>; mmc-hs200-1_8v; @@ -1476,7 +1476,7 @@
sd@ee160000 { clocks = <0x3 0x1 0x137>; - compatible = "renesas,sdhi-r8a77965"; + compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi"; interrupts = <0x0 0xa8 0x4>; max-frequency = <0xbebc200>; power-domains = <0x1 0x20>; @@ -1952,13 +1952,13 @@
usb-phy@ee080200 { #phy-cells = <0x0>; - clocks = <0x3 0x1 0x2bf>; + clocks = <0x3 0x1 0x2bf 0x3 0x1 0x2c0>; compatible = "renesas,usb2-phy-r8a77965", "renesas,rcar-gen3-usb2-phy"; interrupts = <0x0 0x6c 0x4>; phandle = <0x1b>; power-domains = <0x1 0x20>; reg = <0x0 0xee080200 0x0 0x700>; - resets = <0x3 0x2bf>; + resets = <0x3 0x2bf 0x3 0x2c0>; status = "disabled"; };
@@ -2024,7 +2024,7 @@ };
usb@ee080100 { - clocks = <0x3 0x1 0x2bf>; + clocks = <0x3 0x1 0x2bf 0x3 0x1 0x2c0>; companion = <0x47>; compatible = "generic-ehci"; interrupts = <0x0 0x6c 0x4>; @@ -2032,7 +2032,7 @@ phys = <0x1b>; power-domains = <0x1 0x20>; reg = <0x0 0xee080100 0x0 0x100>; - resets = <0x3 0x2bf>; + resets = <0x3 0x2bf 0x3 0x2c0>; status = "disabled"; };
[...]
Best regards, Marek Vasut
Best regards, Eugeniu.

On 3/8/19 3:35 PM, Eugeniu Rosca wrote:
Hi Marek,
Hi,
On Fri, Mar 08, 2019 at 03:09:32AM +0100, Marek Vasut wrote:
On 3/7/19 9:14 PM, Marek Vasut wrote:
On 3/7/19 8:20 PM, Eugeniu Rosca wrote:
Hi Marek,
Hi,
[...]
I am planning to add support for it [1], however that is work in progress and the patches still need more work. Can you rebase your changes on top of that branch and if you have M3N ULCB, test it ? The branch also contains sync with Linux 5.0 DTs, however it is also work in progress and there's likely to be breakage.
Unfortunately, [1] doesn't compile [2].
OK, that branch clearly needs more work.
[1] should now compile, can you give it a try on M3N ULCB ?
[1] builds fine, but doesn't boot on my M3N-ES1.1-ULCB (no console output after exiting ATF). JFTR, my board has the following serial numbers imprinted on the PCB:
- No. 20008
- RTP0RC77965SKBX010SA00
Doing some bisecting, I am able to boot the ULCB target after reverting below commits on your branch (so the issue looks PFC-related?):
- 9ae6283956a6 ("pinctrl: renesas: Synchronize Gen3 tables with Linux 5.0")
- 6c987dc822df ("pinctrl: renesas: Add R8A77965 pin control tables")
With the above reverts, I am able to boot the target and see the MMC devices in U-Boot: => mmc list sd@ee100000: 0 sd@ee140000: 1 (eMMC)
So, strictly speaking, my patch is not needed in the context of [1]. However, comparing the DT blobs before and after applying my patch to [1] using dtdiff [4], I get some interesting results (see [5]).
What this tells me is that the duplicated SDHI/USB nodes from r8a77965-u-boot.dtsi are not fully in sync with r8a77965.dtsi, which can lead to all kind of obscure issues. To avoid those issues, the redundant nodes has to be removed, just as my patch does, with slight modifications in the description of the patch.
Sounds good. Can you reword the patch and submit a V2 then ?
Thanks!
[...]
[2] https://gist.github.com/erosca/9d2dd0ea16fb9f208effc89226e2b27f [3] https://github.com/renesas-rcar/u-boot/tree/v2018.09/rcar-3.9.3.rc1
[4] https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tree/dtdiff [5] dtdiff r8a77965-m3nulcb-u-boot-old.dtb r8a77965-m3nulcb-u-boot-new.dtb --- /dev/fd/63 2019-03-08 14:26:43.739829001 +0100 +++ /dev/fd/62 2019-03-08 14:26:43.743829067 +0100 @@ -1425,7 +1425,7 @@ bus-width = <0x4>; cd-gpios = <0x4e 0xc 0x1>; clocks = <0x3 0x1 0x13a>;
compatible = "renesas,sdhi-r8a77965";
compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi"; interrupts = <0x0 0xa5 0x4>; max-frequency = <0xc65d400>; pinctrl-0 = <0x4a>;
@@ -1445,7 +1445,7 @@
sd@ee120000 { clocks = <0x3 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>;
@@ -1457,7 +1457,7 @@ sd@ee140000 { bus-width = <0x8>; clocks = <0x3 0x1 0x138>;
compatible = "renesas,sdhi-r8a77965";
compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi"; interrupts = <0x0 0xa7 0x4>; max-frequency = <0xbebc200>; mmc-hs200-1_8v;
@@ -1476,7 +1476,7 @@
sd@ee160000 { clocks = <0x3 0x1 0x137>;
compatible = "renesas,sdhi-r8a77965";
compatible = "renesas,sdhi-r8a77965", "renesas,rcar-gen3-sdhi"; interrupts = <0x0 0xa8 0x4>; max-frequency = <0xbebc200>; power-domains = <0x1 0x20>;
@@ -1952,13 +1952,13 @@
usb-phy@ee080200 { #phy-cells = <0x0>;
clocks = <0x3 0x1 0x2bf>;
clocks = <0x3 0x1 0x2bf 0x3 0x1 0x2c0>; compatible = "renesas,usb2-phy-r8a77965", "renesas,rcar-gen3-usb2-phy"; interrupts = <0x0 0x6c 0x4>; phandle = <0x1b>; power-domains = <0x1 0x20>; reg = <0x0 0xee080200 0x0 0x700>;
resets = <0x3 0x2bf>;
};resets = <0x3 0x2bf 0x3 0x2c0>; status = "disabled";
@@ -2024,7 +2024,7 @@ };
usb@ee080100 {
clocks = <0x3 0x1 0x2bf>;
clocks = <0x3 0x1 0x2bf 0x3 0x1 0x2c0>; companion = <0x47>; compatible = "generic-ehci"; interrupts = <0x0 0x6c 0x4>;
@@ -2032,7 +2032,7 @@ phys = <0x1b>; power-domains = <0x1 0x20>; reg = <0x0 0xee080100 0x0 0x100>;
resets = <0x3 0x2bf>;
};resets = <0x3 0x2bf 0x3 0x2c0>; status = "disabled";
[...]
Best regards, Marek Vasut
Best regards, Eugeniu.

On Sat, Mar 09, 2019 at 01:53:30AM +0100, Marek Vasut wrote: [..]
Sounds good. Can you reword the patch and submit a V2 then ?
Submitted https://patchwork.ozlabs.org/patch/1053837/
Best regards, Eugeniu.

On 3/9/19 2:21 PM, Eugeniu Rosca wrote:
On Sat, Mar 09, 2019 at 01:53:30AM +0100, Marek Vasut wrote: [..]
Sounds good. Can you reword the patch and submit a V2 then ?
Thanks, I'll review it ASAP
participants (3)
-
Eugeniu Rosca
-
Eugeniu Rosca
-
Marek Vasut