]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Convert CONFIG_SYS_I2C_SOFT et al to Kconfig
authorTom Rini <trini@konsulko.com>
Tue, 17 Aug 2021 21:59:46 +0000 (17:59 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 30 Aug 2021 18:10:06 +0000 (14:10 -0400)
This converts the following to Kconfig:
   CONFIG_SYS_I2C_SOFT
   CONFIG_SYS_I2C_SOFT_SPEED
   CONFIG_SYS_I2C_SOFT_SLAVE

Signed-off-by: Tom Rini <trini@konsulko.com>
17 files changed:
board/sunxi/board.c
configs/Colombus_defconfig
configs/UTOO_P66_defconfig
configs/ethernut5_defconfig
configs/km_kirkwood_128m16_defconfig
configs/km_kirkwood_defconfig
configs/km_kirkwood_pci_defconfig
configs/kmcoge5un_defconfig
configs/kmnusa_defconfig
configs/kmsuse2_defconfig
configs/snapper9260_defconfig
configs/snapper9g20_defconfig
drivers/i2c/Kconfig
include/configs/ethernut5.h
include/configs/km/km_arm.h
include/configs/snapper9260.h
include/configs/sunxi-common.h

index 1a46100e408d4f3a959a0ce175976781dec9a6eb..2b7d655678d0a37f3c647e802414521cba6d7a61 100644 (file)
@@ -47,7 +47,7 @@
 #include <sy8106a.h>
 #include <asm/setup.h>
 
-#if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_SPL_BUILD)
+#if defined(CONFIG_VIDEO_LCD_PANEL_I2C)
 /* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */
 int soft_i2c_gpio_sda;
 int soft_i2c_gpio_scl;
index a6b3bd438a8cc31fb8111ed41679bbf90fd22a18..0542520a0e25d5b1a5b78b74c4c605ce9b9e6874 100644 (file)
@@ -17,6 +17,9 @@ CONFIG_VIDEO_LCD_PANEL_I2C_SDA="PA23"
 CONFIG_VIDEO_LCD_PANEL_I2C_SCL="PA24"
 CONFIG_VIDEO_LCD_PANEL_EDP_4_LANE_1620M_VIA_ANX9804=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SYS_I2C_SOFT=y
+CONFIG_SYS_I2C_SOFT_SPEED=50000
+CONFIG_SYS_I2C_SOFT_SLAVE=0x00
 CONFIG_PHY_REALTEK=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
index 78c40c067a0a35a92675c12a30a30aabc090c135..b9553b793720ff6186c32675f43baf1ac67b49fe 100644 (file)
@@ -21,6 +21,9 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_VIDEO_LCD_TL059WV5C0=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_I2C=y
+CONFIG_SYS_I2C_SOFT=y
+CONFIG_SYS_I2C_SOFT_SPEED=50000
+CONFIG_SYS_I2C_SOFT_SLAVE=0x00
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
 CONFIG_CONS_INDEX=2
 CONFIG_USB_MUSB_HOST=y
index 4da3c1d4f4c9b6f76cd3eb6abd9b37fc689c70db..7b58b714eb066300a61b4612cd9818562bd83c50 100644 (file)
@@ -55,6 +55,8 @@ CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_AT91_GPIO=y
+CONFIG_SYS_I2C_SOFT=y
+CONFIG_SYS_I2C_SOFT_SLAVE=0
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD_RAW_NAND=y
index 0597970746d6f361330f1a408788b54b3669e17e..b93fcbf8053435c2baf1510ab03025969a95d376 100644 (file)
@@ -46,6 +46,8 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_SYS_I2C_SOFT=y
+CONFIG_SYS_I2C_SOFT_SLAVE=0x0
 CONFIG_SYS_I2C_EEPROM_ADDR=0x50
 # CONFIG_MMC is not set
 CONFIG_MTD=y
index 7f982de136f291a123271d663b558eefa960df38..0fe7a9d7a491f00def6bf9c4192b663d876005ad 100644 (file)
@@ -46,6 +46,8 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_SYS_I2C_SOFT=y
+CONFIG_SYS_I2C_SOFT_SLAVE=0x0
 CONFIG_SYS_I2C_EEPROM_ADDR=0x50
 # CONFIG_MMC is not set
 CONFIG_MTD=y
index fb1b93db517d5167644e677159e9c453577482d5..5a49acba125a5d00a8a028cd2b8404817ac35336 100644 (file)
@@ -47,6 +47,8 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_SYS_I2C_SOFT=y
+CONFIG_SYS_I2C_SOFT_SLAVE=0x0
 CONFIG_SYS_I2C_EEPROM_ADDR=0x50
 # CONFIG_MMC is not set
 CONFIG_MTD=y
index ed9996c4c0f56c0de7e75666fc0698f8fc33b80b..989dc6e45ac73b75f24ece0c255cc5cefc66c1c7 100644 (file)
@@ -50,6 +50,8 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_SYS_I2C_SOFT=y
+CONFIG_SYS_I2C_SOFT_SLAVE=0x0
 CONFIG_SYS_I2C_EEPROM_ADDR=0x50
 # CONFIG_MMC is not set
 CONFIG_MTD=y
index 9a1c4a48e61df936266748a752297b5c4b66149f..68d9b54113ecb2c94c9e550d5a59d9ac9519f757 100644 (file)
@@ -50,6 +50,8 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_SYS_I2C_SOFT=y
+CONFIG_SYS_I2C_SOFT_SLAVE=0x0
 CONFIG_SYS_I2C_EEPROM_ADDR=0x50
 # CONFIG_MMC is not set
 CONFIG_MTD=y
index 66e4f2d069b33d74b6d5161998f1e642654d4042..c8b84b1b17a7d0a4c21d341576cc04939b51249b 100644 (file)
@@ -51,6 +51,8 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
+CONFIG_SYS_I2C_SOFT=y
+CONFIG_SYS_I2C_SOFT_SLAVE=0x0
 CONFIG_SYS_I2C_EEPROM_ADDR=0x50
 # CONFIG_MMC is not set
 CONFIG_MTD=y
index f9cc1a6c7e9f4a5782a29d1453e33bdf3e9cc538..0acb95f85ceb79b5a83a19581b97ea7fc8a296d6 100644 (file)
@@ -33,6 +33,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_TFTP_TSIZE=y
 CONFIG_AT91_GPIO=y
 CONFIG_CMD_PCA953X=y
+CONFIG_SYS_I2C_SOFT=y
+CONFIG_SYS_I2C_SOFT_SLAVE=0x7F
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
index e3a325a271000ec7a74225506fc5fed7770895f5..5d83c263b66b0989cc0d3d73c139bd8c3bf22f96 100644 (file)
@@ -32,6 +32,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_TFTP_TSIZE=y
 CONFIG_AT91_GPIO=y
 CONFIG_CMD_PCA953X=y
+CONFIG_SYS_I2C_SOFT=y
+CONFIG_SYS_I2C_SOFT_SLAVE=0x7F
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
index a50c1f38336d8b7fa0c284de6b0ac6c05050167d..4da074de720c15f0e6d37c2a3fb60eac688bd5de 100644 (file)
@@ -437,6 +437,25 @@ config SYS_I2C_SANDBOX
          bus. Devices can be attached to the bus using the device tree
          which specifies the driver to use.  See sandbox.dts as an example.
 
+config SYS_I2C_SOFT
+       bool "Legacy software I2C interface"
+       help
+         Enable the legacy software defined I2C interface
+
+config SYS_I2C_SOFT_SPEED
+       int "Software I2C bus speed"
+       depends on SYS_I2C_SOFT
+       default 100000
+       help
+         Speed of the software I2C bus
+
+config SYS_I2C_SOFT_SLAVE
+       hex "Software I2C slave address"
+       depends on SYS_I2C_SOFT
+       default 0xfe
+       help
+         Slave address of the software I2C bus
+
 config SYS_I2C_OCTEON
        bool "Octeon II/III/TX/TX2 I2C driver"
        depends on (ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2) && DM_I2C
index 3f266543b92bd87240d540191ba5ad5ec931c3e2..8b60ad52df1665cc7c97dee531b57e0112d77563 100644 (file)
@@ -98,9 +98,6 @@
 #define CONFIG_SYS_MAX_I2C_BUS 1
 
 #define CONFIG_SYS_I2C_LEGACY
-#define CONFIG_SYS_I2C_SOFT                    /* I2C bit-banged */
-#define CONFIG_SYS_I2C_SOFT_SPEED      100000
-#define CONFIG_SYS_I2C_SOFT_SLAVE      0
 
 #define I2C_SOFT_DECLARATIONS
 
index 6633bf8256d67ef879e152eef40ee58c224f8845..a52df29df12c87d20418431eefaad4e2a2ed0ae0 100644 (file)
@@ -91,7 +91,6 @@
  */
 #undef CONFIG_I2C_MVTWSI
 #define CONFIG_SYS_I2C_LEGACY
-#define        CONFIG_SYS_I2C_SOFT     /* I2C bit-banged       */
 #define CONFIG_SYS_I2C_INIT_BOARD
 
 #define        CONFIG_KIRKWOOD_GPIO            /* Enable GPIO Support */
@@ -125,9 +124,6 @@ extern void __set_direction(unsigned pin, int high);
 #define I2C_DELAY      udelay(1)
 #define I2C_SOFT_DECLARATIONS
 
-#define        CONFIG_SYS_I2C_SOFT_SLAVE       0x0
-#define        CONFIG_SYS_I2C_SOFT_SPEED       100000
-
 /* EEprom support 24C128, 24C256 valid for environment eeprom */
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE
 
index 529976efee01d57f9b363ea4a1477edd4123f0bf..2c89a6b5306cbd93592cfa88ef9c396832798ea2 100644 (file)
@@ -74,9 +74,6 @@
 
 /* I2C - Bit-bashed */
 #define CONFIG_SYS_I2C_LEGACY
-#define CONFIG_SYS_I2C_SOFT            /* I2C bit-banged */
-#define CONFIG_SYS_I2C_SOFT_SPEED      100000
-#define CONFIG_SYS_I2C_SOFT_SLAVE      0x7F
 #define CONFIG_SOFT_I2C_READ_REPEATED_START
 #define I2C_INIT do {                                                  \
                at91_set_gpio_output(AT91_PIN_PA23, 1);                 \
index 958b850da4a857f7da44f392481a4520da2e4439..4f7049a4de617a1dfed67ee65fca67a2b0907a6d 100644 (file)
 #endif
 #endif
 
-#if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_SPL_BUILD)
-#define CONFIG_SYS_I2C_SOFT
-#define CONFIG_SYS_I2C_SOFT_SPEED      50000
-#define CONFIG_SYS_I2C_SOFT_SLAVE      0x00
+#if defined(CONFIG_VIDEO_LCD_PANEL_I2C)
 /* We use pin names in Kconfig and sunxi_name_to_gpio() */
 #define CONFIG_SOFT_I2C_GPIO_SDA       soft_i2c_gpio_sda
 #define CONFIG_SOFT_I2C_GPIO_SCL       soft_i2c_gpio_scl