diff mbox series

[RESEND,v2,4/7] dt-bindings: usb: Add Qualcomm PMIC PDPHY controller YAML schema

Message ID 20211028164941.831918-5-bryan.odonoghue@linaro.org (mailing list archive)
State Superseded
Headers show
Series Add pm8150b TPCM driver | expand

Commit Message

Bryan O'Donoghue Oct. 28, 2021, 4:49 p.m. UTC
Add a YAML binding for the power-delivery PHY silicon interface inside
Qualcomm's pm8150b hardware block.

The pdphy driver operates with a type-c driver inside of a high level
single TCPM device to provide overall TCPM functionality.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 .../bindings/usb/qcom,pmic-pdphy.yaml         | 115 ++++++++++++++++++
 1 file changed, 115 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml

Comments

Rob Herring Oct. 28, 2021, 7:08 p.m. UTC | #1
On Thu, 28 Oct 2021 17:49:38 +0100, Bryan O'Donoghue wrote:
> Add a YAML binding for the power-delivery PHY silicon interface inside
> Qualcomm's pm8150b hardware block.
> 
> The pdphy driver operates with a type-c driver inside of a high level
> single TCPM device to provide overall TCPM functionality.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  .../bindings/usb/qcom,pmic-pdphy.yaml         | 115 ++++++++++++++++++
>  1 file changed, 115 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:
./Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml:37:8: [warning] wrong indentation: expected 6 but found 7 (indentation)

dtschema/dtc warnings/errors:

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1547614

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
Rob Herring Oct. 28, 2021, 8:39 p.m. UTC | #2
On Thu, Oct 28, 2021 at 05:49:38PM +0100, Bryan O'Donoghue wrote:
> Add a YAML binding for the power-delivery PHY silicon interface inside
> Qualcomm's pm8150b hardware block.
> 
> The pdphy driver operates with a type-c driver inside of a high level
> single TCPM device to provide overall TCPM functionality.

Same comments for this one...

> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  .../bindings/usb/qcom,pmic-pdphy.yaml         | 115 ++++++++++++++++++
>  1 file changed, 115 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml
> new file mode 100644
> index 0000000000000..9110f6203b87f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml
> @@ -0,0 +1,115 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/usb/qcom,pmic-pdphy.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Qualcomm PMIC based USB PDPHY driver
> +
> +maintainers:
> +  - Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> +
> +description: |
> +  Qualcomm PMIC Power Delivery PHY driver
> +
> +properties:
> +  compatible:
> +    enum:
> +      - qcom,pm8150b-pdphy
> +
> +  reg:
> +    maxItems: 1
> +    description: PDPHY base address
> +
> +  interrupts:
> +    items:
> +      - description: Sig TX - transmitted reset signal
> +      - description: Sig RX - received reset signal
> +      - description: TX completion
> +      - description: RX completion
> +      - description: TX fail
> +      - description: TX discgard
> +      - description: RX discgard
> +      - description: Fast Role Swap event
> +
> +  interrupt-names:
> +    items:
> +       - const: pmic-pdphy-sig-tx
> +       - const: pmic-pdphy-sig-rx
> +       - const: pmic-pdphy-msg-tx
> +       - const: pmic-pdphy-msg-rx
> +       - const: pmic-pdphy-msg-tx-failed
> +       - const: pmic-pdphy-msg-tx-discarded
> +       - const: pmic-pdphy-msg-rx-discarded
> +       - const: pmic-pdphy-fr-swap
> +
> +  ports:
> +    description: Remote endpoint connections
> +    $ref: /connector/usb-connector.yaml#/properties/ports
> +
> +    properties:
> +      port@0:
> +        description: Remote endpoints for the TCPM driver
> +
> +    required:
> +      - port@0
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - interrupt-names
> +  - ports
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/usb/typec/tcpm/qcom,pmic-usb-pdphy.h>
> +
> +    pm8150b {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        pm8150b_pdphy: pdphy@1700 {
> +            compatible = "qcom,pm8150b-pdphy";
> +            reg = <0x1700>;
> +            interrupts = <0x2 0x17 PMIC_PDPHY_SIG_TX_IRQ
> +                          IRQ_TYPE_EDGE_RISING>,
> +                         <0x2 0x17 PMIC_PDPHY_SIG_RX_IRQ
> +                          IRQ_TYPE_EDGE_RISING>,
> +                         <0x2 0x17 PMIC_PDPHY_MSG_TX_IRQ
> +                          IRQ_TYPE_EDGE_RISING>,
> +                         <0x2 0x17 PMIC_PDPHY_MSG_RX_IRQ
> +                          IRQ_TYPE_EDGE_RISING>,
> +                         <0x2 0x17 PMIC_PDPHY_MSG_TX_FAIL_IRQ
> +                          IRQ_TYPE_EDGE_RISING>,
> +                         <0x2 0x17 PMIC_PDPHY_MSG_TX_DISCARD_IRQ
> +                          IRQ_TYPE_EDGE_RISING>,
> +                         <0x2 0x17 PMIC_PDPHY_MSG_RX_DISCARD_IRQ
> +                          IRQ_TYPE_EDGE_RISING>,
> +                         <0x2 0x17 PMIC_PDPHY_FR_SWAP_IRQ
> +                          IRQ_TYPE_EDGE_RISING>;
> +            interrupt-names = "pmic-pdphy-sig-tx",
> +                              "pmic-pdphy-sig-rx",
> +                              "pmic-pdphy-msg-tx",
> +                              "pmic-pdphy-msg-rx",
> +                              "pmic-pdphy-msg-tx-failed",
> +                              "pmic-pdphy-msg-tx-discarded",
> +                              "pmic-pdphy-msg-rx-discarded",
> +                              "pmic-pdphy-fr-swap";
> +            ports {
> +                #address-cells = <1>;
> +                #size-cells = <0>;
> +
> +                port@0 {
> +                    reg = <0>;
> +                    pmic_pdphy: endpoint {
> +                        remote-endpoint = <&pmic_tcpm_pdphy>;
> +                    };
> +                };
> +            };
> +        };
> +    };
> +...
> -- 
> 2.33.0
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml
new file mode 100644
index 0000000000000..9110f6203b87f
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml
@@ -0,0 +1,115 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/usb/qcom,pmic-pdphy.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm PMIC based USB PDPHY driver
+
+maintainers:
+  - Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+
+description: |
+  Qualcomm PMIC Power Delivery PHY driver
+
+properties:
+  compatible:
+    enum:
+      - qcom,pm8150b-pdphy
+
+  reg:
+    maxItems: 1
+    description: PDPHY base address
+
+  interrupts:
+    items:
+      - description: Sig TX - transmitted reset signal
+      - description: Sig RX - received reset signal
+      - description: TX completion
+      - description: RX completion
+      - description: TX fail
+      - description: TX discgard
+      - description: RX discgard
+      - description: Fast Role Swap event
+
+  interrupt-names:
+    items:
+       - const: pmic-pdphy-sig-tx
+       - const: pmic-pdphy-sig-rx
+       - const: pmic-pdphy-msg-tx
+       - const: pmic-pdphy-msg-rx
+       - const: pmic-pdphy-msg-tx-failed
+       - const: pmic-pdphy-msg-tx-discarded
+       - const: pmic-pdphy-msg-rx-discarded
+       - const: pmic-pdphy-fr-swap
+
+  ports:
+    description: Remote endpoint connections
+    $ref: /connector/usb-connector.yaml#/properties/ports
+
+    properties:
+      port@0:
+        description: Remote endpoints for the TCPM driver
+
+    required:
+      - port@0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - interrupt-names
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/usb/typec/tcpm/qcom,pmic-usb-pdphy.h>
+
+    pm8150b {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pm8150b_pdphy: pdphy@1700 {
+            compatible = "qcom,pm8150b-pdphy";
+            reg = <0x1700>;
+            interrupts = <0x2 0x17 PMIC_PDPHY_SIG_TX_IRQ
+                          IRQ_TYPE_EDGE_RISING>,
+                         <0x2 0x17 PMIC_PDPHY_SIG_RX_IRQ
+                          IRQ_TYPE_EDGE_RISING>,
+                         <0x2 0x17 PMIC_PDPHY_MSG_TX_IRQ
+                          IRQ_TYPE_EDGE_RISING>,
+                         <0x2 0x17 PMIC_PDPHY_MSG_RX_IRQ
+                          IRQ_TYPE_EDGE_RISING>,
+                         <0x2 0x17 PMIC_PDPHY_MSG_TX_FAIL_IRQ
+                          IRQ_TYPE_EDGE_RISING>,
+                         <0x2 0x17 PMIC_PDPHY_MSG_TX_DISCARD_IRQ
+                          IRQ_TYPE_EDGE_RISING>,
+                         <0x2 0x17 PMIC_PDPHY_MSG_RX_DISCARD_IRQ
+                          IRQ_TYPE_EDGE_RISING>,
+                         <0x2 0x17 PMIC_PDPHY_FR_SWAP_IRQ
+                          IRQ_TYPE_EDGE_RISING>;
+            interrupt-names = "pmic-pdphy-sig-tx",
+                              "pmic-pdphy-sig-rx",
+                              "pmic-pdphy-msg-tx",
+                              "pmic-pdphy-msg-rx",
+                              "pmic-pdphy-msg-tx-failed",
+                              "pmic-pdphy-msg-tx-discarded",
+                              "pmic-pdphy-msg-rx-discarded",
+                              "pmic-pdphy-fr-swap";
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                port@0 {
+                    reg = <0>;
+                    pmic_pdphy: endpoint {
+                        remote-endpoint = <&pmic_tcpm_pdphy>;
+                    };
+                };
+            };
+        };
+    };
+...