Hannah Williams (hannah.williams(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12744
-gerrit
commit 213c001152569ce27981ffa51d966ddaa53ceaa1
Author: Felix Durairaj <felixx.durairaj(a)intel.com>
Date: Fri Nov 20 15:51:35 2015 -0800
lib: Implement framework for retrieving WiFi regulatory domain
Platforms that need to initialize WRDD package with the regulatory domain
information should implement function wifi_regulatory_domain.
A weak implementation is provided here.
Reviewed-on: https://chromium-review.googlesource.com/314384
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati(a)intel.com>
Commit-Queue: Hannah Williams <hannah.williams(a)intel.com>
Tested-by: Hannah Williams <hannah.williams(a)intel.com>
Change-Id: I84e2acd748856437b40bbf997bf23f158c711712
Signed-off-by: fdurairx <felixx.durairaj(a)intel.com>
Signed-off-by: Hannah Williams <hannah.williams(a)intel.com>
---
src/include/wrdd.h | 30 ++++++++++++++++++++++++++++++
src/lib/Makefile.inc | 2 ++
src/lib/wrdd.c | 22 ++++++++++++++++++++++
3 files changed, 54 insertions(+)
diff --git a/src/include/wrdd.h b/src/include/wrdd.h
new file mode 100644
index 0000000..97fa5dc
--- /dev/null
+++ b/src/include/wrdd.h
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Google Inc.
+ * Copyright (C) 2015 Intel Corp.
+ *
+ * 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.
+ */
+#ifndef _WRDD_H_
+#define _WRDD_H_
+
+#include <stdint.h>
+
+/* Default regulatory domain ID */
+#define WRDD_DEFAULT_REGULATORY_DOMAIN 0x4150
+/* INDONESIA regulatory domain ID */
+#define WRDD_REGULATORY_DOMAIN_INDONESIA 0x4944
+
+/* Retrieve the regulatory domain information */
+uint16_t wifi_regulatory_domain(void);
+
+#endif /* _WRDD_H_ */
+
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index 724391f..de1cadf 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -178,6 +178,8 @@ romstage-y += halt.c
ramstage-y += halt.c
smm-y += halt.c
+ramstage-y += wrdd.c
+
ifneq ($(CONFIG_ARCH_X86),y)
# X86 bootblock uses custom ldscripts that are all glued together,
# so we need to exclude it here or it would pick these up as well
diff --git a/src/lib/wrdd.c b/src/lib/wrdd.c
new file mode 100644
index 0000000..da082f8
--- /dev/null
+++ b/src/lib/wrdd.c
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Google Inc.
+ * Copyright (C) 2015 Intel Corp.
+ *
+ * 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 <wrdd.h>
+
+uint16_t __attribute__((weak)) wifi_regulatory_domain(void)
+{
+ return WRDD_DEFAULT_REGULATORY_DOMAIN;
+}
Hannah Williams (hannah.williams(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12743
-gerrit
commit e5b77cac7c58ca9d4d4f129f81862e68d68a5ab5
Author: Felix Durairaj <felixx.durairaj(a)intel.com>
Date: Fri Nov 20 16:18:42 2015 -0800
Chromeos: Implement wifi_regulatory_domain using "regions" key in VPD
Implement wifi_regulatory_domain function by getting country code from
VPD
Reviewed-on: https://chromium-review.googlesource.com/314385
Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati(a)intel.com>
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Commit-Queue: Hannah Williams <hannah.williams(a)intel.com>
Tested-by: Hannah Williams <hannah.williams(a)intel.com>
Change-Id: Ia6a24df110a3860d404d345571007ae8965e9564
Signed-off-by: fdurairx <felixx.durairaj(a)intel.com>
Signed-off-by: Hannah Williams <hannah.williams(a)intel.com>
---
src/vendorcode/google/chromeos/Makefile.inc | 1 +
src/vendorcode/google/chromeos/cros_vpd.h | 2 +
src/vendorcode/google/chromeos/wrdd.c | 76 +++++++++++++++++++++++++++++
3 files changed, 79 insertions(+)
diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc
index ef84798..8697297 100644
--- a/src/vendorcode/google/chromeos/Makefile.inc
+++ b/src/vendorcode/google/chromeos/Makefile.inc
@@ -38,6 +38,7 @@ ramstage-$(CONFIG_HAVE_ACPI_TABLES) += gnvs.c
ramstage-$(CONFIG_CHROMEOS_RAMOOPS) += ramoops.c
romstage-y += vpd_decode.c
ramstage-y += vpd_decode.c cros_vpd.c vpd_mac.c vpd_serialno.c vpd_calibration.c
+ramstage-y += wrdd.c
ifeq ($(CONFIG_ARCH_X86)$(CONFIG_ARCH_MIPS),)
bootblock-y += watchdog.c
ramstage-y += watchdog.c
diff --git a/src/vendorcode/google/chromeos/cros_vpd.h b/src/vendorcode/google/chromeos/cros_vpd.h
index 19658c2..ca9c320 100644
--- a/src/vendorcode/google/chromeos/cros_vpd.h
+++ b/src/vendorcode/google/chromeos/cros_vpd.h
@@ -7,6 +7,8 @@
#ifndef __CROS_VPD_H__
#define __CROS_VPD_H__
+#define CROS_VPD_WIFI_DOMAINKEY "regions"
+
/*
* Reads VPD string value by key.
*
diff --git a/src/vendorcode/google/chromeos/wrdd.c b/src/vendorcode/google/chromeos/wrdd.c
new file mode 100644
index 0000000..ab27cc0
--- /dev/null
+++ b/src/vendorcode/google/chromeos/wrdd.c
@@ -0,0 +1,76 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Google Inc.
+ * Copyright (C) 2015 Intel Corp.
+ *
+ * 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 <console/console.h>
+#include <cpu/cpu.h>
+#include <types.h>
+#include <string.h>
+#include <wrdd.h>
+#include "cros_vpd.h"
+
+/*
+ * wrdd_domain_value is ISO 3166-2
+ * ISO 3166-2 code consists of two parts, separated by a hyphen
+ * The first part is the ISO 3166-1 alpha-2 code of the country;
+ * The second part is a string of up to three alphanumeric characters
+ */
+struct wrdd_code_value_pair {
+ const char *code;
+ u16 value;
+};
+
+/* Retrieve the regulatory domain information from VPD and
+ * return it as an uint16.
+ * WARNING: if domain information is not found in the VPD,
+ * this function will fall back to the default value
+ */
+uint16_t wifi_regulatory_domain(void)
+{
+ static struct wrdd_code_value_pair wrdd_table[] = {
+ {
+ /* Indonesia
+ * Alpha-2 code 'ID'
+ * Full name 'the Republic of Indonesia'
+ * Alpha-3 code 'IDN'
+ * Numeric code '360'
+ */
+ .code = "id",
+ .value = WRDD_REGULATORY_DOMAIN_INDONESIA
+ }
+ };
+ const char *wrdd_domain_key = CROS_VPD_WIFI_DOMAINKEY;
+ int i;
+ struct wrdd_code_value_pair *p;
+ /* wrdd_domain_value is ISO 3166-2 */
+ char wrdd_domain_code[7];
+
+ /* If not found for any reason fall backto the default value */
+ if (!cros_vpd_gets(wrdd_domain_key, wrdd_domain_code,
+ sizeof(wrdd_domain_code))) {
+ printk(BIOS_DEBUG,
+ "Error: Could not locate '%s' in VPD\n", wrdd_domain_key);
+ return WRDD_DEFAULT_REGULATORY_DOMAIN;
+ }
+ printk(BIOS_DEBUG, "Found '%s'='%s' in VPD\n",
+ wrdd_domain_key, wrdd_domain_code);
+
+ for (i = 0; i < ARRAY_SIZE(wrdd_table); i++) {
+ p = &wrdd_table[i];
+ if (strncmp(p->code, wrdd_domain_code,
+ ARRAY_SIZE(wrdd_domain_code)) == 0)
+ return p->value;
+ }
+ return WRDD_DEFAULT_REGULATORY_DOMAIN;
+}
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12684
-gerrit
commit 62d17f492a6f6c3490b61287444e38351d9bf60d
Author: Martin Roth <martinroth(a)google.com>
Date: Mon Dec 7 16:50:47 2015 -0700
soc/intel/fsp_baytrail: Adjust root port INT routing
Adjust the root port INT routing based on Bay Trail spec:
Document Number: 538136, Rev. 3.9
Table 241. Interrupt Generated for INT[A-D] Interrupts
INTA INTB INTC INTD
Root Port 1 INTA# INTB# INTC# INTD#
Root Port 2 INTD# INTA# INTB# INTC#
Root Port 3 INTC# INTD# INTA# INTB#
Root Port 4 INTB# INTC# INTD# INTA#
Change-Id: I22a8c0bc6ad731dfb79385d6e165f1ec0a07507d
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
src/soc/intel/fsp_baytrail/southcluster.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/soc/intel/fsp_baytrail/southcluster.c b/src/soc/intel/fsp_baytrail/southcluster.c
index 3ad692f..f493d2b 100644
--- a/src/soc/intel/fsp_baytrail/southcluster.c
+++ b/src/soc/intel/fsp_baytrail/southcluster.c
@@ -208,6 +208,16 @@ static void write_pci_config_irqs(void)
if (targ_dev == NULL || new_int_pin < 1)
continue;
+ /*
+ * Adjust the INT routing for the PCIe root ports
+ * See 'Interrupt Generated for INT[A-D] Interrupts'
+ * Table 241 in Document Number: 538136, Rev. 3.9
+ */
+ if (PCI_SLOT(targ_dev->path.pci.devfn) == PCIE_DEV &&
+ targ_dev != irq_dev)
+ new_int_pin = ((new_int_pin - 1 +
+ PCI_FUNC(targ_dev->path.pci.devfn)) % 4) + 1;
+
/* Get the original INT_PIN for record keeping */
original_int_pin = pci_read_config8(irq_dev, PCI_INTERRUPT_PIN);
the following patch was just integrated into master:
commit 6fc544d3d4479b8561e96e817f699323d25901a0
Author: Ben Gardner <gardner.ben(a)gmail.com>
Date: Wed Dec 9 11:33:39 2015 -0600
intel/fsp_baytrail: change indent to use tabs
Change-Id: If0d0a15442738bab0e34f1b05513e7f8e8fa9afc
Signed-off-by: Ben Gardner <gardner.ben(a)gmail.com>
Reviewed-on: https://review.coreboot.org/12698
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/12698 for details.
-gerrit
the following patch was just integrated into master:
commit 35272fd2379b0409e9e927ed64139993ff1f2e31
Author: Martin Roth <martinroth(a)google.com>
Date: Thu Dec 10 08:28:53 2015 -0700
northbridge/intel ACPI: Remove unused Local method
The remainder of the divide operation was being placed into a Local,
but was never being used, causing an IASL warning. Since this
field is optional, just remove the Local.
Fixes IASL warning:
dsdt.aml 640:Divide (Multiply (CTDN, 125), 100, Local0, PL2V)
Warning 3144 - Method Local is set but never used ^ (Local0)
Change-Id: I0b43ef638b1bc3e1163c45f31f8da57aa0d39e22
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/12706
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc(a)marcjonesconsulting.com>
See https://review.coreboot.org/12706 for details.
-gerrit
Hannah Williams (hannah.williams(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12740
-gerrit
commit 6b04a3c3db7d9bc061f1308311e74293ea985032
Author: Kane Chen <kane.chen(a)intel.com>
Date: Mon Oct 26 13:02:33 2015 +0800
Braswell: add code to support customization of I2C data hold time
The I2C data hold time can be vary on different boards/devices.
So, it needs to be customized by boards/devices
TEST=compile ok and check IC_SDA_HOLD is changed if the hold time
is defined in onboard.h
Reviewed-on: https://chromium-review.googlesource.com/308623
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Change-Id: I66c799de400670916cebbcb529d4f59d5b0f081b
Signed-off-by: Kane Chen <kane.chen(a)intel.com>
---
src/soc/intel/braswell/acpi/lpss.asl | 59 +++++++++++++++++++++++++++---------
1 file changed, 45 insertions(+), 14 deletions(-)
diff --git a/src/soc/intel/braswell/acpi/lpss.asl b/src/soc/intel/braswell/acpi/lpss.asl
index a2d5f3f..34d1e4d 100644
--- a/src/soc/intel/braswell/acpi/lpss.asl
+++ b/src/soc/intel/braswell/acpi/lpss.asl
@@ -14,6 +14,37 @@
* GNU General Public License for more details.
*/
+/* The below definitions are used for customization
+ * Some boards/devices may need different data hold time
+ */
+#ifndef BOARD_I2C1_DATA_HOLD_TIME
+#define BOARD_I2C1_DATA_HOLD_TIME 6
+#endif
+
+#ifndef BOARD_I2C2_DATA_HOLD_TIME
+#define BOARD_I2C2_DATA_HOLD_TIME 6
+#endif
+
+#ifndef BOARD_I2C3_DATA_HOLD_TIME
+#define BOARD_I2C3_DATA_HOLD_TIME 6
+#endif
+
+#ifndef BOARD_I2C4_DATA_HOLD_TIME
+#define BOARD_I2C4_DATA_HOLD_TIME 6
+#endif
+
+#ifndef BOARD_I2C5_DATA_HOLD_TIME
+#define BOARD_I2C5_DATA_HOLD_TIME 6
+#endif
+
+#ifndef BOARD_I2C6_DATA_HOLD_TIME
+#define BOARD_I2C6_DATA_HOLD_TIME 6
+#endif
+
+#ifndef BOARD_I2C7_DATA_HOLD_TIME
+#define BOARD_I2C7_DATA_HOLD_TIME 6
+#endif
+
Device (SDM1)
{
Name (_HID, "INTL9C60")
@@ -85,10 +116,10 @@ Device (I2C1)
Name (_DDN, "I2C Controller #1")
/* Standard Mode: HCNT, LCNT, SDA Hold Time */
- Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+ Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C1_DATA_HOLD_TIME })
/* Fast Mode: HCNT, LCNT, SDA Hold Time */
- Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+ Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C1_DATA_HOLD_TIME })
Name (RBUF, ResourceTemplate()
{
@@ -144,10 +175,10 @@ Device (I2C2)
Name (_DDN, "I2C Controller #2")
/* Standard Mode: HCNT, LCNT, SDA Hold Time */
- Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+ Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C2_DATA_HOLD_TIME })
/* Fast Mode: HCNT, LCNT, SDA Hold Time */
- Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+ Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C2_DATA_HOLD_TIME })
Name (RBUF, ResourceTemplate()
{
@@ -203,10 +234,10 @@ Device (I2C3)
Name (_DDN, "I2C Controller #3")
/* Standard Mode: HCNT, LCNT, SDA Hold Time */
- Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+ Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C3_DATA_HOLD_TIME })
/* Fast Mode: HCNT, LCNT, SDA Hold Time */
- Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+ Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C3_DATA_HOLD_TIME })
Name (RBUF, ResourceTemplate()
{
@@ -262,10 +293,10 @@ Device (I2C4)
Name (_DDN, "I2C Controller #4")
/* Standard Mode: HCNT, LCNT, SDA Hold Time */
- Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+ Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C4_DATA_HOLD_TIME })
/* Fast Mode: HCNT, LCNT, SDA Hold Time */
- Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+ Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C4_DATA_HOLD_TIME })
Name (RBUF, ResourceTemplate()
{
@@ -321,10 +352,10 @@ Device (I2C5)
Name (_DDN, "I2C Controller #5")
/* Standard Mode: HCNT, LCNT, SDA Hold Time */
- Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+ Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C5_DATA_HOLD_TIME })
/* Fast Mode: HCNT, LCNT, SDA Hold Time */
- Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+ Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C5_DATA_HOLD_TIME })
Name (RBUF, ResourceTemplate()
{
@@ -380,10 +411,10 @@ Device (I2C6)
Name (_DDN, "I2C Controller #6")
/* Standard Mode: HCNT, LCNT, SDA Hold Time */
- Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+ Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C6_DATA_HOLD_TIME })
/* Fast Mode: HCNT, LCNT, SDA Hold Time */
- Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+ Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C6_DATA_HOLD_TIME })
Name (RBUF, ResourceTemplate()
{
@@ -439,10 +470,10 @@ Device (I2C7)
Name (_DDN, "I2C Controller #7")
/* Standard Mode: HCNT, LCNT, SDA Hold Time */
- Name (SSCN, Package () { 0x200, 0x200, 0x6 })
+ Name (SSCN, Package () { 0x200, 0x200, BOARD_I2C7_DATA_HOLD_TIME })
/* Fast Mode: HCNT, LCNT, SDA Hold Time */
- Name (FMCN, Package () { 0x55, 0x99, 0x6 })
+ Name (FMCN, Package () { 0x55, 0x99, BOARD_I2C7_DATA_HOLD_TIME })
Name (RBUF, ResourceTemplate()
{