mb/google/nissa/var/uldren: Add fw_config probe for lte
Use fw_config to probe lte.
BUG=b:283199751
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot chromeos-bootimage
Change-Id: I5596f3536b0a21453f89e67615acabbbf6a8409b
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75337
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/mainboard/google/brya/variants/uldren/overridetree.cb b/src/mainboard/google/brya/variants/uldren/overridetree.cb
index 4f3dfe2..8b5e098 100644
--- a/src/mainboard/google/brya/variants/uldren/overridetree.cb
+++ b/src/mainboard/google/brya/variants/uldren/overridetree.cb
@@ -1,4 +1,8 @@
fw_config
+ field DB_LTE 1 1
+ option LTE_ABSENT 0
+ option LTE_PRESENT 1
+ end
field TOUCHPAD 8 9
option TOUCHPAD_UNKNOWN 0
option TOUCHPAD_EKT3744 1
@@ -377,7 +381,9 @@
chip drivers/usb/acpi
register "desc" = ""USB2 WWAN""
register "type" = "UPC_TYPE_INTERNAL"
- device ref usb2_port4 on end
+ device ref usb2_port4 on
+ probe DB_LTE LTE_PRESENT
+ end
end
chip drivers/usb/acpi
register "desc" = ""USB2 User Facing Camera""
@@ -405,7 +411,9 @@
chip drivers/usb/acpi
register "desc" = ""USB3 WWAN""
register "type" = "UPC_TYPE_INTERNAL"
- device ref usb3_port2 on end
+ device ref usb3_port2 on
+ probe DB_LTE LTE_PRESENT
+ end
end
end
end
diff --git a/src/mainboard/google/brya/variants/uldren/variant.c b/src/mainboard/google/brya/variants/uldren/variant.c
index d9a6565..f5b0609 100644
--- a/src/mainboard/google/brya/variants/uldren/variant.c
+++ b/src/mainboard/google/brya/variants/uldren/variant.c
@@ -16,6 +16,15 @@
PAD_NC(GPP_H7, NONE),
};
+static const struct pad_config lte_disable_pads[] = {
+ /* A8 : WWAN_RF_DISABLE_ODL */
+ PAD_NC(GPP_A8, NONE),
+ /* D6 : SRCCLKREQ1# ==> WWAN_EN */
+ PAD_NC(GPP_D6, NONE),
+ /* F12 : WWAN_RST_L */
+ PAD_NC_LOCK(GPP_F12, NONE, LOCK_CONFIG),
+};
+
const char *get_wifi_sar_cbfs_filename(void)
{
return "wifi_sar_0.hex";
@@ -28,4 +37,9 @@
gpio_padbased_override(padbased_table, touchscreen_disable_pads,
ARRAY_SIZE(touchscreen_disable_pads));
}
+ if (fw_config_probe(FW_CONFIG(DB_LTE, LTE_ABSENT))) {
+ printk(BIOS_INFO, "Disable LTE GPIO pins.\n");
+ gpio_padbased_override(padbased_table, lte_disable_pads,
+ ARRAY_SIZE(lte_disable_pads));
+ }
}