imx6: aristainetos: convert to DM_USB
authorHeiko Schocher <hs@denx.de>
Sun, 1 Dec 2019 10:23:16 +0000 (11:23 +0100)
committerStefano Babic <sbabic@denx.de>
Tue, 7 Jan 2020 09:26:55 +0000 (10:26 +0100)
Drop CONFIG_USB_MAX_CONTROLLER_COUNT and enable DM_USB
in defconfig.

Signed-off-by: Heiko Schocher <hs@denx.de>
board/aristainetos/aristainetos.c
configs/aristainetos2_defconfig
include/configs/aristainetos2.h

index 5639eefa15cdfec954ad9ac4940c95089153e7ca..c2218cb5c2686574846ad72e5c421973a41600ca 100644 (file)
@@ -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 &&
index 3d36f38e77284a5b369f91debebeb5a3955efaec..ea60e17804ad69e705696f03431b8eebca14fe1f 100644 (file)
@@ -78,11 +78,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
index b008928c06445bc9b4ba9daf149e93555a0cbfb4..269162eabfe17bd4c84d90b46c96b1492b010abc 100644 (file)
@@ -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 */
 #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