mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-06 18:55:15 +07:00
4bc77b2d21
The defaults listed in the bindings don't match what the code is actually doing. Presumably existing users care more about keeping existing behavior the same, so change the bindings to match the code in Linux. The "qcom,preemphasis-level" default has been wrong for quite a long time (May 2018). The other two were recently added. As some evidence that these values are wrong, this is from the Linux driver: - qcom,preemphasis-level: sets "PORT_TUNE1", lower 2 bits. Driver programs PORT_TUNE1 to 0x30 by default and (0x30 & 0x3) = 0. - qcom,bias-ctrl-value: sets "PLL_BIAS_CONTROL_2", lower 6 bits. Driver programs PLL_BIAS_CONTROL_2 to 0x20 by default and (0x20 & 0x3f) = 0x20 = 32. - qcom,hsdisc-trim-value: sets "PORT_TUNE2", lower 2 bits. Driver programs PORT_TUNE2 to 0x29 by default and (0x29 & 0x3) = 1. Fixes:1e6f134eb6
("dt-bindings: phy: qcom-qusb2: Add support for overriding Phy tuning parameters") Fixes:a8b70ccf10
("dt-bindings: phy-qcom-usb2: Add support to override tuning values") Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Rob Herring <robh@kernel.org>
186 lines
4.8 KiB
YAML
186 lines
4.8 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
|
|
|
%YAML 1.2
|
|
---
|
|
$id: "http://devicetree.org/schemas/phy/qcom,qusb2-phy.yaml#"
|
|
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
|
|
|
title: Qualcomm QUSB2 phy controller
|
|
|
|
maintainers:
|
|
- Manu Gautam <mgautam@codeaurora.org>
|
|
|
|
description:
|
|
QUSB2 controller supports LS/FS/HS usb connectivity on Qualcomm chipsets.
|
|
|
|
properties:
|
|
compatible:
|
|
oneOf:
|
|
- items:
|
|
- enum:
|
|
- qcom,msm8996-qusb2-phy
|
|
- qcom,msm8998-qusb2-phy
|
|
- items:
|
|
- enum:
|
|
- qcom,sc7180-qusb2-phy
|
|
- qcom,sdm845-qusb2-phy
|
|
- const: qcom,qusb2-v2-phy
|
|
reg:
|
|
maxItems: 1
|
|
|
|
"#phy-cells":
|
|
const: 0
|
|
|
|
clocks:
|
|
minItems: 2
|
|
maxItems: 3
|
|
items:
|
|
- description: phy config clock
|
|
- description: 19.2 MHz ref clk
|
|
- description: phy interface clock (Optional)
|
|
|
|
clock-names:
|
|
minItems: 2
|
|
maxItems: 3
|
|
items:
|
|
- const: cfg_ahb
|
|
- const: ref
|
|
- const: iface
|
|
|
|
vdda-pll-supply:
|
|
description:
|
|
Phandle to 1.8V regulator supply to PHY refclk pll block.
|
|
|
|
vdda-phy-dpdm-supply:
|
|
description:
|
|
Phandle to 3.1V regulator supply to Dp/Dm port signals.
|
|
|
|
resets:
|
|
maxItems: 1
|
|
description:
|
|
Phandle to reset to phy block.
|
|
|
|
nvmem-cells:
|
|
maxItems: 1
|
|
description:
|
|
Phandle to nvmem cell that contains 'HS Tx trim'
|
|
tuning parameter value for qusb2 phy.
|
|
|
|
qcom,tcsr-syscon:
|
|
description:
|
|
Phandle to TCSR syscon register region.
|
|
$ref: /schemas/types.yaml#/definitions/phandle
|
|
|
|
if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
const: qcom,qusb2-v2-phy
|
|
then:
|
|
properties:
|
|
qcom,imp-res-offset-value:
|
|
description:
|
|
It is a 6 bit value that specifies offset to be
|
|
added to PHY refgen RESCODE via IMP_CTRL1 register. It is a PHY
|
|
tuning parameter that may vary for different boards of same SOC.
|
|
allOf:
|
|
- $ref: /schemas/types.yaml#/definitions/uint32
|
|
- minimum: 0
|
|
maximum: 63
|
|
default: 0
|
|
|
|
qcom,bias-ctrl-value:
|
|
description:
|
|
It is a 6 bit value that specifies bias-ctrl-value. It is a PHY
|
|
tuning parameter that may vary for different boards of same SOC.
|
|
allOf:
|
|
- $ref: /schemas/types.yaml#/definitions/uint32
|
|
- minimum: 0
|
|
maximum: 63
|
|
default: 32
|
|
|
|
qcom,charge-ctrl-value:
|
|
description:
|
|
It is a 2 bit value that specifies charge-ctrl-value. It is a PHY
|
|
tuning parameter that may vary for different boards of same SOC.
|
|
allOf:
|
|
- $ref: /schemas/types.yaml#/definitions/uint32
|
|
- minimum: 0
|
|
maximum: 3
|
|
default: 0
|
|
|
|
qcom,hstx-trim-value:
|
|
description:
|
|
It is a 4 bit value that specifies tuning for HSTX
|
|
output current.
|
|
Possible range is - 15mA to 24mA (stepsize of 600 uA).
|
|
See dt-bindings/phy/phy-qcom-qusb2.h for applicable values.
|
|
allOf:
|
|
- $ref: /schemas/types.yaml#/definitions/uint32
|
|
- minimum: 0
|
|
maximum: 15
|
|
default: 3
|
|
|
|
qcom,preemphasis-level:
|
|
description:
|
|
It is a 2 bit value that specifies pre-emphasis level.
|
|
Possible range is 0 to 15% (stepsize of 5%).
|
|
See dt-bindings/phy/phy-qcom-qusb2.h for applicable values.
|
|
allOf:
|
|
- $ref: /schemas/types.yaml#/definitions/uint32
|
|
- minimum: 0
|
|
maximum: 3
|
|
default: 0
|
|
|
|
qcom,preemphasis-width:
|
|
description:
|
|
It is a 1 bit value that specifies how long the HSTX
|
|
pre-emphasis (specified using qcom,preemphasis-level) must be in
|
|
effect. Duration could be half-bit of full-bit.
|
|
See dt-bindings/phy/phy-qcom-qusb2.h for applicable values.
|
|
allOf:
|
|
- $ref: /schemas/types.yaml#/definitions/uint32
|
|
- minimum: 0
|
|
maximum: 1
|
|
default: 0
|
|
|
|
qcom,hsdisc-trim-value:
|
|
description:
|
|
It is a 2 bit value tuning parameter that control disconnect
|
|
threshold and may vary for different boards of same SOC.
|
|
allOf:
|
|
- $ref: /schemas/types.yaml#/definitions/uint32
|
|
- minimum: 0
|
|
maximum: 3
|
|
default: 1
|
|
|
|
required:
|
|
- compatible
|
|
- reg
|
|
- "#phy-cells"
|
|
- clocks
|
|
- clock-names
|
|
- vdda-pll-supply
|
|
- vdda-phy-dpdm-supply
|
|
- resets
|
|
|
|
|
|
examples:
|
|
- |
|
|
#include <dt-bindings/clock/qcom,gcc-msm8996.h>
|
|
hsusb_phy: phy@7411000 {
|
|
compatible = "qcom,msm8996-qusb2-phy";
|
|
reg = <0x7411000 0x180>;
|
|
#phy-cells = <0>;
|
|
|
|
clocks = <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>,
|
|
<&gcc GCC_RX1_USB2_CLKREF_CLK>;
|
|
clock-names = "cfg_ahb", "ref";
|
|
|
|
vdda-pll-supply = <&pm8994_l12>;
|
|
vdda-phy-dpdm-supply = <&pm8994_l24>;
|
|
|
|
resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
|
|
nvmem-cells = <&qusb2p_hstx_trim>;
|
|
};
|