Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ properties:
- const: vcodec0_core
- const: vcodec0_bus

iommus:
maxItems: 2

interconnects:
maxItems: 2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ properties:
compatible:
enum:
- qcom,qcs615-qmp-usb3-dp-phy
- qcom,shikra-qmp-usb3-dp-phy

reg:
maxItems: 1
Expand All @@ -33,12 +34,18 @@ properties:
- const: pipe

resets:
maxItems: 2
minItems: 2
maxItems: 3

reset-names:
items:
- const: phy_phy
- const: dp_phy
oneOf:
- items:
- const: phy_phy
- const: dp_phy
- items:
- const: phy_phy
- const: dp_phy
- const: phy

vdda-phy-supply: true

Expand All @@ -54,6 +61,19 @@ properties:
description:
See include/dt-bindings/phy/phy-qcom-qmp.h

orientation-switch: true

ports:
$ref: /schemas/graph.yaml#/properties/ports
properties:
port@0:
$ref: /schemas/graph.yaml#/properties/port
description: Output endpoint of the PHY

port@1:
$ref: /schemas/graph.yaml#/properties/port
description: Incoming endpoint from the USB controller

qcom,tcsr-reg:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
Expand All @@ -76,6 +96,22 @@ required:
- "#phy-cells"
- qcom,tcsr-reg

allOf:
- $ref: /schemas/usb/usb-switch.yaml#
- if:
properties:
compatible:
contains:
const: qcom,qcs615-qmp-usb3-dp-phy
then:
properties:
resets:
maxItems: 2
reset-names:
maxItems: 2
orientation-switch: false
ports: false

additionalProperties: false

examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ patternProperties:
$ref: "#/$defs/qcom-shikra-tlmm-state"
additionalProperties: false

"-hog(-[0-9]+)?$":
type: object
required:
- gpio-hog

$defs:
qcom-shikra-tlmm-state:
type: object
Expand Down
107 changes: 107 additions & 0 deletions Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/cypress,cypd6129.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cypress cypd6129/cypd6229 Type-C Controller

maintainers:
- Akash Kumar <akash.kumar@oss.qualcomm.com>

description:
The Cypress cypd6129 and cypd6229 are dual Type-C PD controllers that are
controlled via an I2C interface.

properties:
compatible:
oneOf:
- const: cypress,cypd6129
- items:
- const: cypress,cypd6229
- const: cypress,cypd6129

'#address-cells':
const: 1

'#size-cells':
const: 0

reg:
maxItems: 1

interrupts:
maxItems: 1

pinctrl-0: true
pinctrl-1: true

pinctrl-names:
minItems: 1
items:
- const: default
- const: sleep

wakeup-source:
description: enable IRQ remote wakeup, see power/wakeup-source.txt
type: boolean

patternProperties:
'^connector@[01]$':
$ref: /schemas/connector/usb-connector.yaml#
required:
- reg

required:
- compatible
- reg
- interrupts

anyOf:
- required:
- connector@0
- required:
- connector@1

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;

typec@40 {
compatible = "cypress,cypd6129";
reg = <0x40>;
interrupts-extended = <&tlmm 136 IRQ_TYPE_LEVEL_LOW>;
pinctrl-0 = <&usb0_intr_state>;
pinctrl-names = "default";
wakeup-source;

#address-cells = <1>;
#size-cells = <0>;

connector@0 {
compatible = "usb-c-connector";
reg = <0>;
label = "USB-C";
data-role = "dual";
power-role = "dual";

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;

endpoint {
remote-endpoint = <&usb_role_switch0>;
};
};
};
};
};
};
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ allOf:
- qcom,msm8996-dwc3
- qcom,qcs404-dwc3
- qcom,sdm660-dwc3
- qcom,shikra-dwc3
- qcom,sm6115-dwc3
- qcom,sm6125-dwc3
then:
Expand Down Expand Up @@ -498,6 +497,7 @@ allOf:
- qcom,sdx55-dwc3
- qcom,sdx65-dwc3
- qcom,sdx75-dwc3
- qcom,shikra-dwc3
- qcom,sm4250-dwc3
- qcom,sm6350-dwc3
- qcom,sm8150-dwc3
Expand Down
95 changes: 83 additions & 12 deletions arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -463,21 +463,13 @@
status = "okay";
};

&pm4125_hs_in {
remote-endpoint = <&usb_1_dwc3_hs>;
};

&pm4125_l5 {
/* DSI VDDA - must be at NOM voltage for PHY PLL lock */
regulator-min-microvolt = <1232000>;
regulator-max-microvolt = <1232000>;
regulator-allow-set-load;
};

&pm4125_ss_in {
remote-endpoint = <&usb_qmpphy_out>;
};

&qaif_cpu {
status = "okay";

Expand Down Expand Up @@ -523,6 +515,51 @@
status = "okay";
};

&i2c3 {
status = "okay";

typec@40 {
compatible = "cypress,cypd6129";
reg = <0x40>;
interrupts-extended = <&tlmm 136 IRQ_TYPE_LEVEL_LOW>;
pinctrl-0 = <&usb0_intr_state>;
pinctrl-names = "default";
wakeup-source;

#address-cells = <1>;
#size-cells = <0>;

ccg_typec_con0: connector@0 {
compatible = "usb-c-connector";
reg = <0>;
label = "USB-C";
data-role = "dual";
power-role = "dual";

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;

ucsi_ccg_port: endpoint {
remote-endpoint = <&usb_2_dwc3_hs>;
};
};
};
};
};
};

&pm4125_hs_in {
remote-endpoint = <&usb_1_dwc3_hs>;
};

&pm4125_ss_in {
remote-endpoint = <&usb_qmpphy_out>;
};

&sdhc_1 {
vmmc-supply = <&pm4125_l20>;
vqmmc-supply = <&pm4125_l14>;
Expand Down Expand Up @@ -701,6 +738,13 @@
output-high;
};

vbus_boost_5v: vbus-boost-5v-hog {
gpio-hog;
gpios = <79 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "vbus-boost-5v";
};

wsa885x_i2c_spkr_sd_n: wsa885x-i2c-spkr-sd-n-active-state {
pins = "gpio2";
function = "gpio";
Expand Down Expand Up @@ -736,6 +780,15 @@
status = "okay";
};

&tlmm {
usb0_intr_state: usb0-intr-state {
pins = "gpio136";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};

&usb_1_dwc3_hs {
remote-endpoint = <&pm4125_hs_in>;
};
Expand All @@ -748,13 +801,20 @@
status = "okay";
};

&usb_qmpphy_out {
remote-endpoint = <&pm4125_ss_in>;
&usb_2 {
dr_mode = "otg";

port {
usb_2_dwc3_hs: endpoint {
remote-endpoint = <&ucsi_ccg_port>;
};
};
};

&usb_qmpphy {
vdda-phy-supply = <&pm4125_l8>;
&usb_2_hsphy {
vdd-supply = <&pm4125_l12>;
vdda-pll-supply = <&pm4125_l13>;
vdda-phy-dpdm-supply = <&pm4125_l21>;

status = "okay";
};
Expand All @@ -777,3 +837,14 @@

status = "okay";
};

&usb_qmpphy_out {
remote-endpoint = <&pm4125_ss_in>;
};

&usb_qmpphy {
vdda-phy-supply = <&pm4125_l8>;
vdda-pll-supply = <&pm4125_l13>;

status = "okay";
};
Loading
Loading