public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 13/29] imx6: aristainetos: convert to DM_USB
Date: Sun,  1 Dec 2019 11:23:16 +0100	[thread overview]
Message-ID: <20191201102332.21397-14-hs@denx.de> (raw)
In-Reply-To: <20191201102332.21397-1-hs@denx.de>

Drop CONFIG_USB_MAX_CONTROLLER_COUNT and enable DM_USB
in defconfig.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 board/aristainetos/aristainetos.c | 35 -------------------------------
 configs/aristainetos2_defconfig   |  4 ++++
 include/configs/aristainetos2.h   |  3 ---
 3 files changed, 4 insertions(+), 38 deletions(-)

diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c
index 5639eefa15..c2218cb5c2 100644
--- a/board/aristainetos/aristainetos.c
+++ b/board/aristainetos/aristainetos.c
@@ -102,15 +102,6 @@ struct i2c_pads_info i2c_pad_info4 = {
 	}
 };
 
-static iomux_v3_cfg_t const misc_pads[] = {
-	/* USB_OTG_ID = GPIO1_24*/
-	MX6_PAD_ENET_RX_ER__USB_OTG_ID		| MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* H1 Power enable = GPIO1_0*/
-	MX6_PAD_GPIO_0__USB_H1_PWR		| MUX_PAD_CTRL(NO_PAD_CTRL),
-	/* OTG Power enable = GPIO4_15*/
-	MX6_PAD_KEY_ROW4__USB_OTG_PWR		| MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
 iomux_v3_cfg_t const enet_pads[] = {
 	MX6_PAD_ENET_MDIO__ENET_MDIO		| MUX_PAD_CTRL(ENET_PAD_CTRL),
 	MX6_PAD_ENET_MDC__ENET_MDC		| MUX_PAD_CTRL(ENET_PAD_CTRL),
@@ -815,7 +806,6 @@ int board_init(void)
 
 	/* GPIO_1 for USB_OTG_ID */
 	clrsetbits_le32(&iomux->gpr[1], IOMUXC_GPR1_USB_OTG_ID_SEL_MASK, 0);
-	imx_iomux_v3_setup_multiple_pads(misc_pads, ARRAY_SIZE(misc_pads));
 	return 0;
 }
 
@@ -825,31 +815,6 @@ int checkboard(void)
 	return 0;
 }
 
-#ifdef CONFIG_USB_EHCI_MX6
-int board_ehci_hcd_init(int port)
-{
-	int ret;
-
-	ret = gpio_request(ARISTAINETOS_USB_H1_PWR, "usb-h1-pwr");
-	if (!ret)
-		gpio_direction_output(ARISTAINETOS_USB_H1_PWR, 1);
-	ret = gpio_request(ARISTAINETOS_USB_OTG_PWR, "usb-OTG-pwr");
-	if (!ret)
-		gpio_direction_output(ARISTAINETOS_USB_OTG_PWR, 1);
-	return 0;
-}
-
-int board_ehci_power(int port, int on)
-{
-	if (port)
-		gpio_set_value(ARISTAINETOS_USB_OTG_PWR, on);
-	else
-		gpio_set_value(ARISTAINETOS_USB_H1_PWR, on);
-
-	return 0;
-}
-#endif
-
 int board_fit_config_name_match(const char *name)
 {
 	if (gd->board_type == BOARD_TYPE_4 &&
diff --git a/configs/aristainetos2_defconfig b/configs/aristainetos2_defconfig
index 4253e4b562..05af602dc8 100644
--- a/configs/aristainetos2_defconfig
+++ b/configs/aristainetos2_defconfig
@@ -77,11 +77,15 @@ CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_PMIC=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_PWM_IMX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_VIDEO=y
diff --git a/include/configs/aristainetos2.h b/include/configs/aristainetos2.h
index b008928c06..269162eabf 100644
--- a/include/configs/aristainetos2.h
+++ b/include/configs/aristainetos2.h
@@ -31,8 +31,6 @@
 		"ubifsload ${fit_addr_r} /boot/system.itb; " \
 		"imi ${fit_addr_r}\0 "
 
-#define ARISTAINETOS_USB_OTG_PWR	IMX_GPIO_NR(4, 15)
-#define ARISTAINETOS_USB_H1_PWR	IMX_GPIO_NR(1, 0)
 #define CONFIG_GPIO_ENABLE_SPI_FLASH	IMX_GPIO_NR(2, 15)
 
 /* Framebuffer */
@@ -189,7 +187,6 @@
 #define CONFIG_RTC_M41T11
 
 /* USB Configs */
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET	/* For OTG port */
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS	0
-- 
2.21.0

  parent reply	other threads:[~2019-12-01 10:23 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-01 10:23 [U-Boot] [PATCH v1 00/29] convert aristainetos board to DM Heiko Schocher
2019-12-01 10:23 ` [U-Boot] [PATCH v1 01/29] imx6: remove aristainetos board Heiko Schocher
2019-12-29 10:25   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 02/29] video: lg4573: convert to DM Heiko Schocher
2019-12-29 10:25   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 03/29] imx6: aristainetos: move defines to Kconfig Heiko Schocher
2019-12-29 10:27   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 04/29] imx6: aristainetos: remove 2b version Heiko Schocher
2019-12-29 10:25   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 05/29] imx6: aristainetos: disable gigabit support Heiko Schocher
2019-12-29 10:24   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 06/29] imx6: aristainetos: add device tree from linux Heiko Schocher
2019-12-29 10:28   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 07/29] imx6: aristainetos: add thumb build Heiko Schocher
2019-12-29 10:26   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 08/29] imx6: aristainetos: remove aristainetos-v2.c Heiko Schocher
2019-12-29 10:25   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 09/29] imx6: aristainetos: prepare dts for other board versions Heiko Schocher
2019-12-29 10:27   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 10/29] imx6: aristainetos: add DM_SERIAL support Heiko Schocher
2019-12-29 10:27   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 11/29] imx6: aristainetos: convert to DM_MMC Heiko Schocher
2019-12-29 10:27   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 12/29] imx6: aristainetos: convert gpio pins to DM and DTS Heiko Schocher
2019-12-29 10:28   ` sbabic at denx.de
2019-12-01 10:23 ` Heiko Schocher [this message]
2019-12-29 10:27   ` [U-Boot] [PATCH v1 13/29] imx6: aristainetos: convert to DM_USB sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 14/29] imx6: aristainetos: convert CONFIG_DM_SPI Heiko Schocher
2019-12-29 10:27   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 15/29] imx6: aristainetos: enable DM_ETH Heiko Schocher
2019-12-29 10:26   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 16/29] imx6: aristainetos: add DM_VIDEO support Heiko Schocher
2019-12-29 10:28   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 17/29] imx6: aristainetos: add DM_I2C support Heiko Schocher
2019-12-29 10:24   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 18/29] imx6: aristainetos: convert to DM_PWM/DM_BACKLIGHT Heiko Schocher
2019-12-29 10:26   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 19/29] imx6: aristainetos: get rid of CONFIG_BOARDNAME Heiko Schocher
2019-12-29 10:26   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 20/29] imx6: aristainetos: add i2c eeprom support Heiko Schocher
2019-12-29 10:28   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 21/29] imx6: aristainetos: add AUTOBOOT_KEYED Heiko Schocher
2019-12-29 10:28   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 22/29] imx6: aristainetos: add version variable Heiko Schocher
2019-12-29 10:24   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 23/29] imx6: aristainetos: cleanup bootmode settings Heiko Schocher
2019-12-29 10:24   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 24/29] imx6: aristainetos: WDT DM conversion enable WDT reset Heiko Schocher
2019-12-29 10:27   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 25/29] imx6: aristainetos: cleanup default Environment Heiko Schocher
2019-12-29 10:28   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 26/29] imx6: aristainetos: enable HAB boot Heiko Schocher
2019-12-29 10:25   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 27/29] imx6: aristainetos: readd aristainetos 2b board Heiko Schocher
2019-12-29 10:26   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 28/29] imx6: aristainetos: add aristainetos 2b csl Heiko Schocher
2019-12-29 10:29   ` sbabic at denx.de
2019-12-01 10:23 ` [U-Boot] [PATCH v1 29/29] imx6: aristainetos: add support for rev C board Heiko Schocher
2019-12-29 10:25   ` sbabic at denx.de

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=20191201102332.21397-14-hs@denx.de \
    --to=hs@denx.de \
    --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