Hi Michał, > Hi Lukasz, > > On 27.12.2018 00:17, Lukasz Majewski wrote: > > 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. > > After Your answer me, I checked how are configured enable pins for > the USB > > / 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// > // >;// > // };/ > > / reg_usb_otg1_vbus: regulator@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 12 GPIO_ACTIVE_HIGH>;// > // enable-active-high;// > // };// > // > // reg_usb_otg2_vbus: regulator@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 8 GPIO_ACTIVE_HIGH>;// > // enable-active-high;// > // };/
The description seems correct. One thing though - how the VBUS enable/regulator pins are connected? Are those inverted (with some discrete element) on the schematic? > > /&usbotg1 {// > // vbus-supply = <®_usb_otg1_vbus>;// > // dr_mode = "host";// > // status = "okay";// > //};// > // > //&usbotg2 {// > // vbus-supply = <®_usb_otg2_vbus>;// > // dr_mode = "host";// > // status = "okay";// > //};// > // > //&usbphy1 {// > // tx-d-cal = <0x5>;// > //};// > // > //&usbphy2 {// > // tx-d-cal = <0x5>;// > //};/ > > In meantime I make a hardware measurements and I have a strangle > results. > > For Uboot 2017.03 after issue *usb start* I have a still 3.3V on > > EN1 and EN2 even not connecting anything on USB. This is somewhat strange - as normally (for pre device model u-boot) the voltage shall be enabled in board_usb_init(). > In my u-boot after > boot I have a 3V3 on EN1 and EN2 but when issue *usb start *voltage > drop on both to 0V. This is wrong - as I would expect the opposite behaviour. The voltage shall be applied when one connects the device and run 'usb start'. >When I not connect anything to the USB ports I > have > > /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... 1 USB Device(s) found // ^^^ - this is the internal USB hub (2.0) > // scanning usb for storage devices... 0 Storage Device(s) > found / > > when connect to the USB mass storage device I get > > /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 / > > It means that the USB try to do something but for unknown reason > generate a timeout. Without VBUS applied, the timeout is somewhat expected. > How can I debug the problem? I would start with re-checking the schematic and measure if VBUS on the USB connector (not EN1, EN2) changes from 0V to 5V when you issue 'usb start'. > How should look the > professional approach to investigate the problem in my case? You may try to enable debugging (#define DEBUG) in the ehci code for imx6 (ehci-mx6.c). If this doesn't help - then you need to perform bisecting (with git bisect) between working u-boot and the new one (git bisect). > > One message curious me the most "/USB device not accepting new > address (error=22)/" what means not accepting and why? Maybe I have > different problem than power supply?/ Lets first check the _real_ value of VBUS on the output USB connector. > / > > Thanks > > Regards > > Michal > > > > >> 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@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@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@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: > > lu...@denx.de > 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: lu...@denx.de
pgphC4MsilGEP.pgp
Description: OpenPGP digital signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot