* [PATCH 1/4] arm: omap5: dts: fix reg property size
2013-07-15 15:33 [PATCH 0/4] Enable USB3 for OMAP5 Felipe Balbi
@ 2013-07-15 15:33 ` Felipe Balbi
2013-07-15 15:33 ` [PATCH 2/4] arm: omap5: hwmod: add missing ocp2scp hwmod data Felipe Balbi
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Felipe Balbi @ 2013-07-15 15:33 UTC (permalink / raw)
To: linux-arm-kernel
USB3 block has a 64KiB space, another 64KiB is
used for the wrapper.
Without this change, resource_size() will get
confused and driver won't probe because size
will be negative.
Signed-off-by: Felipe Balbi <balbi@ti•com>
---
arch/arm/boot/dts/omap5.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index e643620..5c99f19 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -637,7 +637,7 @@
omap_dwc3 at 4a020000 {
compatible = "ti,dwc3";
ti,hwmods = "usb_otg_ss";
- reg = <0x4a020000 0x1000>;
+ reg = <0x4a020000 0x10000>;
interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <1>;
@@ -645,7 +645,7 @@
ranges;
dwc3 at 4a030000 {
compatible = "synopsys,dwc3";
- reg = <0x4a030000 0x1000>;
+ reg = <0x4a030000 0x10000>;
interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
usb-phy = <&usb2_phy>, <&usb3_phy>;
tx-fifo-resize;
--
1.8.2.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/4] arm: omap5: hwmod: add missing ocp2scp hwmod data
2013-07-15 15:33 [PATCH 0/4] Enable USB3 for OMAP5 Felipe Balbi
2013-07-15 15:33 ` [PATCH 1/4] arm: omap5: dts: fix reg property size Felipe Balbi
@ 2013-07-15 15:33 ` Felipe Balbi
2013-07-15 15:43 ` Kishon Vijay Abraham I
2013-07-15 15:33 ` [PATCH 3/4] arm: omap5: dts: add palmas-usb node Felipe Balbi
2013-07-15 15:33 ` [PATCH 4/4] arm: omap2plus_defconfig: enable dwc3 and dependencies Felipe Balbi
3 siblings, 1 reply; 8+ messages in thread
From: Felipe Balbi @ 2013-07-15 15:33 UTC (permalink / raw)
To: linux-arm-kernel
From: Benoit Cousson <benoit.cousson@linaro•org>
without that hwmod data, USB3 will not in OMAP5 boards.
While at that, also fix DTS data to pass reg property,
otherwise driver won't probe.
Signed-off-by: Benoit Cousson <benoit.cousson@linaro•org>
Signed-off-by: Felipe Balbi <balbi@ti•com>
---
arch/arm/boot/dts/omap5.dtsi | 3 +-
arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 45 ++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 5c99f19..4e41409 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -652,10 +652,11 @@
};
};
- ocp2scp {
+ ocp2scp at 4a080000 {
compatible = "ti,omap-ocp2scp";
#address-cells = <1>;
#size-cells = <1>;
+ reg = <0x4a080000 0x20>;
ranges;
ti,hwmods = "ocp2scp1";
usb2_phy: usb2phy at 4a084000 {
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
index f37ae96..542eddd 100644
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
@@ -1114,6 +1114,42 @@ static struct omap_hwmod omap54xx_mpu_hwmod = {
};
/*
+ * 'ocp2scp' class
+ * bridge to transform ocp interface protocol to scp (serial control port)
+ * protocol
+ */
+
+static struct omap_hwmod_class_sysconfig omap54xx_ocp2scp_sysc = {
+ .rev_offs = 0x0000,
+ .sysc_offs = 0x0010,
+ .syss_offs = 0x0014,
+ .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
+ SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
+ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+ .sysc_fields = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap54xx_ocp2scp_hwmod_class = {
+ .name = "ocp2scp",
+ .sysc = &omap54xx_ocp2scp_sysc,
+};
+
+/* ocp2scp1 */
+static struct omap_hwmod omap54xx_ocp2scp1_hwmod = {
+ .name = "ocp2scp1",
+ .class = &omap54xx_ocp2scp_hwmod_class,
+ .clkdm_name = "l3init_clkdm",
+ .main_clk = "l4_root_clk_div",
+ .prcm = {
+ .omap4 = {
+ .clkctrl_offs = OMAP54XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
+ .context_offs = OMAP54XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
+ .modulemode = MODULEMODE_HWCTRL,
+ },
+ },
+};
+
+/*
* 'timer' class
* general purpose timer module with accurate 1ms tick
* This class contains several variants: ['timer_1ms', 'timer']
@@ -1919,6 +1955,14 @@ static struct omap_hwmod_ocp_if omap54xx_l4_cfg__mpu = {
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
+/* l4_cfg -> ocp2scp1 */
+static struct omap_hwmod_ocp_if omap54xx_l4_cfg__ocp2scp1 = {
+ .master = &omap54xx_l4_cfg_hwmod,
+ .slave = &omap54xx_ocp2scp1_hwmod,
+ .clk = "l4_root_clk_div",
+ .user = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
/* l4_wkup -> timer1 */
static struct omap_hwmod_ocp_if omap54xx_l4_wkup__timer1 = {
.master = &omap54xx_l4_wkup_hwmod,
@@ -2121,6 +2165,7 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
&omap54xx_l4_per__mmc4,
&omap54xx_l4_per__mmc5,
&omap54xx_l4_cfg__mpu,
+ &omap54xx_l4_cfg__ocp2scp1,
&omap54xx_l4_wkup__timer1,
&omap54xx_l4_per__timer2,
&omap54xx_l4_per__timer3,
--
1.8.2.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/4] arm: omap5: hwmod: add missing ocp2scp hwmod data
2013-07-15 15:33 ` [PATCH 2/4] arm: omap5: hwmod: add missing ocp2scp hwmod data Felipe Balbi
@ 2013-07-15 15:43 ` Kishon Vijay Abraham I
2013-07-15 15:46 ` Felipe Balbi
0 siblings, 1 reply; 8+ messages in thread
From: Kishon Vijay Abraham I @ 2013-07-15 15:43 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Monday 15 July 2013 09:03 PM, Felipe Balbi wrote:
> From: Benoit Cousson <benoit.cousson@linaro•org>
>
> without that hwmod data, USB3 will not in OMAP5 boards.
>
> While at that, also fix DTS data to pass reg property,
> otherwise driver won't probe.
>
> Signed-off-by: Benoit Cousson <benoit.cousson@linaro•org>
> Signed-off-by: Felipe Balbi <balbi@ti•com>
> ---
> arch/arm/boot/dts/omap5.dtsi | 3 +-
> arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 45 ++++++++++++++++++++++++++++++
> 2 files changed, 47 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
> index 5c99f19..4e41409 100644
> --- a/arch/arm/boot/dts/omap5.dtsi
> +++ b/arch/arm/boot/dts/omap5.dtsi
> @@ -652,10 +652,11 @@
> };
> };
>
> - ocp2scp {
> + ocp2scp at 4a080000 {
While at that, can we also name it ocp2scp1 since we have 3 instances of
ocp2scp and it'll conflict when we want to add it for SATA and PCIE.
Thanks
Kishon
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 2/4] arm: omap5: hwmod: add missing ocp2scp hwmod data
2013-07-15 15:43 ` Kishon Vijay Abraham I
@ 2013-07-15 15:46 ` Felipe Balbi
2013-07-16 12:24 ` Tony Lindgren
0 siblings, 1 reply; 8+ messages in thread
From: Felipe Balbi @ 2013-07-15 15:46 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 15, 2013 at 09:13:32PM +0530, Kishon Vijay Abraham I wrote:
> Hi,
>
> On Monday 15 July 2013 09:03 PM, Felipe Balbi wrote:
> > From: Benoit Cousson <benoit.cousson@linaro•org>
> >
> > without that hwmod data, USB3 will not in OMAP5 boards.
> >
> > While at that, also fix DTS data to pass reg property,
> > otherwise driver won't probe.
> >
> > Signed-off-by: Benoit Cousson <benoit.cousson@linaro•org>
> > Signed-off-by: Felipe Balbi <balbi@ti•com>
> > ---
> > arch/arm/boot/dts/omap5.dtsi | 3 +-
> > arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 45 ++++++++++++++++++++++++++++++
> > 2 files changed, 47 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
> > index 5c99f19..4e41409 100644
> > --- a/arch/arm/boot/dts/omap5.dtsi
> > +++ b/arch/arm/boot/dts/omap5.dtsi
> > @@ -652,10 +652,11 @@
> > };
> > };
> >
> > - ocp2scp {
> > + ocp2scp at 4a080000 {
>
> While at that, can we also name it ocp2scp1 since we have 3 instances of
> ocp2scp and it'll conflict when we want to add it for SATA and PCIE.
Tony/Benoit, you want that in same patch or as a separate patch
altogether ?
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130715/a33075f5/attachment.sig>
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 2/4] arm: omap5: hwmod: add missing ocp2scp hwmod data
2013-07-15 15:46 ` Felipe Balbi
@ 2013-07-16 12:24 ` Tony Lindgren
0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2013-07-16 12:24 UTC (permalink / raw)
To: linux-arm-kernel
* Felipe Balbi <balbi@ti•com> [130715 08:52]:
> On Mon, Jul 15, 2013 at 09:13:32PM +0530, Kishon Vijay Abraham I wrote:
> > Hi,
> >
> > On Monday 15 July 2013 09:03 PM, Felipe Balbi wrote:
> > > From: Benoit Cousson <benoit.cousson@linaro•org>
> > >
> > > without that hwmod data, USB3 will not in OMAP5 boards.
> > >
> > > While at that, also fix DTS data to pass reg property,
> > > otherwise driver won't probe.
> > >
> > > Signed-off-by: Benoit Cousson <benoit.cousson@linaro•org>
> > > Signed-off-by: Felipe Balbi <balbi@ti•com>
> > > ---
> > > arch/arm/boot/dts/omap5.dtsi | 3 +-
> > > arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 45 ++++++++++++++++++++++++++++++
> > > 2 files changed, 47 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
> > > index 5c99f19..4e41409 100644
> > > --- a/arch/arm/boot/dts/omap5.dtsi
> > > +++ b/arch/arm/boot/dts/omap5.dtsi
> > > @@ -652,10 +652,11 @@
> > > };
> > > };
> > >
> > > - ocp2scp {
> > > + ocp2scp at 4a080000 {
> >
> > While at that, can we also name it ocp2scp1 since we have 3 instances of
> > ocp2scp and it'll conflict when we want to add it for SATA and PCIE.
Hmm the differentiatior is the name, so ocp2scp at 4a800000 should
be enough and actually follows the naming standars where the name
should describe the type. I guess it could be just ocp at 4a080000
or scp at 4a080000 but I think it translates both ways, so ocp2scp
is probably pretty good.
> Tony/Benoit, you want that in same patch or as a separate patch
> altogether ?
Please do the .dts changes in separate patches as they should
get merged separately for most part.
Regards,
Tony
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/4] arm: omap5: dts: add palmas-usb node
2013-07-15 15:33 [PATCH 0/4] Enable USB3 for OMAP5 Felipe Balbi
2013-07-15 15:33 ` [PATCH 1/4] arm: omap5: dts: fix reg property size Felipe Balbi
2013-07-15 15:33 ` [PATCH 2/4] arm: omap5: hwmod: add missing ocp2scp hwmod data Felipe Balbi
@ 2013-07-15 15:33 ` Felipe Balbi
2013-07-15 15:33 ` [PATCH 4/4] arm: omap2plus_defconfig: enable dwc3 and dependencies Felipe Balbi
3 siblings, 0 replies; 8+ messages in thread
From: Felipe Balbi @ 2013-07-15 15:33 UTC (permalink / raw)
To: linux-arm-kernel
Without this node, there will be no palmas
driver to notify dwc3 that a cable has
been connected and, without that, dwc3
will never initialize.
Signed-off-by: Felipe Balbi <balbi@ti•com>
---
arch/arm/boot/dts/omap5-uevm.dts | 10 ++++++++++
arch/arm/boot/dts/omap5.dtsi | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts
index 08b7267..badceb8 100644
--- a/arch/arm/boot/dts/omap5-uevm.dts
+++ b/arch/arm/boot/dts/omap5-uevm.dts
@@ -272,6 +272,11 @@
interrupt-controller;
#interrupt-cells = <2>;
+ extcon_usb3: palmas_usb {
+ compatible = "ti,palmas-usb";
+ ti,wakeup;
+ };
+
palmas_pmic {
compatible = "ti,palmas-pmic";
interrupt-parent = <&palmas>;
@@ -450,6 +455,11 @@
phys = <0 &hsusb2_phy &hsusb3_phy>;
};
+&usb3 {
+ extcon = <&extcon_usb3>;
+ vbus-supply = <&smps10_reg>;
+};
+
&mcspi1 {
};
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 4e41409..1659246 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -634,7 +634,7 @@
ti,type = <2>;
};
- omap_dwc3 at 4a020000 {
+ usb3: omap_dwc3 at 4a020000 {
compatible = "ti,dwc3";
ti,hwmods = "usb_otg_ss";
reg = <0x4a020000 0x10000>;
--
1.8.2.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 4/4] arm: omap2plus_defconfig: enable dwc3 and dependencies
2013-07-15 15:33 [PATCH 0/4] Enable USB3 for OMAP5 Felipe Balbi
` (2 preceding siblings ...)
2013-07-15 15:33 ` [PATCH 3/4] arm: omap5: dts: add palmas-usb node Felipe Balbi
@ 2013-07-15 15:33 ` Felipe Balbi
3 siblings, 0 replies; 8+ messages in thread
From: Felipe Balbi @ 2013-07-15 15:33 UTC (permalink / raw)
To: linux-arm-kernel
DWC3 enables USB3 functionality for OMAP5 boards,
it's safe to enable those drivers in omap2plus_defconfig.
Signed-off-by: Felipe Balbi <balbi@ti•com>
---
arch/arm/configs/omap2plus_defconfig | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 5339e6a..aed3cce 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -81,6 +81,7 @@ CONFIG_CMA=y
CONFIG_CONNECTOR=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_OMAP_OCP2SCP=y
CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=y
@@ -167,9 +168,11 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_CPU_THERMAL=y
CONFIG_OMAP_WATCHDOG=y
CONFIG_TWL4030_WATCHDOG=y
+CONFIG_MFD_PALMAS=y
CONFIG_MFD_TPS65217=y
CONFIG_MFD_TPS65910=y
CONFIG_TWL6040_CORE=y
+CONFIG_REGULATOR_PALMAS=y
CONFIG_REGULATOR_TWL4030=y
CONFIG_REGULATOR_TPS65023=y
CONFIG_REGULATOR_TPS6507X=y
@@ -222,10 +225,14 @@ CONFIG_USB_MON=y
CONFIG_USB_WDM=y
CONFIG_USB_STORAGE=y
CONFIG_USB_LIBUSUAL=y
+CONFIG_USB_DWC3=m
+CONFIG_USB_DWC3_OMAP=m
CONFIG_USB_TEST=y
CONFIG_USB_PHY=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_GADGET=y
+CONFIG_OMAP_USB2=y
+CONFIG_OMAP_USB3=y
CONFIG_USB_GADGET_DEBUG=y
CONFIG_USB_GADGET_DEBUG_FILES=y
CONFIG_USB_GADGET_DEBUG_FS=y
@@ -258,6 +265,8 @@ CONFIG_TI_THERMAL=y
CONFIG_OMAP4_THERMAL=y
CONFIG_OMAP5_THERMAL=y
CONFIG_DRA752_THERMAL=y
+CONFIG_EXTCON=y
+CONFIG_EXTCON_PALMAS=y
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
# CONFIG_EXT3_FS_XATTR is not set
--
1.8.2.1
^ permalink raw reply related [flat|nested] 8+ messages in thread