The xHCI driver currently has the IMOD set to 160, which
translates to an IMOD interval of 40,000ns (160 * 250)ns
Commit 0cbd4b34cd
("xhci: mediatek: support MTK xHCI host controller")
introduced a QUIRK for the MTK platform to adjust this interval to 20,
which translates to an IMOD interval of 5,000ns (20 * 250)ns. This is
due to the fact that the MTK controller IMOD interval is 8 times
as much as defined in xHCI spec.
Instead of adding more quirk bits for additional platforms, this patch
introduces the ability for vendors to set the IMOD_INTERVAL as is
optimal for their platform. By using device_property_read_u32() on
"imod-interval-ns", the IMOD INTERVAL can be specified in nano seconds.
If no interval is specified, the default of 40,000ns (IMOD=160) will be
used.
No bounds checking has been implemented due to the fact that a vendor
may have violated the spec and would need to specify a value outside of
the max 8,000 IRQs/second limit specified in the xHCI spec.
Tested-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Adam Wallis <awallis@codeaurora.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
USB xHCI controllers
|
|
|
|
Required properties:
|
|
- compatible: should be one or more of
|
|
|
|
- "generic-xhci" for generic XHCI device
|
|
- "marvell,armada3700-xhci" for Armada 37xx SoCs
|
|
- "marvell,armada-375-xhci" for Armada 375 SoCs
|
|
- "marvell,armada-380-xhci" for Armada 38x SoCs
|
|
- "renesas,xhci-r8a7743" for r8a7743 SoC
|
|
- "renesas,xhci-r8a7790" for r8a7790 SoC
|
|
- "renesas,xhci-r8a7791" for r8a7791 SoC
|
|
- "renesas,xhci-r8a7793" for r8a7793 SoC
|
|
- "renesas,xhci-r8a7795" for r8a7795 SoC
|
|
- "renesas,xhci-r8a7796" for r8a7796 SoC
|
|
- "renesas,rcar-gen2-xhci" for a generic R-Car Gen2 or RZ/G1 compatible
|
|
device
|
|
- "renesas,rcar-gen3-xhci" for a generic R-Car Gen3 compatible device
|
|
- "xhci-platform" (deprecated)
|
|
|
|
When compatible with the generic version, nodes must list the
|
|
SoC-specific version corresponding to the platform first
|
|
followed by the generic version.
|
|
|
|
- reg: should contain address and length of the standard XHCI
|
|
register set for the device.
|
|
- interrupts: one XHCI interrupt should be described here.
|
|
|
|
Optional properties:
|
|
- clocks: reference to a clock
|
|
- usb2-lpm-disable: indicate if we don't want to enable USB2 HW LPM
|
|
- usb3-lpm-capable: determines if platform is USB3 LPM capable
|
|
- quirk-broken-port-ped: set if the controller has broken port disable mechanism
|
|
- imod-interval-ns: default interrupt moderation interval is 5000ns
|
|
|
|
Example:
|
|
usb@f0931000 {
|
|
compatible = "generic-xhci";
|
|
reg = <0xf0931000 0x8c8>;
|
|
interrupts = <0x0 0x4e 0x0>;
|
|
};
|