]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: freescale: ls1088a: Update I2C mux config
authorStephen Carlson <stcarlso@linux.microsoft.com>
Tue, 22 Jun 2021 23:41:38 +0000 (16:41 -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/ls1088a/ls1088a.c
configs/ls1088aqds_defconfig
configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
configs/ls1088aqds_qspi_defconfig
configs/ls1088aqds_sdcard_ifc_defconfig
configs/ls1088aqds_sdcard_qspi_defconfig
configs/ls1088aqds_tfa_defconfig
configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
configs/ls1088ardb_qspi_defconfig
configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
configs/ls1088ardb_sdcard_qspi_defconfig
configs/ls1088ardb_tfa_SECURE_BOOT_defconfig
configs/ls1088ardb_tfa_defconfig

index f5dc449d8986ccfb0ecb488a6ec30377d24b0bf6..2f422634d5ae42addd073126570a79a96e73f541 100644 (file)
@@ -26,6 +26,7 @@
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/soc.h>
 #include <asm/arch-fsl-layerscape/fsl_icid.h>
+#include "../common/i2c_mux.h"
 
 #include "../common/qixis.h"
 #include "ls1088a_qixis.h"
@@ -415,34 +416,13 @@ unsigned long get_board_ddr_clk(void)
        return 66666666;
 }
 
-int select_i2c_ch_pca9547(u8 ch)
-{
-       int ret;
-
-#if !CONFIG_IS_ENABLED(DM_I2C)
-       ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);
-#else
-       struct udevice *dev;
-
-       ret = i2c_get_chip_for_busnum(0, I2C_MUX_PCA_ADDR_PRI, 1, &dev);
-       if (!ret)
-               ret = dm_i2c_write(dev, 0, &ch, 1);
-#endif
-       if (ret) {
-               puts("PCA: failed to select proper channel\n");
-               return ret;
-       }
-
-       return 0;
-}
-
 #if !defined(CONFIG_SPL_BUILD)
 void board_retimer_init(void)
 {
        u8 reg;
 
        /* Retimer is connected to I2C1_CH5 */
-       select_i2c_ch_pca9547(I2C_MUX_CH5);
+       select_i2c_ch_pca9547(I2C_MUX_CH5, 0);
 
        /* Access to Control/Shared register */
        reg = 0x0;
@@ -532,7 +512,7 @@ void board_retimer_init(void)
 
 #ifdef CONFIG_TARGET_LS1088AQDS
        /* Retimer is connected to I2C1_CH5 */
-       select_i2c_ch_pca9547(I2C_MUX_CH5);
+       select_i2c_ch_pca9547(I2C_MUX_CH5, 0);
 
        /* Access to Control/Shared register */
        reg = 0x0;
@@ -620,7 +600,7 @@ void board_retimer_init(void)
 
 #endif
        /*return the default channel*/
-       select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
+       select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
 }
 
 #ifdef CONFIG_MISC_INIT_R
@@ -669,7 +649,7 @@ int misc_init_r(void)
 
 int i2c_multiplexer_select_vid_channel(u8 channel)
 {
-       return select_i2c_ch_pca9547(channel);
+       return select_i2c_ch_pca9547(channel, 0);
 }
 
 #ifdef CONFIG_TARGET_LS1088AQDS
@@ -827,7 +807,7 @@ int board_init(void)
        u32 __iomem *irq_ccsr = (u32 __iomem *)ISC_BASE;
 #endif
 
-       select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
+       select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
        board_retimer_init();
 
 #ifdef CONFIG_ENV_IS_NOWHERE
index 55e52c87701e0d49eff1b4ba9e5d91301d8b7519..c36f37d5d1722761527d25c2639f147a805490a7 100644 (file)
@@ -74,3 +74,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 9dc5f8dbb28628f2ca1c3d2799387c1f30f2a26f..d401b91c4002d79eb9b370b83c9da9e62ea1bbc4 100644 (file)
@@ -75,3 +75,4 @@ CONFIG_USB_GADGET=y
 CONFIG_RSA=y
 CONFIG_RSA_SOFTWARE_EXP=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 91903bd11066d8b3ad228f761c606da906bf303f..5711464e77e0a3d3a3fc45d268e1ddcd99315109 100644 (file)
@@ -76,3 +76,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index fcb48741e3c5bbab004b205766d09ffe7b9fd042..fdeddaef4469cc3f9c2e863df37526ac3752031a 100644 (file)
@@ -82,3 +82,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 3e8c269add01ab72fd0ea9b31674f6f4e4b49d56..6f30c6a2846e405eafb317f9ac9a7ad59b266ce7 100644 (file)
@@ -85,3 +85,4 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index a0bd0cb23d29ed469f0f36910c3121762742e3c3..0df21ccd21de2dd2ed1bcf91bfef90a5d849511e 100644 (file)
@@ -100,3 +100,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 6cd0251dd0f02bc2888e3792a613f5d1aefb2ecb..981da5f9af5c694731a836420ddec38c85b53b43 100644 (file)
@@ -76,3 +76,4 @@ CONFIG_USB_GADGET=y
 CONFIG_RSA=y
 CONFIG_RSA_SOFTWARE_EXP=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index b71e60983f77005f72c7099f248d9f6b665bfb01..1b3affc86a7fc92e54bdc6aa7e8daf2c5a93538e 100644 (file)
@@ -77,3 +77,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 997f505778be68790ff063541fa009062cac9bdf..a351ae48c53be52b786bb47a23475682bd406ad4 100644 (file)
@@ -87,3 +87,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_RSA=y
 CONFIG_SPL_RSA=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 64b3136a3ebb0ccc22487f96a1ac5ad8a8dc8abf..790ccbdb51480113e93e5738100a6ff28d82a017 100644 (file)
@@ -86,3 +86,4 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_GADGET=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 473dd08ba84040256dc789ee6430a5d95220428d..344fa73a9958c95e6385fd6edc2ddbad85934ff9 100644 (file)
@@ -85,3 +85,4 @@ CONFIG_RSA=y
 CONFIG_SPL_RSA=y
 CONFIG_RSA_SOFTWARE_EXP=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index a3c795330323f9021bf92d47cf90fec337258675..082578d16b1928e04655b1a8cf40d6371f30d650 100644 (file)
@@ -92,3 +92,4 @@ CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_ASIX88179=y
 CONFIG_USB_ETHER_RTL8152=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y