All of lore.kernel.org
 help / color / mirror / Atom feed
* USB OTG support on mx27pdk
@ 2014-04-16  1:43 Fabio Estevam
  2014-04-16  3:23 ` Peter Chen
  0 siblings, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2014-04-16  1:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I am trying to add USBOTG support to mx27pdk with the following dts patch:

--- a/arch/arm/boot/dts/imx27-pdk.dts
+++ b/arch/arm/boot/dts/imx27-pdk.dts
@@ -78,6 +78,14 @@
        status = "okay";
 };

+&usbotg {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg>;
+       dr_mode = "otg";
+       phy_type = "ulpi";
+       status = "okay";
+};
+
 &iomuxc {
        imx27-pdk {
                pinctrl_cspi2: cspi2grp {
@@ -121,5 +129,22 @@
                                MX27_PAD_UART1_RTS__UART1_RTS 0x0
                        >;
                };
+
+               pinctrl_usbotg: usbotggrp {
+                       fsl,pins = <
+                               MX27_PAD_USBOTG_NXT__USBOTG_NXT 0x0
+                               MX27_PAD_USBOTG_STP__USBOTG_STP 0x0
+                               MX27_PAD_USBOTG_DIR__USBOTG_DIR 0x0
+                               MX27_PAD_USBOTG_CLK__USBOTG_CLK 0x0
+                               MX27_PAD_USBOTG_DATA0__USBOTG_DATA0 0x0
+                               MX27_PAD_USBOTG_DATA1__USBOTG_DATA1 0x0
+                               MX27_PAD_USBOTG_DATA2__USBOTG_DATA2 0x0
+                               MX27_PAD_USBOTG_DATA3__USBOTG_DATA3 0x0
+                               MX27_PAD_USBOTG_DATA4__USBOTG_DATA4 0x0
+                               MX27_PAD_USBOTG_DATA5__USBOTG_DATA5 0x0
+                               MX27_PAD_USBOTG_DATA6__USBOTG_DATA6 0x0
+                               MX27_PAD_USBOTG_DATA7__USBOTG_DATA7 0x0
+                       >;
+               };
        };
 }


However on kernel boot the following is seen:


ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-mxc: Freescale On-Chip EHCI Host driver
usbcore: registered new interface driver usb-storage
10024000.usb supply vbus not found, using dummy regulator
Unhandled fault: external abort on non-linefetch (0x808) at 0xf4424184
Internal error: : 808 [#1] PREEMPT ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 3.15.0-rc1-26325-g971f9fd-dirty #64
task: c7829aa0 ti: c7836000 task.ti: c7836000
PC is at ci_hdrc_probe+0x3a4/0x634
LR is at ci_hdrc_probe+0x100/0x634
pc : [<c036cc78>]    lr : [<c036c9d4>]    psr: 60000013
sp : c7837d48  ip : 00000001  fp : 00000000
r10: 00000000  r9 : 00000000  r8 : c791b6c0
r7 : c7945000  r6 : f4424000  r5 : c7945010  r4 : c794e010
r3 : f4424184  r2 : 00000000  r1 : 8c000004  r0 : 0c000004
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005317f  Table: a0004000  DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc78361c0)
Stack: (0xc7837d48 to 0xc7838000)
7d40:                   00000000 c012e294 c7945010 c06f471c c073dc90 c06f471c
7d60: 00000000 c02b9d84 c02b9d6c c7945010 00000000 c02b8874 c02b8a1c 00000000
7d80: c7945010 c02b8a1c c78bc010 c02b6fcc c7828c7c c7a150d4 c7945010 c7945044
7da0: c7945010 c02b8744 c7945010 c06e6780 c7945010 c02b7e58 c7945010 00000000
7dc0: c7945018 c02b6440 c7829aa0 c06cd748 c791b6c0 c7945010 00000000 00000002
7de0: c7945000 c7945010 c7945000 00000002 c7893340 c02b9f28 10024000 00000000
7e00: 00000000 c7837e34 c7945000 c036d1d4 00000000 00000000 c78bc010 c78bc000
7e20: 00000000 00000091 c7875670 c036e358 c7836000 c78a8aa0 00000100 00000000
7e40: c7881b90 00000003 0000000a 00000003 00000000 c793b9c0 00000000 c78bc010
7e60: c06f48c4 c073dc90 c06f48c4 c7836000 c06a4aa0 c02b9d84 c02b9d6c c78bc010
7e80: 00000000 c02b8874 00000000 c78bc010 c06f48c4 c78bc044 00000000 c02b8a18
7ea0: 00000000 c06f48c4 c02b898c c02b7070 c7828c6c c78905b0 c06f48c4 c7943ee0
7ec0: c06e6780 c02b8050 c05ff4b8 c024a414 c06f48c4 c06f48c4 00000006 c06b21c4
7ee0: c0707240 c02b9088 00000000 c06bdd8c 00000006 c0008974 c7866280 c01236c0
7f00: c070f434 c7866280 c04c9900 0000004f 00000000 00000000 00000000 c01239f4
7f20: 60000053 c06cec64 c7ffc890 c04ec5c0 00000091 c0034300 c064db3c 00000006
7f40: c7ffc897 00000006 c06cec3c c06bdd8c 00000006 c06b21c4 c0707240 c0679480
7f60: 00000091 c06b21d0 00000000 c0679af0 00000006 00000006 c0679480 ffffffff
7f80: c7837f9c c003f8c0 00000000 c04b8dd0 00000000 00000000 00000000 00000000
7fa0: 00000000 c04b8dd8 00000000 c00095b0 00000000 00000000 00000000 00000000
7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff ffffffff
[<c036cc78>] (ci_hdrc_probe) from [<c02b9d84>] (platform_drv_probe+0x18/0x48)
[<c02b9d84>] (platform_drv_probe) from [<c02b8874>] (driver_probe_device+0x104/)
[<c02b8874>] (driver_probe_device) from [<c02b6fcc>] (bus_for_each_drv+0x48/0x9)
[<c02b6fcc>] (bus_for_each_drv) from [<c02b8744>] (device_attach+0x74/0x80)
[<c02b8744>] (device_attach) from [<c02b7e58>] (bus_probe_device+0x88/0xb0)
[<c02b7e58>] (bus_probe_device) from [<c02b6440>] (device_add+0x3e0/0x4e4)
[<c02b6440>] (device_add) from [<c02b9f28>] (platform_device_add+0xac/0x20c)
[<c02b9f28>] (platform_device_add) from [<c036d1d4>] (ci_hdrc_add_device+0x198/)
[<c036d1d4>] (ci_hdrc_add_device) from [<c036e358>] (ci_hdrc_imx_probe+0x1b4/0x)
[<c036e358>] (ci_hdrc_imx_probe) from [<c02b9d84>] (platform_drv_probe+0x18/0x4)
[<c02b9d84>] (platform_drv_probe) from [<c02b8874>] (driver_probe_device+0x104/)
[<c02b8874>] (driver_probe_device) from [<c02b8a18>] (__driver_attach+0x8c/0x90)
[<c02b8a18>] (__driver_attach) from [<c02b7070>] (bus_for_each_dev+0x5c/0x8c)
[<c02b7070>] (bus_for_each_dev) from [<c02b8050>] (bus_add_driver+0xd8/0x1d8)
[<c02b8050>] (bus_add_driver) from [<c02b9088>] (driver_register+0x78/0xf4)
[<c02b9088>] (driver_register) from [<c0008974>] (do_one_initcall+0xf8/0x15c)
[<c0008974>] (do_one_initcall) from [<c0679af0>] (kernel_init_freeable+0xec/0x1)
[<c0679af0>] (kernel_init_freeable) from [<c04b8dd8>] (kernel_init+0x8/0xec)
[<c04b8dd8>] (kernel_init) from [<c00095b0>] (ret_from_fork+0x14/0x24)
Code: e3520000 1a000003 e3c004d2 e1801001 (e5831000)
---[ end trace 4042b4d525025a88 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b


Does anyone know if USB otg is functional on any mx27 hardware with 3.15-rc1?


Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 15+ messages in thread

* USB OTG support on mx27pdk
  2014-04-16  1:43 USB OTG support on mx27pdk Fabio Estevam
@ 2014-04-16  3:23 ` Peter Chen
  2014-04-16  3:28   ` Fabio Estevam
  2014-04-16  5:55   ` Alexander Shiyan
  0 siblings, 2 replies; 15+ messages in thread
From: Peter Chen @ 2014-04-16  3:23 UTC (permalink / raw)
  To: linux-arm-kernel



 
> Hi,
> 
> I am trying to add USBOTG support to mx27pdk with the following dts patch:
> 
> --- a/arch/arm/boot/dts/imx27-pdk.dts
> +++ b/arch/arm/boot/dts/imx27-pdk.dts
> @@ -78,6 +78,14 @@
>         status = "okay";
>  };
> 
> +&usbotg {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_usbotg>;
> +       dr_mode = "otg";
> +       phy_type = "ulpi";
> +       status = "okay";
> +};
> +
>  &iomuxc {
>         imx27-pdk {
>                 pinctrl_cspi2: cspi2grp { @@ -121,5 +129,22 @@
>                                 MX27_PAD_UART1_RTS__UART1_RTS 0x0
>                         >;
>                 };
> +
> +               pinctrl_usbotg: usbotggrp {
> +                       fsl,pins = <
> +                               MX27_PAD_USBOTG_NXT__USBOTG_NXT 0x0
> +                               MX27_PAD_USBOTG_STP__USBOTG_STP 0x0
> +                               MX27_PAD_USBOTG_DIR__USBOTG_DIR 0x0
> +                               MX27_PAD_USBOTG_CLK__USBOTG_CLK 0x0
> +                               MX27_PAD_USBOTG_DATA0__USBOTG_DATA0 0x0
> +                               MX27_PAD_USBOTG_DATA1__USBOTG_DATA1 0x0
> +                               MX27_PAD_USBOTG_DATA2__USBOTG_DATA2 0x0
> +                               MX27_PAD_USBOTG_DATA3__USBOTG_DATA3 0x0
> +                               MX27_PAD_USBOTG_DATA4__USBOTG_DATA4 0x0
> +                               MX27_PAD_USBOTG_DATA5__USBOTG_DATA5 0x0
> +                               MX27_PAD_USBOTG_DATA6__USBOTG_DATA6 0x0
> +                               MX27_PAD_USBOTG_DATA7__USBOTG_DATA7 0x0
> +                       >;
> +               };
>         };
>  }
> 
> 
> However on kernel boot the following is seen:
> 
> 
> ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> ehci-mxc: Freescale On-Chip EHCI Host driver
> usbcore: registered new interface driver usb-storage 10024000.usb supply
> vbus not found, using dummy regulator Unhandled fault: external abort on
> non-linefetch (0x808) at 0xf4424184 Internal error: : 808 [#1] PREEMPT
> ARM Modules linked in:
> CPU: 0 PID: 1 Comm: swapper Not tainted 3.15.0-rc1-26325-g971f9fd-dirty
> #64
> task: c7829aa0 ti: c7836000 task.ti: c7836000 PC is at
> ci_hdrc_probe+0x3a4/0x634 LR is at ci_hdrc_probe+0x100/0x634
> pc : [<c036cc78>]    lr : [<c036c9d4>]    psr: 60000013
> sp : c7837d48  ip : 00000001  fp : 00000000
> r10: 00000000  r9 : 00000000  r8 : c791b6c0
> r7 : c7945000  r6 : f4424000  r5 : c7945010  r4 : c794e010
> r3 : f4424184  r2 : 00000000  r1 : 8c000004  r0 : 0c000004
> Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
> Control: 0005317f  Table: a0004000  DAC: 00000017 Process swapper (pid: 1,
> stack limit = 0xc78361c0)
> Stack: (0xc7837d48 to 0xc7838000)
> 7d40:                   00000000 c012e294 c7945010 c06f471c c073dc90
> c06f471c
> 7d60: 00000000 c02b9d84 c02b9d6c c7945010 00000000 c02b8874 c02b8a1c
> 00000000
> 7d80: c7945010 c02b8a1c c78bc010 c02b6fcc c7828c7c c7a150d4 c7945010
> c7945044
> 7da0: c7945010 c02b8744 c7945010 c06e6780 c7945010 c02b7e58 c7945010
> 00000000
> 7dc0: c7945018 c02b6440 c7829aa0 c06cd748 c791b6c0 c7945010 00000000
> 00000002
> 7de0: c7945000 c7945010 c7945000 00000002 c7893340 c02b9f28 10024000
> 00000000
> 7e00: 00000000 c7837e34 c7945000 c036d1d4 00000000 00000000 c78bc010
> c78bc000
> 7e20: 00000000 00000091 c7875670 c036e358 c7836000 c78a8aa0 00000100
> 00000000
> 7e40: c7881b90 00000003 0000000a 00000003 00000000 c793b9c0 00000000
> c78bc010
> 7e60: c06f48c4 c073dc90 c06f48c4 c7836000 c06a4aa0 c02b9d84 c02b9d6c
> c78bc010
> 7e80: 00000000 c02b8874 00000000 c78bc010 c06f48c4 c78bc044 00000000
> c02b8a18
> 7ea0: 00000000 c06f48c4 c02b898c c02b7070 c7828c6c c78905b0 c06f48c4
> c7943ee0
> 7ec0: c06e6780 c02b8050 c05ff4b8 c024a414 c06f48c4 c06f48c4 00000006
> c06b21c4
> 7ee0: c0707240 c02b9088 00000000 c06bdd8c 00000006 c0008974 c7866280
> c01236c0
> 7f00: c070f434 c7866280 c04c9900 0000004f 00000000 00000000 00000000
> c01239f4
> 7f20: 60000053 c06cec64 c7ffc890 c04ec5c0 00000091 c0034300 c064db3c
> 00000006
> 7f40: c7ffc897 00000006 c06cec3c c06bdd8c 00000006 c06b21c4 c0707240
> c0679480
> 7f60: 00000091 c06b21d0 00000000 c0679af0 00000006 00000006 c0679480
> ffffffff
> 7f80: c7837f9c c003f8c0 00000000 c04b8dd0 00000000 00000000 00000000
> 00000000
> 7fa0: 00000000 c04b8dd8 00000000 c00095b0 00000000 00000000 00000000
> 00000000
> 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00000000
> 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff
> ffffffff [<c036cc78>] (ci_hdrc_probe) from [<c02b9d84>]
> (platform_drv_probe+0x18/0x48) [<c02b9d84>] (platform_drv_probe) from
> [<c02b8874>] (driver_probe_device+0x104/) [<c02b8874>]
> (driver_probe_device) from [<c02b6fcc>] (bus_for_each_drv+0x48/0x9)
> [<c02b6fcc>] (bus_for_each_drv) from [<c02b8744>]
> (device_attach+0x74/0x80) [<c02b8744>] (device_attach) from [<c02b7e58>]
> (bus_probe_device+0x88/0xb0) [<c02b7e58>] (bus_probe_device) from
> [<c02b6440>] (device_add+0x3e0/0x4e4) [<c02b6440>] (device_add) from
> [<c02b9f28>] (platform_device_add+0xac/0x20c) [<c02b9f28>]
> (platform_device_add) from [<c036d1d4>] (ci_hdrc_add_device+0x198/)
> [<c036d1d4>] (ci_hdrc_add_device) from [<c036e358>]
> (ci_hdrc_imx_probe+0x1b4/0x) [<c036e358>] (ci_hdrc_imx_probe) from
> [<c02b9d84>] (platform_drv_probe+0x18/0x4) [<c02b9d84>]
> (platform_drv_probe) from [<c02b8874>] (driver_probe_device+0x104/)
> [<c02b8874>] (driver_probe_device) from [<c02b8a18>]
> (__driver_attach+0x8c/0x90) [<c02b8a18>] (__driver_attach) from
> [<c02b7070>] (bus_for_each_dev+0x5c/0x8c) [<c02b7070>] (bus_for_each_dev)
> from [<c02b8050>] (bus_add_driver+0xd8/0x1d8) [<c02b8050>]
> (bus_add_driver) from [<c02b9088>] (driver_register+0x78/0xf4)
> [<c02b9088>] (driver_register) from [<c0008974>]
> (do_one_initcall+0xf8/0x15c) [<c0008974>] (do_one_initcall) from
> [<c0679af0>] (kernel_init_freeable+0xec/0x1) [<c0679af0>]
> (kernel_init_freeable) from [<c04b8dd8>] (kernel_init+0x8/0xec)
> [<c04b8dd8>] (kernel_init) from [<c00095b0>] (ret_from_fork+0x14/0x24)
> Code: e3520000 1a000003 e3c004d2 e1801001 (e5831000) ---[ end trace
> 4042b4d525025a88 ]--- Kernel panic - not syncing: Attempted to kill init!
> exitcode=0x0000000b
> 
> ---[ end Kernel panic - not syncing: Attempted to kill init!
> exitcode=0x0000000b
> 
> 

Please check if below patch is existed 

commit 3b5d3e6845bfe68777d069886b0d1cd5f23b9d58
Author: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Date:   Fri Jan 10 13:51:29 2014 +0800

    usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag
    
    * init the sts flag to 0 (missed)
    * fix write the real bit not sts value
    * Set PORTCS_STS and DEVLC_STS only if sts = 1


I cced chris who has imx27 hardware.

Peter


> Does anyone know if USB otg is functional on any mx27 hardware with 3.15-
> rc1?
> 
> 
> Thanks,
> 
> Fabio Estevam
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* USB OTG support on mx27pdk
  2014-04-16  3:23 ` Peter Chen
@ 2014-04-16  3:28   ` Fabio Estevam
  2014-04-16  5:47     ` Peter Chen
  2014-04-16  5:55   ` Alexander Shiyan
  1 sibling, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2014-04-16  3:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 16, 2014 at 12:23 AM, Peter Chen <Peter.Chen@freescale.com> wrote:
> Please check if below patch is existed
>
> commit 3b5d3e6845bfe68777d069886b0d1cd5f23b9d58
> Author: Chris Ruehl <chris.ruehl@gtsys.com.hk>
> Date:   Fri Jan 10 13:51:29 2014 +0800
>
>     usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag
>
>     * init the sts flag to 0 (missed)
>     * fix write the real bit not sts value
>     * Set PORTCS_STS and DEVLC_STS only if sts = 1
>
>
> I cced chris who has imx27 hardware.

Yes, this patch is applied in 3.15-rc1, but does not help here.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 15+ messages in thread

* USB OTG support on mx27pdk
  2014-04-16  3:28   ` Fabio Estevam
@ 2014-04-16  5:47     ` Peter Chen
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Chen @ 2014-04-16  5:47 UTC (permalink / raw)
  To: linux-arm-kernel

 
> On Wed, Apr 16, 2014 at 12:23 AM, Peter Chen <Peter.Chen@freescale.com>
> wrote:
> > Please check if below patch is existed
> >
> > commit 3b5d3e6845bfe68777d069886b0d1cd5f23b9d58
> > Author: Chris Ruehl <chris.ruehl@gtsys.com.hk>
> > Date:   Fri Jan 10 13:51:29 2014 +0800
> >
> >     usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS
> flag
> >
> >     * init the sts flag to 0 (missed)
> >     * fix write the real bit not sts value
> >     * Set PORTCS_STS and DEVLC_STS only if sts = 1
> >
> >
> > I cced chris who has imx27 hardware.
> 
> Yes, this patch is applied in 3.15-rc1, but does not help here.
> 

Just tried one imx6dl board, it works well.
Have a look if it is related to phy_type at dts or phy driver please.

Peter

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: USB OTG support on mx27pdk
  2014-04-16  3:23 ` Peter Chen
  2014-04-16  3:28   ` Fabio Estevam
@ 2014-04-16  5:55   ` Alexander Shiyan
  2014-04-16 11:32     ` Fabio Estevam
  1 sibling, 1 reply; 15+ messages in thread
From: Alexander Shiyan @ 2014-04-16  5:55 UTC (permalink / raw)
  To: linux-arm-kernel

Wed, 16 Apr 2014 03:23:54 +0000 ?? Peter Chen <Peter.Chen@freescale.com>:
> > Hi,
> > I am trying to add USBOTG support to mx27pdk with the following dts patch:
...
> I cced chris who has imx27 hardware.

Loading OS arm Linux zImage '/dev/nor0.kernel'
using internal devicetree
commandline: console=ttymxc0,115200n8 earlyprintk  root=/dev/mtdblock3 ro
booting kernel with devicetree

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.15.0-rc1-next-20140415-dirty (shc at shc.zet) (gcc version 4.7.3 (GCC) ) #11 PREEMPT Wed Apr 16 09:40:14 MSK 2014
CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine model: Phytec pcm970
bootconsole [earlycon0] enabled
Memory policy: Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttymxc0,115200n8 earlyprintk  root=/dev/mtdblock3 ro
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 123364K/131072K available (4601K kernel code, 256K rwdata, 1244K rodata, 170K init, 143K bss, 7708K reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
      .text : 0xc0008000 - 0xc05bd8c0   (5847 kB)
      .init : 0xc05be000 - 0xc05e8970   ( 171 kB)
      .data : 0xc05ea000 - 0xc062a260   ( 257 kB)
       .bss : 0xc062a26c - 0xc064e104   ( 144 kB)
Preemptible hierarchical RCU implementation.
NR_IRQS:16 nr_irqs:16 16
MXC IRQ initialized
Switching to timer-based delay loop
sched_clock: 32 bits at 14MHz, resolution 67ns, wraps every 290636879804ns
CPU identified as i.MX27, silicon rev 2.1
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 29.55 BogoMIPS (lpj=147777)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xa045f2c8 - 0xa045f328
devtmpfs: initialized
pinctrl core: initialized pinctrl subsystem
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
imx27-pinctrl 10015000.iomuxc: initialized IMX pinctrl driver
3V3: 3300 mV 
5V0: 5000 mV 
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
platform 0.usbphy: Driver usb_phy_gen_xceiv requests probe deferral
platform 2.usbphy: Driver usb_phy_gen_xceiv requests probe deferral
i2c i2c-0: IMX I2C adapter registered
i2c i2c-1: IMX I2C adapter registered
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource mxc_timer1
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
futex hash table entries: 256 (order: -1, 3072 bytes)
jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
msgmni has been set to 240
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
io scheduler noop registered (default)
imx-weim d8002000.weim: Driver registered.
imx-fb 10021000.fb: i.MX Framebuffer driver
Console: switching to colour frame buffer device 30x40
Serial: IMX driver
1000a000.serial: ttymxc0 at MMIO 0x1000a000 (irq = 36, base_baud = 923611) is a IMX
console [ttymxc0] enabled
bootconsole [earlycon0] disabled
1000b000.serial: ttymxc1 at MMIO 0x1000b000 (irq = 35, base_baud = 923611) is a IMX
[drm] Initialized drm 1.1.0 20060810
at24 1-0052: 4096 byte 24c32 EEPROM, writable, 32 bytes/write
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x00891c
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
4 ofpart partitions found on MTD device physmap-flash.0
Creating 4 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000080000 : "boot"
0x000000080000-0x0000000a0000 : "env"
0x0000000a0000-0x0000004a0000 : "kernel"
0x0000004a0000-0x000002000000 : "root"
nand: device found, Manufacturer ID: 0x20, Chip ID: 0x36
nand: ST Micro NAND 64MiB 1,8V 8-bit
nand: 64MiB, SLC, page size: 512, OOB size: 16
Bad block table found at page 131040, version 0x01
Bad block table found at page 131008, version 0x01
4 ofpart partitions found on MTD device mxc_nand
Creating 4 MTD partitions on "mxc_nand":
0x000000000000-0x000000080000 : "boot"
0x000000080000-0x0000000a0000 : "env"
0x0000000a0000-0x0000004a0000 : "kernel"
0x0000004a0000-0x000004000000 : "root"
mc13xxx spi0.0: mc13783: rev: 3.3, fin: 0, fab: 0, icid: 2/0
SW1A: 1200 <--> 1500 mV at 1450 mV 
SW2A: 1800 mV 
SW3: 5000 mV 
VAUDIO: 2775 mV 
VIOLO: 1800 mV 
VIOHI: 2775 mV 
VGEN: 1500 mV 
VCAM: 2800 mV 
VRF1: 2775 mV 
VRF2: 2775 mV 
VMMC1: 1600 <--> 3000 mV at 2900 mV 
GPO1: 3100 mV 
PWGT1SPI: 5500 mV 
spi_imx 1000e000.cspi: probed
CAN device driver interface
sja1000 CAN netdevice driver
libphy: fec_enet_mii_bus: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-mxc: Freescale On-Chip EHCI Host driver
usbcore: registered new interface driver usb-storage
platform 10024000.usb: Driver imx_usb requests probe deferral
mc13783-pwrbutton mc13783-pwrbutton: missing platform data
mc13xxx-rtc mc13783-rtc: rtc core: registered mc13783-rtc as rtc0
rtc-pcf8563 1-0051: chip found, driver version 0.4.3
rtc-pcf8563 1-0051: low voltage detected, date/time is not reliable.
rtc-pcf8563 1-0051: retrieved date/time is not valid.
rtc-pcf8563 1-0051: rtc core: registered rtc-pcf8563 as rtc1
i2c /dev entries driver
coda 10023000.coda: Initialized CodaDx6.
coda 10023000.coda: Firmware version: 2.2.5
Driver for 1-wire Dallas network protocol.
coda 10023000.coda: codec registered as /dev/video0
lm75 1-004a: hwmon0: sensor 'lm75'
imx2-wdt 10002000.wdog: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=0)
i.MX/MPC512x SDHC driver
mxc-mmc 10014000.sdhci: Got CD GPIO #93.
mxc-mmc 10014000.sdhci: Got WP GPIO #92.
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sahara 10025000.sahara: SAHARA version 3 initialized
mmc0: new SD card at address 0002
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
mmcblk0: mmc0:0002 00000 974 MiB 
 mmcblk0: p1
TCP: cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
5V0: disabling
3V3: disabling
w1_master_driver w1_bus_master1: w1_search: max_slave_count 64 reached, will continue next search.
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 3.15.0-rc1-next-20140415-dirty ehci_hcd
usb usb1: SerialNumber: ci_hdrc.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mc13xxx-rtc mc13783-rtc: setting system clock to 1970-01-01 01:24:48 UTC (5088)
ALSA device list:
  No soundcards found.
VFS: Mounted root (cramfs filesystem) readonly on device 31:3.
devtmpfs: mounted
Freeing unused kernel memory: 168K (c05be000 - c05e8000)

starting pid 656, tty '': '/etc/rc.sysinit'

usb 1-1: new high-speed USB device number 2 using ci_hdrc
usb 1-1: New USB device found, idVendor=07d1, idProduct=3a09
usb 1-1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
usb 1-1: Product: 11n adapter
usb 1-1: Manufacturer: ATHER
usb 1-1: SerialNumber: 12345

Please press Enter to activate this console.

# cat /proc/iomem 
10001000-10001fff : /soc/aipi at 10000000/dma at 10001000
10002000-10002fff : /soc/aipi at 10000000/wdog at 10002000
10006000-10006fff : /soc/aipi at 10000000/pwm at 10006000
10009000-10009fff : /soc/aipi at 10000000/owire at 10009000
1000a000-1000afff : /soc/aipi at 10000000/serial at 1000a000
1000b000-1000bfff : /soc/aipi at 10000000/serial at 1000b000
1000e000-1000efff : /soc/aipi at 10000000/cspi at 1000e000
10012000-10012fff : /soc/aipi at 10000000/i2c at 10012000
10014000-10014fff : 10014000.sdhci
10015000-100150ff : /soc/aipi at 10000000/iomuxc at 10015000/gpio at 10015000
10015100-100151ff : /soc/aipi at 10000000/iomuxc at 10015000/gpio at 10015100
10015200-100152ff : /soc/aipi at 10000000/iomuxc at 10015000/gpio at 10015200
10015300-100153ff : /soc/aipi at 10000000/iomuxc at 10015000/gpio at 10015300
10015400-100154ff : /soc/aipi at 10000000/iomuxc at 10015000/gpio at 10015400
10015500-100155ff : /soc/aipi at 10000000/iomuxc at 10015000/gpio at 10015500
10016000-10016fff : /soc/aipi at 10000000/audmux at 10016000
1001d000-1001dfff : /soc/aipi at 10000000/i2c at 1001d000
10021000-10021fff : imx-fb
10023000-100231ff : /soc/aipi at 10020000/coda at 10023000
10024000-100241ff : /soc/aipi at 10020000/usb at 10024000
  10024000-100241ff : /soc/aipi at 10020000/usb at 10024000
10024600-100247ff : /soc/aipi at 10020000/usbmisc at 10024600
10025000-10025fff : /soc/aipi at 10020000/sahara at 10025000
1002b000-1002efff : /soc/aipi at 10020000/ethernet at 1002b000
a0000000-a7ffffff : System RAM
  a0008000-a05bd8bf : Kernel code
  a05ea000-a064e103 : Kernel data
c0000000-c1ffffff : c0000000.nor
c8000000-c87fffff : c8000000.sram
d8000000-d8000fff : /soc/nand at d8000000
d8002000-d8002fff : /soc/weim at d8002000
ffff4c00-ffffffff : /soc/iram at ffff4c00

# cat /proc/interrupts 
           CPU0       
 17:         20  mxc-avic   1  1001d000.i2c
 26:         29  mxc-avic  10  mxc-mmc
 28:          0  mxc-avic  12  10012000.i2c
 32:       6385  mxc-avic  16  1000e000.cspi
 36:         89  mxc-avic  20  1000a000.serial
 42:       3975  mxc-avic  26  i.MX Timer Tick
 45:         15  mxc-avic  29  mxc_nand
 48:          1  mxc-avic  32  DMA
 49:          0  mxc-avic  33  DMA
 50:          0  mxc-avic  34  DMA
 51:          0  mxc-avic  35  DMA
 52:          0  mxc-avic  36  DMA
 53:          0  mxc-avic  37  DMA
 54:          0  mxc-avic  38  DMA
 55:          0  mxc-avic  39  DMA
 56:          0  mxc-avic  40  DMA
 57:          0  mxc-avic  41  DMA
 58:          0  mxc-avic  42  DMA
 59:          0  mxc-avic  43  DMA
 60:          0  mxc-avic  44  DMA
 61:          0  mxc-avic  45  DMA
 62:          0  mxc-avic  46  DMA
 63:          0  mxc-avic  47  DMA
 66:         64  mxc-avic  50  1002b000.ethernet
 69:          0  mxc-avic  53  coda
 72:         21  mxc-avic  56  10024000.usb
 75:          0  mxc-avic  59  10025000.sahara
135:        654  gpio-mxc  23  mc13xxx
173:          0  gpio-mxc  29  10014000.sdhci cd
Err:          0

---

^ permalink raw reply	[flat|nested] 15+ messages in thread

* USB OTG support on mx27pdk
  2014-04-16  5:55   ` Alexander Shiyan
@ 2014-04-16 11:32     ` Fabio Estevam
  2014-04-16 11:58       ` Alexander Shiyan
  0 siblings, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2014-04-16 11:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 16, 2014 at 2:55 AM, Alexander Shiyan <shc_work@mail.ru> wrote:

> ci_hdrc ci_hdrc.0: EHCI Host Controller
> ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
> ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
> usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
> usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> usb usb1: Product: EHCI Host Controller
> usb usb1: Manufacturer: Linux 3.15.0-rc1-next-20140415-dirty ehci_hcd
> usb usb1: SerialNumber: ci_hdrc.0
> hub 1-0:1.0: USB hub found
> hub 1-0:1.0: 1 port detected

Thanks for testing, Alexander.

Does your bootloader have USB support?

If so, would it be possible to remove the USB support from the
bootloader, please?

I am wondering if the bootloader is doing some USB related init that
the kernel is missing.

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: USB OTG support on mx27pdk
  2014-04-16 11:32     ` Fabio Estevam
@ 2014-04-16 11:58       ` Alexander Shiyan
  2014-04-16 12:53         ` Fabio Estevam
  0 siblings, 1 reply; 15+ messages in thread
From: Alexander Shiyan @ 2014-04-16 11:58 UTC (permalink / raw)
  To: linux-arm-kernel

Wed, 16 Apr 2014 08:32:55 -0300 ?? Fabio Estevam <festevam@gmail.com>:
> On Wed, Apr 16, 2014 at 2:55 AM, Alexander Shiyan <shc_work@mail.ru> wrote:
> 
> > ci_hdrc ci_hdrc.0: EHCI Host Controller
> > ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
> > ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
> > usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
> > usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> > usb usb1: Product: EHCI Host Controller
> > usb usb1: Manufacturer: Linux 3.15.0-rc1-next-20140415-dirty ehci_hcd
> > usb usb1: SerialNumber: ci_hdrc.0
> > hub 1-0:1.0: USB hub found
> > hub 1-0:1.0: 1 port detected
> 
> Thanks for testing, Alexander.
> 
> Does your bootloader have USB support?
> 
> If so, would it be possible to remove the USB support from the
> bootloader, please?
> 
> I am wondering if the bootloader is doing some USB related init that
> the kernel is missing.

I can tell immediately without further testing,
this will not work without the USB support in the bootoader because
we do not have DT support for ULPI.

---

^ permalink raw reply	[flat|nested] 15+ messages in thread

* USB OTG support on mx27pdk
  2014-04-16 11:58       ` Alexander Shiyan
@ 2014-04-16 12:53         ` Fabio Estevam
  2014-04-16 15:03           ` Michael Grzeschik
  0 siblings, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2014-04-16 12:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 16, 2014 at 8:58 AM, Alexander Shiyan <shc_work@mail.ru> wrote:

> I can tell immediately without further testing,
> this will not work without the USB support in the bootoader because
> we do not have DT support for ULPI.

The generic nop usb phy should work just fine.

I have tried Uwe's suggestion from a previous post and reverted:

commit cd0b42c2a6d2a74244f0053f8960f5dad5842278
Author: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Date:   Fri Jan 10 13:51:30 2014 +0800

    usb: chipidea: put hw_phymode_configure before ci_usb_phy_init

    hw_phymode_configure configures the PORTSC registers and allow the
    following phy_inits to operate on the right parameters. This fix a problem
    where the UPLI (ISP1504) could not be detected, because the Viewport was not
    available and read the viewport return 0's only.

    Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
    Signed-off-by: Peter Chen <peter.chen@freescale.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


Then USB OTG port detected the USB pen driver fine:

usbcore: registered new interface driver usb-storage
10024000.usb supply vbus not found, using dummy regulator
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
...
scsi 0:0:0:0: Direct-Access     ChipsBnk Flash Disk       2.00 PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] 1035200 512-byte logical blocks: (530 MB/505 MiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk

If I understand correctly commit cd0b42c2a was only needed because
Chris was trying to add DT support for ULPI, which never got merged
into mainline.

If we use the generic nop usb phy instead, we should just revert this commit.

Any objections?

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 15+ messages in thread

* USB OTG support on mx27pdk
  2014-04-16 12:53         ` Fabio Estevam
@ 2014-04-16 15:03           ` Michael Grzeschik
  2014-04-16 15:52             ` Fabio Estevam
  2014-04-19  7:32             ` Peter Chen
  0 siblings, 2 replies; 15+ messages in thread
From: Michael Grzeschik @ 2014-04-16 15:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Apr 16, 2014 at 09:53:34AM -0300, Fabio Estevam wrote:
> On Wed, Apr 16, 2014 at 8:58 AM, Alexander Shiyan <shc_work@mail.ru> wrote:
> 
> > I can tell immediately without further testing,
> > this will not work without the USB support in the bootoader because
> > we do not have DT support for ULPI.
> 
> The generic nop usb phy should work just fine.
> 
> I have tried Uwe's suggestion from a previous post and reverted:
> 
> commit cd0b42c2a6d2a74244f0053f8960f5dad5842278
> Author: Chris Ruehl <chris.ruehl@gtsys.com.hk>
> Date:   Fri Jan 10 13:51:30 2014 +0800
> 
>     usb: chipidea: put hw_phymode_configure before ci_usb_phy_init
> 
>     hw_phymode_configure configures the PORTSC registers and allow the
>     following phy_inits to operate on the right parameters. This fix a problem
>     where the UPLI (ISP1504) could not be detected, because the Viewport was not
>     available and read the viewport return 0's only.
> 
>     Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
>     Signed-off-by: Peter Chen <peter.chen@freescale.com>
>     Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> 
> Then USB OTG port detected the USB pen driver fine:
> 
> usbcore: registered new interface driver usb-storage
> 10024000.usb supply vbus not found, using dummy regulator
> ci_hdrc ci_hdrc.0: EHCI Host Controller
> ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
> ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
> hub 1-0:1.0: USB hub found
> hub 1-0:1.0: 1 port detected
> ...
> scsi 0:0:0:0: Direct-Access     ChipsBnk Flash Disk       2.00 PQ: 0 ANSI: 2
> sd 0:0:0:0: [sda] 1035200 512-byte logical blocks: (530 MB/505 MiB)
> sd 0:0:0:0: [sda] Write Protect is off
> sd 0:0:0:0: [sda] No Caching mode page found
> sd 0:0:0:0: [sda] Assuming drive cache: write through
>  sda: sda1
> sd 0:0:0:0: [sda] Attached SCSI removable disk
> 
> If I understand correctly commit cd0b42c2a was only needed because
> Chris was trying to add DT support for ULPI, which never got merged
> into mainline.
> 
> If we use the generic nop usb phy instead, we should just revert this commit.
> 
> Any objections?

Yes, when this patch got reverted it will probably break usb support
on mx6 machines. We have seen different behaviour on several mxc/mxs
machines regarding the order of PORTSC and phy configuration.

We will probably need to test all platforms before reordering this
function call again and again for every machine using this driver.

Regards,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 15+ messages in thread

* USB OTG support on mx27pdk
  2014-04-16 15:03           ` Michael Grzeschik
@ 2014-04-16 15:52             ` Fabio Estevam
  2014-04-19  7:32             ` Peter Chen
  1 sibling, 0 replies; 15+ messages in thread
From: Fabio Estevam @ 2014-04-16 15:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 16, 2014 at 12:03 PM, Michael Grzeschik <mgr@pengutronix.de> wrote:
> Yes, when this patch got reverted it will probably break usb support
> on mx6 machines. We have seen different behaviour on several mxc/mxs
> machines regarding the order of PORTSC and phy configuration.
>
> We will probably need to test all platforms before reordering this
> function call again and again for every machine using this driver.

Ok, I managed to fix the issue on mx27 without touching the chipidea driver.

Will submit the fix later today.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 15+ messages in thread

* USB OTG support on mx27pdk
  2014-04-16 15:03           ` Michael Grzeschik
  2014-04-16 15:52             ` Fabio Estevam
@ 2014-04-19  7:32             ` Peter Chen
  2014-04-19 17:09               ` Fabio Estevam
  1 sibling, 1 reply; 15+ messages in thread
From: Peter Chen @ 2014-04-19  7:32 UTC (permalink / raw)
  To: linux-arm-kernel

 
> 
> On Wed, Apr 16, 2014 at 09:53:34AM -0300, Fabio Estevam wrote:
> > On Wed, Apr 16, 2014 at 8:58 AM, Alexander Shiyan <shc_work@mail.ru>
> wrote:
> >
> > > I can tell immediately without further testing,
> > > this will not work without the USB support in the bootoader because
> > > we do not have DT support for ULPI.
> >
> > The generic nop usb phy should work just fine.
> >
> > I have tried Uwe's suggestion from a previous post and reverted:
> >
> > commit cd0b42c2a6d2a74244f0053f8960f5dad5842278
> > Author: Chris Ruehl <chris.ruehl@gtsys.com.hk>
> > Date:   Fri Jan 10 13:51:30 2014 +0800
> >
> >     usb: chipidea: put hw_phymode_configure before ci_usb_phy_init
> >
> >     hw_phymode_configure configures the PORTSC registers and allow the
> >     following phy_inits to operate on the right parameters. This fix a
> problem
> >     where the UPLI (ISP1504) could not be detected, because the
> Viewport was not
> >     available and read the viewport return 0's only.
> >
> >     Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
> >     Signed-off-by: Peter Chen <peter.chen@freescale.com>
> >     Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> >
> > Then USB OTG port detected the USB pen driver fine:
> >
> > usbcore: registered new interface driver usb-storage
> > 10024000.usb supply vbus not found, using dummy regulator
> > ci_hdrc ci_hdrc.0: EHCI Host Controller
> > ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
> > ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
> > hub 1-0:1.0: USB hub found
> > hub 1-0:1.0: 1 port detected
> > ...
> > scsi 0:0:0:0: Direct-Access     ChipsBnk Flash Disk       2.00 PQ: 0
> ANSI: 2
> > sd 0:0:0:0: [sda] 1035200 512-byte logical blocks: (530 MB/505 MiB)
> > sd 0:0:0:0: [sda] Write Protect is off
> > sd 0:0:0:0: [sda] No Caching mode page found
> > sd 0:0:0:0: [sda] Assuming drive cache: write through
> >  sda: sda1
> > sd 0:0:0:0: [sda] Attached SCSI removable disk
> >
> > If I understand correctly commit cd0b42c2a was only needed because
> > Chris was trying to add DT support for ULPI, which never got merged
> > into mainline.
> >
> > If we use the generic nop usb phy instead, we should just revert this
> commit.
> >
> > Any objections?
> 
> Yes, when this patch got reverted it will probably break usb support
> on mx6 machines. We have seen different behaviour on several mxc/mxs
> machines regarding the order of PORTSC and phy configuration.
> 
> We will probably need to test all platforms before reordering this
> function call again and again for every machine using this driver.
> 

The below patch is intended to fix above issues for all platforms,
I have tested it at imx6 platform, if possible, have a test at imx25/imx27
please.

Peter

^ permalink raw reply	[flat|nested] 15+ messages in thread

* USB OTG support on mx27pdk
  2014-04-19  7:32             ` Peter Chen
@ 2014-04-19 17:09               ` Fabio Estevam
  2014-04-20  0:48                 ` Peter Chen
  0 siblings, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2014-04-19 17:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 19, 2014 at 4:32 AM, Peter Chen <Peter.Chen@freescale.com> wrote:
> The below patch is intended to fix above issues for all platforms,
> I have tested it at imx6 platform, if possible, have a test at imx25/imx27
> please.

I don't see any patch below, but anyway I have managed to fix the
issue on mx27 at dts level.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* USB OTG support on mx27pdk
  2014-04-19 17:09               ` Fabio Estevam
@ 2014-04-20  0:48                 ` Peter Chen
  2014-04-20  3:58                   ` Alexander Shiyan
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Chen @ 2014-04-20  0:48 UTC (permalink / raw)
  To: linux-arm-kernel

 

> -----Original Message-----
> From: Fabio Estevam [mailto:festevam at gmail.com]
> Sent: Sunday, April 20, 2014 1:10 AM
> To: Chen Peter-B29397
> Cc: Michael Grzeschik; Alexander Shiyan; linux-arm-
> kernel at lists.infradead.org; linux-usb at vger.kernel.org; Sascha Hauer;
> chris.ruehl at gtsys.com.hk; Guo Shawn-R65073
> Subject: Re: USB OTG support on mx27pdk
> 
> On Sat, Apr 19, 2014 at 4:32 AM, Peter Chen <Peter.Chen@freescale.com>
> wrote:
> > The below patch is intended to fix above issues for all platforms,
> > I have tested it at imx6 platform, if possible, have a test at
> imx25/imx27
> > please.
> 
> I don't see any patch below, but anyway I have managed to fix the
> issue on mx27 at dts level.
> 

https://github.com/hzpeterchen/linux-usb/commit/c1f42ea27ed3f5d988c63da7849d2e6b445b4fbc

Your problem is different with sasche's, which hang the system due to
no phy clk. The chris's patch should not cause the oops.

Peter

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: USB OTG support on mx27pdk
  2014-04-20  0:48                 ` Peter Chen
@ 2014-04-20  3:58                   ` Alexander Shiyan
  2014-04-20 12:05                     ` Peter Chen
  0 siblings, 1 reply; 15+ messages in thread
From: Alexander Shiyan @ 2014-04-20  3:58 UTC (permalink / raw)
  To: linux-arm-kernel

Sun, 20 Apr 2014 00:48:28 +0000 ?? Peter Chen <Peter.Chen@freescale.com>:
> > -----Original Message-----
> > From: Fabio Estevam [mailto:festevam at gmail.com]
> > Sent: Sunday, April 20, 2014 1:10 AM
> > To: Chen Peter-B29397
> > Cc: Michael Grzeschik; Alexander Shiyan; linux-arm-
> > kernel at lists.infradead.org; linux-usb at vger.kernel.org; Sascha Hauer;
> > chris.ruehl at gtsys.com.hk; Guo Shawn-R65073
> > Subject: Re: USB OTG support on mx27pdk
> > 
> > On Sat, Apr 19, 2014 at 4:32 AM, Peter Chen <Peter.Chen@freescale.com>
> > wrote:
> > > The below patch is intended to fix above issues for all platforms,
> > > I have tested it at imx6 platform, if possible, have a test at
> > imx25/imx27
> > > please.
> > 
> > I don't see any patch below, but anyway I have managed to fix the
> > issue on mx27 at dts level.
> > 
> 
> https://github.com/hzpeterchen/linux-usb/commit/c1f42ea27ed3f5d988c63da7849d2e6b445b4fbc
> 
> Your problem is different with sasche's, which hang the system due to
> no phy clk. The chris's patch should not cause the oops.

For me, nothing has changed.
The driver works on i.MX27 PCM970 RDK with the patch as well as without it.

---

^ permalink raw reply	[flat|nested] 15+ messages in thread

* USB OTG support on mx27pdk
  2014-04-20  3:58                   ` Alexander Shiyan
@ 2014-04-20 12:05                     ` Peter Chen
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Chen @ 2014-04-20 12:05 UTC (permalink / raw)
  To: linux-arm-kernel

 
> 
> Sun, 20 Apr 2014 00:48:28 +0000 ?? Peter Chen <Peter.Chen@freescale.com>:
> > > -----Original Message-----
> > > From: Fabio Estevam [mailto:festevam at gmail.com]
> > > Sent: Sunday, April 20, 2014 1:10 AM
> > > To: Chen Peter-B29397
> > > Cc: Michael Grzeschik; Alexander Shiyan; linux-arm-
> > > kernel at lists.infradead.org; linux-usb at vger.kernel.org; Sascha Hauer;
> > > chris.ruehl at gtsys.com.hk; Guo Shawn-R65073
> > > Subject: Re: USB OTG support on mx27pdk
> > >
> > > On Sat, Apr 19, 2014 at 4:32 AM, Peter Chen <Peter.Chen@freescale.com>
> > > wrote:
> > > > The below patch is intended to fix above issues for all platforms,
> > > > I have tested it at imx6 platform, if possible, have a test at
> > > imx25/imx27
> > > > please.
> > >
> > > I don't see any patch below, but anyway I have managed to fix the
> > > issue on mx27 at dts level.
> > >
> >
> > https://github.com/hzpeterchen/linux-
> usb/commit/c1f42ea27ed3f5d988c63da7849d2e6b445b4fbc
> >
> > Your problem is different with sasche's, which hang the system due to
> > no phy clk. The chris's patch should not cause the oops.
> 
> For me, nothing has changed.
> The driver works on i.MX27 PCM970 RDK with the patch as well as without
> it.
> 

Thanks for testing. This patch does not change the flow for ulpi, it changes
pts at portsc first, and call ulpi_init if it exists, your results prove that
the patch works ok if the kernel does not touch ulpi.

Peter


 

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-04-20 12:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16  1:43 USB OTG support on mx27pdk Fabio Estevam
2014-04-16  3:23 ` Peter Chen
2014-04-16  3:28   ` Fabio Estevam
2014-04-16  5:47     ` Peter Chen
2014-04-16  5:55   ` Alexander Shiyan
2014-04-16 11:32     ` Fabio Estevam
2014-04-16 11:58       ` Alexander Shiyan
2014-04-16 12:53         ` Fabio Estevam
2014-04-16 15:03           ` Michael Grzeschik
2014-04-16 15:52             ` Fabio Estevam
2014-04-19  7:32             ` Peter Chen
2014-04-19 17:09               ` Fabio Estevam
2014-04-20  0:48                 ` Peter Chen
2014-04-20  3:58                   ` Alexander Shiyan
2014-04-20 12:05                     ` Peter Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.