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

Marek Vasut
2019-03-09T00:53:30Z

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 at ee100000: 0
> sd at 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!

>> [...]
>>
>>>>> [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
> [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 at 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 at 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 at 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 at 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 at 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.
>

--
Best regards,
Marek Vasut