From: Jagan Teki <jagannadh.teki@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7 12/17] SabreSD: Enable DM_USB
Date: Tue, 23 May 2017 13:28:25 +0530 [thread overview]
Message-ID: <1495526310-5543-13-git-send-email-jteki@openedev.com> (raw)
In-Reply-To: <1495526310-5543-1-git-send-email-jteki@openedev.com>
From: Jagan Teki <jagan@openedev.com>
Enable DM_USB and removed non-DM_USB related config options.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
---
arch/arm/cpu/armv7/mx6/Kconfig | 1 +
board/freescale/mx6sabresd/mx6sabresd.c | 65 ---------------------------------
include/configs/mx6sabresd.h | 11 ++----
3 files changed, 5 insertions(+), 72 deletions(-)
diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index f203cf6..d1ba801 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -218,6 +218,7 @@ config TARGET_MX6SABRESD
select DM_MMC
select DM_REGULATOR
select DM_THERMAL
+ select DM_USB
select PINCTRL
select PINCTRL_IMX6
select SUPPORT_SPL
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 7af263d..688b326 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -26,7 +26,6 @@
#include <power/pmic.h>
#include <power/pfuze100_pmic.h>
#include "../common/pfuze.h"
-#include <usb.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -392,67 +391,6 @@ int board_eth_init(bd_t *bis)
return cpu_eth_init(bis);
}
-#ifdef CONFIG_USB_EHCI_MX6
-#define USB_OTHERREGS_OFFSET 0x800
-#define UCTRL_PWR_POL (1 << 9)
-
-static iomux_v3_cfg_t const usb_otg_pads[] = {
- IOMUX_PADS(PAD_EIM_D22__USB_OTG_PWR | MUX_PAD_CTRL(NO_PAD_CTRL)),
- IOMUX_PADS(PAD_ENET_RX_ER__USB_OTG_ID | MUX_PAD_CTRL(NO_PAD_CTRL)),
-};
-
-static iomux_v3_cfg_t const usb_hc1_pads[] = {
- IOMUX_PADS(PAD_ENET_TXD1__GPIO1_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL)),
-};
-
-static void setup_usb(void)
-{
- SETUP_IOMUX_PADS(usb_otg_pads);
-
- /*
- * set daisy chain for otg_pin_id on 6q.
- * for 6dl, this bit is reserved
- */
- imx_iomux_set_gpr_register(1, 13, 1, 0);
-
- SETUP_IOMUX_PADS(usb_hc1_pads);
-}
-
-int board_ehci_hcd_init(int port)
-{
- u32 *usbnc_usb_ctrl;
-
- if (port > 1)
- return -EINVAL;
-
- usbnc_usb_ctrl = (u32 *)(USB_BASE_ADDR + USB_OTHERREGS_OFFSET +
- port * 4);
-
- setbits_le32(usbnc_usb_ctrl, UCTRL_PWR_POL);
-
- return 0;
-}
-
-int board_ehci_power(int port, int on)
-{
- switch (port) {
- case 0:
- break;
- case 1:
- if (on)
- gpio_direction_output(IMX_GPIO_NR(1, 29), 1);
- else
- gpio_direction_output(IMX_GPIO_NR(1, 29), 0);
- break;
- default:
- printf("MXC USB port %d not yet supported\n", port);
- return -EINVAL;
- }
-
- return 0;
-}
-#endif
-
int board_early_init_f(void)
{
setup_iomux_uart();
@@ -475,9 +413,6 @@ int board_init(void)
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info1);
else
setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1);
-#ifdef CONFIG_USB_EHCI_MX6
- setup_usb();
-#endif
return 0;
}
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index b90afe0..44c7cf6 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -66,13 +66,10 @@
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
/* USB Configs */
-#ifdef CONFIG_CMD_USB
-#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
-#define CONFIG_USB_HOST_ETHER
-#define CONFIG_USB_ETHER_ASIX
-#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
-#define CONFIG_MXC_USB_FLAGS 0
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Enabled USB controller number */
+#ifdef CONFIG_USB_EHCI_MX6
+# define CONFIG_USB_HOST_ETHER
+# define CONFIG_USB_ETHER_ASIX
+# define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
#endif
#endif /* __MX6QSABRESD_CONFIG_H */
--
1.9.1
next prev parent reply other threads:[~2017-05-23 7:58 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 7:58 [U-Boot] [PATCH v7 00/17] ARM: i.MX6: SabreSD: Add dts support Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 01/17] ARM: i.MX6: sabresd: Remove SPL_I2C_SUPPORT Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 02/17] ARM: dts: i.MX6: Add imx6qdl-sabresd.dtsi Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 03/17] ARM: dts: i.MX6: Add imx6q-sabresd.dts Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 04/17] ARM: dts: i.MX6: Add imx6dl-sabresd.dts Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 05/17] ARM: dts: i.MX6: Add imx6qp.dtsi Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 06/17] ARM: dts: i.MX6: Add imx6qp-sabresd.dts Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 07/17] sabresd: i.MX6Q: Add initial dts support Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 08/17] sabresd: i.MX6QP: " Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 09/17] SabreSD: i.MX6DL: " Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 10/17] SabreSD: Move CONFIG_SYS_I2C_MXC to defconfigs Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 11/17] SabreSD: Enable CONFIG_DM_REGULATOR Jagan Teki
2017-05-23 7:58 ` Jagan Teki [this message]
2017-05-23 7:58 ` [U-Boot] [PATCH v7 13/17] i.MX6: Sabre: Move CONFIG_FEC_MXC to defconfigs Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 14/17] net: fec_mxc: Add 'phy-reset-gpios' support Jagan Teki
2017-05-23 10:53 ` Fabio Estevam
2017-06-16 14:13 ` Lothar Waßmann
2017-05-23 7:58 ` [U-Boot] [PATCH v7 15/17] i.MX6: SabreSD: Enable DM_ETH Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 16/17] i.MX6: sabresd: Drop checkboard Jagan Teki
2017-05-23 7:58 ` [U-Boot] [PATCH v7 17/17] i.MX6: SabreSD: Cleanup board code Jagan Teki
2017-05-26 16:41 ` [U-Boot] [PATCH v7 00/17] ARM: i.MX6: SabreSD: Add dts support Jagan Teki
2017-05-26 16:47 ` Fabio Estevam
2017-05-26 16:49 ` Jagan Teki
2017-05-26 16:52 ` Fabio Estevam
2017-05-26 16:55 ` Jagan Teki
2017-05-26 17:04 ` Fabio Estevam
2017-05-26 17:14 ` Jagan Teki
2017-05-26 17:17 ` Fabio Estevam
2017-05-26 17:28 ` Jagan Teki
2017-05-26 17:34 ` Fabio Estevam
2017-05-26 17:45 ` Jagan Teki
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=1495526310-5543-13-git-send-email-jteki@openedev.com \
--to=jagannadh.teki@gmail.com \
--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