summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/brya/Kconfig.name2
-rw-r--r--src/mainboard/google/brya/variants/brya0/fw_config.c10
-rw-r--r--src/mainboard/google/brya/variants/brya0/overridetree.cb11
-rw-r--r--src/mainboard/google/brya/variants/skolas/fw_config.c10
-rw-r--r--src/mainboard/google/brya/variants/skolas/overridetree.cb10
5 files changed, 41 insertions, 2 deletions
diff --git a/src/mainboard/google/brya/Kconfig.name b/src/mainboard/google/brya/Kconfig.name
index 8d1600bbe2..f0accf1e35 100644
--- a/src/mainboard/google/brya/Kconfig.name
+++ b/src/mainboard/google/brya/Kconfig.name
@@ -59,6 +59,7 @@ config BOARD_GOOGLE_BRYA0
select SOC_INTEL_COMMON_BLOCK_IPU
select SOC_INTEL_CRASHLOG
select SOC_INTEL_RAPTORLAKE
+ select DRIVERS_GENERIC_NAU8315
config BOARD_GOOGLE_CRAASK
bool "-> Craask"
@@ -320,6 +321,7 @@ config BOARD_GOOGLE_SKOLAS
select INTEL_GMA_HAVE_VBT
select SOC_INTEL_COMMON_BLOCK_IPU
select SOC_INTEL_RAPTORLAKE
+ select DRIVERS_GENERIC_NAU8315
config BOARD_GOOGLE_SKOLAS4ES
bool "-> Skolas4ES"
diff --git a/src/mainboard/google/brya/variants/brya0/fw_config.c b/src/mainboard/google/brya/variants/brya0/fw_config.c
index c2b963fe22..9ff34818b1 100644
--- a/src/mainboard/google/brya/variants/brya0/fw_config.c
+++ b/src/mainboard/google/brya/variants/brya0/fw_config.c
@@ -39,6 +39,10 @@ static const struct pad_config max98360_enable_pads[] = {
PAD_NC(GPP_R7, NONE),
};
+static const struct pad_config nau8318_enable_pads[] = {
+ PAD_CFG_GPO(GPP_R7, 0, DEEP), /* SPK_BEEP_EN */
+};
+
static const struct pad_config sndw_disable_pads[] = {
PAD_NC(GPP_S0, NONE),
PAD_NC(GPP_S1, NONE),
@@ -140,12 +144,16 @@ static void fw_config_handle(void *unused)
enable_i2s();
}
- if (fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_I2S))) {
+ if (fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_I2S)) ||
+ fw_config_probe(FW_CONFIG(AUDIO, NAU8318_NAU88L25B_I2S))) {
printk(BIOS_INFO, "Configure audio over I2S with MAX98360 ALC5682I.\n");
gpio_configure_pads(max98360_enable_pads, ARRAY_SIZE(max98360_enable_pads));
printk(BIOS_INFO, "BT offload enabled\n");
gpio_configure_pads(i2s0_enable_pads, ARRAY_SIZE(i2s0_enable_pads));
gpio_configure_pads(bt_i2s_enable_pads, ARRAY_SIZE(bt_i2s_enable_pads));
+
+ if (fw_config_probe(FW_CONFIG(AUDIO, NAU8318_NAU88L25B_I2S)))
+ gpio_configure_pads(nau8318_enable_pads, ARRAY_SIZE(nau8318_enable_pads));
}
}
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);
diff --git a/src/mainboard/google/brya/variants/brya0/overridetree.cb b/src/mainboard/google/brya/variants/brya0/overridetree.cb
index 1884269ad9..20d43ca9a5 100644
--- a/src/mainboard/google/brya/variants/brya0/overridetree.cb
+++ b/src/mainboard/google/brya/variants/brya0/overridetree.cb
@@ -18,6 +18,8 @@ fw_config
option MAX98373_NAU88L25B_I2S 3
option ALC1019_NAU88L25B_I2S 4
option MAX98360_ALC5682I_I2S 5
+ option NAU8318_NAU88L25B_I2S 6
+
end
field DB_LTE 11 12
option LTE_ABSENT 0
@@ -521,6 +523,7 @@ chip soc/intel/alderlake
register "jack_eject_debounce" = "7" # 512ms
device i2c 1a on
probe AUDIO ALC1019_NAU88L25B_I2S
+ probe AUDIO NAU8318_NAU88L25B_I2S
end
end
chip drivers/generic/alc1015
@@ -966,6 +969,14 @@ chip soc/intel/alderlake
end
end
end
+
+ chip drivers/generic/nau8315
+ register "hid" = "NAU8318"
+ register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A11)"
+ device generic 0 on
+ probe AUDIO NAU8318_NAU88L25B_I2S
+ end
+ end
end
device ref gspi1 on
chip drivers/spi/acpi
diff --git a/src/mainboard/google/brya/variants/skolas/fw_config.c b/src/mainboard/google/brya/variants/skolas/fw_config.c
index c2b963fe22..9ff34818b1 100644
--- a/src/mainboard/google/brya/variants/skolas/fw_config.c
+++ b/src/mainboard/google/brya/variants/skolas/fw_config.c
@@ -39,6 +39,10 @@ static const struct pad_config max98360_enable_pads[] = {
PAD_NC(GPP_R7, NONE),
};
+static const struct pad_config nau8318_enable_pads[] = {
+ PAD_CFG_GPO(GPP_R7, 0, DEEP), /* SPK_BEEP_EN */
+};
+
static const struct pad_config sndw_disable_pads[] = {
PAD_NC(GPP_S0, NONE),
PAD_NC(GPP_S1, NONE),
@@ -140,12 +144,16 @@ static void fw_config_handle(void *unused)
enable_i2s();
}
- if (fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_I2S))) {
+ if (fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_I2S)) ||
+ fw_config_probe(FW_CONFIG(AUDIO, NAU8318_NAU88L25B_I2S))) {
printk(BIOS_INFO, "Configure audio over I2S with MAX98360 ALC5682I.\n");
gpio_configure_pads(max98360_enable_pads, ARRAY_SIZE(max98360_enable_pads));
printk(BIOS_INFO, "BT offload enabled\n");
gpio_configure_pads(i2s0_enable_pads, ARRAY_SIZE(i2s0_enable_pads));
gpio_configure_pads(bt_i2s_enable_pads, ARRAY_SIZE(bt_i2s_enable_pads));
+
+ if (fw_config_probe(FW_CONFIG(AUDIO, NAU8318_NAU88L25B_I2S)))
+ gpio_configure_pads(nau8318_enable_pads, ARRAY_SIZE(nau8318_enable_pads));
}
}
BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);
diff --git a/src/mainboard/google/brya/variants/skolas/overridetree.cb b/src/mainboard/google/brya/variants/skolas/overridetree.cb
index 0f6cb866fa..70b00058a5 100644
--- a/src/mainboard/google/brya/variants/skolas/overridetree.cb
+++ b/src/mainboard/google/brya/variants/skolas/overridetree.cb
@@ -18,6 +18,7 @@ fw_config
option MAX98373_NAU88L25B_I2S 3
option ALC1019_NAU88L25B_I2S 4
option MAX98360_ALC5682I_I2S 5
+ option NAU8318_NAU88L25B_I2S 6
end
field DB_LTE 11 12
option LTE_ABSENT 0
@@ -521,6 +522,7 @@ chip soc/intel/alderlake
register "jack_eject_debounce" = "7" # 512ms
device i2c 1a on
probe AUDIO ALC1019_NAU88L25B_I2S
+ probe AUDIO NAU8318_NAU88L25B_I2S
end
end
chip drivers/generic/alc1015
@@ -966,6 +968,14 @@ chip soc/intel/alderlake
end
end
end
+
+ chip drivers/generic/nau8315
+ register "hid" = "NAU8318"
+ register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A11)"
+ device generic 0 on
+ probe AUDIO NAU8318_NAU88L25B_I2S
+ end
+ end
end
device ref gspi1 on
chip drivers/spi/acpi