mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* PCM038 USB is broken again
@ 2013-08-10  4:10 Alexander Shiyan
  2013-08-12  7:07 ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Shiyan @ 2013-08-10  4:10 UTC (permalink / raw)
  To: barebox

Hello.

USB functionality on PCM038 (PCM970) is broken again due
patch "Revert usb: chipidea-imx: Fix usb initialization".

Board: Phytec phyCORE-i.MX27
detected i.MX27 revision 2.1
netconsole: registered as cs1
mc13xxx-spi mc137830: Found MC13783 ID: 0x00009b [Rev: 3.1]
cfi_flash cfi_flash0: found cfi flash at c0000000, size 33554432
nand: NAND device: Manufacturer ID: 0x20, Chip ID: 0x36 (ST Micro NAND 64MiB 1,8V 8-bit), 64MiB, page size: 512, OOB size: 16
Bad block table found at page 131040, version 0x01
Bad block table found at page 131008, version 0x01
imxfb imxfb: i.MX Framebuffer driver
mdio_bus: miibus0: probed
No ULPI found. vid: 0x0000 pid: 0x0000
pcm038: Using environment in NOR Flash
No ULPI found. vid: 0x0000 pid: 0x0000
imx-usb imx-usb2: USB EHCI 1.00
imx-mmc imx-mmc1: registered as imx-mmc1
running /env/bin/init...

After remove this patch, all works fine.

Board: Phytec phyCORE-i.MX27
detected i.MX27 revision 2.1
netconsole: registered as cs1
mc13xxx-spi mc137830: Found MC13783 ID: 0x00009b [Rev: 3.1]
cfi_flash cfi_flash0: found cfi flash at c0000000, size 33554432
nand: NAND device: Manufacturer ID: 0x20, Chip ID: 0x36 (ST Micro NAND 64MiB 1,8V 8-bit), 64MiB, page size: 512, OOB size: 16
Bad block table found at page 131040, version 0x01
Bad block table found at page 131008, version 0x01
imxfb imxfb: i.MX Framebuffer driver
mdio_bus: miibus0: probed
Found NXP ISP150x ULPI transceiver (0x04cc:0x1504).
pcm038: Using environment in NOR Flash
Found NXP ISP150x ULPI transceiver (0x04cc:0x1504).
imx-usb imx-usb2: USB EHCI 1.00
imx-mmc imx-mmc1: registered as imx-mmc1
running /env/bin/init...

---
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: PCM038 USB is broken again
  2013-08-10  4:10 PCM038 USB is broken again Alexander Shiyan
@ 2013-08-12  7:07 ` Sascha Hauer
  2013-08-12 10:56   ` Alexander Shiyan
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2013-08-12  7:07 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

On Sat, Aug 10, 2013 at 08:10:53AM +0400, Alexander Shiyan wrote:
> Hello.
> 
> USB functionality on PCM038 (PCM970) is broken again due
> patch "Revert usb: chipidea-imx: Fix usb initialization".
> 
> Board: Phytec phyCORE-i.MX27
> detected i.MX27 revision 2.1
> netconsole: registered as cs1
> mc13xxx-spi mc137830: Found MC13783 ID: 0x00009b [Rev: 3.1]
> cfi_flash cfi_flash0: found cfi flash at c0000000, size 33554432
> nand: NAND device: Manufacturer ID: 0x20, Chip ID: 0x36 (ST Micro NAND 64MiB 1,8V 8-bit), 64MiB, page size: 512, OOB size: 16
> Bad block table found at page 131040, version 0x01
> Bad block table found at page 131008, version 0x01
> imxfb imxfb: i.MX Framebuffer driver
> mdio_bus: miibus0: probed
> No ULPI found. vid: 0x0000 pid: 0x0000
> pcm038: Using environment in NOR Flash
> No ULPI found. vid: 0x0000 pid: 0x0000
> imx-usb imx-usb2: USB EHCI 1.00
> imx-mmc imx-mmc1: registered as imx-mmc1
> running /env/bin/init...
> 
> After remove this patch, all works fine.

Have you verified it really doesn't work? I get the 'No ULPI found'
message aswell, but the ULPI phys are probed again during the 'usb'
command and it then works here.

Sascha

-- 
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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: PCM038 USB is broken again
  2013-08-12  7:07 ` Sascha Hauer
@ 2013-08-12 10:56   ` Alexander Shiyan
  2013-08-13  6:26     ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Shiyan @ 2013-08-12 10:56 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox




Понедельник, 12 августа 2013, 9:07 +02:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> On Sat, Aug 10, 2013 at 08:10:53AM +0400, Alexander Shiyan wrote:
> > Hello.
> > 
> > USB functionality on PCM038 (PCM970) is broken again due
> > patch "Revert usb: chipidea-imx: Fix usb initialization".
> > 
> > Board: Phytec phyCORE-i.MX27
> > detected i.MX27 revision 2.1
> > netconsole: registered as cs1
> > mc13xxx-spi mc137830: Found MC13783 ID: 0x00009b [Rev: 3.1]
> > cfi_flash cfi_flash0: found cfi flash at c0000000, size 33554432
> > nand: NAND device: Manufacturer ID: 0x20, Chip ID: 0x36 (ST Micro NAND 64MiB 1,8V 8-bit), 64MiB, page size: 512, OOB size: 16
> > Bad block table found at page 131040, version 0x01
> > Bad block table found at page 131008, version 0x01
> > imxfb imxfb: i.MX Framebuffer driver
> > mdio_bus: miibus0: probed
> > No ULPI found. vid: 0x0000 pid: 0x0000
> > pcm038: Using environment in NOR Flash
> > No ULPI found. vid: 0x0000 pid: 0x0000
> > imx-usb imx-usb2: USB EHCI 1.00
> > imx-mmc imx-mmc1: registered as imx-mmc1
> > running /env/bin/init...
> > 
> > After remove this patch, all works fine.
> 
> Have you verified it really doesn't work? I get the 'No ULPI found'
> message aswell, but the ULPI phys are probed again during the 'usb'
> command and it then works here.

Same result on CCMX51.

barebox 2013.06.0-00186-gae970c3 #12 Tue Jul 2 13:56:48 MSK 2013
Board: ConnectCore i.MX51
detected i.MX51 revision 3.0
Module Variant: i.MX515@600MHz, PHY, Accel (0x0b)
Module HW Rev : 03
Module Serial : B111156789
mc13xxx-spi mc13xxx-spi0: Found MC13892 ID: 0x0045d0 [Rev: 2.0a]
nand: ONFI param page 0 valid
nand: ONFI flash detected ... nand: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08AAD), page size: 2048, OOB size: 64
malloc space: 0x95f00000 -> 0x97efffff (size 32 MiB)
imx-esdhc imx-esdhc0: registered as imx-esdhc0
Found NXP ISP150x ULPI transceiver (0x04cc:0x1504).
imx-usb imx-usb1: USB EHCI 1.00
envfs: wrong magic on /dev/env0
no valid environment found on /dev/env0. Using default environment
running /env/bin/init...

...

barebox 2013.08.0-00157-g9b0907b-dirty #3 Mon Aug 12 14:47:06 MSK 2013
Board: ConnectCore i.MX51
detected i.MX51 revision 3.0
Module Variant: i.MX515@600MHz, PHY, Accel (0x0b)
Module HW Rev : 03
Module Serial : B111156789
mc13xxx-spi mc138920: Found MC13892 ID: 0x0045d0 [Rev: 2.0a]
nand: ONFI param page 0 valid
nand: ONFI flash detected
nand: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08AAD), 256MiB, page size: 2048, OOB size: 64
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
malloc space: 0x95f00000 -> 0x97efffff (size 32 MiB)
imx-esdhc imx-esdhc0: registered as imx-esdhc0
No ULPI found. vid: 0x0000 pid: 0x0000
imx-usb imx-usb1: USB EHCI 1.00
envfs: wrong magic on /dev/env0
no valid environment found on /dev/env0. Using default environment
running /env/bin/init...

...
And yes, this works after "usb" command:
barebox@ConnectCore i.MX51:/ usb
USB: scanning bus for devices...
Found NXP ISP150x ULPI transceiver (0x04cc:0x1504).
Bus 001 Device 001: ID 0000:0000 EHCI Host Controller
1 USB Device(s) found

So, you consider this is not a bug?

---
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: PCM038 USB is broken again
  2013-08-12 10:56   ` Alexander Shiyan
@ 2013-08-13  6:26     ` Sascha Hauer
  2013-08-15 19:32       ` Alexander Shiyan
  0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2013-08-13  6:26 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

On Mon, Aug 12, 2013 at 02:56:56PM +0400, Alexander Shiyan wrote:
> ...
> And yes, this works after "usb" command:
> barebox@ConnectCore i.MX51:/ usb
> USB: scanning bus for devices...
> Found NXP ISP150x ULPI transceiver (0x04cc:0x1504).
> Bus 001 Device 001: ID 0000:0000 EHCI Host Controller
> 1 USB Device(s) found
> 
> So, you consider this is not a bug?

Doing the initialization twice is not nice and wasn't intended, so
indeed this is something worth fixing.

Sascha

-- 
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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: PCM038 USB is broken again
  2013-08-13  6:26     ` Sascha Hauer
@ 2013-08-15 19:32       ` Alexander Shiyan
  2013-08-16  8:01         ` Sascha Hauer
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Shiyan @ 2013-08-15 19:32 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Tue, 13 Aug 2013 08:26:07 +0200
Sascha Hauer <s.hauer@pengutronix.de> wrote:

> On Mon, Aug 12, 2013 at 02:56:56PM +0400, Alexander Shiyan wrote:
> > ...
> > And yes, this works after "usb" command:
> > barebox@ConnectCore i.MX51:/ usb
> > USB: scanning bus for devices...
> > Found NXP ISP150x ULPI transceiver (0x04cc:0x1504).
> > Bus 001 Device 001: ID 0000:0000 EHCI Host Controller
> > 1 USB Device(s) found
> > 
> > So, you consider this is not a bug?
> 
> Doing the initialization twice is not nice and wasn't intended, so
> indeed this is something worth fixing.

Datasheet MCIMX51RM.pdf says:
60.3.8 ULPI/Serial MUX
Host1, Host2, and OTG cores can be configured by software for ULPI or Serial PHY operation. The
ULPI/Serial mux selects between ULPI interface signals and Serial PHY interface signals. The mux is
controlled by the PHY Select signals from the USB core and is switched when the software selects the
interface mode.
The default configuration for the mux is Serial mode. Switching to ULPI mode is done by writing the
Parallel Transceiver Select (PTS) bits in the PORTSC register with 0b10.

So, we need to setup PORTSC to ULPI mode first.

-- 
Alexander Shiyan <shc_work@mail.ru>

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: PCM038 USB is broken again
  2013-08-15 19:32       ` Alexander Shiyan
@ 2013-08-16  8:01         ` Sascha Hauer
  0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2013-08-16  8:01 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

On Thu, Aug 15, 2013 at 11:32:41PM +0400, Alexander Shiyan wrote:
> On Tue, 13 Aug 2013 08:26:07 +0200
> Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > On Mon, Aug 12, 2013 at 02:56:56PM +0400, Alexander Shiyan wrote:
> > > ...
> > > And yes, this works after "usb" command:
> > > barebox@ConnectCore i.MX51:/ usb
> > > USB: scanning bus for devices...
> > > Found NXP ISP150x ULPI transceiver (0x04cc:0x1504).
> > > Bus 001 Device 001: ID 0000:0000 EHCI Host Controller
> > > 1 USB Device(s) found
> > > 
> > > So, you consider this is not a bug?
> > 
> > Doing the initialization twice is not nice and wasn't intended, so
> > indeed this is something worth fixing.
> 
> Datasheet MCIMX51RM.pdf says:
> 60.3.8 ULPI/Serial MUX
> Host1, Host2, and OTG cores can be configured by software for ULPI or Serial PHY operation. The
> ULPI/Serial mux selects between ULPI interface signals and Serial PHY interface signals. The mux is
> controlled by the PHY Select signals from the USB core and is switched when the software selects the
> interface mode.
> The default configuration for the mux is Serial mode. Switching to ULPI mode is done by writing the
> Parallel Transceiver Select (PTS) bits in the PORTSC register with 0b10.
> 
> So, we need to setup PORTSC to ULPI mode first.

Yes, ok. The problem is that fixing initialization on one board seems
to break it on another board. I'm a bit out of ideas since this
initialization shuffeling follows me for several years now. I have some
patches in my queue which I'll send the weekend. I hope this fixes it
for you while keeping HSIC workable.

Sascha

-- 
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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2013-08-16  8:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-10  4:10 PCM038 USB is broken again Alexander Shiyan
2013-08-12  7:07 ` Sascha Hauer
2013-08-12 10:56   ` Alexander Shiyan
2013-08-13  6:26     ` Sascha Hauer
2013-08-15 19:32       ` Alexander Shiyan
2013-08-16  8:01         ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox