mb/google/trulo/var/kaladin: Disable ISH via firmware config
Kelsier shares the same firmware with Kaladin so coreboot loads the same loader firmware to ISH. Since Kelsier is a sensor-less design, change it to load lite_ish.bin and disable ISH related GPIOs depending on firmware config. BUG=b:441613379 TEST=flash and boot to DUT, check suspend function works normally on kelsier Change-Id: I04c77db813fcd993217b5c366872cc583e265939 Signed-off-by: Eren Peng <peng.eren@inventec.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/89067 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Derek Huang <derekhuang@google.com>
This commit is contained in:
parent
f8574f7145
commit
2c03fd06a9
2 changed files with 56 additions and 1 deletions
|
|
@ -1,4 +1,8 @@
|
|||
fw_config
|
||||
field TABLET_MODE 0 0
|
||||
option TABLET_MODE_ABSENT 0
|
||||
option TABLET_MODE_PRESENT 1
|
||||
end
|
||||
field THERMAL_SOLUTION 1 1
|
||||
option THERMAL_SOLUTION_6W 0
|
||||
option THERMAL_SOLUTION_15W 1
|
||||
|
|
@ -535,7 +539,16 @@ chip soc/intel/alderlake
|
|||
chip drivers/intel/ish
|
||||
register "firmware_name" = ""kaladin_ish.bin""
|
||||
register "add_acpi_dma_property" = "true"
|
||||
device generic 0 on end
|
||||
device generic 0 on
|
||||
probe TABLET_MODE TABLET_MODE_PRESENT
|
||||
end
|
||||
end
|
||||
chip drivers/intel/ish
|
||||
register "firmware_name" = ""lite_ish.bin""
|
||||
register "add_acpi_dma_property" = "true"
|
||||
device generic 0 on
|
||||
probe TABLET_MODE TABLET_MODE_ABSENT
|
||||
end
|
||||
end
|
||||
end
|
||||
device ref ufs on
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#include <baseboard/gpio.h>
|
||||
#include <baseboard/variants.h>
|
||||
#include <console/console.h>
|
||||
#include <fw_config.h>
|
||||
#include <sar.h>
|
||||
|
||||
|
|
@ -7,3 +10,42 @@ const char *get_wifi_sar_cbfs_filename(void)
|
|||
{
|
||||
return get_wifi_sar_fw_config_filename(FW_CONFIG_FIELD(WIFI_SAR));
|
||||
}
|
||||
|
||||
static const struct pad_config ish_disable_pads[] = {
|
||||
/* B3 : ISH_IMU_INT_L ==>NC */
|
||||
PAD_NC(GPP_B3, NONE),
|
||||
/* B4 : ISH_ACC_INT_L ==>NC */
|
||||
PAD_NC(GPP_B4, NONE),
|
||||
/* B5 : GPP_B5 ==> NC */
|
||||
PAD_NC(GPP_B5, NONE),
|
||||
/* B6 : GPP_B6 ==> NC */
|
||||
PAD_NC(GPP_B6, NONE),
|
||||
/* D1 : ISH_GP1 ==> NC */
|
||||
PAD_NC(GPP_D1, NONE),
|
||||
/* D13 : UART0_ISH_RXD ==> NC */
|
||||
PAD_NC(GPP_D13, NONE),
|
||||
/* D14 : UART0_ISH_TXD ==> NC */
|
||||
PAD_NC(GPP_D14, NONE),
|
||||
};
|
||||
|
||||
void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
|
||||
{
|
||||
if (fw_config_probe(FW_CONFIG(TABLET_MODE, TABLET_MODE_ABSENT))) {
|
||||
printk(BIOS_INFO, "Disable ISH GPIO pins.\n");
|
||||
gpio_padbased_override(padbased_table, ish_disable_pads, ARRAY_SIZE(ish_disable_pads));
|
||||
}
|
||||
}
|
||||
|
||||
void variant_configure_pads(void)
|
||||
{
|
||||
const struct pad_config *base_pads;
|
||||
struct pad_config *padbased_table;
|
||||
size_t base_num;
|
||||
|
||||
padbased_table = new_padbased_table();
|
||||
base_pads = variant_gpio_table(&base_num);
|
||||
gpio_padbased_override(padbased_table, base_pads, base_num);
|
||||
fw_config_gpio_padbased_override(padbased_table);
|
||||
gpio_configure_pads_with_padbased(padbased_table);
|
||||
free(padbased_table);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue