u-boot/arch
Samuel Holland 3227c85fe7 i2c: Add a DM_I2C driver for the sun8i RSB controller
This bus controller is used to communicate with an X-Powers AXP PMIC.
Currently, various drivers access PMIC registers through a platform-
specific non-DM "pmic_bus" interface, which depends on the legacy I2C
framework. In order to convert those drivers to use DM_PMIC, this bus
needs a DM_I2C driver.

Refactor the rsb functions to take the base address as a parameter,
and implement both the existing interface (which is still needed in
SPL) and the DM_I2C interface on top of them.

The register for switching between I2C/P2WI/RSB mode is the same across
all PMIC variants, so move that to the common header.

There are only a couple of pairs of hardware/runtime addresses used
across all PMIC variants. So far the code expected only the "primary"
pair, but some PMICs like the AXP305 and AXP805 use the secondary pair,
so add support for that to the DM driver as well.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2021-10-12 10:19:18 +01:00
..
arc image: Drop IMAGE_ENABLE_OF_LIBFDT 2021-10-08 15:53:26 -04:00
arm i2c: Add a DM_I2C driver for the sun8i RSB controller 2021-10-12 10:19:18 +01:00
m68k WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
microblaze image: Drop IMAGE_ENABLE_OF_LIBFDT 2021-10-08 15:53:26 -04:00
mips WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
nds32 image: Drop IMAGE_ENABLE_OF_LIBFDT 2021-10-08 15:53:26 -04:00
nios2 lmb: nios2: Add arch_lmb_reserve() 2021-09-23 14:15:32 -04:00
powerpc Convert CONFIG_NAND_FSL_ELBC et al to Kconfig 2021-10-06 09:16:24 -04:00
riscv image: Drop IMAGE_ENABLE_OF_LIBFDT 2021-10-08 15:53:26 -04:00
sandbox WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
sh WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
x86 WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
xtensa WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
.gitignore
Kconfig Prepare v2021.10-rc4 2021-09-16 10:29:40 -04:00
u-boot-elf.lds arch: Add explicit linker script for u-boot-elf 2020-04-03 11:52:55 -04:00