From: Sjoerd Simons Date: Fri, 21 Nov 2014 17:05:11 +0100 Subject: [U-Boot] [PATCH v2 2/2] odroid: usbhost - Add missing gpio_request call In-Reply-To: <1416533190-10662-2-git-send-email-suriyan.r@gmail.com> References: <1416533190-10662-1-git-send-email-suriyan.r@gmail.com> <1416533190-10662-2-git-send-email-suriyan.r@gmail.com> Message-ID: <1416585911.14356.3.camel@collabora.co.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 2014-11-20 at 17:26 -0800, Suriyan Ramasami wrote: > 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 > Acked-by: Przemyslaw Marczak Tested on top of u-boot-samsung head (6a23c6533c880d557e786df81fa21b62168db6d9), with this patch ethernet support work on my Odroid X2 (emmc boot). Free free to add, Tested-by: Sjoerd Simons > --- > > Changes in v2: > - Add comment why max77686_set_buck_mode() has been removed > Series-changes: 1 > - Added gpio_request() call in board_gpio_init() > > board/samsung/odroid/odroid.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c > index f7396ab..a2c008e 100644 > --- a/board/samsung/odroid/odroid.c > +++ b/board/samsung/odroid/odroid.c > @@ -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 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 6170 bytes Desc: not available URL: