the following patch was just integrated into master:
commit 23ceb7d240a16427d07746cc3c6b06a8418c9a1e
Author: Martin Roth <martinroth(a)google.com>
Date: Thu Dec 22 10:54:55 2016 -0700
util/lint: Add check for the signed-off-by line
Gerrit will let you push a patch without a signed-off-by line,
although I believe it can't actually be merged. Instead of catching
it either manually, or when the patch is attempting to be merged,
catch this in the jenkins builder.
Change-Id: I80161befa157266dd4e3209839a06ff398aab6bb
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/17941
Tested-by: build bot (Jenkins)
Reviewed-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
See https://review.coreboot.org/17941 for details.
-gerrit
the following patch was just integrated into master:
commit a132892de696d011e61cea2828c0e4c93fc3b3aa
Author: Ricardo Ribalda Delgado <ricardo.ribalda(a)gmail.com>
Date: Wed Dec 28 15:16:22 2016 +0100
amd/pi: Make BottomIo position configurable
Some PCI peripherals, such as FPGA accelerators, require a great amount
of memory mapped IO. This patch allows the user to select at build time
the bottom IO to leave enough space for such devices.
We cannot calculate this value at runtime because it has to be set
before the PCI devices are enumerated.
Change-Id: Ic590e8aa8b91ff89877cbff6afd10614d33dcf8d
Credit-to: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda(a)gmail.com>
Reviewed-on: https://review.coreboot.org/17980
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
See https://review.coreboot.org/17980 for details.
-gerrit
Boon Tiong Teo (boon.tiong.teo(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17976
-gerrit
commit 36c09266dc346da8922cceb681213c8e94e02a8a
Author: Teo Boon Tiong <boon.tiong.teo(a)intel.com>
Date: Wed Dec 28 18:56:26 2016 +0800
driver/intel/fsp1_1: Fix boot failure for non-verstage case
Currently car_stage_entry is defined only in romstage_after_verstage and
as a result when SEPARATE_VERSTAGE is not selected, there is no
entry point into romstage and romstage will not started at all.
The solution is move out romstage_after_verstage.S from fsp1.1 driver
to skylake/romstage. And add CONFIG_C_ENVIRONMENT_BOOTBLOCK and
CONFIG_PLATFORM_USES_FSP1_1 to fix the build and boot issue with this
change.
Beside that, rename the romstage_after_verstage to car_stage_c_entry
in more appropriate naming convention after this fix.
Tested on Skylake Saddle Brook (Fsp 1.1) and Kabelyake Rvp11 (Fsp 2.0),
romstage can be started successfully.
Change-Id: I1cd2cf5655fdff6e23b7b76c3974e7dfd3835efd
Signed-off-by: Teo Boon Tiong <boon.tiong.teo(a)intel.com>
---
src/drivers/intel/fsp1_1/Makefile.inc | 1 -
src/drivers/intel/fsp1_1/car.c | 2 +-
src/drivers/intel/fsp1_1/include/fsp/car.h | 2 +-
src/drivers/intel/fsp1_1/romstage_after_verstage.S | 38 --------------------
src/soc/intel/skylake/romstage/Makefile.inc | 1 +
src/soc/intel/skylake/romstage/car_stage_entry.S | 40 ++++++++++++++++++++++
6 files changed, 43 insertions(+), 41 deletions(-)
diff --git a/src/drivers/intel/fsp1_1/Makefile.inc b/src/drivers/intel/fsp1_1/Makefile.inc
index 4088293..e2f75ee 100644
--- a/src/drivers/intel/fsp1_1/Makefile.inc
+++ b/src/drivers/intel/fsp1_1/Makefile.inc
@@ -28,7 +28,6 @@ romstage-y += fsp_util.c
romstage-y += hob.c
romstage-y += raminit.c
romstage-y += romstage.c
-romstage-$(CONFIG_SEPARATE_VERSTAGE) += romstage_after_verstage.S
romstage-y += stack.c
romstage-y += stage_cache.c
romstage-$(CONFIG_MMA) += mma_core.c
diff --git a/src/drivers/intel/fsp1_1/car.c b/src/drivers/intel/fsp1_1/car.c
index 1a5f9a8..789d3d8 100644
--- a/src/drivers/intel/fsp1_1/car.c
+++ b/src/drivers/intel/fsp1_1/car.c
@@ -68,7 +68,7 @@ asmlinkage void *cache_as_ram_main(struct cache_as_ram_params *car_params)
}
/* Entry point taken when romstage is called after a separate verstage. */
-asmlinkage void *romstage_after_verstage(void)
+asmlinkage void *car_stage_c_entry(void)
{
/* Need to locate the current FSP_INFO_HEADER. The cache-as-ram
* is still enabled. We can directly access work buffer here. */
diff --git a/src/drivers/intel/fsp1_1/include/fsp/car.h b/src/drivers/intel/fsp1_1/include/fsp/car.h
index 88dca9a..499039a 100644
--- a/src/drivers/intel/fsp1_1/include/fsp/car.h
+++ b/src/drivers/intel/fsp1_1/include/fsp/car.h
@@ -32,7 +32,7 @@ struct cache_as_ram_params {
/* Entry points from the cache-as-ram assembly code. */
asmlinkage void *cache_as_ram_main(struct cache_as_ram_params *car_params);
asmlinkage void after_cache_as_ram(void *chipset_context);
-asmlinkage void *romstage_after_verstage(void);
+asmlinkage void *car_stage_c_entry(void);
/* Per stage calls from the above two functions. The void * return from
* cache_as_ram_stage_main() is the stack pointer to use in RAM after
* exiting cache-as-ram mode. */
diff --git a/src/drivers/intel/fsp1_1/romstage_after_verstage.S b/src/drivers/intel/fsp1_1/romstage_after_verstage.S
deleted file mode 100644
index 2a3372f..0000000
--- a/src/drivers/intel/fsp1_1/romstage_after_verstage.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2015 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.
- */
-
-#define LHLT_DELAY 0x50000 /* I/O delay between post codes on failure */
-
-.text
-.global car_stage_entry
-car_stage_entry:
- call romstage_after_verstage
- #include "after_raminit.S"
-
- movb $0x69, %ah
- jmp .Lhlt
-
-.Lhlt:
- xchg %al, %ah
-#if IS_ENABLED(CONFIG_POST_IO)
- outb %al, $CONFIG_POST_IO_PORT
-#else
- post_code(POST_DEAD_CODE)
-#endif
- movl $LHLT_DELAY, %ecx
-.Lhlt_Delay:
- outb %al, $0xED
- loop .Lhlt_Delay
- jmp .Lhlt
diff --git a/src/soc/intel/skylake/romstage/Makefile.inc b/src/soc/intel/skylake/romstage/Makefile.inc
index 877712f..c6f0057 100644
--- a/src/soc/intel/skylake/romstage/Makefile.inc
+++ b/src/soc/intel/skylake/romstage/Makefile.inc
@@ -1,6 +1,7 @@
verstage-y += power_state.c
romstage-$(CONFIG_PLATFORM_USES_FSP2_0) += car_stage.S
+romstage-$(CONFIG_PLATFORM_USES_FSP1_1) += car_stage_entry.S
romstage-y += pmc.c
romstage-y += power_state.c
romstage-$(CONFIG_PLATFORM_USES_FSP1_1) += romstage.c
diff --git a/src/soc/intel/skylake/romstage/car_stage_entry.S b/src/soc/intel/skylake/romstage/car_stage_entry.S
new file mode 100644
index 0000000..923a346
--- /dev/null
+++ b/src/soc/intel/skylake/romstage/car_stage_entry.S
@@ -0,0 +1,40 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 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.
+ */
+
+/* I/O delay between post codes on failure */
+#define LHLT_DELAY 0x50000
+
+.text
+.global car_stage_entry
+car_stage_entry:
+ call car_stage_c_entry
+ #include "src/drivers/intel/fsp1_1/after_raminit.S"
+
+
+ movb $0x69, %ah
+ jmp .Lhlt
+
+.Lhlt:
+ xchg %al, %ah
+#if IS_ENABLED(CONFIG_POST_IO)
+ outb %al, $CONFIG_POST_IO_PORT
+#else
+ post_code(POST_DEAD_CODE)
+#endif
+ movl $LHLT_DELAY, %ecx
+.Lhlt_Delay:
+ outb %al, $0xED
+ loop .Lhlt_Delay
+ jmp .Lhlt
Boon Tiong Teo (boon.tiong.teo(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17976
-gerrit
commit ba6d1ffcdfae065932dcfcf40a52cd5665d4dc0d
Author: Teo Boon Tiong <boon.tiong.teo(a)intel.com>
Date: Wed Dec 28 18:56:26 2016 +0800
driver/intel/fsp1_1: Fix boot failure for non-verstage case
Currently car_stage_entry is defined only in romstage_after_verstage and
as a result when SEPARATE_VERSTAGE is not selected, there is no
entry point into romstage and romstage will not started at all.
The solution is move out romstage_after_verstage.S from fsp1.1 driver
to skylake/romstage. And add CONFIG_C_ENVIRONMENT_BOOTBLOCK and
CONFIG_PLATFORM_USES_FSP1_1 to fix the build and boot issue with this
change.
Beside that, rename the romstage_after_verstage to car_stage_c_entry
in more appropriate naming convention after this fix.
Tested on Skylake Saddle Brook (Fsp 1.1) and Kabelyake Rvp11 (Fsp 2.0),
romstage can be started successfully.
Change-Id: I1cd2cf5655fdff6e23b7b76c3974e7dfd3835efd
Signed-off-by: Teo Boon Tiong <boon.tiong.teo(a)intel.com>
---
src/drivers/intel/fsp1_1/Makefile.inc | 1 -
src/drivers/intel/fsp1_1/car.c | 2 +-
src/drivers/intel/fsp1_1/include/fsp/car.h | 2 +-
src/drivers/intel/fsp1_1/romstage_after_verstage.S | 38 --------------------
src/soc/intel/skylake/romstage/Makefile.inc | 1 +
src/soc/intel/skylake/romstage/car_stage_entry.S | 40 ++++++++++++++++++++++
6 files changed, 43 insertions(+), 41 deletions(-)
diff --git a/src/drivers/intel/fsp1_1/Makefile.inc b/src/drivers/intel/fsp1_1/Makefile.inc
index 4088293..e2f75ee 100644
--- a/src/drivers/intel/fsp1_1/Makefile.inc
+++ b/src/drivers/intel/fsp1_1/Makefile.inc
@@ -28,7 +28,6 @@ romstage-y += fsp_util.c
romstage-y += hob.c
romstage-y += raminit.c
romstage-y += romstage.c
-romstage-$(CONFIG_SEPARATE_VERSTAGE) += romstage_after_verstage.S
romstage-y += stack.c
romstage-y += stage_cache.c
romstage-$(CONFIG_MMA) += mma_core.c
diff --git a/src/drivers/intel/fsp1_1/car.c b/src/drivers/intel/fsp1_1/car.c
index 1a5f9a8..789d3d8 100644
--- a/src/drivers/intel/fsp1_1/car.c
+++ b/src/drivers/intel/fsp1_1/car.c
@@ -68,7 +68,7 @@ asmlinkage void *cache_as_ram_main(struct cache_as_ram_params *car_params)
}
/* Entry point taken when romstage is called after a separate verstage. */
-asmlinkage void *romstage_after_verstage(void)
+asmlinkage void *car_stage_c_entry(void)
{
/* Need to locate the current FSP_INFO_HEADER. The cache-as-ram
* is still enabled. We can directly access work buffer here. */
diff --git a/src/drivers/intel/fsp1_1/include/fsp/car.h b/src/drivers/intel/fsp1_1/include/fsp/car.h
index 88dca9a..499039a 100644
--- a/src/drivers/intel/fsp1_1/include/fsp/car.h
+++ b/src/drivers/intel/fsp1_1/include/fsp/car.h
@@ -32,7 +32,7 @@ struct cache_as_ram_params {
/* Entry points from the cache-as-ram assembly code. */
asmlinkage void *cache_as_ram_main(struct cache_as_ram_params *car_params);
asmlinkage void after_cache_as_ram(void *chipset_context);
-asmlinkage void *romstage_after_verstage(void);
+asmlinkage void *car_stage_c_entry(void);
/* Per stage calls from the above two functions. The void * return from
* cache_as_ram_stage_main() is the stack pointer to use in RAM after
* exiting cache-as-ram mode. */
diff --git a/src/drivers/intel/fsp1_1/romstage_after_verstage.S b/src/drivers/intel/fsp1_1/romstage_after_verstage.S
deleted file mode 100644
index 2a3372f..0000000
--- a/src/drivers/intel/fsp1_1/romstage_after_verstage.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2015 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.
- */
-
-#define LHLT_DELAY 0x50000 /* I/O delay between post codes on failure */
-
-.text
-.global car_stage_entry
-car_stage_entry:
- call romstage_after_verstage
- #include "after_raminit.S"
-
- movb $0x69, %ah
- jmp .Lhlt
-
-.Lhlt:
- xchg %al, %ah
-#if IS_ENABLED(CONFIG_POST_IO)
- outb %al, $CONFIG_POST_IO_PORT
-#else
- post_code(POST_DEAD_CODE)
-#endif
- movl $LHLT_DELAY, %ecx
-.Lhlt_Delay:
- outb %al, $0xED
- loop .Lhlt_Delay
- jmp .Lhlt
diff --git a/src/soc/intel/skylake/romstage/Makefile.inc b/src/soc/intel/skylake/romstage/Makefile.inc
index 877712f..c6f0057 100644
--- a/src/soc/intel/skylake/romstage/Makefile.inc
+++ b/src/soc/intel/skylake/romstage/Makefile.inc
@@ -1,6 +1,7 @@
verstage-y += power_state.c
romstage-$(CONFIG_PLATFORM_USES_FSP2_0) += car_stage.S
+romstage-$(CONFIG_PLATFORM_USES_FSP1_1) += car_stage_entry.S
romstage-y += pmc.c
romstage-y += power_state.c
romstage-$(CONFIG_PLATFORM_USES_FSP1_1) += romstage.c
diff --git a/src/soc/intel/skylake/romstage/car_stage_entry.S b/src/soc/intel/skylake/romstage/car_stage_entry.S
new file mode 100644
index 0000000..923a346
--- /dev/null
+++ b/src/soc/intel/skylake/romstage/car_stage_entry.S
@@ -0,0 +1,40 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 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.
+ */
+
+/* I/O delay between post codes on failure */
+#define LHLT_DELAY 0x50000
+
+.text
+.global car_stage_entry
+car_stage_entry:
+ call car_stage_c_entry
+ #include "src/drivers/intel/fsp1_1/after_raminit.S"
+
+
+ movb $0x69, %ah
+ jmp .Lhlt
+
+.Lhlt:
+ xchg %al, %ah
+#if IS_ENABLED(CONFIG_POST_IO)
+ outb %al, $CONFIG_POST_IO_PORT
+#else
+ post_code(POST_DEAD_CODE)
+#endif
+ movl $LHLT_DELAY, %ecx
+.Lhlt_Delay:
+ outb %al, $0xED
+ loop .Lhlt_Delay
+ jmp .Lhlt
Kane Chen (kane.chen(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18060
-gerrit
commit 420c79a347e514ef288c2c077f7c113ca6a233ce
Author: Kane Chen <kane.chen(a)intel.com>
Date: Mon Jan 9 10:45:20 2017 +0800
soc/intel/apollolake: config usb2 eye pattern fsp UPD by devicetree
This code allows people override the usb2 eye pattern UPD settings for boards
BUG=chrome-os-partner:61031
BRANCH=None
TEST=Usb2 function ok and make sure fsp upd is overridden
Change-Id: I5fab620a29aba196edf1f24ffe6a1695de1e523e
Signed-off-by: Kane Chen <kane.chen(a)intel.com>
---
src/soc/intel/apollolake/chip.c | 32 +++++++++++++++++++++++++++++
src/soc/intel/apollolake/chip.h | 5 +++++
src/soc/intel/apollolake/include/soc/usb.h | 33 ++++++++++++++++++++++++++++++
3 files changed, 70 insertions(+)
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index a24ca33..01699c7 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -436,6 +436,7 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd)
{
FSP_S_CONFIG *silconfig = &silupd->FspsConfig;
static struct soc_intel_apollolake_config *cfg;
+ uint8_t port;
/* Load VBT before devicetree-specific config. */
silconfig->GraphicsConfigPtr = (uintptr_t)vbt;
@@ -491,6 +492,37 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd)
/* Bios config lockdown Audio clk and power gate */
silconfig->BiosCfgLockDown = cfg->hdaudio_bios_config_lockdown;
+ /* ApolloLake USB2 eye diagram settings per port */
+ for (port = 0; port < APOLLOLAKE_USB2_PORT_MAX; port++) {
+ if (cfg->usb2eye[port].Usb20PerPortTxPeHalf != 0)
+ silconfig->PortUsb20PerPortTxPeHalf[port] =
+ cfg->usb2eye[port].Usb20PerPortTxPeHalf;
+
+ if (cfg->usb2eye[port].Usb20PerPortPeTxiSet != 0)
+ silconfig->PortUsb20PerPortPeTxiSet[port] =
+ cfg->usb2eye[port].Usb20PerPortPeTxiSet;
+
+ if (cfg->usb2eye[port].Usb20PerPortTxiSet != 0)
+ silconfig->PortUsb20PerPortTxiSet[port] =
+ cfg->usb2eye[port].Usb20PerPortTxiSet;
+
+ if (cfg->usb2eye[port].Usb20HsSkewSel != 0)
+ silconfig->PortUsb20HsSkewSel[port] =
+ cfg->usb2eye[port].Usb20HsSkewSel;
+
+ if (cfg->usb2eye[port].Usb20IUsbTxEmphasisEn != 0)
+ silconfig->PortUsb20IUsbTxEmphasisEn[port] =
+ cfg->usb2eye[port].Usb20IUsbTxEmphasisEn;
+
+ if (cfg->usb2eye[port].Usb20PerPortRXISet != 0)
+ silconfig->PortUsb20PerPortRXISet[port] =
+ cfg->usb2eye[port].Usb20PerPortRXISet;
+
+ if (cfg->usb2eye[port].Usb20HsNpreDrvSel != 0)
+ silconfig->PortUsb20HsNpreDrvSel[port] =
+ cfg->usb2eye[port].Usb20HsNpreDrvSel;
+ }
+
}
struct chip_operations soc_intel_apollolake_ops = {
diff --git a/src/soc/intel/apollolake/chip.h b/src/soc/intel/apollolake/chip.h
index 5f8fed9..d60ffbf 100644
--- a/src/soc/intel/apollolake/chip.h
+++ b/src/soc/intel/apollolake/chip.h
@@ -24,6 +24,7 @@
#include <soc/intel/common/lpss_i2c.h>
#include <device/i2c.h>
#include <soc/pm.h>
+#include <soc/usb.h>
#define CLKREQ_DISABLED 0xf
#define APOLLOLAKE_I2C_DEV_MAX 8
@@ -115,6 +116,10 @@ struct soc_intel_apollolake_config {
/* GPIO pin for PERST_0 */
uint16_t prt0_gpio;
+
+ /* USB2 eye diagram settings per port */
+ struct usb2_eye_per_port usb2eye[APOLLOLAKE_USB2_PORT_MAX];
+
};
#endif /* _SOC_APOLLOLAKE_CHIP_H_ */
diff --git a/src/soc/intel/apollolake/include/soc/usb.h b/src/soc/intel/apollolake/include/soc/usb.h
new file mode 100644
index 0000000..e29d8ae
--- /dev/null
+++ b/src/soc/intel/apollolake/include/soc/usb.h
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2017 Intel Corp.
+ * (Written by Kane Chen <Kane.Chen(a)intel.com> for 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 _SOC_APOLLOLAKE_USB_H_
+#define _SOC_APOLLOLAKE_USB_H_
+
+#define APOLLOLAKE_USB2_PORT_MAX 8
+
+struct usb2_eye_per_port {
+ uint8_t Usb20PerPortTxPeHalf;
+ uint8_t Usb20PerPortPeTxiSet;
+ uint8_t Usb20PerPortTxiSet;
+ uint8_t Usb20HsSkewSel;
+ uint8_t Usb20IUsbTxEmphasisEn;
+ uint8_t Usb20PerPortRXISet;
+ uint8_t Usb20HsNpreDrvSel;
+};
+
+#endif /* _SOC_APOLLOLAKE_USB_H_ */
Kane Chen (kane.chen(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18060
-gerrit
commit 59c2872748d3be640033515c99b4a4b9b8ae4ded
Author: Kane Chen <kane.chen(a)intel.com>
Date: Mon Jan 9 10:45:20 2017 +0800
soc/intel/apollolake: config usb2 eye pattern fsp UPD by devicetree
This code allows people override the usb2 eye pattern UPD settings for boards
BUG=chrome-os-partner:61031
BRANCH=None
TEST=Usb2 function ok and compare the settings to the original settings on reef
Change-Id: I5fab620a29aba196edf1f24ffe6a1695de1e523e
Signed-off-by: Kane Chen <kane.chen(a)intel.com>
---
.../google/reef/variants/baseboard/devicetree.cb | 1 +
src/soc/intel/apollolake/chip.c | 32 +++++++++++++++++++++
src/soc/intel/apollolake/chip.h | 5 ++++
src/soc/intel/apollolake/include/soc/usb.h | 33 ++++++++++++++++++++++
4 files changed, 71 insertions(+)
diff --git a/src/mainboard/google/reef/variants/baseboard/devicetree.cb b/src/mainboard/google/reef/variants/baseboard/devicetree.cb
index 7db4f15..af88cbc 100644
--- a/src/mainboard/google/reef/variants/baseboard/devicetree.cb
+++ b/src/mainboard/google/reef/variants/baseboard/devicetree.cb
@@ -112,6 +112,7 @@ chip soc/intel/apollolake
# Minimum SLP S3 assertion width 28ms.
register "slp_s3_assertion_width_usecs" = "28000"
+
device domain 0 on
device pci 00.0 on end # - Host Bridge
device pci 00.1 on end # - DPTF
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index a24ca33..01699c7 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -436,6 +436,7 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd)
{
FSP_S_CONFIG *silconfig = &silupd->FspsConfig;
static struct soc_intel_apollolake_config *cfg;
+ uint8_t port;
/* Load VBT before devicetree-specific config. */
silconfig->GraphicsConfigPtr = (uintptr_t)vbt;
@@ -491,6 +492,37 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd)
/* Bios config lockdown Audio clk and power gate */
silconfig->BiosCfgLockDown = cfg->hdaudio_bios_config_lockdown;
+ /* ApolloLake USB2 eye diagram settings per port */
+ for (port = 0; port < APOLLOLAKE_USB2_PORT_MAX; port++) {
+ if (cfg->usb2eye[port].Usb20PerPortTxPeHalf != 0)
+ silconfig->PortUsb20PerPortTxPeHalf[port] =
+ cfg->usb2eye[port].Usb20PerPortTxPeHalf;
+
+ if (cfg->usb2eye[port].Usb20PerPortPeTxiSet != 0)
+ silconfig->PortUsb20PerPortPeTxiSet[port] =
+ cfg->usb2eye[port].Usb20PerPortPeTxiSet;
+
+ if (cfg->usb2eye[port].Usb20PerPortTxiSet != 0)
+ silconfig->PortUsb20PerPortTxiSet[port] =
+ cfg->usb2eye[port].Usb20PerPortTxiSet;
+
+ if (cfg->usb2eye[port].Usb20HsSkewSel != 0)
+ silconfig->PortUsb20HsSkewSel[port] =
+ cfg->usb2eye[port].Usb20HsSkewSel;
+
+ if (cfg->usb2eye[port].Usb20IUsbTxEmphasisEn != 0)
+ silconfig->PortUsb20IUsbTxEmphasisEn[port] =
+ cfg->usb2eye[port].Usb20IUsbTxEmphasisEn;
+
+ if (cfg->usb2eye[port].Usb20PerPortRXISet != 0)
+ silconfig->PortUsb20PerPortRXISet[port] =
+ cfg->usb2eye[port].Usb20PerPortRXISet;
+
+ if (cfg->usb2eye[port].Usb20HsNpreDrvSel != 0)
+ silconfig->PortUsb20HsNpreDrvSel[port] =
+ cfg->usb2eye[port].Usb20HsNpreDrvSel;
+ }
+
}
struct chip_operations soc_intel_apollolake_ops = {
diff --git a/src/soc/intel/apollolake/chip.h b/src/soc/intel/apollolake/chip.h
index 5f8fed9..d60ffbf 100644
--- a/src/soc/intel/apollolake/chip.h
+++ b/src/soc/intel/apollolake/chip.h
@@ -24,6 +24,7 @@
#include <soc/intel/common/lpss_i2c.h>
#include <device/i2c.h>
#include <soc/pm.h>
+#include <soc/usb.h>
#define CLKREQ_DISABLED 0xf
#define APOLLOLAKE_I2C_DEV_MAX 8
@@ -115,6 +116,10 @@ struct soc_intel_apollolake_config {
/* GPIO pin for PERST_0 */
uint16_t prt0_gpio;
+
+ /* USB2 eye diagram settings per port */
+ struct usb2_eye_per_port usb2eye[APOLLOLAKE_USB2_PORT_MAX];
+
};
#endif /* _SOC_APOLLOLAKE_CHIP_H_ */
diff --git a/src/soc/intel/apollolake/include/soc/usb.h b/src/soc/intel/apollolake/include/soc/usb.h
new file mode 100644
index 0000000..e29d8ae
--- /dev/null
+++ b/src/soc/intel/apollolake/include/soc/usb.h
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2017 Intel Corp.
+ * (Written by Kane Chen <Kane.Chen(a)intel.com> for 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 _SOC_APOLLOLAKE_USB_H_
+#define _SOC_APOLLOLAKE_USB_H_
+
+#define APOLLOLAKE_USB2_PORT_MAX 8
+
+struct usb2_eye_per_port {
+ uint8_t Usb20PerPortTxPeHalf;
+ uint8_t Usb20PerPortPeTxiSet;
+ uint8_t Usb20PerPortTxiSet;
+ uint8_t Usb20HsSkewSel;
+ uint8_t Usb20IUsbTxEmphasisEn;
+ uint8_t Usb20PerPortRXISet;
+ uint8_t Usb20HsNpreDrvSel;
+};
+
+#endif /* _SOC_APOLLOLAKE_USB_H_ */
Kane Chen (kane.chen(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18060
-gerrit
commit a231c665578729ab8cfe58c468fbc086bb9e8c36
Author: Kane Chen <kane.chen(a)intel.com>
Date: Mon Jan 9 10:45:20 2017 +0800
soc/intel/apollolake: config usb2 eye pattern fsp UPD by devicetree
This code allows people override the usb2 eye pattern UPD settings for boards
BUG=None
BRANCH=chrome-os-partner:61031
TEST=Usb2 function ok and compare the settings to the original settings on reef
Change-Id: I5fab620a29aba196edf1f24ffe6a1695de1e523e
Signed-off-by: Kane Chen <kane.chen(a)intel.com>
---
.../google/reef/variants/baseboard/devicetree.cb | 1 +
src/soc/intel/apollolake/chip.c | 32 +++++++++++++++++++++
src/soc/intel/apollolake/chip.h | 5 ++++
src/soc/intel/apollolake/include/soc/usb.h | 33 ++++++++++++++++++++++
4 files changed, 71 insertions(+)
diff --git a/src/mainboard/google/reef/variants/baseboard/devicetree.cb b/src/mainboard/google/reef/variants/baseboard/devicetree.cb
index 7db4f15..af88cbc 100644
--- a/src/mainboard/google/reef/variants/baseboard/devicetree.cb
+++ b/src/mainboard/google/reef/variants/baseboard/devicetree.cb
@@ -112,6 +112,7 @@ chip soc/intel/apollolake
# Minimum SLP S3 assertion width 28ms.
register "slp_s3_assertion_width_usecs" = "28000"
+
device domain 0 on
device pci 00.0 on end # - Host Bridge
device pci 00.1 on end # - DPTF
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index a24ca33..01699c7 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -436,6 +436,7 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd)
{
FSP_S_CONFIG *silconfig = &silupd->FspsConfig;
static struct soc_intel_apollolake_config *cfg;
+ uint8_t port;
/* Load VBT before devicetree-specific config. */
silconfig->GraphicsConfigPtr = (uintptr_t)vbt;
@@ -491,6 +492,37 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd)
/* Bios config lockdown Audio clk and power gate */
silconfig->BiosCfgLockDown = cfg->hdaudio_bios_config_lockdown;
+ /* ApolloLake USB2 eye diagram settings per port */
+ for (port = 0; port < APOLLOLAKE_USB2_PORT_MAX; port++) {
+ if (cfg->usb2eye[port].Usb20PerPortTxPeHalf != 0)
+ silconfig->PortUsb20PerPortTxPeHalf[port] =
+ cfg->usb2eye[port].Usb20PerPortTxPeHalf;
+
+ if (cfg->usb2eye[port].Usb20PerPortPeTxiSet != 0)
+ silconfig->PortUsb20PerPortPeTxiSet[port] =
+ cfg->usb2eye[port].Usb20PerPortPeTxiSet;
+
+ if (cfg->usb2eye[port].Usb20PerPortTxiSet != 0)
+ silconfig->PortUsb20PerPortTxiSet[port] =
+ cfg->usb2eye[port].Usb20PerPortTxiSet;
+
+ if (cfg->usb2eye[port].Usb20HsSkewSel != 0)
+ silconfig->PortUsb20HsSkewSel[port] =
+ cfg->usb2eye[port].Usb20HsSkewSel;
+
+ if (cfg->usb2eye[port].Usb20IUsbTxEmphasisEn != 0)
+ silconfig->PortUsb20IUsbTxEmphasisEn[port] =
+ cfg->usb2eye[port].Usb20IUsbTxEmphasisEn;
+
+ if (cfg->usb2eye[port].Usb20PerPortRXISet != 0)
+ silconfig->PortUsb20PerPortRXISet[port] =
+ cfg->usb2eye[port].Usb20PerPortRXISet;
+
+ if (cfg->usb2eye[port].Usb20HsNpreDrvSel != 0)
+ silconfig->PortUsb20HsNpreDrvSel[port] =
+ cfg->usb2eye[port].Usb20HsNpreDrvSel;
+ }
+
}
struct chip_operations soc_intel_apollolake_ops = {
diff --git a/src/soc/intel/apollolake/chip.h b/src/soc/intel/apollolake/chip.h
index 5f8fed9..d60ffbf 100644
--- a/src/soc/intel/apollolake/chip.h
+++ b/src/soc/intel/apollolake/chip.h
@@ -24,6 +24,7 @@
#include <soc/intel/common/lpss_i2c.h>
#include <device/i2c.h>
#include <soc/pm.h>
+#include <soc/usb.h>
#define CLKREQ_DISABLED 0xf
#define APOLLOLAKE_I2C_DEV_MAX 8
@@ -115,6 +116,10 @@ struct soc_intel_apollolake_config {
/* GPIO pin for PERST_0 */
uint16_t prt0_gpio;
+
+ /* USB2 eye diagram settings per port */
+ struct usb2_eye_per_port usb2eye[APOLLOLAKE_USB2_PORT_MAX];
+
};
#endif /* _SOC_APOLLOLAKE_CHIP_H_ */
diff --git a/src/soc/intel/apollolake/include/soc/usb.h b/src/soc/intel/apollolake/include/soc/usb.h
new file mode 100644
index 0000000..e29d8ae
--- /dev/null
+++ b/src/soc/intel/apollolake/include/soc/usb.h
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2017 Intel Corp.
+ * (Written by Kane Chen <Kane.Chen(a)intel.com> for 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 _SOC_APOLLOLAKE_USB_H_
+#define _SOC_APOLLOLAKE_USB_H_
+
+#define APOLLOLAKE_USB2_PORT_MAX 8
+
+struct usb2_eye_per_port {
+ uint8_t Usb20PerPortTxPeHalf;
+ uint8_t Usb20PerPortPeTxiSet;
+ uint8_t Usb20PerPortTxiSet;
+ uint8_t Usb20HsSkewSel;
+ uint8_t Usb20IUsbTxEmphasisEn;
+ uint8_t Usb20PerPortRXISet;
+ uint8_t Usb20HsNpreDrvSel;
+};
+
+#endif /* _SOC_APOLLOLAKE_USB_H_ */
Kane Chen (kane.chen(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18060
-gerrit
commit d46fe099839bcf15b118c569377dce2ab135bf35
Author: Kane Chen <kane.chen(a)intel.com>
Date: Mon Jan 9 10:45:20 2017 +0800
soc/intel/apollolake: add options for configuring usb2 eye pattern fsp UPD in devicetree
This code allows people override the usb2 eye pattern UPD settings for boards
BUG=None
BRANCH=chrome-os-partner:61031
TEST=Usb2 function ok and compare the settings to the original settings on reef
Change-Id: I5fab620a29aba196edf1f24ffe6a1695de1e523e
Signed-off-by: Kane Chen <kane.chen(a)intel.com>
---
.../google/reef/variants/baseboard/devicetree.cb | 1 +
src/soc/intel/apollolake/chip.c | 32 +++++++++++++++++++++
src/soc/intel/apollolake/chip.h | 5 ++++
src/soc/intel/apollolake/include/soc/usb.h | 33 ++++++++++++++++++++++
4 files changed, 71 insertions(+)
diff --git a/src/mainboard/google/reef/variants/baseboard/devicetree.cb b/src/mainboard/google/reef/variants/baseboard/devicetree.cb
index 7db4f15..af88cbc 100644
--- a/src/mainboard/google/reef/variants/baseboard/devicetree.cb
+++ b/src/mainboard/google/reef/variants/baseboard/devicetree.cb
@@ -112,6 +112,7 @@ chip soc/intel/apollolake
# Minimum SLP S3 assertion width 28ms.
register "slp_s3_assertion_width_usecs" = "28000"
+
device domain 0 on
device pci 00.0 on end # - Host Bridge
device pci 00.1 on end # - DPTF
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index a24ca33..01699c7 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -436,6 +436,7 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd)
{
FSP_S_CONFIG *silconfig = &silupd->FspsConfig;
static struct soc_intel_apollolake_config *cfg;
+ uint8_t port;
/* Load VBT before devicetree-specific config. */
silconfig->GraphicsConfigPtr = (uintptr_t)vbt;
@@ -491,6 +492,37 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd)
/* Bios config lockdown Audio clk and power gate */
silconfig->BiosCfgLockDown = cfg->hdaudio_bios_config_lockdown;
+ /* ApolloLake USB2 eye diagram settings per port */
+ for (port = 0; port < APOLLOLAKE_USB2_PORT_MAX; port++) {
+ if (cfg->usb2eye[port].Usb20PerPortTxPeHalf != 0)
+ silconfig->PortUsb20PerPortTxPeHalf[port] =
+ cfg->usb2eye[port].Usb20PerPortTxPeHalf;
+
+ if (cfg->usb2eye[port].Usb20PerPortPeTxiSet != 0)
+ silconfig->PortUsb20PerPortPeTxiSet[port] =
+ cfg->usb2eye[port].Usb20PerPortPeTxiSet;
+
+ if (cfg->usb2eye[port].Usb20PerPortTxiSet != 0)
+ silconfig->PortUsb20PerPortTxiSet[port] =
+ cfg->usb2eye[port].Usb20PerPortTxiSet;
+
+ if (cfg->usb2eye[port].Usb20HsSkewSel != 0)
+ silconfig->PortUsb20HsSkewSel[port] =
+ cfg->usb2eye[port].Usb20HsSkewSel;
+
+ if (cfg->usb2eye[port].Usb20IUsbTxEmphasisEn != 0)
+ silconfig->PortUsb20IUsbTxEmphasisEn[port] =
+ cfg->usb2eye[port].Usb20IUsbTxEmphasisEn;
+
+ if (cfg->usb2eye[port].Usb20PerPortRXISet != 0)
+ silconfig->PortUsb20PerPortRXISet[port] =
+ cfg->usb2eye[port].Usb20PerPortRXISet;
+
+ if (cfg->usb2eye[port].Usb20HsNpreDrvSel != 0)
+ silconfig->PortUsb20HsNpreDrvSel[port] =
+ cfg->usb2eye[port].Usb20HsNpreDrvSel;
+ }
+
}
struct chip_operations soc_intel_apollolake_ops = {
diff --git a/src/soc/intel/apollolake/chip.h b/src/soc/intel/apollolake/chip.h
index 5f8fed9..d60ffbf 100644
--- a/src/soc/intel/apollolake/chip.h
+++ b/src/soc/intel/apollolake/chip.h
@@ -24,6 +24,7 @@
#include <soc/intel/common/lpss_i2c.h>
#include <device/i2c.h>
#include <soc/pm.h>
+#include <soc/usb.h>
#define CLKREQ_DISABLED 0xf
#define APOLLOLAKE_I2C_DEV_MAX 8
@@ -115,6 +116,10 @@ struct soc_intel_apollolake_config {
/* GPIO pin for PERST_0 */
uint16_t prt0_gpio;
+
+ /* USB2 eye diagram settings per port */
+ struct usb2_eye_per_port usb2eye[APOLLOLAKE_USB2_PORT_MAX];
+
};
#endif /* _SOC_APOLLOLAKE_CHIP_H_ */
diff --git a/src/soc/intel/apollolake/include/soc/usb.h b/src/soc/intel/apollolake/include/soc/usb.h
new file mode 100644
index 0000000..e29d8ae
--- /dev/null
+++ b/src/soc/intel/apollolake/include/soc/usb.h
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2017 Intel Corp.
+ * (Written by Kane Chen <Kane.Chen(a)intel.com> for 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 _SOC_APOLLOLAKE_USB_H_
+#define _SOC_APOLLOLAKE_USB_H_
+
+#define APOLLOLAKE_USB2_PORT_MAX 8
+
+struct usb2_eye_per_port {
+ uint8_t Usb20PerPortTxPeHalf;
+ uint8_t Usb20PerPortPeTxiSet;
+ uint8_t Usb20PerPortTxiSet;
+ uint8_t Usb20HsSkewSel;
+ uint8_t Usb20IUsbTxEmphasisEn;
+ uint8_t Usb20PerPortRXISet;
+ uint8_t Usb20HsNpreDrvSel;
+};
+
+#endif /* _SOC_APOLLOLAKE_USB_H_ */