Attention is currently required from: Boris Mittelberg, Caveh Jalali, Kapil Porwal, Pranava Y N, Subrata Banik.
Jérémy Compostella has posted comments on this change by Subrata Banik. ( https://review.coreboot.org/c/coreboot/+/85743?usp=email )
Change subject: ec/google/chromeec: Add API to check if a USB PD charger is attached
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/85743?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I47c934ee8a7563d4ba5124bff5613e61dd66e923
Gerrit-Change-Number: 85743
Gerrit-PatchSet: 4
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Boris Mittelberg <bmbm(a)google.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Reviewer: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Reviewer: Pranava Y N <pranavayn(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Attention: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Attention: Pranava Y N <pranavayn(a)google.com>
Gerrit-Attention: Boris Mittelberg <bmbm(a)google.com>
Gerrit-Comment-Date: Thu, 26 Dec 2024 20:59:44 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Lean Sheng Tan has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/85780?usp=email )
Change subject: Fix up CFR's open issues Fix some typos and also update the naming convention of `CFR_OPTFLAG_GRAYOUT` to `CFR_OPTFLAG_INACTIVE` as per reviews.
......................................................................
Fix up CFR's open issues
Fix some typos and also update the naming convention of
`CFR_OPTFLAG_GRAYOUT` to `CFR_OPTFLAG_INACTIVE` as per reviews.
Signed-off-by: Lean Sheng Tan <sheng.tan(a)9elements.com>
Change-Id: Id66808382b93e32c58024462c18b20c2a89d6d23
---
M Documentation/drivers/cfr.md
M src/commonlib/include/commonlib/cfr.h
M src/drivers/option/cfr.c
3 files changed, 11 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/85780/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/85780?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Id66808382b93e32c58024462c18b20c2a89d6d23
Gerrit-Change-Number: 85780
Gerrit-PatchSet: 2
Gerrit-Owner: Lean Sheng Tan <tanleansheng(a)outlook.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Attention is currently required from: Lean Sheng Tan, Patrick Rudolph.
Lean Sheng Tan has uploaded a new patch set (#26) to the change originally created by Angel Pons. ( https://review.coreboot.org/c/coreboot/+/74122?usp=email )
Change subject: mb/prodrive/atlas: Add initial support for options
......................................................................
mb/prodrive/atlas: Add initial support for options
The plan is to have a setup menu in edk2 to configure coreboot options
without having to describe the options in both coreboot and edk2; that
would be a maintenance nightmare. Options are passed to edk2 using CFR
structures, edk2 stores the values in the variable store in flash, and
coreboot reads the option values using the EFI variable store backend.
Change-Id: I47585a9a6f94ab5005f2ab63a0df267c0caef231
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/mainboard/prodrive/atlas/Kconfig
M src/mainboard/prodrive/atlas/Makefile.mk
A src/mainboard/prodrive/atlas/cfr.c
M src/mainboard/prodrive/atlas/devicetree.cb
M src/mainboard/prodrive/atlas/ramstage_fsp_params.c
M src/mainboard/prodrive/atlas/romstage_fsp_params.c
6 files changed, 286 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/74122/26
--
To view, visit https://review.coreboot.org/c/coreboot/+/74122?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I47585a9a6f94ab5005f2ab63a0df267c0caef231
Gerrit-Change-Number: 74122
Gerrit-PatchSet: 26
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Benjamin Doron <benjamin.doron00(a)gmail.com>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: Lean Sheng Tan <tanleansheng(a)outlook.com>
Gerrit-Reviewer: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-CC: Martin L Roth <gaumless(a)gmail.com>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Attention: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Attention: Lean Sheng Tan <tanleansheng(a)outlook.com>
Lean Sheng Tan has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85780?usp=email )
Change subject: Fix up CFR's open issues
......................................................................
Fix up CFR's open issues
Signed-off-by: Lean Sheng Tan <sheng.tan(a)9elements.com>
Change-Id: Id66808382b93e32c58024462c18b20c2a89d6d23
---
M Documentation/drivers/cfr.md
M src/commonlib/include/commonlib/cfr.h
M src/drivers/option/cfr.c
3 files changed, 11 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/85780/1
diff --git a/Documentation/drivers/cfr.md b/Documentation/drivers/cfr.md
index ade6d2b..0405f5c 100644
--- a/Documentation/drivers/cfr.md
+++ b/Documentation/drivers/cfr.md
@@ -26,7 +26,7 @@
All strings are in ASCII.
The boot options are grouped into forms, where each form hold
-one ore more options. Boot options that are not used in the current
+one or more options. Boot options that are not used in the current
boot flow, and are never reachable should be marked as hidden.
Dependecies between options can be defined in the code and should
be evaluated by the CFR parser/UI.
@@ -66,7 +66,7 @@
## Implementation design
### Tags
Tags identify the structure defined in `src/commonlib/include/commonlib/cfr.h`.
-Every struct might be immideatly followed by additional structs (so called
+Every struct might be immediately followed by additional structs (so called
sub nodes), having their own tag and size field. The sum of all sub nodes size
fields plus the size of the struct itself equals the size field.
@@ -208,7 +208,7 @@
Prevents writes to the variable.
-* `CFR_OPTFLAG_GRAYOUT`
+* `CFR_OPTFLAG_INACTIVE`
Implies `READONLY`. The option is visible, but cannot be modified
because one of the dependencies are not given. However there's a
diff --git a/src/commonlib/include/commonlib/cfr.h b/src/commonlib/include/commonlib/cfr.h
index 22058e9..cc8431a 100644
--- a/src/commonlib/include/commonlib/cfr.h
+++ b/src/commonlib/include/commonlib/cfr.h
@@ -68,7 +68,7 @@
* effect on the non-volatile variable.
* CFR_OPTFLAG_READONLY:
* Prevents writes to the variable.
- * CFR_OPTFLAG_GRAYOUT:
+ * CFR_OPTFLAG_INACTIVE:
* Implies READONLY. The option is visible, but cannot be modified
* because one of the dependencies are not given. However there's a
* possibility to enable the option by changing runtime configuration.
@@ -93,7 +93,7 @@
*/
enum cfr_option_flags {
CFR_OPTFLAG_READONLY = 1 << 0,
- CFR_OPTFLAG_GRAYOUT = 1 << 1,
+ CFR_OPTFLAG_INACTIVE = 1 << 1,
CFR_OPTFLAG_SUPPRESS = 1 << 2,
CFR_OPTFLAG_VOLATILE = 1 << 3,
CFR_OPTFLAG_RUNTIME = 1 << 4,
diff --git a/src/drivers/option/cfr.c b/src/drivers/option/cfr.c
index b323b43..c99bb01 100644
--- a/src/drivers/option/cfr.c
+++ b/src/drivers/option/cfr.c
@@ -29,7 +29,7 @@
static uint32_t write_cfr_varchar(char *current, const char *string, uint32_t tag)
{
- uint8_t *data;
+ char *data;
size_t padding;
ASSERT(string);
@@ -39,7 +39,7 @@
struct lb_cfr_varbinary *cfr_str = (struct lb_cfr_varbinary *)current;
cfr_str->tag = tag;
cfr_str->data_length = strlen(string) + 1;
- char *data = current + sizeof(*cfr_str);
+ *data = current + sizeof(*cfr_str);
memcpy(data, string, cfr_str->data_length);
/* Make sure that every TAG/SIZE field is always aligned to LB_ENTRY_ALIGN */
@@ -98,7 +98,7 @@
option->object_id = object_id;
option->dependency_id = dep_id;
option->flags = flags;
- if (option->flags & (CFR_OPTFLAG_GRAYOUT | CFR_OPTFLAG_VOLATILE))
+ if (option->flags & (CFR_OPTFLAG_INACTIVE | CFR_OPTFLAG_VOLATILE))
option->flags |= CFR_OPTFLAG_READONLY;
option->default_value = default_value;
option->size = sizeof(*option);
@@ -163,7 +163,7 @@
option->object_id = object_id;
option->dependency_id = dep_id;
option->flags = sm_varchar->flags;
- if (option->flags & (CFR_OPTFLAG_GRAYOUT | CFR_OPTFLAG_VOLATILE))
+ if (option->flags & (CFR_OPTFLAG_INACTIVE | CFR_OPTFLAG_VOLATILE))
option->flags |= CFR_OPTFLAG_READONLY;
option->size = sizeof(*option);
@@ -193,7 +193,7 @@
comment->object_id = object_id;
comment->dependency_id = dep_id;
comment->flags = sm_comment->flags;
- if (comment->flags & (CFR_OPTFLAG_GRAYOUT | CFR_OPTFLAG_VOLATILE))
+ if (comment->flags & (CFR_OPTFLAG_INACTIVE | CFR_OPTFLAG_VOLATILE))
comment->flags |= CFR_OPTFLAG_READONLY;
comment->size = sizeof(*comment);
@@ -228,7 +228,7 @@
form->object_id = object_id;
form->dependency_id = dep_id;
form->flags = sm_form->flags;
- if (form->flags & (CFR_OPTFLAG_GRAYOUT | CFR_OPTFLAG_VOLATILE))
+ if (form->flags & (CFR_OPTFLAG_INACTIVE | CFR_OPTFLAG_VOLATILE))
form->flags |= CFR_OPTFLAG_READONLY;
form->size = sizeof(*form);
--
To view, visit https://review.coreboot.org/c/coreboot/+/85780?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Id66808382b93e32c58024462c18b20c2a89d6d23
Gerrit-Change-Number: 85780
Gerrit-PatchSet: 1
Gerrit-Owner: Lean Sheng Tan <tanleansheng(a)outlook.com>
Attention is currently required from: Lean Sheng Tan, Patrick Rudolph.
Lean Sheng Tan has uploaded a new patch set (#25) to the change originally created by Angel Pons. ( https://review.coreboot.org/c/coreboot/+/74122?usp=email )
Change subject: mb/prodrive/atlas: Add initial support for options
......................................................................
mb/prodrive/atlas: Add initial support for options
The plan is to have a setup menu in edk2 to configure coreboot options
without having to describe the options in both coreboot and edk2; that
would be a maintenance nightmare. Options are passed to edk2 using CFR
structures, edk2 stores the values in the variable store in flash, and
coreboot reads the option values using the EFI variable store backend.
Change-Id: I47585a9a6f94ab5005f2ab63a0df267c0caef231
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/mainboard/prodrive/atlas/Kconfig
M src/mainboard/prodrive/atlas/Makefile.mk
A src/mainboard/prodrive/atlas/cfr.c
M src/mainboard/prodrive/atlas/devicetree.cb
M src/mainboard/prodrive/atlas/ramstage_fsp_params.c
M src/mainboard/prodrive/atlas/romstage_fsp_params.c
6 files changed, 286 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/74122/25
--
To view, visit https://review.coreboot.org/c/coreboot/+/74122?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I47585a9a6f94ab5005f2ab63a0df267c0caef231
Gerrit-Change-Number: 74122
Gerrit-PatchSet: 25
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Benjamin Doron <benjamin.doron00(a)gmail.com>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: Lean Sheng Tan <tanleansheng(a)outlook.com>
Gerrit-Reviewer: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-CC: Martin L Roth <gaumless(a)gmail.com>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Attention: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Attention: Lean Sheng Tan <tanleansheng(a)outlook.com>
Attention is currently required from: Felix Held, Julius Werner, Lean Sheng Tan, Matt DeVillier, Maximilian Brune, Philipp Hug, ron minnich.
Benjamin Doron has posted comments on this change by Benjamin Doron. ( https://review.coreboot.org/c/coreboot/+/84796?usp=email )
Change subject: lib/{fit,fit_payload}.c: Enhance support for FIT images
......................................................................
Patch Set 9:
(2 comments)
File src/lib/fit.c:
https://review.coreboot.org/c/coreboot/+/84796/comment/0b52f1c0_b57c2632?us… :
PS4, Line 523: }
> True, and the current solution runs into the issue of how images could have clashing load addresses, […]
Simon Glass told me elsewhere that `loadables` in the config node is the supported way to do this. So, I'll make that change in EDK2, edit the code that gather the secondary_images, and then this is done. Alternatively, we should at least mark this as a comment in the code.
File src/lib/fit.c:
https://review.coreboot.org/c/coreboot/+/84796/comment/cfa235dd_b5c389d8?us… :
PS6, Line 119: if (!strcmp("data-offset", prop->prop.name))
> nit: IIRC coding style says that if one if-else branch has curly braces, all of them must use them ( […]
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/84796?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I6a21954c0dc5fd820d135e8cd0599ce87903a1c0
Gerrit-Change-Number: 84796
Gerrit-PatchSet: 9
Gerrit-Owner: Benjamin Doron <benjamin.doron00(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Lean Sheng Tan <tanleansheng(a)outlook.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Reviewer: Philipp Hug <philipp(a)hug.cx>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Reviewer: ron minnich <rminnich(a)gmail.com>
Gerrit-Attention: Philipp Hug <philipp(a)hug.cx>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Attention: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Attention: Lean Sheng Tan <tanleansheng(a)outlook.com>
Gerrit-Attention: ron minnich <rminnich(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 26 Dec 2024 20:10:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Benjamin Doron <benjamin.doron00(a)gmail.com>
Comment-In-Reply-To: Julius Werner <jwerner(a)chromium.org>
Attention is currently required from: Jeremy Soller, Paul Menzel.
Tim Crawford has posted comments on this change by Tim Crawford. ( https://review.coreboot.org/c/coreboot/+/85721?usp=email )
Change subject: mb/system76/mtl: Enable NPU
......................................................................
Patch Set 2:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/85721/comment/195e1d15_38cb3a95?us… :
PS1, Line 10:
> Please add a TEST= line.
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/85721?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I2b5c3030c6378c0998a2ac792126c15d2e17bbf9
Gerrit-Change-Number: 85721
Gerrit-PatchSet: 2
Gerrit-Owner: Tim Crawford <tcrawford(a)system76.com>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Jeremy Soller <jeremy(a)system76.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jeremy Soller <jeremy(a)system76.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Comment-Date: Thu, 26 Dec 2024 19:32:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Paul Menzel <paulepanter(a)mailbox.org>
Attention is currently required from: Jeremy Soller, Tim Crawford.
Hello Felix Singer, Jeremy Soller, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/85721?usp=email
to look at the new patch set (#2).
Change subject: mb/system76/mtl: Enable NPU
......................................................................
mb/system76/mtl: Enable NPU
Customers have asked that the NPU device be available.
Test: Verified the device shows up in lspci.
Change-Id: I2b5c3030c6378c0998a2ac792126c15d2e17bbf9
Signed-off-by: Tim Crawford <tcrawford(a)system76.com>
---
M src/mainboard/system76/mtl/devicetree.cb
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/85721/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/85721?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I2b5c3030c6378c0998a2ac792126c15d2e17bbf9
Gerrit-Change-Number: 85721
Gerrit-PatchSet: 2
Gerrit-Owner: Tim Crawford <tcrawford(a)system76.com>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Jeremy Soller <jeremy(a)system76.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Tim Crawford <tcrawford(a)system76.com>
Gerrit-Attention: Jeremy Soller <jeremy(a)system76.com>
Attention is currently required from: Jamie Ryu, Paul Menzel, Subrata Banik.
Jérémy Compostella has posted comments on this change by Jérémy Compostella. ( https://review.coreboot.org/c/coreboot/+/85146?usp=email )
Change subject: mb/google/fatcat: Limit Power Limit when battery is missing
......................................................................
Patch Set 19:
(1 comment)
Patchset:
PS19:
I am planning on testing this at some points today.
--
To view, visit https://review.coreboot.org/c/coreboot/+/85146?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I5d71e9edde0ecbd7aaf316cd754a6ebcff9da77e
Gerrit-Change-Number: 85146
Gerrit-PatchSet: 19
Gerrit-Owner: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Reviewer: Jamie Ryu <jamie.m.ryu(a)intel.com>
Gerrit-Reviewer: Pranava Y N <pranavayn(a)google.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jamie Ryu <jamie.m.ryu(a)intel.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Comment-Date: Thu, 26 Dec 2024 19:25:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: Boris Mittelberg, Caveh Jalali, Jérémy Compostella, Kapil Porwal, Pranava Y N.
Hello Boris Mittelberg, Caveh Jalali, Kapil Porwal, Pranava Y N, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/85765?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by Kapil Porwal, Verified+1 by build bot (Jenkins)
Change subject: ec/google/chromeec: Add function to detect barrel charger
......................................................................
ec/google/chromeec: Add function to detect barrel charger
This commit introduces a new function,
google_chromeec_is_barrel_charger_present(), which checks if a barrel
charger is present.
The function uses the following logic to determine if a barrel charger
is present:
- If both a barrel charger and USB-C PD are present, then the barrel
charger takes precedence over USB-C PD. As a result,
google_chromeec_is_usb_pd_attached() will return false. This logic can
be used to deterministically say if a barrel charger is present even
when both a barrel charger and USB-C PD are attached.
- If an AC charger is detected and USB-C PD is not present, then a
barrel charger must be present.
This change allows the EC to accurately detect the presence of a barrel
charger, even when a USB-C PD charger is also attached.
BUG=b:377798581
TEST=Able to read the charger status correctly while booting
google/fatcat.
Experiment #1:
- USB-C PD Attached = yes
- Barrel Attached = No
- Charger Detected = Yes
```
fatcat-rev257 ~ # cbmem -c | grep -5 "ac_charger_present"
[INFO ] ac_charger_present: yes
[INFO ] usb_pd_present: yes
[INFO ] baseboard_devtree_update: Barrel Absent
```
Experiment #2:
- USB-C PD Attached = No
- Barrel Attached = Yes
- Charger Detected = Yes
```
[INFO ] ac_charger_present: yes
[INFO ] usb_pd_present: no
[INFO ] baseboard_devtree_update: Barrel Present
```
Experiment #3:
- USB-C PD Attached = Yes
- Barrel Attached = Yes
- Charger Detected = Yes
```
[INFO ] ac_charger_present: yes
[INFO ] usb_pd_present: no
[INFO ] baseboard_devtree_update: Barrel Present
```
Experiment #4:
- USB-C PD Attached = No
- Barrel Attached = No
- Charger Detected = No
```
[INFO ] ac_charger_present: no
[INFO ] usb_pd_present: no
[INFO ] baseboard_devtree_update: Barrel Absent
```
Change-Id: I9644f0dec057f95bb0a22cdc18edc1a0234ee3a9
Signed-off-by: Subrata Banik <subratabanik(a)google.com>
---
M src/ec/google/chromeec/ec.c
M src/ec/google/chromeec/ec.h
2 files changed, 32 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/85765/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/85765?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I9644f0dec057f95bb0a22cdc18edc1a0234ee3a9
Gerrit-Change-Number: 85765
Gerrit-PatchSet: 2
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Boris Mittelberg <bmbm(a)google.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Reviewer: Pranava Y N <pranavayn(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Attention: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Attention: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Attention: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Attention: Pranava Y N <pranavayn(a)google.com>
Gerrit-Attention: Boris Mittelberg <bmbm(a)google.com>