]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: freescale: ls2080a, ls2088a: Update I2C mux config
authorStephen Carlson <stcarlso@linux.microsoft.com>
Tue, 22 Jun 2021 23:42:02 +0000 (16:42 -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>
[Squashed ls2088a patch to fix compilation]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
16 files changed:
board/freescale/ls2080aqds/ls2080aqds.c
board/freescale/ls2080ardb/ls2080ardb.c
configs/ls2080aqds_SECURE_BOOT_defconfig
configs/ls2080aqds_defconfig
configs/ls2080aqds_nand_defconfig
configs/ls2080aqds_qspi_defconfig
configs/ls2080aqds_sdcard_defconfig
configs/ls2080ardb_SECURE_BOOT_defconfig
configs/ls2080ardb_defconfig
configs/ls2080ardb_nand_defconfig
configs/ls2081ardb_defconfig
configs/ls2088aqds_tfa_defconfig
configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
configs/ls2088ardb_qspi_defconfig
configs/ls2088ardb_tfa_SECURE_BOOT_defconfig
configs/ls2088ardb_tfa_defconfig

index 957231923494966501cb81707b1a59a1f8f4b453..c48b01f7d7d14e3a435cfea9d8cc0b9b59edc8a9 100644 (file)
@@ -23,7 +23,7 @@
 #include <fsl_sec.h>
 #include <asm/arch/ppa.h>
 #include <asm/arch-fsl-layerscape/fsl_icid.h>
-
+#include "../common/i2c_mux.h"
 
 #include "../common/qixis.h"
 #include "ls2080aqds_qixis.h"
@@ -161,27 +161,6 @@ unsigned long get_board_ddr_clk(void)
        return 66666666;
 }
 
-int select_i2c_ch_pca9547(u8 ch)
-{
-       int ret;
-#if CONFIG_IS_ENABLED(DM_I2C)
-       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);
-
-#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 config_board_mux(int ctrl_type)
 {
        u8 reg5;
@@ -235,7 +214,7 @@ int board_init(void)
 #ifdef CONFIG_ENV_IS_NOWHERE
        gd->env_addr = (ulong)&default_environment[0];
 #endif
-       select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
+       select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
 
 #ifdef CONFIG_RTC_ENABLE_32KHZ_OUTPUT
 #if CONFIG_IS_ENABLED(DM_I2C)
index 3a026b0827497a16181ab43c8c126cba4c485e25..6504cf768f191d21de5daa0a1eab37bf318b786c 100644 (file)
@@ -25,6 +25,7 @@
 #include <asm/arch/ppa.h>
 #include <fsl_sec.h>
 #include <asm/arch-fsl-layerscape/fsl_icid.h>
+#include "../common/i2c_mux.h"
 
 #ifdef CONFIG_FSL_QIXIS
 #include "../common/qixis.h"
@@ -205,31 +206,9 @@ unsigned long get_board_sys_clk(void)
        return 100000000;
 }
 
-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;
-}
-
 int i2c_multiplexer_select_vid_channel(u8 channel)
 {
-       return select_i2c_ch_pca9547(channel);
+       return select_i2c_ch_pca9547(channel, 0);
 }
 
 int config_board_mux(int ctrl_type)
@@ -267,7 +246,7 @@ int board_init(void)
 #ifdef CONFIG_ENV_IS_NOWHERE
        gd->env_addr = (ulong)&default_environment[0];
 #endif
-       select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
+       select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
 
 #ifdef CONFIG_FSL_QIXIS
        QIXIS_WRITE(rst_ctl, QIXIS_RST_CTL_RESET_EN);
index f9841499830564c5e867b56b976efa05b12ee707..8fca07fc931445aacf3113b9132f3acf1cf2dfb4 100644 (file)
@@ -68,3 +68,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_RSA=y
 CONFIG_RSA_SOFTWARE_EXP=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 9a69d143d15f5d8b1bf8234d407c895593ff2136..681afc027da0bfd686e181ea397472243fca1d00 100644 (file)
@@ -69,3 +69,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 bb36da157b0764049c9e630ab5e1328c82d1e171..54cca1990df595faf37f351cebf042db0c590e69 100644 (file)
@@ -76,3 +76,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 cbdf7334562f8afe329f250e15342fdc365dbe50..51ab47a583c797080f180c2496f605b1d38f559c 100644 (file)
@@ -68,3 +68,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 0b13a4c4145ffe63c7e5ed63bbc8469785ace0da..fec32278186d01842f544ee7289e99573f9e39d3 100644 (file)
@@ -75,3 +75,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 bf716f8026e9664c255786914efd64a38bae18be..6fb07177d308fcb1d363c9914aa5b5cb8d34c772 100644 (file)
@@ -66,3 +66,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_RSA=y
 CONFIG_RSA_SOFTWARE_EXP=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index af300af17274656981be4866049ce3f078ace898..eb511d83ea7fadcf6bbfebf713c77679cc47fac7 100644 (file)
@@ -67,3 +67,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 a1f2f2b4db6a995f17eb896440e5a2d27adebeab..ec81987884dbacacd2eb1521540999488a2c5eea 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 3a995e29f86cb89ded3234c1120ffe3cefc2fa86..d775f56a4e8e80ae6867d549e6a9b52f21354b6f 100644 (file)
@@ -65,3 +65,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 75986f90abc0c06d177d88434b50809d8ff1b6d1..6eb707206ecd3f35a31c4646de7ce564ad09df59 100644 (file)
@@ -89,3 +89,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 51d114337dafbce61f2e2c6092e5596d1f89e5b7..2575345703f7c9909454379471ab663aaba4a60d 100644 (file)
@@ -66,3 +66,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_RSA=y
 CONFIG_RSA_SOFTWARE_EXP=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
index 3b9b53bc87cc037192fac772c7a576919f593c0c..1cc382c811ea4f0351897335123d5cb9f5946b41 100644 (file)
@@ -71,3 +71,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 ef7965fdbb94e8fb971c06632238edff08dcc466..b05bfbce716bda638952c2c2fef8003cb1922a22 100644 (file)
@@ -82,3 +82,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 86254b0314b7a40b9c4ca0c57e6d1ee0d6667468..decf6a84d78924ecfbc39247fbca2214d79ddde4 100644 (file)
@@ -87,3 +87,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