Josie Nordrum has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44156 )
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
mb/google/zork: Add kconfigs to check schematic version 3.6
Added VARIANT_SUPPORTS_PRE_V3_6_SCHEMATICS and VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS.
BUG=b:161938476 BRANCH=None TEST=None
Change-Id: If86e1ea3c02db354c7b410f1bbc1daacb483cc51 Signed-off-by: Josie Nordrum josienordrum@google.com --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/variants/baseboard/helpers.c M src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h 3 files changed, 53 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/44156/1
diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig index 6160021..c854e54 100644 --- a/src/mainboard/google/zork/Kconfig +++ b/src/mainboard/google/zork/Kconfig @@ -169,6 +169,32 @@ longer has to support pre-v3 schematics, `default y` entry for it can be dropped.
+config VARIANT_SUPPORTS_PRE_V3_6_SCHEMATICS + bool + default y if BOARD_GOOGLE_TREMBYLE + default y if BOARD_GOOGLE_EZKINIL + default y if BOARD_GOOGLE_MORPHIUS + default y if BOARD_GOOGLE_BERKNIP + default y if BOARD_GOOGLE_DALBOZ + default y if BOARD_GOOGLE_WOOMAX + default y if BOARD_GOOGLE_VILBOZ + default n + +config VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS + int + depends on VARIANT_SUPPORTS_PRE_V3_6_SCHEMATICS + default 4 if BOARD_GOOGLE_TREMBYLE + default 3 if BOARD_GOOGLE_EZKINIL + default 4 if BOARD_GOOGLE_MORPHIUS + default 3 if BOARD_GOOGLE_BERKNIP + default 3 if BOARD_GOOGLE_DALBOZ + default 2 if BOARD_GOOGLE_WOOMAX + default 2 if BOARD_GOOGLE_VILBOZ + default 256 + help + Minimum board versions which switched to using non-CODEC_GPI pin for + HP_INT_ODL. + config VARIANT_MIN_BOARD_ID_V3_SCHEMATICS int depends on VARIANT_SUPPORTS_PRE_V3_SCHEMATICS diff --git a/src/mainboard/google/zork/variants/baseboard/helpers.c b/src/mainboard/google/zork/variants/baseboard/helpers.c index 0a1cf5c..ec393d3 100644 --- a/src/mainboard/google/zork/variants/baseboard/helpers.c +++ b/src/mainboard/google/zork/variants/baseboard/helpers.c @@ -130,6 +130,29 @@ return true; }
+bool variant_uses_v3_6_schematics(void) +{ + uint32_t board_version; + + if (!CONFIG(VARIANT_SUPPORTS_PRE_V3_6_SCHEMATICS)) + return true; + + if (google_chromeec_cbi_get_board_version(&board_version)) + return false; + + if ((int)board_version < VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS) + return false; + + return true; +} + +/* pre-v3.6, CODEC_GPI was used as headphone jack interrupt. + Starting v3.6 this was changed to a separate GPIO.*/ +bool variant_uses_codec_gpi(void) +{ + return !variant_uses_v3_6_schematics(); +} + bool variant_has_active_low_wifi_power(void) { uint32_t board_version; 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 6b9bbfd..5ea6b87 100644 --- a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h @@ -66,6 +66,10 @@
/* Return true if variant uses v3 version of reference schematics. */ bool variant_uses_v3_schematics(void); +/* Return true if variant uses v3.6 version of reference schematics. */ +bool variant_uses_v3_6_schematics(void); +/* Return true if variant does NOT use v3.6 version of reference schematics. */ +bool variant_uses_codec_gpi(void); /* Return true if variant has active low power enable fow WiFi. */ bool variant_has_active_low_wifi_power(void);
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44156 )
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
Patch Set 1:
(6 comments)
https://review.coreboot.org/c/coreboot/+/44156/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44156/1//COMMIT_MSG@10 PS1, Line 10: VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS. It would be good to also mention that helper functions are added.
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/K... File src/mainboard/google/zork/Kconfig:
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/K... PS1, Line 195: non-CODEC_GPI pin for : HP_INT_ODL. nit: v3.6+ version of reference schematics.
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/helpers.c:
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... PS1, Line 143: VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS CONFIG_VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... PS1, Line 150: * space before *
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... PS1, Line 150: use spaces to align 'S' with 'p' on previous line.
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h:
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... PS1, Line 71: does NOT use v3.6 version of reference schematics uses CODEC_GPI pin for headphone jack interrupt.
Hello build bot (Jenkins), Raul Rangel, Furquan Shaikh, Lucas Chen, Rob Barnes, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44156
to look at the new patch set (#2).
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
mb/google/zork: Add kconfigs to check schematic version 3.6
Added VARIANT_SUPPORTS_PRE_V3_6_SCHEMATICS and VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS. Added helper functions to check if variant uses v3.6 and if variant uses CODEC GPI.
BUG=b:161938476 BRANCH=None TEST=None
Change-Id: If86e1ea3c02db354c7b410f1bbc1daacb483cc51 Signed-off-by: Josie Nordrum josienordrum@google.com --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/variants/baseboard/helpers.c M src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h 3 files changed, 55 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/44156/2
Hello build bot (Jenkins), Raul Rangel, Furquan Shaikh, Lucas Chen, Rob Barnes, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44156
to look at the new patch set (#3).
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
mb/google/zork: Add kconfigs to check schematic version 3.6
Added VARIANT_SUPPORTS_PRE_V3_6_SCHEMATICS and VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS. Added helper functions to check if variant uses v3.6 and if variant uses CODEC GPI.
BUG=b:161938476 BRANCH=None TEST=None
Change-Id: If86e1ea3c02db354c7b410f1bbc1daacb483cc51 Signed-off-by: Josie Nordrum josienordrum@google.com --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/variants/baseboard/helpers.c M src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h 3 files changed, 55 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/44156/3
Josie Nordrum has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44156 )
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
Patch Set 3:
(6 comments)
https://review.coreboot.org/c/coreboot/+/44156/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/44156/1//COMMIT_MSG@10 PS1, Line 10: VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS.
It would be good to also mention that helper functions are added.
Done
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/K... File src/mainboard/google/zork/Kconfig:
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/K... PS1, Line 195: non-CODEC_GPI pin for : HP_INT_ODL.
nit: v3.6+ version of reference schematics.
Done
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/helpers.c:
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... PS1, Line 143: VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS
CONFIG_VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS
Done
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... PS1, Line 150: *
space before *
Done
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... PS1, Line 150:
use spaces to align 'S' with 'p' on previous line.
This causes it to fail presubmit checks on chromiumos gerrit.
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h:
https://review.coreboot.org/c/coreboot/+/44156/1/src/mainboard/google/zork/v... PS1, Line 71: does NOT use v3.6 version of reference schematics
uses CODEC_GPI pin for headphone jack interrupt.
Done
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44156 )
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
Patch Set 3: Code-Review+2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44156 )
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
Patch Set 3: Code-Review+1
+1 since you are testing out the series to ensure it works as expected.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44156 )
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44156/3/src/mainboard/google/zork/K... File src/mainboard/google/zork/Kconfig:
https://review.coreboot.org/c/coreboot/+/44156/3/src/mainboard/google/zork/K... PS3, Line 180: default y if BOARD_GOOGLE_VILBOZ You are going to need BOARD_GOOGLE_DIRINBOZ as well here and for VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44156 )
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
Patch Set 4:
Sorry, I did a `git rebase` in my local repo and accidentally ended up uploading a new patchset. There should not be any difference though since I did not touch any of your CLs.
Hello build bot (Jenkins), Raul Rangel, Furquan Shaikh, Lucas Chen, Rob Barnes, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/44156
to look at the new patch set (#7).
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
mb/google/zork: Add kconfigs to check schematic version 3.6
Added VARIANT_SUPPORTS_PRE_V3_6_SCHEMATICS and VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS. Added helper functions to check if variant uses v3.6 and if variant uses CODEC GPI.
BUG=b:161938476 BRANCH=None TEST=None
Change-Id: If86e1ea3c02db354c7b410f1bbc1daacb483cc51 Signed-off-by: Josie Nordrum josienordrum@google.com --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/variants/baseboard/helpers.c M src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h 3 files changed, 57 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/44156/7
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44156 )
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
Patch Set 7: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/44156/3/src/mainboard/google/zork/K... File src/mainboard/google/zork/Kconfig:
https://review.coreboot.org/c/coreboot/+/44156/3/src/mainboard/google/zork/K... PS3, Line 180: default y if BOARD_GOOGLE_VILBOZ
You are going to need BOARD_GOOGLE_DIRINBOZ as well here and for VARIANT_MIN_BOARD_ID_V3_6_SCHEMATIC […]
Done
Furquan Shaikh has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44156 )
Change subject: mb/google/zork: Add kconfigs to check schematic version 3.6 ......................................................................
mb/google/zork: Add kconfigs to check schematic version 3.6
Added VARIANT_SUPPORTS_PRE_V3_6_SCHEMATICS and VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS. Added helper functions to check if variant uses v3.6 and if variant uses CODEC GPI.
BUG=b:161938476 BRANCH=None TEST=None
Change-Id: If86e1ea3c02db354c7b410f1bbc1daacb483cc51 Signed-off-by: Josie Nordrum josienordrum@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/44156 Reviewed-by: Furquan Shaikh furquan@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/variants/baseboard/helpers.c M src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h 3 files changed, 57 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig index 6160021..bf2fe2e 100644 --- a/src/mainboard/google/zork/Kconfig +++ b/src/mainboard/google/zork/Kconfig @@ -169,6 +169,34 @@ longer has to support pre-v3 schematics, `default y` entry for it can be dropped.
+config VARIANT_SUPPORTS_PRE_V3_6_SCHEMATICS + bool + default y if BOARD_GOOGLE_TREMBYLE + default y if BOARD_GOOGLE_EZKINIL + default y if BOARD_GOOGLE_MORPHIUS + default y if BOARD_GOOGLE_BERKNIP + default y if BOARD_GOOGLE_DALBOZ + default y if BOARD_GOOGLE_WOOMAX + default y if BOARD_GOOGLE_VILBOZ + default y if BOARD_GOOGLE_DIRINBOZ + default n + +config VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS + int + depends on VARIANT_SUPPORTS_PRE_V3_6_SCHEMATICS + default 4 if BOARD_GOOGLE_TREMBYLE + default 3 if BOARD_GOOGLE_EZKINIL + default 4 if BOARD_GOOGLE_MORPHIUS + default 3 if BOARD_GOOGLE_BERKNIP + default 3 if BOARD_GOOGLE_DALBOZ + default 2 if BOARD_GOOGLE_WOOMAX + default 2 if BOARD_GOOGLE_VILBOZ + default 2 if BOARD_GOOGLE_DIRINBOZ + default 256 + help + Minimum board version where the variant starts supporting + v3.6+ version of reference schematics. + config VARIANT_MIN_BOARD_ID_V3_SCHEMATICS int depends on VARIANT_SUPPORTS_PRE_V3_SCHEMATICS diff --git a/src/mainboard/google/zork/variants/baseboard/helpers.c b/src/mainboard/google/zork/variants/baseboard/helpers.c index 0a1cf5c..7dc9fd3 100644 --- a/src/mainboard/google/zork/variants/baseboard/helpers.c +++ b/src/mainboard/google/zork/variants/baseboard/helpers.c @@ -130,6 +130,31 @@ return true; }
+bool variant_uses_v3_6_schematics(void) +{ + uint32_t board_version; + + if (!CONFIG(VARIANT_SUPPORTS_PRE_V3_6_SCHEMATICS)) + return true; + + if (google_chromeec_cbi_get_board_version(&board_version)) + return false; + + if ((int)board_version < CONFIG_VARIANT_MIN_BOARD_ID_V3_6_SCHEMATICS) + return false; + + return true; +} + +/* + * pre-v3.6, CODEC_GPI was used as headphone jack interrupt. + * Starting v3.6 this was changed to a separate GPIO. + */ +bool variant_uses_codec_gpi(void) +{ + return !variant_uses_v3_6_schematics(); +} + bool variant_has_active_low_wifi_power(void) { uint32_t board_version; 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 6b9bbfd..8770944 100644 --- a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h @@ -66,6 +66,10 @@
/* Return true if variant uses v3 version of reference schematics. */ bool variant_uses_v3_schematics(void); +/* Return true if variant uses v3.6 version of reference schematics. */ +bool variant_uses_v3_6_schematics(void); +/* Return true if variant uses CODEC_GPI pin for headphone jack interrupt. */ +bool variant_uses_codec_gpi(void); /* Return true if variant has active low power enable fow WiFi. */ bool variant_has_active_low_wifi_power(void);