[U-Boot] [PATCH] ARM: dts: rmobile: Zap redundant USB/SDHI nodes on M3N

Marek Vasut
2019-03-07T20:14:35Z

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 at ee100000: 0
> sd at 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].
>
>> [1] https://github.com/marex/u-boot-sh/tree/m3nulcb-v1
> [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 at ee100000: 0, sd at ee140000: 1, sd at ee160000: 2
Loading Environment from MMC... OK
In: serial at e6e88000
Out: serial at e6e88000
Err: serial at e6e88000
Net: eth0: ethernet at e6800000
Hit any key to stop autoboot: 0
=>
=> mmc l
sd at ee100000: 0
sd at ee140000: 1 (eMMC)
sd at 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 at e6050000
gpio 1 [ ] rcar-gpio | |-- gpio at e6051000
gpio 2 [ + ] rcar-gpio | |-- gpio at e6052000
gpio 3 [ + ] rcar-gpio | |-- gpio at e6053000
gpio 4 [ ] rcar-gpio | |-- gpio at e6054000
gpio 5 [ + ] rcar-gpio | |-- gpio at e6055000
gpio 6 [ ] rcar-gpio | |-- gpio at e6055400
gpio 7 [ ] rcar-gpio | |-- gpio at e6055800
pinctrl 0 [ + ] sh_pfc_pinctrl | |--
pin-controller at 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 at e6150000
i2c 0 [ ] iic_rcar | |-- i2c at e60b0000
eth 0 [ + ] ravb | |-- ethernet at e6800000
serial 0 [ + ] serial_sh | |-- serial at e6e88000
usb 0 [ ] xhci_rcar | |-- usb at ee000000
usb 1 [ ] ehci_generic | |-- usb at ee080100
usb 2 [ ] ehci_generic | |-- usb at ee0a0100
phy 0 [ ] rcar-gen3-phy | |-- usb-phy at ee080200
phy 1 [ ] rcar-gen3-phy | |-- usb-phy at ee0a0200
mmc 0 [ + ] renesas-sdhi | |-- sd at ee100000
blk 0 [ ] mmc_blk | | `-- sd at ee100000.blk
mmc 1 [ + ] renesas-sdhi | |-- sd at ee140000
blk 1 [ + ] mmc_blk | | `-- sd at ee140000.blk
mmc 2 [ + ] renesas-sdhi | |-- sd at ee160000
blk 2 [ ] mmc_blk | | `-- sd at ee160000.blk
mtd 0 [ + ] rpc_hf | `-- rpc at 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

--
Best regards,
Marek Vasut