Loading Documentation/devicetree/bindings/platform/msm/usb-bam.txt 0 → 100644 +142 −0 Original line number Diff line number Diff line MSM USB Bus Access Manager (BAM) This describes the device used to interface the USB controller with the Smart Peripheral Subsystem (SPS). The BAM serves to connect USB directly with other peer peripherals in the system and is statically configured with a number of unidirectional pipes. Required properties: - compatible: should be "qcom,usb-bam-msm" - reg : pairs of physical base addresses and region sizes of all the memory mapped BAM devices present - reg-names : Register region name(s), in 1-1 correspondence with the registers in 'reg'. This list should contain at least as many names as the number of unique values given in both 'usb-active-bam' and all the subnodes' 'usb-bam-type' properties. If SSUSB_BAM is used, "ssusb" should be present. If HSUSB_BAM is used, "hsusb" should be present. If HSIC_BAM is used, "hsic" should be present. If a QSCRATCH RAM1 register is designated for providing USB3 private memory to use as a BAM FIFO, specify "qscratch_ram1_reg". - interrupts: IRQ lines for BAM devices - interrupt-names: BAM interrupt name(s), in 1-1 correspondence with 'interrupts' above. If SSUSB_BAM is used, "ssusb" should be present. If HSUSB_BAM is used, "hsusb" should be present. If HSIC_BAM is used, "hsic" should be present. - qcom,usb-bam-num-pipes: max number of pipes that can be used Optional properties: - qcom,usb-bam-fifo-baseaddr: base address for bam pipe's data and descriptor fifos. This can be on chip memory (ocimem) or usb private memory. This property is required if sub-node's mem-type is ocimem or usb private mem. A number of USB BAM pipe parameters are represented as sub-nodes: Subnode Required: - label: a string describing uniquely the usb bam pipe. The string can be constracted as follows: <core>-<peer>-<direction>-<pipe num>. core options: hsusb, ssusb/dwc3, hsic peer options: qdss, ipa, a2 direction options: in (from peer to usb), out (from usb to peer) pipe num options: 0..127 - qcom,usb-bam-mem-type: Type of memory used by this PIPE. Can be one of 0 - Uses SPS's dedicated pipe memory 1 - USB's private memory residing @ 'qcom,usb-bam-fifo-baseaddr' 2 - System RAM allocated by driver 3 - OCI memory residing @ 'qcom,usb-bam-fifo-baseaddr' - qcom,bam-type: BAM type can be one of 0 - SSUSB_BAM 1 - HSUSB_BAM 2 - HSIC_BAM - qcom,dir: pipe direction 0 - from usb (out) 1 - to usb (in) - qcom,pipe-num: pipe number - qcom,peer-bam: peer BAM can be one of 0 - A2_P_BAM 1 - QDSS_P_BAM 2 - IPA_P_BAM - qcom,data-fifo-size: data fifo size - qcom,descriptor-fifo-size: descriptor fifo size Optional Properties for Subnode: - qcom,reset-bam-on-connect: If present then BAM is RESET before connecting pipe. This may be required if BAM peripheral is also reset before connect. - qcom,dst-bam-physical-address: destination BAM physical address - qcom,dst-bam-pipe-index: destination BAM pipe index - qcom,src-bam-physical-address: source BAM physical address - qcom,src-bam-pipe-index: source BAM pipe index - qcom,data-fifo-offset: data fifo offset address - qcom,descriptor-fifo-offset: descriptor fifo offset address - qcom,pipe-connection-type: type of pipe connection. Can be one of 0 - BAM2BAM (default if not specified) 1 - SYS2BAM (only supported on UL) Optional properties : - qcom,bam-mode: BAM mode can be one of. 0 - BAM_MODE_DEVICE 1 - BAM_MODE_HOST (If not set will be set by default to BAM_MODE_DEVICE) - qcom,ignore-core-reset-ack: If present then BAM ignores ACK from USB core while performing PIPE RESET - qcom,disable-clk-gating: If present then disable BAM clock gating. - qcom,usb-bam-override-threshold: If present then the default 512 byte threshold is overridden. This threshold configures the threshold value for Read/Write event generation by the BAM towards another BAM. - qcom,usb-bam-max-mbps-highspeed: max mbps in high speed connection for either rx or tx direction. - qcom,usb-bam-max-mbps-superspeed: max mbps in super speed connection for either rx or tx direction. - qcom,reset-bam-on-disconnect: If present then BAM is RESET after disconnecting pipes. - qcom,enable-hsusb-bam-on-boot: If present then BAM is enabled at bootup itself. Example USB BAM controller device node: qcom,usbbam@f9a44000 { compatible = "qcom,usb-bam-msm"; reg = <0xf9a44000 0x11000>; reg-names = "hsusb"; interrupts = <0 135 0>; interrupt-names = "hsusb"; qcom,usb-bam-num-pipes = <16>; qcom,ignore-core-reset-ack; qcom,disable-clk-gating; qcom,usb-bam-max-mbps-highspeed = <400>; qcom,usb-bam-max-mbps-superspeed = <3600>; qcom,pipe0 { label = "hsusb-ipa-out-0"; qcom,usb-bam-mem-type = <0>; qcom,bam-type = <1>; qcom,bam-mode = <0>; qcom,dir = <0>; qcom,pipe-num = <0>; qcom,peer-bam = <2>; qcom,src-bam-physical-address = <0xf9a44000>; qcom,src-bam-pipe-index = <1>; qcom,data-fifo-offset = <0x2200>; qcom,data-fifo-size = <0x1e00>; qcom,descriptor-fifo-offset = <0x2100>; qcom,descriptor-fifo-size = <0x100>; }; qcom,pipe1 { label = "hsusb-ipa-in-0"; qcom,usb-bam-mem-type = <0>; qcom,bam-type = <1>; qcom,bam-mode = <0>; qcom,dir = <1>; qcom,pipe-num = <0>; qcom,peer-bam = <2>; qcom,dst-bam-physical-address = <0xf9a44000>; qcom,dst-bam-pipe-index = <0>; qcom,data-fifo-offset = <0x300>; qcom,data-fifo-size = <0x1e00>; qcom,descriptor-fifo-offset = <0>; qcom,descriptor-fifo-size = <0x300>; }; }; Documentation/devicetree/bindings/usb/msm-android-usb.txt 0 → 100644 +38 −0 Original line number Diff line number Diff line ANDROID USB: This describes the device tree node for the Android USB gadget device. This works in conjunction with a USB Device Controller (UDC) to provide a dynamically configurable composition of functions to be exposed when connected to a USB host. Required properties: - compatible: should be "qcom,android-usb" Optional properties : - reg : offset and length of memory region that is used by device to update USB PID and serial numbers used by bootloader in DLOAD mode. - qcom,pm-qos-latency : This property must be a list of three integer values (perf, normal, sleep) where each value respresents DMA latency in microsecs. First value represents DMA latency to vote with pm_qos when back to back USB transfers are happening and it requires USB thoughput to be maximum. Second value represents value to vote when not many USB transfers are happening and it is OK to have higher DMA latency to save power. Third value represents DMA latency to vote when USB BUS is IDLE and absolutely no transfers are happening. It should allow transition to lowest power state. - qcom,streaming-func : add list of usb function name. If mention usb function is being enable as part of USB composition, streaming mode is enable with usb device controller to get better throughput. NOTE: Inverted CRC and turnaround timeout is observed on enabling streaming. Hence it is required to see these errors and number of erros on enabling this at USB level to make final decision to enable this feature or not. - qcom,usb-core-id: Index to refer USB hardware core to bind android gadget driver with UDC if multiple USB peripheral controllers are present. If unspecified, core is set to zero by default. Example Android USB device node : android_usb@fc42b0c8 { compatible = "qcom,android-usb"; reg = <0xfc42b0c8 0xc8>; qcom,pm-qos-latency = <2 1001 12701>; qcom,streaming-func = "rndis","mtp"; qcom,usb-core-id = <1>; }; Loading
Documentation/devicetree/bindings/platform/msm/usb-bam.txt 0 → 100644 +142 −0 Original line number Diff line number Diff line MSM USB Bus Access Manager (BAM) This describes the device used to interface the USB controller with the Smart Peripheral Subsystem (SPS). The BAM serves to connect USB directly with other peer peripherals in the system and is statically configured with a number of unidirectional pipes. Required properties: - compatible: should be "qcom,usb-bam-msm" - reg : pairs of physical base addresses and region sizes of all the memory mapped BAM devices present - reg-names : Register region name(s), in 1-1 correspondence with the registers in 'reg'. This list should contain at least as many names as the number of unique values given in both 'usb-active-bam' and all the subnodes' 'usb-bam-type' properties. If SSUSB_BAM is used, "ssusb" should be present. If HSUSB_BAM is used, "hsusb" should be present. If HSIC_BAM is used, "hsic" should be present. If a QSCRATCH RAM1 register is designated for providing USB3 private memory to use as a BAM FIFO, specify "qscratch_ram1_reg". - interrupts: IRQ lines for BAM devices - interrupt-names: BAM interrupt name(s), in 1-1 correspondence with 'interrupts' above. If SSUSB_BAM is used, "ssusb" should be present. If HSUSB_BAM is used, "hsusb" should be present. If HSIC_BAM is used, "hsic" should be present. - qcom,usb-bam-num-pipes: max number of pipes that can be used Optional properties: - qcom,usb-bam-fifo-baseaddr: base address for bam pipe's data and descriptor fifos. This can be on chip memory (ocimem) or usb private memory. This property is required if sub-node's mem-type is ocimem or usb private mem. A number of USB BAM pipe parameters are represented as sub-nodes: Subnode Required: - label: a string describing uniquely the usb bam pipe. The string can be constracted as follows: <core>-<peer>-<direction>-<pipe num>. core options: hsusb, ssusb/dwc3, hsic peer options: qdss, ipa, a2 direction options: in (from peer to usb), out (from usb to peer) pipe num options: 0..127 - qcom,usb-bam-mem-type: Type of memory used by this PIPE. Can be one of 0 - Uses SPS's dedicated pipe memory 1 - USB's private memory residing @ 'qcom,usb-bam-fifo-baseaddr' 2 - System RAM allocated by driver 3 - OCI memory residing @ 'qcom,usb-bam-fifo-baseaddr' - qcom,bam-type: BAM type can be one of 0 - SSUSB_BAM 1 - HSUSB_BAM 2 - HSIC_BAM - qcom,dir: pipe direction 0 - from usb (out) 1 - to usb (in) - qcom,pipe-num: pipe number - qcom,peer-bam: peer BAM can be one of 0 - A2_P_BAM 1 - QDSS_P_BAM 2 - IPA_P_BAM - qcom,data-fifo-size: data fifo size - qcom,descriptor-fifo-size: descriptor fifo size Optional Properties for Subnode: - qcom,reset-bam-on-connect: If present then BAM is RESET before connecting pipe. This may be required if BAM peripheral is also reset before connect. - qcom,dst-bam-physical-address: destination BAM physical address - qcom,dst-bam-pipe-index: destination BAM pipe index - qcom,src-bam-physical-address: source BAM physical address - qcom,src-bam-pipe-index: source BAM pipe index - qcom,data-fifo-offset: data fifo offset address - qcom,descriptor-fifo-offset: descriptor fifo offset address - qcom,pipe-connection-type: type of pipe connection. Can be one of 0 - BAM2BAM (default if not specified) 1 - SYS2BAM (only supported on UL) Optional properties : - qcom,bam-mode: BAM mode can be one of. 0 - BAM_MODE_DEVICE 1 - BAM_MODE_HOST (If not set will be set by default to BAM_MODE_DEVICE) - qcom,ignore-core-reset-ack: If present then BAM ignores ACK from USB core while performing PIPE RESET - qcom,disable-clk-gating: If present then disable BAM clock gating. - qcom,usb-bam-override-threshold: If present then the default 512 byte threshold is overridden. This threshold configures the threshold value for Read/Write event generation by the BAM towards another BAM. - qcom,usb-bam-max-mbps-highspeed: max mbps in high speed connection for either rx or tx direction. - qcom,usb-bam-max-mbps-superspeed: max mbps in super speed connection for either rx or tx direction. - qcom,reset-bam-on-disconnect: If present then BAM is RESET after disconnecting pipes. - qcom,enable-hsusb-bam-on-boot: If present then BAM is enabled at bootup itself. Example USB BAM controller device node: qcom,usbbam@f9a44000 { compatible = "qcom,usb-bam-msm"; reg = <0xf9a44000 0x11000>; reg-names = "hsusb"; interrupts = <0 135 0>; interrupt-names = "hsusb"; qcom,usb-bam-num-pipes = <16>; qcom,ignore-core-reset-ack; qcom,disable-clk-gating; qcom,usb-bam-max-mbps-highspeed = <400>; qcom,usb-bam-max-mbps-superspeed = <3600>; qcom,pipe0 { label = "hsusb-ipa-out-0"; qcom,usb-bam-mem-type = <0>; qcom,bam-type = <1>; qcom,bam-mode = <0>; qcom,dir = <0>; qcom,pipe-num = <0>; qcom,peer-bam = <2>; qcom,src-bam-physical-address = <0xf9a44000>; qcom,src-bam-pipe-index = <1>; qcom,data-fifo-offset = <0x2200>; qcom,data-fifo-size = <0x1e00>; qcom,descriptor-fifo-offset = <0x2100>; qcom,descriptor-fifo-size = <0x100>; }; qcom,pipe1 { label = "hsusb-ipa-in-0"; qcom,usb-bam-mem-type = <0>; qcom,bam-type = <1>; qcom,bam-mode = <0>; qcom,dir = <1>; qcom,pipe-num = <0>; qcom,peer-bam = <2>; qcom,dst-bam-physical-address = <0xf9a44000>; qcom,dst-bam-pipe-index = <0>; qcom,data-fifo-offset = <0x300>; qcom,data-fifo-size = <0x1e00>; qcom,descriptor-fifo-offset = <0>; qcom,descriptor-fifo-size = <0x300>; }; };
Documentation/devicetree/bindings/usb/msm-android-usb.txt 0 → 100644 +38 −0 Original line number Diff line number Diff line ANDROID USB: This describes the device tree node for the Android USB gadget device. This works in conjunction with a USB Device Controller (UDC) to provide a dynamically configurable composition of functions to be exposed when connected to a USB host. Required properties: - compatible: should be "qcom,android-usb" Optional properties : - reg : offset and length of memory region that is used by device to update USB PID and serial numbers used by bootloader in DLOAD mode. - qcom,pm-qos-latency : This property must be a list of three integer values (perf, normal, sleep) where each value respresents DMA latency in microsecs. First value represents DMA latency to vote with pm_qos when back to back USB transfers are happening and it requires USB thoughput to be maximum. Second value represents value to vote when not many USB transfers are happening and it is OK to have higher DMA latency to save power. Third value represents DMA latency to vote when USB BUS is IDLE and absolutely no transfers are happening. It should allow transition to lowest power state. - qcom,streaming-func : add list of usb function name. If mention usb function is being enable as part of USB composition, streaming mode is enable with usb device controller to get better throughput. NOTE: Inverted CRC and turnaround timeout is observed on enabling streaming. Hence it is required to see these errors and number of erros on enabling this at USB level to make final decision to enable this feature or not. - qcom,usb-core-id: Index to refer USB hardware core to bind android gadget driver with UDC if multiple USB peripheral controllers are present. If unspecified, core is set to zero by default. Example Android USB device node : android_usb@fc42b0c8 { compatible = "qcom,android-usb"; reg = <0xfc42b0c8 0xc8>; qcom,pm-qos-latency = <2 1001 12701>; qcom,streaming-func = "rndis","mtp"; qcom,usb-core-id = <1>; };