[PATCH] ARM: dts: dra7-evm: Add extcon nodes for USB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: George Cherian <george.cherian@xxxxxx>

Add extcon nodes for USB, without which USB won't
work.

EXTCON is used to tell dwc3-omap.ko that a cable
has been connected. It also passes the state of ID
pin so that can be written to UTMI_STATUS register
on dwc3-omap's address space.

Signed-off-by: George Cherian <george.cherian@xxxxxx>
Signed-off-by: Sekhar Nori <nsekhar@xxxxxx>
Signed-off-by: Felipe Balbi <balbi@xxxxxx>
---

**********************************************************
**							**
**			UNTESTED			**
**********************************************************

This patch was taken from TI's v3.14 tree available at [1],
the patch was tested there. I didn't test on v3.18-rc3 because
my DRA7 board has broken down. Working to get a replacement.

Anyway, I'd suggest Tony to wait for a Tested-by tag.

Note that in order for this to work you need following extra
patches:

http://marc.info/?l=linux-omap&m=141503217215492&w=2
http://marc.info/?l=linux-omap&m=141503238715590&w=2
http://marc.info/?l=linux-omap&m=141503246515631&w=2
http://marc.info/?l=linux-omap&m=141503241315599&w=2
http://marc.info/?l=linux-omap&m=141503282815782&w=2

[1] http://git.ti.com/ti-linux-kernel/ti-linux-kernel/commits/ti-linux-3.14.y

 arch/arm/boot/dts/dra7-evm.dts | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index c6ce625..7710f29 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -26,6 +26,18 @@
 		regulator-max-microvolt = <3300000>;
 	};
 
+	extcon1: dra7x_usbid_extcon1 {
+		compatible = "linux,extcon-gpio";
+		gpios = <&pcf_gpio_21 1 GPIO_ACTIVE_LOW>;
+		cable-name = "USB-HOST";
+	};
+
+	extcon2: dra7x_usbid_extcon2 {
+		compatible = "linux,extcon-gpio";
+		gpios = <&pcf_gpio_21 2 GPIO_ACTIVE_LOW>;
+		cable-name = "USB-HOST";
+	};
+
 	vtt_fixed: fixedregulator-vtt {
 		compatible = "regulator-fixed";
 		regulator-name = "vtt_fixed";
@@ -291,6 +303,19 @@
 			};
 		};
 	};
+
+	pcf_gpio_21: gpio@21 {
+		compatible = "ti,pcf8575";
+		reg = <0x21>;
+		lines-initial-states = <0x1408>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-parent = <&gpio6>;
+		interrupts = <14 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
 };
 
 &i2c2 {
@@ -420,6 +445,14 @@
 	};
 };
 
+&omap_dwc3_1 {
+	extcon = <&extcon1>;
+};
+
+&omap_dwc3_2 {
+	extcon = <&extcon2>;
+};
+
 &usb1 {
 	dr_mode = "peripheral";
 	pinctrl-names = "default";
-- 
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux