Qualcomm PMIC based USB Type-C block
Schema identifier ($id): "http://devicetree.org/schemas/usb/qcom,pmic-typec.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Bryan O'Donoghue <bryan.odonoghue@linaro.org>"
Qualcomm PMIC Type-C block
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Allowed values (
enum):"qcom,pmi632-typec","qcom,pm8150b-typec"
Rule 2
Array item rules (
items)Item 1
Allowed values (
enum):"qcom,pm6150-typec","qcom,pm7250b-typec"Item 2
Exact value (
const):"qcom,pm8150b-typec"
Rule 3
Array item rules (
items)Item 1
Item 2
Exact value (
const):"qcom,pmi632-typec"
connector — not listed as required here #
Value type (type): "object"
Shared schema rule ($ref): /schemas/connector/usb-connector.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
reg — required here #
Type-C port and pdphy SPMI register base offsets
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 2
interrupts — required here #
Minimum number of items (minItems): 8
Array item rules (items) #
Item 1
Type-C CC attach notification, VBUS error, tCCDebounce done
Item 2
Type-C VCONN powered
Item 3
Type-C CC state change
Item 4
Type-C VCONN over-current
Item 5
Type-C VBUS state change
Item 6
Type-C Attach/detach notification
Item 7
Type-C Legacy cable detect
Item 8
Type-C Try.Src Try.Snk state change
Item 9
Power Domain Signal TX - HardReset or CableReset signal TX
Item 10
Power Domain Signal RX - HardReset or CableReset signal RX
Item 11
Power Domain TX complete
Item 12
Power Domain RX complete
Item 13
Power Domain TX fail
Item 14
Power Domain TX message discard
Item 15
Power Domain RX message discard
Item 16
Power Domain Fast Role Swap event
interrupt-names — required here #
Minimum number of items (minItems): 8
Array item rules (items) #
Item 1
Exact value (
const):"or-rid-detect-change"
Item 2
Exact value (
const):"vpd-detect"
Item 3
Exact value (
const):"cc-state-change"
Item 4
Exact value (
const):"vconn-oc"
Item 5
Exact value (
const):"vbus-change"
Item 6
Exact value (
const):"attach-detach"
Item 7
Exact value (
const):"legacy-cable-detect"
Item 8
Exact value (
const):"try-snk-src-detect"
Item 9
Exact value (
const):"sig-tx"
Item 10
Exact value (
const):"sig-rx"
Item 11
Exact value (
const):"msg-tx"
Item 12
Exact value (
const):"msg-rx"
Item 13
Exact value (
const):"msg-tx-failed"
Item 14
Exact value (
const):"msg-tx-discarded"
Item 15
Exact value (
const):"msg-rx-discarded"
Item 16
Exact value (
const):"fr-swap"
vdd-vbus-supply — required here #
VBUS power supply.
vdd-pdphy-supply — not listed as required here #
VDD regulator supply to the PDPHY.
port — not listed as required here #
Shared schema rule ($ref): /schemas/graph.yaml#/properties/port
Contains a port which produces data-role switching messages.
Required in this object (required): "compatible", "reg", "interrupts", "interrupt-names", "vdd-vbus-supply"
All of these rules must match (allOf) #
Rule 1 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)When the condition matches (
then) #Properties and child nodes (
properties)
reg— not listed as required hereMaximum number of items (
maxItems):1
interrupts— not listed as required hereMaximum number of items (
maxItems):8
interrupt-names— not listed as required hereMaximum number of items (
maxItems):8
vdd-pdphy-supply— not listed as required here
false— Not permitted by this property rule.When the condition does not match (
else) #Properties and child nodes (
properties)
reg— not listed as required hereMaximum number of items (
maxItems):2
interrupts— not listed as required hereMinimum number of items (
minItems):16
interrupt-names— not listed as required hereMaximum number of items (
maxItems):16
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/usb/pd.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
pm8150b_typec: typec@1500 {
compatible = "qcom,pm8150b-typec";
reg = <0x1500>,
<0x1700>;
interrupts = <0x2 0x15 0x00 IRQ_TYPE_EDGE_RISING>,
<0x2 0x15 0x01 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x15 0x02 IRQ_TYPE_EDGE_RISING>,
<0x2 0x15 0x03 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x15 0x04 IRQ_TYPE_EDGE_RISING>,
<0x2 0x15 0x05 IRQ_TYPE_EDGE_RISING>,
<0x2 0x15 0x06 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x15 0x07 IRQ_TYPE_EDGE_RISING>,
<0x2 0x17 0x00 IRQ_TYPE_EDGE_RISING>,
<0x2 0x17 0x01 IRQ_TYPE_EDGE_RISING>,
<0x2 0x17 0x02 IRQ_TYPE_EDGE_RISING>,
<0x2 0x17 0x03 IRQ_TYPE_EDGE_RISING>,
<0x2 0x17 0x04 IRQ_TYPE_EDGE_RISING>,
<0x2 0x17 0x05 IRQ_TYPE_EDGE_RISING>,
<0x2 0x17 0x06 IRQ_TYPE_EDGE_RISING>,
<0x2 0x17 0x07 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "or-rid-detect-change",
"vpd-detect",
"cc-state-change",
"vconn-oc",
"vbus-change",
"attach-detach",
"legacy-cable-detect",
"try-snk-src-detect",
"sig-tx",
"sig-rx",
"msg-tx",
"msg-rx",
"msg-tx-failed",
"msg-tx-discarded",
"msg-rx-discarded",
"fr-swap";
vdd-vbus-supply = <&pm8150b_vbus>;
vdd-pdphy-supply = <&vreg_l2a_3p1>;
connector {
compatible = "usb-c-connector";
power-role = "source";
data-role = "dual";
self-powered;
source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_DUAL_ROLE |
PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
pmic_typec_hs_in: endpoint {
remote-endpoint = <&usb_hs_out>;
};
};
port@1 {
reg = <1>;
pmic_typec_ss_in: endpoint {
remote-endpoint = <&usb_phy_typec_ss_out>;
};
};
port@2 {
reg = <2>;
pmic_typec_sbu: endpoint {
remote-endpoint = <&usb_mux_sbu>;
};
};
};
};
};
};
usb {
dr_mode = "otg";
usb-role-switch;
port {
usb_hs_out: endpoint {
remote-endpoint = <&pmic_typec_hs_in>;
};
};
};
usb-phy {
orientation-switch;
port {
usb_phy_typec_ss_out: endpoint {
remote-endpoint = <&pmic_typec_ss_in>;
};
};
};
usb-mux {
orientation-switch;
mode-switch;
port {
usb_mux_sbu: endpoint {
remote-endpoint = <&pmic_typec_sbu>;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)