From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-Boot 2018.09 imx6ull mass storage issue
Date: Thu, 27 Dec 2018 00:17:30 +0100 [thread overview]
Message-ID: <20181227001730.62707765@jawa> (raw)
In-Reply-To: <1b81d699-840e-36ec-318c-8bb8ae0af536@wp.pl>
Hi Michał,
> Hello,
>
> I try to load some images from USB flash drive. When issuing/usb
> start/with the flash drive on to the first USB I get some following
> information:
>
> U-Boot 2018.09-36904-gae57ffc-dirty (Dec 18 2018 - 23:00:37 +0100)
>
> CPU: Freescale i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
> CPU: Industrial temperature grade (-40C to 105C) at 49C
> Reset cause: POR
> Model: SomLabs i.MX6 ULL Visionsom
> Board: SomLabs visionsom 6ull
> DRAM: 512 MiB
> NAND: 512 MiB
> Loading Environment from NAND... *** Warning - bad CRC, using
> default environmet
>
> Video: 800x480x24
> In: serial
> Out: serial
> Err: serial
> Net: FEC0 [PRIME]
> Warning: FEC0 (eth0) using random MAC address - 46:79:2e:d4:3f:03
>
> Somlabs iMX6ULL # usb start
> starting USB...
> USB0: USB EHCI 1.00
> USB1: USB EHCI 1.00
> scanning bus 0 for devices... 1 USB Device(s) found
> scanning bus 1 for devices... EHCI timed out on TD -
> token=0x80008d80
>
> USB device not accepting new address (error=22)
> 1 USB Device(s) found
> scanning usb for storage devices... 0 Storage Device(s) found
> Somlabs iMX6ULL #
>
> I'm trying to find the solution on different forums but without
> success. Hardware is OK because on U-Boot from 2017.03 it works
> well.Hi Here is a list what I'm trying
>
> 1. setenv usb_pgood_delay 10000
> 2. Changed max_xfer_blk to 32768, 65535 etc.
> 3. Adding extra lines into usb_storage.c
>
> int gave_extra_time = 0;
>
> ...
>
> if ((srb->sense_buf[2] == 0x02) &&
> (srb->sense_buf[12] == 0x3a))
> return -1;
>
> ...
>
> /* If the status is "Not Ready - becoming ready", give it
> * more time. Linux issues a spinup command (once) and gives
> * it 100 seconds. */
> if (srb->sense_buf[2] == 0x02 && srb->sense_buf[12] == 0x04 &&
> gave_extra_time == 0)
> gave_extra_time = retries = 1000; /* Allow 10 seconds. */
> ...
>
> mdelay(100);
> } while (retries--);
>
> The problem is with disappearing power supply on USB.
Maybe you need to check if DTS description of some regulator is missing?
From 2017 till now a lot of subsystems have been converted to driver
model.
> The flash drive
> blinks shortly and disabled at all then. Nothing helps so far. On
> U-Boot 2017.03 when I issue/usb//start/, the flash drive blinks 2
> times and LED in it start beam constantly. Of course, all USB flash
> drive operations working well.
>
> U-Boot is available at GitHub - SoMLabs/somlabs-uboot-imx
> <https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FSoMLabs%2Fsomlabs-uboot-imx> -
> branch 2018.09 if someone wants to check parameters (draft version)
>
>
>
> I added some parameters related with usb and mass storage
>
>
> form defconfig
>
>
> CONFIG_CMD_USB=y
> CONFIG_USB=y
> CONFIG_DM_USB=y
> CONFIG_USB_EHCI_HCD=y
> CONFIG_MXC_USB_OTG_HACTIVE=y
> CONFIG_CMD_USB_MASS_STORAGE=y
> CONFIG_USB_STORAGE=y
> CONFIG_USB_GADGET=y
> CONFIG_USB_GADGET_MANUFACTURER="SomLabs"
> CONFIG_USB_GADGET_VENDOR_NUM=0x1b67
> CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
> CONFIG_CI_UDC=y
> CONFIG_USB_GADGET_DOWNLOAD=y
>
> form dts
>
> regulators {
> compatible = "simple-bus";
> #address-cells = <1>;
> #size-cells = <0>;
>
> reg_usb_otg1_vbus: regulator at 2 {
> compatible = "regulator-fixed";
> reg = <2>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_usb_otg1>;
> regulator-name = "usb_otg1_vbus";
> regulator-min-microvolt = <5000000>;
> regulator-max-microvolt = <5000000>;
> gpio = <&gpio2 8 GPIO_ACTIVE_HIGH>;
> enable-active-high;
> };
>
> reg_usb_otg2_vbus: regulator at 3 {
> compatible = "regulator-fixed";
> reg = <3>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_usb_otg2>;
> regulator-name = "usb_otg2_vbus";
> regulator-min-microvolt = <5000000>;
> regulator-max-microvolt = <5000000>;
> gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
> enable-active-high;
> };
>
> };
>
> pinctrl_usb_otg1: usbotg1grp {
> fsl,pins = <
> MX6UL_PAD_ENET2_TX_DATA1__GPIO2_IO12 0x10b0
> >;
> };
>
> pinctrl_usb_otg2: usbotg2grp {
> fsl,pins = <
> MX6UL_PAD_ENET2_RX_DATA0__GPIO2_IO08 0x10b0
> >;
> };
>
> &usbotg1 {
> vbus-supply = <®_usb_otg1_vbus>;
> dr_mode = "host";
> status = "okay";
> };
>
> &usbotg2 {
> vbus-supply = <®_usb_otg2_vbus>;
> dr_mode = "host";
> status = "okay";
> };
>
> My board is SomLabs Visionsom option with NAND 512Mb.
>
>
> Thanks in advanced
>
> Best Regards
>
> Michal
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181227/bfeaa8ef/attachment.sig>
next prev parent reply other threads:[~2018-12-26 23:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 18:35 [U-Boot] U-Boot 2018.09 imx6ull mass storage issue Michał Wołowik
2018-12-26 23:17 ` Lukasz Majewski [this message]
[not found] ` <dec53a25-29ff-f580-3da9-881010728e4d@wp.pl>
2018-12-28 7:45 ` Lukasz Majewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181227001730.62707765@jawa \
--to=lukma@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox