Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: mt8173-xhci: support host side of dual-role mode

Some resources, such as IPPC register etc, shared with device
driver are moved into common glue layer when xHCI driver is the
host side of dual-role mode and they should be changed as optional
properties if they are required ones before. For clarity, add
a new part of binding to support host side of dual-role mode.

Additionally add optional properties of pinctrl for host only mode

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Chunfeng Yun and committed by
Greg Kroah-Hartman
78f8a0fa 6c21caa3

+52 -2
+52 -2
Documentation/devicetree/bindings/usb/mt8173-xhci.txt
··· 2 2 3 3 The device node for Mediatek SOC USB3.0 host controller 4 4 5 + There are two scenarios: the first one only supports xHCI driver; 6 + the second one supports dual-role mode, and the host is based on xHCI 7 + driver. Take account of backward compatibility, we divide bindings 8 + into two parts. 9 + 10 + 1st: only supports xHCI driver 11 + ------------------------------------------------------------------------ 12 + 5 13 Required properties: 6 14 - compatible : should contain "mediatek,mt8173-xhci" 7 - - reg : specifies physical base address and size of the registers, 8 - the first one for MAC, the second for IPPC 15 + - reg : specifies physical base address and size of the registers 16 + - reg-names: should be "mac" for xHCI MAC and "ippc" for IP port control 9 17 - interrupts : interrupt used by the controller 10 18 - power-domains : a phandle to USB power domain node to control USB's 11 19 mtcmos ··· 35 27 control register, it depends on "mediatek,wakeup-src". 36 28 - vbus-supply : reference to the VBUS regulator; 37 29 - usb3-lpm-capable : supports USB3.0 LPM 30 + - pinctrl-names : a pinctrl state named "default" must be defined 31 + - pinctrl-0 : pin control group 32 + See: Documentation/devicetree/bindings/pinctrl/pinctrl-binding.txt 38 33 39 34 Example: 40 35 usb30: usb@11270000 { 41 36 compatible = "mediatek,mt8173-xhci"; 42 37 reg = <0 0x11270000 0 0x1000>, 43 38 <0 0x11280700 0 0x0100>; 39 + reg-names = "mac", "ippc"; 44 40 interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>; 45 41 power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>; 46 42 clocks = <&topckgen CLK_TOP_USB30_SEL>, ··· 60 48 usb3-lpm-capable; 61 49 mediatek,syscon-wakeup = <&pericfg>; 62 50 mediatek,wakeup-src = <1>; 51 + }; 52 + 53 + 2nd: dual-role mode with xHCI driver 54 + ------------------------------------------------------------------------ 55 + 56 + In the case, xhci is added as subnode to mtu3. An example and the DT binding 57 + details of mtu3 can be found in: 58 + Documentation/devicetree/bindings/usb/mtu3.txt 59 + 60 + Required properties: 61 + - compatible : should contain "mediatek,mt8173-xhci" 62 + - reg : specifies physical base address and size of the registers 63 + - reg-names: should be "mac" for xHCI MAC 64 + - interrupts : interrupt used by the host controller 65 + - power-domains : a phandle to USB power domain node to control USB's 66 + mtcmos 67 + - vusb33-supply : regulator of USB avdd3.3v 68 + 69 + - clocks : a list of phandle + clock-specifier pairs, one for each 70 + entry in clock-names 71 + - clock-names : must be 72 + "sys_ck": for clock of xHCI MAC 73 + 74 + Optional properties: 75 + - vbus-supply : reference to the VBUS regulator; 76 + - usb3-lpm-capable : supports USB3.0 LPM 77 + 78 + Example: 79 + usb30: usb@11270000 { 80 + compatible = "mediatek,mt8173-xhci"; 81 + reg = <0 0x11270000 0 0x1000>; 82 + reg-names = "mac"; 83 + interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>; 84 + power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>; 85 + clocks = <&topckgen CLK_TOP_USB30_SEL>; 86 + clock-names = "sys_ck"; 87 + vusb33-supply = <&mt6397_vusb_reg>; 88 + usb3-lpm-capable; 63 89 };