aboutsummaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2021-10-08 00:17:21 -0500
committerAndre Przywara <andre.przywara@arm.com>2021-10-12 10:19:18 +0100
commit3227c85fe76312290c3ec15a02dcba3f9c6bc399 (patch)
tree1b7f74ecdbf023f730d21a706fe7f9476cb8f14f /configs
parent104950a7feae7926e40676f27cfbd279a43b4bc3 (diff)
downloadu-boot-3227c85fe76312290c3ec15a02dcba3f9c6bc399.zip
u-boot-3227c85fe76312290c3ec15a02dcba3f9c6bc399.tar.gz
u-boot-3227c85fe76312290c3ec15a02dcba3f9c6bc399.tar.bz2
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>
Diffstat (limited to 'configs')
-rw-r--r--configs/Cubieboard4_defconfig2
-rw-r--r--configs/Merrii_A80_Optimus_defconfig2
2 files changed, 2 insertions, 2 deletions
diff --git a/configs/Cubieboard4_defconfig b/configs/Cubieboard4_defconfig
index 0377bb8..3848cab 100644
--- a/configs/Cubieboard4_defconfig
+++ b/configs/Cubieboard4_defconfig
@@ -11,6 +11,6 @@ CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
CONFIG_USB0_ID_DET="PH16"
CONFIG_USB1_VBUS_PIN="PH14"
CONFIG_USB3_VBUS_PIN="PH15"
-CONFIG_SUN8I_RSB=y
+CONFIG_SYS_I2C_SUN8I_RSB=y
CONFIG_AXP_GPIO=y
CONFIG_AXP809_POWER=y
diff --git a/configs/Merrii_A80_Optimus_defconfig b/configs/Merrii_A80_Optimus_defconfig
index 8fb6504..35e5753 100644
--- a/configs/Merrii_A80_Optimus_defconfig
+++ b/configs/Merrii_A80_Optimus_defconfig
@@ -11,6 +11,6 @@ CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
CONFIG_USB0_ID_DET="PH3"
CONFIG_USB1_VBUS_PIN="PH4"
CONFIG_USB3_VBUS_PIN="PH5"
-CONFIG_SUN8I_RSB=y
+CONFIG_SYS_I2C_SUN8I_RSB=y
CONFIG_AXP_GPIO=y
CONFIG_AXP809_POWER=y