mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
ipq5018: Enable usb power gpio output
Gpio out need to be enabled for re-spin boards. Signed-off-by: Manikanta Mylavarapu <mmanikan@codeaurora.org> Change-Id: I711ed313170fb6268d1d5b9d70f2966bae481241
This commit is contained in:
parent
ac3c252cf1
commit
53e68f335e
5 changed files with 11 additions and 2 deletions
|
|
@ -113,6 +113,7 @@
|
||||||
|
|
||||||
usb0: xhci@8a00000 {
|
usb0: xhci@8a00000 {
|
||||||
ssphy = <1>;
|
ssphy = <1>;
|
||||||
|
usb_pwr_gpio = <24>;
|
||||||
usb_gpio {
|
usb_gpio {
|
||||||
pwr_gpio {
|
pwr_gpio {
|
||||||
gpio = <24>;
|
gpio = <24>;
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
usb0: xhci@8a00000 {
|
usb0: xhci@8a00000 {
|
||||||
|
usb_pwr_gpio = <24>;
|
||||||
usb_gpio {
|
usb_gpio {
|
||||||
pwr_gpio {
|
pwr_gpio {
|
||||||
gpio = <24>;
|
gpio = <24>;
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
usb0: xhci@8a00000 {
|
usb0: xhci@8a00000 {
|
||||||
|
usb_pwr_gpio = <24>;
|
||||||
usb_gpio {
|
usb_gpio {
|
||||||
pwr_gpio {
|
pwr_gpio {
|
||||||
gpio = <24>;
|
gpio = <24>;
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
usb0: xhci@8a00000 {
|
usb0: xhci@8a00000 {
|
||||||
|
usb_pwr_gpio = <24>;
|
||||||
usb_gpio {
|
usb_gpio {
|
||||||
pwr_gpio {
|
pwr_gpio {
|
||||||
gpio = <24>;
|
gpio = <24>;
|
||||||
|
|
|
||||||
|
|
@ -1343,7 +1343,9 @@ void board_usb_deinit(int id)
|
||||||
gpio_node, "gpio", 0);
|
gpio_node, "gpio", 0);
|
||||||
unsigned int *gpio_base =
|
unsigned int *gpio_base =
|
||||||
(unsigned int *)GPIO_CONFIG_ADDR(gpio);
|
(unsigned int *)GPIO_CONFIG_ADDR(gpio);
|
||||||
|
int usb_pwr_gpio = fdtdec_get_int(gd->fdt_blob, nodeoff, "usb_pwr_gpio", 0);
|
||||||
writel(0xC1, gpio_base);
|
writel(0xC1, gpio_base);
|
||||||
|
gpio_set_value(usb_pwr_gpio, GPIO_OUT_LOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1497,7 +1499,7 @@ static void usb_init_phy(int index, int ssphy)
|
||||||
|
|
||||||
int ipq_board_usb_init(void)
|
int ipq_board_usb_init(void)
|
||||||
{
|
{
|
||||||
int i, nodeoff, ssphy, gpio_node;
|
int i, nodeoff, ssphy, gpio_node, usb_pwr_gpio;
|
||||||
char node_name[8];
|
char node_name[8];
|
||||||
|
|
||||||
if(readl(EUD_EUD_EN2)) {
|
if(readl(EUD_EUD_EN2)) {
|
||||||
|
|
@ -1528,8 +1530,11 @@ int ipq_board_usb_init(void)
|
||||||
/* USB power GPIO for drive 5V */
|
/* USB power GPIO for drive 5V */
|
||||||
gpio_node =
|
gpio_node =
|
||||||
fdt_subnode_offset(gd->fdt_blob, nodeoff, "usb_gpio");
|
fdt_subnode_offset(gd->fdt_blob, nodeoff, "usb_gpio");
|
||||||
if (gpio_node >= 0)
|
if (gpio_node >= 0) {
|
||||||
qca_gpio_init(gpio_node);
|
qca_gpio_init(gpio_node);
|
||||||
|
usb_pwr_gpio = fdtdec_get_int(gd->fdt_blob, nodeoff, "usb_pwr_gpio", 0);
|
||||||
|
gpio_set_value(usb_pwr_gpio, GPIO_OUT_HIGH);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue