All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH u-boot v2019.04-aspeed-openbmc 0/3] Add Qualcomm DC-SCM V1 defconfig and board support
@ 2022-06-30 20:02 Jae Hyun Yoo
  2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 1/3] configs: ast2600: add Qualcomm DC-SCM V1 defconfig Jae Hyun Yoo
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Jae Hyun Yoo @ 2022-06-30 20:02 UTC (permalink / raw)
  To: Joel Stanley
  Cc: openbmc, Graeme Gregory, Cédric Le Goater, Jae Hyun Yoo, Jamie Iles

Hello,

This series adds Qualcomm DC-SCM V1 defconfig and initial board support.
Please review!

Thanks,

Jae

Jae Hyun Yoo (3):
  configs: ast2600: add Qualcomm DC-SCM V1 defconfig
  board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1
    board
  board: ast2600_qualcomm: add env default

 arch/arm/mach-aspeed/ast2600/Kconfig          |   8 ++
 board/aspeed/ast2600_qualcomm/Kconfig         |  15 +++
 board/aspeed/ast2600_qualcomm/Makefile        |   1 +
 .../dc-scm-v1-u-boot-env-default.txt          |   4 +
 board/aspeed/ast2600_qualcomm/dc-scm-v1.c     |  33 +++++
 configs/ast2600_qcom_dc_scm_v1_defconfig      | 119 ++++++++++++++++++
 6 files changed, 180 insertions(+)
 create mode 100644 board/aspeed/ast2600_qualcomm/Kconfig
 create mode 100644 board/aspeed/ast2600_qualcomm/Makefile
 create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt
 create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1.c
 create mode 100644 configs/ast2600_qcom_dc_scm_v1_defconfig

-- 
2.25.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH u-boot v2019.04-aspeed-openbmc 1/3] configs: ast2600: add Qualcomm DC-SCM V1 defconfig
  2022-06-30 20:02 [PATCH u-boot v2019.04-aspeed-openbmc 0/3] Add Qualcomm DC-SCM V1 defconfig and board support Jae Hyun Yoo
@ 2022-06-30 20:02 ` Jae Hyun Yoo
  2022-07-05  6:47   ` Joel Stanley
  2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 2/3] board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1 board Jae Hyun Yoo
  2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 3/3] board: ast2600_qualcomm: add env default Jae Hyun Yoo
  2 siblings, 1 reply; 17+ messages in thread
From: Jae Hyun Yoo @ 2022-06-30 20:02 UTC (permalink / raw)
  To: Joel Stanley
  Cc: openbmc, Graeme Gregory, Cédric Le Goater, Jae Hyun Yoo, Jamie Iles

Add Qualcomm DC-SCM V1 defconfig which is equipped with AST2600.

Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
---
 configs/ast2600_qcom_dc_scm_v1_defconfig | 117 +++++++++++++++++++++++
 1 file changed, 117 insertions(+)
 create mode 100644 configs/ast2600_qcom_dc_scm_v1_defconfig

diff --git a/configs/ast2600_qcom_dc_scm_v1_defconfig b/configs/ast2600_qcom_dc_scm_v1_defconfig
new file mode 100644
index 000000000000..353882deed26
--- /dev/null
+++ b/configs/ast2600_qcom_dc_scm_v1_defconfig
@@ -0,0 +1,117 @@
+CONFIG_ARM=y
+CONFIG_SYS_DCACHE_OFF=y
+CONFIG_ARCH_ASPEED=y
+CONFIG_SYS_TEXT_BASE=0x0
+CONFIG_ASPEED_AST2600=y
+CONFIG_TARGET_AST2600_QUALCOMM_DC_SCM_V1=y
+CONFIG_SYS_MALLOC_F_LEN=0x800
+CONFIG_ENV_SIZE=0x10000
+CONFIG_ENV_OFFSET=0xE0000
+CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_FIT=y
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="console=ttyS4,115200n8 root=/dev/ram rw"
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="bootm 20100000"
+CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_ARCH_EARLY_INIT_R=y
+CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_HUSH_PARSER=y
+# CONFIG_AUTO_COMPLETE is not set
+CONFIG_SYS_PROMPT="ast# "
+CONFIG_CMD_BOOTZ=y
+# CONFIG_CMD_BOOTEFI is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_NVEDIT_EFI is not set
+CONFIG_CMD_CRC32=y
+CONFIG_CRC32_VERIFY=y
+# CONFIG_LOOPW is not set
+CONFIG_CMD_MD5SUM=y
+CONFIG_MD5SUM_VERIFY=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_MEMORY=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_SYS_ALT_MEMTEST=y
+CONFIG_CMD_MX_CYCLIC=y
+CONFIG_CMD_SHA1SUM=y
+CONFIG_SHA1SUM_VERIFY=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_CLK=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_NCSI=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_EFI_PARTITION=y
+CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_USE_ENV_SPI_BUS=y
+CONFIG_ENV_SPI_BUS=0
+CONFIG_USE_ENV_SPI_CS=y
+CONFIG_ENV_SPI_CS=0
+CONFIG_USE_ENV_SPI_MAX_HZ=y
+CONFIG_ENV_SPI_MAX_HZ=100000000
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_CLK=y
+CONFIG_DM_GPIO=y
+CONFIG_ASPEED_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_ASPEED=y
+CONFIG_MISC=y
+CONFIG_ASPEED_AHBC=y
+CONFIG_ASPEED_H2X=y
+CONFIG_DM_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ASPEED=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_GIGADEVICE=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_PHY_BROADCOM=y
+CONFIG_PHY_MICREL=y
+CONFIG_PHY_MICREL_KSZ90X1=y
+CONFIG_PHY_REALTEK=y
+CONFIG_PHY_NCSI=y
+CONFIG_DM_ETH=y
+CONFIG_PHY_GIGE=y
+CONFIG_FTGMAC100=y
+CONFIG_MDIO=y
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_PCIE_ASPEED=y
+CONFIG_PHY=y
+CONFIG_PINCTRL=y
+CONFIG_RAM=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_SYSRESET=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_STORAGE=y
+CONFIG_WDT=y
+CONFIG_HEXDUMP=y
+# CONFIG_GENERATE_SMBIOS_TABLE is not set
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH u-boot v2019.04-aspeed-openbmc 2/3] board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1 board
  2022-06-30 20:02 [PATCH u-boot v2019.04-aspeed-openbmc 0/3] Add Qualcomm DC-SCM V1 defconfig and board support Jae Hyun Yoo
  2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 1/3] configs: ast2600: add Qualcomm DC-SCM V1 defconfig Jae Hyun Yoo
@ 2022-06-30 20:02 ` Jae Hyun Yoo
  2022-07-05  6:51   ` Joel Stanley
  2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 3/3] board: ast2600_qualcomm: add env default Jae Hyun Yoo
  2 siblings, 1 reply; 17+ messages in thread
From: Jae Hyun Yoo @ 2022-06-30 20:02 UTC (permalink / raw)
  To: Joel Stanley
  Cc: openbmc, Graeme Gregory, Cédric Le Goater, Jae Hyun Yoo, Jamie Iles

Add initial version of Qualcomm DC-SCM V1 board to support Qualcomm
specific options.

Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
---
 arch/arm/mach-aspeed/ast2600/Kconfig      |  8 ++++++
 board/aspeed/ast2600_qualcomm/Kconfig     | 15 +++++++++++
 board/aspeed/ast2600_qualcomm/Makefile    |  1 +
 board/aspeed/ast2600_qualcomm/dc-scm-v1.c | 33 +++++++++++++++++++++++
 4 files changed, 57 insertions(+)
 create mode 100644 board/aspeed/ast2600_qualcomm/Kconfig
 create mode 100644 board/aspeed/ast2600_qualcomm/Makefile
 create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1.c

diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig
index 46cc1ad1dbd9..252458846a84 100644
--- a/arch/arm/mach-aspeed/ast2600/Kconfig
+++ b/arch/arm/mach-aspeed/ast2600/Kconfig
@@ -46,6 +46,13 @@ config TARGET_AST2600_INTEL
 	  AST2600-INTEL is an Intel Eagle Stream CRB with
 	  AST2600 as the BMC.
 
+config TARGET_AST2600_QUALCOMM_DC_SCM_V1
+	bool "AST2600_QUALCOMM_DC_SCM_V1"
+	depends on ASPEED_AST2600
+	help
+	  AST2600-QUALCOMM-DC-SCM-V1 is a Qualcomm DC-SCM V1 board which is
+	  equipped with AST2600.
+
 endchoice
 
 source "board/aspeed/evb_ast2600/Kconfig"
@@ -53,5 +60,6 @@ source "board/aspeed/fpga_ast2600/Kconfig"
 source "board/aspeed/slt_ast2600/Kconfig"
 source "board/aspeed/ast2600_ibm/Kconfig"
 source "board/aspeed/ast2600_intel/Kconfig"
+source "board/aspeed/ast2600_qualcomm/Kconfig"
 
 endif
diff --git a/board/aspeed/ast2600_qualcomm/Kconfig b/board/aspeed/ast2600_qualcomm/Kconfig
new file mode 100644
index 000000000000..3ede24c34dee
--- /dev/null
+++ b/board/aspeed/ast2600_qualcomm/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_AST2600_QUALCOMM_DC_SCM_V1
+
+config SYS_BOARD
+	default "ast2600_qualcomm"
+
+config SYS_VENDOR
+	default "aspeed"
+
+config SYS_SOC
+	default "ast2600"
+
+config SYS_CONFIG_NAME
+	default "evb_ast2600"
+
+endif
diff --git a/board/aspeed/ast2600_qualcomm/Makefile b/board/aspeed/ast2600_qualcomm/Makefile
new file mode 100644
index 000000000000..cb2aae7f9298
--- /dev/null
+++ b/board/aspeed/ast2600_qualcomm/Makefile
@@ -0,0 +1 @@
+obj-y += dc-scm-v1.o
diff --git a/board/aspeed/ast2600_qualcomm/dc-scm-v1.c b/board/aspeed/ast2600_qualcomm/dc-scm-v1.c
new file mode 100644
index 000000000000..40bc85e068ad
--- /dev/null
+++ b/board/aspeed/ast2600_qualcomm/dc-scm-v1.c
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#include <common.h>
+#include <asm/io.h>
+
+/* GPIO registers */
+#define GPIO_BASE		0x1e780000
+#define GPIO_UVWX_VAL		(GPIO_BASE + 0x88)
+#define GPIO_UVWX_VAL_V3	BIT(11)
+#define GPIO_UVWX_DIR		(GPIO_BASE + 0x8c)
+#define GPIO_UVWX_DIR_V3	BIT(11)
+
+static void gpio_init(void)
+{
+	/* Set GPIOV3 (BMC_OK) as an output with value low explicitly. */
+	writel(readl(GPIO_UVWX_DIR) | GPIO_UVWX_DIR_V3, GPIO_UVWX_DIR);
+	writel(readl(GPIO_UVWX_VAL) & ~GPIO_UVWX_VAL_V3, GPIO_UVWX_VAL);
+}
+
+int board_early_init_f(void)
+{
+	gpio_init();
+
+	return 0;
+}
+
+int board_late_init(void)
+{
+	return 0;
+}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH u-boot v2019.04-aspeed-openbmc 3/3] board: ast2600_qualcomm: add env default
  2022-06-30 20:02 [PATCH u-boot v2019.04-aspeed-openbmc 0/3] Add Qualcomm DC-SCM V1 defconfig and board support Jae Hyun Yoo
  2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 1/3] configs: ast2600: add Qualcomm DC-SCM V1 defconfig Jae Hyun Yoo
  2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 2/3] board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1 board Jae Hyun Yoo
@ 2022-06-30 20:02 ` Jae Hyun Yoo
  2022-07-05  6:52   ` Joel Stanley
  2 siblings, 1 reply; 17+ messages in thread
From: Jae Hyun Yoo @ 2022-06-30 20:02 UTC (permalink / raw)
  To: Joel Stanley
  Cc: openbmc, Graeme Gregory, Cédric Le Goater, Jae Hyun Yoo, Jamie Iles

Add env default to dc-scm-v1 board configuration.

Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
---
 .../aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt  | 4 ++++
 configs/ast2600_qcom_dc_scm_v1_defconfig                      | 2 ++
 2 files changed, 6 insertions(+)
 create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt

diff --git a/board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt b/board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt
new file mode 100644
index 000000000000..9aebd38424ef
--- /dev/null
+++ b/board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt
@@ -0,0 +1,4 @@
+bootargs=console=ttyS4,115200n8 root=/dev/ram rw
+bootcmd=bootm 20100000
+bootdelay=2
+loadaddr=0x83000000
diff --git a/configs/ast2600_qcom_dc_scm_v1_defconfig b/configs/ast2600_qcom_dc_scm_v1_defconfig
index 353882deed26..e602163e1caf 100644
--- a/configs/ast2600_qcom_dc_scm_v1_defconfig
+++ b/configs/ast2600_qcom_dc_scm_v1_defconfig
@@ -67,6 +67,8 @@ CONFIG_USE_ENV_SPI_CS=y
 CONFIG_ENV_SPI_CS=0
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=100000000
+CONFIG_USE_DEFAULT_ENV_FILE=y
+CONFIG_DEFAULT_ENV_FILE="board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt"
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 1/3] configs: ast2600: add Qualcomm DC-SCM V1 defconfig
  2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 1/3] configs: ast2600: add Qualcomm DC-SCM V1 defconfig Jae Hyun Yoo
@ 2022-07-05  6:47   ` Joel Stanley
  2022-07-05 14:18     ` Jae Hyun Yoo
  0 siblings, 1 reply; 17+ messages in thread
From: Joel Stanley @ 2022-07-05  6:47 UTC (permalink / raw)
  To: Jae Hyun Yoo
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>
> Add Qualcomm DC-SCM V1 defconfig which is equipped with AST2600.

In your commit message you need to justify why your board needs its
own defconfig.

Preferably we would use a generic openbmc defconfig and you select the
device tree for your board at build time.

>
> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
> ---
>  configs/ast2600_qcom_dc_scm_v1_defconfig | 117 +++++++++++++++++++++++
>  1 file changed, 117 insertions(+)
>  create mode 100644 configs/ast2600_qcom_dc_scm_v1_defconfig
>
> diff --git a/configs/ast2600_qcom_dc_scm_v1_defconfig b/configs/ast2600_qcom_dc_scm_v1_defconfig
> new file mode 100644
> index 000000000000..353882deed26
> --- /dev/null
> +++ b/configs/ast2600_qcom_dc_scm_v1_defconfig
> @@ -0,0 +1,117 @@
> +CONFIG_ARM=y
> +CONFIG_SYS_DCACHE_OFF=y
> +CONFIG_ARCH_ASPEED=y
> +CONFIG_SYS_TEXT_BASE=0x0
> +CONFIG_ASPEED_AST2600=y
> +CONFIG_TARGET_AST2600_QUALCOMM_DC_SCM_V1=y
> +CONFIG_SYS_MALLOC_F_LEN=0x800
> +CONFIG_ENV_SIZE=0x10000
> +CONFIG_ENV_OFFSET=0xE0000
> +CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
> +CONFIG_NR_DRAM_BANKS=1
> +CONFIG_FIT=y
> +CONFIG_USE_BOOTARGS=y
> +CONFIG_BOOTARGS="console=ttyS4,115200n8 root=/dev/ram rw"
> +CONFIG_USE_BOOTCOMMAND=y
> +CONFIG_BOOTCOMMAND="bootm 20100000"
> +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
> +CONFIG_BOARD_LATE_INIT=y
> +CONFIG_DISPLAY_BOARDINFO_LATE=y
> +CONFIG_ARCH_EARLY_INIT_R=y
> +CONFIG_BOARD_EARLY_INIT_F=y
> +CONFIG_HUSH_PARSER=y
> +# CONFIG_AUTO_COMPLETE is not set
> +CONFIG_SYS_PROMPT="ast# "
> +CONFIG_CMD_BOOTZ=y
> +# CONFIG_CMD_BOOTEFI is not set
> +# CONFIG_CMD_ELF is not set
> +# CONFIG_CMD_IMI is not set
> +# CONFIG_CMD_XIMG is not set
> +# CONFIG_CMD_NVEDIT_EFI is not set
> +CONFIG_CMD_CRC32=y
> +CONFIG_CRC32_VERIFY=y
> +# CONFIG_LOOPW is not set
> +CONFIG_CMD_MD5SUM=y
> +CONFIG_MD5SUM_VERIFY=y
> +CONFIG_CMD_MEMINFO=y
> +CONFIG_CMD_MEMORY=y
> +CONFIG_CMD_MEMTEST=y
> +CONFIG_SYS_ALT_MEMTEST=y
> +CONFIG_CMD_MX_CYCLIC=y
> +CONFIG_CMD_SHA1SUM=y
> +CONFIG_SHA1SUM_VERIFY=y
> +CONFIG_CMD_STRINGS=y
> +CONFIG_CMD_CLK=y
> +CONFIG_CMD_GPIO=y
> +CONFIG_CMD_I2C=y
> +CONFIG_CMD_MMC=y
> +CONFIG_CMD_PART=y
> +CONFIG_CMD_PCI=y
> +CONFIG_CMD_SF=y
> +CONFIG_CMD_USB=y
> +CONFIG_CMD_DHCP=y
> +CONFIG_CMD_MII=y
> +CONFIG_CMD_PING=y
> +CONFIG_CMD_NCSI=y
> +CONFIG_CMD_EXT2=y
> +CONFIG_CMD_EXT4=y
> +CONFIG_CMD_EXT4_WRITE=y
> +CONFIG_CMD_FAT=y
> +CONFIG_CMD_FS_GENERIC=y
> +CONFIG_CMD_MTDPARTS=y
> +CONFIG_EFI_PARTITION=y
> +CONFIG_ENV_IS_IN_SPI_FLASH=y
> +CONFIG_USE_ENV_SPI_BUS=y
> +CONFIG_ENV_SPI_BUS=0
> +CONFIG_USE_ENV_SPI_CS=y
> +CONFIG_ENV_SPI_CS=0
> +CONFIG_USE_ENV_SPI_MAX_HZ=y
> +CONFIG_ENV_SPI_MAX_HZ=100000000
> +CONFIG_NET_RANDOM_ETHADDR=y
> +CONFIG_REGMAP=y
> +CONFIG_SYSCON=y
> +CONFIG_CLK=y
> +CONFIG_DM_GPIO=y
> +CONFIG_ASPEED_GPIO=y
> +CONFIG_DM_I2C=y
> +CONFIG_SYS_I2C_ASPEED=y
> +CONFIG_MISC=y
> +CONFIG_ASPEED_AHBC=y
> +CONFIG_ASPEED_H2X=y
> +CONFIG_DM_MMC=y
> +CONFIG_MMC_SDHCI=y
> +CONFIG_MMC_SDHCI_ASPEED=y
> +CONFIG_DM_SPI_FLASH=y
> +CONFIG_SPI_FLASH=y
> +CONFIG_SPI_FLASH_GIGADEVICE=y
> +CONFIG_SPI_FLASH_MACRONIX=y
> +CONFIG_SPI_FLASH_SPANSION=y
> +CONFIG_SPI_FLASH_STMICRO=y
> +CONFIG_SPI_FLASH_WINBOND=y
> +CONFIG_PHY_BROADCOM=y
> +CONFIG_PHY_MICREL=y
> +CONFIG_PHY_MICREL_KSZ90X1=y
> +CONFIG_PHY_REALTEK=y
> +CONFIG_PHY_NCSI=y
> +CONFIG_DM_ETH=y
> +CONFIG_PHY_GIGE=y
> +CONFIG_FTGMAC100=y
> +CONFIG_MDIO=y
> +CONFIG_PCI=y
> +CONFIG_DM_PCI=y
> +CONFIG_PCIE_ASPEED=y
> +CONFIG_PHY=y
> +CONFIG_PINCTRL=y
> +CONFIG_RAM=y
> +CONFIG_DM_SERIAL=y
> +CONFIG_SYS_NS16550=y
> +CONFIG_SPI=y
> +CONFIG_DM_SPI=y
> +CONFIG_SYSRESET=y
> +CONFIG_USB=y
> +CONFIG_DM_USB=y
> +CONFIG_USB_EHCI_HCD=y
> +CONFIG_USB_STORAGE=y
> +CONFIG_WDT=y
> +CONFIG_HEXDUMP=y
> +# CONFIG_GENERATE_SMBIOS_TABLE is not set
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 2/3] board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1 board
  2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 2/3] board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1 board Jae Hyun Yoo
@ 2022-07-05  6:51   ` Joel Stanley
  2022-07-05 14:28     ` Jae Hyun Yoo
  0 siblings, 1 reply; 17+ messages in thread
From: Joel Stanley @ 2022-07-05  6:51 UTC (permalink / raw)
  To: Jae Hyun Yoo
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>
> Add initial version of Qualcomm DC-SCM V1 board to support Qualcomm
> specific options.
>
> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
> ---
>  arch/arm/mach-aspeed/ast2600/Kconfig      |  8 ++++++
>  board/aspeed/ast2600_qualcomm/Kconfig     | 15 +++++++++++
>  board/aspeed/ast2600_qualcomm/Makefile    |  1 +
>  board/aspeed/ast2600_qualcomm/dc-scm-v1.c | 33 +++++++++++++++++++++++
>  4 files changed, 57 insertions(+)
>  create mode 100644 board/aspeed/ast2600_qualcomm/Kconfig
>  create mode 100644 board/aspeed/ast2600_qualcomm/Makefile
>  create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1.c
>
> diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig
> index 46cc1ad1dbd9..252458846a84 100644
> --- a/arch/arm/mach-aspeed/ast2600/Kconfig
> +++ b/arch/arm/mach-aspeed/ast2600/Kconfig
> @@ -46,6 +46,13 @@ config TARGET_AST2600_INTEL
>           AST2600-INTEL is an Intel Eagle Stream CRB with
>           AST2600 as the BMC.
>
> +config TARGET_AST2600_QUALCOMM_DC_SCM_V1
> +       bool "AST2600_QUALCOMM_DC_SCM_V1"
> +       depends on ASPEED_AST2600
> +       help
> +         AST2600-QUALCOMM-DC-SCM-V1 is a Qualcomm DC-SCM V1 board which is
> +         equipped with AST2600.
> +
>  endchoice
>
>  source "board/aspeed/evb_ast2600/Kconfig"
> @@ -53,5 +60,6 @@ source "board/aspeed/fpga_ast2600/Kconfig"
>  source "board/aspeed/slt_ast2600/Kconfig"
>  source "board/aspeed/ast2600_ibm/Kconfig"
>  source "board/aspeed/ast2600_intel/Kconfig"
> +source "board/aspeed/ast2600_qualcomm/Kconfig"
>
>  endif
> diff --git a/board/aspeed/ast2600_qualcomm/Kconfig b/board/aspeed/ast2600_qualcomm/Kconfig
> new file mode 100644
> index 000000000000..3ede24c34dee
> --- /dev/null
> +++ b/board/aspeed/ast2600_qualcomm/Kconfig
> @@ -0,0 +1,15 @@
> +if TARGET_AST2600_QUALCOMM_DC_SCM_V1
> +
> +config SYS_BOARD
> +       default "ast2600_qualcomm"
> +
> +config SYS_VENDOR
> +       default "aspeed"

Out of interest, how does u-boot handle this upstream? Does a board
made by company Y with a chip made by company X considered vendor X,
or vendor Y?

> +
> +config SYS_SOC
> +       default "ast2600"
> +
> +config SYS_CONFIG_NAME
> +       default "evb_ast2600"
> +
> +endif
> diff --git a/board/aspeed/ast2600_qualcomm/Makefile b/board/aspeed/ast2600_qualcomm/Makefile
> new file mode 100644
> index 000000000000..cb2aae7f9298
> --- /dev/null
> +++ b/board/aspeed/ast2600_qualcomm/Makefile
> @@ -0,0 +1 @@
> +obj-y += dc-scm-v1.o
> diff --git a/board/aspeed/ast2600_qualcomm/dc-scm-v1.c b/board/aspeed/ast2600_qualcomm/dc-scm-v1.c
> new file mode 100644
> index 000000000000..40bc85e068ad
> --- /dev/null
> +++ b/board/aspeed/ast2600_qualcomm/dc-scm-v1.c
> @@ -0,0 +1,33 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +#include <common.h>
> +#include <asm/io.h>
> +
> +/* GPIO registers */
> +#define GPIO_BASE              0x1e780000
> +#define GPIO_UVWX_VAL          (GPIO_BASE + 0x88)
> +#define GPIO_UVWX_VAL_V3       BIT(11)
> +#define GPIO_UVWX_DIR          (GPIO_BASE + 0x8c)
> +#define GPIO_UVWX_DIR_V3       BIT(11)
> +
> +static void gpio_init(void)
> +{
> +       /* Set GPIOV3 (BMC_OK) as an output with value low explicitly. */

Is there a reason you don't use the gpio driver?

(Again, you need to explain your decisions in the commit message).

> +       writel(readl(GPIO_UVWX_DIR) | GPIO_UVWX_DIR_V3, GPIO_UVWX_DIR);
> +       writel(readl(GPIO_UVWX_VAL) & ~GPIO_UVWX_VAL_V3, GPIO_UVWX_VAL);
> +}
> +
> +int board_early_init_f(void)
> +{
> +       gpio_init();
> +
> +       return 0;
> +}
> +
> +int board_late_init(void)

Do you need to include this if it's doing nothing?

> +{
> +       return 0;
> +}
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 3/3] board: ast2600_qualcomm: add env default
  2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 3/3] board: ast2600_qualcomm: add env default Jae Hyun Yoo
@ 2022-07-05  6:52   ` Joel Stanley
  2022-07-05 14:32     ` Jae Hyun Yoo
  0 siblings, 1 reply; 17+ messages in thread
From: Joel Stanley @ 2022-07-05  6:52 UTC (permalink / raw)
  To: Jae Hyun Yoo
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>
> Add env default to dc-scm-v1 board configuration.
>
> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
> ---
>  .../aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt  | 4 ++++
>  configs/ast2600_qcom_dc_scm_v1_defconfig                      | 2 ++
>  2 files changed, 6 insertions(+)
>  create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt
>
> diff --git a/board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt b/board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt
> new file mode 100644
> index 000000000000..9aebd38424ef
> --- /dev/null
> +++ b/board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt
> @@ -0,0 +1,4 @@
> +bootargs=console=ttyS4,115200n8 root=/dev/ram rw
> +bootcmd=bootm 20100000
> +bootdelay=2
> +loadaddr=0x83000000

This looks standard for a SPI boot. Do you really require it?

> diff --git a/configs/ast2600_qcom_dc_scm_v1_defconfig b/configs/ast2600_qcom_dc_scm_v1_defconfig
> index 353882deed26..e602163e1caf 100644
> --- a/configs/ast2600_qcom_dc_scm_v1_defconfig
> +++ b/configs/ast2600_qcom_dc_scm_v1_defconfig
> @@ -67,6 +67,8 @@ CONFIG_USE_ENV_SPI_CS=y
>  CONFIG_ENV_SPI_CS=0
>  CONFIG_USE_ENV_SPI_MAX_HZ=y
>  CONFIG_ENV_SPI_MAX_HZ=100000000
> +CONFIG_USE_DEFAULT_ENV_FILE=y
> +CONFIG_DEFAULT_ENV_FILE="board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt"
>  CONFIG_NET_RANDOM_ETHADDR=y
>  CONFIG_REGMAP=y
>  CONFIG_SYSCON=y
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 1/3] configs: ast2600: add Qualcomm DC-SCM V1 defconfig
  2022-07-05  6:47   ` Joel Stanley
@ 2022-07-05 14:18     ` Jae Hyun Yoo
  2022-07-06  1:02       ` Joel Stanley
  0 siblings, 1 reply; 17+ messages in thread
From: Jae Hyun Yoo @ 2022-07-05 14:18 UTC (permalink / raw)
  To: Joel Stanley
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

Hello Joel,

On 7/4/2022 11:47 PM, Joel Stanley wrote:
> On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>>
>> Add Qualcomm DC-SCM V1 defconfig which is equipped with AST2600.
> 
> In your commit message you need to justify why your board needs its
> own defconfig.
> 
> Preferably we would use a generic openbmc defconfig and you select the
> device tree for your board at build time.

I expected 'ast2600_openbmc_defconfig' could be used for my non-spl
u-boot but currently the file has been modified for SPL boot too so both
'ast2600_openbmc_defconfig' and 'ast2600_openbmc_spl_defconfig' have SPL
boot configs. Since the 'ast2600_openbmc_defconfig' is being used for
other machines, I can't change the file directly for non-spl defconfig
so it's the reason why I'm trying to upstream this machine specific
defconfig.

Should I use a patch file in 'openbmc/meta-qualcomm/recipe-bsp' to
modify the 'ast2600_openbmc_defconfig' at build time instead?

Thanks,
Jae

>>
>> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
>> ---
>>   configs/ast2600_qcom_dc_scm_v1_defconfig | 117 +++++++++++++++++++++++
>>   1 file changed, 117 insertions(+)
>>   create mode 100644 configs/ast2600_qcom_dc_scm_v1_defconfig
>>
>> diff --git a/configs/ast2600_qcom_dc_scm_v1_defconfig b/configs/ast2600_qcom_dc_scm_v1_defconfig
>> new file mode 100644
>> index 000000000000..353882deed26
>> --- /dev/null
>> +++ b/configs/ast2600_qcom_dc_scm_v1_defconfig
>> @@ -0,0 +1,117 @@
>> +CONFIG_ARM=y
>> +CONFIG_SYS_DCACHE_OFF=y
>> +CONFIG_ARCH_ASPEED=y
>> +CONFIG_SYS_TEXT_BASE=0x0
>> +CONFIG_ASPEED_AST2600=y
>> +CONFIG_TARGET_AST2600_QUALCOMM_DC_SCM_V1=y
>> +CONFIG_SYS_MALLOC_F_LEN=0x800
>> +CONFIG_ENV_SIZE=0x10000
>> +CONFIG_ENV_OFFSET=0xE0000
>> +CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
>> +CONFIG_NR_DRAM_BANKS=1
>> +CONFIG_FIT=y
>> +CONFIG_USE_BOOTARGS=y
>> +CONFIG_BOOTARGS="console=ttyS4,115200n8 root=/dev/ram rw"
>> +CONFIG_USE_BOOTCOMMAND=y
>> +CONFIG_BOOTCOMMAND="bootm 20100000"
>> +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
>> +CONFIG_BOARD_LATE_INIT=y
>> +CONFIG_DISPLAY_BOARDINFO_LATE=y
>> +CONFIG_ARCH_EARLY_INIT_R=y
>> +CONFIG_BOARD_EARLY_INIT_F=y
>> +CONFIG_HUSH_PARSER=y
>> +# CONFIG_AUTO_COMPLETE is not set
>> +CONFIG_SYS_PROMPT="ast# "
>> +CONFIG_CMD_BOOTZ=y
>> +# CONFIG_CMD_BOOTEFI is not set
>> +# CONFIG_CMD_ELF is not set
>> +# CONFIG_CMD_IMI is not set
>> +# CONFIG_CMD_XIMG is not set
>> +# CONFIG_CMD_NVEDIT_EFI is not set
>> +CONFIG_CMD_CRC32=y
>> +CONFIG_CRC32_VERIFY=y
>> +# CONFIG_LOOPW is not set
>> +CONFIG_CMD_MD5SUM=y
>> +CONFIG_MD5SUM_VERIFY=y
>> +CONFIG_CMD_MEMINFO=y
>> +CONFIG_CMD_MEMORY=y
>> +CONFIG_CMD_MEMTEST=y
>> +CONFIG_SYS_ALT_MEMTEST=y
>> +CONFIG_CMD_MX_CYCLIC=y
>> +CONFIG_CMD_SHA1SUM=y
>> +CONFIG_SHA1SUM_VERIFY=y
>> +CONFIG_CMD_STRINGS=y
>> +CONFIG_CMD_CLK=y
>> +CONFIG_CMD_GPIO=y
>> +CONFIG_CMD_I2C=y
>> +CONFIG_CMD_MMC=y
>> +CONFIG_CMD_PART=y
>> +CONFIG_CMD_PCI=y
>> +CONFIG_CMD_SF=y
>> +CONFIG_CMD_USB=y
>> +CONFIG_CMD_DHCP=y
>> +CONFIG_CMD_MII=y
>> +CONFIG_CMD_PING=y
>> +CONFIG_CMD_NCSI=y
>> +CONFIG_CMD_EXT2=y
>> +CONFIG_CMD_EXT4=y
>> +CONFIG_CMD_EXT4_WRITE=y
>> +CONFIG_CMD_FAT=y
>> +CONFIG_CMD_FS_GENERIC=y
>> +CONFIG_CMD_MTDPARTS=y
>> +CONFIG_EFI_PARTITION=y
>> +CONFIG_ENV_IS_IN_SPI_FLASH=y
>> +CONFIG_USE_ENV_SPI_BUS=y
>> +CONFIG_ENV_SPI_BUS=0
>> +CONFIG_USE_ENV_SPI_CS=y
>> +CONFIG_ENV_SPI_CS=0
>> +CONFIG_USE_ENV_SPI_MAX_HZ=y
>> +CONFIG_ENV_SPI_MAX_HZ=100000000
>> +CONFIG_NET_RANDOM_ETHADDR=y
>> +CONFIG_REGMAP=y
>> +CONFIG_SYSCON=y
>> +CONFIG_CLK=y
>> +CONFIG_DM_GPIO=y
>> +CONFIG_ASPEED_GPIO=y
>> +CONFIG_DM_I2C=y
>> +CONFIG_SYS_I2C_ASPEED=y
>> +CONFIG_MISC=y
>> +CONFIG_ASPEED_AHBC=y
>> +CONFIG_ASPEED_H2X=y
>> +CONFIG_DM_MMC=y
>> +CONFIG_MMC_SDHCI=y
>> +CONFIG_MMC_SDHCI_ASPEED=y
>> +CONFIG_DM_SPI_FLASH=y
>> +CONFIG_SPI_FLASH=y
>> +CONFIG_SPI_FLASH_GIGADEVICE=y
>> +CONFIG_SPI_FLASH_MACRONIX=y
>> +CONFIG_SPI_FLASH_SPANSION=y
>> +CONFIG_SPI_FLASH_STMICRO=y
>> +CONFIG_SPI_FLASH_WINBOND=y
>> +CONFIG_PHY_BROADCOM=y
>> +CONFIG_PHY_MICREL=y
>> +CONFIG_PHY_MICREL_KSZ90X1=y
>> +CONFIG_PHY_REALTEK=y
>> +CONFIG_PHY_NCSI=y
>> +CONFIG_DM_ETH=y
>> +CONFIG_PHY_GIGE=y
>> +CONFIG_FTGMAC100=y
>> +CONFIG_MDIO=y
>> +CONFIG_PCI=y
>> +CONFIG_DM_PCI=y
>> +CONFIG_PCIE_ASPEED=y
>> +CONFIG_PHY=y
>> +CONFIG_PINCTRL=y
>> +CONFIG_RAM=y
>> +CONFIG_DM_SERIAL=y
>> +CONFIG_SYS_NS16550=y
>> +CONFIG_SPI=y
>> +CONFIG_DM_SPI=y
>> +CONFIG_SYSRESET=y
>> +CONFIG_USB=y
>> +CONFIG_DM_USB=y
>> +CONFIG_USB_EHCI_HCD=y
>> +CONFIG_USB_STORAGE=y
>> +CONFIG_WDT=y
>> +CONFIG_HEXDUMP=y
>> +# CONFIG_GENERATE_SMBIOS_TABLE is not set
>> --
>> 2.25.1
>>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 2/3] board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1 board
  2022-07-05  6:51   ` Joel Stanley
@ 2022-07-05 14:28     ` Jae Hyun Yoo
  2022-07-05 15:45       ` Jae Hyun Yoo
  2022-07-06  0:58       ` Joel Stanley
  0 siblings, 2 replies; 17+ messages in thread
From: Jae Hyun Yoo @ 2022-07-05 14:28 UTC (permalink / raw)
  To: Joel Stanley
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

Hello Joel,

On 7/4/2022 11:51 PM, Joel Stanley wrote:
> On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>>
>> Add initial version of Qualcomm DC-SCM V1 board to support Qualcomm
>> specific options.
>>
>> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
>> ---
>>   arch/arm/mach-aspeed/ast2600/Kconfig      |  8 ++++++
>>   board/aspeed/ast2600_qualcomm/Kconfig     | 15 +++++++++++
>>   board/aspeed/ast2600_qualcomm/Makefile    |  1 +
>>   board/aspeed/ast2600_qualcomm/dc-scm-v1.c | 33 +++++++++++++++++++++++
>>   4 files changed, 57 insertions(+)
>>   create mode 100644 board/aspeed/ast2600_qualcomm/Kconfig
>>   create mode 100644 board/aspeed/ast2600_qualcomm/Makefile
>>   create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1.c
>>
>> diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig
>> index 46cc1ad1dbd9..252458846a84 100644
>> --- a/arch/arm/mach-aspeed/ast2600/Kconfig
>> +++ b/arch/arm/mach-aspeed/ast2600/Kconfig
>> @@ -46,6 +46,13 @@ config TARGET_AST2600_INTEL
>>            AST2600-INTEL is an Intel Eagle Stream CRB with
>>            AST2600 as the BMC.
>>
>> +config TARGET_AST2600_QUALCOMM_DC_SCM_V1
>> +       bool "AST2600_QUALCOMM_DC_SCM_V1"
>> +       depends on ASPEED_AST2600
>> +       help
>> +         AST2600-QUALCOMM-DC-SCM-V1 is a Qualcomm DC-SCM V1 board which is
>> +         equipped with AST2600.
>> +
>>   endchoice
>>
>>   source "board/aspeed/evb_ast2600/Kconfig"
>> @@ -53,5 +60,6 @@ source "board/aspeed/fpga_ast2600/Kconfig"
>>   source "board/aspeed/slt_ast2600/Kconfig"
>>   source "board/aspeed/ast2600_ibm/Kconfig"
>>   source "board/aspeed/ast2600_intel/Kconfig"
>> +source "board/aspeed/ast2600_qualcomm/Kconfig"
>>
>>   endif
>> diff --git a/board/aspeed/ast2600_qualcomm/Kconfig b/board/aspeed/ast2600_qualcomm/Kconfig
>> new file mode 100644
>> index 000000000000..3ede24c34dee
>> --- /dev/null
>> +++ b/board/aspeed/ast2600_qualcomm/Kconfig
>> @@ -0,0 +1,15 @@
>> +if TARGET_AST2600_QUALCOMM_DC_SCM_V1
>> +
>> +config SYS_BOARD
>> +       default "ast2600_qualcomm"
>> +
>> +config SYS_VENDOR
>> +       default "aspeed"
> 
> Out of interest, how does u-boot handle this upstream? Does a board
> made by company Y with a chip made by company X considered vendor X,
> or vendor Y?

This code is added into a sub-directory of 'board/aspeed' so the
SYS_VENDOR must be set to 'aspeed'. If I set that to 'qcom', then
builder will look for an Makefile under 'board/qcom' instead and it
makes a failure. The same pattern is already used for ast2600_ibm and
ast2600_intel.

Thanks,
Jae

>> +
>> +config SYS_SOC
>> +       default "ast2600"
>> +
>> +config SYS_CONFIG_NAME
>> +       default "evb_ast2600"
>> +
>> +endif
>> diff --git a/board/aspeed/ast2600_qualcomm/Makefile b/board/aspeed/ast2600_qualcomm/Makefile
>> new file mode 100644
>> index 000000000000..cb2aae7f9298
>> --- /dev/null
>> +++ b/board/aspeed/ast2600_qualcomm/Makefile
>> @@ -0,0 +1 @@
>> +obj-y += dc-scm-v1.o
>> diff --git a/board/aspeed/ast2600_qualcomm/dc-scm-v1.c b/board/aspeed/ast2600_qualcomm/dc-scm-v1.c
>> new file mode 100644
>> index 000000000000..40bc85e068ad
>> --- /dev/null
>> +++ b/board/aspeed/ast2600_qualcomm/dc-scm-v1.c
>> @@ -0,0 +1,33 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
>> + */
>> +
>> +#include <common.h>
>> +#include <asm/io.h>
>> +
>> +/* GPIO registers */
>> +#define GPIO_BASE              0x1e780000
>> +#define GPIO_UVWX_VAL          (GPIO_BASE + 0x88)
>> +#define GPIO_UVWX_VAL_V3       BIT(11)
>> +#define GPIO_UVWX_DIR          (GPIO_BASE + 0x8c)
>> +#define GPIO_UVWX_DIR_V3       BIT(11)
>> +
>> +static void gpio_init(void)
>> +{
>> +       /* Set GPIOV3 (BMC_OK) as an output with value low explicitly. */
> 
> Is there a reason you don't use the gpio driver?
> 
> (Again, you need to explain your decisions in the commit message).
> 
>> +       writel(readl(GPIO_UVWX_DIR) | GPIO_UVWX_DIR_V3, GPIO_UVWX_DIR);
>> +       writel(readl(GPIO_UVWX_VAL) & ~GPIO_UVWX_VAL_V3, GPIO_UVWX_VAL);
>> +}
>> +
>> +int board_early_init_f(void)
>> +{
>> +       gpio_init();
>> +
>> +       return 0;
>> +}
>> +
>> +int board_late_init(void)
> 
> Do you need to include this if it's doing nothing?

The defconfig has 'CONFIG_BOARD_LATE_INIT=y' so this function should be
added as a dummy function otherwise it meets a build failure. This
function will be filled by following commits later.

Thanks,
Jae

>> +{
>> +       return 0;
>> +}
>> --
>> 2.25.1
>>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 3/3] board: ast2600_qualcomm: add env default
  2022-07-05  6:52   ` Joel Stanley
@ 2022-07-05 14:32     ` Jae Hyun Yoo
  0 siblings, 0 replies; 17+ messages in thread
From: Jae Hyun Yoo @ 2022-07-05 14:32 UTC (permalink / raw)
  To: Joel Stanley
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

Hello Joel,

On 7/4/2022 11:52 PM, Joel Stanley wrote:
> On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>>
>> Add env default to dc-scm-v1 board configuration.
>>
>> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
>> ---
>>   .../aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt  | 4 ++++
>>   configs/ast2600_qcom_dc_scm_v1_defconfig                      | 2 ++
>>   2 files changed, 6 insertions(+)
>>   create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt
>>
>> diff --git a/board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt b/board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt
>> new file mode 100644
>> index 000000000000..9aebd38424ef
>> --- /dev/null
>> +++ b/board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt
>> @@ -0,0 +1,4 @@
>> +bootargs=console=ttyS4,115200n8 root=/dev/ram rw
>> +bootcmd=bootm 20100000
>> +bootdelay=2
>> +loadaddr=0x83000000
> 
> This looks standard for a SPI boot. Do you really require it?

Ah, you are right. I realized that these are default for SPI boot and
can be configured by defconfig via CONFIG_BOOTARGS and
CONFIG_BOOTCOMMAND. I'll drop this change in v2.

Thanks,
Jae

>> diff --git a/configs/ast2600_qcom_dc_scm_v1_defconfig b/configs/ast2600_qcom_dc_scm_v1_defconfig
>> index 353882deed26..e602163e1caf 100644
>> --- a/configs/ast2600_qcom_dc_scm_v1_defconfig
>> +++ b/configs/ast2600_qcom_dc_scm_v1_defconfig
>> @@ -67,6 +67,8 @@ CONFIG_USE_ENV_SPI_CS=y
>>   CONFIG_ENV_SPI_CS=0
>>   CONFIG_USE_ENV_SPI_MAX_HZ=y
>>   CONFIG_ENV_SPI_MAX_HZ=100000000
>> +CONFIG_USE_DEFAULT_ENV_FILE=y
>> +CONFIG_DEFAULT_ENV_FILE="board/aspeed/ast2600_qualcomm/dc-scm-v1-u-boot-env-default.txt"
>>   CONFIG_NET_RANDOM_ETHADDR=y
>>   CONFIG_REGMAP=y
>>   CONFIG_SYSCON=y
>> --
>> 2.25.1
>>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 2/3] board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1 board
  2022-07-05 14:28     ` Jae Hyun Yoo
@ 2022-07-05 15:45       ` Jae Hyun Yoo
  2022-07-06  0:58       ` Joel Stanley
  1 sibling, 0 replies; 17+ messages in thread
From: Jae Hyun Yoo @ 2022-07-05 15:45 UTC (permalink / raw)
  To: Joel Stanley
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

On 7/5/2022 7:28 AM, Jae Hyun Yoo wrote:
> Hello Joel,
> 
> On 7/4/2022 11:51 PM, Joel Stanley wrote:
>> On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> 
>> wrote:
>>>
>>> Add initial version of Qualcomm DC-SCM V1 board to support Qualcomm
>>> specific options.
>>>
>>> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
>>> ---
>>>   arch/arm/mach-aspeed/ast2600/Kconfig      |  8 ++++++
>>>   board/aspeed/ast2600_qualcomm/Kconfig     | 15 +++++++++++
>>>   board/aspeed/ast2600_qualcomm/Makefile    |  1 +
>>>   board/aspeed/ast2600_qualcomm/dc-scm-v1.c | 33 +++++++++++++++++++++++
>>>   4 files changed, 57 insertions(+)
>>>   create mode 100644 board/aspeed/ast2600_qualcomm/Kconfig
>>>   create mode 100644 board/aspeed/ast2600_qualcomm/Makefile
>>>   create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1.c
>>>
>>> diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig 
>>> b/arch/arm/mach-aspeed/ast2600/Kconfig
>>> index 46cc1ad1dbd9..252458846a84 100644
>>> --- a/arch/arm/mach-aspeed/ast2600/Kconfig
>>> +++ b/arch/arm/mach-aspeed/ast2600/Kconfig
>>> @@ -46,6 +46,13 @@ config TARGET_AST2600_INTEL
>>>            AST2600-INTEL is an Intel Eagle Stream CRB with
>>>            AST2600 as the BMC.
>>>
>>> +config TARGET_AST2600_QUALCOMM_DC_SCM_V1
>>> +       bool "AST2600_QUALCOMM_DC_SCM_V1"
>>> +       depends on ASPEED_AST2600
>>> +       help
>>> +         AST2600-QUALCOMM-DC-SCM-V1 is a Qualcomm DC-SCM V1 board 
>>> which is
>>> +         equipped with AST2600.
>>> +
>>>   endchoice
>>>
>>>   source "board/aspeed/evb_ast2600/Kconfig"
>>> @@ -53,5 +60,6 @@ source "board/aspeed/fpga_ast2600/Kconfig"
>>>   source "board/aspeed/slt_ast2600/Kconfig"
>>>   source "board/aspeed/ast2600_ibm/Kconfig"
>>>   source "board/aspeed/ast2600_intel/Kconfig"
>>> +source "board/aspeed/ast2600_qualcomm/Kconfig"
>>>
>>>   endif
>>> diff --git a/board/aspeed/ast2600_qualcomm/Kconfig 
>>> b/board/aspeed/ast2600_qualcomm/Kconfig
>>> new file mode 100644
>>> index 000000000000..3ede24c34dee
>>> --- /dev/null
>>> +++ b/board/aspeed/ast2600_qualcomm/Kconfig
>>> @@ -0,0 +1,15 @@
>>> +if TARGET_AST2600_QUALCOMM_DC_SCM_V1
>>> +
>>> +config SYS_BOARD
>>> +       default "ast2600_qualcomm"
>>> +
>>> +config SYS_VENDOR
>>> +       default "aspeed"
>>
>> Out of interest, how does u-boot handle this upstream? Does a board
>> made by company Y with a chip made by company X considered vendor X,
>> or vendor Y?
> 
> This code is added into a sub-directory of 'board/aspeed' so the
> SYS_VENDOR must be set to 'aspeed'. If I set that to 'qcom', then
> builder will look for an Makefile under 'board/qcom' instead and it
> makes a failure. The same pattern is already used for ast2600_ibm and
> ast2600_intel.
> 
> Thanks,
> Jae
> 
>>> +
>>> +config SYS_SOC
>>> +       default "ast2600"
>>> +
>>> +config SYS_CONFIG_NAME
>>> +       default "evb_ast2600"
>>> +
>>> +endif
>>> diff --git a/board/aspeed/ast2600_qualcomm/Makefile 
>>> b/board/aspeed/ast2600_qualcomm/Makefile
>>> new file mode 100644
>>> index 000000000000..cb2aae7f9298
>>> --- /dev/null
>>> +++ b/board/aspeed/ast2600_qualcomm/Makefile
>>> @@ -0,0 +1 @@
>>> +obj-y += dc-scm-v1.o
>>> diff --git a/board/aspeed/ast2600_qualcomm/dc-scm-v1.c 
>>> b/board/aspeed/ast2600_qualcomm/dc-scm-v1.c
>>> new file mode 100644
>>> index 000000000000..40bc85e068ad
>>> --- /dev/null
>>> +++ b/board/aspeed/ast2600_qualcomm/dc-scm-v1.c
>>> @@ -0,0 +1,33 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>>> +/*
>>> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights 
>>> reserved.
>>> + */
>>> +
>>> +#include <common.h>
>>> +#include <asm/io.h>
>>> +
>>> +/* GPIO registers */
>>> +#define GPIO_BASE              0x1e780000
>>> +#define GPIO_UVWX_VAL          (GPIO_BASE + 0x88)
>>> +#define GPIO_UVWX_VAL_V3       BIT(11)
>>> +#define GPIO_UVWX_DIR          (GPIO_BASE + 0x8c)
>>> +#define GPIO_UVWX_DIR_V3       BIT(11)
>>> +
>>> +static void gpio_init(void)
>>> +{
>>> +       /* Set GPIOV3 (BMC_OK) as an output with value low 
>>> explicitly. */
>>
>> Is there a reason you don't use the gpio driver?

Forgot to reply on this comment. This function is called from
board_early_init_f and gpio driver is not ready at that timing so
it uses direct register access.

>> (Again, you need to explain your decisions in the commit message).

Okay. I'll make the commit message descriptive in v2.

Thanks,
Jae

>>> +       writel(readl(GPIO_UVWX_DIR) | GPIO_UVWX_DIR_V3, GPIO_UVWX_DIR);
>>> +       writel(readl(GPIO_UVWX_VAL) & ~GPIO_UVWX_VAL_V3, GPIO_UVWX_VAL);
>>> +}
>>> +
>>> +int board_early_init_f(void)
>>> +{
>>> +       gpio_init();
>>> +
>>> +       return 0;
>>> +}
>>> +
>>> +int board_late_init(void)
>>
>> Do you need to include this if it's doing nothing?
> 
> The defconfig has 'CONFIG_BOARD_LATE_INIT=y' so this function should be
> added as a dummy function otherwise it meets a build failure. This
> function will be filled by following commits later.
> 
> Thanks,
> Jae
> 
>>> +{
>>> +       return 0;
>>> +}
>>> -- 
>>> 2.25.1
>>>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 2/3] board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1 board
  2022-07-05 14:28     ` Jae Hyun Yoo
  2022-07-05 15:45       ` Jae Hyun Yoo
@ 2022-07-06  0:58       ` Joel Stanley
  2022-07-06 14:29         ` Jae Hyun Yoo
  1 sibling, 1 reply; 17+ messages in thread
From: Joel Stanley @ 2022-07-06  0:58 UTC (permalink / raw)
  To: Jae Hyun Yoo
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

On Tue, 5 Jul 2022 at 14:28, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>
> Hello Joel,
>
> On 7/4/2022 11:51 PM, Joel Stanley wrote:
> > On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
> >>
> >> Add initial version of Qualcomm DC-SCM V1 board to support Qualcomm
> >> specific options.
> >>
> >> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
> >> ---
> >>   arch/arm/mach-aspeed/ast2600/Kconfig      |  8 ++++++
> >>   board/aspeed/ast2600_qualcomm/Kconfig     | 15 +++++++++++
> >>   board/aspeed/ast2600_qualcomm/Makefile    |  1 +
> >>   board/aspeed/ast2600_qualcomm/dc-scm-v1.c | 33 +++++++++++++++++++++++
> >>   4 files changed, 57 insertions(+)
> >>   create mode 100644 board/aspeed/ast2600_qualcomm/Kconfig
> >>   create mode 100644 board/aspeed/ast2600_qualcomm/Makefile
> >>   create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1.c
> >>
> >> diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig
> >> index 46cc1ad1dbd9..252458846a84 100644
> >> --- a/arch/arm/mach-aspeed/ast2600/Kconfig
> >> +++ b/arch/arm/mach-aspeed/ast2600/Kconfig
> >> @@ -46,6 +46,13 @@ config TARGET_AST2600_INTEL
> >>            AST2600-INTEL is an Intel Eagle Stream CRB with
> >>            AST2600 as the BMC.
> >>
> >> +config TARGET_AST2600_QUALCOMM_DC_SCM_V1
> >> +       bool "AST2600_QUALCOMM_DC_SCM_V1"
> >> +       depends on ASPEED_AST2600
> >> +       help
> >> +         AST2600-QUALCOMM-DC-SCM-V1 is a Qualcomm DC-SCM V1 board which is
> >> +         equipped with AST2600.
> >> +
> >>   endchoice
> >>
> >>   source "board/aspeed/evb_ast2600/Kconfig"
> >> @@ -53,5 +60,6 @@ source "board/aspeed/fpga_ast2600/Kconfig"
> >>   source "board/aspeed/slt_ast2600/Kconfig"
> >>   source "board/aspeed/ast2600_ibm/Kconfig"
> >>   source "board/aspeed/ast2600_intel/Kconfig"
> >> +source "board/aspeed/ast2600_qualcomm/Kconfig"
> >>
> >>   endif
> >> diff --git a/board/aspeed/ast2600_qualcomm/Kconfig b/board/aspeed/ast2600_qualcomm/Kconfig
> >> new file mode 100644
> >> index 000000000000..3ede24c34dee
> >> --- /dev/null
> >> +++ b/board/aspeed/ast2600_qualcomm/Kconfig
> >> @@ -0,0 +1,15 @@
> >> +if TARGET_AST2600_QUALCOMM_DC_SCM_V1
> >> +
> >> +config SYS_BOARD
> >> +       default "ast2600_qualcomm"
> >> +
> >> +config SYS_VENDOR
> >> +       default "aspeed"
> >
> > Out of interest, how does u-boot handle this upstream? Does a board
> > made by company Y with a chip made by company X considered vendor X,
> > or vendor Y?
>
> This code is added into a sub-directory of 'board/aspeed' so the
> SYS_VENDOR must be set to 'aspeed'. If I set that to 'qcom', then
> builder will look for an Makefile under 'board/qcom' instead and it
> makes a failure. The same pattern is already used for ast2600_ibm and
> ast2600_intel.

Yes, that is true, but it's not what I'm asking. There's momentum to
use the upstream tree for u-boot and I want to ensure any patches that
go in from now on are applicable upstream.

Can you do a survey of the upstream tree and see what the pattern is?

If it's to use the manufacturer

> >> +int board_late_init(void)
> >
> > Do you need to include this if it's doing nothing?
>
> The defconfig has 'CONFIG_BOARD_LATE_INIT=y' so this function should be
> added as a dummy function otherwise it meets a build failure. This
> function will be filled by following commits later.

Doesn't it make sense to not set CONFIG_BOARD_LATE_INIT=y if you don't need it?

You can introduce it when you need it (or add the code that uses it
with this commit).

> >> Is there a reason you don't use the gpio driver?
>
> Forgot to reply on this comment. This function is called from
> board_early_init_f and gpio driver is not ready at that timing so
> it uses direct register access.

Why not call it at a later boot stage, so the gpio driver is ready?

Cheers,

Joel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 1/3] configs: ast2600: add Qualcomm DC-SCM V1 defconfig
  2022-07-05 14:18     ` Jae Hyun Yoo
@ 2022-07-06  1:02       ` Joel Stanley
  2022-07-06 14:52         ` Jae Hyun Yoo
  0 siblings, 1 reply; 17+ messages in thread
From: Joel Stanley @ 2022-07-06  1:02 UTC (permalink / raw)
  To: Jae Hyun Yoo
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

On Tue, 5 Jul 2022 at 14:18, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>
> Hello Joel,
>
> On 7/4/2022 11:47 PM, Joel Stanley wrote:
> > On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
> >>
> >> Add Qualcomm DC-SCM V1 defconfig which is equipped with AST2600.
> >
> > In your commit message you need to justify why your board needs its
> > own defconfig.
> >
> > Preferably we would use a generic openbmc defconfig and you select the
> > device tree for your board at build time.
>
> I expected 'ast2600_openbmc_defconfig' could be used for my non-spl
> u-boot but currently the file has been modified for SPL boot too so both
> 'ast2600_openbmc_defconfig' and 'ast2600_openbmc_spl_defconfig' have SPL
> boot configs. Since the 'ast2600_openbmc_defconfig' is being used for
> other machines, I can't change the file directly for non-spl defconfig
> so it's the reason why I'm trying to upstream this machine specific
> defconfig.

Okay. That's suspicious, if there's a requirement to have non-SPL then
we should revert the change that added SPL to the non-SPL config.

Alternatively, could you use the SPL configuration for your board?
This would simplify testing, as we would only need to verify that the
SPL build works for the 2600 when making u-boot changes.

>
> Should I use a patch file in 'openbmc/meta-qualcomm/recipe-bsp' to
> modify the 'ast2600_openbmc_defconfig' at build time instead?

That's an option, but this would limit testing coverage, as we would
only build that configuration when doing an OpenBMC image build.

>
> Thanks,
> Jae
>
> >>
> >> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
> >> ---
> >>   configs/ast2600_qcom_dc_scm_v1_defconfig | 117 +++++++++++++++++++++++
> >>   1 file changed, 117 insertions(+)
> >>   create mode 100644 configs/ast2600_qcom_dc_scm_v1_defconfig
> >>
> >> diff --git a/configs/ast2600_qcom_dc_scm_v1_defconfig b/configs/ast2600_qcom_dc_scm_v1_defconfig
> >> new file mode 100644
> >> index 000000000000..353882deed26
> >> --- /dev/null
> >> +++ b/configs/ast2600_qcom_dc_scm_v1_defconfig
> >> @@ -0,0 +1,117 @@
> >> +CONFIG_ARM=y
> >> +CONFIG_SYS_DCACHE_OFF=y
> >> +CONFIG_ARCH_ASPEED=y
> >> +CONFIG_SYS_TEXT_BASE=0x0
> >> +CONFIG_ASPEED_AST2600=y
> >> +CONFIG_TARGET_AST2600_QUALCOMM_DC_SCM_V1=y
> >> +CONFIG_SYS_MALLOC_F_LEN=0x800
> >> +CONFIG_ENV_SIZE=0x10000
> >> +CONFIG_ENV_OFFSET=0xE0000
> >> +CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
> >> +CONFIG_NR_DRAM_BANKS=1
> >> +CONFIG_FIT=y
> >> +CONFIG_USE_BOOTARGS=y
> >> +CONFIG_BOOTARGS="console=ttyS4,115200n8 root=/dev/ram rw"
> >> +CONFIG_USE_BOOTCOMMAND=y
> >> +CONFIG_BOOTCOMMAND="bootm 20100000"
> >> +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
> >> +CONFIG_BOARD_LATE_INIT=y
> >> +CONFIG_DISPLAY_BOARDINFO_LATE=y
> >> +CONFIG_ARCH_EARLY_INIT_R=y
> >> +CONFIG_BOARD_EARLY_INIT_F=y
> >> +CONFIG_HUSH_PARSER=y
> >> +# CONFIG_AUTO_COMPLETE is not set
> >> +CONFIG_SYS_PROMPT="ast# "
> >> +CONFIG_CMD_BOOTZ=y
> >> +# CONFIG_CMD_BOOTEFI is not set
> >> +# CONFIG_CMD_ELF is not set
> >> +# CONFIG_CMD_IMI is not set
> >> +# CONFIG_CMD_XIMG is not set
> >> +# CONFIG_CMD_NVEDIT_EFI is not set
> >> +CONFIG_CMD_CRC32=y
> >> +CONFIG_CRC32_VERIFY=y
> >> +# CONFIG_LOOPW is not set
> >> +CONFIG_CMD_MD5SUM=y
> >> +CONFIG_MD5SUM_VERIFY=y
> >> +CONFIG_CMD_MEMINFO=y
> >> +CONFIG_CMD_MEMORY=y
> >> +CONFIG_CMD_MEMTEST=y
> >> +CONFIG_SYS_ALT_MEMTEST=y
> >> +CONFIG_CMD_MX_CYCLIC=y
> >> +CONFIG_CMD_SHA1SUM=y
> >> +CONFIG_SHA1SUM_VERIFY=y
> >> +CONFIG_CMD_STRINGS=y
> >> +CONFIG_CMD_CLK=y
> >> +CONFIG_CMD_GPIO=y
> >> +CONFIG_CMD_I2C=y
> >> +CONFIG_CMD_MMC=y
> >> +CONFIG_CMD_PART=y
> >> +CONFIG_CMD_PCI=y
> >> +CONFIG_CMD_SF=y
> >> +CONFIG_CMD_USB=y
> >> +CONFIG_CMD_DHCP=y
> >> +CONFIG_CMD_MII=y
> >> +CONFIG_CMD_PING=y
> >> +CONFIG_CMD_NCSI=y
> >> +CONFIG_CMD_EXT2=y
> >> +CONFIG_CMD_EXT4=y
> >> +CONFIG_CMD_EXT4_WRITE=y
> >> +CONFIG_CMD_FAT=y
> >> +CONFIG_CMD_FS_GENERIC=y
> >> +CONFIG_CMD_MTDPARTS=y
> >> +CONFIG_EFI_PARTITION=y
> >> +CONFIG_ENV_IS_IN_SPI_FLASH=y
> >> +CONFIG_USE_ENV_SPI_BUS=y
> >> +CONFIG_ENV_SPI_BUS=0
> >> +CONFIG_USE_ENV_SPI_CS=y
> >> +CONFIG_ENV_SPI_CS=0
> >> +CONFIG_USE_ENV_SPI_MAX_HZ=y
> >> +CONFIG_ENV_SPI_MAX_HZ=100000000
> >> +CONFIG_NET_RANDOM_ETHADDR=y
> >> +CONFIG_REGMAP=y
> >> +CONFIG_SYSCON=y
> >> +CONFIG_CLK=y
> >> +CONFIG_DM_GPIO=y
> >> +CONFIG_ASPEED_GPIO=y
> >> +CONFIG_DM_I2C=y
> >> +CONFIG_SYS_I2C_ASPEED=y
> >> +CONFIG_MISC=y
> >> +CONFIG_ASPEED_AHBC=y
> >> +CONFIG_ASPEED_H2X=y
> >> +CONFIG_DM_MMC=y
> >> +CONFIG_MMC_SDHCI=y
> >> +CONFIG_MMC_SDHCI_ASPEED=y
> >> +CONFIG_DM_SPI_FLASH=y
> >> +CONFIG_SPI_FLASH=y
> >> +CONFIG_SPI_FLASH_GIGADEVICE=y
> >> +CONFIG_SPI_FLASH_MACRONIX=y
> >> +CONFIG_SPI_FLASH_SPANSION=y
> >> +CONFIG_SPI_FLASH_STMICRO=y
> >> +CONFIG_SPI_FLASH_WINBOND=y
> >> +CONFIG_PHY_BROADCOM=y
> >> +CONFIG_PHY_MICREL=y
> >> +CONFIG_PHY_MICREL_KSZ90X1=y
> >> +CONFIG_PHY_REALTEK=y
> >> +CONFIG_PHY_NCSI=y
> >> +CONFIG_DM_ETH=y
> >> +CONFIG_PHY_GIGE=y
> >> +CONFIG_FTGMAC100=y
> >> +CONFIG_MDIO=y
> >> +CONFIG_PCI=y
> >> +CONFIG_DM_PCI=y
> >> +CONFIG_PCIE_ASPEED=y
> >> +CONFIG_PHY=y
> >> +CONFIG_PINCTRL=y
> >> +CONFIG_RAM=y
> >> +CONFIG_DM_SERIAL=y
> >> +CONFIG_SYS_NS16550=y
> >> +CONFIG_SPI=y
> >> +CONFIG_DM_SPI=y
> >> +CONFIG_SYSRESET=y
> >> +CONFIG_USB=y
> >> +CONFIG_DM_USB=y
> >> +CONFIG_USB_EHCI_HCD=y
> >> +CONFIG_USB_STORAGE=y
> >> +CONFIG_WDT=y
> >> +CONFIG_HEXDUMP=y
> >> +# CONFIG_GENERATE_SMBIOS_TABLE is not set
> >> --
> >> 2.25.1
> >>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 2/3] board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1 board
  2022-07-06  0:58       ` Joel Stanley
@ 2022-07-06 14:29         ` Jae Hyun Yoo
  2022-07-08  5:30           ` Joel Stanley
  0 siblings, 1 reply; 17+ messages in thread
From: Jae Hyun Yoo @ 2022-07-06 14:29 UTC (permalink / raw)
  To: Joel Stanley
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

On 7/5/2022 5:58 PM, Joel Stanley wrote:
> On Tue, 5 Jul 2022 at 14:28, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>>
>> Hello Joel,
>>
>> On 7/4/2022 11:51 PM, Joel Stanley wrote:
>>> On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>>>>
>>>> Add initial version of Qualcomm DC-SCM V1 board to support Qualcomm
>>>> specific options.
>>>>
>>>> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
>>>> ---
>>>>    arch/arm/mach-aspeed/ast2600/Kconfig      |  8 ++++++
>>>>    board/aspeed/ast2600_qualcomm/Kconfig     | 15 +++++++++++
>>>>    board/aspeed/ast2600_qualcomm/Makefile    |  1 +
>>>>    board/aspeed/ast2600_qualcomm/dc-scm-v1.c | 33 +++++++++++++++++++++++
>>>>    4 files changed, 57 insertions(+)
>>>>    create mode 100644 board/aspeed/ast2600_qualcomm/Kconfig
>>>>    create mode 100644 board/aspeed/ast2600_qualcomm/Makefile
>>>>    create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1.c
>>>>
>>>> diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig
>>>> index 46cc1ad1dbd9..252458846a84 100644
>>>> --- a/arch/arm/mach-aspeed/ast2600/Kconfig
>>>> +++ b/arch/arm/mach-aspeed/ast2600/Kconfig
>>>> @@ -46,6 +46,13 @@ config TARGET_AST2600_INTEL
>>>>             AST2600-INTEL is an Intel Eagle Stream CRB with
>>>>             AST2600 as the BMC.
>>>>
>>>> +config TARGET_AST2600_QUALCOMM_DC_SCM_V1
>>>> +       bool "AST2600_QUALCOMM_DC_SCM_V1"
>>>> +       depends on ASPEED_AST2600
>>>> +       help
>>>> +         AST2600-QUALCOMM-DC-SCM-V1 is a Qualcomm DC-SCM V1 board which is
>>>> +         equipped with AST2600.
>>>> +
>>>>    endchoice
>>>>
>>>>    source "board/aspeed/evb_ast2600/Kconfig"
>>>> @@ -53,5 +60,6 @@ source "board/aspeed/fpga_ast2600/Kconfig"
>>>>    source "board/aspeed/slt_ast2600/Kconfig"
>>>>    source "board/aspeed/ast2600_ibm/Kconfig"
>>>>    source "board/aspeed/ast2600_intel/Kconfig"
>>>> +source "board/aspeed/ast2600_qualcomm/Kconfig"
>>>>
>>>>    endif
>>>> diff --git a/board/aspeed/ast2600_qualcomm/Kconfig b/board/aspeed/ast2600_qualcomm/Kconfig
>>>> new file mode 100644
>>>> index 000000000000..3ede24c34dee
>>>> --- /dev/null
>>>> +++ b/board/aspeed/ast2600_qualcomm/Kconfig
>>>> @@ -0,0 +1,15 @@
>>>> +if TARGET_AST2600_QUALCOMM_DC_SCM_V1
>>>> +
>>>> +config SYS_BOARD
>>>> +       default "ast2600_qualcomm"
>>>> +
>>>> +config SYS_VENDOR
>>>> +       default "aspeed"
>>>
>>> Out of interest, how does u-boot handle this upstream? Does a board
>>> made by company Y with a chip made by company X considered vendor X,
>>> or vendor Y?
>>
>> This code is added into a sub-directory of 'board/aspeed' so the
>> SYS_VENDOR must be set to 'aspeed'. If I set that to 'qcom', then
>> builder will look for an Makefile under 'board/qcom' instead and it
>> makes a failure. The same pattern is already used for ast2600_ibm and
>> ast2600_intel.
> 
> Yes, that is true, but it's not what I'm asking. There's momentum to
> use the upstream tree for u-boot and I want to ensure any patches that
> go in from now on are applicable upstream.
> 
> Can you do a survey of the upstream tree and see what the pattern is?
> 
> If it's to use the manufacturer

Investigated the latest u-boot upstream that it uses manufacturer's sub
folder instead of SoC vendor folder. For an example, RK3399 based Google
'gru' board was added to 'board/google' folder instead of
'board/rockchip'. Means that the current manufacturer board folders in
'board/aspeed' in openbmc u-boot tree also need to be refactored.

I'll submit this change to 'board/qualcomm' in v2.

>>>> +int board_late_init(void)
>>>
>>> Do you need to include this if it's doing nothing?
>>
>> The defconfig has 'CONFIG_BOARD_LATE_INIT=y' so this function should be
>> added as a dummy function otherwise it meets a build failure. This
>> function will be filled by following commits later.
> 
> Doesn't it make sense to not set CONFIG_BOARD_LATE_INIT=y if you don't need it?
> 
> You can introduce it when you need it (or add the code that uses it
> with this commit).

Agree with you. I'll remove the config if it's not needed at this
moment.

>>>> Is there a reason you don't use the gpio driver?
>>
>> Forgot to reply on this comment. This function is called from
>> board_early_init_f and gpio driver is not ready at that timing so
>> it uses direct register access.
> 
> Why not call it at a later boot stage, so the gpio driver is ready?

To set the GPIO output as early as possible but the timing wouldn't much
different so yes, I'll move the gpio init call to board_late_init using
the gpio driver in v2.

Thanks,
Jae

> Cheers,
> 
> Joel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 1/3] configs: ast2600: add Qualcomm DC-SCM V1 defconfig
  2022-07-06  1:02       ` Joel Stanley
@ 2022-07-06 14:52         ` Jae Hyun Yoo
  2022-07-08  5:29           ` Joel Stanley
  0 siblings, 1 reply; 17+ messages in thread
From: Jae Hyun Yoo @ 2022-07-06 14:52 UTC (permalink / raw)
  To: Joel Stanley
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

On 7/5/2022 6:02 PM, Joel Stanley wrote:
> On Tue, 5 Jul 2022 at 14:18, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>>
>> Hello Joel,
>>
>> On 7/4/2022 11:47 PM, Joel Stanley wrote:
>>> On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>>>>
>>>> Add Qualcomm DC-SCM V1 defconfig which is equipped with AST2600.
>>>
>>> In your commit message you need to justify why your board needs its
>>> own defconfig.
>>>
>>> Preferably we would use a generic openbmc defconfig and you select the
>>> device tree for your board at build time.
>>
>> I expected 'ast2600_openbmc_defconfig' could be used for my non-spl
>> u-boot but currently the file has been modified for SPL boot too so both
>> 'ast2600_openbmc_defconfig' and 'ast2600_openbmc_spl_defconfig' have SPL
>> boot configs. Since the 'ast2600_openbmc_defconfig' is being used for
>> other machines, I can't change the file directly for non-spl defconfig
>> so it's the reason why I'm trying to upstream this machine specific
>> defconfig.
> 
> Okay. That's suspicious, if there's a requirement to have non-SPL then
> we should revert the change that added SPL to the non-SPL config.
> 
> Alternatively, could you use the SPL configuration for your board?
> This would simplify testing, as we would only need to verify that the
> SPL build works for the 2600 when making u-boot changes.

Okay, I'll change my u-boot to make it run on the SPL configs.

>>
>> Should I use a patch file in 'openbmc/meta-qualcomm/recipe-bsp' to
>> modify the 'ast2600_openbmc_defconfig' at build time instead?
> 
> That's an option, but this would limit testing coverage, as we would
> only build that configuration when doing an OpenBMC image build.

To apply board specific configuration without regarding to the OpenBMC
image build, we need to add a board specific defconfig so that u-boot
standalone build itself can have the configuration, but looks like
there is no case of any Aspeed BMC board defconfig other than Aspeed
EVBs and OpenBMC reference defconfigs in the u-boot tree. I'll add
minimized configuration overrides in the 'recipes-bsp' layer for this
machine build for now.

Thanks,
Jae

>>
>> Thanks,
>> Jae
>>
>>>>
>>>> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
>>>> ---
>>>>    configs/ast2600_qcom_dc_scm_v1_defconfig | 117 +++++++++++++++++++++++
>>>>    1 file changed, 117 insertions(+)
>>>>    create mode 100644 configs/ast2600_qcom_dc_scm_v1_defconfig
>>>>
>>>> diff --git a/configs/ast2600_qcom_dc_scm_v1_defconfig b/configs/ast2600_qcom_dc_scm_v1_defconfig
>>>> new file mode 100644
>>>> index 000000000000..353882deed26
>>>> --- /dev/null
>>>> +++ b/configs/ast2600_qcom_dc_scm_v1_defconfig
>>>> @@ -0,0 +1,117 @@
>>>> +CONFIG_ARM=y
>>>> +CONFIG_SYS_DCACHE_OFF=y
>>>> +CONFIG_ARCH_ASPEED=y
>>>> +CONFIG_SYS_TEXT_BASE=0x0
>>>> +CONFIG_ASPEED_AST2600=y
>>>> +CONFIG_TARGET_AST2600_QUALCOMM_DC_SCM_V1=y
>>>> +CONFIG_SYS_MALLOC_F_LEN=0x800
>>>> +CONFIG_ENV_SIZE=0x10000
>>>> +CONFIG_ENV_OFFSET=0xE0000
>>>> +CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
>>>> +CONFIG_NR_DRAM_BANKS=1
>>>> +CONFIG_FIT=y
>>>> +CONFIG_USE_BOOTARGS=y
>>>> +CONFIG_BOOTARGS="console=ttyS4,115200n8 root=/dev/ram rw"
>>>> +CONFIG_USE_BOOTCOMMAND=y
>>>> +CONFIG_BOOTCOMMAND="bootm 20100000"
>>>> +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
>>>> +CONFIG_BOARD_LATE_INIT=y
>>>> +CONFIG_DISPLAY_BOARDINFO_LATE=y
>>>> +CONFIG_ARCH_EARLY_INIT_R=y
>>>> +CONFIG_BOARD_EARLY_INIT_F=y
>>>> +CONFIG_HUSH_PARSER=y
>>>> +# CONFIG_AUTO_COMPLETE is not set
>>>> +CONFIG_SYS_PROMPT="ast# "
>>>> +CONFIG_CMD_BOOTZ=y
>>>> +# CONFIG_CMD_BOOTEFI is not set
>>>> +# CONFIG_CMD_ELF is not set
>>>> +# CONFIG_CMD_IMI is not set
>>>> +# CONFIG_CMD_XIMG is not set
>>>> +# CONFIG_CMD_NVEDIT_EFI is not set
>>>> +CONFIG_CMD_CRC32=y
>>>> +CONFIG_CRC32_VERIFY=y
>>>> +# CONFIG_LOOPW is not set
>>>> +CONFIG_CMD_MD5SUM=y
>>>> +CONFIG_MD5SUM_VERIFY=y
>>>> +CONFIG_CMD_MEMINFO=y
>>>> +CONFIG_CMD_MEMORY=y
>>>> +CONFIG_CMD_MEMTEST=y
>>>> +CONFIG_SYS_ALT_MEMTEST=y
>>>> +CONFIG_CMD_MX_CYCLIC=y
>>>> +CONFIG_CMD_SHA1SUM=y
>>>> +CONFIG_SHA1SUM_VERIFY=y
>>>> +CONFIG_CMD_STRINGS=y
>>>> +CONFIG_CMD_CLK=y
>>>> +CONFIG_CMD_GPIO=y
>>>> +CONFIG_CMD_I2C=y
>>>> +CONFIG_CMD_MMC=y
>>>> +CONFIG_CMD_PART=y
>>>> +CONFIG_CMD_PCI=y
>>>> +CONFIG_CMD_SF=y
>>>> +CONFIG_CMD_USB=y
>>>> +CONFIG_CMD_DHCP=y
>>>> +CONFIG_CMD_MII=y
>>>> +CONFIG_CMD_PING=y
>>>> +CONFIG_CMD_NCSI=y
>>>> +CONFIG_CMD_EXT2=y
>>>> +CONFIG_CMD_EXT4=y
>>>> +CONFIG_CMD_EXT4_WRITE=y
>>>> +CONFIG_CMD_FAT=y
>>>> +CONFIG_CMD_FS_GENERIC=y
>>>> +CONFIG_CMD_MTDPARTS=y
>>>> +CONFIG_EFI_PARTITION=y
>>>> +CONFIG_ENV_IS_IN_SPI_FLASH=y
>>>> +CONFIG_USE_ENV_SPI_BUS=y
>>>> +CONFIG_ENV_SPI_BUS=0
>>>> +CONFIG_USE_ENV_SPI_CS=y
>>>> +CONFIG_ENV_SPI_CS=0
>>>> +CONFIG_USE_ENV_SPI_MAX_HZ=y
>>>> +CONFIG_ENV_SPI_MAX_HZ=100000000
>>>> +CONFIG_NET_RANDOM_ETHADDR=y
>>>> +CONFIG_REGMAP=y
>>>> +CONFIG_SYSCON=y
>>>> +CONFIG_CLK=y
>>>> +CONFIG_DM_GPIO=y
>>>> +CONFIG_ASPEED_GPIO=y
>>>> +CONFIG_DM_I2C=y
>>>> +CONFIG_SYS_I2C_ASPEED=y
>>>> +CONFIG_MISC=y
>>>> +CONFIG_ASPEED_AHBC=y
>>>> +CONFIG_ASPEED_H2X=y
>>>> +CONFIG_DM_MMC=y
>>>> +CONFIG_MMC_SDHCI=y
>>>> +CONFIG_MMC_SDHCI_ASPEED=y
>>>> +CONFIG_DM_SPI_FLASH=y
>>>> +CONFIG_SPI_FLASH=y
>>>> +CONFIG_SPI_FLASH_GIGADEVICE=y
>>>> +CONFIG_SPI_FLASH_MACRONIX=y
>>>> +CONFIG_SPI_FLASH_SPANSION=y
>>>> +CONFIG_SPI_FLASH_STMICRO=y
>>>> +CONFIG_SPI_FLASH_WINBOND=y
>>>> +CONFIG_PHY_BROADCOM=y
>>>> +CONFIG_PHY_MICREL=y
>>>> +CONFIG_PHY_MICREL_KSZ90X1=y
>>>> +CONFIG_PHY_REALTEK=y
>>>> +CONFIG_PHY_NCSI=y
>>>> +CONFIG_DM_ETH=y
>>>> +CONFIG_PHY_GIGE=y
>>>> +CONFIG_FTGMAC100=y
>>>> +CONFIG_MDIO=y
>>>> +CONFIG_PCI=y
>>>> +CONFIG_DM_PCI=y
>>>> +CONFIG_PCIE_ASPEED=y
>>>> +CONFIG_PHY=y
>>>> +CONFIG_PINCTRL=y
>>>> +CONFIG_RAM=y
>>>> +CONFIG_DM_SERIAL=y
>>>> +CONFIG_SYS_NS16550=y
>>>> +CONFIG_SPI=y
>>>> +CONFIG_DM_SPI=y
>>>> +CONFIG_SYSRESET=y
>>>> +CONFIG_USB=y
>>>> +CONFIG_DM_USB=y
>>>> +CONFIG_USB_EHCI_HCD=y
>>>> +CONFIG_USB_STORAGE=y
>>>> +CONFIG_WDT=y
>>>> +CONFIG_HEXDUMP=y
>>>> +# CONFIG_GENERATE_SMBIOS_TABLE is not set
>>>> --
>>>> 2.25.1
>>>>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 1/3] configs: ast2600: add Qualcomm DC-SCM V1 defconfig
  2022-07-06 14:52         ` Jae Hyun Yoo
@ 2022-07-08  5:29           ` Joel Stanley
  0 siblings, 0 replies; 17+ messages in thread
From: Joel Stanley @ 2022-07-08  5:29 UTC (permalink / raw)
  To: Jae Hyun Yoo
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

On Wed, 6 Jul 2022 at 14:52, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>
> On 7/5/2022 6:02 PM, Joel Stanley wrote:

> > That's an option, but this would limit testing coverage, as we would
> > only build that configuration when doing an OpenBMC image build.
>
> To apply board specific configuration without regarding to the OpenBMC
> image build, we need to add a board specific defconfig so that u-boot
> standalone build itself can have the configuration, but looks like
> there is no case of any Aspeed BMC board defconfig other than Aspeed
> EVBs and OpenBMC reference defconfigs in the u-boot tree. I'll add
> minimized configuration overrides in the 'recipes-bsp' layer for this
> machine build for now.

That's a good plan. We could consider adding some bitbake machinery
for this, where the machine type can be specified and bitbake will set
that config option for you.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH u-boot v2019.04-aspeed-openbmc 2/3] board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1 board
  2022-07-06 14:29         ` Jae Hyun Yoo
@ 2022-07-08  5:30           ` Joel Stanley
  0 siblings, 0 replies; 17+ messages in thread
From: Joel Stanley @ 2022-07-08  5:30 UTC (permalink / raw)
  To: Jae Hyun Yoo
  Cc: OpenBMC Maillist, Graeme Gregory, Cédric Le Goater, Jamie Iles

On Wed, 6 Jul 2022 at 14:29, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>
> On 7/5/2022 5:58 PM, Joel Stanley wrote:
> > On Tue, 5 Jul 2022 at 14:28, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
> >>
> >> Hello Joel,
> >>
> >> On 7/4/2022 11:51 PM, Joel Stanley wrote:
> >>> On Thu, 30 Jun 2022 at 20:02, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
> >>>>
> >>>> Add initial version of Qualcomm DC-SCM V1 board to support Qualcomm
> >>>> specific options.
> >>>>
> >>>> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
> >>>> ---
> >>>>    arch/arm/mach-aspeed/ast2600/Kconfig      |  8 ++++++
> >>>>    board/aspeed/ast2600_qualcomm/Kconfig     | 15 +++++++++++
> >>>>    board/aspeed/ast2600_qualcomm/Makefile    |  1 +
> >>>>    board/aspeed/ast2600_qualcomm/dc-scm-v1.c | 33 +++++++++++++++++++++++
> >>>>    4 files changed, 57 insertions(+)
> >>>>    create mode 100644 board/aspeed/ast2600_qualcomm/Kconfig
> >>>>    create mode 100644 board/aspeed/ast2600_qualcomm/Makefile
> >>>>    create mode 100644 board/aspeed/ast2600_qualcomm/dc-scm-v1.c
> >>>>
> >>>> diff --git a/arch/arm/mach-aspeed/ast2600/Kconfig b/arch/arm/mach-aspeed/ast2600/Kconfig
> >>>> index 46cc1ad1dbd9..252458846a84 100644
> >>>> --- a/arch/arm/mach-aspeed/ast2600/Kconfig
> >>>> +++ b/arch/arm/mach-aspeed/ast2600/Kconfig
> >>>> @@ -46,6 +46,13 @@ config TARGET_AST2600_INTEL
> >>>>             AST2600-INTEL is an Intel Eagle Stream CRB with
> >>>>             AST2600 as the BMC.
> >>>>
> >>>> +config TARGET_AST2600_QUALCOMM_DC_SCM_V1
> >>>> +       bool "AST2600_QUALCOMM_DC_SCM_V1"
> >>>> +       depends on ASPEED_AST2600
> >>>> +       help
> >>>> +         AST2600-QUALCOMM-DC-SCM-V1 is a Qualcomm DC-SCM V1 board which is
> >>>> +         equipped with AST2600.
> >>>> +
> >>>>    endchoice
> >>>>
> >>>>    source "board/aspeed/evb_ast2600/Kconfig"
> >>>> @@ -53,5 +60,6 @@ source "board/aspeed/fpga_ast2600/Kconfig"
> >>>>    source "board/aspeed/slt_ast2600/Kconfig"
> >>>>    source "board/aspeed/ast2600_ibm/Kconfig"
> >>>>    source "board/aspeed/ast2600_intel/Kconfig"
> >>>> +source "board/aspeed/ast2600_qualcomm/Kconfig"
> >>>>
> >>>>    endif
> >>>> diff --git a/board/aspeed/ast2600_qualcomm/Kconfig b/board/aspeed/ast2600_qualcomm/Kconfig
> >>>> new file mode 100644
> >>>> index 000000000000..3ede24c34dee
> >>>> --- /dev/null
> >>>> +++ b/board/aspeed/ast2600_qualcomm/Kconfig
> >>>> @@ -0,0 +1,15 @@
> >>>> +if TARGET_AST2600_QUALCOMM_DC_SCM_V1
> >>>> +
> >>>> +config SYS_BOARD
> >>>> +       default "ast2600_qualcomm"
> >>>> +
> >>>> +config SYS_VENDOR
> >>>> +       default "aspeed"
> >>>
> >>> Out of interest, how does u-boot handle this upstream? Does a board
> >>> made by company Y with a chip made by company X considered vendor X,
> >>> or vendor Y?
> >>
> >> This code is added into a sub-directory of 'board/aspeed' so the
> >> SYS_VENDOR must be set to 'aspeed'. If I set that to 'qcom', then
> >> builder will look for an Makefile under 'board/qcom' instead and it
> >> makes a failure. The same pattern is already used for ast2600_ibm and
> >> ast2600_intel.
> >
> > Yes, that is true, but it's not what I'm asking. There's momentum to
> > use the upstream tree for u-boot and I want to ensure any patches that
> > go in from now on are applicable upstream.
> >
> > Can you do a survey of the upstream tree and see what the pattern is?
> >
> > If it's to use the manufacturer
>
> Investigated the latest u-boot upstream that it uses manufacturer's sub
> folder instead of SoC vendor folder. For an example, RK3399 based Google
> 'gru' board was added to 'board/google' folder instead of
> 'board/rockchip'. Means that the current manufacturer board folders in
> 'board/aspeed' in openbmc u-boot tree also need to be refactored.
>
> I'll submit this change to 'board/qualcomm' in v2.

Okay. I'm not sure that makes it easier to maintain, but in the
interests of getting support upstream lets go with that.

>
> >>>> +int board_late_init(void)
> >>>
> >>> Do you need to include this if it's doing nothing?
> >>
> >> The defconfig has 'CONFIG_BOARD_LATE_INIT=y' so this function should be
> >> added as a dummy function otherwise it meets a build failure. This
> >> function will be filled by following commits later.
> >
> > Doesn't it make sense to not set CONFIG_BOARD_LATE_INIT=y if you don't need it?
> >
> > You can introduce it when you need it (or add the code that uses it
> > with this commit).
>
> Agree with you. I'll remove the config if it's not needed at this
> moment.
>
> >>>> Is there a reason you don't use the gpio driver?
> >>
> >> Forgot to reply on this comment. This function is called from
> >> board_early_init_f and gpio driver is not ready at that timing so
> >> it uses direct register access.
> >
> > Why not call it at a later boot stage, so the gpio driver is ready?
>
> To set the GPIO output as early as possible but the timing wouldn't much
> different so yes, I'll move the gpio init call to board_late_init using
> the gpio driver in v2.

Great!

>
> Thanks,
> Jae
>
> > Cheers,
> >
> > Joel

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-07-08  5:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 20:02 [PATCH u-boot v2019.04-aspeed-openbmc 0/3] Add Qualcomm DC-SCM V1 defconfig and board support Jae Hyun Yoo
2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 1/3] configs: ast2600: add Qualcomm DC-SCM V1 defconfig Jae Hyun Yoo
2022-07-05  6:47   ` Joel Stanley
2022-07-05 14:18     ` Jae Hyun Yoo
2022-07-06  1:02       ` Joel Stanley
2022-07-06 14:52         ` Jae Hyun Yoo
2022-07-08  5:29           ` Joel Stanley
2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 2/3] board: ast2600_qualcomm: add initial version of Qualcomm DC-SCM V1 board Jae Hyun Yoo
2022-07-05  6:51   ` Joel Stanley
2022-07-05 14:28     ` Jae Hyun Yoo
2022-07-05 15:45       ` Jae Hyun Yoo
2022-07-06  0:58       ` Joel Stanley
2022-07-06 14:29         ` Jae Hyun Yoo
2022-07-08  5:30           ` Joel Stanley
2022-06-30 20:02 ` [PATCH u-boot v2019.04-aspeed-openbmc 3/3] board: ast2600_qualcomm: add env default Jae Hyun Yoo
2022-07-05  6:52   ` Joel Stanley
2022-07-05 14:32     ` Jae Hyun Yoo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.