From dfa9a59aad3bdf774af6e681f6cb0c7170ed4742 Mon Sep 17 00:00:00 2001 From: Ronak Vijay Raheja Date: Mon, 12 Jun 2023 14:59:21 -0700 Subject: [PATCH] dt-bindings: Add USB PHY bindings Add USB PHY bindings used on MSM platforms. Change-Id: Ifaf30337abc9b48ccad01f9b4d9aedfb877820f4 Signed-off-by: Ronak Vijay Raheja --- bindings/usb/qcom,pmic-eusb2-repeater.yaml | 47 +++++++++ bindings/usb/qcom,usb-emu-phy.yaml | 59 +++++++++++ bindings/usb/qcom,usb-snps-eusb2-phy.yaml | 112 +++++++++++++++++++++ 3 files changed, 218 insertions(+) create mode 100644 bindings/usb/qcom,pmic-eusb2-repeater.yaml create mode 100644 bindings/usb/qcom,usb-emu-phy.yaml create mode 100644 bindings/usb/qcom,usb-snps-eusb2-phy.yaml diff --git a/bindings/usb/qcom,pmic-eusb2-repeater.yaml b/bindings/usb/qcom,pmic-eusb2-repeater.yaml new file mode 100644 index 00000000..43597114 --- /dev/null +++ b/bindings/usb/qcom,pmic-eusb2-repeater.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/qcom,pmic-eusb2-repeater.yaml## +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. eUSB2 Repeater + +maintainers: + - Ronak Vijay Raheja + +properties: + compatible: + const: qcom,pmic-eusb2-repeater + + reg: + description: address and length of the register set for the device + minItems: 1 + + vdd3-supply: + description: phandle to the 3V supply for eUSB2 repeater + + vdd18-supply: + description: phandle to the 1.8V supply for eUSB2 repeater + + qcom,param-override-seq: + description: parameter override sequence with value, reg offset pair + $ref: /schemas/types.yaml#/definitions/uint32-array + +required: + - compatible + - reg + - vdd3-supply + - vdd18-supply + +additionalProperties: false + +examples: + - | + eusb2_repeater@fd00 { + compatible = "qcom,pmic-eusb2-repeater"; + reg = <0xfd00 0xff>; + vdd18-supply = <&pm8841_s2_corner>; + vdd3-supply = <&pm8941_l6>; + qcom,param-override-seq = <0x4 0x57>; + }; +... diff --git a/bindings/usb/qcom,usb-emu-phy.yaml b/bindings/usb/qcom,usb-emu-phy.yaml new file mode 100644 index 00000000..ffae2cb5 --- /dev/null +++ b/bindings/usb/qcom,usb-emu-phy.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/qcom,usb-emu-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. emulation USB PHY + +maintainers: + - Ronak Vijay Raheja + +properties: + compatible: + const: qcom,usb-emu-phy + + reg: + description: | + Offset and length of the register set in the memory map. Additional + offset and length of register set for QSCRATCH wrapper. + minItems: 1 + maxItems: 2 + + reg-names: + items: + - const: base + - const: qscratch_base + + qcom,emu-init-seq: + description: emulation initialization sequence of value,reg pairs + $ref: /schemas/types.yaml#/definitions/uint32-array + +required: + - compatible + - reg + - reg-names + - qcom,emu-init-seq + +additionalProperties: false + +examples: + - | + usb_emu_phy@a720000 { + compatible = "qcom,usb-emu-phy"; + reg = <0x0a720000 0x9500>, + <0x0a6f8800 0x100>; + reg-names = "base", "qscratch_base"; + + qcom,emu-init-seq = <0xfff0 0x4 + 0xfff3 0x4 + 0xfff0 0x4 + 0x100000 0x20 + 0x0 0x20 + 0x1a0 0x20 + 0x100000 0x3c + 0x0 0x3c + 0x10060 0x3c + 0x0 0x4>; + }; +... diff --git a/bindings/usb/qcom,usb-snps-eusb2-phy.yaml b/bindings/usb/qcom,usb-snps-eusb2-phy.yaml new file mode 100644 index 00000000..ec68957a --- /dev/null +++ b/bindings/usb/qcom,usb-snps-eusb2-phy.yaml @@ -0,0 +1,112 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/qcom,usb-snps-eusb2-phy.yaml## +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. eUSB2 SNPS USB HSPHY + +maintainers: + - Ronak Vijay Raheja + +properties: + compatible: + const: qcom,usb-snps-eusb2-phy + + reg: + description: | + Address and length of the register set for the device. Required regs are:: + - eusb2_phy_base:: the base register for the PHY + - eud_detect_reg:: VIOCTL_EUD_DETECT register. + Optional regs are:: + - eud_enable_reg:: register address to read eud enable/disable status. + minItems: 2 + + vdd-supply: + description: phandle to the Vdd supply for HSPHY digital circuit operation + + vdda12-supply: + description: phandle to the 1.2V supply for HSPHY digital circuit operation + + clocks: + minItems: 1 + items: + - description: RPMH_CXO_PAD_CLK clk + - description: TCSR_USB2_CLKREF_EN clk + + clock-names: + minItems: 1 + items: + - const: ref_clk_src # required + - const: ref_clk + + qcom,vdd-voltage-level: + description: | + This property must be a list of three integer values (no, min, max) where + each value represents either a voltage in microvolts or a value + corresponding to voltage corner. + $ref: /schemas/types.yaml#/definitions/uint32-array + + resets: + description: | + Reset specifier pair consists of phandle for the reset controller and + reset lines used by this controller. + + reset-names: + description: | + reset signal name strings sorted in the same order as the resets + property. + + usb-repeater: + description: | + phandle to eUSB2 repeater which is used with eUSB2 HSPHY for USB + functionality. + + qcom,param-override-seq: + description: parameter override sequence with value, reg offset pair + $ref: /schemas/types.yaml#/definitions/uint32-array + + dummy-supply: + description: | + phandle to eUSB2 repeater for enforcing probe ordering for eUSB2 repeater + and eUSB2 PHY driver. + +required: + - compatible + - reg + - vdd-supply + - vdda12-supply + - clocks + - clock-names + - qcom,vdd-voltage-level + - resets + - reset-names + - usb-repeater + +additionalProperties: false + +examples: + - | + #include + #include + #include + + eusb2_phy: hsphy@ff4000 { + compatible = "qcom,usb-snps-eusb2-phy"; + reg = <0x88e3000 0x154>, + <0xc278000 0x4>; + + vdd-supply = <&pm_v8_l1>; + qcom,vdd-voltage-level = <0 880000 880000>; + vdda12-supply = <&pm_v8_l3>; + + clocks = <&rpmhcc RPMH_CXO_PAD_CLK>, + <&tcsrcc TCSR_USB2_CLKREF_EN>; + clock-names = "ref_clk_src", "ref_clk"; + + resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>; + reset-names = "phy_reset"; + + usb-repeater = <&pm8550b_eusb2_repeater>; + }; +...