* [PATCH 0/4] ARM: OMAP4: Panda USB Host support and DVI EDID fix
@ 2013-06-18 11:11 Roger Quadros
2013-06-18 11:11 ` [PATCH 1/4] ARM: dts: omap4-panda: Add USB Host support Roger Quadros
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Roger Quadros @ 2013-06-18 11:11 UTC (permalink / raw)
To: tony, b-cousson
Cc: devicetree-discuss, linux-omap, linux-kernel, linux-arm-kernel,
Roger Quadros
Hi Benoit & Tony,
The first two patches make changes to dts files to get USB host support
and DVI EDID to work on Panda.
The third patch should get USB host functional on uEVM.
The fourth patch is a temporary workaround to create a clock alias to
the USB PHY clock as it is not possible to define this via device tree.
This patch is required for USB host to work on Panda and uEVM.
The first 3 patches are for Benoit and the last one is for Tony.
cheers,
-roger
Roger Quadros (4):
ARM: dts: omap4-panda: Add USB Host support
ARM: dts: omap4-panda: Fix DVI EDID reads
ARM: dts: omap5-uevm: Provide USB Host PHY clock frequency
ARM: OMAP2+: dts: HACK: Provide alias to USB PHY clock
arch/arm/boot/dts/omap4-panda-common.dtsi | 67 +++++++++++++++++++++++++++++
arch/arm/boot/dts/omap5-uevm.dts | 7 +++
arch/arm/mach-omap2/board-generic.c | 23 +++++++++-
3 files changed, 96 insertions(+), 1 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/4] ARM: dts: omap4-panda: Add USB Host support
2013-06-18 11:11 [PATCH 0/4] ARM: OMAP4: Panda USB Host support and DVI EDID fix Roger Quadros
@ 2013-06-18 11:11 ` Roger Quadros
[not found] ` <1371553891-29364-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Roger Quadros @ 2013-06-18 11:11 UTC (permalink / raw)
To: tony, b-cousson
Cc: linux-omap, devicetree-discuss, linux-arm-kernel, linux-kernel,
Roger Quadros
Provide the RESET and Power regulators for the USB PHY,
the USB Host port mode and the PHY device.
Also provide pin multiplexer information for the USB host
pins.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/boot/dts/omap4-panda-common.dtsi | 62 +++++++++++++++++++++++++++++
1 files changed, 62 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 00cbaa5..7a21e8e 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -59,6 +59,42 @@
"AFML", "Line In",
"AFMR", "Line In";
};
+
+ /* HS USB Port 1 RESET */
+ hsusb1_reset: hsusb1_reset_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "hsusb1_reset";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 30 0>; /* gpio_62 */
+ startup-delay-us = <70000>;
+ enable-active-high;
+ };
+
+ /* HS USB Port 1 Power */
+ hsusb1_power: hsusb1_power_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "hsusb1_vbus";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio1 1 0>; /* gpio_1 */
+ startup-delay-us = <70000>;
+ enable-active-high;
+ };
+
+ /* HS USB Host PHY on PORT 1 */
+ hsusb1_phy: hsusb1_phy {
+ compatible = "usb-nop-xceiv";
+ reset-supply = <&hsusb1_reset>;
+ vcc-supply = <&hsusb1_power>;
+ /**
+ * FIXME:
+ * put the right clock phandle here when available
+ * clocks = <&auxclk3>;
+ * clock-names = "main_clk";
+ */
+ clock-frequency = <19200000>;
+ };
};
&omap4_pmx_wkup {
@@ -83,6 +119,7 @@
&mcbsp1_pins
&dss_hdmi_pins
&tpd12s015_pins
+ &hsusbb1_pins
>;
twl6030_pins: pinmux_twl6030_pins {
@@ -133,6 +170,23 @@
>;
};
+ hsusbb1_pins: pinmux_hsusbb1_pins {
+ pinctrl-single,pins = <
+ 0x82 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_clk.usbb1_ulpiphy_clk */
+ 0x84 (PIN_OUTPUT | MUX_MODE4) /* usbb1_ulpitll_stp.usbb1_ulpiphy_stp */
+ 0x86 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dir.usbb1_ulpiphy_dir */
+ 0x88 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_nxt.usbb1_ulpiphy_nxt */
+ 0x8a (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0 */
+ 0x8c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat1.usbb1_ulpiphy_dat1 */
+ 0x8e (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat2.usbb1_ulpiphy_dat2 */
+ 0x90 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat3.usbb1_ulpiphy_dat3 */
+ 0x92 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat4.usbb1_ulpiphy_dat4 */
+ 0x94 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat5.usbb1_ulpiphy_dat5 */
+ 0x96 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat6.usbb1_ulpiphy_dat6 */
+ 0x98 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* usbb1_ulpitll_dat7.usbb1_ulpiphy_dat7 */
+ >;
+ };
+
i2c1_pins: pinmux_i2c1_pins {
pinctrl-single,pins = <
0xe2 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
@@ -283,3 +337,11 @@
mode = <3>;
power = <50>;
};
+
+&usbhshost {
+ port1-mode = "ehci-phy";
+};
+
+&usbhsehci {
+ phys = <&hsusb1_phy>;
+};
--
1.7.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] ARM: dts: omap4-panda: Fix DVI EDID reads
[not found] ` <1371553891-29364-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
@ 2013-06-18 11:11 ` Roger Quadros
2013-06-18 13:29 ` Roger Quadros
0 siblings, 1 reply; 8+ messages in thread
From: Roger Quadros @ 2013-06-18 11:11 UTC (permalink / raw)
To: tony-4v6yS6AI5VpBDgjK7y7TUQ, b-cousson-l0cyMroinI0
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Tomi Valkeinen,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Roger Quadros
On Panda the +5V supply for DVI EDID is supplied by the
same regulator that poweres the USB Hub. Currently, the
DSS/DVI subsystem doesn't know how to manage this regulator
and so DVI EDID reads will fail if USB Hub is not enabled.
As a temporary fix we keep this regulator permanently enabled
on boot. This fixes the DVI EDID read problem.
CC: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
arch/arm/boot/dts/omap4-panda-common.dtsi | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 7a21e8e..40df79e 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -80,6 +80,11 @@
gpio = <&gpio1 1 0>; /* gpio_1 */
startup-delay-us = <70000>;
enable-active-high;
+ /*
+ * FIXME: Remove boot-on when DSS can handle this regulator
+ * for DVI EDID.
+ */
+ regulator-boot-on;
};
/* HS USB Host PHY on PORT 1 */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/4] ARM: dts: omap5-uevm: Provide USB Host PHY clock frequency
2013-06-18 11:11 [PATCH 0/4] ARM: OMAP4: Panda USB Host support and DVI EDID fix Roger Quadros
2013-06-18 11:11 ` [PATCH 1/4] ARM: dts: omap4-panda: Add USB Host support Roger Quadros
[not found] ` <1371553891-29364-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
@ 2013-06-18 11:11 ` Roger Quadros
2013-06-18 11:11 ` [PATCH 4/4] ARM: OMAP2+: dts: HACK: Provide alias to USB PHY clock Roger Quadros
3 siblings, 0 replies; 8+ messages in thread
From: Roger Quadros @ 2013-06-18 11:11 UTC (permalink / raw)
To: tony, b-cousson
Cc: linux-omap, devicetree-discuss, linux-arm-kernel, linux-kernel,
Roger Quadros, Sricharan R
USB Host PHY clock on port 2 must be configured to 19.2MHz.
Provide this information.
CC: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/boot/dts/omap5-uevm.dts | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts
index 927db1e..c0ad472 100644
--- a/arch/arm/boot/dts/omap5-uevm.dts
+++ b/arch/arm/boot/dts/omap5-uevm.dts
@@ -40,6 +40,13 @@
hsusb2_phy: hsusb2_phy {
compatible = "usb-nop-xceiv";
reset-supply = <&hsusb2_reset>;
+ /**
+ * FIXME
+ * Put the right clock phandle here when available
+ * clocks = <&auxclk1>;
+ * clock-names = "main_clk";
+ */
+ clock-frequency = <19200000>;
};
/* HS USB Port 3 RESET */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] ARM: OMAP2+: dts: HACK: Provide alias to USB PHY clock
2013-06-18 11:11 [PATCH 0/4] ARM: OMAP4: Panda USB Host support and DVI EDID fix Roger Quadros
` (2 preceding siblings ...)
2013-06-18 11:11 ` [PATCH 3/4] ARM: dts: omap5-uevm: Provide USB Host PHY clock frequency Roger Quadros
@ 2013-06-18 11:11 ` Roger Quadros
2013-06-18 11:23 ` Tony Lindgren
3 siblings, 1 reply; 8+ messages in thread
From: Roger Quadros @ 2013-06-18 11:11 UTC (permalink / raw)
To: tony, b-cousson
Cc: linux-omap, devicetree-discuss, linux-arm-kernel, linux-kernel,
Roger Quadros
Till the OMAP clocks are correctly defined in device tree, use
this temporary hack to provide clock alias to the USB PHY clocks.
Without this, USB Host & Ethernet will not be functional with
device tree boots on Panda and uEVM.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
arch/arm/mach-omap2/board-generic.c | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 88aa6b1..2b2d0de 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -15,6 +15,7 @@
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/irqdomain.h>
+#include <linux/clk.h>
#include <asm/mach/arch.h>
@@ -35,6 +36,21 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
{ }
};
+/*
+ * HACK: create alias for USB host PHY clock.
+ * Remove this when clock phandle can be provided via DT
+ */
+static void __init legacy_init_ehci_clk(char *clkname)
+{
+ int ret;
+
+ ret = clk_add_alias("main_clk", NULL, clkname, NULL);
+ if (ret) {
+ pr_err("%s:Failed to add main_clk alias to %s :%d\n",
+ __func__, clkname, ret);
+ }
+}
+
static void __init omap_generic_init(void)
{
omap_sdrc_init(NULL, NULL);
@@ -45,10 +61,15 @@ static void __init omap_generic_init(void)
* HACK: call display setup code for selected boards to enable omapdss.
* This will be removed when omapdss supports DT.
*/
- if (of_machine_is_compatible("ti,omap4-panda"))
+ if (of_machine_is_compatible("ti,omap4-panda")) {
omap4_panda_display_init_of();
+ legacy_init_ehci_clk("auxclk3_ck");
+
+ }
else if (of_machine_is_compatible("ti,omap4-sdp"))
omap_4430sdp_display_init_of();
+ else if (of_machine_is_compatible("ti,omap5-uevm"))
+ legacy_init_ehci_clk("auxclk1_ck");
}
#ifdef CONFIG_SOC_OMAP2420
--
1.7.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] ARM: OMAP2+: dts: HACK: Provide alias to USB PHY clock
2013-06-18 11:11 ` [PATCH 4/4] ARM: OMAP2+: dts: HACK: Provide alias to USB PHY clock Roger Quadros
@ 2013-06-18 11:23 ` Tony Lindgren
2013-06-18 12:33 ` Roger Quadros
0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2013-06-18 11:23 UTC (permalink / raw)
To: Roger Quadros
Cc: b-cousson, linux-omap, devicetree-discuss, linux-arm-kernel,
linux-kernel
* Roger Quadros <rogerq@ti.com> [130618 04:17]:
> Till the OMAP clocks are correctly defined in device tree, use
> this temporary hack to provide clock alias to the USB PHY clocks.
>
> Without this, USB Host & Ethernet will not be functional with
> device tree boots on Panda and uEVM.
Thanks, this looks OK to me to have USB working until we have the
DT defined clock patches ready.
The $Subject needs updating though, just make it ARM: OMAP2+: and
leave out the dts and hack from there.
Regards,
Tony
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> ---
> arch/arm/mach-omap2/board-generic.c | 23 ++++++++++++++++++++++-
> 1 files changed, 22 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
> index 88aa6b1..2b2d0de 100644
> --- a/arch/arm/mach-omap2/board-generic.c
> +++ b/arch/arm/mach-omap2/board-generic.c
> @@ -15,6 +15,7 @@
> #include <linux/of_irq.h>
> #include <linux/of_platform.h>
> #include <linux/irqdomain.h>
> +#include <linux/clk.h>
>
> #include <asm/mach/arch.h>
>
> @@ -35,6 +36,21 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
> { }
> };
>
> +/*
> + * HACK: create alias for USB host PHY clock.
> + * Remove this when clock phandle can be provided via DT
> + */
> +static void __init legacy_init_ehci_clk(char *clkname)
> +{
> + int ret;
> +
> + ret = clk_add_alias("main_clk", NULL, clkname, NULL);
> + if (ret) {
> + pr_err("%s:Failed to add main_clk alias to %s :%d\n",
> + __func__, clkname, ret);
> + }
> +}
> +
> static void __init omap_generic_init(void)
> {
> omap_sdrc_init(NULL, NULL);
> @@ -45,10 +61,15 @@ static void __init omap_generic_init(void)
> * HACK: call display setup code for selected boards to enable omapdss.
> * This will be removed when omapdss supports DT.
> */
> - if (of_machine_is_compatible("ti,omap4-panda"))
> + if (of_machine_is_compatible("ti,omap4-panda")) {
> omap4_panda_display_init_of();
> + legacy_init_ehci_clk("auxclk3_ck");
> +
> + }
> else if (of_machine_is_compatible("ti,omap4-sdp"))
> omap_4430sdp_display_init_of();
> + else if (of_machine_is_compatible("ti,omap5-uevm"))
> + legacy_init_ehci_clk("auxclk1_ck");
> }
>
> #ifdef CONFIG_SOC_OMAP2420
> --
> 1.7.4.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] ARM: OMAP2+: dts: HACK: Provide alias to USB PHY clock
2013-06-18 11:23 ` Tony Lindgren
@ 2013-06-18 12:33 ` Roger Quadros
0 siblings, 0 replies; 8+ messages in thread
From: Roger Quadros @ 2013-06-18 12:33 UTC (permalink / raw)
To: Tony Lindgren
Cc: b-cousson, linux-omap, devicetree-discuss, linux-arm-kernel,
linux-kernel
On 06/18/2013 02:23 PM, Tony Lindgren wrote:
> * Roger Quadros <rogerq@ti.com> [130618 04:17]:
>> Till the OMAP clocks are correctly defined in device tree, use
>> this temporary hack to provide clock alias to the USB PHY clocks.
>>
>> Without this, USB Host & Ethernet will not be functional with
>> device tree boots on Panda and uEVM.
>
> Thanks, this looks OK to me to have USB working until we have the
> DT defined clock patches ready.
>
> The $Subject needs updating though, just make it ARM: OMAP2+: and
> leave out the dts and hack from there.
>
OK. will send v2 as i need to make another minor change in the panda dts file.
cheers,
-roger
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/4] ARM: dts: omap4-panda: Fix DVI EDID reads
2013-06-18 11:11 ` [PATCH 2/4] ARM: dts: omap4-panda: Fix DVI EDID reads Roger Quadros
@ 2013-06-18 13:29 ` Roger Quadros
0 siblings, 0 replies; 8+ messages in thread
From: Roger Quadros @ 2013-06-18 13:29 UTC (permalink / raw)
To: tony
Cc: b-cousson, devicetree-discuss, linux-kernel, Tomi Valkeinen,
linux-omap, linux-arm-kernel, Roger Quadros
On 06/18/2013 02:11 PM, Roger Quadros wrote:
> On Panda the +5V supply for DVI EDID is supplied by the
> same regulator that poweres the USB Hub. Currently, the
> DSS/DVI subsystem doesn't know how to manage this regulator
> and so DVI EDID reads will fail if USB Hub is not enabled.
>
> As a temporary fix we keep this regulator permanently enabled
> on boot. This fixes the DVI EDID read problem.
>
> CC: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> ---
> arch/arm/boot/dts/omap4-panda-common.dtsi | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
> index 7a21e8e..40df79e 100644
> --- a/arch/arm/boot/dts/omap4-panda-common.dtsi
> +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
> @@ -80,6 +80,11 @@
> gpio = <&gpio1 1 0>; /* gpio_1 */
> startup-delay-us = <70000>;
> enable-active-high;
> + /*
> + * FIXME: Remove boot-on when DSS can handle this regulator
> + * for DVI EDID.
> + */
> + regulator-boot-on;
As pointed out by Tomi, the correct usage here is "regulator-always-on".
The reason I use "regulator-boot-on" is because the regulator framework doesn't
turn on the regulator. (maybe a bug in the regulator framework?)
"regulator-boot-on" is not sufficient as it doesn't prevent drivers from turning it
off. e.g. loading and unloading the USB host driver will turn of the regulator.
So it must be used along with "regulator-always-on"
I'll fix this in v2.
cheers,
-roger
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-06-18 13:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 11:11 [PATCH 0/4] ARM: OMAP4: Panda USB Host support and DVI EDID fix Roger Quadros
2013-06-18 11:11 ` [PATCH 1/4] ARM: dts: omap4-panda: Add USB Host support Roger Quadros
[not found] ` <1371553891-29364-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2013-06-18 11:11 ` [PATCH 2/4] ARM: dts: omap4-panda: Fix DVI EDID reads Roger Quadros
2013-06-18 13:29 ` Roger Quadros
2013-06-18 11:11 ` [PATCH 3/4] ARM: dts: omap5-uevm: Provide USB Host PHY clock frequency Roger Quadros
2013-06-18 11:11 ` [PATCH 4/4] ARM: OMAP2+: dts: HACK: Provide alias to USB PHY clock Roger Quadros
2013-06-18 11:23 ` Tony Lindgren
2013-06-18 12:33 ` Roger Quadros
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).