18c2ecf20Sopenharmony_ci* USB2 ChipIdea USB controller for ci13xxx 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciRequired properties: 48c2ecf20Sopenharmony_ci- compatible: should be one of: 58c2ecf20Sopenharmony_ci "fsl,imx23-usb" 68c2ecf20Sopenharmony_ci "fsl,imx27-usb" 78c2ecf20Sopenharmony_ci "fsl,imx28-usb" 88c2ecf20Sopenharmony_ci "fsl,imx6q-usb" 98c2ecf20Sopenharmony_ci "fsl,imx6sl-usb" 108c2ecf20Sopenharmony_ci "fsl,imx6sx-usb" 118c2ecf20Sopenharmony_ci "fsl,imx6ul-usb" 128c2ecf20Sopenharmony_ci "fsl,imx7d-usb" 138c2ecf20Sopenharmony_ci "fsl,imx7ulp-usb" 148c2ecf20Sopenharmony_ci "lsi,zevio-usb" 158c2ecf20Sopenharmony_ci "qcom,ci-hdrc" 168c2ecf20Sopenharmony_ci "chipidea,usb2" 178c2ecf20Sopenharmony_ci "xlnx,zynq-usb-2.20a" 188c2ecf20Sopenharmony_ci "nvidia,tegra20-udc" 198c2ecf20Sopenharmony_ci "nvidia,tegra30-udc" 208c2ecf20Sopenharmony_ci "nvidia,tegra114-udc" 218c2ecf20Sopenharmony_ci "nvidia,tegra124-udc" 228c2ecf20Sopenharmony_ci- reg: base address and length of the registers 238c2ecf20Sopenharmony_ci- interrupts: interrupt for the USB controller 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ciRecommended properies: 268c2ecf20Sopenharmony_ci- phy_type: the type of the phy connected to the core. Should be one 278c2ecf20Sopenharmony_ci of "utmi", "utmi_wide", "ulpi", "serial" or "hsic". Without this 288c2ecf20Sopenharmony_ci property the PORTSC register won't be touched. 298c2ecf20Sopenharmony_ci- dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg" 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ciDeprecated properties: 328c2ecf20Sopenharmony_ci- usb-phy: phandle for the PHY device. Use "phys" instead. 338c2ecf20Sopenharmony_ci- fsl,usbphy: phandle of usb phy that connects to the port. Use "phys" instead. 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciOptional properties: 368c2ecf20Sopenharmony_ci- clocks: reference to the USB clock 378c2ecf20Sopenharmony_ci- phys: reference to the USB PHY 388c2ecf20Sopenharmony_ci- phy-names: should be "usb-phy" 398c2ecf20Sopenharmony_ci- vbus-supply: reference to the VBUS regulator 408c2ecf20Sopenharmony_ci- maximum-speed: limit the maximum connection speed to "full-speed". 418c2ecf20Sopenharmony_ci- tpl-support: TPL (Targeted Peripheral List) feature for targeted hosts 428c2ecf20Sopenharmony_ci- itc-setting: interrupt threshold control register control, the setting 438c2ecf20Sopenharmony_ci should be aligned with ITC bits at register USBCMD. 448c2ecf20Sopenharmony_ci- ahb-burst-config: it is vendor dependent, the required value should be 458c2ecf20Sopenharmony_ci aligned with AHBBRST at SBUSCFG, the range is from 0x0 to 0x7. This 468c2ecf20Sopenharmony_ci property is used to change AHB burst configuration, check the chipidea 478c2ecf20Sopenharmony_ci spec for meaning of each value. If this property is not existed, it 488c2ecf20Sopenharmony_ci will use the reset value. 498c2ecf20Sopenharmony_ci- tx-burst-size-dword: it is vendor dependent, the tx burst size in dword 508c2ecf20Sopenharmony_ci (4 bytes), This register represents the maximum length of a the burst 518c2ecf20Sopenharmony_ci in 32-bit words while moving data from system memory to the USB 528c2ecf20Sopenharmony_ci bus, the value of this property will only take effect if property 538c2ecf20Sopenharmony_ci "ahb-burst-config" is set to 0, if this property is missing the reset 548c2ecf20Sopenharmony_ci default of the hardware implementation will be used. 558c2ecf20Sopenharmony_ci- rx-burst-size-dword: it is vendor dependent, the rx burst size in dword 568c2ecf20Sopenharmony_ci (4 bytes), This register represents the maximum length of a the burst 578c2ecf20Sopenharmony_ci in 32-bit words while moving data from the USB bus to system memory, 588c2ecf20Sopenharmony_ci the value of this property will only take effect if property 598c2ecf20Sopenharmony_ci "ahb-burst-config" is set to 0, if this property is missing the reset 608c2ecf20Sopenharmony_ci default of the hardware implementation will be used. 618c2ecf20Sopenharmony_ci- extcon: phandles to external connector devices. First phandle should point to 628c2ecf20Sopenharmony_ci external connector, which provide "USB" cable events, the second should point 638c2ecf20Sopenharmony_ci to external connector device, which provide "USB-HOST" cable events. If one 648c2ecf20Sopenharmony_ci of the external connector devices is not required, empty <0> phandle should 658c2ecf20Sopenharmony_ci be specified. 668c2ecf20Sopenharmony_ci- phy-clkgate-delay-us: the delay time (us) between putting the PHY into 678c2ecf20Sopenharmony_ci low power mode and gating the PHY clock. 688c2ecf20Sopenharmony_ci- non-zero-ttctrl-ttha: after setting this property, the value of register 698c2ecf20Sopenharmony_ci ttctrl.ttha will be 0x7f; if not, the value will be 0x0, this is the default 708c2ecf20Sopenharmony_ci value. It needs to be very carefully for setting this property, it is 718c2ecf20Sopenharmony_ci recommended that consult with your IC engineer before setting this value. 728c2ecf20Sopenharmony_ci On the most of chipidea platforms, the "usage_tt" flag at RTL is 0, so this 738c2ecf20Sopenharmony_ci property only affects siTD. 748c2ecf20Sopenharmony_ci If this property is not set, the max packet size is 1023 bytes, and if 758c2ecf20Sopenharmony_ci the total of packet size for pervious transactions are more than 256 bytes, 768c2ecf20Sopenharmony_ci it can't accept any transactions within this frame. The use case is single 778c2ecf20Sopenharmony_ci transaction, but higher frame rate. 788c2ecf20Sopenharmony_ci If this property is set, the max packet size is 188 bytes, it can handle 798c2ecf20Sopenharmony_ci more transactions than above case, it can accept transactions until it 808c2ecf20Sopenharmony_ci considers the left room size within frame is less than 188 bytes, software 818c2ecf20Sopenharmony_ci needs to make sure it does not send more than 90% 828c2ecf20Sopenharmony_ci maximum_periodic_data_per_frame. The use case is multiple transactions, but 838c2ecf20Sopenharmony_ci less frame rate. 848c2ecf20Sopenharmony_ci- mux-controls: The mux control for toggling host/device output of this 858c2ecf20Sopenharmony_ci controller. It's expected that a mux state of 0 indicates device mode and a 868c2ecf20Sopenharmony_ci mux state of 1 indicates host mode. 878c2ecf20Sopenharmony_ci- mux-control-names: Shall be "usb_switch" if mux-controls is specified. 888c2ecf20Sopenharmony_ci- pinctrl-names: Names for optional pin modes in "default", "host", "device". 898c2ecf20Sopenharmony_ci In case of HSIC-mode, "idle" and "active" pin modes are mandatory. In this 908c2ecf20Sopenharmony_ci case, the "idle" state needs to pull down the data and strobe pin 918c2ecf20Sopenharmony_ci and the "active" state needs to pull up the strobe pin. 928c2ecf20Sopenharmony_ci- pinctrl-n: alternate pin modes 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_cii.mx specific properties 958c2ecf20Sopenharmony_ci- fsl,usbmisc: phandler of non-core register device, with one 968c2ecf20Sopenharmony_ci argument that indicate usb controller index 978c2ecf20Sopenharmony_ci- disable-over-current: disable over current detect 988c2ecf20Sopenharmony_ci- over-current-active-low: over current signal polarity is active low. 998c2ecf20Sopenharmony_ci- over-current-active-high: over current signal polarity is active high. 1008c2ecf20Sopenharmony_ci It's recommended to specify the over current polarity. 1018c2ecf20Sopenharmony_ci- power-active-high: power signal polarity is active high 1028c2ecf20Sopenharmony_ci- external-vbus-divider: enables off-chip resistor divider for Vbus 1038c2ecf20Sopenharmony_ci- samsung,picophy-pre-emp-curr-control: HS Transmitter Pre-Emphasis Current 1048c2ecf20Sopenharmony_ci Control. This signal controls the amount of current sourced to the 1058c2ecf20Sopenharmony_ci USB_OTG*_DP and USB_OTG*_DN pins after a J-to-K or K-to-J transition. 1068c2ecf20Sopenharmony_ci The range is from 0x0 to 0x3, the default value is 0x1. 1078c2ecf20Sopenharmony_ci Details can refer to TXPREEMPAMPTUNE0 bits of USBNC_n_PHY_CFG1. 1088c2ecf20Sopenharmony_ci- samsung,picophy-dc-vol-level-adjust: HS DC Voltage Level Adjustment. 1098c2ecf20Sopenharmony_ci Adjust the high-speed transmitter DC level voltage. 1108c2ecf20Sopenharmony_ci The range is from 0x0 to 0xf, the default value is 0x3. 1118c2ecf20Sopenharmony_ci Details can refer to TXVREFTUNE0 bits of USBNC_n_PHY_CFG1. 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ciExample: 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci usb@f7ed0000 { 1168c2ecf20Sopenharmony_ci compatible = "chipidea,usb2"; 1178c2ecf20Sopenharmony_ci reg = <0xf7ed0000 0x10000>; 1188c2ecf20Sopenharmony_ci interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; 1198c2ecf20Sopenharmony_ci clocks = <&chip CLKID_USB0>; 1208c2ecf20Sopenharmony_ci phys = <&usb_phy0>; 1218c2ecf20Sopenharmony_ci phy-names = "usb-phy"; 1228c2ecf20Sopenharmony_ci vbus-supply = <®_usb0_vbus>; 1238c2ecf20Sopenharmony_ci itc-setting = <0x4>; /* 4 micro-frames */ 1248c2ecf20Sopenharmony_ci /* Incremental burst of unspecified length */ 1258c2ecf20Sopenharmony_ci ahb-burst-config = <0x0>; 1268c2ecf20Sopenharmony_ci tx-burst-size-dword = <0x10>; /* 64 bytes */ 1278c2ecf20Sopenharmony_ci rx-burst-size-dword = <0x10>; 1288c2ecf20Sopenharmony_ci extcon = <0>, <&usb_id>; 1298c2ecf20Sopenharmony_ci phy-clkgate-delay-us = <400>; 1308c2ecf20Sopenharmony_ci mux-controls = <&usb_switch>; 1318c2ecf20Sopenharmony_ci mux-control-names = "usb_switch"; 1328c2ecf20Sopenharmony_ci }; 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ciExample for HSIC: 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci usb@2184400 { 1378c2ecf20Sopenharmony_ci compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; 1388c2ecf20Sopenharmony_ci reg = <0x02184400 0x200>; 1398c2ecf20Sopenharmony_ci interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; 1408c2ecf20Sopenharmony_ci clocks = <&clks IMX6QDL_CLK_USBOH3>; 1418c2ecf20Sopenharmony_ci fsl,usbphy = <&usbphynop1>; 1428c2ecf20Sopenharmony_ci fsl,usbmisc = <&usbmisc 2>; 1438c2ecf20Sopenharmony_ci phy_type = "hsic"; 1448c2ecf20Sopenharmony_ci dr_mode = "host"; 1458c2ecf20Sopenharmony_ci ahb-burst-config = <0x0>; 1468c2ecf20Sopenharmony_ci tx-burst-size-dword = <0x10>; 1478c2ecf20Sopenharmony_ci rx-burst-size-dword = <0x10>; 1488c2ecf20Sopenharmony_ci pinctrl-names = "idle", "active"; 1498c2ecf20Sopenharmony_ci pinctrl-0 = <&pinctrl_usbh2_idle>; 1508c2ecf20Sopenharmony_ci pinctrl-1 = <&pinctrl_usbh2_active>; 1518c2ecf20Sopenharmony_ci #address-cells = <1>; 1528c2ecf20Sopenharmony_ci #size-cells = <0>; 1538c2ecf20Sopenharmony_ci 1548c2ecf20Sopenharmony_ci usbnet: smsc@1 { 1558c2ecf20Sopenharmony_ci compatible = "usb424,9730"; 1568c2ecf20Sopenharmony_ci reg = <1>; 1578c2ecf20Sopenharmony_ci }; 1588c2ecf20Sopenharmony_ci }; 159