Antonello Dettori (dev(a)dettori.io) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16405
-gerrit
commit f11e16223903c8eaeebdf14b88ee1f2e86a8fc35
Author: Antonello Dettori <dev(a)dettori.io>
Date: Fri Sep 2 09:12:20 2016 +0200
lenovo/t60: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/lenovo/t60.
The patch has been tested both with the arch/io.h definition of device_t
enabled and disabled in order to ensure compatibility while the
transaction takes place.
Change-Id: I4d87498637d74f96ca5809b0e810755a58fc64ab
Signed-off-by: Antonello Dettori <dev(a)dettori.io>
---
src/mainboard/lenovo/t60/romstage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/lenovo/t60/romstage.c b/src/mainboard/lenovo/t60/romstage.c
index 3ed6afd..d3cd90c 100644
--- a/src/mainboard/lenovo/t60/romstage.c
+++ b/src/mainboard/lenovo/t60/romstage.c
@@ -95,7 +95,7 @@ static void ich7_enable_lpc(void)
static void early_superio_config(void)
{
int timeout = 100000;
- device_t dev = PNP_DEV(0x2e, 3);
+ pnp_devfn_t dev = PNP_DEV(0x2e, 3);
pnp_write_config(dev, 0x29, 0xa0);
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16432
-gerrit
commit 555d75a47397ae0a50a0e587493983fe2c458c6b
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Fri Sep 2 20:29:39 2016 -0500
mainboard/google/reef: drop remaining proto board references
The last vestige of the proto boards is the memory sku id
gpios. No need for performing the memory sku read with pullups
because all current and future boards don't have floating pins.
BUG=chrome-os-partner:56791
Change-Id: I04d541a897ec9aacbf2011293d18242fa32896d2
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
.../variants/baseboard/include/baseboard/gpio.h | 6 +-----
.../google/reef/variants/baseboard/memory.c | 21 +--------------------
2 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/src/mainboard/google/reef/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/reef/variants/baseboard/include/baseboard/gpio.h
index 90cca36..f60bfdc 100644
--- a/src/mainboard/google/reef/variants/baseboard/include/baseboard/gpio.h
+++ b/src/mainboard/google/reef/variants/baseboard/include/baseboard/gpio.h
@@ -39,11 +39,7 @@
#define GPIO_PCH_WP GPIO_75
#define GPIO_EC_IN_RW GPIO_41
-/*
- * The proto boards didn't have memory SKU pins, but the same ones can be
- * utilized as post proto boards because the pins used were never connected
- * or no peripheral utilized the signals on proto boards.
- */
+/* Memory SKU GPIOs. */
#define MEM_CONFIG3 GPIO_45
#define MEM_CONFIG2 GPIO_38
#define MEM_CONFIG1 GPIO_102
diff --git a/src/mainboard/google/reef/variants/baseboard/memory.c b/src/mainboard/google/reef/variants/baseboard/memory.c
index a5b0364..b147253 100644
--- a/src/mainboard/google/reef/variants/baseboard/memory.c
+++ b/src/mainboard/google/reef/variants/baseboard/memory.c
@@ -62,14 +62,6 @@ const struct lpddr4_swizzle_cfg baseboard_lpddr4_swizzle = {
},
};
-/*
- * Proto boards didn't have a memory SKU id. The configuration pins use
- * an internal weak pullup with stronger pulldowns for the 0 bits. As
- * proto boards didn't use the memory SKU pins the SKU id reads as 4'b1111,
- * i.e. 15.
- */
-#define PROTO_SKU 15
-
static const struct lpddr4_sku skus[] = {
/*
* K4F6E304HB-MGCJ - both logical channels While the parts
@@ -133,13 +125,6 @@ static const struct lpddr4_sku skus[] = {
.ch1_rank_density = LP4_8Gb_DENSITY,
.part_num = "H9HCNNN8KUMLHR",
},
- /* K4F8E304HB-MGCH - both logical channels */
- [PROTO_SKU] = {
- .speed = LP4_SPEED_2400,
- .ch0_rank_density = LP4_8Gb_DENSITY,
- .ch1_rank_density = LP4_8Gb_DENSITY,
- .part_num = "K4F8E304HB-MGCH",
- },
};
static const struct lpddr4_cfg lp4cfg = {
@@ -160,9 +145,5 @@ size_t __attribute__((weak)) variant_memory_sku(void)
[1] = MEM_CONFIG1, [0] = MEM_CONFIG0,
};
- /*
- * Read memory SKU id with internal pullups enabled to handle
- * proto boards with no SKU id pins.
- */
- return gpio_pullup_base2_value(pads, ARRAY_SIZE(pads));
+ return gpio_base2_value(pads, ARRAY_SIZE(pads));
}
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16431
-gerrit
commit 31b35a00d7289edf7d1d7a3c7beaddb20e4333b7
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Fri Sep 2 20:19:59 2016 -0500
mainboard/google/reef: add baseboard nhlt configuration
Move the current NHLT configuration implementation to the baseboard
area such that other variants can leverage it or provide their
own configuration.
BUG=chrome-os-partner:56677
Change-Id: If0d48cacdc793492e1618d0eda02a149e33f0650
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/mainboard/google/reef/mainboard.c | 15 +--------
.../google/reef/variants/baseboard/Makefile.inc | 1 +
.../baseboard/include/baseboard/variants.h | 4 +++
.../google/reef/variants/baseboard/nhlt.c | 37 ++++++++++++++++++++++
4 files changed, 43 insertions(+), 14 deletions(-)
diff --git a/src/mainboard/google/reef/mainboard.c b/src/mainboard/google/reef/mainboard.c
index a2421df..016c9ac 100644
--- a/src/mainboard/google/reef/mainboard.c
+++ b/src/mainboard/google/reef/mainboard.c
@@ -56,20 +56,7 @@ static unsigned long mainboard_write_acpi_tables(
if (nhlt == NULL)
return start_addr;
- /* 2 Channel DMIC array. */
- if (!nhlt_soc_add_dmic_array(nhlt, 2))
- printk(BIOS_ERR, "Added 2CH DMIC array.\n");
-
- /* Dialog for Headset codec.
- * Headset codec is bi-directional but uses the same configuration
- * settings for render and capture endpoints.
- */
- if (!nhlt_soc_add_da7219(nhlt, AUDIO_LINK_SSP1))
- printk(BIOS_ERR, "Added Dialog_7219 codec.\n");
-
- /* MAXIM Smart Amps for left and right speakers. */
- if (!nhlt_soc_add_max98357(nhlt, AUDIO_LINK_SSP5))
- printk(BIOS_ERR, "Added Maxim_98357 codec.\n");
+ variant_nhlt_init(nhlt);
end_addr = nhlt_soc_serialize(nhlt, start_addr);
diff --git a/src/mainboard/google/reef/variants/baseboard/Makefile.inc b/src/mainboard/google/reef/variants/baseboard/Makefile.inc
index f024c2a..d2d344c 100644
--- a/src/mainboard/google/reef/variants/baseboard/Makefile.inc
+++ b/src/mainboard/google/reef/variants/baseboard/Makefile.inc
@@ -5,5 +5,6 @@ romstage-y += memory.c
ramstage-y += boardid.c
ramstage-y += gpio.c
+ramstage-y += nhlt.c
smm-y += gpio.c
diff --git a/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h
index a3dbfd6..091de1a 100644
--- a/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/reef/variants/baseboard/include/baseboard/variants.h
@@ -40,4 +40,8 @@ size_t variant_memory_sku(void);
/* Return ChromeOS gpio table and fill in number of entries. */
const struct cros_gpio *variant_cros_gpios(size_t *num);
+/* Seed the NHLT tables with the board specific information. */
+struct nhlt;
+void variant_nhlt_init(struct nhlt *nhlt);
+
#endif /* BASEBOARD_VARIANTS_H */
diff --git a/src/mainboard/google/reef/variants/baseboard/nhlt.c b/src/mainboard/google/reef/variants/baseboard/nhlt.c
new file mode 100644
index 0000000..ef9ec6c
--- /dev/null
+++ b/src/mainboard/google/reef/variants/baseboard/nhlt.c
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <baseboard/variants.h>
+#include <console/console.h>
+#include <nhlt.h>
+#include <soc/nhlt.h>
+
+void __attribute__((weak)) variant_nhlt_init(struct nhlt *nhlt)
+{
+ /* 2 Channel DMIC array. */
+ if (!nhlt_soc_add_dmic_array(nhlt, 2))
+ printk(BIOS_ERR, "Added 2CH DMIC array.\n");
+
+ /* Dialog for Headset codec.
+ * Headset codec is bi-directional but uses the same configuration
+ * settings for render and capture endpoints.
+ */
+ if (!nhlt_soc_add_da7219(nhlt, AUDIO_LINK_SSP1))
+ printk(BIOS_ERR, "Added Dialog_7219 codec.\n");
+
+ /* MAXIM Smart Amps for left and right speakers. */
+ if (!nhlt_soc_add_max98357(nhlt, AUDIO_LINK_SSP5))
+ printk(BIOS_ERR, "Added Maxim_98357 codec.\n");
+}