Skip to content

Commit 0e28f94

Browse files
LeoCX-Tsaiamstan
authored andcommitted
fwk: dogwood: WA provide the 3A power to device when PSU force on
Some devices didn't follow the PD mismatch bit flow chart Add a workaround, when BIOS is set up FORCE_PSU_ON PD will unconditionally provide 3A to the device. BRANCH=fwk-dogwood-27111 BUG=https://app.clickup.com/t/86ev2xjqm TEST=Enable Force psu on option at BIOS setup menu, plug-in 1.5A device check PD will provide 3A PDO to the device, into S0ix, check 3A still keep. Signed-off-by: LeoCX_Tsai <LeoCX_Tsai@compal.com>
1 parent 63ba020 commit 0e28f94

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

zephyr/program/framework/dogwood/src/power_sequence.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ bool power_5vsb_exit(void)
487487

488488
/**
489489
* Call cypd event CCG_EVT_RDO_MISMATCH to check if we can provide more
490-
* power for RDO mismatch device.
490+
* power for RDO mismatch device or when psu power force on.
491491
*/
492492
task_set_event(TASK_ID_CYPD, CCG_EVT_RDO_MISMATCH);
493493

@@ -1024,7 +1024,8 @@ __override int chipset_in_low_power_mode(void)
10241024
__override bool cypd_allow_increase_rdo_profile(void)
10251025
{
10261026
/* Only allow the PD chips to increase the current when the PSU is on */
1027-
if (gpio_pin_get_dt(GPIO_DT_FROM_NODELABEL(gpio_pok_l)) == 1)
1027+
if (gpio_pin_get_dt(GPIO_DT_FROM_NODELABEL(gpio_pok_l)) == 1 ||
1028+
get_force_enable_psu())
10281029
return true;
10291030
else
10301031
return false;

zephyr/program/framework/src/cypress_pd_common.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,8 +1718,13 @@ void cypd_port_int(int controller, int port)
17181718
i2c_read_offset16_block(i2c_port, addr_flags,
17191719
CCG_READ_DATA_MEMORY_REG(port, 0), data2, MIN(response_len, 32));
17201720

1721-
if (data2[0] & BIT(1)) {
1722-
CPRINTS("RDO Mismatch, may provide more power for this device");
1721+
if (data2[0] & BIT(1) || get_force_enable_psu()) {
1722+
if (get_force_enable_psu())
1723+
CPRINTS("Force PSU enable, "
1724+
"may provide more power for this device");
1725+
else
1726+
CPRINTS("RDO Mismatch, "
1727+
"may provide more power for this device");
17231728
pd_port_states[pd_port].rdo_mismatch = true;
17241729
task_set_event(TASK_ID_CYPD, CCG_EVT_RDO_MISMATCH);
17251730
}

0 commit comments

Comments
 (0)