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
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 <[email protected]>

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>;
};
};
};
};
};
};
93 changes: 84 additions & 9 deletions arch/arm64/boot/dts/qcom/shikra-cqm-evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,11 @@
status = "okay";
};

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

&pm4125_ss_in {
remote-endpoint = <&usb_qmpphy_out>;
&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;
};

&qaif_cpu {
Expand Down Expand Up @@ -524,6 +523,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 @@ -765,11 +809,24 @@
};

&usb_1 {
dr_mode = "otg";
dr_mode = "peripheral";

status = "okay";
};

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

&usb_1 {
/delete-property/ dr_mode;
};

&usb_1_dwc3_hs {
remote-endpoint = <&pm4125_hs_in>;
};
Expand All @@ -782,9 +839,20 @@
status = "okay";
};

&usb_qmpphy {
vdda-phy-supply = <&pm4125_l8>;
&usb_2 {
/delete-property/ dr_mode;

port {
usb_2_dwc3_hs: endpoint {
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";
};
Expand All @@ -804,6 +872,13 @@
remote-endpoint = <&pm4125_ss_in>;
};

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

status = "okay";
};

&vamacro {
pinctrl-0 = <&dmic01_default>, <&dmic23_default>, <&swr_tx_clk>, <&swr_tx_data0>;
pinctrl-names = "default";
Expand Down
17 changes: 12 additions & 5 deletions arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@
status = "okay";
};

&pm4125_tz {
status = "okay";
};

&pm4125_typec {
status = "okay";

Expand All @@ -143,32 +147,35 @@
typec-power-opmode = "default";
pd-disable;

vbus-supply = <&pm4125_vbus>;

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

port@0 {
reg = <0>;

pm4125_hs_in: endpoint {
};
};

port@1 {
reg = <1>;

pm4125_ss_in: endpoint {
};
};
};
};
};

&pm4125_tz {
status = "okay";
};

&pm4125_vbus {
regulator-min-microvolt = <4250000>;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-min-microamp = <500000>;
regulator-max-microamp = <500000>;

status = "okay";
};

Expand Down
Loading
Loading