Skip to contentSkip to conversation

x86: Add DFI BT700 BayTrail board support

PATCH Superseded Stefan Roese 2 participants 5 messages Jul 19, 2016 – Aug 15, 2016 x86

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 x86: Add DFI BT700 BayTrail board support

This patch adds support for the DFI BayTrail BT700 QSeven SoM installed on the DFI Q7X-151 baseboard. The baseboard is equipped with the Nuvoton NCT6102D Super IO chip providing the UART as console.

---
v3:
- Change comment Winbond > Nuvoton
- Remove unneeded compatible property in HS-UART DTS node

v2:
- Added missing text to Kconfig entry

 arch/x86/Kconfig                          |   4 +
 arch/x86/dts/Makefile                     |   1 +
 arch/x86/dts/dfi-bt700-q7x-151.dts        |  22 +++
 arch/x86/dts/dfi-bt700.dtsi               | 308 ++++++++++++++++++++++++++++++
 board/dfi/Kconfig                         |  29 +++
 board/dfi/dfi-bt700/Kconfig               |  28 +++
 board/dfi/dfi-bt700/MAINTAINERS           |   8 +
 board/dfi/dfi-bt700/Makefile              |   8 +
 board/dfi/dfi-bt700/acpi/mainboard.asl    |  13 ++
 board/dfi/dfi-bt700/dfi-bt700.c           |  30 +++
 board/dfi/dfi-bt700/dsdt.asl              |  14 ++
 board/dfi/dfi-bt700/start.S               |   9 +
 configs/dfi-bt700-internal-uart_defconfig |  61 ++++++
 configs/dfi-bt700-q7x-151_defconfig       |  63 ++++++
 include/configs/dfi-bt700.h               |  74 +++++++
 15 files changed, 672 insertions(+)
 create mode 100644 arch/x86/dts/dfi-bt700-q7x-151.dts
 create mode 100644 arch/x86/dts/dfi-bt700.dtsi
 create mode 100644 board/dfi/Kconfig
 create mode 100644 board/dfi/dfi-bt700/Kconfig
 create mode 100644 board/dfi/dfi-bt700/MAINTAINERS
 create mode 100644 board/dfi/dfi-bt700/Makefile
 create mode 100644 board/dfi/dfi-bt700/acpi/mainboard.asl
 create mode 100644 board/dfi/dfi-bt700/dfi-bt700.c
 create mode 100644 board/dfi/dfi-bt700/dsdt.asl
 create mode 100644 board/dfi/dfi-bt700/start.S
 create mode 100644 configs/dfi-bt700-internal-uart_defconfig
 create mode 100644 configs/dfi-bt700-q7x-151_defconfig
 create mode 100644 include/configs/dfi-bt700.h
arch/x86/Kconfig +4 -0
index 29d1120..5193ee7 100644
@@ -17,6 +17,9 @@ config VENDOR_CONGATEC
 config VENDOR_COREBOOT
 	bool "coreboot"
 
+config VENDOR_DFI
+	bool "dfi"
+
 config VENDOR_EFI
 	bool "efi"
 
@@ -35,6 +38,7 @@ endchoice
 source "board/advantech/Kconfig"
 source "board/congatec/Kconfig"
 source "board/coreboot/Kconfig"
+source "board/dfi/Kconfig"
 source "board/efi/Kconfig"
 source "board/emulation/Kconfig"
 source "board/google/Kconfig"
arch/x86/dts/Makefile +1 -0
index 4f07f41..ca086bd 100644
@@ -9,6 +9,7 @@ dtb-y += bayleybay.dtb \
 	conga-qeval20-qa3-e3845.dtb \
 	cougarcanyon2.dtb \
 	crownbay.dtb \
+	dfi-bt700-q7x-151.dtb \
 	efi.dtb \
 	galileo.dtb \
 	minnowmax.dtb \
arch/x86/dts/dfi-bt700-q7x-151.dts new file +22 -0
new file mode 100644
index 0000000..31d9679
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2014, Bin Meng <[email protected]>
+ * Copyright (C) 2016 Stefan Roese <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "dfi-bt700.dtsi"
+
+#include "serial.dtsi"
+
+/ {
+	model = "DFI-BT700";
+	compatible = "dfi,bt700", "intel,baytrail";
+
+	aliases {
+		serial0 = &serial;
+		spi0 = &spi;
+	};
+};
arch/x86/dts/dfi-bt700.dtsi new file +308 -0

308 lines not on this page · raw message

board/dfi/Kconfig new file +29 -0
new file mode 100644
index 0000000..25d0a11
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2015, Bin Meng <[email protected]>
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+if VENDOR_DFI
+
+choice
+	prompt "Mainboard model"
+	optional
+
+config TARGET_DFI_BT700
+	bool "DFI BT700 BayTrail"
+	help
+	  This is the DFI Q7X-151 baseboard equipped with the
+	  DFI BayTrail Bt700 SoM. It contains an Atom E3845 with
+	  Ethernet (in non-PCIe-x4 configuration), micro-SD, USB 2,
+	  USB 3, SATA, serial console and DisplayPort video out.
+	  It requires some binary blobs - see README.x86 for details.
+
+	  Note that PCIE_ECAM_BASE is set up by the FSP so the value used
+	  by U-Boot matches that value.
+
+endchoice
+
+source "board/dfi/dfi-bt700/Kconfig"
+
+endif
board/dfi/dfi-bt700/Kconfig new file +28 -0
new file mode 100644
index 0000000..3f0acb3
@@ -0,0 +1,28 @@
+if TARGET_DFI_BT700
+
+config SYS_BOARD
+	default "dfi-bt700"
+
+config SYS_VENDOR
+	default "dfi"
+
+config SYS_SOC
+	default "baytrail"
+
+config SYS_CONFIG_NAME
+	default "dfi-bt700"
+
+config SYS_TEXT_BASE
+	default 0xfff00000 if !EFI_STUB
+	default 0x01110000 if EFI_STUB
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+	def_bool y
+	select X86_RESET_VECTOR if !EFI_STUB
+	select INTEL_BAYTRAIL
+	select BOARD_ROMSIZE_KB_8192
+
+config PCIE_ECAM_BASE
+	default 0xe0000000
+
+endif
board/dfi/dfi-bt700/MAINTAINERS new file +8 -0
new file mode 100644
index 0000000..9c3d699
@@ -0,0 +1,8 @@
+congatec DFI-BT700
+M:	Stefan Roese <[email protected]>
+S:	Maintained
+F:	board/dfi/dfi-bt700
+F:	include/configs/dfi-bt700.h
+F:	configs/dfi-bt700-q7x-151_defconfig
+F:	arch/x86/dts/dfi-bt700.dtsi
+F:	arch/x86/dts/dfi-bt700-q7x-151.dts
board/dfi/dfi-bt700/Makefile new file +8 -0
new file mode 100644
index 0000000..8052f5e
@@ -0,0 +1,8 @@
+#
+# Copyright (C) 2015, Google, Inc
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	+= dfi-bt700.o start.o
+obj-$(CONFIG_GENERATE_ACPI_TABLE) += dsdt.o
board/dfi/dfi-bt700/acpi/mainboard.asl new file +13 -0
new file mode 100644
index 0000000..544a049
@@ -0,0 +1,13 @@
+/*
+ * Copyright (C) 2016, Bin Meng <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+/* Power Button */
+Device (PWRB)
+{
+	Name(_HID, EISAID("PNP0C0C"))
+}
+
+/* TODO: Need add Nuvoton SuperIO chipset NCT6102D ASL codes */
board/dfi/dfi-bt700/dfi-bt700.c new file +30 -0
new file mode 100644
index 0000000..8645bdc
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2016 Stefan Roese <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <nuvoton_nct6102d.h>
+#include <asm/gpio.h>
+#include <asm/ibmpc.h>
+#include <asm/pnp_def.h>
+
+int board_early_init_f(void)
+{
+#ifdef CONFIG_INTERNAL_UART
+	/* Disable the legacy UART which is enabled per default */
+	nct6102d_uarta_disable();
+#else
+	/*
+	 * The FSP enables the BayTrail internal legacy UART (again).
+	 * Disable it again, so that the Nuvoton one can be used.
+	 */
+	setup_internal_uart(0);
+#endif
+
+	/* Disable the watchdog which is enabled per default */
+	nct6102d_wdt_disable();
+
+	return 0;
+}
board/dfi/dfi-bt700/dsdt.asl new file +14 -0
new file mode 100644
index 0000000..6042011
@@ -0,0 +1,14 @@
+/*
+ * Copyright (C) 2016, Bin Meng <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+DefinitionBlock("dsdt.aml", "DSDT", 2, "U-BOOT", "U-BOOTBL", 0x00010000)
+{
+	/* platform specific */
+	#include <asm/arch/acpi/platform.asl>
+
+	/* board specific */
+	#include "acpi/mainboard.asl"
+}
board/dfi/dfi-bt700/start.S new file +9 -0
new file mode 100644
index 0000000..2c941a4
@@ -0,0 +1,9 @@
+/*
+ * Copyright (C) 2015, Google, Inc
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+.globl early_board_init
+early_board_init:
+	jmp	early_board_init_ret
configs/dfi-bt700-internal-uart_defconfig new file +61 -0

61 lines not on this page · raw message

configs/dfi-bt700-q7x-151_defconfig new file +63 -0

63 lines not on this page · raw message

include/configs/dfi-bt700.h new file +74 -0

74 lines not on this page · raw message

Signature · 1 line
2.9.2
#1 lore raw

PATCH v3 1/2 x86: Add DFI BT700 BayTrail board support

Quoted 36 lines · Stefan Roese

This patch adds support for the DFI BayTrail BT700 QSeven SoM installed on the DFI Q7X-151 baseboard. The baseboard is equipped with the Nuvoton NCT6102D Super IO chip providing the UART as console.

---
v3:
- Change comment Winbond > Nuvoton
- Remove unneeded compatible property in HS-UART DTS node

v2:
- Added missing text to Kconfig entry

 arch/x86/Kconfig                          |   4 +
 arch/x86/dts/Makefile                     |   1 +
 arch/x86/dts/dfi-bt700-q7x-151.dts        |  22 +++
 arch/x86/dts/dfi-bt700.dtsi               | 308 ++++++++++++++++++++++++++++++
 board/dfi/Kconfig                         |  29 +++
 board/dfi/dfi-bt700/Kconfig               |  28 +++
 board/dfi/dfi-bt700/MAINTAINERS           |   8 +
 board/dfi/dfi-bt700/Makefile              |   8 +
 board/dfi/dfi-bt700/acpi/mainboard.asl    |  13 ++
 board/dfi/dfi-bt700/dfi-bt700.c           |  30 +++
 board/dfi/dfi-bt700/dsdt.asl              |  14 ++
 board/dfi/dfi-bt700/start.S               |   9 +
 configs/dfi-bt700-internal-uart_defconfig |  61 ++++++
 configs/dfi-bt700-q7x-151_defconfig       |  63 ++++++
 include/configs/dfi-bt700.h               |  74 +++++++
 15 files changed, 672 insertions(+)
 create mode 100644 arch/x86/dts/dfi-bt700-q7x-151.dts
 create mode 100644 arch/x86/dts/dfi-bt700.dtsi
 create mode 100644 board/dfi/Kconfig
 create mode 100644 board/dfi/dfi-bt700/Kconfig
 create mode 100644 board/dfi/dfi-bt700/MAINTAINERS
Quoted 9 lines
 create mode 100644 board/dfi/dfi-bt700/Makefile
 create mode 100644 board/dfi/dfi-bt700/acpi/mainboard.asl
 create mode 100644 board/dfi/dfi-bt700/dfi-bt700.c
 create mode 100644 board/dfi/dfi-bt700/dsdt.asl
 create mode 100644 board/dfi/dfi-bt700/start.S
 create mode 100644 configs/dfi-bt700-internal-uart_defconfig
 create mode 100644 configs/dfi-bt700-q7x-151_defconfig
 create mode 100644 include/configs/dfi-bt700.h

applied to u-boot-x86, thanks!

#2 lore raw

PATCH v3 1/2 x86: Add DFI BT700 BayTrail board support

Hi Stefan,

Quoted 47 lines · Bin Meng
Quoted 36 lines · Stefan Roese

This patch adds support for the DFI BayTrail BT700 QSeven SoM installed on the DFI Q7X-151 baseboard. The baseboard is equipped with the Nuvoton NCT6102D Super IO chip providing the UART as console.

---
v3:
- Change comment Winbond > Nuvoton
- Remove unneeded compatible property in HS-UART DTS node

v2:
- Added missing text to Kconfig entry

 arch/x86/Kconfig                          |   4 +
 arch/x86/dts/Makefile                     |   1 +
 arch/x86/dts/dfi-bt700-q7x-151.dts        |  22 +++
 arch/x86/dts/dfi-bt700.dtsi               | 308 ++++++++++++++++++++++++++++++
 board/dfi/Kconfig                         |  29 +++
 board/dfi/dfi-bt700/Kconfig               |  28 +++
 board/dfi/dfi-bt700/MAINTAINERS           |   8 +
 board/dfi/dfi-bt700/Makefile              |   8 +
 board/dfi/dfi-bt700/acpi/mainboard.asl    |  13 ++
 board/dfi/dfi-bt700/dfi-bt700.c           |  30 +++
 board/dfi/dfi-bt700/dsdt.asl              |  14 ++
 board/dfi/dfi-bt700/start.S               |   9 +
 configs/dfi-bt700-internal-uart_defconfig |  61 ++++++
 configs/dfi-bt700-q7x-151_defconfig       |  63 ++++++
 include/configs/dfi-bt700.h               |  74 +++++++
 15 files changed, 672 insertions(+)
 create mode 100644 arch/x86/dts/dfi-bt700-q7x-151.dts
 create mode 100644 arch/x86/dts/dfi-bt700.dtsi
 create mode 100644 board/dfi/Kconfig
 create mode 100644 board/dfi/dfi-bt700/Kconfig
 create mode 100644 board/dfi/dfi-bt700/MAINTAINERS
Quoted 9 lines
 create mode 100644 board/dfi/dfi-bt700/Makefile
 create mode 100644 board/dfi/dfi-bt700/acpi/mainboard.asl
 create mode 100644 board/dfi/dfi-bt700/dfi-bt700.c
 create mode 100644 board/dfi/dfi-bt700/dsdt.asl
 create mode 100644 board/dfi/dfi-bt700/start.S
 create mode 100644 configs/dfi-bt700-internal-uart_defconfig
 create mode 100644 configs/dfi-bt700-q7x-151_defconfig
 create mode 100644 include/configs/dfi-bt700.h
Quoted 1 line

applied to u-boot-x86, thanks!

Unfortunately the dfi-bt700-internal-uart_defconfig does not build. Can you please look at this?

+
+Device Tree Source is not correctly specified. +Please define 'CONFIG_DEFAULT_DEVICE_TREE' +or build with 'DEVICE_TREE=<device_tree>' argument +make[2]: *** [arch/x86/dts/dfi-bt700.dtb] Error 1 +make[1]: *** [dts/dt.dtb] Error 2

Also buildman reports the following warnings:

WARNING: no status info for 'theadorable-x86-dfi-bt700'
WARNING: no maintainers for 'theadorable-x86-dfi-bt700'
WARNING: no status info for 'dfi-bt700-internal-uart'
WARNING: no maintainers for 'dfi-bt700-internal-uart'

WARNING: no status info for 'conga-qeval20-qa3-e3845-internal-uart'
WARNING: no maintainers for 'conga-qeval20-qa3-e3845-internal-uart'

Can you please fix these too?

Regards,
Bin

#3 lore raw

PATCH v3 1/2 x86: Add DFI BT700 BayTrail board support

Hi Bin,

Quoted 67 lines · Bin Meng
Quoted 47 lines · Bin Meng
Quoted 36 lines · Stefan Roese

This patch adds support for the DFI BayTrail BT700 QSeven SoM installed on the DFI Q7X-151 baseboard. The baseboard is equipped with the Nuvoton NCT6102D Super IO chip providing the UART as console.

---
v3:
- Change comment Winbond > Nuvoton
- Remove unneeded compatible property in HS-UART DTS node

v2:
- Added missing text to Kconfig entry

 arch/x86/Kconfig                          |   4 +
 arch/x86/dts/Makefile                     |   1 +
 arch/x86/dts/dfi-bt700-q7x-151.dts        |  22 +++
 arch/x86/dts/dfi-bt700.dtsi               | 308 ++++++++++++++++++++++++++++++
 board/dfi/Kconfig                         |  29 +++
 board/dfi/dfi-bt700/Kconfig               |  28 +++
 board/dfi/dfi-bt700/MAINTAINERS           |   8 +
 board/dfi/dfi-bt700/Makefile              |   8 +
 board/dfi/dfi-bt700/acpi/mainboard.asl    |  13 ++
 board/dfi/dfi-bt700/dfi-bt700.c           |  30 +++
 board/dfi/dfi-bt700/dsdt.asl              |  14 ++
 board/dfi/dfi-bt700/start.S               |   9 +
 configs/dfi-bt700-internal-uart_defconfig |  61 ++++++
 configs/dfi-bt700-q7x-151_defconfig       |  63 ++++++
 include/configs/dfi-bt700.h               |  74 +++++++
 15 files changed, 672 insertions(+)
 create mode 100644 arch/x86/dts/dfi-bt700-q7x-151.dts
 create mode 100644 arch/x86/dts/dfi-bt700.dtsi
 create mode 100644 board/dfi/Kconfig
 create mode 100644 board/dfi/dfi-bt700/Kconfig
 create mode 100644 board/dfi/dfi-bt700/MAINTAINERS
Quoted 9 lines
 create mode 100644 board/dfi/dfi-bt700/Makefile
 create mode 100644 board/dfi/dfi-bt700/acpi/mainboard.asl
 create mode 100644 board/dfi/dfi-bt700/dfi-bt700.c
 create mode 100644 board/dfi/dfi-bt700/dsdt.asl
 create mode 100644 board/dfi/dfi-bt700/start.S
 create mode 100644 configs/dfi-bt700-internal-uart_defconfig
 create mode 100644 configs/dfi-bt700-q7x-151_defconfig
 create mode 100644 include/configs/dfi-bt700.h
Quoted 1 line

applied to u-boot-x86, thanks!

Unfortunately the dfi-bt700-internal-uart_defconfig does not build. Can you please look at this?

(quoted diff) +6 -0
+
+Device Tree Source is not correctly specified.
+Please define 'CONFIG_DEFAULT_DEVICE_TREE'
+or build with 'DEVICE_TREE=<device_tree>' argument
+make[2]: *** [arch/x86/dts/dfi-bt700.dtb] Error 1
+make[1]: *** [dts/dt.dtb] Error 2

Also buildman reports the following warnings:

WARNING: no status info for 'theadorable-x86-dfi-bt700'
WARNING: no maintainers for 'theadorable-x86-dfi-bt700'
WARNING: no status info for 'dfi-bt700-internal-uart'
WARNING: no maintainers for 'dfi-bt700-internal-uart'

Quoted 4 lines

WARNING: no status info for 'conga-qeval20-qa3-e3845-internal-uart'
WARNING: no maintainers for 'conga-qeval20-qa3-e3845-internal-uart'

Can you please fix these too?

Sorry for the problems. I'm just back from vacation and will take a look at it today.

Thanks,
Stefan

#4 lore raw

PATCH v3 1/2 x86: Add DFI BT700 BayTrail board support

Hi Stefan,

Quoted 76 lines · Stefan Roese

Hi Bin,

Quoted 72 lines · Bin Meng
Quoted 50 lines · Bin Meng
Quoted 38 lines · Stefan Roese

This patch adds support for the DFI BayTrail BT700 QSeven SoM installed on the DFI Q7X-151 baseboard. The baseboard is equipped with the Nuvoton NCT6102D Super IO chip providing the UART as console.

---
v3:
- Change comment Winbond > Nuvoton
- Remove unneeded compatible property in HS-UART DTS node

v2:
- Added missing text to Kconfig entry

 arch/x86/Kconfig                          |   4 +
 arch/x86/dts/Makefile                     |   1 +
 arch/x86/dts/dfi-bt700-q7x-151.dts        |  22 +++
 arch/x86/dts/dfi-bt700.dtsi               | 308
++++++++++++++++++++++++++++++
 board/dfi/Kconfig                         |  29 +++
 board/dfi/dfi-bt700/Kconfig               |  28 +++
 board/dfi/dfi-bt700/MAINTAINERS           |   8 +
 board/dfi/dfi-bt700/Makefile              |   8 +
 board/dfi/dfi-bt700/acpi/mainboard.asl    |  13 ++
 board/dfi/dfi-bt700/dfi-bt700.c           |  30 +++
 board/dfi/dfi-bt700/dsdt.asl              |  14 ++
 board/dfi/dfi-bt700/start.S               |   9 +
 configs/dfi-bt700-internal-uart_defconfig |  61 ++++++
 configs/dfi-bt700-q7x-151_defconfig       |  63 ++++++
 include/configs/dfi-bt700.h               |  74 +++++++
 15 files changed, 672 insertions(+)
 create mode 100644 arch/x86/dts/dfi-bt700-q7x-151.dts
 create mode 100644 arch/x86/dts/dfi-bt700.dtsi
 create mode 100644 board/dfi/Kconfig
 create mode 100644 board/dfi/dfi-bt700/Kconfig
 create mode 100644 board/dfi/dfi-bt700/MAINTAINERS
Quoted 9 lines
 create mode 100644 board/dfi/dfi-bt700/Makefile
 create mode 100644 board/dfi/dfi-bt700/acpi/mainboard.asl
 create mode 100644 board/dfi/dfi-bt700/dfi-bt700.c
 create mode 100644 board/dfi/dfi-bt700/dsdt.asl
 create mode 100644 board/dfi/dfi-bt700/start.S
 create mode 100644 configs/dfi-bt700-internal-uart_defconfig
 create mode 100644 configs/dfi-bt700-q7x-151_defconfig
 create mode 100644 include/configs/dfi-bt700.h
Quoted 1 line

applied to u-boot-x86, thanks!

Unfortunately the dfi-bt700-internal-uart_defconfig does not build. Can you please look at this?

(quoted diff) +6 -0
+
+Device Tree Source is not correctly specified.
+Please define 'CONFIG_DEFAULT_DEVICE_TREE'
+or build with 'DEVICE_TREE=<device_tree>' argument
+make[2]: *** [arch/x86/dts/dfi-bt700.dtb] Error 1
+make[1]: *** [dts/dt.dtb] Error 2

Also buildman reports the following warnings:

WARNING: no status info for 'theadorable-x86-dfi-bt700'
WARNING: no maintainers for 'theadorable-x86-dfi-bt700'
WARNING: no status info for 'dfi-bt700-internal-uart'
WARNING: no maintainers for 'dfi-bt700-internal-uart'

Quoted 8 lines
Quoted 4 lines

WARNING: no status info for 'conga-qeval20-qa3-e3845-internal-uart'
WARNING: no maintainers for 'conga-qeval20-qa3-e3845-internal-uart'

Can you please fix these too?

Sorry for the problems. I'm just back from vacation and will take a look at it today.

Thanks for checking. Please post new version patches with the additional changes and I will re-apply them.

Regards,
Bin