x86: dfi: Add option to select different config headers for baseboards
authorStefan Roese <sr@denx.de>
Tue, 8 Aug 2017 09:52:12 +0000 (11:52 +0200)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 8 Aug 2017 13:13:06 +0000 (21:13 +0800)
This patch adds the infrastructure to define different config headers
with different configurations and default environment for the baseboards
that can now be selected via Kconfig. The new configuration for the
theadorable-x86-dfi-bt700 is also added.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
board/dfi/Kconfig
board/dfi/dfi-bt700/Kconfig
board/dfi/dfi-bt700/MAINTAINERS
configs/dfi-bt700-q7x-151_defconfig
configs/theadorable-x86-dfi-bt700_defconfig
include/configs/theadorable-x86-dfi-bt700.h [new file with mode: 0644]

index d2a1d78783f25f88f02fbbf783dea40df880c969..5488f68ed28b9b75daa02abc931adefb502421d1 100644 (file)
@@ -8,10 +8,9 @@ if VENDOR_DFI
 
 choice
        prompt "Mainboard model"
-       optional
 
-config TARGET_DFI_BT700
-       bool "DFI BT700 BayTrail"
+config TARGET_Q7X_151_DFI_BT700
+       bool "DFI BT700 BayTrail on DFI Q7X-151 baseboard"
        imply SCSI
        help
          This is the DFI Q7X-151 baseboard equipped with the
@@ -23,6 +22,19 @@ config TARGET_DFI_BT700
          Note that PCIE_ECAM_BASE is set up by the FSP so the value used
          by U-Boot matches that value.
 
+config TARGET_THEADORABLE_X86_DFI_BT700
+       bool "DFI BT700 BayTrail on theadorable-x86 baseboard"
+       imply SCSI
+       help
+         This is the theadorable-x86 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"
index 81a2575d11da4141bad62631d207d40387177e84..4b6c3fc56ce82c2f69a284c5b025f74bba03ecaa 100644 (file)
@@ -1,5 +1,3 @@
-if TARGET_DFI_BT700
-
 config SYS_BOARD
        default "dfi-bt700"
 
@@ -10,7 +8,8 @@ config SYS_SOC
        default "baytrail"
 
 config SYS_CONFIG_NAME
-       default "dfi-bt700"
+       default "dfi-bt700" if TARGET_Q7X_151_DFI_BT700
+       default "theadorable-x86-dfi-bt700" if TARGET_THEADORABLE_X86_DFI_BT700
 
 config SYS_TEXT_BASE
        default 0xfff00000 if !EFI_STUB
@@ -24,8 +23,8 @@ config BOARD_SPECIFIC_OPTIONS # dummy
        select BOARD_EARLY_INIT_F
        select BOARD_LATE_INIT
        select SPI_FLASH_STMICRO
+       imply SPI_FLASH_SPANSION
+       imply SPI_FLASH_WINBOND
 
 config PCIE_ECAM_BASE
        default 0xe0000000
-
-endif
index 6639787814e539cba47418d34512b3969b365dea..a99a7250b8ccbe6c0c9d0d46face5836468ef62d 100644 (file)
@@ -3,6 +3,7 @@ M:      Stefan Roese <sr@denx.de>
 S:     Maintained
 F:     board/dfi/dfi-bt700
 F:     include/configs/dfi-bt700.h
+F:     include/configs/theadorable-x86-dfi-bt700.h
 F:     configs/dfi-bt700-q7x-151_defconfig
 F:     configs/theadorable-x86-dfi-bt700_defconfig
 F:     arch/x86/dts/dfi-bt700.dtsi
index 13d911c78cb2f8ea698c73bb068f339e0401ccfe..bcc830a3b7ca505869e17ebb8581041ea52f2b30 100644 (file)
@@ -1,13 +1,13 @@
 CONFIG_X86=y
 CONFIG_VENDOR_DFI=y
 CONFIG_DEFAULT_DEVICE_TREE="dfi-bt700-q7x-151"
-CONFIG_TARGET_DFI_BT700=y
-CONFIG_DEBUG_UART=y
 CONFIG_SMP=y
 CONFIG_HAVE_VGA_BIOS=y
+CONFIG_VGA_BIOS_ADDR=0xfffa0000
 CONFIG_GENERATE_PIRQ_TABLE=y
 CONFIG_GENERATE_MP_TABLE=y
 CONFIG_GENERATE_ACPI_TABLE=y
+CONFIG_HAVE_ACPI_RESUME=y
 CONFIG_SEABIOS=y
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
@@ -44,8 +44,6 @@ CONFIG_CPU=y
 CONFIG_DM_I2C=y
 CONFIG_NUVOTON_NCT6102D=y
 CONFIG_E1000=y
-CONFIG_DEBUG_UART_BASE=0x3f8
-CONFIG_DEBUG_UART_CLOCK=1843200
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
index 29d48b6c53e1d939bb1487355ebafac4dd235853..c49d06b4a0bd048d4925e642a7033c51aa6bc545 100644 (file)
@@ -1,13 +1,14 @@
 CONFIG_X86=y
 CONFIG_VENDOR_DFI=y
 CONFIG_DEFAULT_DEVICE_TREE="theadorable-x86-dfi-bt700"
-CONFIG_TARGET_DFI_BT700=y
+CONFIG_TARGET_THEADORABLE_X86_DFI_BT700=y
 CONFIG_SMP=y
 CONFIG_HAVE_VGA_BIOS=y
 CONFIG_VGA_BIOS_ADDR=0xfffa0000
 CONFIG_GENERATE_PIRQ_TABLE=y
 CONFIG_GENERATE_MP_TABLE=y
 CONFIG_GENERATE_ACPI_TABLE=y
+CONFIG_HAVE_ACPI_RESUME=y
 CONFIG_SEABIOS=y
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
diff --git a/include/configs/theadorable-x86-dfi-bt700.h b/include/configs/theadorable-x86-dfi-bt700.h
new file mode 100644 (file)
index 0000000..9f59191
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2016 Stefan Roese <sr@denx.de>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/*
+ * board/config.h - configuration options, board specific
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#include <configs/x86-common.h>
+
+#define CONFIG_SYS_MONITOR_LEN         (1 << 20)
+
+#define CONFIG_PREBOOT
+
+/* Use BayTrail internal HS UART which is memory-mapped */
+#undef  CONFIG_SYS_NS16550_PORT_MAPPED
+
+#define CONFIG_STD_DEVICES_SETTINGS     "stdin=serial\0" \
+                                       "stdout=serial\0" \
+                                       "stderr=serial\0"
+
+#define CONFIG_USB_HOST_ETHER
+#define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_SMSC95XX
+#define CONFIG_USB_ETHER_MCS7830
+#define CONFIG_USB_ETHER_RTL8152
+
+#define VIDEO_IO_OFFSET                                0
+#define CONFIG_X86EMU_RAW_IO
+#define CONFIG_CMD_BMP
+#define CONFIG_BMP_16BPP
+
+/* Environment settings */
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+#undef CONFIG_ENV_SIZE
+#define CONFIG_ENV_SIZE                        0x2000
+#define CONFIG_ENV_SECT_SIZE           0x1000
+#define CONFIG_ENV_OFFSET              0x006ec000
+#define CONFIG_ENV_OFFSET_REDUND       \
+       (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
+
+#endif /* __CONFIG_H */