blob: 21509f3824ddb22cac414aa5cbc415a38592195b [file] [log] [blame] [edit]
// SPDX-License-Identifier: GPL-2.0-only
/*
* MAX777*9 TCPC node
*
* Copyright 2023 Google LLC
*
*/
max77759tcpc: max77759tcpc@25 {
status = "okay";
compatible = "max77759tcpc";
reg = <0x25>;
pinctrl-names = "default";
pinctrl-0 = <&usb_pd_irq &gpa7_5>;
interrupt-parent = <&gpa8>;
usbpd,usbpd_int = <&gpa8 3 GPIO_ACTIVE_LOW>;
usb-psy-name = "usb";
/* Enable when BMS is up */
chg-psy-name = "gcpm";
in-switch-gpio = <&max777x9_gpio 5 GPIO_ACTIVE_LOW>;
conn = <&conn>;
orientation-switch;
mode-switch;
svid = <0xff01>;
pullup-supply = <&m_ldo19_reg>;
conn: connector {
compatible = "usb-c-connector";
label = "USB-C";
data-role = "dual";
power-role = "dual";
try-power-role = "sink";
self-powered;
op-sink-microwatt = <2600000>;
new-source-frs-typec-current = <FRS_5V_1P5A>;
usb-role-switch;
slow-charger-loop;
/*
* b/174044466: Extboost can only do ~1A.
* However, max77759 operating in reverse boost
* mode (0xA) can do till 1.5A.
* Since extboost is the primary path, set this
* to 900mA.
*/
source-pdos = <PDO_FIXED(5000, 900,
PDO_FIXED_SUSPEND |
PDO_FIXED_USB_COMM |
PDO_FIXED_DATA_SWAP |
PDO_FIXED_DUAL_ROLE)>;
sink-pdos = <PDO_FIXED(5000, 3000,
PDO_FIXED_DATA_SWAP |
PDO_FIXED_USB_COMM |
PDO_FIXED_HIGHER_CAP |
PDO_FIXED_DUAL_ROLE)
PDO_FIXED(9000, 2200, 0)
PDO_PPS_APDO(5000, 11000, 3000)>;
sink-vdos = <VDO_IDH(/* usbh */ 1, /* usbd */ 1, IDH_PTYPE_PERIPH,
/* is_modal */ 0, IDH_PTYPE_DFP_HOST, /* conn */ 2,
0x18D1)
VDO_CERT(0x0)
VDO_PRODUCT(0x4EE1, 0x0)
VDO_UFP(UFP_VDO_VER1_2, DEV_USB2_CAPABLE | DEV_USB3_CAPABLE,
UFP_RECEPTACLE, /* rsvd */ 0, AMA_VCONN_NOT_REQ,
/* rsvd */ 0, UFP_ALTMODE_NOT_SUPP, UFP_USB32_GEN1)
/* padding */ 0
VDO_DFP(DFP_VDO_VER1_1, HOST_USB2_CAPABLE | HOST_USB3_CAPABLE,
DFP_RECEPTACLE, /* pnum */ 0)>;
sink-vdos-v1 = <VDO_IDH(/* usbh */ 1, /* usbd */ 1, IDH_PTYPE_PERIPH,
/* is_modal */ 0, /* rsvd */ 0, /* rsvd */ 0,
0x18D1)
VDO_CERT(0x0)
VDO_PRODUCT(0x4EE1, 0x0)>;
altmodes {
displayport {
svid = <0xff01>;
vdo = <0x1cc6>;
};
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
mux_notification_source_1: endpoint {
remote-endpoint = <&mux_notification_sink_1>;
};
};
port@1 {
reg = <1>;
mode_notification_source_2: endpoint {
remote-endpoint = <&mode_notification_sink_2>;
};
};
};
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
mux_notification_sink_1: endpoint {
remote-endpoint = <&mux_notification_source_1>;
};
};
port@1 {
reg = <1>;
mode_notification_sink_2: endpoint {
remote-endpoint = <&mode_notification_source_2>;
};
};
};
/* EXT_BST_EN exposed as GPIO */
max77759_tcpc_gpio: max77759_tcpc_gpio {
gpio-controller;
#gpio-cells = <2>;
ngpios = <1>;
};
};