[PATCH v2 04/14] board: freescale: ls1046afrwy: Update I2C mux config
Stephen Carlson
stcarlso at linux.microsoft.com
Thu Jun 24 21:34:06 CEST 2021
Updates the board configuration to enable use of the PCA9547 I2C mux.
Signed-off-by: Stephen Carlson <stcarlso at linux.microsoft.com>
---
board/freescale/ls1046afrwy/ls1046afrwy.c | 27 +------------------
configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig | 1 +
configs/ls1046afrwy_tfa_defconfig | 1 +
3 files changed, 3 insertions(+), 26 deletions(-)
diff --git a/board/freescale/ls1046afrwy/ls1046afrwy.c b/board/freescale/ls1046afrwy/ls1046afrwy.c
index f1709dcd1c..f1c08a13f7 100644
--- a/board/freescale/ls1046afrwy/ls1046afrwy.c
+++ b/board/freescale/ls1046afrwy/ls1046afrwy.c
@@ -22,6 +22,7 @@
#include <fsl_esdhc.h>
#include <fsl_sec.h>
#include <fsl_dspi.h>
+#include "../common/i2c_mux.h"
#define LS1046A_PORSR1_REG 0x1EE0000
#define BOOT_SRC_SD 0x20000000
@@ -38,32 +39,6 @@
DECLARE_GLOBAL_DATA_PTR;
-int select_i2c_ch_pca9547(u8 ch, int bus_num)
-{
- int ret;
-
-#if CONFIG_IS_ENABLED(DM_I2C)
- struct udevice *dev;
-
- ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_PCA_ADDR_PRI,
- 1, &dev);
- if (ret) {
- printf("%s: Cannot find udev for a bus %d\n", __func__,
- bus_num);
- return ret;
- }
- ret = dm_i2c_write(dev, 0, &ch, 1);
-#else
- ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);
-#endif
- if (ret) {
- puts("PCA: failed to select proper channel\n");
- return ret;
- }
-
- return 0;
-}
-
static inline void demux_select_usb2(void)
{
u32 val;
diff --git a/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig b/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig
index 33308aa0e3..4fb54f161a 100644
--- a/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig
@@ -61,3 +61,4 @@ CONFIG_USB_ETHER_ASIX88179=y
CONFIG_USB_ETHER_RTL8152=y
CONFIG_RSA=y
CONFIG_NXP_ESBC=y
+CONFIG_FSL_USE_PCA9547_MUX=y
diff --git a/configs/ls1046afrwy_tfa_defconfig b/configs/ls1046afrwy_tfa_defconfig
index ea62d7fa7e..6861d22193 100644
--- a/configs/ls1046afrwy_tfa_defconfig
+++ b/configs/ls1046afrwy_tfa_defconfig
@@ -68,3 +68,4 @@ CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_ASIX88179=y
CONFIG_USB_ETHER_RTL8152=y
+CONFIG_FSL_USE_PCA9547_MUX=y
--
2.17.1
More information about the U-Boot
mailing list