diff options
author | Samuel Holland <samuel@sholland.org> | 2021-10-08 00:17:20 -0500 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2021-10-12 09:50:56 +0100 |
commit | 104950a7feae7926e40676f27cfbd279a43b4bc3 (patch) | |
tree | ce45115b87c8d40491d8b1e3e44fcb1aaf050901 /arch/arm/mach-sunxi/Kconfig | |
parent | 4ab39e74b640799748dfdef49f099b416a5ae497 (diff) | |
download | u-boot-104950a7feae7926e40676f27cfbd279a43b4bc3.zip u-boot-104950a7feae7926e40676f27cfbd279a43b4bc3.tar.gz u-boot-104950a7feae7926e40676f27cfbd279a43b4bc3.tar.bz2 |
i2c: Add a DM_I2C driver for the sun6i P2WI 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 p2wi 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. Move that to the common header, so it can be used by
both interface implementations.
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>
Diffstat (limited to 'arch/arm/mach-sunxi/Kconfig')
-rw-r--r-- | arch/arm/mach-sunxi/Kconfig | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index da35cc8..f4a4528 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -88,17 +88,6 @@ config DRAM_SUN50I_H616_UNKNOWN_FEATURE feature. endif -config SUN6I_P2WI - bool "Allwinner sun6i internal P2WI controller" - help - If you say yes to this option, support will be included for the - P2WI (Push/Pull 2 Wire Interface) controller embedded in some sunxi - SOCs. - The P2WI looks like an SMBus controller (which supports only byte - accesses), except that it only supports one slave device. - This interface is used to connect to specific PMIC devices (like the - AXP221). - config SUN6I_PRCM bool help @@ -232,10 +221,11 @@ config MACH_SUN6I select ARCH_SUPPORT_PSCI select DRAM_SUN6I select PHY_SUN4I_USB - select SUN6I_P2WI + select SPL_I2C select SUN6I_PRCM select SUNXI_GEN_SUN6I select SUPPORT_SPL + select SYS_I2C_SUN6I_P2WI select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT config MACH_SUN7I |