rpcd: iwinfo plugin fixes
[openwrt.git] / package / boot / uboot-sunxi / patches / 017-usb-add-support-for-usb3-vbus-pin.patch
1 From 60fa63012fcdc3c4ec1497bf5e358f0a90b40949 Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Fri, 18 Mar 2016 08:42:01 +0100
4 Subject: [PATCH] sunxi: Add support for USB vbus pin for USB3
5
6 The H3 has USB0 - USB3, add support for having a USB vbus pin for USB3.
7
8 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 Acked-by: Ian Campbell <ijc@hellion.org.uk>
10 ---
11  arch/arm/cpu/armv7/sunxi/usb_phy.c | 1 +
12  board/sunxi/Kconfig                | 6 ++++++
13  2 files changed, 7 insertions(+)
14
15 diff --git a/arch/arm/cpu/armv7/sunxi/usb_phy.c b/arch/arm/cpu/armv7/sunxi/usb_phy.c
16 index 6ac96cc..0749fbd 100644
17 --- a/arch/arm/cpu/armv7/sunxi/usb_phy.c
18 +++ b/arch/arm/cpu/armv7/sunxi/usb_phy.c
19 @@ -76,6 +76,7 @@ static int get_vbus_gpio(int index)
20         case 0: return sunxi_name_to_gpio(CONFIG_USB0_VBUS_PIN);
21         case 1: return sunxi_name_to_gpio(CONFIG_USB1_VBUS_PIN);
22         case 2: return sunxi_name_to_gpio(CONFIG_USB2_VBUS_PIN);
23 +       case 3: return sunxi_name_to_gpio(CONFIG_USB3_VBUS_PIN);
24         }
25         return -EINVAL;
26  }
27 diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
28 index 5e9d3af..5e72fac 100644
29 --- a/board/sunxi/Kconfig
30 +++ b/board/sunxi/Kconfig
31 @@ -342,6 +342,12 @@ config USB2_VBUS_PIN
32         ---help---
33         See USB1_VBUS_PIN help text.
34  
35 +config USB3_VBUS_PIN
36 +       string "Vbus enable pin for usb3 (ehci2)"
37 +       default ""
38 +       ---help---
39 +       See USB1_VBUS_PIN help text.
40 +
41  config I2C0_ENABLE
42         bool "Enable I2C/TWI controller 0"
43         default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I