This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x & DTS file for TUSB2046B

Other Parts Discussed in Thread: TUSB2046B

Hi All.

I have board beaglebone black, and use TUSB2046B chip on the USB1 port AM335x

Linux version: Linux version 3.13.6-00043-gb3f771c-dirty

Loading listing:

localhost (arm) ~ # dmesg | grep -e usb
[    0.195003] usbcore: registered new interface driver usbfs
[    0.195107] usbcore: registered new interface driver hub
[    0.195382] usbcore: registered new device driver usb
[    2.559044] usbcore: registered new interface driver asix
[    2.575845] usbcore: registered new interface driver ax88179_178a
[    2.594750] usbcore: registered new interface driver cdc_ether
[    2.612851] usbcore: registered new interface driver r815x
[    2.629940] usbcore: registered new interface driver smsc95xx
[    2.647770] usbcore: registered new interface driver net1080
[    2.665343] usbcore: registered new interface driver cdc_subset
[    2.683713] usbcore: registered new interface driver zaurus
[    2.701070] usbcore: registered new interface driver cdc_ncm
[    2.772101] usbcore: registered new interface driver cdc_acm
[    2.814442] usbcore: registered new interface driver usb-storage
[    2.922220] of_get_named_gpiod_flags: can't parse gpios property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
[    2.922279] 47401b00.usb-phy supply vcc not found, using dummy regulator
[    2.944137] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[    2.944161] musb-hdrc: MHDRC RTL version 2.0 
[    2.944176] musb-hdrc: setup fifo_mode 4
[    2.944201] musb-hdrc: 28/31 max ep, 16384/16384 memory
[    2.944349] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    2.962564] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    2.986781] musb-hdrc musb-hdrc.1.auto: supports USB remote wakeup
[    2.987000] usb usb1: default language 0x0409
[    2.987126] usb usb1: udev 1, busnum 1, minor = 0
[    2.987150] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.008141] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.030456] usb usb1: Product: MUSB HDRC host driver
[    3.045820] usb usb1: Manufacturer: Linux 3.13.6-00043-gb3f771c-dirty musb-hcd
[    3.068134] usb usb1: SerialNumber: musb-hdrc.1.auto
[    3.084293] usb usb1: usb_probe_device
[    3.084320] usb usb1: configuration #1 chosen from 1 choice
[    3.084440] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[    3.084644] hub 1-0:1.0: usb_probe_interface
[    3.084667] hub 1-0:1.0: usb_probe_interface - got id
[    3.205760] usb usb1: bus auto-suspend, wakeup 1
[    3.611098] usbcore: registered new interface driver usbhid
[    3.628403] usbhid: USB HID core driver
[    3.640271] usbip_core: USB/IP Core v1.0.0
[    3.655140] usbcore: registered new interface driver usbip-host
[    3.673540] usbip_host: USB/IP Host Driver v1.0.0
[    3.935551] musb-hdrc musb-hdrc.0.auto: Falied to request rx1.
[    3.953670] musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
[    3.977635] platform musb-hdrc.0.auto: Driver musb-hdrc requests probe deferral
[    4.113594] musb-hdrc musb-hdrc.0.auto: Falied to request rx1.
[    4.173174] musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
[    4.197116] platform musb-hdrc.0.auto: Driver musb-hdrc requests probe deferral

I see usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

but I not see TUSB2046B with 4 interface.

I think this my mistake in am33xx.dtsi file (see usb partition bellow).

Please help to make the right dtsi file for work with TUSB2046B chip.

		usb: usb@47400000 {
			compatible = "ti,am33xx-usb";
			reg = <0x47400000 0x1000>;
			ranges;
			#address-cells = <1>;
			#size-cells = <1>;
			ti,hwmods = "usb_otg_hs";
			status = "disabled";

			usb_ctrl_mod: control@44e10000 {
				compatible = "ti,am335x-usb-ctrl-module";
				reg = <0x44e10620 0x10
					0x44e10648 0x4>;
				reg-names = "phy_ctrl", "wakeup";
				status = "disabled";
			};

			usb0_phy: usb-phy@47401300 {
				compatible = "ti,am335x-usb-phy";
				reg = <0x47401300 0x100>;
				reg-names = "phy";
				status = "disabled";
				ti,ctrl_mod = <&usb_ctrl_mod>;
			};

			usb0: usb@47401000 {
				compatible = "ti,musb-am33xx";
				status = "disabled";
				reg = <0x47401400 0x400
					0x47401000 0x200>;
				reg-names = "mc", "control";

				interrupts = <18>;
				interrupt-names = "mc";
				dr_mode = "otg";
				mentor,multipoint = <1>;
				mentor,num-eps = <16>;
				mentor,ram-bits = <12>;
				mentor,power = <500>;
				phys = <&usb0_phy>;

				dmas = <&cppi41dma  0 0 &cppi41dma  1 0
					&cppi41dma  2 0 &cppi41dma  3 0
					&cppi41dma  4 0 &cppi41dma  5 0
					&cppi41dma  6 0 &cppi41dma  7 0
					&cppi41dma  8 0 &cppi41dma  9 0
					&cppi41dma 10 0 &cppi41dma 11 0
					&cppi41dma 12 0 &cppi41dma 13 0
					&cppi41dma 14 0 &cppi41dma  0 1
					&cppi41dma  1 1 &cppi41dma  2 1
					&cppi41dma  3 1 &cppi41dma  4 1
					&cppi41dma  5 1 &cppi41dma  6 1
					&cppi41dma  7 1 &cppi41dma  8 1
					&cppi41dma  9 1 &cppi41dma 10 1
					&cppi41dma 11 1 &cppi41dma 12 1
					&cppi41dma 13 1 &cppi41dma 14 1>;
				dma-names =
					"rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
					"rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
					"rx14", "rx15",
					"tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
					"tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
					"tx14", "tx15";
			};

			usb1_phy: usb-phy@47401b00 {
				compatible = "ti,am335x-usb-phy";
				reg = <0x47401b00 0x100>;
				reg-names = "phy";
				status = "disabled";
				ti,ctrl_mod = <&usb_ctrl_mod>;
			};

			usb1: usb@47401800 {
				compatible = "ti,musb-am33xx";
				status = "disabled";
				reg = <0x47401c00 0x400
					0x47401800 0x200>;
				reg-names = "mc", "control";
				interrupts = <19>;
				interrupt-names = "mc";
				dr_mode = "host";
				mentor,multipoint = <1>;
				mentor,num-eps = <16>;
				mentor,ram-bits = <12>;
				mentor,power = <500>;
				phys = <&usb1_phy>;

				dmas = <&cppi41dma 15 0 &cppi41dma 16 0
					&cppi41dma 17 0 &cppi41dma 18 0
					&cppi41dma 19 0 &cppi41dma 20 0
					&cppi41dma 21 0 &cppi41dma 22 0
					&cppi41dma 23 0 &cppi41dma 24 0
					&cppi41dma 25 0 &cppi41dma 26 0
					&cppi41dma 27 0 &cppi41dma 28 0
					&cppi41dma 29 0 &cppi41dma 15 1
					&cppi41dma 16 1 &cppi41dma 17 1
					&cppi41dma 18 1 &cppi41dma 19 1
					&cppi41dma 20 1 &cppi41dma 21 1
					&cppi41dma 22 1 &cppi41dma 23 1
					&cppi41dma 24 1 &cppi41dma 25 1
					&cppi41dma 26 1 &cppi41dma 27 1
					&cppi41dma 28 1 &cppi41dma 29 1>;
				dma-names =
                                       "rx16", "rx17", "rx18", "rx19", "rx20", "rx21", "rx22",
                                       "rx23", "rx24", "rx25", "rx26", "rx27", "rx28",
                                       "rx29", "rx30",
                                       "tx16", "tx17", "tx18", "tx19", "tx20", "tx21", "tx22",
                                       "tx23", "tx24", "tx25", "tx26", "tx27", "tx28",
                                       "tx29", "tx30";
			};

			cppi41dma: dma-controller@07402000 {
				compatible = "ti,am3359-cppi41";
				reg =  <0x47400000 0x1000
					0x47402000 0x1000
					0x47403000 0x1000
					0x47404000 0x4000>;
				reg-names = "glue", "controller", "scheduler", "queuemgr";
				interrupts = <17>;
				interrupt-names = "glue";
				#dma-cells = <2>;
				#dma-channels = <30>;
				#dma-requests = <256>;
				status = "disabled";
			};
		};

  • Hi Roman,


    Linux has a native support for usb hubs. You should not add any additional nodes in the device tree. Just be sure you have enabled the xHCI support in your config file.

    See your log:

    Roman Shibin said:
    [ 0.195107] usbcore: registered new interface driver hub


    What is the output when you execute # dmesg  | grep -e hub command?

    I tested this on my Starter Kit and the result is similar to yours:
    root@am335x-evm:~# dmesg | grep -e usb                                                                                                                                         
    [    0.270673] usbcore: registered new interface driver usbfs                                                                                                                  
    [    0.270859] usbcore: registered new interface driver hub                                                                                                                    
    [    0.271059] usbcore: registered new device driver usb                                                                                                                       
    [    1.158237] usbcore: registered new interface driver asix                                                                                                                   
    [    1.164163] usbcore: registered new interface driver ax88179_178a                                                                                                           
    [    1.170788] usbcore: registered new interface driver cdc_ether                                                                                                              
    [    1.177146] usbcore: registered new interface driver r815x                                                                                                                  
    [    1.183150] usbcore: registered new interface driver smsc95xx                                                                                                               
    [    1.189375] usbcore: registered new interface driver net1080                                                                                                                
    [    1.195555] usbcore: registered new interface driver cdc_subset                                                                                                             
    [    1.201946] usbcore: registered new interface driver zaurus                                                                                                                 
    [    1.208091] usbcore: registered new interface driver cdc_ncm                                                                                                                
    [    1.232851] usbcore: registered new interface driver cdc_wdm                                                                                                                
    [    1.239072] usbcore: registered new interface driver usb-storage                                                                                                            
    [    1.388639] usbcore: registered new interface driver usbhid                                                                                                                 
    [    1.394831] usbhid: USB HID core driver                                                                                                                                     
    [   16.824671] of_get_named_gpio_flags: can't parse gpios property of node '/ocp/usb@47400000/usb-phy@47401300[0]'                                                             
    [   16.846343] of_get_named_gpio_flags: can't parse gpios property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'                                                             
    [   19.999880] musb-hdrc musb-hdrc.0.auto: Enabled SW babble control                                                                                                           
    [   20.108660] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)                                                        
    [   20.108688] musb-hdrc: MHDRC RTL version 2.0                                                                                                                                
    [   20.108698] musb-hdrc: setup fifo_mode 4                                                                                                                                    
    [   20.108718] musb-hdrc: 28/31 max ep, 16384/16384 memory                                                                                                                     
    [   20.108857] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver                                                                                                               
    [   20.163469] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1                                                                                       
    [   20.220107] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002                                                                                                   
    [   20.227665] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1                                                                                              
    [   20.235601] usb usb1: Product: MUSB HDRC host driver                                                                                                                        
    [   20.241137] usb usb1: Manufacturer: Linux 3.12.10-ti2013.12.01 musb-hcd                                                                                                     
    [   20.248429] usb usb1: SerialNumber: musb-hdrc.0.auto                                                                                                                        
    [   20.551495] musb-hdrc musb-hdrc.1.auto: Enabled SW babble control                                                                                                           
    [   20.587564] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)                                                        
    [   20.587591] musb-hdrc: MHDRC RTL version 2.0                                                                                                                                
    [   20.587601] musb-hdrc: setup fifo_mode 4                                                                                                                                    
    [   20.587622] musb-hdrc: 28/31 max ep, 16384/16384 memory                                                                                                                     
    [   20.587749] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver                                                                                                               
    [   20.625978] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2                                                                                       
    [   20.641164] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002                                                                                                   
    [   20.648814] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1                                                                                              
    [   20.656774] usb usb2: Product: MUSB HDRC host driver                                                                                                                        
    [   20.662327] usb usb2: Manufacturer: Linux 3.12.10-ti2013.12.01 musb-hcd                                                                                                     
    [   20.669617] usb usb2: SerialNumber: musb-hdrc.1.auto                                                                                                                        
    [   53.842742] udc musb-hdrc.0.auto: registering UDC driver [g_mass_storage]                                                                                                   
    [   54.370690] g_mass_storage gadget: usb_composite_setup_continue                                                                                                             
    [   54.370703] g_mass_storage gadget: usb_composite_setup_continue: Completing delayed status 

    But the hub is actually detected & initialized in the kernel:

    root@am335x-evm:~# dmesg | grep -e hub                                                                                                                                         
    [    0.270859] usbcore: registered new interface driver hub                                                                                                                    
    [   20.470884] hub 1-0:1.0: USB hub found                                                                                                                                      
    [   20.493125] hub 1-0:1.0: 1 port detected                                                                                                                                    
    [   20.725777] hub 2-0:1.0: USB hub found                                                                                                                                      
    [   20.735863] hub 2-0:1.0: 1 port detected 


    For the musb_hdrc warnings check the following wiki: http://processors.wiki.ti.com/index.php/Inventra_HDRC_USB_Controller

    Best Regards,
    Yordan

  • Hi Yordan.

    Thanks for the reply.

    I check all my design and all my files over and over again :) and I find bug. My USB chip was defective. I resolder TUSB2046B and now is Ok.

    Thank you.