Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45010 )
Change subject: soc/intel/skylake: Use correct NHLT_PDM_DEV definition
......................................................................
soc/intel/skylake: Use correct NHLT_PDM_DEV definition
According to the NHLT specification[1], PDM_DEV is defined as "1" on
Kabylake based platforms. coreboot currently sets it to "0" on
all platforms. Add an entry to the enum and use it to define
NHLT_PDM_DEV for Kabylake.
"Device Type" will resume from "2" on all platforms, but entries are
currently reserved.
Tested on an Acer Aspire VN7-572G (Skylake-U), which has a 1ch array
DMIC, on Windows 10.
1. https://01.org/sites/default/files/595976_intel_sst_nhlt.pdf
Change-Id: Ifbc67228c9e7af7db5154d597ca8d67860cfd2ed
Signed-off-by: Benjamin Doron <benjamin.doron00(a)gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45010
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/include/nhlt.h
M src/soc/intel/skylake/nhlt/dmic.c
2 files changed, 3 insertions(+), 2 deletions(-)
Approvals:
build bot (Jenkins): Verified
Angel Pons: Looks good to me, approved
diff --git a/src/include/nhlt.h b/src/include/nhlt.h
index 3355801..167be52 100644
--- a/src/include/nhlt.h
+++ b/src/include/nhlt.h
@@ -187,6 +187,7 @@
enum {
NHLT_PDM_DEV,
+ NHLT_PDM_DEV_CAVS15, // NHLT_PDM_DEV on cAVS1.5 (KBL) based platforms
};
/* Endpoint direction. */
diff --git a/src/soc/intel/skylake/nhlt/dmic.c b/src/soc/intel/skylake/nhlt/dmic.c
index 16eb605..76c1990 100644
--- a/src/soc/intel/skylake/nhlt/dmic.c
+++ b/src/soc/intel/skylake/nhlt/dmic.c
@@ -33,7 +33,7 @@
static const struct nhlt_endp_descriptor dmic_2ch_descriptors[] = {
{
.link = NHLT_LINK_PDM,
- .device = NHLT_PDM_DEV,
+ .device = NHLT_PDM_DEV_CAVS15,
.direction = NHLT_DIR_CAPTURE,
.vid = NHLT_VID,
.did = NHLT_DID_DMIC,
@@ -77,7 +77,7 @@
static const struct nhlt_endp_descriptor dmic_4ch_descriptors[] = {
{
.link = NHLT_LINK_PDM,
- .device = NHLT_PDM_DEV,
+ .device = NHLT_PDM_DEV_CAVS15,
.direction = NHLT_DIR_CAPTURE,
.vid = NHLT_VID,
.did = NHLT_DID_DMIC,
--
To view, visit https://review.coreboot.org/c/coreboot/+/45010
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifbc67228c9e7af7db5154d597ca8d67860cfd2ed
Gerrit-Change-Number: 45010
Gerrit-PatchSet: 9
Gerrit-Owner: Benjamin Doron <benjamin.doron00(a)gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Frank Chu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47736 )
Change subject: mb/google/volteer/variants/delbin: Enhance I2C5 bus freq closer 400 kHz
......................................................................
Patch Set 3: Code-Review+1
--
To view, visit https://review.coreboot.org/c/coreboot/+/47736
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6d60abe15645dc51ed9ee30975d2521b8940c2d0
Gerrit-Change-Number: 47736
Gerrit-PatchSet: 3
Gerrit-Owner: Frank Chu <frank_chu(a)pegatron.corp-partner.google.com>
Gerrit-Reviewer: Frank Chu <frank_chu(a)pegatron.corp-partner.google.com>
Gerrit-Reviewer: Zhuohao Lee <zhuohao(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Daniel Peng <daniel_peng(a)pegatron.corp-partner.google.com>
Gerrit-CC: Hank Lin <hank2_lin(a)pegatron.corp-partner.google.com>
Gerrit-CC: Ken Lu <ken_lu(a)pegatron.corp-partner.google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Tue, 24 Nov 2020 08:46:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Caveh Jalali has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47860 )
Change subject: soc/intel/tigerlake: Refactor TCSS port mux config
......................................................................
Patch Set 2:
(4 comments)
> Patch Set 1:
>
> > Patch Set 1:
> >
> > > Patch Set 1:
> > >
> > > > Patch Set 1:
> > > >
> > > > also another suggestion, could be another patch, this is already so much better than just raw constants, but would be nice to just specify GPP_A10 for example in the bias_control fields; that would mean decoding the bank and pin numbers though.
> > >
> > > ya, i was looking for a way to decode the pin numbers. is that done on the FSP side?
> >
> > I don't know of a great way, other than
> > ```
> > if (gpio_num >= GPP_A0 && gpio_num <= GPP_A24) {
> > bank = GPIO_BANK_A;
> > } else if (gpio_num >= GPP_B0 && gpio_num <= GPP_B23) {
> > bank = GPIO_BANK_B;
> > }
> > ```
> >
> > or the equivalent as a table + loop. I haven't looked much beyond the UPD itself TBH
>
> We have most of the required code already present in soc/intel/common/block/gpio/gpio.c. I would recommend looking into that:
>
> const struct pad_community *comm = gpio_get_community(pad); // pad would be what you input from the mainboard e.g. GPP_E10.
> int rel_offset = relative_pad_in_comm(comm, pad);
>
> That should give you the relative offset that needs to be filled in. For the group(bank) encoding, has anyone checked with Intel how GPP_E translates to 0xe? I don't think there is any hardware register that defines this. I fear that we are leaking FSP assumptions/macros into coreboot here. Anyways, this can be handled by:
>
> int group_idx = gpio_group_index(comm, rel_offset);
>
> and then have a helper function that can return the bank # expected by FSP. Either you can have that implemented only for TGL now or update pad_group to add a field for fsp_bank_number. We should bring this up with FSP team as well because we cannot just keep expecting users to understand/know the internal assumptions of FSP w.r.t. macros or ids.
this is getting a bit messy. i got as far as computing the group offset,
but not the group number encoding used here. i opened
https://issuetracker.google.com/174116646
to get this resolved.
https://review.coreboot.org/c/coreboot/+/47860/1/src/soc/intel/tigerlake/ch…
File src/soc/intel/tigerlake/chip.h:
https://review.coreboot.org/c/coreboot/+/47860/1/src/soc/intel/tigerlake/ch…
PS1, Line 339: struct tcss_config {
> suggestion: A little bit of documentation about using IOM_AUX_ORI_BIAS_CTRL for the bias_control* fi […]
Done
https://review.coreboot.org/c/coreboot/+/47860/1/src/soc/intel/tigerlake/fs…
File src/soc/intel/tigerlake/fsp_params.c:
https://review.coreboot.org/c/coreboot/+/47860/1/src/soc/intel/tigerlake/fs…
PS1, Line 135: TGL_LP_GPIO_ID
> Can you please add a comment why this is required to be set even if there is no bias_control informa […]
Done
https://review.coreboot.org/c/coreboot/+/47860/1/src/soc/intel/tigerlake/fs…
PS1, Line 139: params->TcssAuxOri |= IOM_TCSS_PORT_CTRL(i,
> nit: blank line after continue
Done
https://review.coreboot.org/c/coreboot/+/47860/1/src/soc/intel/tigerlake/in…
File src/soc/intel/tigerlake/include/soc/early_tcss.h:
https://review.coreboot.org/c/coreboot/+/47860/1/src/soc/intel/tigerlake/in…
PS1, Line 102: TGL_LP_GPIO_ID
> Can you please add a comment here that this is expected to be set by FSP and it represents the GPIO […]
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/47860
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0ca69cba646e3dcb7dc73e5d95aedc88fcde0e81
Gerrit-Change-Number: 47860
Gerrit-PatchSet: 2
Gerrit-Owner: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Brandon Breitenstein <brandon.breitenstein(a)intel.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 24 Nov 2020 06:39:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Furquan Shaikh <furquan(a)google.com>
Comment-In-Reply-To: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-MessageType: comment
Hello build bot (Jenkins), Furquan Shaikh, Tim Wawrzynczak, Nick Vaccaro, Brandon Breitenstein, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47860
to look at the new patch set (#2).
Change subject: soc/intel/tigerlake: Refactor TCSS port mux config
......................................................................
soc/intel/tigerlake: Refactor TCSS port mux config
This changes how TCSS port configurations are specified in device
trees. Instead of using registers of bitmasks, each port's
configuration is encapsulated in a struct with members for each
configuration parameter.
the TcssAuxOri bitmask and IomTypeCPortPadCfg array are replaced
with a struct tcss_config which encapsulates the same information
on a per port basis.
BRANCH=volteer
BUG=b:163476857
TEST=verified external USB-C monitor shows up in both cable
orientations in combination with following patches
Signed-off-by: Caveh Jalali <caveh(a)chromium.org>
Change-Id: I0ca69cba646e3dcb7dc73e5d95aedc88fcde0e81
---
M src/mainboard/google/volteer/variants/baseboard/devicetree.cb
M src/mainboard/google/volteer/variants/eldrid/overridetree.cb
M src/mainboard/google/volteer/variants/elemi/overridetree.cb
M src/mainboard/google/volteer/variants/malefor/overridetree.cb
M src/mainboard/google/volteer/variants/volteer/overridetree.cb
M src/mainboard/google/volteer/variants/volteer2/overridetree.cb
M src/mainboard/intel/tglrvp/variants/tglrvp_up3/devicetree.cb
M src/mainboard/intel/tglrvp/variants/tglrvp_up4/devicetree.cb
M src/soc/intel/tigerlake/chip.h
M src/soc/intel/tigerlake/fsp_params.c
M src/soc/intel/tigerlake/include/soc/early_tcss.h
11 files changed, 104 insertions(+), 49 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/47860/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/47860
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0ca69cba646e3dcb7dc73e5d95aedc88fcde0e81
Gerrit-Change-Number: 47860
Gerrit-PatchSet: 2
Gerrit-Owner: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Brandon Breitenstein <brandon.breitenstein(a)intel.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Frank Chu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47787 )
Change subject: mb/google/volteer: Create drobit variant
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/coreboot/+/47787
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I63b7312bba236bd5af028359804d042f6850d8ba
Gerrit-Change-Number: 47787
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Chu <frank_chu(a)pegatron.corp-partner.google.com>
Gerrit-Reviewer: Frank Chu <frank_chu(a)pegatron.corp-partner.google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Zhuohao Lee <zhuohao(a)chromium.org>
Gerrit-Reviewer: Zhuohao Lee <zhuohao(a)google.com>
Gerrit-CC: Daniel Peng <daniel_peng(a)pegatron.corp-partner.google.com>
Gerrit-CC: Hank Lin <hank2_lin(a)pegatron.corp-partner.google.com>
Gerrit-CC: Kane Chen <kane_chen(a)pegatron.corp-partner.google.com>
Gerrit-CC: Ken Lu <ken_lu(a)pegatron.corp-partner.google.com>
Gerrit-Comment-Date: Tue, 24 Nov 2020 04:25:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47860 )
Change subject: soc/intel/tigerlake: Refactor TCSS port mux config
......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/47860/1/src/soc/intel/tigerlake/fs…
File src/soc/intel/tigerlake/fsp_params.c:
https://review.coreboot.org/c/coreboot/+/47860/1/src/soc/intel/tigerlake/fs…
PS1, Line 135: TGL_LP_GPIO_ID
Can you please add a comment why this is required to be set even if there is no bias_control information being provided?
https://review.coreboot.org/c/coreboot/+/47860/1/src/soc/intel/tigerlake/in…
File src/soc/intel/tigerlake/include/soc/early_tcss.h:
https://review.coreboot.org/c/coreboot/+/47860/1/src/soc/intel/tigerlake/in…
PS1, Line 102: TGL_LP_GPIO_ID
Can you please add a comment here that this is expected to be set by FSP and it represents the GPIO chipset ID for LP.
(This is another example of how FSP is leaking its assumptions into external components).
--
To view, visit https://review.coreboot.org/c/coreboot/+/47860
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0ca69cba646e3dcb7dc73e5d95aedc88fcde0e81
Gerrit-Change-Number: 47860
Gerrit-PatchSet: 1
Gerrit-Owner: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Brandon Breitenstein <brandon.breitenstein(a)intel.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 24 Nov 2020 00:24:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47860 )
Change subject: soc/intel/tigerlake: Refactor TCSS port mux config
......................................................................
Patch Set 1:
> Patch Set 1:
>
> > Patch Set 1:
> >
> > > Patch Set 1:
> > >
> > > also another suggestion, could be another patch, this is already so much better than just raw constants, but would be nice to just specify GPP_A10 for example in the bias_control fields; that would mean decoding the bank and pin numbers though.
> >
> > ya, i was looking for a way to decode the pin numbers. is that done on the FSP side?
>
> I don't know of a great way, other than
> ```
> if (gpio_num >= GPP_A0 && gpio_num <= GPP_A24) {
> bank = GPIO_BANK_A;
> } else if (gpio_num >= GPP_B0 && gpio_num <= GPP_B23) {
> bank = GPIO_BANK_B;
> }
> ```
>
> or the equivalent as a table + loop. I haven't looked much beyond the UPD itself TBH
We have most of the required code already present in soc/intel/common/block/gpio/gpio.c. I would recommend looking into that:
const struct pad_community *comm = gpio_get_community(pad); // pad would be what you input from the mainboard e.g. GPP_E10.
int rel_offset = relative_pad_in_comm(comm, pad);
That should give you the relative offset that needs to be filled in. For the group(bank) encoding, has anyone checked with Intel how GPP_E translates to 0xe? I don't think there is any hardware register that defines this. I fear that we are leaking FSP assumptions/macros into coreboot here. Anyways, this can be handled by:
int group_idx = gpio_group_index(comm, rel_offset);
and then have a helper function that can return the bank # expected by FSP. Either you can have that implemented only for TGL now or update pad_group to add a field for fsp_bank_number. We should bring this up with FSP team as well because we cannot just keep expecting users to understand/know the internal assumptions of FSP w.r.t. macros or ids.
--
To view, visit https://review.coreboot.org/c/coreboot/+/47860
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0ca69cba646e3dcb7dc73e5d95aedc88fcde0e81
Gerrit-Change-Number: 47860
Gerrit-PatchSet: 1
Gerrit-Owner: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Brandon Breitenstein <brandon.breitenstein(a)intel.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 23 Nov 2020 23:16:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment