u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Samuel Holland <samuel@sholland.org>
To: u-boot@lists.denx.de, Jagan Teki <jagan@amarulasolutions.com>,
	Andre Przywara <andre.przywara@arm.com>
Cc: Sean Anderson <seanga2@gmail.com>, Simon Glass <sjg@chromium.org>,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
	Samuel Holland <samuel@sholland.org>, Heiko Schocher <hs@denx.de>,
	Joe Hershberger <joe.hershberger@ni.com>
Subject: [PATCH v2 14/23] sunxi: Remove options and setup code for I2C2-I2C4
Date: Thu, 17 Mar 2022 22:54:11 -0500	[thread overview]
Message-ID: <20220318035420.15058-15-samuel@sholland.org> (raw)
In-Reply-To: <20220318035420.15058-1-samuel@sholland.org>

These options are not currently enabled anywhere. Any new users should
use DM clocks and pinctrl.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

(no changes since v1)

 arch/arm/include/asm/arch-sunxi/gpio.h |  8 -----
 arch/arm/include/asm/arch-sunxi/i2c.h  | 11 +-----
 arch/arm/mach-sunxi/Kconfig            | 22 ------------
 board/sunxi/board.c                    | 48 --------------------------
 4 files changed, 1 insertion(+), 88 deletions(-)

diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h
index 2aa6bbb178..cf5afdac6a 100644
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
@@ -141,8 +141,6 @@ enum sunxi_gpio_number {
 #define SUN4I_GPB_TWI0		2
 #define SUN4I_GPB_TWI1		2
 #define SUN5I_GPB_TWI1		2
-#define SUN4I_GPB_TWI2		2
-#define SUN5I_GPB_TWI2		2
 #define SUN8I_V3S_GPB_TWI0	2
 #define SUN4I_GPB_UART0		2
 #define SUN5I_GPB_UART0		2
@@ -164,8 +162,6 @@ enum sunxi_gpio_number {
 #define SUNXI_GPD_PWM		2
 
 #define SUNIV_GPE_UART0		5
-#define SUN8I_GPE_TWI2		3
-#define SUN50I_GPE_TWI2		3
 
 #define SUNXI_GPF_SDC0		2
 #define SUNXI_GPF_UART0		4
@@ -176,7 +172,6 @@ enum sunxi_gpio_number {
 #define SUN6I_GPG_SDC1		2
 #define SUN8I_GPG_SDC1		2
 #define SUN8I_GPG_UART1		2
-#define SUN6I_GPG_TWI3		2
 #define SUN5I_GPG_UART1		4
 
 #define SUN6I_GPH_PWM		2
@@ -188,15 +183,12 @@ enum sunxi_gpio_number {
 #define SUN6I_GPH_TWI1		2
 #define SUN8I_GPH_TWI1		2
 #define SUN50I_GPH_TWI1		2
-#define SUN6I_GPH_TWI2		2
 #define SUN6I_GPH_UART0		2
 #define SUN9I_GPH_UART0		2
 #define SUN50I_H6_GPH_UART0	2
 #define SUN50I_H616_GPH_UART0	2
 
 #define SUNXI_GPI_SDC3		2
-#define SUN7I_GPI_TWI3		3
-#define SUN7I_GPI_TWI4		3
 
 #define SUN6I_GPL0_R_P2WI_SCK	3
 #define SUN6I_GPL1_R_P2WI_SDA	3
diff --git a/arch/arm/include/asm/arch-sunxi/i2c.h b/arch/arm/include/asm/arch-sunxi/i2c.h
index 1cb2ba6b0a..3525f22e7d 100644
--- a/arch/arm/include/asm/arch-sunxi/i2c.h
+++ b/arch/arm/include/asm/arch-sunxi/i2c.h
@@ -13,17 +13,8 @@
 #ifdef CONFIG_I2C1_ENABLE
 #define CONFIG_I2C_MVTWSI_BASE1	SUNXI_TWI1_BASE
 #endif
-#ifdef CONFIG_I2C2_ENABLE
-#define CONFIG_I2C_MVTWSI_BASE2	SUNXI_TWI2_BASE
-#endif
-#ifdef CONFIG_I2C3_ENABLE
-#define CONFIG_I2C_MVTWSI_BASE3	SUNXI_TWI3_BASE
-#endif
-#ifdef CONFIG_I2C4_ENABLE
-#define CONFIG_I2C_MVTWSI_BASE4	SUNXI_TWI4_BASE
-#endif
 #ifdef CONFIG_R_I2C_ENABLE
-#define CONFIG_I2C_MVTWSI_BASE5 SUNXI_R_TWI_BASE
+#define CONFIG_I2C_MVTWSI_BASE2 SUNXI_R_TWI_BASE
 #endif
 
 /* This is abp0-clk on sun4i/5i/7i / abp1-clk on sun6i/sun8i which is 24MHz */
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index 73da6b8f61..e5ed1d97e8 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -755,20 +755,6 @@ config I2C1_ENABLE
 	---help---
 	See I2C0_ENABLE help text.
 
-config I2C2_ENABLE
-	bool "Enable I2C/TWI controller 2"
-	select CMD_I2C
-	---help---
-	See I2C0_ENABLE help text.
-
-if MACH_SUN6I || MACH_SUN7I
-config I2C3_ENABLE
-	bool "Enable I2C/TWI controller 3"
-	select CMD_I2C
-	---help---
-	See I2C0_ENABLE help text.
-endif
-
 if SUNXI_GEN_SUN6I || SUN50I_GEN_H6
 config R_I2C_ENABLE
 	bool "Enable the PRCM I2C/TWI controller"
@@ -779,14 +765,6 @@ config R_I2C_ENABLE
 	Set this to y to enable the I2C controller which is part of the PRCM.
 endif
 
-if MACH_SUN7I
-config I2C4_ENABLE
-	bool "Enable I2C/TWI controller 4"
-	select CMD_I2C
-	---help---
-	See I2C0_ENABLE help text.
-endif
-
 config AXP_GPIO
 	bool "Enable support for gpio-s on axp PMICs"
 	depends on AXP_PMIC_BUS
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index a096159047..05249d47eb 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -106,54 +106,6 @@ void i2c_init_board(void)
 #endif
 #endif
 
-#ifdef CONFIG_I2C2_ENABLE
-#if defined(CONFIG_MACH_SUN4I) || \
-    defined(CONFIG_MACH_SUN7I) || \
-    defined(CONFIG_MACH_SUN8I_R40)
-	sunxi_gpio_set_cfgpin(SUNXI_GPB(20), SUN4I_GPB_TWI2);
-	sunxi_gpio_set_cfgpin(SUNXI_GPB(21), SUN4I_GPB_TWI2);
-	clock_twi_onoff(2, 1);
-#elif defined(CONFIG_MACH_SUN5I)
-	sunxi_gpio_set_cfgpin(SUNXI_GPB(17), SUN5I_GPB_TWI2);
-	sunxi_gpio_set_cfgpin(SUNXI_GPB(18), SUN5I_GPB_TWI2);
-	clock_twi_onoff(2, 1);
-#elif defined(CONFIG_MACH_SUN6I)
-	sunxi_gpio_set_cfgpin(SUNXI_GPH(18), SUN6I_GPH_TWI2);
-	sunxi_gpio_set_cfgpin(SUNXI_GPH(19), SUN6I_GPH_TWI2);
-	clock_twi_onoff(2, 1);
-#elif defined(CONFIG_MACH_SUN8I)
-	sunxi_gpio_set_cfgpin(SUNXI_GPE(12), SUN8I_GPE_TWI2);
-	sunxi_gpio_set_cfgpin(SUNXI_GPE(13), SUN8I_GPE_TWI2);
-	clock_twi_onoff(2, 1);
-#elif defined(CONFIG_MACH_SUN50I)
-	sunxi_gpio_set_cfgpin(SUNXI_GPE(14), SUN50I_GPE_TWI2);
-	sunxi_gpio_set_cfgpin(SUNXI_GPE(15), SUN50I_GPE_TWI2);
-	clock_twi_onoff(2, 1);
-#endif
-#endif
-
-#ifdef CONFIG_I2C3_ENABLE
-#if defined(CONFIG_MACH_SUN6I)
-	sunxi_gpio_set_cfgpin(SUNXI_GPG(10), SUN6I_GPG_TWI3);
-	sunxi_gpio_set_cfgpin(SUNXI_GPG(11), SUN6I_GPG_TWI3);
-	clock_twi_onoff(3, 1);
-#elif defined(CONFIG_MACH_SUN7I) || \
-      defined(CONFIG_MACH_SUN8I_R40)
-	sunxi_gpio_set_cfgpin(SUNXI_GPI(0), SUN7I_GPI_TWI3);
-	sunxi_gpio_set_cfgpin(SUNXI_GPI(1), SUN7I_GPI_TWI3);
-	clock_twi_onoff(3, 1);
-#endif
-#endif
-
-#ifdef CONFIG_I2C4_ENABLE
-#if defined(CONFIG_MACH_SUN7I) || \
-    defined(CONFIG_MACH_SUN8I_R40)
-	sunxi_gpio_set_cfgpin(SUNXI_GPI(2), SUN7I_GPI_TWI4);
-	sunxi_gpio_set_cfgpin(SUNXI_GPI(3), SUN7I_GPI_TWI4);
-	clock_twi_onoff(4, 1);
-#endif
-#endif
-
 #ifdef CONFIG_R_I2C_ENABLE
 #ifdef CONFIG_MACH_SUN50I
 	clock_twi_onoff(5, 1);
-- 
2.33.1


  parent reply	other threads:[~2022-03-18  3:57 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18  3:53 [PATCH v2 00/23] sunxi: Add and use a pinctrl driver Samuel Holland
2022-03-18  3:53 ` [PATCH v2 01/23] sunxi: pinctrl: Create the driver skeleton Samuel Holland
2022-03-18  3:53 ` [PATCH v2 02/23] sunxi: pinctrl: Implement pin muxing functions Samuel Holland
2022-03-31 23:34   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 03/23] sunxi: pinctrl: Implement get_pin_muxing function Samuel Holland
2022-03-31 23:36   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 04/23] sunxi: pinctrl: Implement pin configuration Samuel Holland
2022-03-18  3:54 ` [PATCH v2 05/23] pinctrl: sunxi: Add UART pinmuxes Samuel Holland
2022-03-31 23:18   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 06/23] sunxi: Skip non-DM UART pin setup when PINCTRL=y Samuel Holland
2022-03-31 23:19   ` Andre Przywara
2022-03-31 23:59     ` Samuel Holland
2022-03-18  3:54 ` [PATCH v2 07/23] pinctrl: sunxi: Add sun4i EMAC pinmuxes Samuel Holland
2022-03-31 23:19   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 08/23] net: sunxi_emac: Remove non-DM pin setup Samuel Holland
2022-03-31 23:19   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 09/23] pinctrl: sunxi: Add sunxi GMAC pinmuxes Samuel Holland
2022-03-31 23:19   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 10/23] sunxi: Remove non-DM GMAC pin setup Samuel Holland
2022-03-31 23:20   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 11/23] pinctrl: sunxi: Add sun8i EMAC pinmuxes Samuel Holland
2022-03-31 23:20   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 12/23] net: sun8i_emac: Remove non-DM pin setup Samuel Holland
2022-03-31 23:20   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 13/23] pinctrl: sunxi: Add I2C pinmuxes Samuel Holland
2022-03-27 17:22   ` Andre Przywara
2022-03-18  3:54 ` Samuel Holland [this message]
2022-03-18  3:54 ` [PATCH v2 15/23] sunxi: Remove non-DM I2C clock/pin setup from U-Boot Samuel Holland
2022-03-31 23:20   ` Andre Przywara
2022-04-01  0:04     ` Samuel Holland
2022-03-18  3:54 ` [PATCH v2 16/23] i2c: sun6i_p2wi: Only do non-DM pin setup for non-DM I2C Samuel Holland
2022-03-31 23:20   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 17/23] i2c: sun8i_rsb: " Samuel Holland
2022-03-20  7:17   ` Heinrich Schuchardt
2022-03-20  7:22     ` Heinrich Schuchardt
2022-03-31 23:20   ` Andre Przywara
2022-04-01  0:10     ` Samuel Holland
2022-03-18  3:54 ` [PATCH v2 18/23] pinctrl: sunxi: Add MMC pinmuxes Samuel Holland
2022-03-31 23:20   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 19/23] sunxi: Remove non-DM MMC pin setup Samuel Holland
2022-03-31 23:21   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 20/23] pinctrl: sunxi: Add the A64 PWM pinmux Samuel Holland
2022-03-31 23:21   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 21/23] pwm: sunxi: Remove non-DM pin setup Samuel Holland
2022-03-31 23:21   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 22/23] pinctrl: sunxi: Add SPI0 pinmuxes Samuel Holland
2022-03-31 23:21   ` Andre Przywara
2022-03-18  3:54 ` [PATCH v2 23/23] spi: sun4i_spi: Remove non-DM pin setup Samuel Holland
2022-03-31 23:21   ` Andre Przywara
2022-04-04  0:54 ` [PATCH v2 00/23] sunxi: Add and use a pinctrl driver Andre Przywara
2022-04-04  1:24   ` Samuel Holland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220318035420.15058-15-samuel@sholland.org \
    --to=samuel@sholland.org \
    --cc=andre.przywara@arm.com \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=hs@denx.de \
    --cc=jagan@amarulasolutions.com \
    --cc=joe.hershberger@ni.com \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).