[PATCH] arm: dts: db410c/db820c: Fix SPMI addresses

Tom Rini trini at konsulko.com
Mon Jul 25 23:22:30 CEST 2022


On Wed, Jul 13, 2022 at 09:17:11PM +0200, Stephan Gerhold wrote:

> The Qualcomm device trees in U-Boot are currently not consistent with
> the upstream DTs used in the Linux kernel. While some bindings are
> similar to the official specification in the Linux kernel, several
> nodes have subtle differences, e.g. the "compatible"s or the exact
> specification of memory registers.
> 
> This means that some of the Qualcomm-related U-Boot drivers are not
> compatible with the Linux DT (and vice versa).
> 
> The SPMI node is one such example: the "core" region starts at
> 0x0200f000 in the upstream Linux MSM8916 DT, but in U-Boot it starts at
> 0x0200f800. The end result is normally the same, since the Linux SPMI
> driver simply adds the 0x800 internally.
> 
> However, commit f5a2d6b4b03a ("spmi: msm: add arbiter version 5
> support") imported this behavior into the U-Boot driver, without
> adjusting the DB410c/DB820c device trees. This means that the 0x800
> offset is now added twice, breaking all SPMI read/write operations:
> 
>   Failed to find PMIC pon node. Check device tree
>   Failed to find pm8916_gpios at c000 node.
>   USB init failed: -6
>   starting USB...
>   Bus ehci at 78d9000: Failed to find pm8916_gpios at c000 node.
>   probe failed, error -6
>   No working controllers found
> 
> While the mistake is strictly speaking in the spmi-msm driver, fix the
> issue by making the SPMI nodes in the DB410c/DB820c consistent with the
> upstream Linux DT instead.
> 
> Ideally we should even go a step further by fixing the remaining uses
> of custom bindings in the U-Boot drivers and moving to using the Linux
> DTs as-is. This would likely avoid such mistakes in the future and
> would also make the porting process much easier.
> 
> Cc: Dzmitry Sankouski <dsankouski at gmail.com>
> Fixes: f5a2d6b4b03a ("spmi: msm: add arbiter version 5 support")
> Signed-off-by: Stephan Gerhold <stephan at gerhold.net>
> Reviewed-by: Sumit Garg <sumit.garg at linaro.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220725/752bf952/attachment.sig>


More information about the U-Boot mailing list