Skip to contentSkip to conversation

x86: baytrail: Configure FSP UPD from device tree

PATCH Superseded Andrew Bradford 4 participants 30 messages Aug 7, 2015 – Mar 12, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

---

Changes from v3:
- Fix small typographical issues (lowercase hex numbers, grammar, etc), no functional changes.

Changes from v2:
- Switch to using booleans in dts, where appropriate.
- Add Bayley Bay dts modifications.
- Clarify docs to show bool versus int properties.
- Include enable-igt property from FSPv4.

Changes from v1:
- Use "-" rather than "_" in dt property names.
- Use "Bay Trail" for the formal name of the Intel product family.
- Use an "fsp," prefix for dt property names for clarity.
- Fix minor code indentation issues.
- Create a dt subnode for the memory-down-params.
- Clarify documentation that dt overrides the FSP's config, so we don't use booleans.

 arch/x86/cpu/baytrail/fsp_configs.c                | 167 +++++++++++++++++----
 arch/x86/dts/bayleybay.dts                         |  40 +++++
 arch/x86/dts/minnowmax.dts                         |  58 +++++++
 .../misc/intel,baytrail-fsp.txt                    | 158 +++++++++++++++++++
 include/fdtdec.h                                   |   2 +
 lib/fdtdec.c                                       |   2 +
 6 files changed, 397 insertions(+), 30 deletions(-)
 create mode 100644 doc/device-tree-bindings/misc/intel,baytrail-fsp.txt
arch/x86/cpu/baytrail/fsp_configs.c +137 -30
index 86b6926..ba56ebb 100644
@@ -1,14 +1,18 @@
 /*
  * Copyright (C) 2013, Intel Corporation
  * Copyright (C) 2014, Bin Meng <[email protected]>
+ * Copyright (C) 2015, Kodak Alaris, Inc
  *
  * SPDX-License-Identifier:	Intel
  */
 
 #include <common.h>
+#include <fdtdec.h>
 #include <asm/arch/fsp/azalia.h>
 #include <asm/fsp/fsp_support.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /* ALC262 Verb Table - 10EC0262 */
 static const uint32_t verb_table_data13[] = {
 	/* Pin Complex (NID 0x11) */
@@ -116,41 +120,144 @@ const struct pch_azalia_config azalia_config = {
 	.reset_wait_timer_us = 300
 };
 
+/**
+ * Override the FSP's UPD.
+ * If the device tree does not specify an integer setting, use the default
+ * provided in Intel's Baytrail_FSP_Gold4.tgz release FSP/BayleyBayFsp.bsf file.
+ */
 void update_fsp_upd(struct upd_region *fsp_upd)
 {
 	struct memory_down_data *mem;
+	const void *blob = gd->fdt_blob;
+	int node;
 
-	/*
-	 * Configure everything here to avoid the poor hard-pressed user
-	 * needing to run Intel's binary configuration tool. It may also allow
-	 * us to support the 1GB single core variant easily.
-	 *
-	 * TODO(sjg at chromium.org): Move to device tree
-	 */
-	fsp_upd->mrc_init_tseg_size = 8;
-	fsp_upd->mrc_init_mmio_size = 0x800;
-	fsp_upd->emmc_boot_mode = 0xff;
-	fsp_upd->enable_sdio = 1;
-	fsp_upd->enable_sdcard = 1;
-	fsp_upd->enable_hsuart0 = 1;
 	fsp_upd->azalia_config_ptr = (uint32_t)&azalia_config;
-	fsp_upd->enable_i2_c0 = 0;
-	fsp_upd->enable_i2_c2 = 0;
-	fsp_upd->enable_i2_c3 = 0;
-	fsp_upd->enable_i2_c4 = 0;
-	fsp_upd->enable_xhci = 0;
-	fsp_upd->igd_render_standby = 1;
+
+	node = fdtdec_next_compatible(blob, 0, COMPAT_INTEL_BAYTRAIL_FSP);
+	if (node < 0) {
+		debug("%s: Cannot find FSP node\n", __func__);
+		return;
+	}
+
+	fsp_upd->mrc_init_tseg_size = fdtdec_get_int(blob, node,
+						     "fsp,mrc-init-tseg-size",
+						     0);
+	fsp_upd->mrc_init_mmio_size = fdtdec_get_int(blob, node,
+						     "fsp,mrc-init-mmio-size",
+						     0x800);
+	fsp_upd->mrc_init_spd_addr1 = fdtdec_get_int(blob, node,
+						     "fsp,mrc-init-spd-addr1",
+						     0xa0);
+	fsp_upd->mrc_init_spd_addr2 = fdtdec_get_int(blob, node,
+						     "fsp,mrc-init-spd-addr2",
+						     0xa2);
+	fsp_upd->emmc_boot_mode = fdtdec_get_int(blob, node,
+						 "fsp,emmc-boot-mode", 2);
+	fsp_upd->enable_sdio = fdtdec_get_bool(blob, node, "fsp,enable-sdio");
+	fsp_upd->enable_sdcard = fdtdec_get_bool(blob, node,
+						 "fsp,enable-sdcard");
+	fsp_upd->enable_hsuart0 = fdtdec_get_bool(blob, node,
+						  "fsp,enable-hsuart0");
+	fsp_upd->enable_hsuart1 = fdtdec_get_bool(blob, node,
+						  "fsp,enable-hsuart1");
+	fsp_upd->enable_spi = fdtdec_get_bool(blob, node, "fsp,enable-spi");
+	fsp_upd->enable_sata = fdtdec_get_bool(blob, node, "fsp,enable-sata");
+	fsp_upd->sata_mode = fdtdec_get_int(blob, node, "fsp,sata-mode", 1);
+	fsp_upd->enable_azalia = fdtdec_get_bool(blob, node,
+						 "fsp,enable-azalia");
+	fsp_upd->enable_xhci = fdtdec_get_bool(blob, node, "fsp,enable-xhci");
+	fsp_upd->enable_lpe = fdtdec_get_bool(blob, node, "fsp,enable-lpe");
+	fsp_upd->lpss_sio_enable_pci_mode = fdtdec_get_bool(blob, node,
+							    "fsp,lpss-sio-enable-pci-mode");
+	fsp_upd->enable_dma0 = fdtdec_get_bool(blob, node, "fsp,enable-dma0");
+	fsp_upd->enable_dma1 = fdtdec_get_bool(blob, node, "fsp,enable-dma1");
+	fsp_upd->enable_i2_c0 = fdtdec_get_bool(blob, node, "fsp,enable-i2c0");
+	fsp_upd->enable_i2_c1 = fdtdec_get_bool(blob, node, "fsp,enable-i2c1");
+	fsp_upd->enable_i2_c2 = fdtdec_get_bool(blob, node, "fsp,enable-i2c2");
+	fsp_upd->enable_i2_c3 = fdtdec_get_bool(blob, node, "fsp,enable-i2c3");
+	fsp_upd->enable_i2_c4 = fdtdec_get_bool(blob, node, "fsp,enable-i2c4");
+	fsp_upd->enable_i2_c5 = fdtdec_get_bool(blob, node, "fsp,enable-i2c5");
+	fsp_upd->enable_i2_c6 = fdtdec_get_bool(blob, node, "fsp,enable-i2c6");
+	fsp_upd->enable_pwm0 = fdtdec_get_bool(blob, node, "fsp,enable-pwm0");
+	fsp_upd->enable_pwm1 = fdtdec_get_bool(blob, node, "fsp,enable-pwm1");
+	fsp_upd->enable_hsi = fdtdec_get_bool(blob, node, "fsp,enable-hsi");
+	fsp_upd->igd_dvmt50_pre_alloc = fdtdec_get_int(blob, node,
+						       "fsp,igd-dvmt50-pre-alloc",
+						       2);
+	fsp_upd->aperture_size = fdtdec_get_int(blob, node, "fsp,aperture-size",
+						2);
+	fsp_upd->gtt_size = fdtdec_get_int(blob, node, "fsp,gtt-size", 2);
+	fsp_upd->serial_debug_port_address = fdtdec_get_int(blob, node,
+							    "fsp,serial-debug-port-address",
+							    0x3f8);
+	fsp_upd->serial_debug_port_type = fdtdec_get_int(blob, node,
+							 "fsp,serial-debug-port-type",
+							 1);
+	fsp_upd->mrc_debug_msg = fdtdec_get_bool(blob, node,
+						 "fsp,mrc-debug-msg");
+	fsp_upd->isp_enable = fdtdec_get_bool(blob, node, "fsp,isp-enable");
+	fsp_upd->scc_enable_pci_mode = fdtdec_get_bool(blob, node,
+						       "fsp,scc-enable-pci-mode");
+	fsp_upd->igd_render_standby = fdtdec_get_bool(blob, node,
+						      "fsp,igd-render-standby");
+	fsp_upd->txe_uma_enable = fdtdec_get_bool(blob, node,
+						  "fsp,txe-uma-enable");
+	fsp_upd->os_selection = fdtdec_get_int(blob, node, "fsp,os-selection", 4);
+	fsp_upd->emmc45_ddr50_enabled = fdtdec_get_bool(blob, node,
+							"fsp,emmc45-ddr50-enabled");
+	fsp_upd->emmc45_hs200_enabled = fdtdec_get_bool(blob, node,
+							"fsp,emmc45-hs200-enabled");
+	fsp_upd->emmc45_retune_timer_value = fdtdec_get_int(blob, node,
+							    "fsp,emmc45-retune-timer-value",
+							    8);
+	fsp_upd->enable_igd = fdtdec_get_bool(blob, node, "fsp,enable-igd");
 
 	mem = &fsp_upd->memory_params;
-	mem->enable_memory_down = 1;
-	mem->dram_speed = 1;
-	mem->dimm_width = 1;
-	mem->dimm_density = 2;
-	mem->dimm_tcl = 0xb;
-	mem->dimm_trpt_rcd = 0xb;
-	mem->dimm_twr = 0xc;
-	mem->dimm_twtr = 6;
-	mem->dimm_trrd = 6;
-	mem->dimm_trtp = 6;
-	mem->dimm_tfaw = 0x14;
+	mem->enable_memory_down = fdtdec_get_bool(blob, node,
+						  "fsp,enable-memory-down");
+	if (mem->enable_memory_down) {
+		node = fdtdec_next_compatible(blob, node,
+					      COMPAT_INTEL_BAYTRAIL_FSP_MDP);
+		if (node < 0) {
+			debug("%s: Cannot find FSP memory-down-params node\n",
+			      __func__);
+		} else {
+			mem->dram_speed = fdtdec_get_int(blob, node,
+							 "fsp,dram-speed",
+							 0x02);
+			mem->dram_type = fdtdec_get_int(blob, node,
+							"fsp,dram-type", 0x01);
+			mem->dimm_0_enable = fdtdec_get_bool(blob, node,
+							     "fsp,dimm-0-enable");
+			mem->dimm_1_enable = fdtdec_get_bool(blob, node,
+							     "fsp,dimm-1-enable");
+			mem->dimm_width = fdtdec_get_int(blob, node,
+							 "fsp,dimm-width",
+							 0x00);
+			mem->dimm_density = fdtdec_get_int(blob, node,
+							   "fsp,dimm-density",
+							   0x01);
+			mem->dimm_bus_width = fdtdec_get_int(blob, node,
+							     "fsp,dimm-bus-width",
+							     0x03);
+			mem->dimm_sides = fdtdec_get_int(blob, node,
+							 "fsp,dimm-sides",
+							 0x00);
+			mem->dimm_tcl = fdtdec_get_int(blob, node,
+						       "fsp,dimm-tcl", 0x09);
+			mem->dimm_trpt_rcd = fdtdec_get_int(blob, node,
+							    "fsp,dimm-trpt-rcd",
+							    0x09);
+			mem->dimm_twr = fdtdec_get_int(blob, node,
+						       "fsp,dimm-twr", 0x0A);
+			mem->dimm_twtr = fdtdec_get_int(blob, node,
+							"fsp,dimm-twtr", 0x05);
+			mem->dimm_trrd = fdtdec_get_int(blob, node,
+							"fsp,dimm-trrd", 0x04);
+			mem->dimm_trtp = fdtdec_get_int(blob, node,
+							"fsp,dimm-trtp", 0x05);
+			mem->dimm_tfaw = fdtdec_get_int(blob, node,
+							"fsp,dimm-tfaw", 0x14);
+		}
+	}
 }
arch/x86/dts/bayleybay.dts +40 -0
index 9f8fa70..0ca7c3e 100644
@@ -188,6 +188,46 @@
 		};
 	};
 
+	fsp {
+		compatible = "intel,baytrail-fsp";
+		fsp,mrc-init-tseg-size = <0>;
+		fsp,mrc-init-mmio-size = <0x800>;
+		fsp,mrc-init-spd-addr1 = <0xa0>;
+		fsp,mrc-init-spd-addr2 = <0xa2>;
+		fsp,emmc-boot-mode = <2>;
+		fsp,enable-sdio;
+		fsp,enable-sdcard;
+		fsp,enable-hsuart1;
+		fsp,enable-spi;
+		fsp,enable-sata;
+		fsp,sata-mode = <1>;
+		fsp,enable-xhci;
+		fsp,enable-lpe;
+		fsp,lpss-sio-enable-pci-mode;
+		fsp,enable-dma0;
+		fsp,enable-dma1;
+		fsp,enable-i2c0;
+		fsp,enable-i2c1;
+		fsp,enable-i2c2;
+		fsp,enable-i2c3;
+		fsp,enable-i2c4;
+		fsp,enable-i2c5;
+		fsp,enable-i2c6;
+		fsp,enable-pwm0;
+		fsp,enable-pwm1;
+		fsp,igd-dvmt50-pre-alloc = <2>;
+		fsp,aperture-size = <2>;
+		fsp,gtt-size = <2>;
+		fsp,serial-debug-port-address = <0x3f8>;
+		fsp,serial-debug-port-type = <1>;
+		fsp,mrc-debug-msg;
+		fsp,scc-enable-pci-mode;
+		fsp,os-selection = <4>;
+		fsp,emmc45-ddr50-enabled;
+		fsp,emmc45-retune-timer-value = <8>;
+		fsp,enable-igd;
+	};
+
 	microcode {
 		update at 0 {
 #include "microcode/m0230671117.dtsi"
arch/x86/dts/minnowmax.dts +58 -0

64 lines not on this page · raw message

doc/device-tree-bindings/misc/intel,baytrail-fsp.txt new file +158 -0

158 lines not on this page · raw message

include/fdtdec.h +2 -0
index 4b3f8d1..987d51a 100644
@@ -186,6 +186,8 @@ enum fdt_compat_id {
 	COMPAT_SOCIONEXT_XHCI,		/* Socionext UniPhier xHCI */
 	COMPAT_INTEL_PCH,		/* Intel PCH */
 	COMPAT_INTEL_IRQ_ROUTER,	/* Intel Interrupt Router */
+	COMPAT_INTEL_BAYTRAIL_FSP,	/* Intel Bay Trail FSP */
+	COMPAT_INTEL_BAYTRAIL_FSP_MDP,	/* Intel Bay Trail FSP memory-down params */
 
 	COMPAT_COUNT,
 };
lib/fdtdec.c +2 -0
index 48667ef..42e8a8b 100644
@@ -78,6 +78,8 @@ static const char * const compat_names[COMPAT_COUNT] = {
 	COMPAT(SOCIONEXT_XHCI, "socionext,uniphier-xhci"),
 	COMPAT(COMPAT_INTEL_PCH, "intel,bd82x6x"),
 	COMPAT(COMPAT_INTEL_IRQ_ROUTER, "intel,irq-router"),
+	COMPAT(COMPAT_INTEL_BAYTRAIL_FSP, "intel,baytrail-fsp"),
+	COMPAT(COMPAT_INTEL_BAYTRAIL_FSP_MDP, "intel,baytrail-fsp-mdp"),
 };
 
 const char *fdtdec_get_compatible(enum fdt_compat_id id)
Signature · 1 line
1.9.1
#1 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Quoted 5 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Quoted 8 lines

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

---

[snip]

Regards,
Bin

#2 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

Regards,
Simon

#3 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

I enabled the MRC debug messages as it was helpful to me as there are a set of FSP UPD device tree properties which during my development turned out to boot enough for the MRC code in the FSP to run but which would not actually end up starting u-boot. At least having the MRC debug message print out showed me that at least u-boot was operating enough to call into the FSP and that likely I had something misconfigured in the UPD memory settings. Probably not showing these debug messages is the right choice, as if someone wants more debug output then they can also use the FSPv4 debug build that Intel now provides.

Thanks for your help with this patch! :)
-Andrew

#4 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Andrew,

Quoted 40 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

Quoted 6 lines

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

Quoted 11 lines

I enabled the MRC debug messages as it was helpful to me as there are a set of FSP UPD device tree properties which during my development turned out to boot enough for the MRC code in the FSP to run but which would not actually end up starting u-boot. At least having the MRC debug message print out showed me that at least u-boot was operating enough to call into the FSP and that likely I had something misconfigured in the UPD memory settings. Probably not showing these debug messages is the right choice, as if someone wants more debug output then they can also use the FSPv4 debug build that Intel now provides.

Yep, I found the FSP debug build is pretty useful. At least you can guess what the FSP is trying to do with the hardware :-)

Quoted 2 lines

Thanks for your help with this patch! :)
-Andrew

Regards,
Bin

#5 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Bin,

Quoted 46 lines · Bin Meng

Hi Andrew,

Quoted 42 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

Quoted 7 lines
Quoted 4 lines

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

Thanks,
Andrew

#6 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

What do you think regarding to xhci vs. ehci in U-Boot?

Regards,
Bin

#7 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Bin,

Quoted 65 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

Quoted 5 lines

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

So overall I think we are in a better position to go with ehci for now, i.e. drop the fsp,enable-xhci property.

I think there is a little tweak needed to support both ports, but I haven't dug into it yet.

Regards,
Simon

#8 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

There are 3 ports on Intel Bayley Bay. One USB 3 (blue port) and two USB 2 ports. The board user guide explicitly mentions that the top USB 2 port does not work and needs PCB rework. For the other two ports, I've tested U-Boot EHCI stack and it works fine. Interesting to hear that MinnowMax also has some USB port issue. Maybe the board design is following Bayley Bay.

Quoted 3 lines

So overall I think we are in a better position to go with ehci for now, i.e. drop the fsp,enable-xhci property.

OK, then could you please remove this for Bayley Bay as well? Also I think we need remove the MRC debug output as well.

Quoted 4 lines

I think there is a little tweak needed to support both ports, but I haven't dug into it yet.

This is not possible. According to Intel E3800 datasheet, the xHCI and EHCI are mutually exclusive. We can either use xHCI, or EHCI.

Regards,
Bin

#9 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Bin,

Quoted 84 lines · Bin Meng

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Quoted 6 lines

There are 3 ports on Intel Bayley Bay. One USB 3 (blue port) and two USB 2 ports. The board user guide explicitly mentions that the top USB 2 port does not work and needs PCB rework. For the other two ports, I've tested U-Boot EHCI stack and it works fine. Interesting to hear that MinnowMax also has some USB port issue. Maybe the board design is following Bayley Bay.

Maybe.

Quoted 7 lines
Quoted 4 lines

So overall I think we are in a better position to go with ehci for now, i.e. drop the fsp,enable-xhci property.

OK, then could you please remove this for Bayley Bay as well? Also I think we need remove the MRC debug output as well.

Yes will do.

Quoted 8 lines
Quoted 5 lines

I think there is a little tweak needed to support both ports, but I haven't dug into it yet.

This is not possible. According to Intel E3800 datasheet, the xHCI and EHCI are mutually exclusive. We can either use xHCI, or EHCI.

I believe you can put the ports into a mode where both work, although presumablly they are both either EHCI or xHCI. When I boot UEFI both ports work.

Regards,
Simon

#10 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Simon,

Quoted 112 lines · Simon Glass

Hi Bin,

Quoted 84 lines · Bin Meng

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Quoted 6 lines

There are 3 ports on Intel Bayley Bay. One USB 3 (blue port) and two USB 2 ports. The board user guide explicitly mentions that the top USB 2 port does not work and needs PCB rework. For the other two ports, I've tested U-Boot EHCI stack and it works fine. Interesting to hear that MinnowMax also has some USB port issue. Maybe the board design is following Bayley Bay.

Maybe.

Quoted 7 lines
Quoted 4 lines

So overall I think we are in a better position to go with ehci for now, i.e. drop the fsp,enable-xhci property.

OK, then could you please remove this for Bayley Bay as well? Also I think we need remove the MRC debug output as well.

Yes will do.

Quoted 6 lines
Quoted 5 lines

I think there is a little tweak needed to support both ports, but I haven't dug into it yet.

Quoted 7 lines
Quoted 2 lines

This is not possible. According to Intel E3800 datasheet, the xHCI and EHCI are mutually exclusive. We can either use xHCI, or EHCI.

I believe you can put the ports into a mode where both work, although presumablly they are both either EHCI or xHCI. When I boot UEFI both ports work.

Yep, that's what I meant. When using EHCI the USB 3 port will function as a USB 2 port and when using xHCI the USB 2 port will only get high speed.

Regards,
Bin

#11 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Bin,

Quoted 118 lines · Bin Meng

Hi Simon,

Quoted 115 lines · Simon Glass

Hi Bin,

Quoted 84 lines · Bin Meng

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Quoted 6 lines

There are 3 ports on Intel Bayley Bay. One USB 3 (blue port) and two USB 2 ports. The board user guide explicitly mentions that the top USB 2 port does not work and needs PCB rework. For the other two ports, I've tested U-Boot EHCI stack and it works fine. Interesting to hear that MinnowMax also has some USB port issue. Maybe the board design is following Bayley Bay.

Maybe.

Quoted 7 lines
Quoted 4 lines

So overall I think we are in a better position to go with ehci for now, i.e. drop the fsp,enable-xhci property.

OK, then could you please remove this for Bayley Bay as well? Also I think we need remove the MRC debug output as well.

Yes will do.

Quoted 8 lines
Quoted 5 lines

I think there is a little tweak needed to support both ports, but I haven't dug into it yet.

This is not possible. According to Intel E3800 datasheet, the xHCI and EHCI are mutually exclusive. We can either use xHCI, or EHCI.

Quoted 8 lines
Quoted 4 lines

I believe you can put the ports into a mode where both work, although presumablly they are both either EHCI or xHCI. When I boot UEFI both ports work.

Yep, that's what I meant. When using EHCI the USB 3 port will function as a USB 2 port and when using xHCI the USB 2 port will only get high speed.

Ah I see.

I fixed these up and also some 80col problems. Please let me know if anything is wrong.

Applied to u-boot-x86.

Regards,
Simon

#12 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Simon,

Quoted 130 lines · Simon Glass

Hi Bin,

Quoted 118 lines · Bin Meng

Hi Simon,

Quoted 115 lines · Simon Glass

Hi Bin,

Quoted 84 lines · Bin Meng

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Quoted 6 lines

There are 3 ports on Intel Bayley Bay. One USB 3 (blue port) and two USB 2 ports. The board user guide explicitly mentions that the top USB 2 port does not work and needs PCB rework. For the other two ports, I've tested U-Boot EHCI stack and it works fine. Interesting to hear that MinnowMax also has some USB port issue. Maybe the board design is following Bayley Bay.

Maybe.

Quoted 7 lines
Quoted 4 lines

So overall I think we are in a better position to go with ehci for now, i.e. drop the fsp,enable-xhci property.

OK, then could you please remove this for Bayley Bay as well? Also I think we need remove the MRC debug output as well.

Yes will do.

Quoted 8 lines
Quoted 5 lines

I think there is a little tweak needed to support both ports, but I haven't dug into it yet.

This is not possible. According to Intel E3800 datasheet, the xHCI and EHCI are mutually exclusive. We can either use xHCI, or EHCI.

Quoted 8 lines
Quoted 4 lines

I believe you can put the ports into a mode where both work, although presumablly they are both either EHCI or xHCI. When I boot UEFI both ports work.

Yep, that's what I meant. When using EHCI the USB 3 port will function as a USB 2 port and when using xHCI the USB 2 port will only get high speed.

Quoted 6 lines

Ah I see.

I fixed these up and also some 80col problems. Please let me know if anything is wrong.

Applied to u-boot-x86.

Thanks, looks good! :)
-Andrew

#13 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

In reply to Simon Glass

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Minnowmax has a USB power switch enable which determines if the VBUS2 net is turned on or not, which will supply or not supply power to the USB 2.0 port. The blue USB 3.0 port also has an enable. Both enables and the USB ports themselves are located on page 16 of the schematic that I have.

The switches to enable the VBUS for each port are active high and pulled down. So to turn them on, I believe that's the point of the pinmuxing and GPIO settings which are used in the minnowmax.dts. Can you verify if these are correctly turning on VBUS2 (since it sounds like they are turning on VBUS1)? If not, when you turn these GPIO on manually, does the USB 2.0 port work correctly?

Quoted 2 lines

So overall I think we are in a better position to go with ehci for now, i.e. drop the fsp,enable-xhci property.

OK, sounds good!

Thanks!
-Andrew

#14 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Andrew,

Quoted 90 lines · Andrew Bradford

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Minnowmax has a USB power switch enable which determines if the VBUS2 net is turned on or not, which will supply or not supply power to the USB 2.0 port. The blue USB 3.0 port also has an enable. Both enables and the USB ports themselves are located on page 16 of the schematic that I have.

Quoted 6 lines

The switches to enable the VBUS for each port are active high and pulled down. So to turn them on, I believe that's the point of the pinmuxing and GPIO settings which are used in the minnowmax.dts. Can you verify if these are correctly turning on VBUS2 (since it sounds like they are turning on VBUS1)? If not, when you turn these GPIO on manually, does the USB 2.0 port work correctly?

I see power on the bottom port but not the top one.

Quoted 8 lines
Quoted 3 lines

So overall I think we are in a better position to go with ehci for now, i.e. drop the fsp,enable-xhci property.

OK, sounds good!

Thanks!
-Andrew

Regards,
Simon

#15 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Simon,

Quoted 93 lines · Simon Glass

Hi Andrew,

Quoted 90 lines · Andrew Bradford

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Minnowmax has a USB power switch enable which determines if the VBUS2 net is turned on or not, which will supply or not supply power to the USB 2.0 port. The blue USB 3.0 port also has an enable. Both enables and the USB ports themselves are located on page 16 of the schematic that I have.

Quoted 8 lines
Quoted 6 lines

The switches to enable the VBUS for each port are active high and pulled down. So to turn them on, I believe that's the point of the pinmuxing and GPIO settings which are used in the minnowmax.dts. Can you verify if these are correctly turning on VBUS2 (since it sounds like they are turning on VBUS1)? If not, when you turn these GPIO on manually, does the USB 2.0 port work correctly?

I see power on the bottom port but not the top one.

OK, that's odd, but likely can be fixed with changes to the pin mux and pad settings in the dts. I believe that the "pad-offset" for pin_usb_host_en1 at 0 is wrong and that it should be 0x250 instead of 0x258.

arch/x86/dts/minnowmax.dts +1 -1
index d0c0fe6..4988163 100644
@@ -39,7 +39,7 @@
 
                pin_usb_host_en1 at 0 {
                        gpio-offset = <0x80 9>;
-                       pad-offset = <0x258>;
+                       pad-offset = <0x250>;
                        mode-gpio;
                        output-value = <1>;
                        direction = <PIN_OUTPUT>;

Does that fix it?

Thanks,
Andrew

#16 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

+Gabriel

Hi Andrew,

Quoted 124 lines · Andrew Bradford

Hi Simon,

Quoted 93 lines · Simon Glass

Hi Andrew,

Quoted 90 lines · Andrew Bradford

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Minnowmax has a USB power switch enable which determines if the VBUS2 net is turned on or not, which will supply or not supply power to the USB 2.0 port. The blue USB 3.0 port also has an enable. Both enables and the USB ports themselves are located on page 16 of the schematic that I have.

Quoted 8 lines
Quoted 6 lines

The switches to enable the VBUS for each port are active high and pulled down. So to turn them on, I believe that's the point of the pinmuxing and GPIO settings which are used in the minnowmax.dts. Can you verify if these are correctly turning on VBUS2 (since it sounds like they are turning on VBUS1)? If not, when you turn these GPIO on manually, does the USB 2.0 port work correctly?

I see power on the bottom port but not the top one.

OK, that's odd, but likely can be fixed with changes to the pin mux and pad settings in the dts. I believe that the "pad-offset" for pin_usb_host_en1 at 0 is wrong and that it should be 0x250 instead of 0x258.

arch/x86/dts/minnowmax.dts +1 -1
index d0c0fe6..4988163 100644
@@ -39,7 +39,7 @@
 
                pin_usb_host_en1 at 0 {
                        gpio-offset = <0x80 9>;
-                       pad-offset = <0x258>;
+                       pad-offset = <0x250>;
                        mode-gpio;
                        output-value = <1>;
                        direction = <PIN_OUTPUT>;
Quoted 1 line

Does that fix it?

I dug into this a bit and it all seems quite broken:

- PCI bus configuration does not work in gpio_ich6_pinctrl_init(). I will send a patch for this
- gpio_ich6_get_base() returns a 16-bit word but function is also used to read the memory address which holds a 32-bit word
- Intel's hardware won't let you read the status of an output!

The last point means that _gpio_ich6_pinctrl_cfg_pin cannot work. We need to mirror the lvl register in order to be able to read it.

I confirmed that with the 'correct' value in the lvl registers both USB ports work.

Regards,
Simon

#17 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Simon,

Quoted 133 lines · Simon Glass

+Gabriel

Hi Andrew,

Quoted 124 lines · Andrew Bradford

Hi Simon,

Quoted 93 lines · Simon Glass

Hi Andrew,

Quoted 90 lines · Andrew Bradford

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Minnowmax has a USB power switch enable which determines if the VBUS2 net is turned on or not, which will supply or not supply power to the USB 2.0 port. The blue USB 3.0 port also has an enable. Both enables and the USB ports themselves are located on page 16 of the schematic that I have.

Quoted 8 lines
Quoted 6 lines

The switches to enable the VBUS for each port are active high and pulled down. So to turn them on, I believe that's the point of the pinmuxing and GPIO settings which are used in the minnowmax.dts. Can you verify if these are correctly turning on VBUS2 (since it sounds like they are turning on VBUS1)? If not, when you turn these GPIO on manually, does the USB 2.0 port work correctly?

I see power on the bottom port but not the top one.

OK, that's odd, but likely can be fixed with changes to the pin mux and pad settings in the dts. I believe that the "pad-offset" for pin_usb_host_en1 at 0 is wrong and that it should be 0x250 instead of 0x258.

arch/x86/dts/minnowmax.dts +1 -1
index d0c0fe6..4988163 100644
@@ -39,7 +39,7 @@
 
                pin_usb_host_en1 at 0 {
                        gpio-offset = <0x80 9>;
-                       pad-offset = <0x258>;
+                       pad-offset = <0x250>;
                        mode-gpio;
                        output-value = <1>;
                        direction = <PIN_OUTPUT>;
Quoted 1 line

Does that fix it?

I dug into this a bit and it all seems quite broken:

Quoted 5 lines

- PCI bus configuration does not work in gpio_ich6_pinctrl_init(). I will send a patch for this
- gpio_ich6_get_base() returns a 16-bit word but function is also used to read the memory address which holds a 32-bit word
- Intel's hardware won't let you read the status of an output!

I thought that if you cleared bit 2 in the "pad value" register (iinenb) for a GPIO that you could read back outputs. Or am I misunderstanding?

Quoted 5 lines

The last point means that _gpio_ich6_pinctrl_cfg_pin cannot work. We need to mirror the lvl register in order to be able to read it.

I confirmed that with the 'correct' value in the lvl registers both USB ports work.

OK, well that's good at least.

Thanks,
Andrew

#18 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Andrew,

Quoted 136 lines · Andrew Bradford

Hi Simon,

Quoted 133 lines · Simon Glass

+Gabriel

Hi Andrew,

Quoted 124 lines · Andrew Bradford

Hi Simon,

Quoted 93 lines · Simon Glass

Hi Andrew,

Quoted 90 lines · Andrew Bradford

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will
override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD
settings from the Intel FSPv4 Gold release to the respective dts files,
with the condition that the memory-down parameters for MinnowMax are
also used.

Quoted 7 lines
Quoted 3 lines

Signed-off-by: Andrew Bradford <[email protected]>
---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Minnowmax has a USB power switch enable which determines if the VBUS2 net is turned on or not, which will supply or not supply power to the USB 2.0 port. The blue USB 3.0 port also has an enable. Both enables and the USB ports themselves are located on page 16 of the schematic that I have.

Quoted 8 lines
Quoted 6 lines

The switches to enable the VBUS for each port are active high and pulled down. So to turn them on, I believe that's the point of the pinmuxing and GPIO settings which are used in the minnowmax.dts. Can you verify if these are correctly turning on VBUS2 (since it sounds like they are turning on VBUS1)? If not, when you turn these GPIO on manually, does the USB 2.0 port work correctly?

I see power on the bottom port but not the top one.

OK, that's odd, but likely can be fixed with changes to the pin mux and pad settings in the dts. I believe that the "pad-offset" for pin_usb_host_en1 at 0 is wrong and that it should be 0x250 instead of 0x258.

arch/x86/dts/minnowmax.dts +1 -1
index d0c0fe6..4988163 100644
@@ -39,7 +39,7 @@
 
                pin_usb_host_en1 at 0 {
                        gpio-offset = <0x80 9>;
-                       pad-offset = <0x258>;
+                       pad-offset = <0x250>;
                        mode-gpio;
                        output-value = <1>;
                        direction = <PIN_OUTPUT>;
Quoted 1 line

Does that fix it?

I dug into this a bit and it all seems quite broken:

Quoted 8 lines
Quoted 5 lines

- PCI bus configuration does not work in gpio_ich6_pinctrl_init(). I will send a patch for this
- gpio_ich6_get_base() returns a 16-bit word but function is also used to read the memory address which holds a 32-bit word
- Intel's hardware won't let you read the status of an output!

I thought that if you cleared bit 2 in the "pad value" register (iinenb) for a GPIO that you could read back outputs. Or am I misunderstanding?

That looks right. So Intel's hardware is fine, it just requires additional configuration. I wonder why we are not setting this?

Quoted 11 lines
Quoted 6 lines

The last point means that _gpio_ich6_pinctrl_cfg_pin cannot work. We need to mirror the lvl register in order to be able to read it.

I confirmed that with the 'correct' value in the lvl registers both USB ports work.

OK, well that's good at least.

Thanks,
Andrew

Regards,
Simon

#19 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

In reply to Simon Glass

Hi Simon,

Quoted 129 lines · Simon Glass

+Gabriel

Hi Andrew,

Quoted 124 lines · Andrew Bradford

Hi Simon,

Quoted 93 lines · Simon Glass

Hi Andrew,

Quoted 90 lines · Andrew Bradford

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Minnowmax has a USB power switch enable which determines if the VBUS2 net is turned on or not, which will supply or not supply power to the USB 2.0 port. The blue USB 3.0 port also has an enable. Both enables and the USB ports themselves are located on page 16 of the schematic that I have.

Quoted 8 lines
Quoted 6 lines

The switches to enable the VBUS for each port are active high and pulled down. So to turn them on, I believe that's the point of the pinmuxing and GPIO settings which are used in the minnowmax.dts. Can you verify if these are correctly turning on VBUS2 (since it sounds like they are turning on VBUS1)? If not, when you turn these GPIO on manually, does the USB 2.0 port work correctly?

I see power on the bottom port but not the top one.

OK, that's odd, but likely can be fixed with changes to the pin mux and pad settings in the dts. I believe that the "pad-offset" for pin_usb_host_en1 at 0 is wrong and that it should be 0x250 instead of 0x258.

arch/x86/dts/minnowmax.dts +1 -1
index d0c0fe6..4988163 100644
@@ -39,7 +39,7 @@
 
                pin_usb_host_en1 at 0 {
                        gpio-offset = <0x80 9>;
-                       pad-offset = <0x258>;
+                       pad-offset = <0x250>;
                        mode-gpio;
                        output-value = <1>;
                        direction = <PIN_OUTPUT>;
Quoted 6 lines
Quoted 1 line

Does that fix it?

I dug into this a bit and it all seems quite broken:

- PCI bus configuration does not work in gpio_ich6_pinctrl_init(). I will send a patch for this

I believe it indeed worked in the past but with the DM PCI conversion on MinnowMax recently it was broken. That's also why I sent a patch
[1] previously saying that we should explicitly trigger the PCI enumeration process, as not all DM PCI APIs can trigger the PCI enumeration, which it is supposed to be as per DM concept.

Quoted 10 lines

- gpio_ich6_get_base() returns a 16-bit word but function is also used to read the memory address which holds a 32-bit word
- Intel's hardware won't let you read the status of an output!

The last point means that _gpio_ich6_pinctrl_cfg_pin cannot work. We need to mirror the lvl register in order to be able to read it.

I confirmed that with the 'correct' value in the lvl registers both USB ports work.

[1]: http://lists.denx.de/pipermail/u-boot/2015-July/220542.html

Regards,
Bin

#20 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

In reply to Simon Glass

Hi Simon, Hi Bin,

Quoted 139 lines · Simon Glass

+Gabriel

Hi Andrew,

Quoted 124 lines · Andrew Bradford

Hi Simon,

Quoted 93 lines · Simon Glass

Hi Andrew,

Quoted 90 lines · Andrew Bradford

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Minnowmax has a USB power switch enable which determines if the VBUS2 net is turned on or not, which will supply or not supply power to the USB 2.0 port. The blue USB 3.0 port also has an enable. Both enables and the USB ports themselves are located on page 16 of the schematic that I have.

Quoted 8 lines
Quoted 6 lines

The switches to enable the VBUS for each port are active high and pulled down. So to turn them on, I believe that's the point of the pinmuxing and GPIO settings which are used in the minnowmax.dts. Can you verify if these are correctly turning on VBUS2 (since it sounds like they are turning on VBUS1)? If not, when you turn these GPIO on manually, does the USB 2.0 port work correctly?

I see power on the bottom port but not the top one.

OK, that's odd, but likely can be fixed with changes to the pin mux and pad settings in the dts. I believe that the "pad-offset" for pin_usb_host_en1 at 0 is wrong and that it should be 0x250 instead of 0x258.

arch/x86/dts/minnowmax.dts +1 -1
index d0c0fe6..4988163 100644
@@ -39,7 +39,7 @@
 
                 pin_usb_host_en1 at 0 {
                         gpio-offset = <0x80 9>;
-                       pad-offset = <0x258>;
+                       pad-offset = <0x250>;
                         mode-gpio;
                         output-value = <1>;
                         direction = <PIN_OUTPUT>;
Quoted 1 line

Does that fix it?

I dug into this a bit and it all seems quite broken:

- PCI bus configuration does not work in gpio_ich6_pinctrl_init(). I will send a patch for this
- gpio_ich6_get_base() returns a 16-bit word but function is also used to read the memory address which holds a 32-bit word
- Intel's hardware won't let you read the status of an output!

Quoted 5 lines

The last point means that _gpio_ich6_pinctrl_cfg_pin cannot work. We need to mirror the lvl register in order to be able to read it.

I confirmed that with the 'correct' value in the lvl registers both USB ports work.

I'm currently struggling with the USB EHCI ports on my custom Bay Trail x86 board. With the current U-Boot, cloned from the MinnowMAX, only some of the USB EHCI ports are enabled / available. Here the "usb tree" output with 3 USB keys installed:

=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|

  +-2  Hub (480 Mb/s, 0mA)
    |
    +-3  Hub (480 Mb/s, 100mA)
    | |
    | +-4  Hub (12 Mb/s, 100mA)
    |    
    +-5  Mass Storage (480 Mb/s, 200mA)
         JetFlash Mass Storage Device 3281440601

When I first start the original (AMI) BIOS on this custom board, and then reboot into U-Boot (without a power-cycle), I see this configuration:

=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|

  +-2  Hub (480 Mb/s, 0mA)
    |
    +-3  Hub (480 Mb/s, 100mA)
    | |
    | +-4  Hub (12 Mb/s, 100mA)
    |    
    +-5  Hub (480 Mb/s, 0mA)
    | |
    | +-6  Mass Storage (480 Mb/s, 200mA)
    | |    Kingston DataTraveler 2.0 50E549C688C4BE7189942766
    | |  
    | +-7  Mass Storage (480 Mb/s, 98mA)
    |      USBest Technology USB Mass Storage Device 09092207fbf0c4
    |    
    +-8  Mass Storage (480 Mb/s, 200mA)
         JetFlash Mass Storage Device 3281440601

So now all 3 USB sticks are detected.

It doesn't seem to be a problem with missing USB power switch enabling via some GPIOs. I've checked the schematics and all ports should have power enabled.

Do you have any quick ideas, what might be missing to enable all 4 EHCI ports on Bay Trail? There seems to be a per-port disable feature which might be involved. I'm still pretty new to x86, and I'm struggling with finding the correct datasheet for this. So any hints are really appreciated.

Thanks,
Stefan

#21 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Stefan,

Quoted 199 lines · Stefan Roese

Hi Simon, Hi Bin,

Quoted 139 lines · Simon Glass

+Gabriel

Hi Andrew,

Quoted 124 lines · Andrew Bradford

Hi Simon,

Quoted 93 lines · Simon Glass

Hi Andrew,

Quoted 90 lines · Andrew Bradford

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will
override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD
settings from the Intel FSPv4 Gold release to the respective dts files,
with the condition that the memory-down parameters for MinnowMax are
also used.

Quoted 7 lines
Quoted 3 lines

Signed-off-by: Andrew Bradford <[email protected]>
---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Minnowmax has a USB power switch enable which determines if the VBUS2 net is turned on or not, which will supply or not supply power to the USB 2.0 port. The blue USB 3.0 port also has an enable. Both enables and the USB ports themselves are located on page 16 of the schematic that I have.

Quoted 8 lines
Quoted 6 lines

The switches to enable the VBUS for each port are active high and pulled down. So to turn them on, I believe that's the point of the pinmuxing and GPIO settings which are used in the minnowmax.dts. Can you verify if these are correctly turning on VBUS2 (since it sounds like they are turning on VBUS1)? If not, when you turn these GPIO on manually, does the USB 2.0 port work correctly?

I see power on the bottom port but not the top one.

OK, that's odd, but likely can be fixed with changes to the pin mux and pad settings in the dts. I believe that the "pad-offset" for pin_usb_host_en1 at 0 is wrong and that it should be 0x250 instead of 0x258.

arch/x86/dts/minnowmax.dts +1 -1
index d0c0fe6..4988163 100644
@@ -39,7 +39,7 @@
 
                 pin_usb_host_en1 at 0 {
                         gpio-offset = <0x80 9>;
-                       pad-offset = <0x258>;
+                       pad-offset = <0x250>;
                         mode-gpio;
                         output-value = <1>;
                         direction = <PIN_OUTPUT>;
Quoted 1 line

Does that fix it?

I dug into this a bit and it all seems quite broken:

- PCI bus configuration does not work in gpio_ich6_pinctrl_init(). I will send a patch for this
- gpio_ich6_get_base() returns a 16-bit word but function is also used to read the memory address which holds a 32-bit word
- Intel's hardware won't let you read the status of an output!

Quoted 5 lines

The last point means that _gpio_ich6_pinctrl_cfg_pin cannot work. We need to mirror the lvl register in order to be able to read it.

I confirmed that with the 'correct' value in the lvl registers both USB ports work.

I'm currently struggling with the USB EHCI ports on my custom Bay Trail x86 board. With the current U-Boot, cloned from the MinnowMAX, only some of the USB EHCI ports are enabled / available. Here the "usb tree" output with 3 USB keys installed:

=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|

  +-2  Hub (480 Mb/s, 0mA)
    |
    +-3  Hub (480 Mb/s, 100mA)
    | |
    | +-4  Hub (12 Mb/s, 100mA)
    |
    +-5  Mass Storage (480 Mb/s, 200mA)
         JetFlash Mass Storage Device 3281440601

When I first start the original (AMI) BIOS on this custom board, and then reboot into U-Boot (without a power-cycle), I see this configuration:

=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|

  +-2  Hub (480 Mb/s, 0mA)
    |
    +-3  Hub (480 Mb/s, 100mA)
    | |
    | +-4  Hub (12 Mb/s, 100mA)
    |
    +-5  Hub (480 Mb/s, 0mA)
    | |
    | +-6  Mass Storage (480 Mb/s, 200mA)
    | |    Kingston DataTraveler 2.0 50E549C688C4BE7189942766
    | |
    | +-7  Mass Storage (480 Mb/s, 98mA)
    |      USBest Technology USB Mass Storage Device 09092207fbf0c4
    |
    +-8  Mass Storage (480 Mb/s, 200mA)
         JetFlash Mass Storage Device 3281440601

So now all 3 USB sticks are detected.

It doesn't seem to be a problem with missing USB power switch enabling via some GPIOs. I've checked the schematics and all ports should have power enabled.

Quoted 5 lines

Do you have any quick ideas, what might be missing to enable all 4 EHCI ports on Bay Trail? There seems to be a per-port disable feature which might be involved. I'm still pretty new to x86, and I'm struggling with finding the correct datasheet for this. So any hints are really appreciated.

It might be worth checking the pci bus device list in both cases. Perhaps one of the USB ports is disabled?

Regards,
Simon

#22 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Simon,

Quoted 202 lines · Simon Glass

Hi Stefan,

Quoted 199 lines · Stefan Roese

Hi Simon, Hi Bin,

Quoted 139 lines · Simon Glass

+Gabriel

Hi Andrew,

Quoted 124 lines · Andrew Bradford

Hi Simon,

Quoted 93 lines · Simon Glass

Hi Andrew,

Quoted 90 lines · Andrew Bradford

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 19 lines · Bin Meng

On Fri, Aug 7, 2015 at 8:36 PM, Andrew Bradford
<[email protected]> wrote:
From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will
override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD
settings from the Intel FSPv4 Gold release to the respective dts files,
with the condition that the memory-down parameters for MinnowMax are
also used.

Signed-off-by: Andrew Bradford <[email protected]>
---

Reviewed-by: Bin Meng <[email protected]>
Tested-by: Bin Meng <[email protected]>

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Minnowmax has a USB power switch enable which determines if the VBUS2 net is turned on or not, which will supply or not supply power to the USB 2.0 port. The blue USB 3.0 port also has an enable. Both enables and the USB ports themselves are located on page 16 of the schematic that I have.

Quoted 8 lines
Quoted 6 lines

The switches to enable the VBUS for each port are active high and pulled down. So to turn them on, I believe that's the point of the pinmuxing and GPIO settings which are used in the minnowmax.dts. Can you verify if these are correctly turning on VBUS2 (since it sounds like they are turning on VBUS1)? If not, when you turn these GPIO on manually, does the USB 2.0 port work correctly?

I see power on the bottom port but not the top one.

OK, that's odd, but likely can be fixed with changes to the pin mux and pad settings in the dts. I believe that the "pad-offset" for pin_usb_host_en1 at 0 is wrong and that it should be 0x250 instead of 0x258.

arch/x86/dts/minnowmax.dts +1 -1
index d0c0fe6..4988163 100644
@@ -39,7 +39,7 @@
 
                  pin_usb_host_en1 at 0 {
                          gpio-offset = <0x80 9>;
-                       pad-offset = <0x258>;
+                       pad-offset = <0x250>;
                          mode-gpio;
                          output-value = <1>;
                          direction = <PIN_OUTPUT>;
Quoted 1 line

Does that fix it?

I dug into this a bit and it all seems quite broken:

- PCI bus configuration does not work in gpio_ich6_pinctrl_init(). I will send a patch for this
- gpio_ich6_get_base() returns a 16-bit word but function is also used to read the memory address which holds a 32-bit word
- Intel's hardware won't let you read the status of an output!

Quoted 5 lines

The last point means that _gpio_ich6_pinctrl_cfg_pin cannot work. We need to mirror the lvl register in order to be able to read it.

I confirmed that with the 'correct' value in the lvl registers both USB ports work.

I'm currently struggling with the USB EHCI ports on my custom Bay Trail x86 board. With the current U-Boot, cloned from the MinnowMAX, only some of the USB EHCI ports are enabled / available. Here the "usb tree" output with 3 USB keys installed:

=> usb tree
USB device tree:

   1  Hub (480 Mb/s, 0mA)
   |  u-boot EHCI Host Controller
   |
   +-2  Hub (480 Mb/s, 0mA)
     |
     +-3  Hub (480 Mb/s, 100mA)
     | |
     | +-4  Hub (12 Mb/s, 100mA)
     |
     +-5  Mass Storage (480 Mb/s, 200mA)
          JetFlash Mass Storage Device 3281440601

When I first start the original (AMI) BIOS on this custom board, and then reboot into U-Boot (without a power-cycle), I see this configuration:

=> usb tree
USB device tree:

   1  Hub (480 Mb/s, 0mA)
   |  u-boot EHCI Host Controller
   |
   +-2  Hub (480 Mb/s, 0mA)
     |
     +-3  Hub (480 Mb/s, 100mA)
     | |
     | +-4  Hub (12 Mb/s, 100mA)
     |
     +-5  Hub (480 Mb/s, 0mA)
     | |
     | +-6  Mass Storage (480 Mb/s, 200mA)
     | |    Kingston DataTraveler 2.0 50E549C688C4BE7189942766
     | |
     | +-7  Mass Storage (480 Mb/s, 98mA)
     |      USBest Technology USB Mass Storage Device 09092207fbf0c4
     |
     +-8  Mass Storage (480 Mb/s, 200mA)
          JetFlash Mass Storage Device 3281440601

So now all 3 USB sticks are detected.

It doesn't seem to be a problem with missing USB power switch enabling via some GPIOs. I've checked the schematics and all ports should have power enabled.

Quoted 8 lines
Quoted 5 lines

Do you have any quick ideas, what might be missing to enable all 4 EHCI ports on Bay Trail? There seems to be a per-port disable feature which might be involved. I'm still pretty new to x86, and I'm struggling with finding the correct datasheet for this. So any hints are really appreciated.

It might be worth checking the pci bus device list in both cases. Perhaps one of the USB ports is disabled?

IIUTC, its only one PCI device, that handles all EHCI USB 2.0 ports. In both cases its this output:

=> pci
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________

00.1f.00   0x8086     0x0f1c     Bridge device           0x01
00.00.00   0x8086     0x0f00     Bridge device           0x00
00.02.00   0x8086     0x0f31     Display controller      0x00
00.11.00   0x8086     0x0f15     Base system peripheral  0x05
00.12.00   0x8086     0x0f16     Base system peripheral  0x05
00.13.00   0x8086     0x0f23     Mass storage controller 0x06
00.15.00   0x8086     0x0f28     Multimedia device       0x01
00.18.00   0x8086     0x0f40     Base system peripheral  0x01
00.18.01   0x8086     0x0f41     Serial bus controller   0x80
00.18.02   0x8086     0x0f42     Serial bus controller   0x80
00.18.03   0x8086     0x0f43     Serial bus controller   0x80
00.18.04   0x8086     0x0f44     Serial bus controller   0x80
00.18.05   0x8086     0x0f45     Serial bus controller   0x80
00.18.06   0x8086     0x0f46     Serial bus controller   0x80
00.18.07   0x8086     0x0f47     Serial bus controller   0x80
00.1a.00   0x8086     0x0f18     Cryptographic device    0x80
00.1c.00   0x8086     0x0f48     Bridge device           0x04
00.1c.03   0x8086     0x0f4e     Bridge device           0x04
00.1d.00   0x8086     0x0f34     Serial bus controller   0x03
00.1e.00   0x8086     0x0f06     Base system peripheral  0x01
00.1e.01   0x8086     0x0f08     Serial bus controller   0x80
00.1e.02   0x8086     0x0f09     Serial bus controller   0x80
00.1e.04   0x8086     0x0f0c     Simple comm. controller 0x80
00.1e.05   0x8086     0x0f0e     Serial bus controller   0x80
00.1f.03   0x8086     0x0f12     Serial bus controller   0x05

Here 00.1d.00 is the EHCI controller. The "pci long" output is also identical. So its not that simple I'm afraid.

The Intel Atom Processor Z3600 and Z3700 Series Datasheet Vol 1 mentions in chapter "10.3.1 EHCI USB 2.0 Controller Features" on page 150:

? Per port USB disable

Perhaps this feature is biting me here. I'm wondering how this can be configured.

Any further ideas are welcome.

Thanks,
Stefan

#23 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Stefan,

Quoted 250 lines · Stefan Roese

Hi Simon,

Quoted 202 lines · Simon Glass

Hi Stefan,

Quoted 199 lines · Stefan Roese

Hi Simon, Hi Bin,

Quoted 139 lines · Simon Glass

+Gabriel

Hi Andrew,

Quoted 124 lines · Andrew Bradford

Hi Simon,

Quoted 93 lines · Simon Glass

Hi Andrew,

Quoted 90 lines · Andrew Bradford

Hi Simon,

Quoted 72 lines · Simon Glass

Hi Bin,

Quoted 69 lines · Bin Meng

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 36 lines · Simon Glass

Hi,

On 7 August 2015 at 06:44, Bin Meng <[email protected]> wrote:
On Fri, Aug 7, 2015 at 8:36 PM, Andrew Bradford
<[email protected]> wrote:
From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will
override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD
settings from the Intel FSPv4 Gold release to the respective dts files,
with the condition that the memory-down parameters for MinnowMax are
also used.

Signed-off-by: Andrew Bradford <[email protected]>
---

Reviewed-by: Bin Meng <[email protected]>
Tested-by: Bin Meng <[email protected]>

Acked-by: Simon Glass <[email protected]>
Tested on minnowmax:
Tested-by: Simon Glass <[email protected]>

I found that I need to remove two properties from the minnowmax.dts:

- fsp,enable-xhci needs to be removed as this does not work in U-Boot
at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information
being displayed

I plan to apply this with these changes - please let me know if this
doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

OK, my test shows that ehci works fine in U-Boot on Bayley Bay.

Hi Simon,

Quoted 8 lines
Quoted 1 line

What do you think regarding to xhci vs. ehci in U-Boot?

The problem is that USB is then broken in U-Boot. I think it is better to limit the speed for the moment until we have that fixed. It is quite useful to be able to use a keyboard or USB stick in U-Boot.

With my testing the bottom (blue) port works fine but the top port does not. This happens regardless of the xhci setting.

Minnowmax has a USB power switch enable which determines if the VBUS2 net is turned on or not, which will supply or not supply power to the USB 2.0 port. The blue USB 3.0 port also has an enable. Both enables and the USB ports themselves are located on page 16 of the schematic that I have.

Quoted 8 lines
Quoted 6 lines

The switches to enable the VBUS for each port are active high and pulled down. So to turn them on, I believe that's the point of the pinmuxing and GPIO settings which are used in the minnowmax.dts. Can you verify if these are correctly turning on VBUS2 (since it sounds like they are turning on VBUS1)? If not, when you turn these GPIO on manually, does the USB 2.0 port work correctly?

I see power on the bottom port but not the top one.

OK, that's odd, but likely can be fixed with changes to the pin mux and pad settings in the dts. I believe that the "pad-offset" for pin_usb_host_en1 at 0 is wrong and that it should be 0x250 instead of 0x258.

arch/x86/dts/minnowmax.dts +1 -1
index d0c0fe6..4988163 100644
@@ -39,7 +39,7 @@
 
                  pin_usb_host_en1 at 0 {
                          gpio-offset = <0x80 9>;
-                       pad-offset = <0x258>;
+                       pad-offset = <0x250>;
                          mode-gpio;
                          output-value = <1>;
                          direction = <PIN_OUTPUT>;
Quoted 1 line

Does that fix it?

I dug into this a bit and it all seems quite broken:

- PCI bus configuration does not work in gpio_ich6_pinctrl_init(). I will send a patch for this
- gpio_ich6_get_base() returns a 16-bit word but function is also used to read the memory address which holds a 32-bit word
- Intel's hardware won't let you read the status of an output!

Quoted 5 lines

The last point means that _gpio_ich6_pinctrl_cfg_pin cannot work. We need to mirror the lvl register in order to be able to read it.

I confirmed that with the 'correct' value in the lvl registers both USB ports work.

I'm currently struggling with the USB EHCI ports on my custom Bay Trail x86 board. With the current U-Boot, cloned from the MinnowMAX, only some of the USB EHCI ports are enabled / available. Here the "usb tree" output with 3 USB keys installed:

=> usb tree
USB device tree:

   1  Hub (480 Mb/s, 0mA)
   |  u-boot EHCI Host Controller
   |
   +-2  Hub (480 Mb/s, 0mA)
     |
     +-3  Hub (480 Mb/s, 100mA)
     | |
     | +-4  Hub (12 Mb/s, 100mA)
     |
     +-5  Mass Storage (480 Mb/s, 200mA)
          JetFlash Mass Storage Device 3281440601

When I first start the original (AMI) BIOS on this custom board, and then reboot into U-Boot (without a power-cycle), I see this configuration:

=> usb tree
USB device tree:

   1  Hub (480 Mb/s, 0mA)
   |  u-boot EHCI Host Controller
   |
   +-2  Hub (480 Mb/s, 0mA)
     |
     +-3  Hub (480 Mb/s, 100mA)
     | |
     | +-4  Hub (12 Mb/s, 100mA)
     |
     +-5  Hub (480 Mb/s, 0mA)
     | |
     | +-6  Mass Storage (480 Mb/s, 200mA)
     | |    Kingston DataTraveler 2.0 50E549C688C4BE7189942766
     | |
     | +-7  Mass Storage (480 Mb/s, 98mA)
     |      USBest Technology USB Mass Storage Device 09092207fbf0c4
     |
     +-8  Mass Storage (480 Mb/s, 200mA)
          JetFlash Mass Storage Device 3281440601

So now all 3 USB sticks are detected.

It doesn't seem to be a problem with missing USB power switch enabling via some GPIOs. I've checked the schematics and all ports should have power enabled.

Quoted 8 lines
Quoted 5 lines

Do you have any quick ideas, what might be missing to enable all 4 EHCI ports on Bay Trail? There seems to be a per-port disable feature which might be involved. I'm still pretty new to x86, and I'm struggling with finding the correct datasheet for this. So any hints are really appreciated.

It might be worth checking the pci bus device list in both cases. Perhaps one of the USB ports is disabled?

IIUTC, its only one PCI device, that handles all EHCI USB 2.0 ports. In both cases its this output:

=> pci
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________

00.1f.00   0x8086     0x0f1c     Bridge device           0x01
00.00.00   0x8086     0x0f00     Bridge device           0x00
00.02.00   0x8086     0x0f31     Display controller      0x00
00.11.00   0x8086     0x0f15     Base system peripheral  0x05
00.12.00   0x8086     0x0f16     Base system peripheral  0x05
00.13.00   0x8086     0x0f23     Mass storage controller 0x06
00.15.00   0x8086     0x0f28     Multimedia device       0x01
00.18.00   0x8086     0x0f40     Base system peripheral  0x01
00.18.01   0x8086     0x0f41     Serial bus controller   0x80
00.18.02   0x8086     0x0f42     Serial bus controller   0x80
00.18.03   0x8086     0x0f43     Serial bus controller   0x80
00.18.04   0x8086     0x0f44     Serial bus controller   0x80
00.18.05   0x8086     0x0f45     Serial bus controller   0x80
00.18.06   0x8086     0x0f46     Serial bus controller   0x80
00.18.07   0x8086     0x0f47     Serial bus controller   0x80
00.1a.00   0x8086     0x0f18     Cryptographic device    0x80
00.1c.00   0x8086     0x0f48     Bridge device           0x04
00.1c.03   0x8086     0x0f4e     Bridge device           0x04
00.1d.00   0x8086     0x0f34     Serial bus controller   0x03
00.1e.00   0x8086     0x0f06     Base system peripheral  0x01
00.1e.01   0x8086     0x0f08     Serial bus controller   0x80
00.1e.02   0x8086     0x0f09     Serial bus controller   0x80
00.1e.04   0x8086     0x0f0c     Simple comm. controller 0x80
00.1e.05   0x8086     0x0f0e     Serial bus controller   0x80
00.1f.03   0x8086     0x0f12     Serial bus controller   0x05

Here 00.1d.00 is the EHCI controller. The "pci long" output is also identical. So its not that simple I'm afraid.

Quoted 8 lines

The Intel Atom Processor Z3600 and Z3700 Series Datasheet Vol 1 mentions in chapter "10.3.1 EHCI USB 2.0 Controller Features" on page 150:

? Per port USB disable

Perhaps this feature is biting me here. I'm wondering how this can be configured.

That sounds likely.

Also: xHCI and EHCI Port Mapping

suggests that you need to make sure the ports are being driven by EHCI instead of XHCI.

It mentions USB2HCSEL but I cannot find that in the datasheet.

It does appear here though:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/perf_power.c

See IOSF_PORT_0x5a here:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/broadwell_fsp/src/lib/reg_script.c

So it looks like you need to set up this port, and perhaps some others asper that file.

Quoted 6 lines

Any further ideas are welcome.

Thanks,
Stefan

Regards,
Simon

#24 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Simon,

On 09.03.2016 00:33, Simon Glass wrote:

<snip>

Quoted 105 lines
Quoted 96 lines
Quoted 51 lines
Quoted 51 lines

I'm currently struggling with the USB EHCI ports on my custom Bay Trail x86 board. With the current U-Boot, cloned from the MinnowMAX, only some of the USB EHCI ports are enabled / available. Here the "usb tree" output with 3 USB keys installed:

=> usb tree
USB device tree:

    1  Hub (480 Mb/s, 0mA)
    |  u-boot EHCI Host Controller
    |
    +-2  Hub (480 Mb/s, 0mA)
      |
      +-3  Hub (480 Mb/s, 100mA)
      | |
      | +-4  Hub (12 Mb/s, 100mA)
      |
      +-5  Mass Storage (480 Mb/s, 200mA)
           JetFlash Mass Storage Device 3281440601

When I first start the original (AMI) BIOS on this custom board, and then reboot into U-Boot (without a power-cycle), I see this configuration:

=> usb tree
USB device tree:

    1  Hub (480 Mb/s, 0mA)
    |  u-boot EHCI Host Controller
    |
    +-2  Hub (480 Mb/s, 0mA)
      |
      +-3  Hub (480 Mb/s, 100mA)
      | |
      | +-4  Hub (12 Mb/s, 100mA)
      |
      +-5  Hub (480 Mb/s, 0mA)
      | |
      | +-6  Mass Storage (480 Mb/s, 200mA)
      | |    Kingston DataTraveler 2.0 50E549C688C4BE7189942766
      | |
      | +-7  Mass Storage (480 Mb/s, 98mA)
      |      USBest Technology USB Mass Storage Device 09092207fbf0c4
      |
      +-8  Mass Storage (480 Mb/s, 200mA)
           JetFlash Mass Storage Device 3281440601

So now all 3 USB sticks are detected.

It doesn't seem to be a problem with missing USB power switch enabling via some GPIOs. I've checked the schematics and all ports should have power enabled.

Quoted 8 lines
Quoted 5 lines

Do you have any quick ideas, what might be missing to enable all 4 EHCI ports on Bay Trail? There seems to be a per-port disable feature which might be involved. I'm still pretty new to x86, and I'm struggling with finding the correct datasheet for this. So any hints are really appreciated.

It might be worth checking the pci bus device list in both cases. Perhaps one of the USB ports is disabled?

IIUTC, its only one PCI device, that handles all EHCI USB 2.0 ports. In both cases its this output:

=> pci
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________

00.1f.00   0x8086     0x0f1c     Bridge device           0x01
00.00.00   0x8086     0x0f00     Bridge device           0x00
00.02.00   0x8086     0x0f31     Display controller      0x00
00.11.00   0x8086     0x0f15     Base system peripheral  0x05
00.12.00   0x8086     0x0f16     Base system peripheral  0x05
00.13.00   0x8086     0x0f23     Mass storage controller 0x06
00.15.00   0x8086     0x0f28     Multimedia device       0x01
00.18.00   0x8086     0x0f40     Base system peripheral  0x01
00.18.01   0x8086     0x0f41     Serial bus controller   0x80
00.18.02   0x8086     0x0f42     Serial bus controller   0x80
00.18.03   0x8086     0x0f43     Serial bus controller   0x80
00.18.04   0x8086     0x0f44     Serial bus controller   0x80
00.18.05   0x8086     0x0f45     Serial bus controller   0x80
00.18.06   0x8086     0x0f46     Serial bus controller   0x80
00.18.07   0x8086     0x0f47     Serial bus controller   0x80
00.1a.00   0x8086     0x0f18     Cryptographic device    0x80
00.1c.00   0x8086     0x0f48     Bridge device           0x04
00.1c.03   0x8086     0x0f4e     Bridge device           0x04
00.1d.00   0x8086     0x0f34     Serial bus controller   0x03
00.1e.00   0x8086     0x0f06     Base system peripheral  0x01
00.1e.01   0x8086     0x0f08     Serial bus controller   0x80
00.1e.02   0x8086     0x0f09     Serial bus controller   0x80
00.1e.04   0x8086     0x0f0c     Simple comm. controller 0x80
00.1e.05   0x8086     0x0f0e     Serial bus controller   0x80
00.1f.03   0x8086     0x0f12     Serial bus controller   0x05

Here 00.1d.00 is the EHCI controller. The "pci long" output is also identical. So its not that simple I'm afraid.

Quoted 8 lines

The Intel Atom Processor Z3600 and Z3700 Series Datasheet Vol 1 mentions in chapter "10.3.1 EHCI USB 2.0 Controller Features" on page 150:

? Per port USB disable

Perhaps this feature is biting me here. I'm wondering how this can be configured.

Quoted 8 lines

That sounds likely.

Also: xHCI and EHCI Port Mapping

suggests that you need to make sure the ports are being driven by EHCI instead of XHCI.

It mentions USB2HCSEL but I cannot find that in the datasheet.

Same here.

Quoted 10 lines

It does appear here though:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/perf_power.c

See IOSF_PORT_0x5a here:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/broadwell_fsp/src/lib/reg_script.c

So it looks like you need to set up this port, and perhaps some others asper that file.

I've looked into these coreboot files today. And ported parts of them to U-Boot to run these configurations there as well. Unfortunately without any (positive) effect. Some things I've tested are:

Configure 0x5a / 0xd0 (USB2HCSEL???) to different values. All without effect.

Unfortunately this value can't be read-out. At least I read always 0 here. So I can't see, if the AMI BIOS version configures here something different.

Then I've started looking into ehci.c:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/ehci.c

EHCI_USB2PDO (per-port disable) looked promising here. And writing 0xff into this reg results in all ports disabled:

=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Hub (480 Mb/s, 0mA)

So this register at least has some effect. But its initialized with 0 and writing 0 into it does not fix the problem with the missing ports.

I also ported the PHY values from usb2_phy_init() without any changes. The values here are the default values, as I can read them back. Also the AMI BIOS does not change these values, I've double checked this as well.

So I'm nearly out of ideas right now what else to configure / test to get all ports running. One idea is that the xHCI controller also needs some configuration for this port muxing. See:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/xhci.c:

		/* USB3 SuperSpeed Enable */
		REG_PCI_WRITE32(XHCI_USB3PR, BYTM_USB3_PORT_MAP),
		/* USB2 Port Route to XHCI */
		REG_PCI_WRITE32(XHCI_USB2PR, BYTM_USB2_PORT_MAP),

and:

		/* Set USB2 Port Routing Mask */
		REG_PCI_WRITE32(XHCI_USB2PRM, BYTM_USB2_PORT_MAP),
		/* Set USB3 Port Routing Mask */
		REG_PCI_WRITE32(XHCI_USB3PRM, BYTM_USB3_PORT_MAP),
		/*
		 * Disable ports if requested
		 */
		/* Open per-port disable control override */
		REG_IO_RMW16(ACPI_BASE_ADDRESS + UPRWC, ~0, UPRWC_WR_EN),
		REG_PCI_WRITE32(XHCI_USB2PDO, config->usb2_port_disable_mask),
		REG_PCI_WRITE32(XHCI_USB3PDO, config->usb3_port_disable_mask),
		/* Close per-port disable control override */
		REG_IO_RMW16(ACPI_BASE_ADDRESS + UPRWC, ~UPRWC_WR_EN, 0),

But I can only either see the EHCI or the xHCI controller via "pci". If I configure the FSP to enable xHCI (fsp,enable-xhci) the EHCI PCI device is not listed. And without this DT property the xHCI PCI device is missing. So I only have access to one USB controller at the some time.

Any further ideas are really welcome! :)

BTW: Did you (or somebody else?) already start moving xHCI (PCI) to DM yet? If yes, could you perhaps provide this version so that I could continue with it.

Thanks,
Stefan

#25 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Stefan,

Quoted 138 lines · Stefan Roese

Hi Simon,

On 09.03.2016 00:33, Simon Glass wrote:

<snip>

Quoted 105 lines
Quoted 96 lines
Quoted 51 lines
Quoted 51 lines

I'm currently struggling with the USB EHCI ports on my custom Bay Trail x86 board. With the current U-Boot, cloned from the MinnowMAX, only some of the USB EHCI ports are enabled / available. Here the "usb tree" output with 3 USB keys installed:

=> usb tree
USB device tree:

    1  Hub (480 Mb/s, 0mA)
    |  u-boot EHCI Host Controller
    |
    +-2  Hub (480 Mb/s, 0mA)
      |
      +-3  Hub (480 Mb/s, 100mA)
      | |
      | +-4  Hub (12 Mb/s, 100mA)
      |
      +-5  Mass Storage (480 Mb/s, 200mA)
           JetFlash Mass Storage Device 3281440601

When I first start the original (AMI) BIOS on this custom board, and then reboot into U-Boot (without a power-cycle), I see this configuration:

=> usb tree
USB device tree:

    1  Hub (480 Mb/s, 0mA)
    |  u-boot EHCI Host Controller
    |
    +-2  Hub (480 Mb/s, 0mA)
      |
      +-3  Hub (480 Mb/s, 100mA)
      | |
      | +-4  Hub (12 Mb/s, 100mA)
      |
      +-5  Hub (480 Mb/s, 0mA)
      | |
      | +-6  Mass Storage (480 Mb/s, 200mA)
      | |    Kingston DataTraveler 2.0 50E549C688C4BE7189942766
      | |
      | +-7  Mass Storage (480 Mb/s, 98mA)
      |      USBest Technology USB Mass Storage Device 09092207fbf0c4
      |
      +-8  Mass Storage (480 Mb/s, 200mA)
           JetFlash Mass Storage Device 3281440601

So now all 3 USB sticks are detected.

It doesn't seem to be a problem with missing USB power switch enabling via some GPIOs. I've checked the schematics and all ports should have power enabled.

Quoted 8 lines
Quoted 5 lines

Do you have any quick ideas, what might be missing to enable all 4 EHCI ports on Bay Trail? There seems to be a per-port disable feature which might be involved. I'm still pretty new to x86, and I'm struggling with finding the correct datasheet for this. So any hints are really appreciated.

It might be worth checking the pci bus device list in both cases. Perhaps one of the USB ports is disabled?

IIUTC, its only one PCI device, that handles all EHCI USB 2.0 ports. In both cases its this output:

=> pci
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________

00.1f.00   0x8086     0x0f1c     Bridge device           0x01
00.00.00   0x8086     0x0f00     Bridge device           0x00
00.02.00   0x8086     0x0f31     Display controller      0x00
00.11.00   0x8086     0x0f15     Base system peripheral  0x05
00.12.00   0x8086     0x0f16     Base system peripheral  0x05
00.13.00   0x8086     0x0f23     Mass storage controller 0x06
00.15.00   0x8086     0x0f28     Multimedia device       0x01
00.18.00   0x8086     0x0f40     Base system peripheral  0x01
00.18.01   0x8086     0x0f41     Serial bus controller   0x80
00.18.02   0x8086     0x0f42     Serial bus controller   0x80
00.18.03   0x8086     0x0f43     Serial bus controller   0x80
00.18.04   0x8086     0x0f44     Serial bus controller   0x80
00.18.05   0x8086     0x0f45     Serial bus controller   0x80
00.18.06   0x8086     0x0f46     Serial bus controller   0x80
00.18.07   0x8086     0x0f47     Serial bus controller   0x80
00.1a.00   0x8086     0x0f18     Cryptographic device    0x80
00.1c.00   0x8086     0x0f48     Bridge device           0x04
00.1c.03   0x8086     0x0f4e     Bridge device           0x04
00.1d.00   0x8086     0x0f34     Serial bus controller   0x03
00.1e.00   0x8086     0x0f06     Base system peripheral  0x01
00.1e.01   0x8086     0x0f08     Serial bus controller   0x80
00.1e.02   0x8086     0x0f09     Serial bus controller   0x80
00.1e.04   0x8086     0x0f0c     Simple comm. controller 0x80
00.1e.05   0x8086     0x0f0e     Serial bus controller   0x80
00.1f.03   0x8086     0x0f12     Serial bus controller   0x05

Here 00.1d.00 is the EHCI controller. The "pci long" output is also identical. So its not that simple I'm afraid.

Quoted 8 lines

The Intel Atom Processor Z3600 and Z3700 Series Datasheet Vol 1 mentions in chapter "10.3.1 EHCI USB 2.0 Controller Features" on page 150:

? Per port USB disable

Perhaps this feature is biting me here. I'm wondering how this can be configured.

Quoted 8 lines

That sounds likely.

Also: xHCI and EHCI Port Mapping

suggests that you need to make sure the ports are being driven by EHCI instead of XHCI.

It mentions USB2HCSEL but I cannot find that in the datasheet.

Same here.

Quoted 10 lines

It does appear here though:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/perf_power.c

See IOSF_PORT_0x5a here:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/broadwell_fsp/src/lib/reg_script.c

So it looks like you need to set up this port, and perhaps some others asper that file.

I've looked into these coreboot files today. And ported parts of them to U-Boot to run these configurations there as well. Unfortunately without any (positive) effect. Some things I've tested are:

Quoted 6 lines

Configure 0x5a / 0xd0 (USB2HCSEL???) to different values. All without effect.

Unfortunately this value can't be read-out. At least I read always 0 here. So I can't see, if the AMI BIOS version configures here something different.

That's really odd, because it looks like this is a read/write interface. Worth digging int I think, and trying to find docs.

Quoted 15 lines

Then I've started looking into ehci.c:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/ehci.c

EHCI_USB2PDO (per-port disable) looked promising here. And writing 0xff into this reg results in all ports disabled:

=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Hub (480 Mb/s, 0mA)

Quoted 8 lines

So this register at least has some effect. But its initialized with 0 and writing 0 into it does not fix the problem with the missing ports.

I also ported the PHY values from usb2_phy_init() without any changes. The values here are the default values, as I can read them back. Also the AMI BIOS does not change these values, I've double checked this as well.

BTW is the AMI BIOS UEFI? If so, for now I suppose you could boot into U-Boot from that, and deal with the problem later.

Quoted 28 lines

So I'm nearly out of ideas right now what else to configure / test to get all ports running. One idea is that the xHCI controller also needs some configuration for this port muxing. See:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/xhci.c:

                /* USB3 SuperSpeed Enable */
                REG_PCI_WRITE32(XHCI_USB3PR, BYTM_USB3_PORT_MAP),
                /* USB2 Port Route to XHCI */
                REG_PCI_WRITE32(XHCI_USB2PR, BYTM_USB2_PORT_MAP),

and:

                /* Set USB2 Port Routing Mask */
                REG_PCI_WRITE32(XHCI_USB2PRM, BYTM_USB2_PORT_MAP),
                /* Set USB3 Port Routing Mask */
                REG_PCI_WRITE32(XHCI_USB3PRM, BYTM_USB3_PORT_MAP),
                /*
                 * Disable ports if requested
                 */
                /* Open per-port disable control override */
                REG_IO_RMW16(ACPI_BASE_ADDRESS + UPRWC, ~0, UPRWC_WR_EN),
                REG_PCI_WRITE32(XHCI_USB2PDO, config->usb2_port_disable_mask),
                REG_PCI_WRITE32(XHCI_USB3PDO, config->usb3_port_disable_mask),
                /* Close per-port disable control override */
                REG_IO_RMW16(ACPI_BASE_ADDRESS + UPRWC, ~UPRWC_WR_EN, 0),
Quoted 7 lines

But I can only either see the EHCI or the xHCI controller via "pci". If I configure the FSP to enable xHCI (fsp,enable-xhci) the EHCI PCI device is not listed. And without this DT property the xHCI PCI device is missing. So I only have access to one USB controller at the some time.

Any further ideas are really welcome! :)

I'm pretty short on time this month otherwise I would love to look at this. Can you post a patch that adds all the init code you have found to baytrail?

Quoted 4 lines

BTW: Did you (or somebody else?) already start moving xHCI (PCI) to DM yet? If yes, could you perhaps provide this version so that I could continue with it.

Yes, see u-boot-x86/samus-working.

Quoted 4 lines

Thanks,
Stefan

Regards,
Simon

#26 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Simon,

Quoted 142 lines · Simon Glass
Quoted 141 lines · Stefan Roese

Hi Simon,

On 09.03.2016 00:33, Simon Glass wrote:

<snip>

Quoted 105 lines
Quoted 96 lines
Quoted 51 lines
Quoted 51 lines

I'm currently struggling with the USB EHCI ports on my custom Bay Trail x86 board. With the current U-Boot, cloned from the MinnowMAX, only some of the USB EHCI ports are enabled / available. Here the "usb tree" output with 3 USB keys installed:

=> usb tree
USB device tree:

     1  Hub (480 Mb/s, 0mA)
     |  u-boot EHCI Host Controller
     |
     +-2  Hub (480 Mb/s, 0mA)
       |
       +-3  Hub (480 Mb/s, 100mA)
       | |
       | +-4  Hub (12 Mb/s, 100mA)
       |
       +-5  Mass Storage (480 Mb/s, 200mA)
            JetFlash Mass Storage Device 3281440601

When I first start the original (AMI) BIOS on this custom board, and then reboot into U-Boot (without a power-cycle), I see this configuration:

=> usb tree
USB device tree:

     1  Hub (480 Mb/s, 0mA)
     |  u-boot EHCI Host Controller
     |
     +-2  Hub (480 Mb/s, 0mA)
       |
       +-3  Hub (480 Mb/s, 100mA)
       | |
       | +-4  Hub (12 Mb/s, 100mA)
       |
       +-5  Hub (480 Mb/s, 0mA)
       | |
       | +-6  Mass Storage (480 Mb/s, 200mA)
       | |    Kingston DataTraveler 2.0 50E549C688C4BE7189942766
       | |
       | +-7  Mass Storage (480 Mb/s, 98mA)
       |      USBest Technology USB Mass Storage Device 09092207fbf0c4
       |
       +-8  Mass Storage (480 Mb/s, 200mA)
            JetFlash Mass Storage Device 3281440601

So now all 3 USB sticks are detected.

It doesn't seem to be a problem with missing USB power switch enabling via some GPIOs. I've checked the schematics and all ports should have power enabled.

Quoted 8 lines
Quoted 5 lines

Do you have any quick ideas, what might be missing to enable all 4 EHCI ports on Bay Trail? There seems to be a per-port disable feature which might be involved. I'm still pretty new to x86, and I'm struggling with finding the correct datasheet for this. So any hints are really appreciated.

It might be worth checking the pci bus device list in both cases. Perhaps one of the USB ports is disabled?

IIUTC, its only one PCI device, that handles all EHCI USB 2.0 ports. In both cases its this output:

=> pci
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________

00.1f.00   0x8086     0x0f1c     Bridge device           0x01
00.00.00   0x8086     0x0f00     Bridge device           0x00
00.02.00   0x8086     0x0f31     Display controller      0x00
00.11.00   0x8086     0x0f15     Base system peripheral  0x05
00.12.00   0x8086     0x0f16     Base system peripheral  0x05
00.13.00   0x8086     0x0f23     Mass storage controller 0x06
00.15.00   0x8086     0x0f28     Multimedia device       0x01
00.18.00   0x8086     0x0f40     Base system peripheral  0x01
00.18.01   0x8086     0x0f41     Serial bus controller   0x80
00.18.02   0x8086     0x0f42     Serial bus controller   0x80
00.18.03   0x8086     0x0f43     Serial bus controller   0x80
00.18.04   0x8086     0x0f44     Serial bus controller   0x80
00.18.05   0x8086     0x0f45     Serial bus controller   0x80
00.18.06   0x8086     0x0f46     Serial bus controller   0x80
00.18.07   0x8086     0x0f47     Serial bus controller   0x80
00.1a.00   0x8086     0x0f18     Cryptographic device    0x80
00.1c.00   0x8086     0x0f48     Bridge device           0x04
00.1c.03   0x8086     0x0f4e     Bridge device           0x04
00.1d.00   0x8086     0x0f34     Serial bus controller   0x03
00.1e.00   0x8086     0x0f06     Base system peripheral  0x01
00.1e.01   0x8086     0x0f08     Serial bus controller   0x80
00.1e.02   0x8086     0x0f09     Serial bus controller   0x80
00.1e.04   0x8086     0x0f0c     Simple comm. controller 0x80
00.1e.05   0x8086     0x0f0e     Serial bus controller   0x80
00.1f.03   0x8086     0x0f12     Serial bus controller   0x05

Here 00.1d.00 is the EHCI controller. The "pci long" output is also identical. So its not that simple I'm afraid.

Quoted 8 lines

The Intel Atom Processor Z3600 and Z3700 Series Datasheet Vol 1 mentions in chapter "10.3.1 EHCI USB 2.0 Controller Features" on page 150:

? Per port USB disable

Perhaps this feature is biting me here. I'm wondering how this can be configured.

Quoted 8 lines

That sounds likely.

Also: xHCI and EHCI Port Mapping

suggests that you need to make sure the ports are being driven by EHCI instead of XHCI.

It mentions USB2HCSEL but I cannot find that in the datasheet.

Same here.

Quoted 10 lines

It does appear here though:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/perf_power.c

See IOSF_PORT_0x5a here:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/broadwell_fsp/src/lib/reg_script.c

So it looks like you need to set up this port, and perhaps some others asper that file.

I've looked into these coreboot files today. And ported parts of them to U-Boot to run these configurations there as well. Unfortunately without any (positive) effect. Some things I've tested are:

Configure 0x5a / 0xd0 (USB2HCSEL???) to different values. All without effect.

Quoted 6 lines
Quoted 3 lines

Unfortunately this value can't be read-out. At least I read always 0 here. So I can't see, if the AMI BIOS version configures here something different.

That's really odd, because it looks like this is a read/write interface. Worth digging int I think, and trying to find docs.

I've really tried to find some docs here. But all I can find on the net are the links to the coreboot source.

I've also printed all 0x5a registers, well not all but from 0x00 to 0x200. And all of them are read as 0. Yes, this is odd but I can't see that I'm doing something wrong here while reading those values.

Quoted 19 lines
Quoted 19 lines

Then I've started looking into ehci.c:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/ehci.c

EHCI_USB2PDO (per-port disable) looked promising here. And writing 0xff into this reg results in all ports disabled:

=> usb tree
USB device tree:

   1  Hub (480 Mb/s, 0mA)
   |  u-boot EHCI Host Controller
   |
   +-2  Hub (480 Mb/s, 0mA)

So this register at least has some effect. But its initialized with 0 and writing 0 into it does not fix the problem with the missing ports.

Quoted 6 lines
Quoted 4 lines

I also ported the PHY values from usb2_phy_init() without any changes. The values here are the default values, as I can read them back. Also the AMI BIOS does not change these values, I've double checked this as well.

BTW is the AMI BIOS UEFI?

I think so - I need to check to be 100% sure though.

Quoted 2 lines

If so, for now I suppose you could boot into U-Boot from that, and deal with the problem later.

Interesting idea. Right now I'm booting into the AMI BIOS once, and then only doing reset's into U-Boot (I can toggle the SPI NOR chip via a DIP switch, which is quite handy).

Quoted 34 lines
Quoted 34 lines

So I'm nearly out of ideas right now what else to configure / test to get all ports running. One idea is that the xHCI controller also needs some configuration for this port muxing. See:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/xhci.c:

                 /* USB3 SuperSpeed Enable */
                 REG_PCI_WRITE32(XHCI_USB3PR, BYTM_USB3_PORT_MAP),
                 /* USB2 Port Route to XHCI */
                 REG_PCI_WRITE32(XHCI_USB2PR, BYTM_USB2_PORT_MAP),

and:

                 /* Set USB2 Port Routing Mask */
                 REG_PCI_WRITE32(XHCI_USB2PRM, BYTM_USB2_PORT_MAP),
                 /* Set USB3 Port Routing Mask */
                 REG_PCI_WRITE32(XHCI_USB3PRM, BYTM_USB3_PORT_MAP),
                 /*
                  * Disable ports if requested
                  */
                 /* Open per-port disable control override */
                 REG_IO_RMW16(ACPI_BASE_ADDRESS + UPRWC, ~0, UPRWC_WR_EN),
                 REG_PCI_WRITE32(XHCI_USB2PDO, config->usb2_port_disable_mask),
                 REG_PCI_WRITE32(XHCI_USB3PDO, config->usb3_port_disable_mask),
                 /* Close per-port disable control override */
                 REG_IO_RMW16(ACPI_BASE_ADDRESS + UPRWC, ~UPRWC_WR_EN, 0),

But I can only either see the EHCI or the xHCI controller via "pci". If I configure the FSP to enable xHCI (fsp,enable-xhci) the EHCI PCI device is not listed. And without this DT property the xHCI PCI device is missing. So I only have access to one USB controller at the some time.

Quoted 4 lines
Quoted 1 line

Any further ideas are really welcome! :)

I'm pretty short on time this month otherwise I would love to look at this.

That would be great, thanks!

Quoted 2 lines

Can you post a patch that adds all the init code you have found to baytrail?

I need to clean this mess up a bit before I can post something of this. And I've used the last few days to implement the USB scanning enhancements, as you will have noticed in your inbox. :)

I'll definitely come back to your offer beginning of next week and will post this coreboot register access stuff I've added to my platform code for testing.

Quoted 6 lines
Quoted 4 lines

BTW: Did you (or somebody else?) already start moving xHCI (PCI) to DM yet? If yes, could you perhaps provide this version so that I could continue with it.

Yes, see u-boot-x86/samus-working.

Thanks. I'll probably look into this next week.

Thanks,
Stefan

#27 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

Hi Stefan,

Quoted 264 lines · Stefan Roese

Hi Simon,

Quoted 152 lines · Simon Glass
Quoted 150 lines · Stefan Roese

Hi Simon,

On 09.03.2016 00:33, Simon Glass wrote:

<snip>

Quoted 109 lines
Quoted 99 lines
Quoted 59 lines
Quoted 52 lines

I'm currently struggling with the USB EHCI ports on my custom Bay Trail x86 board. With the current U-Boot, cloned from the MinnowMAX, only some of the USB EHCI ports are enabled / available. Here the "usb tree" output with 3 USB keys installed:

=> usb tree
USB device tree:

     1  Hub (480 Mb/s, 0mA)
     |  u-boot EHCI Host Controller
     |
     +-2  Hub (480 Mb/s, 0mA)
       |
       +-3  Hub (480 Mb/s, 100mA)
       | |
       | +-4  Hub (12 Mb/s, 100mA)
       |
       +-5  Mass Storage (480 Mb/s, 200mA)
            JetFlash Mass Storage Device 3281440601

When I first start the original (AMI) BIOS on this custom board, and then reboot into U-Boot (without a power-cycle), I see this configuration:

=> usb tree
USB device tree:

     1  Hub (480 Mb/s, 0mA)
     |  u-boot EHCI Host Controller
     |
     +-2  Hub (480 Mb/s, 0mA)
       |
       +-3  Hub (480 Mb/s, 100mA)
       | |
       | +-4  Hub (12 Mb/s, 100mA)
       |
       +-5  Hub (480 Mb/s, 0mA)
       | |
       | +-6  Mass Storage (480 Mb/s, 200mA)
       | |    Kingston DataTraveler 2.0 50E549C688C4BE7189942766
       | |
       | +-7  Mass Storage (480 Mb/s, 98mA)
       |      USBest Technology USB Mass Storage Device
09092207fbf0c4
       |
       +-8  Mass Storage (480 Mb/s, 200mA)
            JetFlash Mass Storage Device 3281440601

So now all 3 USB sticks are detected.

It doesn't seem to be a problem with missing USB power switch enabling via some GPIOs. I've checked the schematics and all ports should have power enabled.

Quoted 5 lines

Do you have any quick ideas, what might be missing to enable all 4 EHCI ports on Bay Trail? There seems to be a per-port disable feature which might be involved. I'm still pretty new to x86, and I'm struggling with finding the correct datasheet for this. So any hints are really appreciated.

Quoted 2 lines

It might be worth checking the pci bus device list in both cases. Perhaps one of the USB ports is disabled?

IIUTC, its only one PCI device, that handles all EHCI USB 2.0 ports. In both cases its this output:

=> pci
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________

00.1f.00   0x8086     0x0f1c     Bridge device           0x01
00.00.00   0x8086     0x0f00     Bridge device           0x00
00.02.00   0x8086     0x0f31     Display controller      0x00
00.11.00   0x8086     0x0f15     Base system peripheral  0x05
00.12.00   0x8086     0x0f16     Base system peripheral  0x05
00.13.00   0x8086     0x0f23     Mass storage controller 0x06
00.15.00   0x8086     0x0f28     Multimedia device       0x01
00.18.00   0x8086     0x0f40     Base system peripheral  0x01
00.18.01   0x8086     0x0f41     Serial bus controller   0x80
00.18.02   0x8086     0x0f42     Serial bus controller   0x80
00.18.03   0x8086     0x0f43     Serial bus controller   0x80
00.18.04   0x8086     0x0f44     Serial bus controller   0x80
00.18.05   0x8086     0x0f45     Serial bus controller   0x80
00.18.06   0x8086     0x0f46     Serial bus controller   0x80
00.18.07   0x8086     0x0f47     Serial bus controller   0x80
00.1a.00   0x8086     0x0f18     Cryptographic device    0x80
00.1c.00   0x8086     0x0f48     Bridge device           0x04
00.1c.03   0x8086     0x0f4e     Bridge device           0x04
00.1d.00   0x8086     0x0f34     Serial bus controller   0x03
00.1e.00   0x8086     0x0f06     Base system peripheral  0x01
00.1e.01   0x8086     0x0f08     Serial bus controller   0x80
00.1e.02   0x8086     0x0f09     Serial bus controller   0x80
00.1e.04   0x8086     0x0f0c     Simple comm. controller 0x80
00.1e.05   0x8086     0x0f0e     Serial bus controller   0x80
00.1f.03   0x8086     0x0f12     Serial bus controller   0x05

Here 00.1d.00 is the EHCI controller. The "pci long" output is also identical. So its not that simple I'm afraid.

Quoted 8 lines

The Intel Atom Processor Z3600 and Z3700 Series Datasheet Vol 1 mentions in chapter "10.3.1 EHCI USB 2.0 Controller Features" on page 150:

? Per port USB disable

Perhaps this feature is biting me here. I'm wondering how this can be configured.

Quoted 8 lines

That sounds likely.

Also: xHCI and EHCI Port Mapping

suggests that you need to make sure the ports are being driven by EHCI instead of XHCI.

It mentions USB2HCSEL but I cannot find that in the datasheet.

Same here.

Quoted 5 lines

It does appear here though:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/perf_power.c

Quoted 7 lines

See IOSF_PORT_0x5a here:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/broadwell_fsp/src/lib/reg_script.c

So it looks like you need to set up this port, and perhaps some others asper that file.

I've looked into these coreboot files today. And ported parts of them to U-Boot to run these configurations there as well. Unfortunately without any (positive) effect. Some things I've tested are:

Configure 0x5a / 0xd0 (USB2HCSEL???) to different values. All without effect.

Quoted 7 lines
Quoted 3 lines

Unfortunately this value can't be read-out. At least I read always 0 here. So I can't see, if the AMI BIOS version configures here something different.

That's really odd, because it looks like this is a read/write interface. Worth digging int I think, and trying to find docs.

I've really tried to find some docs here. But all I can find on the net are the links to the coreboot source.

I've also printed all 0x5a registers, well not all but from 0x00 to 0x200. And all of them are read as 0. Yes, this is odd but I can't see that I'm doing something wrong here while reading those values.

Quoted 20 lines
Quoted 20 lines

Then I've started looking into ehci.c:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/ehci.c

EHCI_USB2PDO (per-port disable) looked promising here. And writing 0xff into this reg results in all ports disabled:

=> usb tree
USB device tree:

   1  Hub (480 Mb/s, 0mA)
   |  u-boot EHCI Host Controller
   |
   +-2  Hub (480 Mb/s, 0mA)

So this register at least has some effect. But its initialized with 0 and writing 0 into it does not fix the problem with the missing ports.

Quoted 7 lines
Quoted 4 lines

I also ported the PHY values from usb2_phy_init() without any changes. The values here are the default values, as I can read them back. Also the AMI BIOS does not change these values, I've double checked this as well.

BTW is the AMI BIOS UEFI?

I think so - I need to check to be 100% sure though.

Quoted 2 lines

If so, for now I suppose you could boot into U-Boot from that, and deal with the problem later.

Interesting idea. Right now I'm booting into the AMI BIOS once, and then only doing reset's into U-Boot (I can toggle the SPI NOR chip via a DIP switch, which is quite handy).

Quoted 39 lines
Quoted 39 lines

So I'm nearly out of ideas right now what else to configure / test to get all ports running. One idea is that the xHCI controller also needs some configuration for this port muxing. See:

https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/chromeos-2013.04/src/soc/intel/baytrail/xhci.c:

                 /* USB3 SuperSpeed Enable */
                 REG_PCI_WRITE32(XHCI_USB3PR, BYTM_USB3_PORT_MAP),
                 /* USB2 Port Route to XHCI */
                 REG_PCI_WRITE32(XHCI_USB2PR, BYTM_USB2_PORT_MAP),

and:

                 /* Set USB2 Port Routing Mask */
                 REG_PCI_WRITE32(XHCI_USB2PRM, BYTM_USB2_PORT_MAP),
                 /* Set USB3 Port Routing Mask */
                 REG_PCI_WRITE32(XHCI_USB3PRM, BYTM_USB3_PORT_MAP),
                 /*
                  * Disable ports if requested
                  */
                 /* Open per-port disable control override */
                 REG_IO_RMW16(ACPI_BASE_ADDRESS + UPRWC, ~0,
UPRWC_WR_EN),
                 REG_PCI_WRITE32(XHCI_USB2PDO,
config->usb2_port_disable_mask),
                 REG_PCI_WRITE32(XHCI_USB3PDO,

config->usb3_port_disable_mask),
/* Close per-port disable control override */ REG_IO_RMW16(ACPI_BASE_ADDRESS + UPRWC, ~UPRWC_WR_EN,
0),

But I can only either see the EHCI or the xHCI controller via "pci". If I configure the FSP to enable xHCI (fsp,enable-xhci) the EHCI PCI device is not listed. And without this DT property the xHCI PCI device is missing. So I only have access to one USB controller at the some time.

Quoted 5 lines
Quoted 1 line

Any further ideas are really welcome! :)

I'm pretty short on time this month otherwise I would love to look at this.

That would be great, thanks!

Quoted 2 lines

Can you post a patch that adds all the init code you have found to baytrail?

Quoted 7 lines

I need to clean this mess up a bit before I can post something of this. And I've used the last few days to implement the USB scanning enhancements, as you will have noticed in your inbox. :)

I'll definitely come back to your offer beginning of next week and will post this coreboot register access stuff I've added to my platform code for testing.

Actually I was saying that I am short on time, not that I can look at ti soon :-) I'm pretty tied up with travel etc. for the next 3 weeks, sorry.

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

BTW: Did you (or somebody else?) already start moving xHCI (PCI) to DM yet? If yes, could you perhaps provide this version so that I could continue with it.

Quoted 8 lines
Quoted 1 line

Yes, see u-boot-x86/samus-working.

Thanks. I'll probably look into this next week.

Thanks,
Stefan

Regards,
Simon

#28 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

In reply to Andrew Bradford

Hi Andrew,

Quoted 54 lines · Andrew Bradford

Hi Bin,

Quoted 51 lines · Bin Meng

Hi Andrew,

Quoted 46 lines · Andrew Bradford

Hi Simon,

Quoted 29 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

Quoted 7 lines

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working
- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I plan to apply this with these changes - please let me know if this doesn't suit.

I'm OK with disabling xhci and the MRC debug output in the FSP.

But if xhci is disabled then I believe when Linux boots that the USB 3.0 port on Minnow Max will only act as a USB 2.0 port. That u-boot doesn't yet have working XHCI on E3800 means there is a tradeoff and I wasn't sure which was a better choice.

Quoted 6 lines
Quoted 2 lines

Does these xHCI ports on MinnowMax work fully on Linux kernel? If it works, I'd rather we keep fsp,enable-xhci in the U-Boot.

I believe that the xhci port does work on Minnow Max in Linux but I do not have a board so I'm unable to test, sorry.

I've tested xHCI port in Linux on Bayley Bay today. Linux kernel xHCI driver works great on Bayley Bay. So indeed U-Boot xHCI driver has some issues supporting Intel chipset.

Regards,
Bin

#29 lore raw

PATCH v4 1/1 x86: baytrail: Configure FSP UPD from device tree

In reply to Simon Glass

Hi Simon,

Quoted 23 lines · Simon Glass

Hi,

Quoted 12 lines · Bin Meng
Quoted 10 lines · Andrew Bradford

From: Andrew Bradford <[email protected]>

Allow for configuration of FSP UPD from the device tree which will override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD settings from the Intel FSPv4 Gold release to the respective dts files, with the condition that the memory-down parameters for MinnowMax are also used.

Quoted 7 lines
Quoted 3 lines

---

Quoted 8 lines

Tested on minnowmax:

I found that I need to remove two properties from the minnowmax.dts:

- fsp,enable-xhci needs to be removed as this does not work in U-Boot at present and stops EHCI from working

Ah, I thought xHCI was working on MinnowMax! Further looking at the codes, I found you added the pci-xhci driver but is not enabled on MinnowMax. In fact, I was trying to bring up xHCI on BayleyBay as it does not work. I thought it might be caused by my BayTrail stepping is pretty old on my board. But now since it does not work on MinnowMax (which has B2 and D0 stepping), so it looks it may be a U-Boot xHCI driver issue?

Quoted 3 lines

- fsp,mrc-debug-msg needs to be removed to prevent debug information being displayed

I was using a FSPv4 debug binary and does not notice this.

Quoted 3 lines

I plan to apply this with these changes - please let me know if this doesn't suit.

Regards,
Bin