From 5ccf3f257977e925c34031887d47f4279562d9c9 Mon Sep 17 00:00:00 2001 From: George Hung Date: Thu, 21 May 2020 18:59:15 +0800 Subject: meta-quanta: gbs: add xml for igps and patch/dts for u-boot 1.XML: change the SPI speed to 19Mhz 2.U-boot: dts/pinctrl: add GBS dts/pinctrl support Nuvoton u-boot srcrev bump adb4ac1af3...6870e66f6b: https://gerrit.openbmc-project.xyz/c/openbmc/meta-nuvoton/+/34756 3.modify u-boot environment partiions offset for GBS (From meta-quanta rev: 705d71a8a0ee00f89f06c95601aa1375a440611a) Signed-off-by: George Hung Change-Id: I47960d63b557f6de1c9d84b290094253f4ffba58 Signed-off-by: Andrew Geissler --- meta-quanta/meta-gbs/conf/machine/gbs.conf | 10 +- .../npcm7xx-igps-native/BootBlockAndHeader_GBS.xml | 276 +++++++++++++++++++++ .../images/npcm7xx-igps-native/UbootHeader_GBS.xml | 194 +++++++++++++++ .../images/npcm7xx-igps-native_%.bbappend | 12 + .../u-boot/u-boot-fw-utils-nuvoton/fw_env.config | 24 ++ .../u-boot/u-boot-fw-utils-nuvoton_%.bbappend | 6 + 6 files changed, 518 insertions(+), 4 deletions(-) create mode 100644 meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native/BootBlockAndHeader_GBS.xml create mode 100644 meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native/UbootHeader_GBS.xml create mode 100644 meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native_%.bbappend create mode 100644 meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton/fw_env.config create mode 100644 meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_%.bbappend (limited to 'meta-quanta/meta-gbs') diff --git a/meta-quanta/meta-gbs/conf/machine/gbs.conf b/meta-quanta/meta-gbs/conf/machine/gbs.conf index 32dae060f..d5a6e7859 100644 --- a/meta-quanta/meta-gbs/conf/machine/gbs.conf +++ b/meta-quanta/meta-gbs/conf/machine/gbs.conf @@ -1,17 +1,19 @@ KMACHINE = "nuvoton" KERNEL_DEVICETREE = "${KMACHINE}-npcm730-gbs.dtb" -UBOOT_MACHINE = "PolegSVB_config" +UBOOT_MACHINE = "PolegSVB_spinor_minimal_config" +UBOOT_DEVICETREE = "nuvoton-npcm730-gbs" IGPS_MACHINE = "GBS" -FLASH_SIZE = "32768" - MACHINEOVERRIDES .= ":npcm7xx" require conf/machine/include/npcm7xx.inc require conf/machine/include/obmc-bsp-common.inc -SERIAL_CONSOLES = "115200;ttyS0" +# Overwrite flash offsets +FLASH_ROFS_OFFSET = "7296" +FLASH_RWFS_OFFSET = "61440" +FLASH_SIZE = "65536" OBMC_MACHINE_FEATURES += "\ obmc-phosphor-fan-mgmt \ diff --git a/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native/BootBlockAndHeader_GBS.xml b/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native/BootBlockAndHeader_GBS.xml new file mode 100644 index 000000000..3c1e3be9e --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native/BootBlockAndHeader_GBS.xml @@ -0,0 +1,276 @@ + + + + + + + + 0 + 0xFF + + + + + StartTag + + 0 + 0x8 + + 0x50 0x07 0x55 0xAA 0x54 0x4F 0x4F 0x42 + + + + + DestAddr + + 0x140 + 0x4 + + 0xFFFD5E00 + + + + + CodeSize + + 0x144 + 0x4 + + Poleg_bootblock.bin + + + + + Code + + 0x200 + Poleg_bootblock.bin + + Poleg_bootblock.bin + + + + + + FIU0_DRD_CFG_Set + + 0x108 + 0x4 + + 0x0300100B + + + + + FIU_Clk_Divider + + 0x10C + 0x1 + + 0x0A + + + + + Version + + 0x148 + 0x4 + + 0x0201 + + + + + BOARD_VENDOR + + 0x14C + 0x4 + + 100 + + + + + BOARD_TYPE + + 0x150 + 0x4 + + 0x64 + + + + + + MC_FREQ_IN_MHZ + + 0x11C + 0x2 + + 800 + + + + CPU_FREQ_IN_MHZ + + 0x154 + 0x2 + + 800 + + + + + MC_CONFIG + + 0x156 + 0x1 + + 0x01 + + + + + HOST_IF + + 0x157 + 0x1 + + 0x00 + + + + + SECURITY_LEVEL_T + + 0x15C + 0x1 + + 0xFF + + + + + SECURITY_REVOKE_KEYS + + 0x1D7 + 0x1 + + 0x00 + + + + + SECURITY_LOG + + 0x1D8 + 0x4 + + 0x090000 + + + + SECURITY_LOG_SIZE + + 0x1DC + 0x4 + + 0x3000 + + + + + + HOLE0 + + 0x1E0 + 0x4 + + 0x0A0000 + + + + HOLE0_SIZE + + 0x1E4 + 0x4 + + 0xF70000 + + + + + HOLE1 + + 0x1E8 + 0x4 + + 0 + + + + HOLE1_SIZE + + 0x1EC + 0x4 + + 0 + + + + + + HOLE2 + + 0x1F0 + 0x4 + + 0xFFFFFFFF + + + + HOLE2_SIZE + + 0x1F4 + 0x4 + + 0 + + + + + HOLE3 + + 0x1F8 + 0x4 + + 0 + + + + HOLE3_SIZE + + 0x1FC + 0x4 + + 0 + + + diff --git a/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native/UbootHeader_GBS.xml b/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native/UbootHeader_GBS.xml new file mode 100644 index 000000000..b99e7e618 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native/UbootHeader_GBS.xml @@ -0,0 +1,194 @@ + + + + + + + + 0 + 0xFF + + + + + StartTag + + 0 + 0x8 + + 0x55 0x42 0x4F 0x4F 0x54 0x42 0x4C 0x4B + + + + + DestAddr + + 0x140 + 0x4 + + 0x8000 + + + + + CodeSize + + 0x144 + 0x4 + + u-boot.bin + + + + + Code + + 0x200 + u-boot.bin + + u-boot.bin + + + + + + FIU0_DRD_CFG_Set + + 0x108 + 0x4 + + 0x0300100B + + + + + FIU0_Clk_Divider + + 0x10C + 0x1 + + 0 + + + + + fiu0_cs1_en + + 0x10D + 0x1 + + 0x0 + + + + + fiu0_cs2_en + + 0x10E + 0x1 + + 0x0 + + + + + fiu0_cs3_en + + 0x10F + 0x1 + + 0x0 + + + + + + FIU3_DRD_CFG_Set + + 0x110 + 0x4 + + 0x0 + + + + + + FIU3_DWR_CFG_Set + + 0x114 + 0x4 + + 0x0 + + + + + FIU3_Clk_Divider + + 0x118 + 0x1 + + 0x0 + + + + + + fiu3_cs1_en + + 0x119 + 0x1 + + 0x0 + + + + + fiu3_cs2_en + + 0x11A + 0x1 + + 0x0 + + + + + fiu3_cs3_en + + 0x11B + 0x1 + + 0x0 + + + + + Version + + 0x148 + 0x4 + + 0 + + + + + + FIU0_DWR_CFG_Set + + 0x14C + 0x4 + + 0x03001102 + + + + diff --git a/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native_%.bbappend b/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native_%.bbappend new file mode 100644 index 000000000..06bc31f6a --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-bsp/images/npcm7xx-igps-native_%.bbappend @@ -0,0 +1,12 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append += "file://BootBlockAndHeader_GBS.xml" +SRC_URI_append += "file://UbootHeader_GBS.xml" + +# Prepare the Bootblock XMLs. +do_gbs_prepare_xmls() { + cp ${WORKDIR}/BootBlockAndHeader_GBS.xml ${S}/ImageGeneration/references/ + cp ${WORKDIR}/UbootHeader_GBS.xml ${S}/ImageGeneration/references/ +} + +addtask do_gbs_prepare_xmls after do_patch before do_install diff --git a/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton/fw_env.config b/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton/fw_env.config new file mode 100644 index 000000000..0c384273f --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton/fw_env.config @@ -0,0 +1,24 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. +# Futhermore, if the Flash sector size is ommitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash + +# NOR example +# MTD device name Device offset Env. size Flash sector size Number of sectors +/dev/mtd2 0x0000 0x40000 0x4000 + +# MTD SPI-dataflash example +# MTD device name Device offset Env. size Flash sector size Number of sectors +#/dev/mtd5 0x4200 0x4200 +#/dev/mtd6 0x4200 0x4200 + +# NAND example +#/dev/mtd0 0x4000 0x4000 0x20000 2 + +# Block device example +#/dev/mmcblk0 0xc0000 0x20000 + +# VFAT example +#/boot/uboot.env 0x0000 0x4000 diff --git a/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_%.bbappend b/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_%.bbappend new file mode 100644 index 000000000..8b66271a5 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_%.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:" +SRC_URI_append_gbs = " file://fw_env.config" + +do_install_append_gbs() { + install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config +} -- cgit v1.2.3