mb/google/nissa/var/nivviks: Disable MIPI WFC based on fw_config

BUG=b:218929856
TEST=Boot to OS on nivviks. Change fw_config in CBI and check that WFC
is enabled/disabled as expected.

Change-Id: Iac4bb358d904579376e0810f8c2644b3bde4f1e6
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64208
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
This commit is contained in:
Reka Norman 2022-05-06 20:04:54 +10:00 committed by Werner Zeh
parent 49df3cff0d
commit f1b8cee5f3
2 changed files with 39 additions and 8 deletions

View File

@ -27,6 +27,21 @@ static const struct pad_config sd_disable_pads[] = {
PAD_NC(GPP_H13, NONE),
};
static const struct pad_config wfc_disable_pads[] = {
/* D3 : WCAM_RST_L */
PAD_NC(GPP_D3, NONE),
/* D15 : EN_PP2800_WCAM_X */
PAD_NC(GPP_D15, NONE),
/* D16 : EN_PP1800_PP1200_WCAM_X */
PAD_NC(GPP_D16, NONE),
/* H22 : WCAM_MCLK_R */
PAD_NC(GPP_H22, NONE),
/* R6 : DMIC_WCAM_CLK_R */
PAD_NC(GPP_R6, NONE),
/* R7 : DMIC_WCAM_DATA */
PAD_NC(GPP_R7, NONE),
};
static void fw_config_handle(void *unused)
{
if (!fw_config_probe(FW_CONFIG(DB_USB, DB_1C_LTE))) {
@ -38,5 +53,10 @@ static void fw_config_handle(void *unused)
printk(BIOS_INFO, "Disable SD card GPIO pins.\n");
gpio_configure_pads(sd_disable_pads, ARRAY_SIZE(sd_disable_pads));
}
if (fw_config_probe(FW_CONFIG(WFC, WFC_ABSENT))) {
printk(BIOS_INFO, "Disable MIPI WFC GPIO pins.\n");
gpio_configure_pads(wfc_disable_pads, ARRAY_SIZE(wfc_disable_pads));
}
}
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);

View File

@ -1,12 +1,16 @@
fw_config
field DB_USB 0 1
option DB_NONE 0
option DB_1C_1A 1
option DB_1C_LTE 2
option DB_NONE 0
option DB_1C_1A 1
option DB_1C_LTE 2
end
field SD_CARD 4
option SD_GL9750S 0
option SD_ABSENT 1
option SD_GL9750S 0
option SD_ABSENT 1
end
field WFC 5
option WFC_MIPI_OVTI5675 0
option WFC_ABSENT 1
end
end
@ -40,6 +44,7 @@ chip soc/intel/alderlake
register "cio2_prt[0]" = "1"
device generic 0 on end
end
probe WFC WFC_MIPI_OVTI5675
end
device ref i2c1 on
chip drivers/i2c/hid
@ -163,7 +168,9 @@ chip soc/intel/alderlake
register "off_seq.ops[2]" = "SEQ_OPS_GPIO_DISABLE(1, 0)"
register "off_seq.ops[3]" = "SEQ_OPS_GPIO_DISABLE(0, 0)"
device i2c 36 on end
device i2c 36 on
probe WFC WFC_MIPI_OVTI5675
end
end
chip drivers/intel/mipi_camera
register "acpi_uid" = "3"
@ -174,7 +181,9 @@ chip soc/intel/alderlake
register "pr0" = ""\\_SB.PCI0.I2C2.CAM0.PRIC""
register "vcm_compat" = ""dongwoon,dw9714""
device i2c 0C on end
device i2c 0C on
probe WFC WFC_MIPI_OVTI5675
end
end
chip drivers/intel/mipi_camera
register "acpi_hid" = "ACPI_DT_NAMESPACE_HID"
@ -191,7 +200,9 @@ chip soc/intel/alderlake
register "nvm_width" = "0x10"
register "nvm_compat" = ""atmel,24c08""
device i2c 50 on end
device i2c 50 on
probe WFC WFC_MIPI_OVTI5675
end
end
end
device ref i2c3 on