u-boot/arch
Stephan Gerhold afc13335a5 arm: dts: db410c/db820c: Fix SPMI addresses
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 f5a2d6b4b0 ("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@c000 node.
  USB init failed: -6
  starting USB...
  Bus ehci@78d9000: Failed to find pm8916_gpios@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@gmail.com>
Fixes: f5a2d6b4b0 ("spmi: msm: add arbiter version 5 support")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
2022-07-25 13:02:04 -04:00
..
arc Convert CONFIG_SYS_BOOT_RAMDISK_HIGH to Kconfig 2022-07-07 14:01:09 -04:00
arm arm: dts: db410c/db820c: Fix SPMI addresses 2022-07-25 13:02:04 -04:00
m68k Convert CONFIG_SYS_BOOT_RAMDISK_HIGH to Kconfig 2022-07-07 14:01:09 -04:00
microblaze Convert CONFIG_SYS_BOOT_RAMDISK_HIGH to Kconfig 2022-07-07 14:01:09 -04:00
mips mips: mtmips: add two reference boards for mt7621 2022-07-13 23:03:37 +02:00
nios2 linker_lists: Rename sections to remove . prefix 2022-06-23 12:58:18 -04:00
powerpc Convert CONFIG_SYS_CACHE_STASHING to Kconfig 2022-07-08 17:57:33 -04:00
riscv Convert CONFIG_SYS_BOOT_RAMDISK_HIGH to Kconfig 2022-07-07 14:01:09 -04:00
sandbox watchdog: add pulse support to gpio watchdog driver 2022-07-21 08:09:06 +02:00
sh linker_lists: Rename sections to remove . prefix 2022-06-23 12:58:18 -04:00
x86 Convert CONFIG_SYS_BOOT_RAMDISK_HIGH to Kconfig 2022-07-07 14:01:09 -04:00
xtensa xtensa: Switch to using CONFIG_XTENSA for building device trees 2022-06-28 17:03:31 -04:00
.gitignore
Kconfig nxp: Rename board/freescale/common/Kconfig to arch/Kconfig.nxp 2022-07-05 17:03:02 -04:00
Kconfig.nxp Convert CONFIG_SYS_FSL_CPC et al to Kconfig 2022-07-07 14:01:09 -04:00
u-boot-elf.lds