mb/google/nissa/var/sundance: Add FW_CONFIG probe for WWAN devices
Add FW_CONFIG probe based on sundance boxster of below devices: WWAN Schematic version: NEC_SHIKIBU_ADL_N_MB_EVT_20240330 BUG=b:332978681 TEST=Boot to OS and verify the WWAN devices is set based on fw_config. Change-Id: I14339201d8ee21c85fefa96a49323e0c25cb8eca Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83041 Reviewed-by: Eric Lai <ericllai@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
74472453ed
commit
fdeebb7558
@ -3,4 +3,5 @@ bootblock-y += gpio.c
|
|||||||
|
|
||||||
romstage-y += gpio.c
|
romstage-y += gpio.c
|
||||||
|
|
||||||
|
ramstage-$(CONFIG_FW_CONFIG) += fw_config.c
|
||||||
ramstage-y += gpio.c
|
ramstage-y += gpio.c
|
||||||
|
36
src/mainboard/google/brya/variants/sundance/fw_config.c
Normal file
36
src/mainboard/google/brya/variants/sundance/fw_config.c
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
|
||||||
|
#include <baseboard/gpio.h>
|
||||||
|
#include <baseboard/variants.h>
|
||||||
|
#include <console/console.h>
|
||||||
|
#include <fw_config.h>
|
||||||
|
|
||||||
|
static const struct pad_config wwan_disable_pads[] = {
|
||||||
|
/* A8 : WWAN_RF_DISABLE_ODL */
|
||||||
|
PAD_NC(GPP_A8, NONE),
|
||||||
|
/* A12 : WWAN_PCIE_WAKE_ODL */
|
||||||
|
PAD_NC(GPP_A12, NONE),
|
||||||
|
/* D5 : SRCCLKREQ0# ==> WWAN_CLKREQ_ODL */
|
||||||
|
PAD_NC(GPP_D5, NONE),
|
||||||
|
/* D6 : WWAN_EN */
|
||||||
|
PAD_NC(GPP_D6, NONE),
|
||||||
|
/* D15 : EN_PP2800_WCAM_X ==> WWAN_SAR_DETECT_2_ODL */
|
||||||
|
PAD_NC(GPP_D15, NONE),
|
||||||
|
/* F12 : WWAN_RST_L */
|
||||||
|
PAD_NC_LOCK(GPP_F12, NONE, LOCK_CONFIG),
|
||||||
|
/* H19 : SOC_I2C_SUB_INT_ODL */
|
||||||
|
PAD_NC(GPP_H19, NONE),
|
||||||
|
/* H21 : WCAM_MCLK_R ==> WWAN_PERST_L */
|
||||||
|
PAD_NC_LOCK(GPP_H21, NONE, LOCK_CONFIG),
|
||||||
|
/* H23 : WWAN_SAR_DETECT_ODL */
|
||||||
|
PAD_NC(GPP_H23, NONE),
|
||||||
|
};
|
||||||
|
|
||||||
|
void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
|
||||||
|
{
|
||||||
|
if (fw_config_probe(FW_CONFIG(WWAN, LTE_ABSENT))) {
|
||||||
|
printk(BIOS_INFO, "Disable WWAN-related GPIO pins.\n");
|
||||||
|
gpio_padbased_override(padbased_table, wwan_disable_pads,
|
||||||
|
ARRAY_SIZE(wwan_disable_pads));
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,10 @@
|
|||||||
|
fw_config
|
||||||
|
field WWAN 3 4
|
||||||
|
option LTE_ABSENT 0
|
||||||
|
option LTE_PRESENT 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
chip soc/intel/alderlake
|
chip soc/intel/alderlake
|
||||||
# Acoustic settings
|
# Acoustic settings
|
||||||
register "acoustic_noise_mitigation" = "1"
|
register "acoustic_noise_mitigation" = "1"
|
||||||
@ -275,7 +282,9 @@ chip soc/intel/alderlake
|
|||||||
chip drivers/usb/acpi
|
chip drivers/usb/acpi
|
||||||
register "desc" = ""USB2 WWAN""
|
register "desc" = ""USB2 WWAN""
|
||||||
register "type" = "UPC_TYPE_INTERNAL"
|
register "type" = "UPC_TYPE_INTERNAL"
|
||||||
device ref usb2_port5 on end
|
device ref usb2_port5 on
|
||||||
|
probe WWAN LTE_PRESENT
|
||||||
|
end
|
||||||
end
|
end
|
||||||
chip drivers/usb/acpi
|
chip drivers/usb/acpi
|
||||||
register "desc" = ""USB2 UFC""
|
register "desc" = ""USB2 UFC""
|
||||||
@ -304,7 +313,9 @@ chip soc/intel/alderlake
|
|||||||
chip drivers/usb/acpi
|
chip drivers/usb/acpi
|
||||||
register "desc" = ""USB3 WWAN""
|
register "desc" = ""USB3 WWAN""
|
||||||
register "type" = "UPC_TYPE_INTERNAL"
|
register "type" = "UPC_TYPE_INTERNAL"
|
||||||
device ref usb3_port3 on end
|
device ref usb3_port3 on
|
||||||
|
probe WWAN LTE_PRESENT
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user