Skip to content

Commit d69bbca

Browse files
LeoCX-Tsaiamstan
authored andcommitted
fwk: dogwood: Repurpose "APU_EC_INT" to be a 4th RAM ID bit
We're running out of RAM ID pins going to the AP. This is a problem because we need a little more RAM options than expected (eg: multi-sourcing). Since we can't really change the board anymore to add more bits, we need another method. Luckly the APU_EC_INT signal going between the EC->AP is unused (despite its name). It was originally added for some HID interrupts. We never needed that. This signal is also not to be confused with the normal EC->AP interrupt method that happens inband over eSPI, The proposal is for the AP to use this APU_EC_INT as a 4th RAM ID bit. How will the EC know when to assert this? We'll use the EC board ID (toggling between 9 and 10) to disambiguate between the 2 states for this 4th RAM_ID bit. NOTE: otherwise board_id 9 and 10 are exactly the same as far as the EC is concerned. BRANCH=fwk-dogwood-27111 BUG=https://app.clickup.com/t/86euhhg7k See https://docs.google.com/presentation/d/1n1WNI4WoaVsPbWK_gPJw2rZpELAfXCdn for more details. TEST=on dogwood, when board version id = 10, APU_EC_INT will keep low.
1 parent 0476683 commit d69bbca

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

zephyr/program/framework/dogwood/gpio.dtsi

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/ {
77
aliases {
88
gpio-diagnostic-led4 = &gpio_led4_drv;
9+
gpio-mem-id3 = &gpio_mem_id3;
910
};
1011

1112
named-gpios {
@@ -54,10 +55,15 @@
5455
gpios = <&gpio2 7 GPIO_ODR_LOW>;
5556
};
5657
gpio_apu_ec_int2_l: apu_ec_int2_l {
57-
gpios = <&gpio1 5 GPIO_ODR_HIGH>; /* reserved for HID interrupt */
58-
};
59-
gpio_apu_ec_int_l: apu_ec_int_l {
60-
gpios = <&gpio1 4 GPIO_ODR_HIGH>; /* reserved for HID interrupt */
58+
/* originally reserved for HID interrupt */
59+
/* unused currently */
60+
gpios = <&gpio1 5 GPIO_ODR_HIGH>;
61+
};
62+
gpio_mem_id3: mem_id3 {
63+
/* On the schematic: APU_EC_INT#_Q */
64+
/* originally reserved for HID interrupt, never used for that */
65+
/* now used as a 4th RAM_ID bit */
66+
gpios = <&gpio1 4 GPIO_ODR_HIGH>;
6167
};
6268
gpio_argb_dir: argb_dir {
6369
gpios = <&gpio3 5 GPIO_OUTPUT_HIGH>; /* ARGB_DIR */

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,20 @@ static void power_select_power_signal(void)
991991
}
992992
DECLARE_HOOK(HOOK_INIT, power_select_power_signal, HOOK_PRIO_INIT_CHIPSET - 1);
993993

994+
static void apu_ram_select(void)
995+
{
996+
/* We needed an extra MEM_ID toward the APU. Since we can't
997+
* change the schematic, the only other way to do this is
998+
* for the EC to act like a proxy. */
999+
1000+
/* The EC will know the state of MEM_ID3 depending
1001+
* on the board version that the EC sees (9 vs 10) */
1002+
1003+
if (board_get_version() >= BOARD_VERSION_10)
1004+
gpio_pin_configure_dt(GPIO_DT_FROM_ALIAS(gpio_mem_id3), GPIO_ODR_LOW);
1005+
}
1006+
DECLARE_HOOK(HOOK_INIT, apu_ram_select, HOOK_PRIO_INIT_ADC + 1);
1007+
9941008
__override int chipset_in_low_power_mode(void)
9951009
{
9961010
volatile uint32_t *address;

0 commit comments

Comments
 (0)