Skip to contentSkip to conversation

arm64: synquacer: Add SynQuacer/DeveloperBox support

PATCH Superseded Masami Hiramatsu 4 participants 20 messages May 19, 2021 – May 28, 2021

Subsystems (8)
Network drivers Arm (32-bit) PCI SPI +4 more subsystems

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover arm64: synquacer: Add SynQuacer/DeveloperBox support

Hi,

Here is the 4th version of the series (including some fixes for build errors) to add SynQuacer/DeveloperBox 96board EE suport on U-Boot.

This series includes not only DeveloperBox support but also some fixes for the issues which I faced while porting U-Boot on the DeveloperBox. First 3 patches are fixes, next 1 patch is a code cleanup for generic gpio for arm. The next 7 patches adding DeveloperBox devices and board support. The last 3 patches are related to the UEFI capsule update (including bugfixes).

Previous version is here:

https://lists.denx.de/pipermail/u-boot/2021-May/449305.html

Changes in v4
-------------

I dropped a PCI bugfix because it has been merged. And add I2C driver and enable RTC and EBBR support on the configuration.

[06/14]:
- Add Jaehoon's reviewed-by (Thanks!)
[09/14]:
- Add a new i2c driver.
[10/14]:
- Add i2c0 and RTC node.
[11/14]:
- Add I2C and RTC configuration.
- Enable RTC and Date command.
- Remove I2C0 node before booting linux to hide it same as EDK2 does.
- Add some configurations to make it EBBR compliant.
[14/14]:
- Add some config options for EBBR.

BTW, should I split fixes from this series? (since I didn't expect this took so long...)

DeveloperBox
============

DeveloperBox is a certified 96boards Enterprise Edition board. The board/SoC has: -
* Socionext SC2A11 24-cores ARM Cortex-A53 on tbe Mini-ATX form factor motherboard
* 4 DIMM slots (4GB DDR4-2400 UDIMM shipped by default)
* 1 4xPCIe Gen2 slot and 2 1xPCIe Gen2 slots
(1x slots are connected via PCIe bridge chip)
* 4 USB-3.0 ports
* 2 SATA ports
* 1 GbE network port
* 1 USB-UART serial port (micro USB)
* 64MB SPI NOR Flash
* 8GB eMMC Flash Storage
* 96boards LS connector

The DeveloperBox schematic can be found here: -
https://www.96boards.org/documentation/enterprise/developerbox/hardware-docs/mzsc2am_v03_20180115_a.pdf

And the other documents can be found here: -
https://www.96boards.org/documentation/enterprise/developerbox/

Currently, the U-Boot port supports: -
* USB
* eMMC
* SPI-NOR
* SATA
* GbE

The DeveloperBox boots the TF-A and EDK2 as a main bootloader by default. The DeveloperBox U-Boot port will replace the EDK2 and boot from TF-A as BL33, but no need to combine with it.

Thank you,

---

Jassi Brar (4):
mmc: synquacer: Add SynQuacer F_SDH30 SDHCI driver
spi: synquacer: Add HSSPI SPI controller driver for SynQuacer
net: synquacer: Add netsec driver
i2c: synquacer: SNI Synquacer I2C controller

Masami Hiramatsu (10):
ata: ahci-pci: Use scsi_ops to initialize ops
dm: pci: Skip setting VGA bridge bits if parent device is the host bus
efi: Fix to use null handle to create new handle for efi_fmp_raw
gpio: Introduce CONFIG_GPIO_EXTRA_HEADER to cleanup #ifdefs
pci: synquacer: Add SynQuacer ECAM based PCIe driver
ARM: dts: synquacer: Add device trees for DeveloperBox
board: synquacer: Add DeveloperBox 96boards EE support
dfu_mtd: Ignore non-implemented lock device failure
doc: qemu: arm64: Fix the documentation of capsule update
configs: synquacer: Enable EFI capsule update support

 arch/arm/Kconfig                                   |  108 ++
 arch/arm/dts/Makefile                              |    2 
 arch/arm/dts/synquacer-sc2a11-caches.dtsi          |   73 +
 .../dts/synquacer-sc2a11-developerbox-u-boot.dtsi  |   75 +
 arch/arm/dts/synquacer-sc2a11-developerbox.dts     |   56 +
 arch/arm/dts/synquacer-sc2a11.dtsi                 |  595 ++++++++++
 arch/arm/include/asm/gpio.h                        |    8 
 board/socionext/developerbox/Kconfig               |   36 +
 board/socionext/developerbox/MAINTAINERS           |   14 
 board/socionext/developerbox/Makefile              |    9 
 board/socionext/developerbox/developerbox.c        |  146 +++
 configs/synquacer_developerbox_defconfig           |  131 ++
 doc/board/emulation/qemu_capsule_update.rst        |   11 
 doc/board/index.rst                                |    1 
 doc/board/socionext/developerbox.rst               |   87 ++
 doc/board/socionext/index.rst                      |    9 
 drivers/ata/ahci-pci.c                             |    2 
 drivers/dfu/dfu_mtd.c                              |    2 
 drivers/i2c/Kconfig                                |    7 
 drivers/i2c/Makefile                               |    1 
 drivers/i2c/synquacer_i2c.c                        |  338 ++++++
 drivers/mmc/Kconfig                                |   10 
 drivers/mmc/Makefile                               |    1 
 drivers/mmc/f_sdh30.c                              |   81 +
 drivers/net/Kconfig                                |    8 
 drivers/net/Makefile                               |    1 
 drivers/net/sni_netsec.c                           | 1134 ++++++++++++++++++++
 drivers/pci/Kconfig                                |   12 
 drivers/pci/Makefile                               |    1 
 drivers/pci/pci-uclass.c                           |    3 
 drivers/pci/pcie_ecam_synquacer.c                  |  600 +++++++++++
 drivers/spi/Kconfig                                |    8 
 drivers/spi/Makefile                               |    1 
 drivers/spi/spi-synquacer.c                        |  491 +++++++++
 include/configs/synquacer.h                        |  115 ++
 lib/efi_loader/efi_capsule.c                       |    2 
 36 files changed, 4162 insertions(+), 17 deletions(-)
 create mode 100644 arch/arm/dts/synquacer-sc2a11-caches.dtsi
 create mode 100644 arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi
 create mode 100644 arch/arm/dts/synquacer-sc2a11-developerbox.dts
 create mode 100644 arch/arm/dts/synquacer-sc2a11.dtsi
 create mode 100644 board/socionext/developerbox/Kconfig
 create mode 100644 board/socionext/developerbox/MAINTAINERS
 create mode 100644 board/socionext/developerbox/Makefile
 create mode 100644 board/socionext/developerbox/developerbox.c
 create mode 100644 configs/synquacer_developerbox_defconfig
 create mode 100644 doc/board/socionext/developerbox.rst
 create mode 100644 doc/board/socionext/index.rst
 create mode 100644 drivers/i2c/synquacer_i2c.c
 create mode 100644 drivers/mmc/f_sdh30.c
 create mode 100644 drivers/net/sni_netsec.c
 create mode 100644 drivers/pci/pcie_ecam_synquacer.c
 create mode 100644 drivers/spi/spi-synquacer.c
 create mode 100644 include/configs/synquacer.h

--
Masami Hiramatsu <[email protected]>

#1 lore raw

PATCH v4 1/14 ata: ahci-pci: Use scsi_ops to initialize ops

Without this fix, scsi-scan will cause a synchronous abort when accessing ops->scan.

---
 drivers/ata/ahci-pci.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/ata/ahci-pci.c +2 -0
index 11ec98b56f..b1d231e0f9 100644
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <ahci.h>
+#include <scsi.h>
 #include <dm.h>
 #include <pci.h>
 
@@ -28,6 +29,7 @@ static const struct udevice_id ahci_pci_ids[] = {
 U_BOOT_DRIVER(ahci_pci) = {
 	.name	= "ahci_pci",
 	.id	= UCLASS_AHCI,
+	.ops	= &scsi_ops,
 	.of_match = ahci_pci_ids,
 	.bind	= ahci_pci_bind,
 	.probe = ahci_pci_probe,
#2 lore raw

PATCH v4 2/14 dm: pci: Skip setting VGA bridge bits if parent device is the host bus

In reply to Masami Hiramatsu

Commit bbbcb5262839 ("dm: pci: Enable VGA address forwarding on bridges") sets the VGA bridge bits by checking pplat->class, but if the parent device is the pci host bus device, it can be skipped. Moreover, it shouldn't access the pplat because the parent has different plat data.

Without this fix, "pci enum" command cause a synchronous abort.

pci_auto_config_devices: start
PCI Autoconfig: Bus Memory region: [78000000-7fffffff],

		Physical Memory [78000000-7fffffffx]
PCI Autoconfig: Bus I/O region: [0-ffff],
		Physical Memory [77f00000-77f0ffffx]

pci_auto_config_devices: device pci_6:0.0
PCI Autoconfig: BAR 0, Mem, size=0x1000000, address=0x78000000 bus_lower=0x79000000

PCI Autoconfig: BAR 1, Mem, size=0x8000000, No room in resource, avail start=79000000 / size=8000000, need=8000000
PCI: Failed autoconfig bar 14

PCI Autoconfig: BAR 2, I/O, size=0x4, address=0x1000 bus_lower=0x1004

PCI Autoconfig: BAR 3, Mem, size=0x2000000, address=0x7a000000 bus_lower=0x7c000000

PCI Autoconfig: BAR 4, I/O, size=0x80, address=0x1080 bus_lower=0x1100

PCI Autoconfig: ROM, size=0x80000, address=0x7c000000 bus_lower=0x7c080000

"Synchronous Abort" handler, esr 0x96000006
elr: 00000000e002bd28 lr : 00000000e002bce8 (reloc)
elr: 00000000fff6fd28 lr : 00000000fff6fce8 x0 : 0000000000001041 x1 : 000000000000003e x2 : 00000000ffb0f8c8 x3 : 0000000000000001 x4 : 0000000000000080 x5 : 0000000000000000 x6 : 00000000fff718fc x7 : 000000000000000f x8 : 00000000ffb0f238 x9 : 0000000000000008
x10: 0000000000000000 x11: 0000000000000010
x12: 0000000000000006 x13: 000000000001869f
x14: 00000000ffb0fcd0 x15: 0000000000000020
x16: 00000000fff71cc4 x17: 0000000000000000
x18: 00000000ffb13d90 x19: 00000000ffb14320
x20: 0000000000000000 x21: 00000000ffb14090
x22: 00000000ffb0f8c8 x23: 0000000000000001
x24: 00000000ffb14c10 x25: 0000000000000000
x26: 0000000000000000 x27: 0000000000000000
x28: 00000000ffb14c70 x29: 00000000ffb0f830

Code: 52800843 52800061 52800e00 97ffcf65 (b9400280)

Resetting CPU ...

---
 drivers/pci/pci-uclass.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/pci/pci-uclass.c +3 -0
index 22a033e632..afe4f1974a 100644
@@ -550,6 +550,9 @@ int pci_auto_config_devices(struct udevice *bus)
 		max_bus = ret;
 		sub_bus = max(sub_bus, max_bus);
 
+		if (dev_get_parent(dev) == bus)
+			continue;
+
 		pplat = dev_get_parent_plat(dev);
 		if (pplat->class == (PCI_CLASS_DISPLAY_VGA << 8))
 			set_vga_bridge_bits(dev);
#3 lore raw

PATCH v4 3/14 efi: Fix to use null handle to create new handle for efi_fmp_raw

In reply to Masami Hiramatsu

When running the efidebug capsule disk-update command, the efi_fmp_raw protocol installation is failed with 2 (EFI_INVALID_PARAMETER) as below. This is because the code passes efi_root instaed of handle.

=> efidebug capsule disk-update
EFI: Call: efi_install_multiple_protocol_interfaces( &handle, &efi_guid_firmware_management_protocol, &efi_fmp_fit, NULL)
EFI: Entry efi_install_multiple_protocol_interfaces(00000000fbaf5988)
EFI: Call: efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
EFI: Entry efi_install_protocol_interface(00000000fbaf5988, 86c77a67-0b97-4633-a187-49104d0685c7, 0, 00000000fbfa6ee8)
EFI: new handle 00000000fbb37520
EFI: Exit: efi_install_protocol_interface: 0
EFI: 0 returned by efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
EFI: Exit: efi_install_multiple_protocol_interfaces: 0
EFI: 0 returned by efi_install_multiple_protocol_interfaces( &handle, &efi_guid_firmware_management_protocol, &efi_fmp_fit, NULL)
EFI: Call: efi_install_multiple_protocol_interfaces( &efi_root, &efi_guid_firmware_management_protocol, &efi_fmp_raw, NULL)
EFI: Entry efi_install_multiple_protocol_interfaces(00000000fbfec648)
EFI: Call: efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
EFI: Entry efi_install_protocol_interface(00000000fbfec648, 86c77a67-0b97-4633-a187-49104d0685c7, 0, 00000000fbfa6f18)
EFI: handle 00000000fbaf8520
EFI: Exit: efi_install_protocol_interface: 2
EFI: 2 returned by efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
EFI: Exit: efi_install_multiple_protocol_interfaces: 2
EFI: 2 returned by efi_install_multiple_protocol_interfaces( &efi_root, &efi_guid_firmware_management_protocol, &efi_fmp_raw, NULL) Command failed, result=1

To fix this issue, pass the handle variable as same as the efi_fmp_fit installation.

---
 lib/efi_loader/efi_capsule.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/efi_loader/efi_capsule.c +1 -1
index 6ee883d5b1..f038245c93 100644
@@ -949,7 +949,7 @@ efi_status_t __weak arch_efi_load_capsule_drivers(void)
 	if (IS_ENABLED(CONFIG_EFI_CAPSULE_FIRMWARE_RAW)) {
 		handle = NULL;
 		ret = EFI_CALL(efi_install_multiple_protocol_interfaces(
-				&efi_root,
+				&handle,
 				&efi_guid_firmware_management_protocol,
 				&efi_fmp_raw, NULL));
 	}
#4 lore raw

PATCH v4 4/14 gpio: Introduce CONFIG_GPIO_EXTRA_HEADER to cleanup #ifdefs

In reply to Masami Hiramatsu

Since some SoCs and boards do not hae extra asm/arch/gpio.h, introduce CONFIG_GPIO_EXTRA_HEADER instead of adding !define(CONFIG_ARCH_XXXX) in asm/gpio.h.

---
Changes in v3:
- Change the config name to positive and selected by the opposite CONFIG_ARCH_*. (Build checked by Github CI)

---
 arch/arm/Kconfig            |   94 +++++++++++++++++++++++++++++++++++++++++++
 arch/arm/include/asm/gpio.h |    8 ----
 2 files changed, 95 insertions(+), 7 deletions(-)
arch/arm/Kconfig +94 -0
index 31d687ea01..023824df77 100644
@@ -90,6 +90,9 @@ config HAS_VBAR
 config HAS_THUMB2
 	bool
 
+config GPIO_EXTRA_HEADER
+	bool
+
 # Used for compatibility with asm files copied from the kernel
 config ARM_ASM_UNIFIED
 	bool
@@ -518,25 +521,30 @@ choice
 
 config ARCH_AT91
 	bool "Atmel AT91"
+	select GPIO_EXTRA_HEADER
 	select SPL_BOARD_INIT if SPL && !TARGET_SMARTWEB
 	select SPL_SEPARATE_BSS if SPL
 
 config TARGET_EDB93XX
 	bool "Support edb93xx"
 	select CPU_ARM920T
+	select GPIO_EXTRA_HEADER
 	select PL010_SERIAL
 
 config TARGET_ASPENITE
 	bool "Support aspenite"
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 
 config TARGET_GPLUGD
 	bool "Support gplugd"
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 
 config ARCH_DAVINCI
 	bool "TI DaVinci"
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 	select SPL_DM_SPI if SPL
 	imply CMD_SAVES
 	help
@@ -547,6 +555,7 @@ config ARCH_KIRKWOOD
 	select ARCH_MISC_INIT
 	select BOARD_EARLY_INIT_F
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 
 config ARCH_MVEBU
 	bool "Marvell MVEBU family (Armada XP/375/38x/3700/7K/8K)"
@@ -555,6 +564,7 @@ config ARCH_MVEBU
 	select DM_SERIAL
 	select DM_SPI
 	select DM_SPI_FLASH
+	select GPIO_EXTRA_HEADER
 	select SPL_DM_SPI if SPL
 	select SPL_DM_SPI_FLASH if SPL
 	select OF_CONTROL
@@ -565,11 +575,13 @@ config ARCH_MVEBU
 config ARCH_ORION5X
 	bool "Marvell Orion"
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 
 config TARGET_SPEAR300
 	bool "Support spear300"
 	select BOARD_EARLY_INIT_F
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 	select PL011_SERIAL
 	imply CMD_SAVES
 
@@ -577,6 +589,7 @@ config TARGET_SPEAR310
 	bool "Support spear310"
 	select BOARD_EARLY_INIT_F
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 	select PL011_SERIAL
 	imply CMD_SAVES
 
@@ -584,6 +597,7 @@ config TARGET_SPEAR320
 	bool "Support spear320"
 	select BOARD_EARLY_INIT_F
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 	select PL011_SERIAL
 	imply CMD_SAVES
 
@@ -591,6 +605,7 @@ config TARGET_SPEAR600
 	bool "Support spear600"
 	select BOARD_EARLY_INIT_F
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 	select PL011_SERIAL
 	imply CMD_SAVES
 
@@ -601,6 +616,7 @@ config TARGET_STV0991
 	select DM_SERIAL
 	select DM_SPI
 	select DM_SPI_FLASH
+	select GPIO_EXTRA_HEADER
 	select PL01X_SERIAL
 	select SPI
 	select SPI_FLASH
@@ -610,18 +626,21 @@ config TARGET_X600
 	bool "Support x600"
 	select BOARD_LATE_INIT
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 	select PL011_SERIAL
 	select SUPPORT_SPL
 
 config TARGET_FLEA3
 	bool "Support flea3"
 	select CPU_ARM1136
+	select GPIO_EXTRA_HEADER
 
 config ARCH_BCM283X
 	bool "Broadcom BCM283X family"
 	select DM
 	select DM_GPIO
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	select PL01X_SERIAL
 	select SERIAL_SEARCH_ALL
@@ -650,6 +669,7 @@ config ARCH_BCMSTB
 	bool "Broadcom BCM7XXX family"
 	select CPU_V7A
 	select DM
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	select OF_PRIOR_STAGE
 	imply CMD_DM
@@ -660,6 +680,7 @@ config ARCH_BCMSTB
 config TARGET_BCMCYGNUS
 	bool "Support bcmcygnus"
 	select CPU_V7A
+	select GPIO_EXTRA_HEADER
 	imply BCM_SF2_ETH
 	imply BCM_SF2_ETH_GMAC
 	imply CMD_HASH
@@ -671,6 +692,7 @@ config TARGET_BCMCYGNUS
 config TARGET_BCMNS2
 	bool "Support Broadcom Northstar2"
 	select ARM64
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for Broadcom Northstar 2 SoCs.  NS2 is a quad-core 64-bit
 	  ARMv8 Cortex-A57 processors targeting a broad range of networking
@@ -695,6 +717,7 @@ config ARCH_EXYNOS
 	select DM_SPI
 	select DM_SPI_FLASH
 	select SPI
+	select GPIO_EXTRA_HEADER
 	imply SYS_THUMB_BUILD
 	imply CMD_DM
 	imply FAT_WRITE
@@ -706,6 +729,7 @@ config ARCH_S5PC1XX
 	select DM_GPIO
 	select DM_I2C
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	imply CMD_DM
 
 config ARCH_HIGHBANK
@@ -726,6 +750,7 @@ config ARCH_INTEGRATOR
 	bool "ARM Ltd. Integrator family"
 	select DM
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select PL01X_SERIAL
 	imply CMD_DM
 
@@ -736,6 +761,7 @@ config ARCH_IPQ40XX
 	select DM_GPIO
 	select DM_SERIAL
 	select DM_RESET
+	select GPIO_EXTRA_HEADER
 	select MSM_SMEM
 	select PINCTRL
 	select CLK
@@ -747,6 +773,7 @@ config ARCH_KEYSTONE
 	bool "TI Keystone"
 	select CMD_POWEROFF
 	select CPU_V7A
+	select GPIO_EXTRA_HEADER
 	select SUPPORT_SPL
 	select SYS_ARCH_TIMER
 	select SYS_THUMB_BUILD
@@ -763,6 +790,7 @@ config ARCH_K3
 config ARCH_OMAP2PLUS
 	bool "TI OMAP2+"
 	select CPU_V7A
+	select GPIO_EXTRA_HEADER
 	select SPL_BOARD_INIT if SPL
 	select SPL_STACK_R if SPL
 	select SUPPORT_SPL
@@ -771,6 +799,7 @@ config ARCH_OMAP2PLUS
 
 config ARCH_MESON
 	bool "Amlogic Meson"
+	select GPIO_EXTRA_HEADER
 	imply DISTRO_DEFAULTS
 	imply DM_RNG
 	help
@@ -781,6 +810,7 @@ config ARCH_MESON
 config ARCH_MEDIATEK
 	bool "MediaTek SoCs"
 	select DM
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	select SPL_DM if SPL
 	select SPL_LIBCOMMON_SUPPORT if SPL
@@ -797,6 +827,7 @@ config ARCH_LPC32XX
 	select DM
 	select DM_GPIO
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select SPL_DM if SPL
 	select SUPPORT_SPL
 	imply CMD_DM
@@ -805,12 +836,14 @@ config ARCH_IMX8
 	bool "NXP i.MX8 platform"
 	select ARM64
 	select DM
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	select ENABLE_ARM_SOC_BOOT0_HOOK
 
 config ARCH_IMX8M
 	bool "NXP i.MX8M platform"
 	select ARM64
+	select GPIO_EXTRA_HEADER
 	select SYS_FSL_HAS_SEC if IMX_HAB
 	select SYS_FSL_SEC_COMPAT_4
 	select SYS_FSL_SEC_LE
@@ -823,33 +856,39 @@ config ARCH_IMXRT
 	select CPU_V7M
 	select DM
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select SUPPORT_SPL
 	imply CMD_DM
 
 config ARCH_MX23
 	bool "NXP i.MX23 family"
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 	select PL011_SERIAL
 	select SUPPORT_SPL
 
 config ARCH_MX25
 	bool "NXP MX25"
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 	imply MXC_GPIO
 
 config ARCH_MX28
 	bool "NXP i.MX28 family"
 	select CPU_ARM926EJS
+	select GPIO_EXTRA_HEADER
 	select PL011_SERIAL
 	select SUPPORT_SPL
 
 config ARCH_MX31
 	bool "NXP i.MX31 family"
 	select CPU_ARM1136
+	select GPIO_EXTRA_HEADER
 
 config ARCH_MX7ULP
 	bool "NXP MX7ULP"
 	select CPU_V7A
+	select GPIO_EXTRA_HEADER
 	select SYS_FSL_HAS_SEC if IMX_HAB
 	select SYS_FSL_SEC_COMPAT_4
 	select SYS_FSL_SEC_LE
@@ -861,6 +900,7 @@ config ARCH_MX7
 	bool "Freescale MX7"
 	select ARCH_MISC_INIT
 	select CPU_V7A
+	select GPIO_EXTRA_HEADER
 	select SYS_FSL_HAS_SEC if IMX_HAB
 	select SYS_FSL_SEC_COMPAT_4
 	select SYS_FSL_SEC_LE
@@ -871,6 +911,7 @@ config ARCH_MX7
 config ARCH_MX6
 	bool "Freescale MX6"
 	select CPU_V7A
+	select GPIO_EXTRA_HEADER
 	select SYS_FSL_HAS_SEC
 	select SYS_FSL_SEC_COMPAT_4
 	select SYS_FSL_SEC_LE
@@ -886,18 +927,21 @@ config ARCH_MX5
 	bool "Freescale MX5"
 	select BOARD_EARLY_INIT_F
 	select CPU_V7A
+	select GPIO_EXTRA_HEADER
 	imply MXC_GPIO
 
 config ARCH_NEXELL
 	bool "Nexell S5P4418/S5P6818 SoC"
 	select ENABLE_ARM_SOC_BOOT0_HOOK
 	select DM
+	select GPIO_EXTRA_HEADER
 
 config ARCH_OWL
 	bool "Actions Semi OWL SoCs"
 	select DM
 	select DM_ETH
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select OWL_SERIAL
 	select CLK
 	select CLK_OWL
@@ -920,6 +964,7 @@ config ARCH_RMOBILE
 	bool "Renesas ARM SoCs"
 	select DM
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	imply BOARD_EARLY_INIT_F
 	imply CMD_DM
 	imply FAT_WRITE
@@ -932,6 +977,7 @@ config ARCH_SNAPDRAGON
 	select DM
 	select DM_GPIO
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select MSM_SMEM
 	select OF_CONTROL
 	select OF_SEPARATE
@@ -947,6 +993,7 @@ config ARCH_SOCFPGA
 	select CPU_V7A if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10
 	select DM
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select ENABLE_ARM_SOC_BOOT0_HOOK if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10
 	select OF_CONTROL
 	select SPL_DM_RESET if DM_RESET
@@ -998,6 +1045,7 @@ config ARCH_SUNXI
 	select DM_SCSI if SCSI
 	select DM_SERIAL
 	select DM_USB if DISTRO_DEFAULTS
+	select GPIO_EXTRA_HEADER
 	select OF_BOARD_SETUP
 	select OF_CONTROL
 	select OF_SEPARATE
@@ -1057,6 +1105,7 @@ config ARCH_VERSAL
 	select DM_ETH if NET
 	select DM_MMC if MMC
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	imply BOARD_LATE_INIT
 	imply ENV_VARS_UBOOT_RUNTIME_CONFIG
@@ -1064,6 +1113,7 @@ config ARCH_VERSAL
 config ARCH_VF610
 	bool "Freescale Vybrid"
 	select CPU_V7A
+	select GPIO_EXTRA_HEADER
 	select SYS_FSL_ERRATUM_ESDHC111
 	imply CMD_MTDPARTS
 	imply MTD_RAW_NAND
@@ -1080,6 +1130,7 @@ config ARCH_ZYNQ
 	select DM_SPI
 	select DM_SPI_FLASH
 	select DM_USB if USB
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	select SPI
 	select SPL_BOARD_INIT if SPL
@@ -1106,6 +1157,7 @@ config ARCH_ZYNQMP_R5
 	select DM_ETH if NET
 	select DM_MMC if MMC
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	imply CMD_DM
 	imply DM_USB_GADGET
@@ -1123,6 +1175,7 @@ config ARCH_ZYNQMP
 	select DM_SPI_FLASH if DM_SPI
 	select DM_USB if USB
 	select FIRMWARE
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	select SPL_BOARD_INIT if SPL
 	select SPL_CLK if SPL
@@ -1143,23 +1196,27 @@ config ARCH_ZYNQMP
 
 config ARCH_TEGRA
 	bool "NVIDIA Tegra"
+	select GPIO_EXTRA_HEADER
 	imply DISTRO_DEFAULTS
 	imply FAT_WRITE
 
 config TARGET_VEXPRESS64_AEMV8A
 	bool "Support vexpress_aemv8a"
 	select ARM64
+	select GPIO_EXTRA_HEADER
 	select PL01X_SERIAL
 
 config TARGET_VEXPRESS64_BASE_FVP
 	bool "Support Versatile Express ARMv8a FVP BASE model"
 	select ARM64
+	select GPIO_EXTRA_HEADER
 	select PL01X_SERIAL
 	select SEMIHOSTING
 
 config TARGET_VEXPRESS64_JUNO
 	bool "Support Versatile Express Juno Development Platform"
 	select ARM64
+	select GPIO_EXTRA_HEADER
 	select PL01X_SERIAL
 	select DM
 	select OF_CONTROL
@@ -1188,6 +1245,7 @@ config TARGET_LS2080A_EMU
 	select ARM64
 	select ARMV8_MULTIENTRY
 	select FSL_DDR_SYNC_REFRESH
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for Freescale LS2080A_EMU platform.
 	  The LS2080A Development System (EMULATOR) is a pre-silicon
@@ -1201,6 +1259,7 @@ config TARGET_LS1088AQDS
 	select ARMV8_MULTIENTRY
 	select ARCH_SUPPORT_TFABOOT
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	select SUPPORT_SPL
 	select FSL_DDR_INTERACTIVE if !SD_BOOT
 	help
@@ -1216,6 +1275,7 @@ config TARGET_LS2080AQDS
 	select ARMV8_MULTIENTRY
 	select ARCH_SUPPORT_TFABOOT
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	select SUPPORT_SPL
 	imply SCSI
 	imply SCSI_AHCI
@@ -1237,6 +1297,7 @@ config TARGET_LS2080ARDB
 	select SUPPORT_SPL
 	select FSL_DDR_BIST
 	select FSL_DDR_INTERACTIVE if !SPL
+	select GPIO_EXTRA_HEADER
 	imply SCSI
 	imply SCSI_AHCI
 	help
@@ -1251,6 +1312,7 @@ config TARGET_LS2081ARDB
 	select ARM64
 	select ARMV8_MULTIENTRY
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	select SUPPORT_SPL
 	help
 	  Support for Freescale LS2081ARDB platform.
@@ -1265,6 +1327,7 @@ config TARGET_LX2160ARDB
 	select ARMV8_MULTIENTRY
 	select ARCH_SUPPORT_TFABOOT
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for NXP LX2160ARDB platform.
 	  The lx2160ardb (LX2160A Reference design board (RDB)
@@ -1278,6 +1341,7 @@ config TARGET_LX2160AQDS
 	select ARMV8_MULTIENTRY
 	select ARCH_SUPPORT_TFABOOT
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for NXP LX2160AQDS platform.
 	  The lx2160aqds (LX2160A QorIQ Development System (QDS)
@@ -1292,6 +1356,7 @@ config TARGET_LX2162AQDS
 	select ARMV8_MULTIENTRY
 	select ARCH_SUPPORT_TFABOOT
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for NXP LX2162AQDS platform.
 	  The lx2162aqds support is based on LX2160A Layerscape Architecture processor.
@@ -1302,6 +1367,7 @@ config TARGET_HIKEY
 	select DM
 	select DM_GPIO
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	select PL01X_SERIAL
 	select SPECIFY_CONSOLE_INDEX
@@ -1315,6 +1381,7 @@ config TARGET_HIKEY960
 	select ARM64
 	select DM
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	select PL01X_SERIAL
 	imply CMD_DM
@@ -1328,6 +1395,7 @@ config TARGET_POPLAR
 	select DM
 	select DM_SERIAL
 	select DM_USB
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	select PL01X_SERIAL
 	imply CMD_DM
@@ -1343,6 +1411,7 @@ config TARGET_LS1012AQDS
 	select ARM64
 	select ARCH_SUPPORT_TFABOOT
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for Freescale LS1012AQDS platform.
 	  The LS1012A Development System (QDS) is a high-performance
@@ -1355,6 +1424,7 @@ config TARGET_LS1012ARDB
 	select ARM64
 	select ARCH_SUPPORT_TFABOOT
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	imply SCSI
 	imply SCSI_AHCI
 	help
@@ -1369,6 +1439,7 @@ config TARGET_LS1012A2G5RDB
 	select ARM64
 	select ARCH_SUPPORT_TFABOOT
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	imply SCSI
 	help
 	  Support for Freescale LS1012A2G5RDB platform.
@@ -1382,6 +1453,7 @@ config TARGET_LS1012AFRWY
 	select ARM64
 	select ARCH_SUPPORT_TFABOOT
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	imply SCSI
 	imply SCSI_AHCI
 	help
@@ -1395,6 +1467,7 @@ config TARGET_LS1012AFRDM
 	select ARCH_LS1012A
 	select ARM64
 	select ARCH_SUPPORT_TFABOOT
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for Freescale LS1012AFRDM platform.
 	  The LS1012A Freedom  board (FRDM) is a high-performance
@@ -1408,6 +1481,7 @@ config TARGET_LS1028AQDS
 	select ARMV8_MULTIENTRY
 	select ARCH_SUPPORT_TFABOOT
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for Freescale LS1028AQDS platform
 	  The LS1028A Development System (QDS) is a high-performance
@@ -1421,6 +1495,7 @@ config TARGET_LS1028ARDB
 	select ARMV8_MULTIENTRY
 	select ARCH_SUPPORT_TFABOOT
 	select BOARD_LATE_INIT
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for Freescale LS1028ARDB platform
 	  The LS1028A Development System (RDB) is a high-performance
@@ -1436,6 +1511,7 @@ config TARGET_LS1088ARDB
 	select BOARD_LATE_INIT
 	select SUPPORT_SPL
 	select FSL_DDR_INTERACTIVE if !SD_BOOT
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for NXP LS1088ARDB platform.
 	  The LS1088A Reference design board (RDB) is a high-performance
@@ -1456,6 +1532,7 @@ config TARGET_LS1021AQDS
 	select SYS_FSL_DDR
 	select FSL_DDR_INTERACTIVE
 	select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
+	select GPIO_EXTRA_HEADER
 	select SPI_FLASH_DATAFLASH if FSL_DSPI || FSL_QSPI
 	imply SCSI
 
@@ -1471,6 +1548,7 @@ config TARGET_LS1021ATWR
 	select LS1_DEEP_SLEEP
 	select SUPPORT_SPL
 	select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
+	select GPIO_EXTRA_HEADER
 	imply SCSI
 
 config TARGET_PG_WCOM_SELI8
@@ -1484,6 +1562,7 @@ config TARGET_PG_WCOM_SELI8
 	select CPU_V7_HAS_VIRT
 	select SYS_FSL_DDR
 	select FSL_DDR_INTERACTIVE
+	select GPIO_EXTRA_HEADER
 	select VENDOR_KM
 	imply SCSI
 	help
@@ -1502,6 +1581,7 @@ config TARGET_LS1021ATSN
 	select CPU_V7_HAS_VIRT
 	select LS1_DEEP_SLEEP
 	select SUPPORT_SPL
+	select GPIO_EXTRA_HEADER
 	imply SCSI
 
 config TARGET_LS1021AIOT
@@ -1514,6 +1594,7 @@ config TARGET_LS1021AIOT
 	select CPU_V7_HAS_VIRT
 	select SUPPORT_SPL
 	select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
+	select GPIO_EXTRA_HEADER
 	imply SCSI
 	help
 	  Support for Freescale LS1021AIOT platform.
@@ -1533,6 +1614,7 @@ config TARGET_LS1043AQDS
 	select FSL_DDR_INTERACTIVE if !SPL
 	select FSL_DSPI if !SPL_NO_DSPI
 	select DM_SPI_FLASH if FSL_DSPI
+	select GPIO_EXTRA_HEADER
 	imply SCSI
 	imply SCSI_AHCI
 	help
@@ -1549,6 +1631,7 @@ config TARGET_LS1043ARDB
 	select SUPPORT_SPL
 	select FSL_DSPI if !SPL_NO_DSPI
 	select DM_SPI_FLASH if FSL_DSPI
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for Freescale LS1043ARDB platform.
 
@@ -1565,6 +1648,7 @@ config TARGET_LS1046AQDS
 	select FSL_DDR_BIST if !SPL
 	select FSL_DDR_INTERACTIVE  if !SPL
 	select FSL_DDR_INTERACTIVE if !SPL
+	select GPIO_EXTRA_HEADER
 	imply SCSI
 	help
 	  Support for Freescale LS1046AQDS platform.
@@ -1585,6 +1669,7 @@ config TARGET_LS1046ARDB
 	select SUPPORT_SPL
 	select FSL_DDR_BIST
 	select FSL_DDR_INTERACTIVE if !SPL
+	select GPIO_EXTRA_HEADER
 	imply SCSI
 	help
 	  Support for Freescale LS1046ARDB platform.
@@ -1601,6 +1686,7 @@ config TARGET_LS1046AFRWY
 	select BOARD_EARLY_INIT_F
 	select BOARD_LATE_INIT
 	select DM_SPI_FLASH if DM_SPI
+	select GPIO_EXTRA_HEADER
 	imply SCSI
 	help
 	  Support for Freescale LS1046AFRWY platform.
@@ -1629,6 +1715,7 @@ config TARGET_SL28
 	select DM_SERIAL
 	select DM_SPI
 	select DM_USB
+	select GPIO_EXTRA_HEADER
 	select SPL_DM if SPL
 	select SPL_DM_SPI if SPL
 	select SPL_DM_SPI_FLASH if SPL
@@ -1641,6 +1728,7 @@ config TARGET_SL28
 config TARGET_COLIBRI_PXA270
 	bool "Support colibri_pxa270"
 	select CPU_PXA
+	select GPIO_EXTRA_HEADER
 
 config ARCH_UNIPHIER
 	bool "Socionext UniPhier SoCs"
@@ -1677,6 +1765,7 @@ config ARCH_STM32
 	select CPU_V7M
 	select DM
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	imply CMD_DM
 
 config ARCH_STI
@@ -1702,6 +1791,7 @@ config ARCH_STM32MP
 	select DM_GPIO
 	select DM_RESET
 	select DM_SERIAL
+	select GPIO_EXTRA_HEADER
 	select MISC
 	select OF_CONTROL
 	select OF_LIBFDT
@@ -1764,6 +1854,7 @@ config ARCH_OCTEONTX
 	bool "Support OcteonTX SoCs"
 	select CLK
 	select DM
+	select GPIO_EXTRA_HEADER
 	select ARM64
 	select OF_CONTROL
 	select OF_LIVE
@@ -1774,6 +1865,7 @@ config ARCH_OCTEONTX2
 	bool "Support OcteonTX2 SoCs"
 	select CLK
 	select DM
+	select GPIO_EXTRA_HEADER
 	select ARM64
 	select OF_CONTROL
 	select OF_LIVE
@@ -1783,6 +1875,7 @@ config ARCH_OCTEONTX2
 config TARGET_THUNDERX_88XX
 	bool "Support ThunderX 88xx"
 	select ARM64
+	select GPIO_EXTRA_HEADER
 	select OF_CONTROL
 	select PL01X_SERIAL
 	select SYS_CACHE_SHIFT_7
@@ -1796,6 +1889,7 @@ config ARCH_ASPEED
 config TARGET_DURIAN
 	bool "Support Phytium Durian Platform"
 	select ARM64
+	select GPIO_EXTRA_HEADER
 	help
 	  Support for durian platform.
 	  It has 2GB Sdram, uart and pcie.
arch/arm/include/asm/gpio.h +1 -7
index 7609367884..650783ae73 100644
@@ -1,10 +1,4 @@
-#if !defined(CONFIG_ARCH_UNIPHIER) && !defined(CONFIG_ARCH_STI) && \
-	!defined(CONFIG_ARCH_K3) && !defined(CONFIG_ARCH_BCM68360) && \
-	!defined(CONFIG_ARCH_BCM6858) && !defined(CONFIG_ARCH_BCM63158) && \
-	!defined(CONFIG_ARCH_ROCKCHIP) && !defined(CONFIG_ARCH_ASPEED) && \
-	!defined(CONFIG_ARCH_U8500) && !defined(CONFIG_CORTINA_PLATFORM) && \
-	!defined(CONFIG_TARGET_BCMNS3) && !defined(CONFIG_TARGET_TOTAL_COMPUTE) && \
-	!defined(CONFIG_ARCH_QEMU)
+#ifdef CONFIG_GPIO_EXTRA_HEADER
 #include <asm/arch/gpio.h>
 #endif
 #include <asm-generic/gpio.h>
#5 lore raw

PATCH v4 5/14 pci: synquacer: Add SynQuacer ECAM based PCIe driver

In reply to Masami Hiramatsu

Add ECAM based SynQuacer PCIe RC driver. This driver configures the PCIe RC and filter out a ghost pcie config.

Since the Linux kernel expects "socionext,synquacer-pcie-ecam" device is configured by firmware (EDK2), it doesn't re-configure in the kernel. So as same as EDK2, U-Boot needs to configure it before boot the kernel.

---
 drivers/pci/Kconfig               |   12 +
 drivers/pci/Makefile              |    1 
 drivers/pci/pcie_ecam_synquacer.c |  600 +++++++++++++++++++++++++++++++++++++
 3 files changed, 613 insertions(+)
 create mode 100644 drivers/pci/pcie_ecam_synquacer.c
drivers/pci/Kconfig +12 -0
index d5b6018b3d..2e6393f25b 100644
@@ -81,6 +81,18 @@ config PCIE_ECAM_GENERIC
 	  Say Y here if you want to enable support for generic ECAM-based
 	  PCIe host controllers, such as the one emulated by QEMU.
 
+config PCIE_ECAM_SYNQUACER
+	bool "SynQuacer ECAM-based PCI host controller support"
+	default n
+	depends on DM_PCI
+	select PCI_INIT_R
+	select PCI_REGION_MULTI_ENTRY
+	help
+	  Say Y here if you want to enable support for Socionext
+	  SynQuacer SoC's ECAM-based PCIe host controllers.
+	  Note that this must be configured when boot because Linux driver
+	  expects the PCIe RC has been configured in the bootloader.
+
 config PCI_PHYTIUM
 	bool "Phytium PCIe support"
 	depends on DM_PCI
drivers/pci/Makefile +1 -0
index 1f741786a0..035e3d3088 100644
@@ -16,6 +16,7 @@ endif
 obj-$(CONFIG_PCI) += pci_auto_common.o pci_common.o
 
 obj-$(CONFIG_PCIE_ECAM_GENERIC) += pcie_ecam_generic.o
+obj-$(CONFIG_PCIE_ECAM_SYNQUACER) += pcie_ecam_synquacer.o
 obj-$(CONFIG_FSL_PCI_INIT) += fsl_pci_init.o
 obj-$(CONFIG_PCI_INDIRECT_BRIDGE) += pci_indirect.o
 obj-$(CONFIG_PCI_GT64120) += pci_gt64120.o
drivers/pci/pcie_ecam_synquacer.c new file +600 -0

600 lines not on this page · raw message

#6 lore raw

PATCH v4 6/14 mmc: synquacer: Add SynQuacer F_SDH30 SDHCI driver

In reply to Masami Hiramatsu

From: Jassi Brar <[email protected]>

---
Changes in v4:
- Add Jaehoon's reviewed-by.
Changes in v3:
- Rename config name to MMC_SDHCI_F_SDH30.
- Remove unneeded wait in drivers/mmc/sdhci.c.
- Rename probe function to f_sdh30_sdhci_probe.

---
 drivers/mmc/Kconfig   |   10 ++++++
 drivers/mmc/Makefile  |    1 +
 drivers/mmc/f_sdh30.c |   81 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 92 insertions(+)
 create mode 100644 drivers/mmc/f_sdh30.c
drivers/mmc/Kconfig +10 -0
index 8901456967..1c5aecfa5c 100644
@@ -561,6 +561,16 @@ config MMC_SDHCI_IPROC
 
 	  If unsure, say N.
 
+config MMC_SDHCI_F_SDH30
+	bool "SDHCI support for Fujitsu Semiconductor F_SDH30"
+	depends on BLK && DM_MMC
+	depends on MMC_SDHCI
+	help
+	  This selects the Secure Digital Host Controller Interface (SDHCI)
+	  Needed by some Fujitsu SoC for MMC / SD / SDIO support.
+	  If you have a controller with this interface, say Y or M here.
+	  If unsure, say N.
+
 config MMC_SDHCI_KONA
 	bool "SDHCI support on Broadcom KONA platform"
 	depends on MMC_SDHCI
drivers/mmc/Makefile +1 -0
index 89d6af3db3..f5fd59093e 100644
@@ -76,3 +76,4 @@ obj-$(CONFIG_MMC_UNIPHIER)		+= tmio-common.o uniphier-sd.o
 obj-$(CONFIG_RENESAS_SDHI)		+= tmio-common.o renesas-sdhi.o
 obj-$(CONFIG_MMC_BCM2835)		+= bcm2835_sdhost.o
 obj-$(CONFIG_MMC_MTK)			+= mtk-sd.o
+obj-$(CONFIG_MMC_SDHCI_F_SDH30)		+= f_sdh30.o
drivers/mmc/f_sdh30.c new file +81 -0

81 lines not on this page · raw message

#7 lore raw

PATCH v4 7/14 spi: synquacer: Add HSSPI SPI controller driver for SynQuacer

In reply to Masami Hiramatsu

From: Jassi Brar <[email protected]>

This is a driver for the HSSPI SPI controller on SynQuacer SoC. The HSSPI has command sequence mode (memory mapped) and direct mode (FIFO access). The driver will operate it under the direct mode. And before booting OS, it switch back to the command sequence mode since that is compatible with default EDK2 behavior.

---
 drivers/spi/Kconfig         |    8 +
 drivers/spi/Makefile        |    1 
 drivers/spi/spi-synquacer.c |  491 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 500 insertions(+)
 create mode 100644 drivers/spi/spi-synquacer.c
drivers/spi/Kconfig +8 -0
index 1494c91763..62d9676550 100644
@@ -481,4 +481,12 @@ config MXC_SPI
 	  Enable the MXC SPI controller driver. This driver can be used
 	  on various i.MX SoCs such as i.MX31/35/51/6/7.
 
+config SYNQUACER_SPI
+	bool "Socionext SynQuacer HS-SPI driver"
+	depends on ARCH_SYNQUACER
+	help
+	  Enable the Socionext HS-SPI driver for SynQuacer. This driver can
+	  be used to access the SPI interface and SPI NOR flash on platforms
+	  embedding this HS-SPI IP core.
+
 endif # menu "SPI Support"
drivers/spi/Makefile +1 -0
index cfe4fae1d4..98c95323d1 100644
@@ -31,6 +31,7 @@ obj-$(CONFIG_EXYNOS_SPI) += exynos_spi.o
 obj-$(CONFIG_FSL_DSPI) += fsl_dspi.o
 obj-$(CONFIG_FSL_ESPI) += fsl_espi.o
 obj-$(CONFIG_FSL_QSPI) += fsl_qspi.o
+obj-$(CONFIG_SYNQUACER_SPI) += spi-synquacer.o
 obj-$(CONFIG_ICH_SPI) +=  ich.o
 obj-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o
 obj-$(CONFIG_MESON_SPIFC) += meson_spifc.o
drivers/spi/spi-synquacer.c new file +491 -0

491 lines not on this page · raw message

#8 lore raw

PATCH v4 8/14 net: synquacer: Add netsec driver

In reply to Masami Hiramatsu

From: Jassi Brar <[email protected]>

Add SynQuacer's NETSEC GbE controller driver. Since this driver will load the firmware from SPI NOR flash, this depends on CONFIG_SYNQUACER_SPI=y.

---
 drivers/net/Kconfig      |    8 
 drivers/net/Makefile     |    1 
 drivers/net/sni_netsec.c | 1134 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 1143 insertions(+)
 create mode 100644 drivers/net/sni_netsec.c
drivers/net/Kconfig +8 -0
index 382639044b..9fc28b149d 100644
@@ -673,6 +673,14 @@ config SNI_AVE
 	  This driver implements support for the Socionext AVE Ethernet
 	  controller, as found on the Socionext UniPhier family.
 
+config SNI_NETSEC
+	bool "Socionext NETSEC Ethernet support"
+	depends on DM_ETH && SYNQUACER_SPI
+	select PHYLIB
+	help
+	  This driver implements support for the Socionext SynQuacer NETSEC
+	  ethernet controller, as found on the Socionext SynQuacer family.
+
 source "drivers/net/mscc_eswitch/Kconfig"
 
 config ETHER_ON_FEC1
drivers/net/Makefile +1 -0
index 2ce89f7e3c..c23e828edc 100644
@@ -90,6 +90,7 @@ obj-$(CONFIG_DWC_ETH_QOS) += dwc_eth_qos.o
 obj-$(CONFIG_FSL_PFE) += pfe_eth/
 obj-y += qe/
 obj-$(CONFIG_SNI_AVE) += sni_ave.o
+obj-$(CONFIG_SNI_NETSEC) += sni_netsec.o
 obj-y += ti/
 obj-$(CONFIG_MEDIATEK_ETH) += mtk_eth.o
 obj-y += mscc_eswitch/
drivers/net/sni_netsec.c new file +1134 -0

1,134 lines not on this page · raw message

#9 lore raw

PATCH v4 9/14 i2c: synquacer: SNI Synquacer I2C controller

In reply to Masami Hiramatsu

From: Jassi Brar <[email protected]>

Add driver for class of I2C controllers found on
Socionext Synquacer platform.

---
 drivers/i2c/Kconfig         |    7 +
 drivers/i2c/Makefile        |    1 
 drivers/i2c/synquacer_i2c.c |  338 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 346 insertions(+)
 create mode 100644 drivers/i2c/synquacer_i2c.c
drivers/i2c/Kconfig +7 -0
index 57a4efb88e..ce0d796d09 100644
@@ -455,6 +455,13 @@ config SYS_I2C_STM32F7
 	   _ Optional clock stretching
 	   _ Software reset
 
+config SYS_I2C_SYNQUACER
+	bool "Socionext SynQuacer I2C controller"
+	depends on ARCH_SYNQUACER && DM_I2C
+	help
+	  Support for Socionext Synquacer I2C controller. This I2C controller
+	  will be used for RTC and LS-connector on DeveloperBox.
+
 config SYS_I2C_TEGRA
 	bool "NVIDIA Tegra internal I2C controller"
 	depends on ARCH_TEGRA
drivers/i2c/Makefile +1 -0
index 8c9f1fcd8b..06a1150f03 100644
@@ -43,6 +43,7 @@ obj-$(CONFIG_SYS_I2C_SANDBOX) += sandbox_i2c.o i2c-emul-uclass.o
 obj-$(CONFIG_SYS_I2C_SH) += sh_i2c.o
 obj-$(CONFIG_SYS_I2C_SOFT) += soft_i2c.o
 obj-$(CONFIG_SYS_I2C_STM32F7) += stm32f7_i2c.o
+obj-$(CONFIG_SYS_I2C_SYNQUACER) += synquacer_i2c.o
 obj-$(CONFIG_SYS_I2C_TEGRA) += tegra_i2c.o
 obj-$(CONFIG_SYS_I2C_UNIPHIER) += i2c-uniphier.o
 obj-$(CONFIG_SYS_I2C_UNIPHIER_F) += i2c-uniphier-f.o
drivers/i2c/synquacer_i2c.c new file +338 -0

338 lines not on this page · raw message

#10 lore raw

PATCH v4 10/14 ARM: dts: synquacer: Add device trees for DeveloperBox

In reply to Masami Hiramatsu

Add device trees for 96boards EE DeveloperBox and basement SynQuacer SoC dtsi. These files are imported from EDK2

commit 83d38b0b4c0f240d4488c600bbe87cea391f3922

as-is (except for the changes #include path and some macros).

And add U-Boot specific changes in synquacer-sc2a11-developerbox-u-boot.dtsi

---
Changes in v4:
- Add i2c0 and RTC node.
Changes in v3:
- Use generic nor flash instead of specific mx25u51245g. (chip parameters will be searched by the register value)
Changes in v2:
- Add reference commit id of original EDK2 to the comment
- Just copy the EDK2 dts files as-is (change #include path)
- Split out the u-boot specific changes in -u-boot.dtsi.
- Removed unneeded spi-nor flash partition information.

---
 arch/arm/dts/Makefile                              |    2 
 arch/arm/dts/synquacer-sc2a11-caches.dtsi          |   73 ++
 .../dts/synquacer-sc2a11-developerbox-u-boot.dtsi  |   75 +++
 arch/arm/dts/synquacer-sc2a11-developerbox.dts     |   56 ++
 arch/arm/dts/synquacer-sc2a11.dtsi                 |  595 ++++++++++++++++++++
 5 files changed, 801 insertions(+)
 create mode 100644 arch/arm/dts/synquacer-sc2a11-caches.dtsi
 create mode 100644 arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi
 create mode 100644 arch/arm/dts/synquacer-sc2a11-developerbox.dts
 create mode 100644 arch/arm/dts/synquacer-sc2a11.dtsi
arch/arm/dts/Makefile +2 -0
index 9c601a5c98..2195729d7c 100644
@@ -1099,6 +1099,8 @@ dtb-$(CONFIG_TARGET_PRESIDIO_ASIC) += ca-presidio-engboard.dtb
 
 dtb-$(CONFIG_TARGET_IMX8MM_CL_IOT_GATE) += imx8mm-cl-iot-gate.dtb
 
+dtb-$(CONFIG_ARCH_SYNQUACER) += synquacer-sc2a11-developerbox.dtb
+
 targets += $(dtb-y)
 
 # Add any required device tree compiler flags here
arch/arm/dts/synquacer-sc2a11-caches.dtsi new file +73 -0

73 lines not on this page · raw message

arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi new file +75 -0

75 lines not on this page · raw message

arch/arm/dts/synquacer-sc2a11-developerbox.dts new file +56 -0

56 lines not on this page · raw message

arch/arm/dts/synquacer-sc2a11.dtsi new file +595 -0

595 lines not on this page · raw message

#11 lore raw

PATCH v4 11/14 board: synquacer: Add DeveloperBox 96boards EE support

In reply to Masami Hiramatsu

Add the DeveloperBox 96boards EE support. This board is also known as Socionext SynQuacer E-Series. It contians one "SC2A11" SoC, which has 24-cores of arm Cortex-A53, and 4 DDR3 slots, 3 PCIe slots (1 4x port and 2 1x ports which are expanded via PCIe bridge chip), 2 USB 3.0 ports and 2 USB 2.0 ports, 2 SATA ports and 1 GbE, 64MB NOR flash and 8GB eMMC on standard MicroATX Form Factor.

For more information, see this page;
https://www.96boards.org/product/developerbox/

---
Changes in v4:
- Add I2C and RTC configuration.
- Enable RTC and Date command.
- Remove I2C0 node before booting linux to hide it same as EDK2 does.
- Add some configurations to make it EBBR compliant.
Changes in v3:
- Enable CONFIG_MMC_SDHCI_F_SDH30.
- Enable CONFIG_CMD_GENERIC (fstype command) for distro boot.
- Remove unneeded CONFIG_ONLY_GENERIC_GPIO.
Changes in v2:
- Do not include arch/gpio.h and remove arch-sc2a11/gpio.h.
- Remove non-UEFI boot commands.
- Use Distro boot.
- Remove NOR-connected SPI node by path instead of alias.
- Rename configs/SynQuacer_defconfig to configs/synquacer_developerbox_defconfig.
- Rename include/configs/SynQuacer.h to include/configs/synquacer.h.
- Move README under doc/board/socionext/ and make it .rst text.

---
 arch/arm/Kconfig                            |   14 +++
 board/socionext/developerbox/Kconfig        |   36 +++++++
 board/socionext/developerbox/MAINTAINERS    |   14 +++
 board/socionext/developerbox/Makefile       |    9 ++
 board/socionext/developerbox/developerbox.c |  146 +++++++++++++++++++++++++++
 configs/synquacer_developerbox_defconfig    |  114 +++++++++++++++++++++
 doc/board/index.rst                         |    1 
 doc/board/socionext/developerbox.rst        |   87 ++++++++++++++++
 doc/board/socionext/index.rst               |    9 ++
 include/configs/synquacer.h                 |  109 ++++++++++++++++++++
 10 files changed, 539 insertions(+)
 create mode 100644 board/socionext/developerbox/Kconfig
 create mode 100644 board/socionext/developerbox/MAINTAINERS
 create mode 100644 board/socionext/developerbox/Makefile
 create mode 100644 board/socionext/developerbox/developerbox.c
 create mode 100644 configs/synquacer_developerbox_defconfig
 create mode 100644 doc/board/socionext/developerbox.rst
 create mode 100644 doc/board/socionext/index.rst
 create mode 100644 include/configs/synquacer.h
arch/arm/Kconfig +14 -0
index 023824df77..7ff24535cd 100644
@@ -1760,6 +1760,19 @@ config ARCH_UNIPHIER
 	  Support for UniPhier SoC family developed by Socionext Inc.
 	  (formerly, System LSI Business Division of Panasonic Corporation)
 
+config ARCH_SYNQUACER
+	bool "Socionext SynQuacer SoCs"
+	select ARM64
+	select DM
+	select GIC_V3
+	select PSCI_RESET
+	select SYSRESET
+	select SYSRESET_PSCI
+	select OF_CONTROL
+	help
+	  Support for SynQuacer SoC family developed by Socionext Inc.
+	  This SoC is used on 96boards EE DeveloperBox.
+
 config ARCH_STM32
 	bool "Support STMicroelectronics STM32 MCU with cortex M"
 	select CPU_V7M
@@ -2102,6 +2115,7 @@ source "board/hisilicon/poplar/Kconfig"
 source "board/isee/igep003x/Kconfig"
 source "board/kontron/sl28/Kconfig"
 source "board/myir/mys_6ulx/Kconfig"
+source "board/socionext/developerbox/Kconfig"
 source "board/spear/spear300/Kconfig"
 source "board/spear/spear310/Kconfig"
 source "board/spear/spear320/Kconfig"
board/socionext/developerbox/Kconfig new file +36 -0
new file mode 100644
index 0000000000..706b8dc0f1
@@ -0,0 +1,36 @@
+if ARCH_SYNQUACER
+
+choice
+	prompt "SC2A11 Cortex-A53 MPCore 24cores"
+	optional
+
+config TARGET_DEVELOPERBOX
+	bool "Socionext DeveloperBox"
+	select PCI
+	select DM_PCI
+	select PCIE_ECAM_SYNQUACER
+	select SYS_DISABLE_DCACHE_OPS
+	select OF_BOARD_SETUP
+	help
+	 Choose this option if you build the U-Boot for the DeveloperBox
+	 96boards Enterprise Edition.
+	 This board will booted from SCP firmware and it enables SMMU, thus
+	 the dcache is updated automatically when DMA operation is executed.
+endchoice
+
+config SYS_SOC
+	default "sc2a11"
+
+if TARGET_DEVELOPERBOX
+
+config SYS_BOARD
+	default "developerbox"
+
+config SYS_VENDOR
+	default "socionext"
+
+config SYS_CONFIG_NAME
+	default "synquacer"
+
+endif
+endif
board/socionext/developerbox/MAINTAINERS new file +14 -0
new file mode 100644
index 0000000000..aa672b6e05
@@ -0,0 +1,14 @@
+DEVELOPER BOX
+M:	Masami Hiramatsu <[email protected]>
+M:	Jassi Brar <[email protected]>
+S:	Maintained
+F:	arch/arm/dts/synquacer-*
+F:	board/socionext/developerbox/*
+F:	configs/synquacer_developerbox_defconfig
+F:	drivers/i2c/synquacer_i2c.c
+F:	drivers/mmc/f_sdh30.c
+F:	drivers/net/sni_netsec.c
+F:	drivers/pci/pcie_ecam_synquacer.c
+F:	drivers/spi/spi-synquacer.c
+F:	include/configs/synquacer.h
+F:	doc/board/socionext/developerbox.rst
board/socionext/developerbox/Makefile new file +9 -0
new file mode 100644
index 0000000000..4a46de995a
@@ -0,0 +1,9 @@
+#
+# Author: Masami Hiramatsu <[email protected]>
+#
+# Copyright (C) 2021 Linaro Ltd.
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	:= developerbox.o
board/socionext/developerbox/developerbox.c new file +146 -0

146 lines not on this page · raw message

configs/synquacer_developerbox_defconfig new file +114 -0

114 lines not on this page · raw message

doc/board/index.rst +1 -0
index a70d2de19d..242372b321 100644
@@ -21,6 +21,7 @@ Board-specific doc
    rockchip/index
    sifive/index
    sipeed/index
+   socionext/index
    st/index
    tbs/index
    toradex/index
doc/board/socionext/developerbox.rst new file +87 -0

87 lines not on this page · raw message

doc/board/socionext/index.rst new file +9 -0
new file mode 100644
index 0000000000..4673dcc45b
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Socionext
+=========
+
+.. toctree::
+   :maxdepth: 2
+
+   developerbox
include/configs/synquacer.h new file +109 -0

109 lines not on this page · raw message

#12 lore raw

PATCH v4 12/14 dfu_mtd: Ignore non-implemented lock device failure

In reply to Masami Hiramatsu

Ignore the non-implemented lock device failure on writing mtd via DFU. Without this fix, DFU write shows an error on such device even if it succeeded, because dfu->write_medium returns -EOPNOTSUPP.

---
 drivers/dfu/dfu_mtd.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/dfu/dfu_mtd.c +2 -0
index ca67585a7e..e58302c32d 100644
@@ -152,6 +152,8 @@ static int mtd_block_op(enum dfu_op op, struct dfu_entity *dfu,
 		ret = mtd_lock(mtd, lock_ofs, lock_len);
 		if (ret && ret != -EOPNOTSUPP)
 			printf("MTD device lock failed\n");
+		if (ret == -EOPNOTSUPP)
+			ret = 0;
 	}
 	return ret;
 }
#13 lore raw

PATCH v4 12/14 dfu_mtd: Ignore non-implemented lock device failure

Quoted 10 lines · Masami Hiramatsu

Ignore the non-implemented lock device failure on writing mtd via DFU. Without this fix, DFU write shows an error on such device even if it succeeded, because dfu->write_medium returns -EOPNOTSUPP.

---
 drivers/dfu/dfu_mtd.c |    2 ++
 1 file changed, 2 insertions(+)

A patch has already been submitted for this[1].

Patrick, can you please apply this in your tree and send it as part of the next PR. Thanks.

-sughosh

[1] - https://lists.denx.de/pipermail/u-boot/2021-March/443896.html

Quoted 16 lines
drivers/dfu/dfu_mtd.c +2 -0
index ca67585a7e..e58302c32d 100644
@@ -152,6 +152,8 @@ static int mtd_block_op(enum dfu_op op, struct
 dfu_entity *dfu,
                ret = mtd_lock(mtd, lock_ofs, lock_len);
                if (ret && ret != -EOPNOTSUPP)
                        printf("MTD device lock failed\n");
+               if (ret == -EOPNOTSUPP)
+                       ret = 0;
        }
        return ret;

}

#14 lore raw

PATCH v4 12/14 dfu_mtd: Ignore non-implemented lock device failure

Hi Sughosh,

2021?5?19?(?) 15:07 Sughosh Ganu <[email protected]>:

Quoted 9 lines · Masami Hiramatsu
Quoted 5 lines

Ignore the non-implemented lock device failure on writing mtd via DFU. Without this fix, DFU write shows an error on such device even if it succeeded, because dfu->write_medium returns -EOPNOTSUPP.

Quoted 8 lines
Quoted 5 lines
---
 drivers/dfu/dfu_mtd.c |    2 ++
 1 file changed, 2 insertions(+)

A patch has already been submitted for this[1].

Ah, thanks for pointing! If that is merged, I can drop this patch.

Thank you,

Quoted 23 lines

Patrick, can you please apply this in your tree and send it as part of the next PR. Thanks.

-sughosh

[1] - https://lists.denx.de/pipermail/u-boot/2021-March/443896.html

Quoted 15 lines
drivers/dfu/dfu_mtd.c +2 -0
index ca67585a7e..e58302c32d 100644
@@ -152,6 +152,8 @@ static int mtd_block_op(enum dfu_op op, struct dfu_entity *dfu,
                ret = mtd_lock(mtd, lock_ofs, lock_len);
                if (ret && ret != -EOPNOTSUPP)
                        printf("MTD device lock failed\n");
+               if (ret == -EOPNOTSUPP)
+                       ret = 0;
        }
        return ret;
 }
Signature · 1 line
Masami Hiramatsu
#15 lore raw

Re: [PATCH v4 12/14] dfu_mtd: Ignore non-implemented lock device failure

In reply to Sughosh Ganu
Quoted 13 lines · Sughosh Ganu
Quoted 10 lines · Masami Hiramatsu

Ignore the non-implemented lock device failure on writing mtd via DFU. Without this fix, DFU write shows an error on such device even if it succeeded, because dfu->write_medium returns -EOPNOTSUPP.

---
  drivers/dfu/dfu_mtd.c |    2 ++
  1 file changed, 2 insertions(+)
Quoted 4 lines

A patch has already been submitted for this[1].

Patrick, can you please apply this in your tree and send it as part of the next PR. Thanks.

Ok, I take the patch in my next PR

Quoted 23 lines

-sughosh

[1] - https://lists.denx.de/pipermail/u-boot/2021-March/443896.html

Quoted 16 lines
drivers/dfu/dfu_mtd.c +2 -0
index ca67585a7e..e58302c32d 100644
@@ -152,6 +152,8 @@ static int mtd_block_op(enum dfu_op op, struct
 dfu_entity *dfu,
                 ret = mtd_lock(mtd, lock_ofs, lock_len);
                 if (ret && ret != -EOPNOTSUPP)
                         printf("MTD device lock failed\n");
+               if (ret == -EOPNOTSUPP)
+                       ret = 0;
         }
         return ret;
  }
#16 lore raw

PATCH v4 13/14 doc: qemu: arm64: Fix the documentation of capsule update

In reply to Masami Hiramatsu

Since the EDK2 GenerateCapsule script is out of date and it doesn't generate the supported version capsule file, the document should refer the mkeficapsule in tools.

---
 doc/board/emulation/qemu_capsule_update.rst |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
doc/board/emulation/qemu_capsule_update.rst +2 -9
index 33ce4bcd32..0a2286d039 100644
@@ -39,16 +39,9 @@ In addition, the following config needs to be disabled(QEMU ARM specific)::
 
     CONFIG_TFABOOT
 
-The capsule file can be generated by using the GenerateCapsule.py
-script in EDKII::
-
-    $ ./BaseTools/BinWrappers/PosixLike/GenerateCapsule -e -o \
-    <capsule_file_name> --fw-version <val> --lsv <val> --guid \
-    e2bb9c06-70e9-4b14-97a3-5a7913176e3f --verbose --update-image-index \
-    <val> --verbose <u-boot.bin>
+The capsule file can be generated by using the tools/mkeficapsule::
 
-The above is a wrapper script(GenerateCapsule) which eventually calls
-the actual GenerateCapsule.py script.
+    $ mkeficapsule --raw <u-boot.bin> --index 1 <capsule_file_name>
 
 As per the UEFI specification, the capsule file needs to be placed on
 the EFI System Partition, under the \EFI\UpdateCapsule directory. The
#17 lore raw

PATCH v4 14/14 configs: synquacer: Enable EFI capsule update support

In reply to Masami Hiramatsu

Enable EFI capsule update support. With the EFI capsule update, you can update U-Boot, TF-A and OP-TEE. TF-A and OP-TEE are usually combined as a FIP binary, but if the binary is bigger than 480KB, you have to modify FIP header, split the OP-TEE and stores the OP-TEE binary in the different place. This configuration supports both cases.

---
Changes in v4:
- Add some config options for EBBR.
Changes in v3:
- Fix a typo in dfu_alt_info.

---
 configs/synquacer_developerbox_defconfig |   17 +++++++++++++++++
 include/configs/synquacer.h              |    6 ++++++
 2 files changed, 23 insertions(+)
configs/synquacer_developerbox_defconfig +17 -0
index 2875fcd794..487755f444 100644
@@ -112,3 +112,20 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_PCI=y
 CONFIG_USB_STORAGE=y
+CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
+CONFIG_EFI_CAPSULE_ON_DISK=y
+CONFIG_EFI_CAPSULE_FIRMWARE_MANAGEMENT=y
+CONFIG_EFI_CAPSULE_FIRMWARE=y
+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
+CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y
+CONFIG_EFI_CAPSULE_FMP_HEADER=y
+CONFIG_FLASH_CFI_MTD=y
+CONFIG_CMD_DFU=y
+CONFIG_DFU_TFTP=y
+CONFIG_DFU_MTD=y
+CONFIG_DFU_RAM=y
+CONFIG_DFU_SF=y
+CONFIG_DFU_SF_PART=y
+CONFIG_FIT=y
+CONFIG_OF_LIBFDT=y
+CONFIG_CMD_ERASEENV=y
include/configs/synquacer.h +6 -0
index 0dab4de1f1..8fe10d7485 100644
@@ -61,6 +61,11 @@
 /* Since U-Boot 64bit PCIe support is limited, disable 64bit MMIO support */
 /* #define CONFIG_SYS_PCI_64BIT		1 */
 
+#define DEFAULT_DFU_ALT_INFO "dfu_alt_info="				\
+			"mtd nor1=u-boot.bin raw 200000 100000;"	\
+			"fip.bin raw 180000 78000;"			\
+			"optee.bin raw 500000 100000\0"
+
 /* Distro boot settings */
 #ifndef CONFIG_SPL_BUILD
 #ifdef CONFIG_CMD_USB
@@ -104,6 +109,7 @@
 	"ramdisk_addr_r=0xa0000000\0"		\
 	"scriptaddr=0x88000000\0"		\
 	"pxefile_addr_r=0x88100000\0"		\
+	DEFAULT_DFU_ALT_INFO			\
 	BOOTENV
 
 #endif /* __CONFIG_H */
Tested-by on the v4 series
#18 lore raw
In reply to Masami Hiramatsu

Hi Masami,

Quoted 12 lines · Masami Hiramatsu

Hi,

Here is the 4th version of the series (including some fixes for build errors) to add SynQuacer/DeveloperBox 96board EE suport on U-Boot.

This series includes not only DeveloperBox support but also some fixes for the issues which I faced while porting U-Boot on the DeveloperBox. First 3 patches are fixes, next 1 patch is a code cleanup for generic gpio for arm. The next 7 patches adding DeveloperBox devices and board support. The last 3 patches are related to the UEFI capsule update (including bugfixes).

Quoted 5 lines

Previous version is here:

https://lists.denx.de/pipermail/u-boot/2021-May/449305.html

The default debug level is set to 7. I think it would be better to set it to something more reasonable for the final commit. Unfortunately I don't have time for a more detailed review, but I did manage to run this on my Synquacer and managed to run a full linux distro with EFI.

Quoted 140 lines

Changes in v4
-------------

I dropped a PCI bugfix because it has been merged. And add I2C driver and enable RTC and EBBR support on the configuration.

[06/14]:
- Add Jaehoon's reviewed-by (Thanks!)
[09/14]:
- Add a new i2c driver.
[10/14]:
- Add i2c0 and RTC node.
[11/14]:
- Add I2C and RTC configuration.
- Enable RTC and Date command.
- Remove I2C0 node before booting linux to hide it same as EDK2 does.
- Add some configurations to make it EBBR compliant.
[14/14]:
- Add some config options for EBBR.

BTW, should I split fixes from this series? (since I didn't expect this took so long...)

DeveloperBox
============

DeveloperBox is a certified 96boards Enterprise Edition board. The board/SoC has: -
* Socionext SC2A11 24-cores ARM Cortex-A53 on tbe Mini-ATX form factor motherboard
* 4 DIMM slots (4GB DDR4-2400 UDIMM shipped by default)
* 1 4xPCIe Gen2 slot and 2 1xPCIe Gen2 slots
(1x slots are connected via PCIe bridge chip)
* 4 USB-3.0 ports
* 2 SATA ports
* 1 GbE network port
* 1 USB-UART serial port (micro USB)
* 64MB SPI NOR Flash
* 8GB eMMC Flash Storage
* 96boards LS connector

The DeveloperBox schematic can be found here: -
https://www.96boards.org/documentation/enterprise/developerbox/hardware-docs/mzsc2am_v03_20180115_a.pdf

And the other documents can be found here: -
https://www.96boards.org/documentation/enterprise/developerbox/

Currently, the U-Boot port supports: -
* USB
* eMMC
* SPI-NOR
* SATA
* GbE

The DeveloperBox boots the TF-A and EDK2 as a main bootloader by default. The DeveloperBox U-Boot port will replace the EDK2 and boot from TF-A as BL33, but no need to combine with it.

Thank you,

---

Jassi Brar (4):
mmc: synquacer: Add SynQuacer F_SDH30 SDHCI driver
spi: synquacer: Add HSSPI SPI controller driver for SynQuacer
net: synquacer: Add netsec driver
i2c: synquacer: SNI Synquacer I2C controller

Masami Hiramatsu (10):
ata: ahci-pci: Use scsi_ops to initialize ops
dm: pci: Skip setting VGA bridge bits if parent device is the host bus
efi: Fix to use null handle to create new handle for efi_fmp_raw
gpio: Introduce CONFIG_GPIO_EXTRA_HEADER to cleanup #ifdefs
pci: synquacer: Add SynQuacer ECAM based PCIe driver
ARM: dts: synquacer: Add device trees for DeveloperBox
board: synquacer: Add DeveloperBox 96boards EE support
dfu_mtd: Ignore non-implemented lock device failure
doc: qemu: arm64: Fix the documentation of capsule update
configs: synquacer: Enable EFI capsule update support

 arch/arm/Kconfig                                   |  108 ++
 arch/arm/dts/Makefile                              |    2 
 arch/arm/dts/synquacer-sc2a11-caches.dtsi          |   73 +
 .../dts/synquacer-sc2a11-developerbox-u-boot.dtsi  |   75 +
 arch/arm/dts/synquacer-sc2a11-developerbox.dts     |   56 +
 arch/arm/dts/synquacer-sc2a11.dtsi                 |  595 ++++++++++
 arch/arm/include/asm/gpio.h                        |    8 
 board/socionext/developerbox/Kconfig               |   36 +
 board/socionext/developerbox/MAINTAINERS           |   14 
 board/socionext/developerbox/Makefile              |    9 
 board/socionext/developerbox/developerbox.c        |  146 +++
 configs/synquacer_developerbox_defconfig           |  131 ++
 doc/board/emulation/qemu_capsule_update.rst        |   11 
 doc/board/index.rst                                |    1 
 doc/board/socionext/developerbox.rst               |   87 ++
 doc/board/socionext/index.rst                      |    9 
 drivers/ata/ahci-pci.c                             |    2 
 drivers/dfu/dfu_mtd.c                              |    2 
 drivers/i2c/Kconfig                                |    7 
 drivers/i2c/Makefile                               |    1 
 drivers/i2c/synquacer_i2c.c                        |  338 ++++++
 drivers/mmc/Kconfig                                |   10 
 drivers/mmc/Makefile                               |    1 
 drivers/mmc/f_sdh30.c                              |   81 +
 drivers/net/Kconfig                                |    8 
 drivers/net/Makefile                               |    1 
 drivers/net/sni_netsec.c                           | 1134 ++++++++++++++++++++
 drivers/pci/Kconfig                                |   12 
 drivers/pci/Makefile                               |    1 
 drivers/pci/pci-uclass.c                           |    3 
 drivers/pci/pcie_ecam_synquacer.c                  |  600 +++++++++++
 drivers/spi/Kconfig                                |    8 
 drivers/spi/Makefile                               |    1 
 drivers/spi/spi-synquacer.c                        |  491 +++++++++
 include/configs/synquacer.h                        |  115 ++
 lib/efi_loader/efi_capsule.c                       |    2 
 36 files changed, 4162 insertions(+), 17 deletions(-)
 create mode 100644 arch/arm/dts/synquacer-sc2a11-caches.dtsi
 create mode 100644 arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi
 create mode 100644 arch/arm/dts/synquacer-sc2a11-developerbox.dts
 create mode 100644 arch/arm/dts/synquacer-sc2a11.dtsi
 create mode 100644 board/socionext/developerbox/Kconfig
 create mode 100644 board/socionext/developerbox/MAINTAINERS
 create mode 100644 board/socionext/developerbox/Makefile
 create mode 100644 board/socionext/developerbox/developerbox.c
 create mode 100644 configs/synquacer_developerbox_defconfig
 create mode 100644 doc/board/socionext/developerbox.rst
 create mode 100644 doc/board/socionext/index.rst
 create mode 100644 drivers/i2c/synquacer_i2c.c
 create mode 100644 drivers/mmc/f_sdh30.c
 create mode 100644 drivers/net/sni_netsec.c
 create mode 100644 drivers/pci/pcie_ecam_synquacer.c
 create mode 100644 drivers/spi/spi-synquacer.c
 create mode 100644 include/configs/synquacer.h

--
Masami Hiramatsu <[email protected]>

#19 lore raw

Hello Ilias,

2021年5月23日(日) 17:07 Ilias Apalodimas <[email protected]>:

Quoted 16 lines

Hi Masami,

Quoted 12 lines · Masami Hiramatsu

Hi,

Here is the 4th version of the series (including some fixes for build errors) to add SynQuacer/DeveloperBox 96board EE suport on U-Boot.

This series includes not only DeveloperBox support but also some fixes for the issues which I faced while porting U-Boot on the DeveloperBox. First 3 patches are fixes, next 1 patch is a code cleanup for generic gpio for arm. The next 7 patches adding DeveloperBox devices and board support. The last 3 patches are related to the UEFI capsule update (including bugfixes).

Quoted 8 lines
Quoted 5 lines

Previous version is here:

https://lists.denx.de/pipermail/u-boot/2021-May/449305.html

The default debug level is set to 7. I think it would be better to set it to something more reasonable for the final commit.

Yes, it was for the development value. It should be removed from defconfig at last, because it depends on the builder's choice.

Quoted 5 lines

Unfortunately I don't
have time for a more detailed review, but I did manage to run this on my Synquacer and managed to run a full linux distro with EFI.

Thanks for testing!

Thank you,

Quoted 139 lines
Quoted 139 lines

Changes in v4
-------------

I dropped a PCI bugfix because it has been merged. And add I2C driver and enable RTC and EBBR support on the configuration.

[06/14]:
- Add Jaehoon's reviewed-by (Thanks!)
[09/14]:
- Add a new i2c driver.
[10/14]:
- Add i2c0 and RTC node.
[11/14]:
- Add I2C and RTC configuration.
- Enable RTC and Date command.
- Remove I2C0 node before booting linux to hide it same as EDK2 does.
- Add some configurations to make it EBBR compliant.
[14/14]:
- Add some config options for EBBR.

BTW, should I split fixes from this series? (since I didn't expect this took so long...)

DeveloperBox
============

DeveloperBox is a certified 96boards Enterprise Edition board. The board/SoC has: -
* Socionext SC2A11 24-cores ARM Cortex-A53 on tbe Mini-ATX form factor motherboard
* 4 DIMM slots (4GB DDR4-2400 UDIMM shipped by default)
* 1 4xPCIe Gen2 slot and 2 1xPCIe Gen2 slots
(1x slots are connected via PCIe bridge chip)
* 4 USB-3.0 ports
* 2 SATA ports
* 1 GbE network port
* 1 USB-UART serial port (micro USB)
* 64MB SPI NOR Flash
* 8GB eMMC Flash Storage
* 96boards LS connector

The DeveloperBox schematic can be found here: -
https://www.96boards.org/documentation/enterprise/developerbox/hardware-docs/mzsc2am_v03_20180115_a.pdf

And the other documents can be found here: -
https://www.96boards.org/documentation/enterprise/developerbox/

Currently, the U-Boot port supports: -
* USB
* eMMC
* SPI-NOR
* SATA
* GbE

The DeveloperBox boots the TF-A and EDK2 as a main bootloader by default. The DeveloperBox U-Boot port will replace the EDK2 and boot from TF-A as BL33, but no need to combine with it.

Thank you,

---

Jassi Brar (4):
mmc: synquacer: Add SynQuacer F_SDH30 SDHCI driver
spi: synquacer: Add HSSPI SPI controller driver for SynQuacer
net: synquacer: Add netsec driver
i2c: synquacer: SNI Synquacer I2C controller

Masami Hiramatsu (10):
ata: ahci-pci: Use scsi_ops to initialize ops
dm: pci: Skip setting VGA bridge bits if parent device is the host bus
efi: Fix to use null handle to create new handle for efi_fmp_raw
gpio: Introduce CONFIG_GPIO_EXTRA_HEADER to cleanup #ifdefs
pci: synquacer: Add SynQuacer ECAM based PCIe driver
ARM: dts: synquacer: Add device trees for DeveloperBox
board: synquacer: Add DeveloperBox 96boards EE support
dfu_mtd: Ignore non-implemented lock device failure
doc: qemu: arm64: Fix the documentation of capsule update
configs: synquacer: Enable EFI capsule update support

 arch/arm/Kconfig                                   |  108 ++
 arch/arm/dts/Makefile                              |    2
 arch/arm/dts/synquacer-sc2a11-caches.dtsi          |   73 +
 .../dts/synquacer-sc2a11-developerbox-u-boot.dtsi  |   75 +
 arch/arm/dts/synquacer-sc2a11-developerbox.dts     |   56 +
 arch/arm/dts/synquacer-sc2a11.dtsi                 |  595 ++++++++++
 arch/arm/include/asm/gpio.h                        |    8
 board/socionext/developerbox/Kconfig               |   36 +
 board/socionext/developerbox/MAINTAINERS           |   14
 board/socionext/developerbox/Makefile              |    9
 board/socionext/developerbox/developerbox.c        |  146 +++
 configs/synquacer_developerbox_defconfig           |  131 ++
 doc/board/emulation/qemu_capsule_update.rst        |   11
 doc/board/index.rst                                |    1
 doc/board/socionext/developerbox.rst               |   87 ++
 doc/board/socionext/index.rst                      |    9
 drivers/ata/ahci-pci.c                             |    2
 drivers/dfu/dfu_mtd.c                              |    2
 drivers/i2c/Kconfig                                |    7
 drivers/i2c/Makefile                               |    1
 drivers/i2c/synquacer_i2c.c                        |  338 ++++++
 drivers/mmc/Kconfig                                |   10
 drivers/mmc/Makefile                               |    1
 drivers/mmc/f_sdh30.c                              |   81 +
 drivers/net/Kconfig                                |    8
 drivers/net/Makefile                               |    1
 drivers/net/sni_netsec.c                           | 1134 ++++++++++++++++++++
 drivers/pci/Kconfig                                |   12
 drivers/pci/Makefile                               |    1
 drivers/pci/pci-uclass.c                           |    3
 drivers/pci/pcie_ecam_synquacer.c                  |  600 +++++++++++
 drivers/spi/Kconfig                                |    8
 drivers/spi/Makefile                               |    1
 drivers/spi/spi-synquacer.c                        |  491 +++++++++
 include/configs/synquacer.h                        |  115 ++
 lib/efi_loader/efi_capsule.c                       |    2
 36 files changed, 4162 insertions(+), 17 deletions(-)
 create mode 100644 arch/arm/dts/synquacer-sc2a11-caches.dtsi
 create mode 100644 arch/arm/dts/synquacer-sc2a11-developerbox-u-boot.dtsi
 create mode 100644 arch/arm/dts/synquacer-sc2a11-developerbox.dts
 create mode 100644 arch/arm/dts/synquacer-sc2a11.dtsi
 create mode 100644 board/socionext/developerbox/Kconfig
 create mode 100644 board/socionext/developerbox/MAINTAINERS
 create mode 100644 board/socionext/developerbox/Makefile
 create mode 100644 board/socionext/developerbox/developerbox.c
 create mode 100644 configs/synquacer_developerbox_defconfig
 create mode 100644 doc/board/socionext/developerbox.rst
 create mode 100644 doc/board/socionext/index.rst
 create mode 100644 drivers/i2c/synquacer_i2c.c
 create mode 100644 drivers/mmc/f_sdh30.c
 create mode 100644 drivers/net/sni_netsec.c
 create mode 100644 drivers/pci/pcie_ecam_synquacer.c
 create mode 100644 drivers/spi/spi-synquacer.c
 create mode 100644 include/configs/synquacer.h
Quoted 2 lines
Quoted 2 lines

--
Masami Hiramatsu <[email protected]>

--
Masami Hiramatsu