[PATCH v4][ 1/8] ARM: dts: mx25: USB block requires only one clock

2014-03-13 Thread Denis Carikli
From: Fabio Estevam fabio.este...@freescale.com

Like other imx SoCs only one USB clock is needed on mx25.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 arch/arm/boot/dts/imx25.dtsi |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 77bb743..829791e 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -496,8 +496,7 @@
compatible = fsl,imx25-usb, fsl,imx27-usb;
reg = 0x53ff4000 0x0200;
interrupts = 37;
-   clocks = clks 9, clks 70, clks 8;
-   clock-names = ipg, ahb, per;
+   clocks = clks 70;
fsl,usbmisc = usbmisc 0;
status = disabled;
};
@@ -506,8 +505,7 @@
compatible = fsl,imx25-usb, fsl,imx27-usb;
reg = 0x53ff4400 0x0200;
interrupts = 35;
-   clocks = clks 9, clks 70, clks 8;
-   clock-names = ipg, ahb, per;
+   clocks = clks 70;
fsl,usbmisc = usbmisc 1;
status = disabled;
};
-- 
1.7.9.5

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


[PATCH v4][ 4/8] ARM: dts: imx25.dtsi: Fix USB support.

2014-03-13 Thread Denis Carikli
From: Fabio Estevam fabio.este...@freescale.com

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v3-v4:
- Added Fabio Estevam's Signed-off-by: it was given
  as a mail response to this patch.
- Moved the compatible of usbphy on top to match the other nodes.
- the usb phy's names were renamed from usbphy to usb-phy.
- The patch renaming the fsl,usbphy property in usb-phy was removed.
  So this patch was adapted to that.

Changelog v2-v3:
- rebased on top of the usb: chipidea: Use standard usb-phy property. patch.
- Fixed the usbphy nodes index and added and added a reg property.

Changelog v1-v2:
- The usbphy nodes were made to look like the ones in imx53.dtsi
- The patch was rebased on top of the clock fixes commits.
---
 arch/arm/boot/dts/imx25.dtsi |   29 ++---
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 829791e..18f68f3 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -482,22 +482,13 @@
clocks = clks 99;
};
 
-   usbphy1: usbphy@1 {
-   compatible = nop-usbphy;
-   status = disabled;
-   };
-
-   usbphy2: usbphy@2 {
-   compatible = nop-usbphy;
-   status = disabled;
-   };
-
usbotg: usb@53ff4000 {
compatible = fsl,imx25-usb, fsl,imx27-usb;
reg = 0x53ff4000 0x0200;
interrupts = 37;
clocks = clks 70;
fsl,usbmisc = usbmisc 0;
+   fsl,usbphy = usbphy0;
status = disabled;
};
 
@@ -507,6 +498,7 @@
interrupts = 35;
clocks = clks 70;
fsl,usbmisc = usbmisc 1;
+   fsl,usbphy = usbphy1;
status = disabled;
};
 
@@ -516,7 +508,6 @@
clocks = clks 9, clks 70, clks 8;
clock-names = ipg, ahb, per;
reg = 0x53ff4600 0x00f;
-   status = disabled;
};
 
dryice@53ffc000 {
@@ -548,4 +539,20 @@
};
};
};
+
+   usbphy {
+   compatible = simple-bus;
+   #address-cells = 1;
+   #size-cells = 0;
+
+   usbphy0: usb-phy@0 {
+   reg = 0;
+   compatible = usb-nop-xceiv;
+   };
+
+   usbphy1: usb-phy@1 {
+   reg = 1;
+   compatible = usb-nop-xceiv;
+   };
+   };
 };
-- 
1.7.9.5

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


[PATCH v4][ 5/8] ARM: dts: mbimxsd25 baseboard: Add USB support

2014-03-13 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v1-v2:
- With the clock fix patches, the usb gadget also work.
  So I've set the otg port to otg instead of host.
---
 .../boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts  |   13 +
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts 
b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
index 62fb3da..ad12da3 100644
--- a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
+++ b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
@@ -172,3 +172,16 @@
fsl,uart-has-rtscts;
status = okay;
 };
+
+usbhost1 {
+   phy_type = serial;
+   dr_mode = host;
+   status = okay;
+};
+
+usbotg {
+   phy_type = utmi;
+   dr_mode = otg;
+   external-vbus-divider;
+   status = okay;
+};
-- 
1.7.9.5

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


[PATCH v4][ 2/8] ARM: dts: mx35: USB block requires only one clock

2014-03-13 Thread Denis Carikli
From: Fabio Estevam fabio.este...@freescale.com

Like other imx SoCs only one USB clock is needed on mx35.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 arch/arm/boot/dts/imx35.dtsi |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
index e59ccb4..474a73d 100644
--- a/arch/arm/boot/dts/imx35.dtsi
+++ b/arch/arm/boot/dts/imx35.dtsi
@@ -296,8 +296,7 @@
compatible = fsl,imx35-usb, fsl,imx27-usb;
reg = 0x53ff4000 0x0200;
interrupts = 37;
-   clocks = clks 9, clks 73, clks 28;
-   clock-names = ipg, ahb, per;
+   clocks = clks 73;
fsl,usbmisc = usbmisc 0;
status = disabled;
};
@@ -306,8 +305,7 @@
compatible = fsl,imx35-usb, fsl,imx27-usb;
reg = 0x53ff4400 0x0200;
interrupts = 35;
-   clocks = clks 9, clks 73, clks 28;
-   clock-names = ipg, ahb, per;
+   clocks = clks 73;
fsl,usbmisc = usbmisc 1;
status = disabled;
};
-- 
1.7.9.5

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


[PATCH v4][ 3/8] usb: chipidea: usbmisc: Add USB support for i.MX25/i.MX35 CPUs

2014-03-13 Thread Denis Carikli
This adds the i.MX25 and the i.MX35 support in the
ChipIdea usbmisc driver.

The i.MX25 and i.MX35 usb controllers are similar enough to be
able to use the same code.

Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v3-v4:
- The MXC_EHCI_INTERFACE_* were renamed in MX25_EHCI_INTERFACE_*
- Since the peripheral mode also works with USB OTG,
  the commit summary was updated to reflect that.

Changelog v2-v3:
- Add a commit log

Changelog v1-v2:
- converted two remaining defines to BIT()
- Removed a variable declaration that was not used in usbmisc_imx25_init
---
 drivers/usb/chipidea/usbmisc_imx.c |   58 
 1 file changed, 58 insertions(+)

diff --git a/drivers/usb/chipidea/usbmisc_imx.c 
b/drivers/usb/chipidea/usbmisc_imx.c
index cd061ab..419b895 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -21,6 +21,26 @@
 #define MX25_USB_PHY_CTRL_OFFSET   0x08
 #define MX25_BM_EXTERNAL_VBUS_DIVIDER  BIT(23)
 
+#define MX25_EHCI_INTERFACE_SINGLE_UNI (2  0)
+#define MX25_EHCI_INTERFACE_DIFF_UNI   (0  0)
+#define MX25_EHCI_INTERFACE_MASK   (0xf)
+
+#define MX25_OTG_SIC_SHIFT 29
+#define MX25_OTG_SIC_MASK  (0x3  MX25_OTG_SIC_SHIFT)
+#define MX25_OTG_PM_BITBIT(24)
+#define MX25_OTG_PP_BITBIT(11)
+#define MX25_OTG_OCPOL_BIT BIT(3)
+
+#define MX25_H1_SIC_SHIFT  21
+#define MX25_H1_SIC_MASK   (0x3  MX25_H1_SIC_SHIFT)
+#define MX25_H1_PP_BIT BIT(18)
+#define MX25_H1_PM_BIT BIT(16)
+#define MX25_H1_IPPUE_UP_BIT   BIT(7)
+#define MX25_H1_IPPUE_DOWN_BIT BIT(6)
+#define MX25_H1_TLL_BITBIT(5)
+#define MX25_H1_USBTE_BIT  BIT(4)
+#define MX25_H1_OCPOL_BIT  BIT(2)
+
 #define MX27_H1_PM_BIT BIT(8)
 #define MX27_H2_PM_BIT BIT(16)
 #define MX27_OTG_PM_BITBIT(24)
@@ -50,6 +70,39 @@ struct imx_usbmisc {
 
 static struct imx_usbmisc *usbmisc;
 
+static int usbmisc_imx25_init(struct imx_usbmisc_data *data)
+{
+   unsigned long flags;
+   u32 val = 0;
+
+   if (data-index  1)
+   return -EINVAL;
+
+   spin_lock_irqsave(usbmisc-lock, flags);
+   switch (data-index) {
+   case 0:
+   val = readl(usbmisc-base);
+   val = ~(MX25_OTG_SIC_MASK | MX25_OTG_PP_BIT);
+   val |= (MX25_EHCI_INTERFACE_DIFF_UNI  
MX25_EHCI_INTERFACE_MASK)  MX25_OTG_SIC_SHIFT;
+   val |= (MX25_OTG_PM_BIT | MX25_OTG_OCPOL_BIT);
+   writel(val, usbmisc-base);
+   break;
+   case 1:
+   val = readl(usbmisc-base);
+   val = ~(MX25_H1_SIC_MASK | MX25_H1_PP_BIT |  
MX25_H1_IPPUE_UP_BIT);
+   val |= (MX25_EHCI_INTERFACE_SINGLE_UNI  
MX25_EHCI_INTERFACE_MASK)  MX25_H1_SIC_SHIFT;
+   val |= (MX25_H1_PM_BIT | MX25_H1_OCPOL_BIT | MX25_H1_TLL_BIT |
+   MX25_H1_USBTE_BIT | MX25_H1_IPPUE_DOWN_BIT);
+
+   writel(val, usbmisc-base);
+
+   break;
+   }
+   spin_unlock_irqrestore(usbmisc-lock, flags);
+
+   return 0;
+}
+
 static int usbmisc_imx25_post(struct imx_usbmisc_data *data)
 {
void __iomem *reg;
@@ -159,6 +212,7 @@ static int usbmisc_imx6q_init(struct imx_usbmisc_data *data)
 }
 
 static const struct usbmisc_ops imx25_usbmisc_ops = {
+   .init = usbmisc_imx25_init,
.post = usbmisc_imx25_post,
 };
 
@@ -200,6 +254,10 @@ static const struct of_device_id usbmisc_imx_dt_ids[] = {
.data = imx25_usbmisc_ops,
},
{
+   .compatible = fsl,imx35-usbmisc,
+   .data = imx25_usbmisc_ops,
+   },
+   {
.compatible = fsl,imx27-usbmisc,
.data = imx27_usbmisc_ops,
},
-- 
1.7.9.5

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


[PATCH v4][ 7/8] ARM: dts: mbimxsd35 baseboard: Add USB support.

2014-03-13 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v1-v2:
- With the clock fix patches, the usb gadget also work.
  So I've set the otg port to otg instead of host.
- Before I forgott to set dr_mode to host in the usbhost port.
  That is now fixed.
---
 .../boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts  |   13 +
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts 
b/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
index 71197b9..f04ae91 100644
--- a/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
+++ b/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
@@ -150,3 +150,16 @@
fsl,uart-has-rtscts;
status = okay;
 };
+
+usbhost1 {
+   phy_type = serial;
+   dr_mode = host;
+   status = okay;
+};
+
+usbotg {
+   phy_type = utmi;
+   dr_mode = otg;
+   external-vbus-divider;
+   status = okay;
+};
-- 
1.7.9.5

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


[PATCH v4][ 8/8] ARM: imx_v4_v5_defconfig: Enable drivers for i.MX25/i.MX35 USB support.

2014-03-13 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v2-v3:
- Extra gadget drivers additions were removed from this patch.

Changelog v1-v2:
- With the clock fix patches, the usb gadget also work.
  So I've addeed it to this patch too.
- CONFIG_USB_OTG_FSM=y was not needed, so it was removed.
---
 arch/arm/configs/imx_v4_v5_defconfig |6 ++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/configs/imx_v4_v5_defconfig 
b/arch/arm/configs/imx_v4_v5_defconfig
index f1aeb7d..ec9b365 100644
--- a/arch/arm/configs/imx_v4_v5_defconfig
+++ b/arch/arm/configs/imx_v4_v5_defconfig
@@ -80,6 +80,7 @@ CONFIG_MTD_UBI=y
 CONFIG_EEPROM_AT24=y
 CONFIG_EEPROM_AT25=y
 CONFIG_ATA=y
+CONFIG_BLK_DEV_SD=y
 CONFIG_PATA_IMX=y
 CONFIG_NETDEVICES=y
 CONFIG_CS89x0=y
@@ -153,6 +154,11 @@ CONFIG_USB_HID=m
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_MXC=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_NOP_USB_XCEIV=y
 CONFIG_MMC=y
 CONFIG_MMC_UNSAFE_RESUME=y
 CONFIG_MMC_SDHCI=y
-- 
1.7.9.5

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


[PATCH v4][ 6/8] ARM: dts: i.MX35: Add USB support.

2014-03-13 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v3-v4:
- Moved the compatible of usbphy on top to match the other nodes.
- the usb phy's names were renamed from usbphy to usb-phy.
- The patch renaming the fsl,usbphy property in usb-phy was removed.
  So this patch was adapted to that.

Changelog v2-v3:
- rebased on top of the usb: chipidea: Use standard usb-phy property. patch.
- Fixed the usbphy nodes index and added and added a reg property.

Changelog v1-v2:
- The usbphy nodes were made to look like the ones in imx53.dtsi
- The patch was rebased on top of the clock fixes commits.
---
 arch/arm/boot/dts/imx35.dtsi |   18 ++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
index 474a73d..4759abb 100644
--- a/arch/arm/boot/dts/imx35.dtsi
+++ b/arch/arm/boot/dts/imx35.dtsi
@@ -298,6 +298,7 @@
interrupts = 37;
clocks = clks 73;
fsl,usbmisc = usbmisc 0;
+   fsl,usbphy = usbphy0;
status = disabled;
};
 
@@ -307,6 +308,7 @@
interrupts = 35;
clocks = clks 73;
fsl,usbmisc = usbmisc 1;
+   fsl,usbphy = usbphy1;
status = disabled;
};
 
@@ -355,4 +357,20 @@
};
};
};
+
+   usbphy {
+   compatible = simple-bus;
+   #address-cells = 1;
+   #size-cells = 0;
+
+   usbphy0: usb-phy@0 {
+   reg = 0;
+   compatible = usb-nop-xceiv;
+   };
+
+   usbphy1: usb-phy@1 {
+   reg = 1;
+   compatible = usb-nop-xceiv;
+   };
+   };
 };
-- 
1.7.9.5

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


Re: [PATCH v3][ 5/9] ARM: dts: imx25.dtsi: Fix USB support.

2014-03-13 Thread Denis Carikli

On 03/12/2014 12:08 PM, Fabio Estevam wrote:

Hi Denis,

Hi,


As you add me in the From field, you also need to add:

Signed-off-by: Fabio Estevam fabio.este...@freescale.com above your
Signed-off-by line.

Thanks.


+   usbphy {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = simple-bus;


I made this comment earlier: why do we place usbphy0/1 under simple-bus?


The official ePAPR 1.1 standard talks about the system on a chip's 
internal I/O bus.
So, I wonder if, in general, it makes sense to group together, with a 
simple-bus compatible, potentially different usb phy, which are 
connected to potentially different usb controllers.


Still if I remove it from the usbphy node, I get the following messages 
more than once in dmesg:

 ci_hdrc ci_hdrc.0: no usb2 phy configured
 platform ci_hdrc.0: Driver ci_hdrc requests probe deferral
 ci_hdrc ci_hdrc.1: no usb2 phy configured
 platform ci_hdrc.1: Driver ci_hdrc requests probe deferral

With at the end lsusb printing nothing.


This is not documented in the the bindings.
I don't think that the simple-bus has to be added to 
Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt because that 
file only talks about what became usbphy's subnodes.


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


[PATCH v3][ 1/9] ARM: dts: mx25: USB block requires only one clock

2014-03-12 Thread Denis Carikli
From: Fabio Estevam fabio.este...@freescale.com

Like other imx SoCs only one USB clock is needed on mx25.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 arch/arm/boot/dts/imx25.dtsi |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 77bb743..829791e 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -496,8 +496,7 @@
compatible = fsl,imx25-usb, fsl,imx27-usb;
reg = 0x53ff4000 0x0200;
interrupts = 37;
-   clocks = clks 9, clks 70, clks 8;
-   clock-names = ipg, ahb, per;
+   clocks = clks 70;
fsl,usbmisc = usbmisc 0;
status = disabled;
};
@@ -506,8 +505,7 @@
compatible = fsl,imx25-usb, fsl,imx27-usb;
reg = 0x53ff4400 0x0200;
interrupts = 35;
-   clocks = clks 9, clks 70, clks 8;
-   clock-names = ipg, ahb, per;
+   clocks = clks 70;
fsl,usbmisc = usbmisc 1;
status = disabled;
};
-- 
1.7.9.5

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


[PATCH v3][ 3/9] usb: chipidea: Use standard usb-phy property.

2014-03-12 Thread Denis Carikli
This converts the Chipidea usbmisc driver to
use the standard usb-phy property.

It also adapt the dts that uses it.

Signed-off-by: Denis Carikli de...@eukrea.com
---
 arch/arm/boot/dts/imx23.dtsi   |2 +-
 arch/arm/boot/dts/imx27.dtsi   |4 ++--
 arch/arm/boot/dts/imx28.dtsi   |4 ++--
 arch/arm/boot/dts/imx51.dtsi   |2 +-
 arch/arm/boot/dts/imx53.dtsi   |4 ++--
 arch/arm/boot/dts/imx6qdl.dtsi |4 ++--
 arch/arm/boot/dts/imx6sl.dtsi  |4 ++--
 drivers/usb/chipidea/ci_hdrc_imx.c |2 +-
 8 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi
index bbcfb5a..e3c9924 100644
--- a/arch/arm/boot/dts/imx23.dtsi
+++ b/arch/arm/boot/dts/imx23.dtsi
@@ -522,7 +522,7 @@
compatible = fsl,imx23-usb, fsl,imx27-usb;
reg = 0x8008 0x4;
interrupts = 11;
-   fsl,usbphy = usbphy0;
+   usb-phy = usbphy0;
clocks = clks 40;
status = disabled;
};
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 83a8247..94bcf1a 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -466,7 +466,7 @@
interrupts = 56;
clocks = clks 15;
fsl,usbmisc = usbmisc 0;
-   fsl,usbphy = usbphy0;
+   usb-phy = usbphy0;
status = disabled;
};
 
@@ -485,7 +485,7 @@
interrupts = 55;
clocks = clks 15;
fsl,usbmisc = usbmisc 2;
-   fsl,usbphy = usbphy2;
+   usb-phy = usbphy2;
status = disabled;
};
 
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index 90a5795..52ad72f 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -1143,7 +1143,7 @@
reg = 0x8008 0x1;
interrupts = 93;
clocks = clks 60;
-   fsl,usbphy = usbphy0;
+   usb-phy = usbphy0;
status = disabled;
};
 
@@ -1152,7 +1152,7 @@
reg = 0x8009 0x1;
interrupts = 92;
clocks = clks 61;
-   fsl,usbphy = usbphy1;
+   usb-phy = usbphy1;
status = disabled;
};
 
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index cb3204a..b290947 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -249,7 +249,7 @@
interrupts = 18;
clocks = clks IMX5_CLK_USBOH3_GATE;
fsl,usbmisc = usbmisc 0;
-   fsl,usbphy = usbphy0;
+   usb-phy = usbphy0;
status = disabled;
};
 
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index f0962e5..b10a3de 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -276,7 +276,7 @@
interrupts = 18;
clocks = clks IMX5_CLK_USBOH3_GATE;
fsl,usbmisc = usbmisc 0;
-   fsl,usbphy = usbphy0;
+   usb-phy = usbphy0;
status = disabled;
};
 
@@ -286,7 +286,7 @@
interrupts = 14;
clocks = clks IMX5_CLK_USBOH3_GATE;
fsl,usbmisc = usbmisc 1;
-   fsl,usbphy = usbphy1;
+   usb-phy = usbphy1;
status = disabled;
};
 
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index cfc85be..d2f0087 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -789,7 +789,7 @@
reg = 0x02184000 0x200;
interrupts = 0 43 IRQ_TYPE_LEVEL_HIGH;
clocks = clks 162;
-   fsl,usbphy = usbphy1;
+   usb-phy = usbphy1;
fsl,usbmisc = usbmisc 0;
status = disabled;
};
@@ -799,7 +799,7 @@
reg = 0x02184200

[PATCH v3][ 6/9] ARM: dts: mbimxsd25 baseboard: Add USB support

2014-03-12 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v1-v2:
- With the clock fix patches, the usb gadget also work.
  So I've set the otg port to otg instead of host.
---
 .../boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts  |   13 +
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts 
b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
index 62fb3da..ad12da3 100644
--- a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
+++ b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
@@ -172,3 +172,16 @@
fsl,uart-has-rtscts;
status = okay;
 };
+
+usbhost1 {
+   phy_type = serial;
+   dr_mode = host;
+   status = okay;
+};
+
+usbotg {
+   phy_type = utmi;
+   dr_mode = otg;
+   external-vbus-divider;
+   status = okay;
+};
-- 
1.7.9.5

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


[PATCH v3][ 4/9] usb: chipidea: usbmisc: Add USB Host support for i.MX25/i.MX35 CPUs

2014-03-12 Thread Denis Carikli
This adds the i.MX25 and the i.MX35 support in the
ChipIdea usbmisc driver.

The i.MX25 and i.MX35 usb controllers are similar enough to be
able to use the same code.

Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v2-v3:
- Add a commit log

Changelog v1-v2:
- converted two remaining defines to BIT()
- Removed a variable declaration that was not used in usbmisc_imx25_init
---
 drivers/usb/chipidea/usbmisc_imx.c |   58 
 1 file changed, 58 insertions(+)

diff --git a/drivers/usb/chipidea/usbmisc_imx.c 
b/drivers/usb/chipidea/usbmisc_imx.c
index cd061ab..3523c09 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -21,6 +21,26 @@
 #define MX25_USB_PHY_CTRL_OFFSET   0x08
 #define MX25_BM_EXTERNAL_VBUS_DIVIDER  BIT(23)
 
+#define MXC_EHCI_INTERFACE_SINGLE_UNI  (2  0)
+#define MXC_EHCI_INTERFACE_DIFF_UNI(0  0)
+#define MXC_EHCI_INTERFACE_MASK(0xf)
+
+#define MX25_OTG_SIC_SHIFT 29
+#define MX25_OTG_SIC_MASK  (0x3  MX25_OTG_SIC_SHIFT)
+#define MX25_OTG_PM_BITBIT(24)
+#define MX25_OTG_PP_BITBIT(11)
+#define MX25_OTG_OCPOL_BIT BIT(3)
+
+#define MX25_H1_SIC_SHIFT  21
+#define MX25_H1_SIC_MASK   (0x3  MX25_H1_SIC_SHIFT)
+#define MX25_H1_PP_BIT BIT(18)
+#define MX25_H1_PM_BIT BIT(16)
+#define MX25_H1_IPPUE_UP_BIT   BIT(7)
+#define MX25_H1_IPPUE_DOWN_BIT BIT(6)
+#define MX25_H1_TLL_BITBIT(5)
+#define MX25_H1_USBTE_BIT  BIT(4)
+#define MX25_H1_OCPOL_BIT  BIT(2)
+
 #define MX27_H1_PM_BIT BIT(8)
 #define MX27_H2_PM_BIT BIT(16)
 #define MX27_OTG_PM_BITBIT(24)
@@ -50,6 +70,39 @@ struct imx_usbmisc {
 
 static struct imx_usbmisc *usbmisc;
 
+static int usbmisc_imx25_init(struct imx_usbmisc_data *data)
+{
+   unsigned long flags;
+   u32 val = 0;
+
+   if (data-index  1)
+   return -EINVAL;
+
+   spin_lock_irqsave(usbmisc-lock, flags);
+   switch (data-index) {
+   case 0:
+   val = readl(usbmisc-base);
+   val = ~(MX25_OTG_SIC_MASK | MX25_OTG_PP_BIT);
+   val |= (MXC_EHCI_INTERFACE_DIFF_UNI  MXC_EHCI_INTERFACE_MASK) 
 MX25_OTG_SIC_SHIFT;
+   val |= (MX25_OTG_PM_BIT | MX25_OTG_OCPOL_BIT);
+   writel(val, usbmisc-base);
+   break;
+   case 1:
+   val = readl(usbmisc-base);
+   val = ~(MX25_H1_SIC_MASK | MX25_H1_PP_BIT |  
MX25_H1_IPPUE_UP_BIT);
+   val |= (MXC_EHCI_INTERFACE_SINGLE_UNI  
MXC_EHCI_INTERFACE_MASK)  MX25_H1_SIC_SHIFT;
+   val |= (MX25_H1_PM_BIT | MX25_H1_OCPOL_BIT | MX25_H1_TLL_BIT |
+   MX25_H1_USBTE_BIT | MX25_H1_IPPUE_DOWN_BIT);
+
+   writel(val, usbmisc-base);
+
+   break;
+   }
+   spin_unlock_irqrestore(usbmisc-lock, flags);
+
+   return 0;
+}
+
 static int usbmisc_imx25_post(struct imx_usbmisc_data *data)
 {
void __iomem *reg;
@@ -159,6 +212,7 @@ static int usbmisc_imx6q_init(struct imx_usbmisc_data *data)
 }
 
 static const struct usbmisc_ops imx25_usbmisc_ops = {
+   .init = usbmisc_imx25_init,
.post = usbmisc_imx25_post,
 };
 
@@ -200,6 +254,10 @@ static const struct of_device_id usbmisc_imx_dt_ids[] = {
.data = imx25_usbmisc_ops,
},
{
+   .compatible = fsl,imx35-usbmisc,
+   .data = imx25_usbmisc_ops,
+   },
+   {
.compatible = fsl,imx27-usbmisc,
.data = imx27_usbmisc_ops,
},
-- 
1.7.9.5

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


[PATCH v3][ 5/9] ARM: dts: imx25.dtsi: Fix USB support.

2014-03-12 Thread Denis Carikli
From: Fabio Estevam fabio.este...@freescale.com

This patch was adapted from the thread named
USB Host support for mx25 on linux-usb@vger.kernel.org

Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v2-v3:
- rebased on top of the usb: chipidea: Use standard usb-phy property. patch.
- Fixed the usbphy nodes index and added and added a reg property.

Changelog v1-v2:
- The usbphy nodes were made to look like the ones in imx53.dtsi
- The patch was rebased on top of the clock fixes commits.
---
 arch/arm/boot/dts/imx25.dtsi |   29 ++---
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 829791e..02697b2 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -482,22 +482,13 @@
clocks = clks 99;
};
 
-   usbphy1: usbphy@1 {
-   compatible = nop-usbphy;
-   status = disabled;
-   };
-
-   usbphy2: usbphy@2 {
-   compatible = nop-usbphy;
-   status = disabled;
-   };
-
usbotg: usb@53ff4000 {
compatible = fsl,imx25-usb, fsl,imx27-usb;
reg = 0x53ff4000 0x0200;
interrupts = 37;
clocks = clks 70;
fsl,usbmisc = usbmisc 0;
+   usb-phy = usbphy0;
status = disabled;
};
 
@@ -507,6 +498,7 @@
interrupts = 35;
clocks = clks 70;
fsl,usbmisc = usbmisc 1;
+   usb-phy = usbphy1;
status = disabled;
};
 
@@ -516,7 +508,6 @@
clocks = clks 9, clks 70, clks 8;
clock-names = ipg, ahb, per;
reg = 0x53ff4600 0x00f;
-   status = disabled;
};
 
dryice@53ffc000 {
@@ -548,4 +539,20 @@
};
};
};
+
+   usbphy {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = simple-bus;
+
+   usbphy0: usbphy@0 {
+   reg = 0;
+   compatible = usb-nop-xceiv;
+   };
+
+   usbphy1: usbphy@1 {
+   reg = 1;
+   compatible = usb-nop-xceiv;
+   };
+   };
 };
-- 
1.7.9.5

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


[PATCH v3][ 2/9] ARM: dts: mx35: USB block requires only one clock

2014-03-12 Thread Denis Carikli
From: Fabio Estevam fabio.este...@freescale.com

Like other imx SoCs only one USB clock is needed on mx35.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 arch/arm/boot/dts/imx35.dtsi |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
index e59ccb4..474a73d 100644
--- a/arch/arm/boot/dts/imx35.dtsi
+++ b/arch/arm/boot/dts/imx35.dtsi
@@ -296,8 +296,7 @@
compatible = fsl,imx35-usb, fsl,imx27-usb;
reg = 0x53ff4000 0x0200;
interrupts = 37;
-   clocks = clks 9, clks 73, clks 28;
-   clock-names = ipg, ahb, per;
+   clocks = clks 73;
fsl,usbmisc = usbmisc 0;
status = disabled;
};
@@ -306,8 +305,7 @@
compatible = fsl,imx35-usb, fsl,imx27-usb;
reg = 0x53ff4400 0x0200;
interrupts = 35;
-   clocks = clks 9, clks 73, clks 28;
-   clock-names = ipg, ahb, per;
+   clocks = clks 73;
fsl,usbmisc = usbmisc 1;
status = disabled;
};
-- 
1.7.9.5

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


[PATCH v3][ 7/9] ARM: dts: i.MX35: Add USB support.

2014-03-12 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v2-v3:
- rebased on top of the usb: chipidea: Use standard usb-phy property. patch.
- Fixed the usbphy nodes index and added and added a reg property.

Changelog v1-v2:
- The usbphy nodes were made to look like the ones in imx53.dtsi
- The patch was rebased on top of the clock fixes commits.
---
 arch/arm/boot/dts/imx35.dtsi |   18 ++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
index 474a73d..66bed6d 100644
--- a/arch/arm/boot/dts/imx35.dtsi
+++ b/arch/arm/boot/dts/imx35.dtsi
@@ -298,6 +298,7 @@
interrupts = 37;
clocks = clks 73;
fsl,usbmisc = usbmisc 0;
+   usb-phy = usbphy0;
status = disabled;
};
 
@@ -307,6 +308,7 @@
interrupts = 35;
clocks = clks 73;
fsl,usbmisc = usbmisc 1;
+   usb-phy = usbphy1;
status = disabled;
};
 
@@ -355,4 +357,20 @@
};
};
};
+
+   usbphy {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = simple-bus;
+
+   usbphy0: usbphy@0 {
+   reg = 0;
+   compatible = usb-nop-xceiv;
+   };
+
+   usbphy1: usbphy@1 {
+   reg = 1;
+   compatible = usb-nop-xceiv;
+   };
+   };
 };
-- 
1.7.9.5

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


[PATCH v3][ 9/9] ARM: imx_v4_v5_defconfig: Enable drivers for i.MX25/i.MX35 USB support.

2014-03-12 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v2-v3:
- Extra gadget drivers additions were removed from this patch.

Changelog v1-v2:
- With the clock fix patches, the usb gadget also work.
  So I've addeed it to this patch too.
- CONFIG_USB_OTG_FSM=y was not needed, so it was removed.
---
 arch/arm/configs/imx_v4_v5_defconfig |6 ++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/configs/imx_v4_v5_defconfig 
b/arch/arm/configs/imx_v4_v5_defconfig
index f1aeb7d..ec9b365 100644
--- a/arch/arm/configs/imx_v4_v5_defconfig
+++ b/arch/arm/configs/imx_v4_v5_defconfig
@@ -80,6 +80,7 @@ CONFIG_MTD_UBI=y
 CONFIG_EEPROM_AT24=y
 CONFIG_EEPROM_AT25=y
 CONFIG_ATA=y
+CONFIG_BLK_DEV_SD=y
 CONFIG_PATA_IMX=y
 CONFIG_NETDEVICES=y
 CONFIG_CS89x0=y
@@ -153,6 +154,11 @@ CONFIG_USB_HID=m
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_MXC=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_NOP_USB_XCEIV=y
 CONFIG_MMC=y
 CONFIG_MMC_UNSAFE_RESUME=y
 CONFIG_MMC_SDHCI=y
-- 
1.7.9.5

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


[PATCH v3][ 8/9] ARM: dts: mbimxsd35 baseboard: Add USB support.

2014-03-12 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v1-v2:
- With the clock fix patches, the usb gadget also work.
  So I've set the otg port to otg instead of host.
- Before I forgott to set dr_mode to host in the usbhost port.
  That is now fixed.
---
 .../boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts  |   13 +
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts 
b/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
index 71197b9..f04ae91 100644
--- a/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
+++ b/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
@@ -150,3 +150,16 @@
fsl,uart-has-rtscts;
status = okay;
 };
+
+usbhost1 {
+   phy_type = serial;
+   dr_mode = host;
+   status = okay;
+};
+
+usbotg {
+   phy_type = utmi;
+   dr_mode = otg;
+   external-vbus-divider;
+   status = okay;
+};
-- 
1.7.9.5

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


[PATCH v2][ 4/8] ARM: dts: imx25.dtsi: Fix USB support.

2014-03-11 Thread Denis Carikli
From: Fabio Estevam fabio.este...@freescale.com

This patch was adapted from the thread named
USB Host support for mx25 on linux-usb@vger.kernel.org

Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v1-v2:
- The usbphy nodes were made to look like the ones in imx53.dtsi
- The patch was rebased on top of the clock fixes commits.
---
 arch/arm/boot/dts/imx25.dtsi |   27 ---
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 829791e..16bc571 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -482,22 +482,13 @@
clocks = clks 99;
};
 
-   usbphy1: usbphy@1 {
-   compatible = nop-usbphy;
-   status = disabled;
-   };
-
-   usbphy2: usbphy@2 {
-   compatible = nop-usbphy;
-   status = disabled;
-   };
-
usbotg: usb@53ff4000 {
compatible = fsl,imx25-usb, fsl,imx27-usb;
reg = 0x53ff4000 0x0200;
interrupts = 37;
clocks = clks 70;
fsl,usbmisc = usbmisc 0;
+   fsl,usbphy = usbphy1;
status = disabled;
};
 
@@ -507,6 +498,7 @@
interrupts = 35;
clocks = clks 70;
fsl,usbmisc = usbmisc 1;
+   fsl,usbphy = usbphy2;
status = disabled;
};
 
@@ -516,7 +508,6 @@
clocks = clks 9, clks 70, clks 8;
clock-names = ipg, ahb, per;
reg = 0x53ff4600 0x00f;
-   status = disabled;
};
 
dryice@53ffc000 {
@@ -548,4 +539,18 @@
};
};
};
+
+   usbphy {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = simple-bus;
+
+   usbphy1: usbphy@1 {
+   compatible = usb-nop-xceiv;
+   };
+
+   usbphy2: usbphy@2 {
+   compatible = usb-nop-xceiv;
+   };
+   };
 };
-- 
1.7.9.5

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


[PATCH v2][ 2/8] ARM: dts: mx35: USB block requires only one clock

2014-03-11 Thread Denis Carikli
From: Fabio Estevam fabio.este...@freescale.com

Like other imx SoCs only one USB clock is needed on mx35.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 arch/arm/boot/dts/imx35.dtsi |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
index e59ccb4..474a73d 100644
--- a/arch/arm/boot/dts/imx35.dtsi
+++ b/arch/arm/boot/dts/imx35.dtsi
@@ -296,8 +296,7 @@
compatible = fsl,imx35-usb, fsl,imx27-usb;
reg = 0x53ff4000 0x0200;
interrupts = 37;
-   clocks = clks 9, clks 73, clks 28;
-   clock-names = ipg, ahb, per;
+   clocks = clks 73;
fsl,usbmisc = usbmisc 0;
status = disabled;
};
@@ -306,8 +305,7 @@
compatible = fsl,imx35-usb, fsl,imx27-usb;
reg = 0x53ff4400 0x0200;
interrupts = 35;
-   clocks = clks 9, clks 73, clks 28;
-   clock-names = ipg, ahb, per;
+   clocks = clks 73;
fsl,usbmisc = usbmisc 1;
status = disabled;
};
-- 
1.7.9.5

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


[PATCH v2][ 6/8] ARM: dts: i.MX35: Add USB support.

2014-03-11 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v1-v2:
- The usbphy nodes were made to look like the ones in imx53.dtsi
- The patch was rebased on top of the clock fixes commits.

---
 arch/arm/boot/dts/imx35.dtsi |   16 
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
index 474a73d..b943123 100644
--- a/arch/arm/boot/dts/imx35.dtsi
+++ b/arch/arm/boot/dts/imx35.dtsi
@@ -298,6 +298,7 @@
interrupts = 37;
clocks = clks 73;
fsl,usbmisc = usbmisc 0;
+   fsl,usbphy = usbphy0;
status = disabled;
};
 
@@ -307,6 +308,7 @@
interrupts = 35;
clocks = clks 73;
fsl,usbmisc = usbmisc 1;
+   fsl,usbphy = usbphy1;
status = disabled;
};
 
@@ -355,4 +357,18 @@
};
};
};
+
+   usbphy {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = simple-bus;
+
+   usbphy0: usbphy@0 {
+   compatible = usb-nop-xceiv;
+   };
+
+   usbphy1: usbphy@1 {
+   compatible = usb-nop-xceiv;
+   };
+   };
 };
-- 
1.7.9.5

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


[PATCH v2][ 5/8] ARM: dts: mbimxsd25 baseboard: Add USB support

2014-03-11 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v1-v2:
- With the clock fix patches, the usb gadget also work.
  So I've set the otg port to otg instead of host.
---
 .../boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts  |   13 +
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts 
b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
index 62fb3da..ad12da3 100644
--- a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
+++ b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
@@ -172,3 +172,16 @@
fsl,uart-has-rtscts;
status = okay;
 };
+
+usbhost1 {
+   phy_type = serial;
+   dr_mode = host;
+   status = okay;
+};
+
+usbotg {
+   phy_type = utmi;
+   dr_mode = otg;
+   external-vbus-divider;
+   status = okay;
+};
-- 
1.7.9.5

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


[PATCH v2][ 1/8] ARM: dts: mx25: USB block requires only one clock

2014-03-11 Thread Denis Carikli
From: Fabio Estevam fabio.este...@freescale.com

Like other imx SoCs only one USB clock is needed on mx25.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 arch/arm/boot/dts/imx25.dtsi |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 77bb743..829791e 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -496,8 +496,7 @@
compatible = fsl,imx25-usb, fsl,imx27-usb;
reg = 0x53ff4000 0x0200;
interrupts = 37;
-   clocks = clks 9, clks 70, clks 8;
-   clock-names = ipg, ahb, per;
+   clocks = clks 70;
fsl,usbmisc = usbmisc 0;
status = disabled;
};
@@ -506,8 +505,7 @@
compatible = fsl,imx25-usb, fsl,imx27-usb;
reg = 0x53ff4400 0x0200;
interrupts = 35;
-   clocks = clks 9, clks 70, clks 8;
-   clock-names = ipg, ahb, per;
+   clocks = clks 70;
fsl,usbmisc = usbmisc 1;
status = disabled;
};
-- 
1.7.9.5

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


[PATCH v2][ 7/8] ARM: dts: mbimxsd35 baseboard: Add USB support.

2014-03-11 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v1-v2:
- With the clock fix patches, the usb gadget also work.
  So I've set the otg port to otg instead of host.
- Before I forgott to set dr_mode to host in the usbhost port.
  That is now fixed.
---
 .../boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts  |   13 +
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts 
b/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
index 71197b9..f04ae91 100644
--- a/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
+++ b/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
@@ -150,3 +150,16 @@
fsl,uart-has-rtscts;
status = okay;
 };
+
+usbhost1 {
+   phy_type = serial;
+   dr_mode = host;
+   status = okay;
+};
+
+usbotg {
+   phy_type = utmi;
+   dr_mode = otg;
+   external-vbus-divider;
+   status = okay;
+};
-- 
1.7.9.5

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


[PATCH v2][ 3/8] usb: chipidea: usbmisc: Add USB Host support for i.MX25/i.MX35 CPUs

2014-03-11 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
Changelog v1-v2:
- converted two remaining defines to BIT()
- Removed a variable declaration that was not used in usbmisc_imx25_init
---
 drivers/usb/chipidea/usbmisc_imx.c |   58 
 1 file changed, 58 insertions(+)

diff --git a/drivers/usb/chipidea/usbmisc_imx.c 
b/drivers/usb/chipidea/usbmisc_imx.c
index cd061ab..3523c09 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -21,6 +21,26 @@
 #define MX25_USB_PHY_CTRL_OFFSET   0x08
 #define MX25_BM_EXTERNAL_VBUS_DIVIDER  BIT(23)
 
+#define MXC_EHCI_INTERFACE_SINGLE_UNI  (2  0)
+#define MXC_EHCI_INTERFACE_DIFF_UNI(0  0)
+#define MXC_EHCI_INTERFACE_MASK(0xf)
+
+#define MX25_OTG_SIC_SHIFT 29
+#define MX25_OTG_SIC_MASK  (0x3  MX25_OTG_SIC_SHIFT)
+#define MX25_OTG_PM_BITBIT(24)
+#define MX25_OTG_PP_BITBIT(11)
+#define MX25_OTG_OCPOL_BIT BIT(3)
+
+#define MX25_H1_SIC_SHIFT  21
+#define MX25_H1_SIC_MASK   (0x3  MX25_H1_SIC_SHIFT)
+#define MX25_H1_PP_BIT BIT(18)
+#define MX25_H1_PM_BIT BIT(16)
+#define MX25_H1_IPPUE_UP_BIT   BIT(7)
+#define MX25_H1_IPPUE_DOWN_BIT BIT(6)
+#define MX25_H1_TLL_BITBIT(5)
+#define MX25_H1_USBTE_BIT  BIT(4)
+#define MX25_H1_OCPOL_BIT  BIT(2)
+
 #define MX27_H1_PM_BIT BIT(8)
 #define MX27_H2_PM_BIT BIT(16)
 #define MX27_OTG_PM_BITBIT(24)
@@ -50,6 +70,39 @@ struct imx_usbmisc {
 
 static struct imx_usbmisc *usbmisc;
 
+static int usbmisc_imx25_init(struct imx_usbmisc_data *data)
+{
+   unsigned long flags;
+   u32 val = 0;
+
+   if (data-index  1)
+   return -EINVAL;
+
+   spin_lock_irqsave(usbmisc-lock, flags);
+   switch (data-index) {
+   case 0:
+   val = readl(usbmisc-base);
+   val = ~(MX25_OTG_SIC_MASK | MX25_OTG_PP_BIT);
+   val |= (MXC_EHCI_INTERFACE_DIFF_UNI  MXC_EHCI_INTERFACE_MASK) 
 MX25_OTG_SIC_SHIFT;
+   val |= (MX25_OTG_PM_BIT | MX25_OTG_OCPOL_BIT);
+   writel(val, usbmisc-base);
+   break;
+   case 1:
+   val = readl(usbmisc-base);
+   val = ~(MX25_H1_SIC_MASK | MX25_H1_PP_BIT |  
MX25_H1_IPPUE_UP_BIT);
+   val |= (MXC_EHCI_INTERFACE_SINGLE_UNI  
MXC_EHCI_INTERFACE_MASK)  MX25_H1_SIC_SHIFT;
+   val |= (MX25_H1_PM_BIT | MX25_H1_OCPOL_BIT | MX25_H1_TLL_BIT |
+   MX25_H1_USBTE_BIT | MX25_H1_IPPUE_DOWN_BIT);
+
+   writel(val, usbmisc-base);
+
+   break;
+   }
+   spin_unlock_irqrestore(usbmisc-lock, flags);
+
+   return 0;
+}
+
 static int usbmisc_imx25_post(struct imx_usbmisc_data *data)
 {
void __iomem *reg;
@@ -159,6 +212,7 @@ static int usbmisc_imx6q_init(struct imx_usbmisc_data *data)
 }
 
 static const struct usbmisc_ops imx25_usbmisc_ops = {
+   .init = usbmisc_imx25_init,
.post = usbmisc_imx25_post,
 };
 
@@ -200,6 +254,10 @@ static const struct of_device_id usbmisc_imx_dt_ids[] = {
.data = imx25_usbmisc_ops,
},
{
+   .compatible = fsl,imx35-usbmisc,
+   .data = imx25_usbmisc_ops,
+   },
+   {
.compatible = fsl,imx27-usbmisc,
.data = imx27_usbmisc_ops,
},
-- 
1.7.9.5

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


[PATCH 1/9] usb: chipidea: usbmisc: Add USB Host support for i.MX25/i.MX35 CPUs

2014-03-07 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
 drivers/usb/chipidea/usbmisc_imx.c |   59 
 1 file changed, 59 insertions(+)

diff --git a/drivers/usb/chipidea/usbmisc_imx.c 
b/drivers/usb/chipidea/usbmisc_imx.c
index cd061ab..d956ad0 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -21,6 +21,26 @@
 #define MX25_USB_PHY_CTRL_OFFSET   0x08
 #define MX25_BM_EXTERNAL_VBUS_DIVIDER  BIT(23)
 
+#define MXC_EHCI_INTERFACE_SINGLE_UNI  (2  0)
+#define MXC_EHCI_INTERFACE_DIFF_UNI(0  0)
+#define MXC_EHCI_INTERFACE_MASK(0xf)
+
+#define MX25_OTG_SIC_SHIFT 29
+#define MX25_OTG_SIC_MASK  (0x3  MX25_OTG_SIC_SHIFT)
+#define MX25_OTG_PM_BITBIT(24)
+#define MX25_OTG_PP_BITBIT(11)
+#define MX25_OTG_OCPOL_BIT (1  3)
+
+#define MX25_H1_SIC_SHIFT  21
+#define MX25_H1_SIC_MASK   (0x3  MX25_H1_SIC_SHIFT)
+#define MX25_H1_PP_BIT BIT(18)
+#define MX25_H1_PM_BIT BIT(16)
+#define MX25_H1_IPPUE_UP_BIT   BIT(7)
+#define MX25_H1_IPPUE_DOWN_BIT BIT(6)
+#define MX25_H1_TLL_BITBIT(5)
+#define MX25_H1_USBTE_BIT  BIT(4)
+#define MX25_H1_OCPOL_BIT  (1  2)
+
 #define MX27_H1_PM_BIT BIT(8)
 #define MX27_H2_PM_BIT BIT(16)
 #define MX27_OTG_PM_BITBIT(24)
@@ -50,6 +70,40 @@ struct imx_usbmisc {
 
 static struct imx_usbmisc *usbmisc;
 
+static int usbmisc_imx25_init(struct imx_usbmisc_data *data)
+{
+   void __iomem *reg = NULL;
+   unsigned long flags;
+   u32 val = 0;
+
+   if (data-index  1)
+   return -EINVAL;
+
+   spin_lock_irqsave(usbmisc-lock, flags);
+   switch (data-index) {
+   case 0:
+   val = readl(usbmisc-base);
+   val = ~(MX25_OTG_SIC_MASK | MX25_OTG_PP_BIT);
+   val |= (MXC_EHCI_INTERFACE_DIFF_UNI  MXC_EHCI_INTERFACE_MASK) 
 MX25_OTG_SIC_SHIFT;
+   val |= (MX25_OTG_PM_BIT | MX25_OTG_OCPOL_BIT);
+   writel(val, usbmisc-base);
+   break;
+   case 1:
+   val = readl(usbmisc-base);
+   val = ~(MX25_H1_SIC_MASK | MX25_H1_PP_BIT |  
MX25_H1_IPPUE_UP_BIT);
+   val |= (MXC_EHCI_INTERFACE_SINGLE_UNI  
MXC_EHCI_INTERFACE_MASK)  MX25_H1_SIC_SHIFT;
+   val |= (MX25_H1_PM_BIT | MX25_H1_OCPOL_BIT | MX25_H1_TLL_BIT |
+   MX25_H1_USBTE_BIT | MX25_H1_IPPUE_DOWN_BIT);
+
+   writel(val, usbmisc-base);
+
+   break;
+   }
+   spin_unlock_irqrestore(usbmisc-lock, flags);
+
+   return 0;
+}
+
 static int usbmisc_imx25_post(struct imx_usbmisc_data *data)
 {
void __iomem *reg;
@@ -159,6 +213,7 @@ static int usbmisc_imx6q_init(struct imx_usbmisc_data *data)
 }
 
 static const struct usbmisc_ops imx25_usbmisc_ops = {
+   .init = usbmisc_imx25_init,
.post = usbmisc_imx25_post,
 };
 
@@ -200,6 +255,10 @@ static const struct of_device_id usbmisc_imx_dt_ids[] = {
.data = imx25_usbmisc_ops,
},
{
+   .compatible = fsl,imx35-usbmisc,
+   .data = imx25_usbmisc_ops,
+   },
+   {
.compatible = fsl,imx27-usbmisc,
.data = imx27_usbmisc_ops,
},
-- 
1.7.9.5

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


[PATCH 3/9] ARM: dts: mbimxsd51 baseboard: Add USB host support

2014-03-07 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
 .../boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts  |   47 
 1 file changed, 47 insertions(+)

diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts 
b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
index 5cec4f3..4d970b3 100644
--- a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
+++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
@@ -151,6 +151,29 @@
MX51_PAD_CSI1_D9__GPIO3_13 0x1f5
;
};
+
+   pinctrl_usbh1: usbh1grp {
+   fsl,pins = 
+   MX51_PAD_USBH1_CLK__USBH1_CLK 0x1e5
+   MX51_PAD_USBH1_DIR__USBH1_DIR 0x1e5
+   MX51_PAD_USBH1_NXT__USBH1_NXT 0x1e5
+   MX51_PAD_USBH1_DATA0__USBH1_DATA0 0x1e5
+   MX51_PAD_USBH1_DATA1__USBH1_DATA1 0x1e5
+   MX51_PAD_USBH1_DATA2__USBH1_DATA2 0x1e5
+   MX51_PAD_USBH1_DATA3__USBH1_DATA3 0x1e5
+   MX51_PAD_USBH1_DATA4__USBH1_DATA4 0x1e5
+   MX51_PAD_USBH1_DATA5__USBH1_DATA5 0x1e5
+   MX51_PAD_USBH1_DATA6__USBH1_DATA6 0x1e5
+   MX51_PAD_USBH1_DATA7__USBH1_DATA7 0x1e5
+   MX51_PAD_USBH1_STP__USBH1_STP 0x1e5
+   ;
+   };
+
+   pinctrl_usbh1_vbus: usbh1-vbusgrp {
+   fsl,pins = 
+   MX51_PAD_EIM_CS3__GPIO2_28 0x1f5
+   ;
+   };
};
 };
 
@@ -173,3 +196,27 @@
fsl,uart-has-rtscts;
status = okay;
 };
+
+usbh1 {
+   pinctrl-names = default;
+   pinctrl-0 = pinctrl_usbh1;
+   phy_type = ulpi;
+   dr_mode = host;
+   status = okay;
+};
+
+usbotg {
+   phy_type = utmi_wide;
+   dr_mode = host;
+   status = okay;
+};
+
+usbphy0 {
+   pinctrl-names = default;
+   pinctrl-0 = pinctrl_usbh1_vbus;
+   reset-gpios = gpio2 28 GPIO_ACTIVE_LOW;
+};
+
+usbphy1 {
+   clock-frequency = 1920;
+};
-- 
1.7.9.5

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


[PATCH 2/9] ARM: dts: i.MX51: Add a second usbphy.

2014-03-07 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
 arch/arm/boot/dts/imx51.dtsi |8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index e508e6f..917b6ed 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -100,6 +100,13 @@
clocks = clks IMX5_CLK_USB_PHY_GATE;
clock-names = main_clk;
};
+
+   usbphy1: usbphy@1 {
+   compatible = usb-nop-xceiv;
+   reg = 1;
+   clocks = clks IMX5_CLK_USB_PHY_GATE;
+   clock-names = main_clk;
+   };
};
 
soc {
@@ -239,6 +246,7 @@
interrupts = 14;
clocks = clks IMX5_CLK_USBOH3_GATE;
fsl,usbmisc = usbmisc 1;
+   fsl,usbphy = usbphy1;
status = disabled;
};
 
-- 
1.7.9.5

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


[PATCH 4/9] ARM: dts: imx25.dtsi: Fix USB support.

2014-03-07 Thread Denis Carikli
From: Fabio Estevam fabio.este...@freescale.com

This patch was adapted from the thread named
USB Host support for mx25 on linux-usb@vger.kernel.org

Signed-off-by: Denis Carikli de...@eukrea.com
---
 arch/arm/boot/dts/imx25.dtsi |9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 77bb743..ab5c282 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -483,13 +483,11 @@
};
 
usbphy1: usbphy@1 {
-   compatible = nop-usbphy;
-   status = disabled;
+   compatible = usb-nop-xceiv;
};
 
usbphy2: usbphy@2 {
-   compatible = nop-usbphy;
-   status = disabled;
+   compatible = usb-nop-xceiv;
};
 
usbotg: usb@53ff4000 {
@@ -499,6 +497,7 @@
clocks = clks 9, clks 70, clks 8;
clock-names = ipg, ahb, per;
fsl,usbmisc = usbmisc 0;
+   fsl,usbphy = usbphy1;
status = disabled;
};
 
@@ -509,6 +508,7 @@
clocks = clks 9, clks 70, clks 8;
clock-names = ipg, ahb, per;
fsl,usbmisc = usbmisc 1;
+   fsl,usbphy = usbphy2;
status = disabled;
};
 
@@ -518,7 +518,6 @@
clocks = clks 9, clks 70, clks 8;
clock-names = ipg, ahb, per;
reg = 0x53ff4600 0x00f;
-   status = disabled;
};
 
dryice@53ffc000 {
-- 
1.7.9.5

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


[PATCH 5/9] ARM: dts: mbimxsd25 baseboard: Add USB host support

2014-03-07 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
 .../boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts  |   13 +
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts 
b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
index 62fb3da..58c606f 100644
--- a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
+++ b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
@@ -172,3 +172,16 @@
fsl,uart-has-rtscts;
status = okay;
 };
+
+usbhost1 {
+   phy_type = serial;
+   dr_mode = host;
+   status = okay;
+};
+
+usbotg {
+   phy_type = utmi;
+   dr_mode = host;
+   external-vbus-divider;
+   status = okay;
+};
-- 
1.7.9.5

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


[PATCH 6/9] ARM: dts: i.MX35: Add USB support.

2014-03-07 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
 arch/arm/boot/dts/imx35.dtsi |   11 +++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
index e59ccb4..1c15b56 100644
--- a/arch/arm/boot/dts/imx35.dtsi
+++ b/arch/arm/boot/dts/imx35.dtsi
@@ -292,6 +292,15 @@
status = disabled;
};
 
+   usbphy0: usbphy@0 {
+   compatible = usb-nop-xceiv;
+   };
+
+   usbphy1: usbphy@1 {
+   compatible = usb-nop-xceiv;
+   };
+
+
usbotg: usb@53ff4000 {
compatible = fsl,imx35-usb, fsl,imx27-usb;
reg = 0x53ff4000 0x0200;
@@ -299,6 +308,7 @@
clocks = clks 9, clks 73, clks 28;
clock-names = ipg, ahb, per;
fsl,usbmisc = usbmisc 0;
+   fsl,usbphy = usbphy0;
status = disabled;
};
 
@@ -309,6 +319,7 @@
clocks = clks 9, clks 73, clks 28;
clock-names = ipg, ahb, per;
fsl,usbmisc = usbmisc 1;
+   fsl,usbphy = usbphy1;
status = disabled;
};
 
-- 
1.7.9.5

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


[PATCH 7/9] ARM: dts: mbimxsd35 baseboard: Add USB host support.

2014-03-07 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
 .../boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts  |   12 
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts 
b/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
index 71197b9..d27f02e 100644
--- a/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
+++ b/arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
@@ -150,3 +150,15 @@
fsl,uart-has-rtscts;
status = okay;
 };
+
+usbhost1 {
+   phy_type = serial;
+   status = okay;
+};
+
+usbotg {
+   phy_type = utmi;
+   dr_mode = host;
+   external-vbus-divider;
+   status = okay;
+};
-- 
1.7.9.5

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


[PATCH 8/9] ARM: imx_v6_v7_defconfig: Enable drivers for i.MX51 USB Host support.

2014-03-07 Thread Denis Carikli
Signed-off-by: Denis Carikli de...@eukrea.com
---
 arch/arm/configs/imx_v6_v7_defconfig |2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/imx_v6_v7_defconfig 
b/arch/arm/configs/imx_v6_v7_defconfig
index 09e9743..772f14f 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -209,8 +209,10 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_CHIPIDEA=y
 CONFIG_USB_CHIPIDEA_UDC=y
 CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_OTG_FSM=y
 CONFIG_NOP_USB_XCEIV=y
 CONFIG_USB_MXS_PHY=y
+CONFIG_USB_ULPI=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_ETH=m
 CONFIG_USB_MASS_STORAGE=m
-- 
1.7.9.5

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


Re: USB Host support for mx25

2014-03-06 Thread Denis Carikli

Hi,

On 03/06/2014 11:23 AM, Fabio Estevam wrote:
 
 usb 1-1: new low-speed USB device number 2 using ci_hdrc
 usb 1-1: device descriptor read/64, error -71
Is that USB peripheral really low-speed?

I'm also trying to make the USB host work on the cpuimx25 and the 
cpuimx35, so I got the same error.


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