]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: freescale: ls1046a: Update I2C mux config
authorStephen Carlson <stcarlso@linux.microsoft.com>
Tue, 22 Jun 2021 23:40:27 +0000 (16:40 -0700)
committerPriyanka Jain <priyanka.jain@nxp.com>
Tue, 20 Jul 2021 08:48:05 +0000 (14:18 +0530)
Updates the board configuration to enable use of the PCA9547 I2C mux.

Signed-off-by: Stephen Carlson <stcarlso@linux.microsoft.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
13 files changed:
board/freescale/ls1046afrwy/ls1046afrwy.c
board/freescale/ls1046aqds/ls1046aqds.c
configs/ls1046afrwy_tfa_SECURE_BOOT_defconfig
configs/ls1046afrwy_tfa_defconfig
configs/ls1046aqds_SECURE_BOOT_defconfig
configs/ls1046aqds_defconfig
configs/ls1046aqds_lpuart_defconfig
configs/ls1046aqds_nand_defconfig
configs/ls1046aqds_qspi_defconfig
configs/ls1046aqds_sdcard_ifc_defconfig
configs/ls1046aqds_sdcard_qspi_defconfig
configs/ls1046aqds_tfa_SECURE_BOOT_defconfig
configs/ls1046aqds_tfa_defconfig

index f1709dcd1cd0e1c915fe96e48c660d3952e25fb6..f1c08a13f7bbc4497b363047752667c36367123d 100644 (file)
@@ -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
 
 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;
index 20694426af351359883e0dc824ac97b9d5e3a591..2b0786ac30d4b59d09dee9768b44413a28967634 100644 (file)
@@ -29,6 +29,7 @@
 #include <fsl_ifc.h>
 #include <fsl_sec.h>
 #include <spl.h>
+#include "../common/i2c_mux.h"
 
 #include "../common/vid.h"
 #include "../common/qixis.h"
@@ -276,31 +277,6 @@ u32 get_lpuart_clk(void)
 }
 #endif
 
-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;
-}
-
 int dram_init(void)
 {
        /*
index 45f28527e5c24ca22dbbbf216d404a9331a3d1ed..f094ee7053e30b4204b5e0606869ed6722324276 100644 (file)
@@ -60,3 +60,4 @@ CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_ASIX88179=y
 CONFIG_USB_ETHER_RTL8152=y
 CONFIG_RSA=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 27e4409d7680c296ce18c39db97a370ef4bb2dec..38d7df923f2a0265704bac5d17586ca2a6337949 100644 (file)
@@ -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
index 3177a03a79f4f2c6201159b46f4ca094d82c3dff..7b68ef1f9a7d4ed59340892c94388b2eca5a31de 100644 (file)
@@ -70,3 +70,4 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_RSA=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 9fd216ba54a8df4e5050aece609f7a360f15ad1a..3a00325dc9c7ae9680b7bec4d5301169b9bb866a 100644 (file)
@@ -72,3 +72,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index eab291a22fbab3ae0620417c5fd21fb4ded8006c..41c9e6c8f16fc9c56c795c27114ebd927265ced6 100644 (file)
@@ -74,3 +74,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 5daac1f408c8b28135296855e38085bfc11a9ec6..92d7bb9204ed3c20f20d66505cc1ea09896beb06 100644 (file)
@@ -80,3 +80,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index b1152cbef1537c1c82fe4dc8c341728d02cec13b..620d400a81f6cf2758e7f851cca280415c71aff9 100644 (file)
@@ -70,3 +70,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index abaec2105fa83804cabee876b07beff1876e2252..d16d4e8f1c6a1a07b781661db7b0d4d798de8efe 100644 (file)
@@ -90,3 +90,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 4b1628b10810b5faa0b48312a959fc65f900fed9..6e6006f109a95b0b54d2b9e5269d18f9ed654203 100644 (file)
@@ -85,3 +85,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index af2267b03188d19200c446c3276a2b6361694a5c..2711e242532aa1ab3eb42062fc08d98809e92497 100644 (file)
@@ -72,3 +72,4 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_RSA=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index f64d0d6c2d399929bb749820edfddf1e75ce477c..aebd9e68f33c84f1eee2a1fffe9a8468e4781e0a 100644 (file)
@@ -82,3 +82,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y