Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions Documentation/devicetree/bindings/usb/cypress,cypd6129.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# 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

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";
#address-cells = <1>;
#size-cells = <0>;

connector@0 {
compatible = "usb-c-connector";
reg = <0>;
label = "USB-C";
data-role = "dual";
power-role = "dual";
wakeup-source;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
endpoint {
remote-endpoint = <&usb_role_switch0>;
};
};
};
};
};
};
58 changes: 58 additions & 0 deletions arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,39 @@
0x800D 0x08>;
#sound-dai-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";

#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";
wakeup-source;

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

port@0 {
reg = <0>;

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

&mdss {
Expand Down Expand Up @@ -701,6 +734,13 @@
output-high;
};

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

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

&usb_2 {
dr_mode = "otg";

status = "okay";
};

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

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

status = "okay";
};

&usb_qmpphy_out {
remote-endpoint = <&pm4125_ss_in>;
};
Expand Down
58 changes: 58 additions & 0 deletions arch/arm64/boot/dts/qcom/shikra-cqs-evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,39 @@

#sound-dai-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";

#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";
wakeup-source;

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

port@0 {
reg = <0>;

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

&mdss {
Expand Down Expand Up @@ -623,6 +656,13 @@
output-high;
};

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

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

&usb_2 {
dr_mode = "otg";

status = "okay";
};

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

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

status = "okay";
};

&usb_qmpphy_out {
remote-endpoint = <&pm4125_ss_in>;
};
Expand Down
12 changes: 12 additions & 0 deletions arch/arm64/boot/dts/qcom/shikra-evk.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,15 @@
max-speed = <3200000>;
};
};

&usb_1 {
dr_mode = "peripheral";

status = "okay";
};

&usb_2 {
dr_mode = "peripheral";

status = "okay";
};
Loading
Loading