18c2ecf20Sopenharmony_ciFreescale SOC USB controllers 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe device node for a USB controller that is part of a Freescale 48c2ecf20Sopenharmony_ciSOC is as described in the document "Open Firmware Recommended 58c2ecf20Sopenharmony_ciPractice : Universal Serial Bus" with the following modifications 68c2ecf20Sopenharmony_ciand additions : 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciRequired properties : 98c2ecf20Sopenharmony_ci - compatible : Should be "fsl-usb2-mph" for multi port host USB 108c2ecf20Sopenharmony_ci controllers, or "fsl-usb2-dr" for dual role USB controllers 118c2ecf20Sopenharmony_ci or "fsl,mpc5121-usb2-dr" for dual role USB controllers of MPC5121. 128c2ecf20Sopenharmony_ci Wherever applicable, the IP version of the USB controller should 138c2ecf20Sopenharmony_ci also be mentioned (for eg. fsl-usb2-dr-v2.2 for bsc9132). 148c2ecf20Sopenharmony_ci - phy_type : For multi port host USB controllers, should be one of 158c2ecf20Sopenharmony_ci "ulpi", or "serial". For dual role USB controllers, should be 168c2ecf20Sopenharmony_ci one of "ulpi", "utmi", "utmi_wide", or "serial". 178c2ecf20Sopenharmony_ci - reg : Offset and length of the register set for the device 188c2ecf20Sopenharmony_ci - port0 : boolean; if defined, indicates port0 is connected for 198c2ecf20Sopenharmony_ci fsl-usb2-mph compatible controllers. Either this property or 208c2ecf20Sopenharmony_ci "port1" (or both) must be defined for "fsl-usb2-mph" compatible 218c2ecf20Sopenharmony_ci controllers. 228c2ecf20Sopenharmony_ci - port1 : boolean; if defined, indicates port1 is connected for 238c2ecf20Sopenharmony_ci fsl-usb2-mph compatible controllers. Either this property or 248c2ecf20Sopenharmony_ci "port0" (or both) must be defined for "fsl-usb2-mph" compatible 258c2ecf20Sopenharmony_ci controllers. 268c2ecf20Sopenharmony_ci - dr_mode : indicates the working mode for "fsl-usb2-dr" compatible 278c2ecf20Sopenharmony_ci controllers. Can be "host", "peripheral", or "otg". Default to 288c2ecf20Sopenharmony_ci "host" if not defined for backward compatibility. 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciRecommended properties : 318c2ecf20Sopenharmony_ci - interrupts : <a b> where a is the interrupt number and b is a 328c2ecf20Sopenharmony_ci field that represents an encoding of the sense and level 338c2ecf20Sopenharmony_ci information for the interrupt. This should be encoded based on 348c2ecf20Sopenharmony_ci the information in section 2) depending on the type of interrupt 358c2ecf20Sopenharmony_ci controller you have. 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ciOptional properties : 388c2ecf20Sopenharmony_ci - fsl,invert-drvvbus : boolean; for MPC5121 USB0 only. Indicates the 398c2ecf20Sopenharmony_ci port power polarity of internal PHY signal DRVVBUS is inverted. 408c2ecf20Sopenharmony_ci - fsl,invert-pwr-fault : boolean; for MPC5121 USB0 only. Indicates 418c2ecf20Sopenharmony_ci the PWR_FAULT signal polarity is inverted. 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ciExample multi port host USB controller device node : 448c2ecf20Sopenharmony_ci usb@22000 { 458c2ecf20Sopenharmony_ci compatible = "fsl-usb2-mph"; 468c2ecf20Sopenharmony_ci reg = <22000 1000>; 478c2ecf20Sopenharmony_ci #address-cells = <1>; 488c2ecf20Sopenharmony_ci #size-cells = <0>; 498c2ecf20Sopenharmony_ci interrupt-parent = <700>; 508c2ecf20Sopenharmony_ci interrupts = <27 1>; 518c2ecf20Sopenharmony_ci phy_type = "ulpi"; 528c2ecf20Sopenharmony_ci port0; 538c2ecf20Sopenharmony_ci port1; 548c2ecf20Sopenharmony_ci }; 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ciExample dual role USB controller device node : 578c2ecf20Sopenharmony_ci usb@23000 { 588c2ecf20Sopenharmony_ci compatible = "fsl-usb2-dr"; 598c2ecf20Sopenharmony_ci reg = <23000 1000>; 608c2ecf20Sopenharmony_ci #address-cells = <1>; 618c2ecf20Sopenharmony_ci #size-cells = <0>; 628c2ecf20Sopenharmony_ci interrupt-parent = <700>; 638c2ecf20Sopenharmony_ci interrupts = <26 1>; 648c2ecf20Sopenharmony_ci dr_mode = "otg"; 658c2ecf20Sopenharmony_ci phy = "ulpi"; 668c2ecf20Sopenharmony_ci }; 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ciExample dual role USB controller device node for MPC5121ADS: 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci usb@4000 { 718c2ecf20Sopenharmony_ci compatible = "fsl,mpc5121-usb2-dr"; 728c2ecf20Sopenharmony_ci reg = <0x4000 0x1000>; 738c2ecf20Sopenharmony_ci #address-cells = <1>; 748c2ecf20Sopenharmony_ci #size-cells = <0>; 758c2ecf20Sopenharmony_ci interrupt-parent = < &ipic >; 768c2ecf20Sopenharmony_ci interrupts = <44 0x8>; 778c2ecf20Sopenharmony_ci dr_mode = "otg"; 788c2ecf20Sopenharmony_ci phy_type = "utmi_wide"; 798c2ecf20Sopenharmony_ci fsl,invert-drvvbus; 808c2ecf20Sopenharmony_ci fsl,invert-pwr-fault; 818c2ecf20Sopenharmony_ci }; 82