Skip to content

Commit 1936bf7

Browse files
JohnWC-Yehamstan
authored andcommitted
fwk: Change GN22 gpio2 EEPROM pin config to output
Add GPIO_FUNC_GPU_PWR_LEVEL function. First just change the EEPROM GPIO configuration so that it will be correctly overwritten during manufacturing. Then in the next change we can change the EC logic to behave as required by nvidia: Output to the GPU if AC-to-battery power change event or a system power overdraw event. BRANCH=fwk-tulip-29169 BUG=GPU_2A2_GPIO2_EC should be an output pin for EC, required by GN22 TEST=1.gpucfg erase 2.gpucfg write nvgpu "serial number" 3.reboot the EC 4.gpucfg and check GPIO02=1 in G3/S5 Signed-off-by: johnwc_yeh <JohnWC_Yeh@compal.com>
1 parent aa2906e commit 1936bf7

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

zephyr/program/framework/include/lotus/gpu_configuration.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ enum gpu_gpio_purpose {
127127
GPIO_FUNC_VADP_EN,
128128
GPIO_FUNC_GPU_PWR,
129129
GPIO_FUNC_IS_THROTTLING,
130+
GPIO_FUNC_GPU_PWR_LEVEL,
130131
GPIO_FUNC_MAX,
131132
};
132133

zephyr/program/framework/lotus/src/gpu_configuration.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,9 @@ static struct default_gpu_cfg nv_gpu_cfg = {
278278
.gpio0 = {.gpio = GPU_1G1_GPIO0_EC, .function = GPIO_FUNC_TEMPFAULT, .flags = GPIO_INPUT, .power_domain = POWER_S3},
279279
/* DP HPD status from PD */
280280
.gpio1 = {.gpio = GPU_1H1_GPIO1_EC, .function = GPIO_FUNC_HPD, .flags = GPIO_INPUT, .power_domain = POWER_S5},
281-
/* output from the GPU if it is throttling */
282-
.gpio2 = {.gpio = GPU_2A2_GPIO2_EC, .function = GPIO_FUNC_IS_THROTTLING, .flags = GPIO_INPUT, .power_domain = POWER_S0},
281+
/* output to the GPU if AC-to-battery power change event or a system power overdraw event */
282+
.gpio2 = {.gpio = GPU_2A2_GPIO2_EC, .function = GPIO_FUNC_GPU_PWR_LEVEL,
283+
.flags = GPIO_OUTPUT_HIGH, .power_domain = POWER_G3},
283284
/* DDS Mux CTRL from dGPU */
284285
.gpio3 = {.gpio = GPU_2L7_GPIO3_EC, .function = GPIO_FUNC_UNUSED, .flags = GPIO_INPUT, .power_domain = POWER_S0},
285286
/* GPU_VSYS_EN */
@@ -513,6 +514,8 @@ const char * gpu_gpio_fn_to_name(enum gpu_gpio_purpose p)
513514
return "GPUPWR";
514515
case GPIO_FUNC_IS_THROTTLING:
515516
return "THROTTLING";
517+
case GPIO_FUNC_GPU_PWR_LEVEL:
518+
return "GPU_PWR_LEVEL";
516519
default:
517520
return "UNKNOWN IDX";
518521
}

0 commit comments

Comments
 (0)