Rob Barnes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43777 )
Change subject: mb/google/zork: Remove reset_gpio from bt when not supported ......................................................................
mb/google/zork: Remove reset_gpio from bt when not supported
Remove bluetooth reset_gpio when not supported on a specfic board variant.
BUG=b:157580724 TEST=Boot dalboz, observe log
Signed-off-by: Rob Barnes robbarnes@google.com Change-Id: I64f100645dcab947bb45dbf8e8617fbef16dcb8a --- M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c M src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h M src/mainboard/google/zork/variants/berknip/Makefile.inc A src/mainboard/google/zork/variants/berknip/variant.c M src/mainboard/google/zork/variants/dalboz/variant.c M src/mainboard/google/zork/variants/ezkinil/variant.c M src/mainboard/google/zork/variants/morphius/Makefile.inc A src/mainboard/google/zork/variants/morphius/variant.c M src/mainboard/google/zork/variants/trembyle/Makefile.inc A src/mainboard/google/zork/variants/trembyle/variant.c 11 files changed, 221 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/43777/1
diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c index 5568194..8557e6d 100644 --- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c +++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c @@ -1,9 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/variants.h> +#include <console/console.h> #include <delay.h> +#include <device/device.h> +#include <drivers/usb/acpi/chip.h> #include <gpio.h> #include <soc/gpio.h> +#include <soc/pci_devs.h> #include <soc/smi.h> #include <stdlib.h> #include <boardid.h> @@ -311,3 +315,45 @@ *size = ARRAY_SIZE(gpio_sleep_table); return gpio_sleep_table; } + +#if !DEVTREE_EARLY +static const struct device_path bt_dev_path[] = { + { + // BUS A + .type = DEVICE_PATH_PCI, + .pci.devfn = PCIE_GPP_A_DEVFN + }, + { + // XHCI0 + .type = DEVICE_PATH_PCI, + .pci.devfn = XHCI0_DEVFN + }, + { + // USB HUB + .type = DEVICE_PATH_USB, + .usb.port_type = 0, + .usb.port_id = 0 + }, + { + // USB Bluetooth Device + .type = DEVICE_PATH_USB, + .usb.port_type = 2, + .usb.port_id = 5 + } +}; + +/* Removes reset_gpio from bluetooth device in device tree */ +void baseboard_remove_bluetooth_reset_gpio(void) +{ + const struct device *bt_dev; + struct drivers_usb_acpi_config *bt_cfg; + + bt_dev = find_dev_nested_path(pci_root_bus(), bt_dev_path, ARRAY_SIZE(bt_dev_path)); + if (!bt_dev) { + printk(BIOS_ERR, "%s: Failed to find bluetooth device!", __func__); + return; + } + bt_cfg = config_of(bt_dev); + bt_cfg->reset_gpio.pin_count=0; +} +#endif /* !DEVTREE_EARLY */ \ No newline at end of file diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c index c10c9f4..5247935 100644 --- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c +++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c @@ -1,14 +1,19 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/variants.h> +#include <console/console.h> #include <delay.h> +#include <device/device.h> +#include <drivers/usb/acpi/chip.h> #include <gpio.h> #include <soc/gpio.h> +#include <soc/pci_devs.h> #include <soc/smi.h> #include <stdlib.h> #include <boardid.h> #include <variant/gpio.h>
+ static const struct soc_amd_gpio gpio_set_stage_ram[] = { /* PWR_BTN_L */ PAD_NF(GPIO_0, PWR_BTN_L, PULL_NONE), @@ -312,3 +317,78 @@ *size = ARRAY_SIZE(gpio_sleep_table); return gpio_sleep_table; } + +#if !DEVTREE_EARLY +static const struct device_path xhci0_bt_path[] = { + { + .type = DEVICE_PATH_PCI, + .pci.devfn = PCIE_GPP_A_DEVFN + }, + { + .type = DEVICE_PATH_PCI, + .pci.devfn = XHCI0_DEVFN + }, + { + .type = DEVICE_PATH_USB, + .usb.port_type = 0, + .usb.port_id = 0 + }, + { + .type = DEVICE_PATH_USB, + .usb.port_type = 2, + .usb.port_id = 5 + } +}; + +static const struct device_path xhci1_bt_path[] = { + { + .type = DEVICE_PATH_PCI, + .pci.devfn = PCIE_GPP_A_DEVFN + }, + { + .type = DEVICE_PATH_PCI, + .pci.devfn = XHCI1_DEVFN + }, + { + .type = DEVICE_PATH_USB, + .usb.port_type = 0, + .usb.port_id = 0 + }, + { + .type = DEVICE_PATH_USB, + .usb.port_type = 2, + .usb.port_id = 1 + } +}; + +/* + * Removes reset_gpio from bluetooth device in device tree. + * + * The bluetooth device may be on XHCI0 or XHCI1 depending on SOC. + * There's no harm in removing from both here. + */ +void baseboard_remove_bluetooth_reset_gpio(void) +{ + const struct device *xhci0_bt_dev, *xhci1_bt_dev; + struct drivers_usb_acpi_config *xhci0_bt_cfg, *xhci1_bt_cfg; + + xhci0_bt_dev = find_dev_nested_path(pci_root_bus(), xhci0_bt_path, ARRAY_SIZE(xhci0_bt_path)); + if (!xhci0_bt_dev) { + printk(BIOS_ERR, "%s: Failed to find bluetooth device on XHCI0!", __func__); + return; + } + xhci1_bt_dev = find_dev_nested_path(pci_root_bus(), xhci1_bt_path, ARRAY_SIZE(xhci1_bt_path)); + if (!xhci1_bt_dev) { + printk(BIOS_ERR, "%s: Failed to find bluetooth device on XHCI1!", __func__); + return; + } + + /* config_of dies on failure, so no NULL check on return */ + xhci0_bt_cfg = config_of(xhci0_bt_dev); + xhci1_bt_cfg = config_of(xhci1_bt_dev); + + xhci0_bt_cfg->reset_gpio.pin_count = 0; + xhci1_bt_cfg->reset_gpio.pin_count = 0; +} + +#endif /* !DEVTREE_EARLY */ \ No newline at end of file diff --git a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h index aa1a3c8..54327d4 100644 --- a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h @@ -67,4 +67,7 @@ /* Return true if variant has active low power enable fow WiFi. */ bool variant_has_active_low_wifi_power(void);
+/* Removes reset gpio from bluetooth device in device tree */ +void baseboard_remove_bluetooth_reset_gpio(void); + #endif /* __BASEBOARD_VARIANTS_H__ */ diff --git a/src/mainboard/google/zork/variants/berknip/Makefile.inc b/src/mainboard/google/zork/variants/berknip/Makefile.inc index 57e7136..51d19fe 100644 --- a/src/mainboard/google/zork/variants/berknip/Makefile.inc +++ b/src/mainboard/google/zork/variants/berknip/Makefile.inc @@ -3,3 +3,4 @@ subdirs-y += ./spd
ramstage-y += gpio.c +ramstage-y += variant.c diff --git a/src/mainboard/google/zork/variants/berknip/variant.c b/src/mainboard/google/zork/variants/berknip/variant.c new file mode 100644 index 0000000..f56e2c3 --- /dev/null +++ b/src/mainboard/google/zork/variants/berknip/variant.c @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/gpio.h> +#include <baseboard/variants.h> +#include <ec/google/chromeec/ec.h> + +static void update_bluetooth_configuration(void) +{ + uint32_t board_version; + + if (google_chromeec_cbi_get_board_version(&board_version)) + board_version = 1; + + if (board_version <= 1) { + baseboard_remove_bluetooth_reset_gpio(); + } +} + +void variant_devtree_update(void) +{ + update_bluetooth_configuration(); +} \ No newline at end of file diff --git a/src/mainboard/google/zork/variants/dalboz/variant.c b/src/mainboard/google/zork/variants/dalboz/variant.c index 0212161..1874aa0 100644 --- a/src/mainboard/google/zork/variants/dalboz/variant.c +++ b/src/mainboard/google/zork/variants/dalboz/variant.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/variants.h> +#include <baseboard/gpio.h> #include <console/console.h> #include <device/device.h> #include <drivers/i2c/generic/chip.h> @@ -104,6 +105,18 @@ cfg->remote_bus = 5; }
+static void update_bluetooth_configuration(void) +{ + uint32_t board_version; + + if (google_chromeec_cbi_get_board_version(&board_version)) + board_version = 1; + + if (board_version <= 1) { + baseboard_remove_bluetooth_reset_gpio(); + } +} + static int sku_has_emmc(void) { uint32_t board_sku = sku_id(); @@ -135,6 +148,7 @@ }
update_audio_configuration(); + update_bluetooth_configuration(); }
/* FIXME: Comments seem to suggest these are not entirely correct. */ diff --git a/src/mainboard/google/zork/variants/ezkinil/variant.c b/src/mainboard/google/zork/variants/ezkinil/variant.c index d7cf5a8..c10aa5c 100644 --- a/src/mainboard/google/zork/variants/ezkinil/variant.c +++ b/src/mainboard/google/zork/variants/ezkinil/variant.c @@ -23,6 +23,17 @@ return 0; }
+static void update_bluetooth_configuration(void) +{ + uint32_t board_version; + if (google_chromeec_cbi_get_board_version(&board_version)) + board_version = 1; + + if (board_version <= 1) { + baseboard_remove_bluetooth_reset_gpio(); + } +} + void variant_devtree_update(void) { struct soc_amd_picasso_config *cfg; @@ -31,4 +42,6 @@
if (!sku_has_emmc()) cfg->sd_emmc_config = SD_EMMC_DISABLE; + + update_bluetooth_configuration(); } diff --git a/src/mainboard/google/zork/variants/morphius/Makefile.inc b/src/mainboard/google/zork/variants/morphius/Makefile.inc index 57e7136..51d19fe 100644 --- a/src/mainboard/google/zork/variants/morphius/Makefile.inc +++ b/src/mainboard/google/zork/variants/morphius/Makefile.inc @@ -3,3 +3,4 @@ subdirs-y += ./spd
ramstage-y += gpio.c +ramstage-y += variant.c diff --git a/src/mainboard/google/zork/variants/morphius/variant.c b/src/mainboard/google/zork/variants/morphius/variant.c new file mode 100644 index 0000000..ccbace2 --- /dev/null +++ b/src/mainboard/google/zork/variants/morphius/variant.c @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/gpio.h> +#include <baseboard/variants.h> +#include <ec/google/chromeec/ec.h> + +static void update_bluetooth_configuration() { + uint32_t board_version; + + if (google_chromeec_cbi_get_board_version(&board_version)) + board_version = 1; + + if (board_version <= 2) { + baseboard_remove_bluetooth_reset_gpio(); + } +} + +void variant_devtree_update(void) +{ + update_bluetooth_configuration(); +} diff --git a/src/mainboard/google/zork/variants/trembyle/Makefile.inc b/src/mainboard/google/zork/variants/trembyle/Makefile.inc index 0b6bc4b..7f94d3c 100644 --- a/src/mainboard/google/zork/variants/trembyle/Makefile.inc +++ b/src/mainboard/google/zork/variants/trembyle/Makefile.inc @@ -3,3 +3,4 @@ subdirs-y += ../baseboard/spd
ramstage-y += gpio.c +ramstate-y += variant.c diff --git a/src/mainboard/google/zork/variants/trembyle/variant.c b/src/mainboard/google/zork/variants/trembyle/variant.c new file mode 100644 index 0000000..69a4b35 --- /dev/null +++ b/src/mainboard/google/zork/variants/trembyle/variant.c @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/gpio.h> +#include <baseboard/variants.h> +#include <ec/google/chromeec/ec.h> + +static void update_bluetooth_configuration(void) { + if (google_chromeec_cbi_get_board_version(&board_version)) + board_version = 1; + + if (board_version <= 1) { + baseboard_remove_bluetooth_reset_gpio(); + } +} + +void variant_devtree_update(void) +{ + update_bluetooth_configuration(); +}
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43777 )
Change subject: mb/google/zork: Remove reset_gpio from bt when not supported ......................................................................
Patch Set 1:
(12 comments)
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c:
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 357: bt_cfg->reset_gpio.pin_count=0; spaces required around that '=' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 359: #endif /* !DEVTREE_EARLY */ adding a line without newline at end of file
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c:
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 375: xhci0_bt_dev = find_dev_nested_path(pci_root_bus(), xhci0_bt_path, ARRAY_SIZE(xhci0_bt_path)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 380: xhci1_bt_dev = find_dev_nested_path(pci_root_bus(), xhci1_bt_path, ARRAY_SIZE(xhci1_bt_path)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 394: #endif /* !DEVTREE_EARLY */ adding a line without newline at end of file
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/berknip/variant.c:
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 14: if (board_version <= 1) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 22: } adding a line without newline at end of file
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/morphius/variant.c:
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 7: static void update_bluetooth_configuration() { Bad function definition - void update_bluetooth_configuration() should probably be void update_bluetooth_configuration(void)
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 7: static void update_bluetooth_configuration() { open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 13: if (board_version <= 2) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/trembyle/variant.c:
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 7: static void update_bluetooth_configuration(void) { open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/43777/1/src/mainboard/google/zork/v... PS1, Line 11: if (board_version <= 1) { braces {} are not necessary for single statement blocks
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43777
to look at the new patch set (#2).
Change subject: mb/google/zork: Remove reset_gpio from bt when not supported ......................................................................
mb/google/zork: Remove reset_gpio from bt when not supported
Remove bluetooth reset_gpio when not supported on a specfic board variant.
BUG=b:157580724 TEST=Boot dalboz, observe log
Signed-off-by: Rob Barnes robbarnes@google.com Change-Id: I64f100645dcab947bb45dbf8e8617fbef16dcb8a --- M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c M src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h M src/mainboard/google/zork/variants/berknip/Makefile.inc A src/mainboard/google/zork/variants/berknip/variant.c M src/mainboard/google/zork/variants/dalboz/variant.c M src/mainboard/google/zork/variants/ezkinil/variant.c M src/mainboard/google/zork/variants/morphius/Makefile.inc A src/mainboard/google/zork/variants/morphius/variant.c M src/mainboard/google/zork/variants/trembyle/Makefile.inc A src/mainboard/google/zork/variants/trembyle/variant.c 11 files changed, 221 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/43777/2
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43777 )
Change subject: mb/google/zork: Remove reset_gpio from bt when not supported ......................................................................
Patch Set 2:
(12 comments)
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c:
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 357: bt_cfg->reset_gpio.pin_count=0; spaces required around that '=' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 359: #endif /* !DEVTREE_EARLY */ adding a line without newline at end of file
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c:
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 375: xhci0_bt_dev = find_dev_nested_path(pci_root_bus(), xhci0_bt_path, ARRAY_SIZE(xhci0_bt_path)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 380: xhci1_bt_dev = find_dev_nested_path(pci_root_bus(), xhci1_bt_path, ARRAY_SIZE(xhci1_bt_path)); line over 96 characters
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 394: #endif /* !DEVTREE_EARLY */ adding a line without newline at end of file
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/berknip/variant.c:
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 14: if (board_version <= 1) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 22: } adding a line without newline at end of file
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/morphius/variant.c:
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 7: static void update_bluetooth_configuration() { Bad function definition - void update_bluetooth_configuration() should probably be void update_bluetooth_configuration(void)
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 7: static void update_bluetooth_configuration() { open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 13: if (board_version <= 2) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/trembyle/variant.c:
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 7: static void update_bluetooth_configuration(void) { open brace '{' following function definitions go on the next line
https://review.coreboot.org/c/coreboot/+/43777/2/src/mainboard/google/zork/v... PS2, Line 11: if (board_version <= 1) { braces {} are not necessary for single statement blocks
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43777
to look at the new patch set (#3).
Change subject: mb/google/zork: Remove reset_gpio from bt when not supported ......................................................................
mb/google/zork: Remove reset_gpio from bt when not supported
Remove bluetooth reset_gpio when not supported on a specfic board variant.
BUG=b:157580724 TEST=Boot dalboz, observe log
Signed-off-by: Rob Barnes robbarnes@google.com Change-Id: I64f100645dcab947bb45dbf8e8617fbef16dcb8a --- M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c M src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h M src/mainboard/google/zork/variants/berknip/Makefile.inc A src/mainboard/google/zork/variants/berknip/variant.c M src/mainboard/google/zork/variants/dalboz/variant.c M src/mainboard/google/zork/variants/ezkinil/variant.c M src/mainboard/google/zork/variants/morphius/Makefile.inc A src/mainboard/google/zork/variants/morphius/variant.c M src/mainboard/google/zork/variants/trembyle/Makefile.inc A src/mainboard/google/zork/variants/trembyle/variant.c 11 files changed, 220 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/43777/3
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43777 )
Change subject: mb/google/zork: Remove reset_gpio from bt when not supported ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/c/coreboot/+/43777/3/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c:
https://review.coreboot.org/c/coreboot/+/43777/3/src/mainboard/google/zork/v... PS3, Line 319: #if !DEVTREE_EARLY Is this check required?
https://review.coreboot.org/c/coreboot/+/43777/3/src/mainboard/google/zork/v... PS3, Line 351: find_dev_nested_path In general, I think it would be better to have a callback from the device_operations in drivers/usb/acpi. But, I understand that this code is supposed to be short-lived. So, it should be fine.
https://review.coreboot.org/c/coreboot/+/43777/3/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/berknip/variant.c:
https://review.coreboot.org/c/coreboot/+/43777/3/src/mainboard/google/zork/v... PS3, Line 18: variant_devtree_update If I understand correctly, this is the state of things:
* BT_RESET_GPIO (GPIO_14) on Trembyle reference was added in v3+ schematics. * GPIO_14 in pre-v3 is used for USB_OC
* BT_RESET_GPIO (GPIO_143) on Dalboz reference was added in v2.2 schematics * GPIO_143 was unused before that
Based on this, I think we can do this:
1. Dalboz - No need to remove reset_gpio since it is NC pad so there should not be any side-effect.
2. Trembyle - We already have a Kconfig that identifies v3+ schematics (VARIANT_MIN_BOARD_ID_V3_SCHEMATICS). That can be used in common code directly.
- Add call to `variant_bluetooth_update()` in `mainboard_devtree_update()` in mainboard.c - `variant_bluetooth_update()` can be implemented in variants/baseboard/ramstage_common.c and it will do the following: - If CONFIG(BOARD_GOOGLE_BASEBOARD_DALBOZ) --> do nothing, return. - If variant_uses_v3_schematics() --> do nothing, return. - Call `baseboard_remove_bluetooth_reset_gpio()`
Then you don't have to make changes in each variant.
Rob Barnes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43777 )
Change subject: mb/google/zork: Remove reset_gpio from bt when not supported ......................................................................
Patch Set 4:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43777/3/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c:
https://review.coreboot.org/c/coreboot/+/43777/3/src/mainboard/google/zork/v... PS3, Line 319: #if !DEVTREE_EARLY
Is this check required?
It is because this file is included in romstage and ramstage. In romstage DEVTREE_CONST is set so line 357 throws an error at compile.
https://review.coreboot.org/c/coreboot/+/43777/3/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/berknip/variant.c:
https://review.coreboot.org/c/coreboot/+/43777/3/src/mainboard/google/zork/v... PS3, Line 18: variant_devtree_update
If I understand correctly, this is the state of things: […]
Done
Rob Barnes has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/43777 )
Change subject: mb/google/zork: Remove reset_gpio from bt when not supported ......................................................................
Abandoned
Squashed into 42832