]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
odroid: usbhost - Add missing gpio_request call
authorSuriyan Ramasami <suriyan.r@gmail.com>
Fri, 21 Nov 2014 01:26:30 +0000 (17:26 -0800)
committerMinkyu Kang <mk7.kang@samsung.com>
Mon, 24 Nov 2014 01:40:24 +0000 (10:40 +0900)
The USB host code was missing gpio_request() calls before using the gpio
functions, causing errors to be printed out.

As a side note calls to max77686_set_buck_mode(OPMODE_OFF/OPMODE_ON) have
been removed, as they did not have any effect. This is as per Przemyslaw:
I looked into the documentation and there is a "ENB8" pin in PMIC package.
This pin allows steering BUCK8 ON/OFF by the hardware. If ENB8 is set to low
then you can do on/off. If high, then you cannot change its state by I2C
write, which seems to be the case with the Odroids.

Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/odroid/odroid.c

index f7396ab4c411f9bfbdbae6b7e79e00f21964a7b4..a2c008e76e587984350a91bce04453dd7b802c97 100644 (file)
@@ -382,6 +382,17 @@ static void board_gpio_init(void)
        gpio_set_pull(EXYNOS4X12_GPIO_X31, S5P_GPIO_PULL_UP);
        gpio_set_drv(EXYNOS4X12_GPIO_X31, S5P_GPIO_DRV_4X);
        gpio_direction_input(EXYNOS4X12_GPIO_X31);
+
+#ifdef CONFIG_CMD_USB
+       /* USB3503A Reference frequency */
+       gpio_request(EXYNOS4X12_GPIO_X30, "USB3503A RefFreq");
+
+       /* USB3503A Connect */
+       gpio_request(EXYNOS4X12_GPIO_X34, "USB3503A Connect");
+
+       /* USB3503A Reset */
+       gpio_request(EXYNOS4X12_GPIO_X35, "USB3503A Reset");
+#endif
 }
 
 static int pmic_init_max77686(void)
@@ -489,10 +500,8 @@ int board_usb_init(int index, enum usb_init_type init)
 
        p_pmic = pmic_get("MAX77686_PMIC");
        if (p_pmic && !pmic_probe(p_pmic)) {
-               max77686_set_buck_mode(p_pmic, 8, OPMODE_OFF);
                max77686_set_buck_voltage(p_pmic, 8, 750000);
                max77686_set_buck_voltage(p_pmic, 8, 3300000);
-               max77686_set_buck_mode(p_pmic, 8, OPMODE_ON);
        }
 
 #endif