Re: [PATCH v4 09/18] dt-bindings: usb: Add Qualcomm PMIC TCPM YAML schema

Krzysztof Kozlowski
2023-03-19T11:58:21Z

On 18/03/2023 13:18, Bryan O'Donoghue wrote:
> Add a YAML description for the pm8150b-tcpm driver. The pm8150b-tcpm

No, do not add YAML description for driver.

Please add bindings for some hardware and describe the hardware.

> encapsulates a type-c block and a pdphy block into one block presented to
> the TCPM Linux API.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
> .../bindings/usb/qcom,pmic-virt-tcpm.yaml | 88 +++++++++++++++++++
> 1 file changed, 88 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-virt-tcpm.yaml
>
> diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-virt-tcpm.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-virt-tcpm.yaml
> new file mode 100644
> index 0000000000000..576842c8b65b4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-virt-tcpm.yaml
> @@ -0,0 +1,88 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/usb/qcom,pmic-virt-tcpm.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Qualcomm PMIC Virtual TCPM Driver

All previous comments apply.

> +
> +maintainers:
> + - Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> +
> +description: |
> + Qualcomm PMIC Virtual Type-C Port Manager Driver
> + A virtual device which manages Qualcomm PMIC provided Type-C port and
> + Power Delivery in one place.

OK, so it looks like bindings for driver, so a no-go. Unless there is
such device as "manager", this does not look like hardware description.

> +
> +properties:
> + compatible:
> + const: qcom,pmic-virt-tcpm
> +
> + connector:
> + type: object
> + $ref: /schemas/connector/usb-connector.yaml#
> + unevaluatedProperties: false
> +
> + port:
> + $ref: /schemas/graph.yaml#/properties/port
> + description:
> + Contains a port which consumes data-role switching messages.
> +
> + qcom,pmic-typec:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + A phandle to the typec port hardware driver.
> +
> + qcom,pmic-pdphy:
> + $ref: /schemas/types.yaml#/definitions/phandle

Having typec and phy as phandles - not children - also suggests this is
some software construct, not hardware description.

Best regards,
Krzysztof