DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1
@ 2023-04-17 13:11 Ahmad Fatoum
  2023-04-17 13:11 ` [DistroKit] [PATCH 1/5] at91bootstrap2: make targetinstall v4.x compatible Ahmad Fatoum
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2023-04-17 13:11 UTC (permalink / raw)
  To: distrokit

The Wifx L1 is a SAMA5D4-based LoRaWAN gateway. This commit adds first
support for booting DistroKit on it from SD-Card.

Default boot medium is NAND, but a bootable SD-Card always has precedence
over NAND.

Ahmad Fatoum (5):
  at91bootstrap2: make targetinstall v4.x compatible
  v7a: at91bootstrap: configure v4.0.6-rc1 for Wifx L1
  v7a: barebox: extend support to SAMA5D4-based Wifx L1
  v7a: kernel: extend support to SAMA5D4-based Wifx L1
  v7a: add Wifx L1 SD-Card image

 .../platform-v7a/at91bootstrap-wifx-l1.config | 296 +++++++++++++++
 configs/platform-v7a/barebox-at91.config      |  55 ++-
 configs/platform-v7a/barebox-at91.config.diff |  45 ++-
 .../platform-v7a/dts/at91-sama5d4_wifx_l1.dts | 347 ++++++++++++++++++
 configs/platform-v7a/kernelconfig             |  82 ++++-
 configs/platform-v7a/platformconfig           |   9 +-
 .../platforms/image-wifx-l1-sd.in             |  12 +
 configs/platform-v7a/rules/barebox-at91.make  |   1 +
 .../platform-v7a/rules/image-wifx-l1-sd.make  |  36 ++
 doc/hardware.rst                              |   1 +
 doc/hardware_v7a_sama5d4.rst                  |  16 +
 rules/at91bootstrap2.make                     |  90 +++++
 12 files changed, 970 insertions(+), 20 deletions(-)
 create mode 100644 configs/platform-v7a/at91bootstrap-wifx-l1.config
 create mode 100644 configs/platform-v7a/dts/at91-sama5d4_wifx_l1.dts
 create mode 100644 configs/platform-v7a/platforms/image-wifx-l1-sd.in
 create mode 100644 configs/platform-v7a/rules/image-wifx-l1-sd.make
 create mode 100644 doc/hardware_v7a_sama5d4.rst
 create mode 100644 rules/at91bootstrap2.make

-- 
2.39.2




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

* [DistroKit] [PATCH 1/5] at91bootstrap2: make targetinstall v4.x compatible
  2023-04-17 13:11 [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1 Ahmad Fatoum
@ 2023-04-17 13:11 ` Ahmad Fatoum
  2023-04-17 13:11 ` [DistroKit] [PATCH 2/5] v7a: at91bootstrap: configure v4.0.6-rc1 for Wifx L1 Ahmad Fatoum
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2023-04-17 13:11 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

The binaries directory, where artifacts were previously written to is
now beneath build/ by default[1]:

  BUILDDIR ?= ./build
  BINDIR:=$(BUILDDIR)/binaries

Supply BUILDDIR=. after the make command to return to the old directory
scheme. This should have no effect on AT91Bootstrap v3.x and older
as BUILDDIR was first added in v4.0.0[1].

This has already been submitted for PTXdist inclusion[2].

[1]: https://github.com/linux4sam/at91bootstrap/commit/814f3bdab515287fbb0d972d89d228748613ae91
[2]: https://lore.ptxdist.org/ptxdist/20230417115146.745019-1-a.fatoum@pengutronix.de/T/#u

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 rules/at91bootstrap2.make | 90 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)
 create mode 100644 rules/at91bootstrap2.make

diff --git a/rules/at91bootstrap2.make b/rules/at91bootstrap2.make
new file mode 100644
index 000000000000..c36e30305a92
--- /dev/null
+++ b/rules/at91bootstrap2.make
@@ -0,0 +1,90 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2011 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_AT91BOOTSTRAP2) += at91bootstrap2
+
+#
+# Paths and names
+#
+AT91BOOTSTRAP2_VERSION	:= $(call ptx/config-version, PTXCONF_AT91BOOTSTRAP2)
+AT91BOOTSTRAP2_MD5	:= $(call ptx/config-md5, PTXCONF_AT91BOOTSTRAP2)
+AT91BOOTSTRAP2		:= at91bootstrap-$(AT91BOOTSTRAP2_VERSION)
+AT91BOOTSTRAP2_SUFFIX	:= tar.gz
+AT91BOOTSTRAP2_URL	:= https://github.com/linux4sam/at91bootstrap/archive/v$(AT91BOOTSTRAP2_VERSION).$(AT91BOOTSTRAP2_SUFFIX)
+AT91BOOTSTRAP2_SOURCE	:= $(SRCDIR)/$(AT91BOOTSTRAP2).$(AT91BOOTSTRAP2_SUFFIX)
+AT91BOOTSTRAP2_DIR	:= $(BUILDDIR)/$(AT91BOOTSTRAP2)
+AT91BOOTSTRAP2_CONFIG	:= $(call ptx/in-platformconfigdir, \
+		$(call remove_quotes, $(PTXCONF_AT91BOOTSTRAP2_CONFIG)))
+AT91BOOTSTRAP2_LICENSE	:= unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+AT91BOOTSTRAP2_WRAPPER_BLACKLIST := \
+	$(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST)
+
+AT91BOOTSTRAP2_MAKE_ENV := \
+	CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
+	HOSTCC=$(HOSTCC)
+AT91BOOTSTRAP2_MAKE_OPT := V=$(PTXDIST_VERBOSE) BUILDDIR=.
+
+ifdef PTXCONF_AT91BOOTSTRAP2
+$(AT91BOOTSTRAP2_CONFIG):
+	@echo
+	@echo "***********************************************************************************"
+	@echo "* Please generate a at91bootstrap config with 'ptxdist menuconfig at91bootstrap2' *"
+	@echo "***********************************************************************************"
+	@echo
+	@echo
+	@exit 1
+endif
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/at91bootstrap2.install:
+	@$(call targetinfo)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/at91bootstrap2.targetinstall:
+	@$(call targetinfo)
+	@if [ -e $(AT91BOOTSTRAP2_DIR)/binaries/at91bootstrap.bin ]; then \
+		install -vD -m644 $(AT91BOOTSTRAP2_DIR)/binaries/at91bootstrap.bin \
+			$(IMAGEDIR)/at91bootstrap.bin; \
+	else \
+		install -vD -m644 $(AT91BOOTSTRAP2_DIR)/binaries/*boot-$(AT91BOOTSTRAP2_VERSION).bin \
+			$(IMAGEDIR)/at91bootstrap.bin; \
+	fi
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/at91bootstrap2.clean:
+	@$(call targetinfo)
+	@$(call clean_pkg, AT91BOOTSTRAP2)
+	@rm -rf $(IMAGEDIR)/at91bootstrap.bin
+
+# ----------------------------------------------------------------------------
+# oldconfig / menuconfig
+# ----------------------------------------------------------------------------
+
+at91bootstrap2_oldconfig at91bootstrap2_menuconfig: $(STATEDIR)/at91bootstrap2.extract
+	@$(call world/kconfig, AT91BOOTSTRAP2, $(subst at91bootstrap2_,,$@))
+
+# vim: syntax=make
-- 
2.39.2




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

* [DistroKit] [PATCH 2/5] v7a: at91bootstrap: configure v4.0.6-rc1 for Wifx L1
  2023-04-17 13:11 [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1 Ahmad Fatoum
  2023-04-17 13:11 ` [DistroKit] [PATCH 1/5] at91bootstrap2: make targetinstall v4.x compatible Ahmad Fatoum
@ 2023-04-17 13:11 ` Ahmad Fatoum
  2023-04-17 13:11 ` [DistroKit] [PATCH 3/5] v7a: barebox: extend support to SAMA5D4-based " Ahmad Fatoum
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2023-04-17 13:11 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

We will use AT91Bootstrap as first stage bootloader for the Wifx L1 for
now, so let's add a suitable config file. We import v4.0.6-rc1 as that's
the first tag that contains commit 41cd6c4 ("crt0_gnu.S: always pass
along r4 to next stage"), which is required for later boot firmware to
determine what the initial boot medium was.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .../platform-v7a/at91bootstrap-wifx-l1.config | 296 ++++++++++++++++++
 configs/platform-v7a/platformconfig           |   6 +-
 2 files changed, 301 insertions(+), 1 deletion(-)
 create mode 100644 configs/platform-v7a/at91bootstrap-wifx-l1.config

diff --git a/configs/platform-v7a/at91bootstrap-wifx-l1.config b/configs/platform-v7a/at91bootstrap-wifx-l1.config
new file mode 100644
index 000000000000..16a4426fe3ab
--- /dev/null
+++ b/configs/platform-v7a/at91bootstrap-wifx-l1.config
@@ -0,0 +1,296 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_HAVE_DOT_CONFIG=y
+CONFIG_LOAD_AND_JUMP=y
+# CONFIG_DIRECT_JUMP is not set
+# CONFIG_INIT_AND_STOP is not set
+CONFIG_LOAD_SW=y
+CONFIG_JUMP_TO_SW=y
+# CONFIG_SAM9X60 is not set
+# CONFIG_SAMA5D2 is not set
+# CONFIG_SAMA5D3X is not set
+CONFIG_SAMA5D4=y
+# CONFIG_SAMA7G5 is not set
+CONFIG_DEVICENAME="sama5d4"
+
+#
+# Clock Signals
+#
+
+#
+# Main Crystal configuration
+#
+CONFIG_CRYSTAL_12_000MHZ=y
+# CONFIG_CRYSTAL_16_000MHZ is not set
+# CONFIG_CRYSTAL_16_36766MHZ is not set
+# CONFIG_CRYSTAL_18_432MHZ is not set
+# CONFIG_CRYSTAL_24_000MHZ is not set
+# CONFIG_MCK_BYPASS is not set
+
+#
+# Slow Clock Configuration Options
+#
+CONFIG_SCLK=y
+CONFIG_ALLOW_CRYSTAL_12_000MHZ=y
+# CONFIG_CPU_CLK_266MHZ is not set
+# CONFIG_CPU_CLK_332MHZ is not set
+# CONFIG_CPU_CLK_348MHZ is not set
+# CONFIG_CPU_CLK_396MHZ is not set
+# CONFIG_CPU_CLK_444MHZ is not set
+# CONFIG_CPU_CLK_492MHZ is not set
+# CONFIG_CPU_CLK_498MHZ is not set
+# CONFIG_CPU_CLK_510MHZ is not set
+# CONFIG_CPU_CLK_528MHZ is not set
+# CONFIG_CPU_CLK_594MHZ is not set
+CONFIG_CPU_CLK_600MHZ=y
+# CONFIG_CPU_CLK_800MHZ is not set
+# CONFIG_CPU_CLK_1000MHZ is not set
+CONFIG_ALLOW_CPU_CLK_444MHZ=y
+CONFIG_ALLOW_CPU_CLK_510MHZ=y
+CONFIG_ALLOW_CPU_CLK_528MHZ=y
+CONFIG_ALLOW_CPU_CLK_594MHZ=y
+CONFIG_ALLOW_CPU_CLK_600MHZ=y
+# CONFIG_DISABLE_CPU_CLK_240MHZ is not set
+# CONFIG_BUS_SPEED_116MHZ is not set
+# CONFIG_BUS_SPEED_124MHZ is not set
+# CONFIG_BUS_SPEED_133MHZ is not set
+# CONFIG_BUS_SPEED_148MHZ is not set
+# CONFIG_BUS_SPEED_164MHZ is not set
+# CONFIG_BUS_SPEED_166MHZ is not set
+# CONFIG_BUS_SPEED_170MHZ is not set
+# CONFIG_BUS_SPEED_176MHZ is not set
+CONFIG_BUS_SPEED_200MHZ=y
+CONFIG_SUPPORT_BUS_SPEED_148MHZ=y
+CONFIG_SUPPORT_BUS_SPEED_170MHZ=y
+CONFIG_SUPPORT_BUS_SPEED_176MHZ=y
+CONFIG_SUPPORT_BUS_SPEED_200MHZ=y
+
+#
+# Console and Debug
+#
+CONFIG_CONSOLE_INDEX=1
+# CONFIG_DEBUG is not set
+CONFIG_HW_DISPLAY_BANNER=y
+CONFIG_HW_BANNER="\"\\n\\nAT91Bootstrap \" AT91BOOTSTRAP_VERSION \" (\" COMPILE_TIME \")\\n\\n\""
+CONFIG_LINK_ADDR="0x200000"
+CONFIG_TOP_OF_MEMORY="0x210000"
+CONFIG_CPU_HAS_TRUSTZONE=y
+# CONFIG_CPU_HAS_TZC400 is not set
+CONFIG_CPU_V7=y
+# CONFIG_HAS_PMIC_ACT8865 is not set
+# CONFIG_SUPPORT_PM is not set
+# CONFIG_HAS_ONE_WIRE is not set
+# CONFIG_HAS_EEPROM is not set
+CONFIG_HAS_EHT0_PHY=y
+CONFIG_HAS_EHT1_PHY=y
+CONFIG_HAS_AUDIO_CODEC=y
+CONFIG_HAS_HDMI=y
+# CONFIG_CORE_ARM926EJS is not set
+CONFIG_CORE_CORTEX_A5=y
+# CONFIG_CORE_CORTEX_A7 is not set
+# CONFIG_CPU_HAS_UMCTL2 is not set
+CONFIG_CPU_HAS_DDRC=y
+# CONFIG_CPU_HAS_SDDRC is not set
+# CONFIG_CPU_HAS_SDRAMC is not set
+CONFIG_CPU_HAS_SCKC=y
+CONFIG_CPU_HAS_H32MXDIV=y
+CONFIG_CPU_HAS_HSMCI0=y
+CONFIG_CPU_HAS_HSMCI1=y
+# CONFIG_CPU_HAS_HSMCI2 is not set
+# CONFIG_CPU_HAS_MCI0 is not set
+# CONFIG_CPU_HAS_MCI1 is not set
+# CONFIG_CPU_HAS_SDHC0 is not set
+# CONFIG_CPU_HAS_SDHC1 is not set
+# CONFIG_CPU_HAS_SDHC2 is not set
+CONFIG_CPU_HAS_SPI=y
+# CONFIG_CPU_HAS_SPI_IOSET is not set
+# CONFIG_CPU_HAS_QSPI is not set
+# CONFIG_CPU_HAS_QSPI_IOSET is not set
+# CONFIG_CPU_HAS_SCLK_BYPASS is not set
+CONFIG_CPU_HAS_PIO3=y
+CONFIG_CPU_HAS_L2CC=y
+CONFIG_CPU_HAS_PMECC=y
+# CONFIG_HAS_HW_INFO is not set
+# CONFIG_TWI is not set
+# CONFIG_MACB is not set
+# CONFIG_AES is not set
+# CONFIG_LOAD_HW_INFO is not set
+CONFIG_CPU_HAS_TWI0=y
+CONFIG_CPU_HAS_TWI1=y
+CONFIG_CPU_HAS_TWI2=y
+CONFIG_CPU_HAS_TWI3=y
+CONFIG_CPU_HAS_AES=y
+# CONFIG_CPU_HAS_PIO4 is not set
+# CONFIG_CPU_HAS_FLEXCOM0 is not set
+# CONFIG_CPU_HAS_FLEXCOM1 is not set
+# CONFIG_CPU_HAS_FLEXCOM2 is not set
+# CONFIG_CPU_HAS_FLEXCOM3 is not set
+# CONFIG_CPU_HAS_FLEXCOM4 is not set
+# CONFIG_CPU_HAS_FLEXCOM5 is not set
+# CONFIG_CPU_HAS_FLEXCOM6 is not set
+# CONFIG_CPU_HAS_FLEXCOM7 is not set
+# CONFIG_CPU_HAS_FLEXCOM8 is not set
+# CONFIG_CPU_HAS_FLEXCOM9 is not set
+# CONFIG_CPU_HAS_FLEXCOM10 is not set
+# CONFIG_CPU_HAS_FLEXCOM11 is not set
+# CONFIG_CPU_HAS_FLEXCOM12 is not set
+# CONFIG_CPU_HAS_WDT2 is not set
+# CONFIG_CPU_HAS_DWDT is not set
+
+#
+# DRAM
+#
+# CONFIG_SDRAM is not set
+# CONFIG_SDDRC is not set
+CONFIG_DDRC=y
+# CONFIG_UMCTL2 is not set
+# CONFIG_PUBL is not set
+# CONFIG_ALLOW_PSRAM is not set
+# CONFIG_DDR_SEL_ADDR is not set
+CONFIG_BANK_4=y
+# CONFIG_BANK_8 is not set
+# CONFIG_DDR_SET_BY_DEVICE is not set
+# CONFIG_DDR_SET_BY_JEDEC is not set
+CONFIG_DDR_SET_BY_TIMING=y
+# CONFIG_LPDDR1 is not set
+# CONFIG_LPDDR2 is not set
+# CONFIG_LPDDR3 is not set
+CONFIG_DDR2=y
+# CONFIG_DDR3 is not set
+CONFIG_DBW_16=y
+# CONFIG_DBW_32 is not set
+# CONFIG_DDR_64_MBIT is not set
+# CONFIG_DDR_128_MBIT is not set
+# CONFIG_DDR_256_MBIT is not set
+# CONFIG_DDR_512_MBIT is not set
+# CONFIG_DDR_1_GBIT is not set
+CONFIG_DDR_2_GBIT=y
+# CONFIG_DDR_4_GBIT is not set
+# CONFIG_DDR_8_GBIT is not set
+# CONFIG_CAS_2 is not set
+CONFIG_CAS_3=y
+# CONFIG_CAS_4 is not set
+# CONFIG_CAS_5 is not set
+# CONFIG_CAS_6 is not set
+# CONFIG_CAS_7 is not set
+# CONFIG_CAS_8 is not set
+# CONFIG_NOT_DQS_DISABLED is not set
+CONFIG_DDR_TRSA=9
+CONFIG_DDR_TRCD=3
+CONFIG_DDR_TWR=3
+CONFIG_DDR_TRC=12
+CONFIG_DDR_TRP=3
+CONFIG_DDR_TRRD=2
+CONFIG_DDR_TWTR=2
+CONFIG_DDR_TMRD=2
+CONFIG_DDR_TRFC=26
+CONFIG_DDR_TXSNR=28
+CONFIG_DDR_TXSRD=200
+CONFIG_DDR_TXP=2
+CONFIG_DDR_TXARD=2
+CONFIG_DDR_TXARDS=8
+CONFIG_DDR_TRPA=3
+CONFIG_DDR_TRTP=2
+CONFIG_DDR_TFAW=9
+CONFIG_DDR_RTC=1563
+
+#
+# Extra parameters
+#
+# CONFIG_SAMA5D2_LPDDR2 is not set
+# CONFIG_MMU is not set
+
+#
+# Flash Memory
+#
+# CONFIG_DATAFLASH is not set
+# CONFIG_FLASH is not set
+# CONFIG_NANDFLASH is not set
+CONFIG_SDCARD=y
+CONFIG_MEMORY="sdcard"
+
+#
+# SD Card Configuration
+#
+CONFIG_AT91_MCI=y
+# CONFIG_AT91_MCI0 is not set
+CONFIG_AT91_MCI1=y
+# CONFIG_AT91_MCI2 is not set
+CONFIG_FATFS=y
+CONFIG_ALLOW_BOOT_FROM_DATAFLASH_CS0=y
+CONFIG_BOOTSTRAP_MAXSIZE="65536"
+CONFIG_PROJECT="sdcard"
+CONFIG_LOAD_UBOOT=y
+# CONFIG_LOAD_LINUX is not set
+# CONFIG_LOAD_ANDROID is not set
+# CONFIG_LOAD_1MB is not set
+# CONFIG_LOAD_4MB is not set
+# CONFIG_LOAD_64KB is not set
+CONFIG_JUMP_ADDR="0x26F00000"
+
+#
+# U-Boot Image Storage Setup
+#
+CONFIG_IMAGE_NAME="barebox.bin"
+CONFIG_MACH_TYPE="9999"
+# CONFIG_OVERRIDE_MACH_TYPE is not set
+# CONFIG_SECURE is not set
+CONFIG_DISABLE_WATCHDOG=y
+
+#
+# ARM TrustZone Options
+#
+CONFIG_MATRIX=y
+# CONFIG_LOAD_OPTEE is not set
+# CONFIG_ENTER_NWD is not set
+CONFIG_REDIRECT_ALL_INTS_AIC=y
+# CONFIG_TZC400 is not set
+# CONFIG_BACKUP_MODE is not set
+
+#
+# Board's Workaround Options
+#
+CONFIG_BOARD_QUIRK_NONE=y
+# CONFIG_BOARD_QUIRK_SAMA5D3 is not set
+# CONFIG_BOARD_QUIRK_SAMA5D4 is not set
+# CONFIG_BOARD_QUIRK_SAMA5D2_XULT is not set
+# CONFIG_BOARD_QUIRK_SAMA5D2_ICP is not set
+# CONFIG_BOARD_QUIRK_SAMA5D2_SIP is not set
+# CONFIG_BOARD_QUIRK_SAM9X60_EK is not set
+# CONFIG_BOARD_QUIRK_SAM9X60_EB is not set
+# CONFIG_BOARD_QUIRK_SAMA7G5_EK is not set
+# CONFIG_BOARD_QUIRK_SAM9X60_CURIOSITY is not set
+# CONFIG_LED_ON_BOARD is not set
+
+#
+# TWI BUS setting
+#
+# CONFIG_TWI0 is not set
+# CONFIG_TWI1 is not set
+# CONFIG_TWI2 is not set
+CONFIG_TWI3=y
+# CONFIG_ACT8865 is not set
+# CONFIG_MCP16502 is not set
+
+#
+# Board Hardware Information Options
+#
+
+#
+# Basic Drivers support
+#
+CONFIG_PIT=y
+CONFIG_WDT=y
+# CONFIG_WDT2 is not set
+CONFIG_RSTC=y
+CONFIG_USART=y
+CONFIG_PIO=y
+CONFIG_PIO_E=y
+CONFIG_PMC_COMMON=y
+CONFIG_PMC_V1=y
+CONFIG_PMC_PERIPH_CLK_SAM9X5=y
+CONFIG_PMC_UTMI_CLK=y
+CONFIG_PMC_PLL_CLK=y
+CONFIG_PMC_MCK_CLK=y
+# CONFIG_SHDWC is not set
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index cd6c2118dcac..52142dab6e4b 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -177,7 +177,10 @@ PTXCONF_CONSOLE_SPEED="115200"
 # bootloaders                   
 #
 # PTXCONF_AT91BOOTSTRAP is not set
-# PTXCONF_AT91BOOTSTRAP2 is not set
+PTXCONF_AT91BOOTSTRAP2=y
+PTXCONF_AT91BOOTSTRAP2_VERSION="4.0.6-rc1"
+PTXCONF_AT91BOOTSTRAP2_MD5="ef321a80bf428bfd6cb642c96126ef6c"
+PTXCONF_AT91BOOTSTRAP2_CONFIG="at91bootstrap-wifx-l1.config"
 PTXCONF_BAREBOX_COMMON_ARCH_STRING="arm"
 PTXCONF_BAREBOX_COMMON=y
 PTXCONF_BAREBOX_COMMON_VERSION="2023.02.1"
@@ -305,6 +308,7 @@ PTXCONF_HOST_M4=y
 PTXCONF_HOST_MTOOLS=y
 PTXCONF_HOST_OPENSSL=y
 PTXCONF_HOST_SYSTEM_BC=y
+PTXCONF_HOST_SYSTEM_PYTHON3=y
 PTXCONF_HOST_UTIL_LINUX=y
 PTXCONF_HOST_TF_A=y
 
-- 
2.39.2




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

* [DistroKit] [PATCH 3/5] v7a: barebox: extend support to SAMA5D4-based Wifx L1
  2023-04-17 13:11 [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1 Ahmad Fatoum
  2023-04-17 13:11 ` [DistroKit] [PATCH 1/5] at91bootstrap2: make targetinstall v4.x compatible Ahmad Fatoum
  2023-04-17 13:11 ` [DistroKit] [PATCH 2/5] v7a: at91bootstrap: configure v4.0.6-rc1 for Wifx L1 Ahmad Fatoum
@ 2023-04-17 13:11 ` Ahmad Fatoum
  2023-04-17 13:11 ` [DistroKit] [PATCH 4/5] v7a: kernel: " Ahmad Fatoum
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2023-04-17 13:11 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

Support for booting the Wifx L1 from SD-Card is upstream in barebox
since v2023.02.0. We have 2023.02.1, so let's enable it.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/barebox-at91.config      | 55 ++++++++++++++++---
 configs/platform-v7a/barebox-at91.config.diff | 45 ++++++++++++++-
 configs/platform-v7a/rules/barebox-at91.make  |  1 +
 3 files changed, 89 insertions(+), 12 deletions(-)

diff --git a/configs/platform-v7a/barebox-at91.config b/configs/platform-v7a/barebox-at91.config
index 78e8e8523d55..b9f129a0ef5f 100644
--- a/configs/platform-v7a/barebox-at91.config
+++ b/configs/platform-v7a/barebox-at91.config
@@ -52,6 +52,7 @@ CONFIG_CPU_32v7=y
 CONFIG_HAVE_AT91_UTMI=y
 CONFIG_HAVE_AT91_USB_CLK=y
 CONFIG_COMMON_CLK_AT91=y
+CONFIG_HAVE_AT91_SMD=y
 CONFIG_HAVE_AT91_H32MX=y
 CONFIG_HAVE_AT91_GENERATED_CLK=y
 CONFIG_HAVE_AT91_AUDIO_PLL=y
@@ -63,6 +64,7 @@ CONFIG_HAVE_AT91SAM9_RST=y
 CONFIG_SOC_SAMA5=y
 CONFIG_SOC_SAMA5_MULTI=y
 CONFIG_SOC_SAMA5D2=y
+CONFIG_SOC_SAMA5D4=y
 CONFIG_ARCH_TEXT_BASE=0x23f00000
 
 #
@@ -76,7 +78,7 @@ CONFIG_AT91_MULTI_BOARDS=y
 # CONFIG_MACH_SAMA5D3_XPLAINED is not set
 CONFIG_MACH_SAMA5D27_SOM1=y
 CONFIG_MACH_SAMA5D27_GIANTBOARD=y
-# CONFIG_MACH_SAMA5D4_WIFX is not set
+CONFIG_MACH_SAMA5D4_WIFX=y
 
 #
 # AT91 Board Options
@@ -112,6 +114,7 @@ CONFIG_UIMAGE=y
 CONFIG_LOGBUF=y
 CONFIG_STDDEV=y
 CONFIG_MENUTREE=y
+CONFIG_UBIFORMAT=y
 CONFIG_BOOT=y
 
 #
@@ -237,7 +240,7 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS=""
 CONFIG_COMPILE_LOGLEVEL=6
 CONFIG_DEFAULT_LOGLEVEL=7
 # CONFIG_DEBUG_LL is not set
-CONFIG_DEBUG_AT91_UART_BASE=0xf8020000
+CONFIG_DEBUG_AT91_UART_BASE=0xfc069000
 # CONFIG_DEBUG_INITCALLS is not set
 # CONFIG_DEBUG_PBL is not set
 # CONFIG_DEBUG_PROBES is not set
@@ -281,6 +284,7 @@ CONFIG_CMD_IMD=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_ARM_MMUINFO=y
 CONFIG_CMD_REGULATOR=y
+# CONFIG_CMD_NVMEM is not set
 CONFIG_CMD_VERSION=y
 # CONFIG_CMD_MMC is not set
 # CONFIG_CMD_MMC_EXTCSD is not set
@@ -311,6 +315,8 @@ CONFIG_CMD_UIMAGE=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_AUTOMOUNT=y
 CONFIG_CMD_MOUNT=y
+CONFIG_CMD_UBI=y
+CONFIG_CMD_UBIFORMAT=y
 CONFIG_CMD_UMOUNT=y
 # end of Partition
 
@@ -422,6 +428,9 @@ CONFIG_CMD_FLASH=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_LED=y
+CONFIG_CMD_NAND=y
+# CONFIG_CMD_NANDTEST is not set
+# CONFIG_CMD_NAND_BITFLIP is not set
 # CONFIG_CMD_POWEROFF is not set
 CONFIG_CMD_SPI=y
 CONFIG_CMD_LED_TRIGGER=y
@@ -580,11 +589,25 @@ CONFIG_MTD_M25P80=y
 # end of Self contained MTD devices
 
 # CONFIG_DRIVER_CFI is not set
-# CONFIG_NAND is not set
+CONFIG_NAND=y
+# CONFIG_MTD_NAND_ECC_SOFT is not set
+# CONFIG_NAND_ECC_HW_SYNDROME is not set
+# CONFIG_NAND_ALLOW_ERASE_BAD is not set
+CONFIG_NAND_ATMEL=y
+# CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC is not set
+# CONFIG_MTD_NAND_DENALI is not set
 CONFIG_MTD_SPI_NOR=y
 # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
 # CONFIG_SPI_CADENCE_QUADSPI is not set
-# CONFIG_MTD_UBI is not set
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+CONFIG_MTD_UBI_FASTMAP=y
+
+#
+# UBI debugging options
+#
+# CONFIG_MTD_UBI_CHECK_IO is not set
+# CONFIG_MTD_UBI_GENERAL_EXTRA_CHECKS is not set
 CONFIG_DISK=y
 CONFIG_DISK_WRITE=y
 
@@ -658,13 +681,14 @@ CONFIG_MFD_SYSCON=y
 CONFIG_MFD_ATMEL_FLEXCOM=y
 # CONFIG_MFD_RK808 is not set
 # CONFIG_MFD_AXP20X_I2C is not set
+CONFIG_MFD_ATMEL_SMC=y
 # end of Multifunction device drivers
 
 #
 # Misc devices
 #
 # CONFIG_JTAG is not set
-# CONFIG_SRAM is not set
+CONFIG_SRAM=y
 CONFIG_STATE_DRV=y
 CONFIG_DEV_MEM=y
 # CONFIG_UBOOTVAR is not set
@@ -683,7 +707,7 @@ CONFIG_LED_TRIGGERS=y
 # EEPROM support
 #
 # CONFIG_EEPROM_AT25 is not set
-# CONFIG_EEPROM_AT24 is not set
+CONFIG_EEPROM_AT24=y
 # end of EEPROM support
 
 #
@@ -729,11 +753,15 @@ CONFIG_GPIOLIB=y
 # Pin controllers
 #
 CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
 CONFIG_PINCTRL_AT91PIO4=y
 # CONFIG_PINCTRL_SINGLE is not set
 # end of Pin controllers
 
-# CONFIG_NVMEM is not set
+CONFIG_NVMEM=y
+# CONFIG_NVMEM_RMEM is not set
+# CONFIG_NVMEM_SNVS_LPGPR is not set
+# CONFIG_EEPROM_93XX46 is not set
 
 #
 # Bus devices
@@ -771,7 +799,7 @@ CONFIG_REGULATOR_FIXED=y
 #
 # Memory controller drivers
 #
-# CONFIG_ATMEL_EBI is not set
+CONFIG_ATMEL_EBI=y
 # end of Memory controller drivers
 
 #
@@ -795,6 +823,7 @@ CONFIG_REGULATOR_FIXED=y
 # end of NVME Support
 
 # CONFIG_SYSCON_REBOOT_MODE is not set
+# CONFIG_NVMEM_REBOOT_MODE is not set
 # CONFIG_POWER_RESET_SYSCON is not set
 # CONFIG_POWER_RESET_SYSCON_POWEROFF is not set
 # CONFIG_POWER_RESET_GPIO is not set
@@ -827,6 +856,10 @@ CONFIG_FS_FAT=y
 CONFIG_FS_FAT_WRITE=y
 CONFIG_FS_FAT_LFN=y
 # CONFIG_FS_JFFS2 is not set
+CONFIG_FS_UBIFS=y
+# CONFIG_FS_UBIFS_COMPRESSION_LZO is not set
+# CONFIG_FS_UBIFS_COMPRESSION_ZLIB is not set
+CONFIG_FS_UBIFS_COMPRESSION_ZSTD=y
 # CONFIG_FS_BPKFS is not set
 # CONFIG_FS_UIMAGEFS is not set
 # CONFIG_FS_PSTORE is not set
@@ -858,16 +891,19 @@ CONFIG_FS_FAT_LFN=y
 #
 CONFIG_PARAMETER=y
 CONFIG_UNCOMPRESS=y
+CONFIG_XXHASH=y
 # CONFIG_ZLIB is not set
 CONFIG_BZLIB=y
 # CONFIG_LZ4_DECOMPRESS is not set
-# CONFIG_ZSTD_DECOMPRESS is not set
+CONFIG_ZSTD_DECOMPRESS=y
 # CONFIG_XZ_DECOMPRESS is not set
 # CONFIG_BASE64 is not set
 CONFIG_PROCESS_ESCAPE_SEQUENCE=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_FNMATCH=y
 CONFIG_QSORT=y
+CONFIG_LIBSCAN=y
+CONFIG_LIBUBIGEN=y
 # CONFIG_RATP is not set
 # CONFIG_ALLOW_PRNG_FALLBACK is not set
 # CONFIG_CRC_CCITT is not set
@@ -882,6 +918,7 @@ CONFIG_QSORT=y
 # CONFIG_BLOBGEN is not set
 CONFIG_ARCH_HAS_STACK_DUMP=y
 CONFIG_ARCH_HAS_DATA_ABORT_MASK=y
+CONFIG_GENERIC_ALLOCATOR=y
 # end of Library routines
 
 #
diff --git a/configs/platform-v7a/barebox-at91.config.diff b/configs/platform-v7a/barebox-at91.config.diff
index a08422ffe318..2b7b71b6879b 100644
--- a/configs/platform-v7a/barebox-at91.config.diff
+++ b/configs/platform-v7a/barebox-at91.config.diff
@@ -11,7 +11,7 @@ CONFIG_ARCH_TEXT_BASE=0x23f00000
 CONFIG_AT91SAM9_SMC=y
 CONFIG_AT91_MCI_PBL=y
 CONFIG_AT91_MULTI_BOARDS=y
-# CONFIG_ATMEL_EBI is not set
+CONFIG_ATMEL_EBI=y
 # CONFIG_BOARD_ARM_GENERIC_DT is not set
 # CONFIG_BOARD_GENERIC_DT is undefined
 CONFIG_BOOTM_OFTREE_UIMAGE=y
@@ -21,14 +21,20 @@ CONFIG_CMD_AT91CLK=y
 CONFIG_CMD_AT91_BOOT_TEST=y
 CONFIG_CMD_MENU_MANAGEMENT=y
 # CONFIG_CMD_MMC is not set
+CONFIG_CMD_NAND=y
+# CONFIG_CMD_NANDTEST is not set
+# CONFIG_CMD_NAND_BITFLIP is not set
+# CONFIG_CMD_NVMEM is not set
 # CONFIG_CMD_SMC is undefined
+CONFIG_CMD_UBI=y
+CONFIG_CMD_UBIFORMAT=y
 # CONFIG_CMD_USB is undefined
 # CONFIG_CMD_USBGADGET is undefined
 CONFIG_COMMON_CLK_AT91=y
 CONFIG_COMPILE_LOGLEVEL=6
 # CONFIG_CPU_SUPPORTS_32BIT_KERNEL is undefined
 # CONFIG_CPU_SUPPORTS_64BIT_KERNEL is undefined
-CONFIG_DEBUG_AT91_UART_BASE=0xf8020000
+CONFIG_DEBUG_AT91_UART_BASE=0xfc069000
 # CONFIG_DEBUG_PBL is not set
 CONFIG_DEFAULT_LOGLEVEL=7
 # CONFIG_DRIVER_NET_ARC_EMAC is undefined
@@ -38,9 +44,16 @@ CONFIG_DRIVER_SERIAL_ATMEL=y
 # CONFIG_DRIVER_SPI_ATMEL is not set
 # CONFIG_DRIVER_SPI_FSL_QUADSPI is not set
 # CONFIG_DRIVER_SPI_GPIO is not set
+# CONFIG_EEPROM_93XX46 is not set
+CONFIG_EEPROM_AT24=y
 # CONFIG_FASTBOOT_BASE is undefined
 # CONFIG_FASTBOOT_CMD_OEM is undefined
 # CONFIG_FASTBOOT_SPARSE is undefined
+CONFIG_FS_UBIFS=y
+# CONFIG_FS_UBIFS_COMPRESSION_LZO is not set
+# CONFIG_FS_UBIFS_COMPRESSION_ZLIB is not set
+CONFIG_FS_UBIFS_COMPRESSION_ZSTD=y
+CONFIG_GENERIC_ALLOCATOR=y
 # CONFIG_GPIO_PL061 is undefined
 # CONFIG_GPIO_RASPBERRYPI_EXP is undefined
 CONFIG_HAS_MACB=y
@@ -50,6 +63,7 @@ CONFIG_HAVE_AT91_DDRAMC=y
 CONFIG_HAVE_AT91_GENERATED_CLK=y
 CONFIG_HAVE_AT91_H32MX=y
 CONFIG_HAVE_AT91_I2S_MUX_CLK=y
+CONFIG_HAVE_AT91_SMD=y
 CONFIG_HAVE_AT91_USB_CLK=y
 CONFIG_HAVE_AT91_UTMI=y
 CONFIG_HAVE_MACH_ARM_HEAD=y
@@ -64,6 +78,8 @@ CONFIG_IMAGE_COMPRESSION_NONE=y
 CONFIG_IMD_TARGET=y
 # CONFIG_KEYBOARD_USB is undefined
 # CONFIG_LIBFDT is undefined
+CONFIG_LIBSCAN=y
+CONFIG_LIBUBIGEN=y
 # CONFIG_MACH_AT91SAM9263EK is not set
 # CONFIG_MACH_AT91SAM9X5EK is not set
 # CONFIG_MACH_MICROCHIP_KSZ9477_EVB is not set
@@ -77,7 +93,7 @@ CONFIG_IMD_TARGET=y
 CONFIG_MACH_SAMA5D27_GIANTBOARD=y
 CONFIG_MACH_SAMA5D27_SOM1=y
 # CONFIG_MACH_SAMA5D3_XPLAINED is not set
-# CONFIG_MACH_SAMA5D4_WIFX is not set
+CONFIG_MACH_SAMA5D4_WIFX=y
 # CONFIG_MACH_SKOV_ARM9CPU is not set
 CONFIG_MCI_ATMEL=y
 CONFIG_MCI_ATMEL_SDHCI=y
@@ -89,17 +105,35 @@ CONFIG_MCI_MMC_BOOT_PARTITIONS=y
 CONFIG_MCI_SDHCI=y
 # CONFIG_MCI_STARTUP is not set
 CONFIG_MFD_ATMEL_FLEXCOM=y
+CONFIG_MFD_ATMEL_SMC=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MTD_M25P80=y
+# CONFIG_MTD_NAND_DENALI is not set
+# CONFIG_MTD_NAND_ECC_SOFT is not set
+# CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC is not set
 CONFIG_MTD_SPI_NOR=y
 # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
 # CONFIG_MTD_SST25L is not set
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+# CONFIG_MTD_UBI_CHECK_IO is not set
+CONFIG_MTD_UBI_FASTMAP=y
+# CONFIG_MTD_UBI_GENERAL_EXTRA_CHECKS is not set
+CONFIG_NAND=y
+# CONFIG_NAND_ALLOW_ERASE_BAD is not set
+CONFIG_NAND_ATMEL=y
+# CONFIG_NAND_ECC_HW_SYNDROME is not set
 # CONFIG_NET_USB is undefined
 # CONFIG_NET_USB_ASIX is undefined
 # CONFIG_NET_USB_RTL8152 is undefined
 # CONFIG_NET_USB_SMSC95XX is undefined
+CONFIG_NVMEM=y
+# CONFIG_NVMEM_REBOOT_MODE is not set
+# CONFIG_NVMEM_RMEM is not set
+# CONFIG_NVMEM_SNVS_LPGPR is not set
 CONFIG_OF_BAREBOX_ENV_IN_FS=y
 CONFIG_PBL_CONSOLE=y
+CONFIG_PINCTRL_AT91=y
 CONFIG_PINCTRL_AT91PIO4=y
 # CONFIG_PINCTRL_BCM283X is undefined
 CONFIG_PROMPT="barebox:"
@@ -109,12 +143,15 @@ CONFIG_REGULATOR_FIXED=y
 # CONFIG_SERIAL_AMBA_PL011 is undefined
 CONFIG_SOC_SAMA5=y
 CONFIG_SOC_SAMA5D2=y
+CONFIG_SOC_SAMA5D4=y
 CONFIG_SOC_SAMA5_MULTI=y
 CONFIG_SPI_ATMEL_QUADSPI=y
 # CONFIG_SPI_CADENCE_QUADSPI is not set
 CONFIG_SPI_MEM=y
+CONFIG_SRAM=y
 # CONFIG_SYSCON_REBOOT_MODE is not set
 # CONFIG_THUMB2_BAREBOX is undefined
+CONFIG_UBIFORMAT=y
 # CONFIG_USB is undefined
 # CONFIG_USBGADGET_START is undefined
 # CONFIG_USB_DWC2_GADGET is undefined
@@ -135,6 +172,7 @@ CONFIG_SPI_MEM=y
 # CONFIG_USB_XHCI is undefined
 CONFIG_WATCHDOG_AT91SAM9=y
 # CONFIG_WATCHDOG_BCM2835 is undefined
+CONFIG_XXHASH=y
 # CONFIG_XZ_DECOMPRESS is not set
 # CONFIG_XZ_DEC_ARM is undefined
 # CONFIG_XZ_DEC_ARMTHUMB is undefined
@@ -143,3 +181,4 @@ CONFIG_WATCHDOG_AT91SAM9=y
 # CONFIG_XZ_DEC_SPARC is undefined
 # CONFIG_XZ_DEC_X86 is undefined
 # CONFIG_ZLIB is not set
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/configs/platform-v7a/rules/barebox-at91.make b/configs/platform-v7a/rules/barebox-at91.make
index 9563a2327e00..fe426e400bed 100644
--- a/configs/platform-v7a/rules/barebox-at91.make
+++ b/configs/platform-v7a/rules/barebox-at91.make
@@ -47,6 +47,7 @@ BAREBOX_AT91_CONF_OPT := \
 BAREBOX_AT91_MAKE_OPT := $(BAREBOX_AT91_CONF_OPT)
 
 BAREBOX_AT91_IMAGES := \
+        images/barebox-wifx-l1.img \
         images/barebox-sama5d27-som1-ek.img \
         images/barebox-sama5d27-som1-ek-xload-mmc.img \
         images/barebox-groboards-sama5d27-giantboard.img \
-- 
2.39.2




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

* [DistroKit] [PATCH 4/5] v7a: kernel: extend support to SAMA5D4-based Wifx L1
  2023-04-17 13:11 [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1 Ahmad Fatoum
                   ` (2 preceding siblings ...)
  2023-04-17 13:11 ` [DistroKit] [PATCH 3/5] v7a: barebox: extend support to SAMA5D4-based " Ahmad Fatoum
@ 2023-04-17 13:11 ` Ahmad Fatoum
  2023-04-17 13:11 ` [DistroKit] [PATCH 5/5] v7a: add Wifx L1 SD-Card image Ahmad Fatoum
  2023-04-17 13:59 ` [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1 Robert Schwebel
  5 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2023-04-17 13:11 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

Let's import the barebox device tree into the BSP for use by Linux.
This allows us to update it separately in the future. The kernel was so
far configured for SAMA5D2 only, so enable whatever else is needed for
the SAMA5D4. While we boot from SD for now, main boot medium is meant to
be NAND. We thus enable the NAND driver and UBIFS. Driver support is
there, but we have yet to integrate boot from NAND into the BSP.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .../platform-v7a/dts/at91-sama5d4_wifx_l1.dts | 347 ++++++++++++++++++
 configs/platform-v7a/kernelconfig             |  82 ++++-
 configs/platform-v7a/platformconfig           |   2 +-
 3 files changed, 424 insertions(+), 7 deletions(-)
 create mode 100644 configs/platform-v7a/dts/at91-sama5d4_wifx_l1.dts

diff --git a/configs/platform-v7a/dts/at91-sama5d4_wifx_l1.dts b/configs/platform-v7a/dts/at91-sama5d4_wifx_l1.dts
new file mode 100644
index 000000000000..5332177ad3be
--- /dev/null
+++ b/configs/platform-v7a/dts/at91-sama5d4_wifx_l1.dts
@@ -0,0 +1,347 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+// SPDX-FileCopyrightText: 2021 Wifx
+// SPDX-FileCopyrightText: 2021 Yannick Lanz <yannick.lanz@wifx.net>
+// SPDX-FileCopyrightText: 2022 Ahmad Fatoum, Pengutronix
+
+/dts-v1/;
+
+#include "sama5d4.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	model = "Wifx L1";
+	compatible = "wifx,l1", "atmel,sama5d4", "atmel,sama5";
+
+	chosen {
+		stdout-path = &usart3;
+	};
+
+	aliases {
+		mmc0 = &mmc0;
+		mmc1 = &mmc1;
+		rtc0 = &ds1339;
+		rtc1 = &rtc_internal;
+		serial1 = &usart1;
+		serial4 = &usart4;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		status = "okay";
+
+		status_internal {
+			gpios = <&pioE 15 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	pps {
+	      compatible = "pps-gpio";
+	      pinctrl-names = "default";
+	      pinctrl-0 = <&pinctrl_gnss_pps>;
+
+	      gpios = <&pioC 24 GPIO_ACTIVE_HIGH>;
+	      /* assert-falling-edge; */
+	};
+
+	vddbu_2v_reg: regulator-vddbu-2v {
+		compatible = "regulator-fixed";
+		regulator-name = "VDDBU_2V";
+		regulator-min-microvolt = <2000000>;
+		regulator-max-microvolt = <2000000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
+&slow_xtal {
+	clock-frequency = <32768>;
+};
+
+&main_xtal {
+	clock-frequency = <12000000>;
+};
+
+&spi0 {
+	status = "okay";
+	cs-gpios = <&pioC 3 GPIO_ACTIVE_HIGH>;
+
+	sx1302@0 {
+		compatible = "semtech,sx1301";
+		spi-max-frequency = <10000000>;
+		reg = <0>;
+	};
+};
+
+&i2c0 {
+	status = "okay";
+	clock-frequency = <100000>;
+	i2c-digital-filter;
+	i2c-analog-filter;
+	i2c-sda-hold-time-ns = <350>;
+};
+
+&i2c1 {
+	status = "okay";
+	clock-frequency = <400000>;
+	i2c-sda-hold-time-ns = <350>;
+	i2c-digital-filter;
+	i2c-analog-filter;
+
+	stts751: temp_sensor@38 {
+		compatible = "stts751";
+		reg = <0x38>;
+	};
+
+	m24c08: eeprom@54 {
+		compatible = "atmel,24c08";
+		reg = <0x54>;
+		pagesize = <16>;
+	};
+
+	mac_at24mac402: eeprom@58 {
+		compatible = "atmel,24mac402";
+		reg = <0x58>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		ethaddr: mac-address@9a {
+			reg = <0x9a 6>;
+		};
+	};
+
+	ds1339: rtc@68 {
+		compatible = "dallas,ds1339";
+		reg = <0x68>;
+		trickle-resistor-ohms = <250>;
+	};
+};
+
+&i2c2 {
+	status = "okay";
+	clock-frequency = <400000>;
+	i2c-sda-hold-time-ns = <350>;
+	i2c-digital-filter;
+	i2c-analog-filter;
+
+	ec@2a {
+		compatible = "wifx,wgw-ec-i2c";
+		reg = <0x2a>;
+
+		interrupt-parent = <&pioE>;
+		interrupts = <27 IRQ_TYPE_EDGE_RISING>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_mcu_irq &pinctrl_mcu_cpu_state>;
+
+		cpu-state-gpios = <&pioA 19 0>;
+
+		usb_typec: usbc {
+			compatible = "wifx,wgw-ec-usbc";
+			#trigger-source-cells = <0>;
+		};
+
+		leds {
+			compatible = "wifx,wgw-ec-leds";
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			statusled {
+				reg = <0>;
+				label = "status";
+				max-brightness = <255>;
+				linux,default-trigger = "heartbeat";
+			};
+
+			serviceled {
+				reg = <1>;
+				label = "service";
+				max-brightness = <255>;
+				linux,default-trigger = "wgw-usbc-data-mode";
+				trigger-sources = <&usb_typec>;
+			};
+		};
+	};
+};
+
+&macb0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_macb0_rmii &pinctrl_macb0_phy_irq>;
+	phy-mode = "rmii";
+	phy-handle = <&phy0>;
+	status = "okay";
+
+	phy0: ethernet-phy@1 {
+		interrupt-parent = <&pioA>;
+		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
+		reg = <1>;
+	};
+};
+
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
+	status = "okay";
+
+	slot@0 {
+		reg = <0>;
+		bus-width = <4>;
+		//cd-gpios = <&pioE 3 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+&usart1 {
+	atmel,use-dma-rx;
+	atmel,use-dma-tx;
+	pinctrl-0 = <&pinctrl_usart1>;
+	status = "okay";
+};
+
+&usart3 {
+	atmel,use-dma-rx;
+	atmel,use-dma-tx;
+	status = "okay";
+};
+
+&tcb0 {
+	timer@0 {
+		compatible = "atmel,tcb-timer";
+		reg = <0>;
+	};
+
+	timer@1 {
+		compatible = "atmel,tcb-timer";
+		reg = <1>;
+	};
+};
+
+/* disable unused TCBs */
+&tcb1 {
+	status = "disabled";
+};
+
+&tcb2 {
+	status = "disabled";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+rtc_internal: &{/ahb/apb/rtc@fc0686b0} {
+	status = "okay";
+};
+
+&usb0 {
+	atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>;
+	atmel,id-gpio = <&pioD 11 GPIO_ACTIVE_HIGH>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usb_vbus>;
+	status = "okay";
+};
+
+&usb1 {
+	num-ports = <3>;
+	atmel,vbus-gpio = <0 0 0 >;
+	atmel,id-gpio = <&pioD 11 GPIO_ACTIVE_HIGH 0 0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usb_id>;
+	status = "okay";
+};
+
+&usb2 {
+	status = "okay";
+};
+
+&ebi {
+	pinctrl-0 = <&pinctrl_ebi_cs3 &pinctrl_ebi_nrd_nandoe
+			&pinctrl_ebi_nwe_nandwe &pinctrl_ebi_nandrdy
+			&pinctrl_ebi_data_0_7 &pinctrl_ebi_nand_addr>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&nand_controller {
+	status = "okay";
+	atmel,pmecc-cap = <4>;
+	atmel,pmecc-sector-size = <512>;
+
+	nand@3 {
+		reg = <0x3 0x0 0x2>;
+		atmel,rb = <0>;
+		nand-bus-width = <8>;
+		nand-ecc-mode = "hw";
+		nand-on-flash-bbt;
+		label = "atmel_nand";
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			at91bootstrap@0 {
+				label = "at91bootstrap";
+				reg = <0x0 0x40000>;
+			};
+
+			uboot@40000 {
+				label = "uboot";
+				reg = <0x40000 0xC0000>;
+			};
+
+			env_nand: uboot-env@100000 {
+				label = "uboot-env";
+				reg = <0x100000 0x80000>;
+			};
+
+			ubi@180000 {
+				label = "ubi";
+				reg = <0x180000 0x3FE00000>;
+			};
+		};
+	};
+};
+
+&pinctrl {
+	board {
+		pinctrl_mmc1_cd: mmc1_cd {
+			atmel,pins = <AT91_PIOE 3 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+		};
+		pinctrl_usb_vbus: usb_vbus {
+			atmel,pins = <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+		};
+		pinctrl_usb_id: usb_id {
+			atmel,pins = <AT91_PIOD 11 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+		};
+		pinctrl_mcu_irq: mcu_irq_0 {
+			atmel,pins = <AT91_PIOE 27 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+		};
+		pinctrl_mcu_cpu_state: mcu_cpu_state {
+			atmel,pins = <AT91_PIOA 19 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(1))>;
+		};
+		pinctrl_macb0_phy_irq: macb0_phy_irq_0 {
+			atmel,pins = <AT91_PIOA 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+		};
+		pinctrl_sx130x_rst: sx130x_rst {
+			atmel,pins = <AT91_PIOA 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+		};
+		pinctrl_rf_front_pwr_en: rf_front_pwr_en {
+			atmel,pins = <AT91_PIOA 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+		};
+
+		pinctrl_ext_rst: ext_rst {
+			atmel,pins = <AT91_PIOA 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+		};
+		pinctrl_ext_pwr_en: ext_pwr_en {
+			atmel,pins = <AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_DOWN>;
+		};
+		pinctrl_ext_boot_n: ext_boot_n {
+			atmel,pins = <AT91_PIOD 19 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+		};
+		pinctrl_ext_wake: ext_wake {
+			atmel,pins = <AT91_PIOA 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+		};
+		pinctrl_gnss_pps: gnss_pps {
+			atmel,pins = <AT91_PIOC 24 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
+		};
+	};
+};
diff --git a/configs/platform-v7a/kernelconfig b/configs/platform-v7a/kernelconfig
index 8f78f82e6275..fd1360edf105 100644
--- a/configs/platform-v7a/kernelconfig
+++ b/configs/platform-v7a/kernelconfig
@@ -293,7 +293,7 @@ CONFIG_ARCH_MULTI_V6_V7=y
 CONFIG_ARCH_AT91=y
 CONFIG_SOC_SAMA5D2=y
 # CONFIG_SOC_SAMA5D3 is not set
-# CONFIG_SOC_SAMA5D4 is not set
+CONFIG_SOC_SAMA5D4=y
 # CONFIG_SOC_SAMA7G5 is not set
 # CONFIG_SOC_LAN966 is not set
 
@@ -306,6 +306,7 @@ CONFIG_ATMEL_CLOCKSOURCE_TCB=y
 CONFIG_HAVE_AT91_UTMI=y
 CONFIG_HAVE_AT91_USB_CLK=y
 CONFIG_COMMON_CLK_AT91=y
+CONFIG_HAVE_AT91_SMD=y
 CONFIG_HAVE_AT91_H32MX=y
 CONFIG_HAVE_AT91_GENERATED_CLK=y
 CONFIG_HAVE_AT91_AUDIO_PLL=y
@@ -1331,13 +1332,38 @@ CONFIG_MTD_PHYSMAP_VERSATILE=y
 #
 # NAND
 #
+CONFIG_MTD_NAND_CORE=y
 # CONFIG_MTD_ONENAND is not set
-# CONFIG_MTD_RAW_NAND is not set
+CONFIG_MTD_RAW_NAND=y
+
+#
+# Raw/parallel NAND flash controllers
+#
+# CONFIG_MTD_NAND_DENALI_DT is not set
+# CONFIG_MTD_NAND_OMAP2 is not set
+CONFIG_MTD_NAND_ATMEL=y
+# CONFIG_MTD_NAND_BRCMNAND is not set
+# CONFIG_MTD_NAND_MXC is not set
+# CONFIG_MTD_NAND_MXIC is not set
+# CONFIG_MTD_NAND_STM32_FMC2 is not set
+# CONFIG_MTD_NAND_GPIO is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_NAND_CADENCE is not set
+# CONFIG_MTD_NAND_ARASAN is not set
+# CONFIG_MTD_NAND_INTEL_LGM is not set
+# CONFIG_MTD_NAND_PL35X is not set
+
+#
+# Misc
+#
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_DISKONCHIP is not set
 # CONFIG_MTD_SPI_NAND is not set
 
 #
 # ECC engine support
 #
+CONFIG_MTD_NAND_ECC=y
 # CONFIG_MTD_NAND_ECC_SW_HAMMING is not set
 # CONFIG_MTD_NAND_ECC_SW_BCH is not set
 # CONFIG_MTD_NAND_ECC_MXIC is not set
@@ -1352,7 +1378,12 @@ CONFIG_MTD_PHYSMAP_VERSATILE=y
 # end of LPDDR & LPDDR2 PCM memory drivers
 
 # CONFIG_MTD_SPI_NOR is not set
-# CONFIG_MTD_UBI is not set
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_LIMIT=20
+CONFIG_MTD_UBI_FASTMAP=y
+# CONFIG_MTD_UBI_GLUEBI is not set
+# CONFIG_MTD_UBI_BLOCK is not set
 # CONFIG_MTD_HYPERBUS is not set
 CONFIG_DTC=y
 CONFIG_OF=y
@@ -1370,6 +1401,7 @@ CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
 # CONFIG_BLK_DEV_NULL_BLK is not set
+# CONFIG_ZRAM is not set
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
 # CONFIG_BLK_DEV_DRBD is not set
@@ -1992,7 +2024,7 @@ CONFIG_GENERIC_PINMUX_FUNCTIONS=y
 CONFIG_PINCONF=y
 CONFIG_GENERIC_PINCONF=y
 # CONFIG_DEBUG_PINCTRL is not set
-# CONFIG_PINCTRL_AT91 is not set
+CONFIG_PINCTRL_AT91=y
 CONFIG_PINCTRL_AT91PIO4=y
 # CONFIG_PINCTRL_CY8C95X0 is not set
 # CONFIG_PINCTRL_MCP23S08 is not set
@@ -3548,7 +3580,39 @@ CONFIG_MEMFD_CREATE=y
 CONFIG_CONFIGFS_FS=y
 # end of Pseudo filesystems
 
-# CONFIG_MISC_FILESYSTEMS is not set
+CONFIG_MISC_FILESYSTEMS=y
+# CONFIG_ORANGEFS_FS is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_ECRYPT_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+CONFIG_UBIFS_FS=y
+CONFIG_UBIFS_FS_ADVANCED_COMPR=y
+# CONFIG_UBIFS_FS_LZO is not set
+# CONFIG_UBIFS_FS_ZLIB is not set
+CONFIG_UBIFS_FS_ZSTD=y
+# CONFIG_UBIFS_ATIME_SUPPORT is not set
+CONFIG_UBIFS_FS_XATTR=y
+# CONFIG_UBIFS_FS_SECURITY is not set
+# CONFIG_UBIFS_FS_AUTHENTICATION is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_SQUASHFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX6FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_PSTORE is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_EROFS_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V2=y
@@ -3810,7 +3874,7 @@ CONFIG_CRYPTO_CRC32C=y
 # CONFIG_CRYPTO_842 is not set
 # CONFIG_CRYPTO_LZ4 is not set
 # CONFIG_CRYPTO_LZ4HC is not set
-# CONFIG_CRYPTO_ZSTD is not set
+CONFIG_CRYPTO_ZSTD=y
 # end of Compression
 
 #
@@ -3830,6 +3894,8 @@ CONFIG_CRYPTO_CRC32C=y
 # CONFIG_CRYPTO_USER_API_AEAD is not set
 # end of Userspace interface
 
+CONFIG_CRYPTO_HASH_INFO=y
+
 #
 # Accelerated Cryptographic Algorithms for CPU (arm)
 #
@@ -3943,7 +4009,11 @@ CONFIG_CRC32_SLICEBY8=y
 # CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
 # CONFIG_CRC8 is not set
+CONFIG_XXHASH=y
 # CONFIG_RANDOM32_SELFTEST is not set
+CONFIG_ZSTD_COMMON=y
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
 # CONFIG_XZ_DEC is not set
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_ASSOCIATIVE_ARRAY=y
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 52142dab6e4b..9e6ea531f45e 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -135,7 +135,7 @@ PTXCONF_KERNEL_IMAGE_Z=y
 PTXCONF_KERNEL_IMAGE="zImage"
 PTXCONF_KERNEL_DTB=y
 PTXCONF_KERNEL_DTS_PATH="${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
-PTXCONF_KERNEL_DTS="am335x-bone.dts am335x-boneblack.dts vexpress-v2p-ca9.dts bcm2836-rpi-2-b.dts imx6q-sabrelite.dts imx6sx-udoo-neo-full.dts imx6dl-riotboard.dts imx6q-nitrogen6x.dts imx6qp-nitrogen6_max.dts bcm2837-rpi-3-b.dts bcm2837-rpi-cm3-io3.dts bcm2711-rpi-4-b.dts bcm2711-rpi-400.dts stm32mp157c-dk2.dts stm32mp157c-ev1.dts stm32mp157c-lxa-mc1.dts at91-sama5d27_som1_ek.dts at91-sama5d27_giantboard.dts"
+PTXCONF_KERNEL_DTS="am335x-bone.dts am335x-boneblack.dts vexpress-v2p-ca9.dts bcm2836-rpi-2-b.dts imx6q-sabrelite.dts imx6sx-udoo-neo-full.dts imx6dl-riotboard.dts imx6q-nitrogen6x.dts imx6qp-nitrogen6_max.dts bcm2837-rpi-3-b.dts bcm2837-rpi-cm3-io3.dts bcm2711-rpi-4-b.dts bcm2711-rpi-400.dts stm32mp157c-dk2.dts stm32mp157c-ev1.dts stm32mp157c-lxa-mc1.dts at91-sama5d27_som1_ek.dts at91-sama5d27_giantboard.dts at91-sama5d4_wifx_l1.dts"
 # PTXCONF_KERNEL_DTBO is not set
 # PTXCONF_KERNEL_CODE_SIGNING is not set
 # PTXCONF_KERNEL_ZSTD is not set
-- 
2.39.2




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

* [DistroKit] [PATCH 5/5] v7a: add Wifx L1 SD-Card image
  2023-04-17 13:11 [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1 Ahmad Fatoum
                   ` (3 preceding siblings ...)
  2023-04-17 13:11 ` [DistroKit] [PATCH 4/5] v7a: kernel: " Ahmad Fatoum
@ 2023-04-17 13:11 ` Ahmad Fatoum
  2023-04-17 13:59 ` [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1 Robert Schwebel
  5 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2023-04-17 13:11 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

The Wifx L1 is a SAMA5D4-based LoRaWAN gateway. This commit adds first
support for booting DistroKit on it from SD-Card.

Default boot medium is NAND, but a bootable SD-Card always has precedence
over NAND.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/platformconfig           |  1 +
 .../platforms/image-wifx-l1-sd.in             | 12 +++++++
 .../platform-v7a/rules/image-wifx-l1-sd.make  | 36 +++++++++++++++++++
 doc/hardware.rst                              |  1 +
 doc/hardware_v7a_sama5d4.rst                  | 16 +++++++++
 5 files changed, 66 insertions(+)
 create mode 100644 configs/platform-v7a/platforms/image-wifx-l1-sd.in
 create mode 100644 configs/platform-v7a/rules/image-wifx-l1-sd.make
 create mode 100644 doc/hardware_v7a_sama5d4.rst

diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 9e6ea531f45e..b09c3c77a03e 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -281,6 +281,7 @@ PTXCONF_IMAGE_STM32MP157C_EV1=y
 PTXCONF_IMAGE_UDOO_NEO=y
 PTXCONF_IMAGE_VEXPRESS_NOR=y
 PTXCONF_IMAGE_VEXPRESS=y
+PTXCONF_IMAGE_WIFX_L1_SD=y
 
 #
 # ipkg options                  
diff --git a/configs/platform-v7a/platforms/image-wifx-l1-sd.in b/configs/platform-v7a/platforms/image-wifx-l1-sd.in
new file mode 100644
index 000000000000..7d5938bd44ac
--- /dev/null
+++ b/configs/platform-v7a/platforms/image-wifx-l1-sd.in
@@ -0,0 +1,12 @@
+## SECTION=image
+
+config IMAGE_WIFX_L1_SD
+	tristate
+	select HOST_GENIMAGE
+	select IMAGE_ROOT_EXT
+	select HOST_DOSFSTOOLS
+	select BAREBOX_AT91
+	select AT91BOOTSTRAP2
+	prompt "Generate images/wifx-l1.hdimg (SD-Card)"
+	help
+	  Includes DistroKit support for the Wifx L1 LoRaWAN Gateway.
diff --git a/configs/platform-v7a/rules/image-wifx-l1-sd.make b/configs/platform-v7a/rules/image-wifx-l1-sd.make
new file mode 100644
index 000000000000..3b92a6ed9b3e
--- /dev/null
+++ b/configs/platform-v7a/rules/image-wifx-l1-sd.make
@@ -0,0 +1,36 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Ahmad Fatoum <a.fatoum@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_WIFX_L1_SD) += image-wifx-l1-sd
+
+#
+# Paths and names
+#
+IMAGE_WIFX_L1_SD	:= image-wifx-l1-sd
+IMAGE_WIFX_L1_SD_DIR	:= $(BUILDDIR)/$(IMAGE_WIFX_L1_SD)
+IMAGE_WIFX_L1_SD_IMAGE	:= $(IMAGEDIR)/wifx-l1.hdimg
+IMAGE_WIFX_L1_SD_FILES	:= $(IMAGEDIR)/root.tgz
+IMAGE_WIFX_L1_SD_CONFIG	:= at91-sd.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+IMAGE_WIFX_L1_SD_ENV := \
+        FSBL=at91bootstrap.bin \
+        SSBL=barebox-wifx-l1.img
+
+$(IMAGE_WIFX_L1_SD_IMAGE):
+	@$(call targetinfo)
+	@$(call image/genimage, IMAGE_WIFX_L1_SD)
+	@$(call finish)
+
+# vim: syntax=make
diff --git a/doc/hardware.rst b/doc/hardware.rst
index 0e885db35e18..5c9a0df94634 100644
--- a/doc/hardware.rst
+++ b/doc/hardware.rst
@@ -49,6 +49,7 @@ It supports the following hardware:
    hardware_v7a_raspi23
    hardware_v7a_udoo_neo
    hardware_v7a_sama5d2
+   hardware_v7a_sama5d4
 
 If you want to get DistroKit running on your ARMv7-A board which is not
 listed above, here is a short overview of the generic way:
diff --git a/doc/hardware_v7a_sama5d4.rst b/doc/hardware_v7a_sama5d4.rst
new file mode 100644
index 000000000000..6d371b003f56
--- /dev/null
+++ b/doc/hardware_v7a_sama5d4.rst
@@ -0,0 +1,16 @@
+SAMA5D4 boards
+==============
+
+DistroKit currently supports one SAMA5D4 board:
+
+ * Wifx L1 LoRaWAN Gateway
+
+
+Boot Media
+----------
+
+The L1 will boot from a bootable SD-Card if one is inserted and otherwise
+fall back to booting from NAND flash. DistroKit generates only a SD-Card
+image for now:
+
+ * ``platform-v7a/images/wifx-l1-sd.hdimg``.
-- 
2.39.2




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

* Re: [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1
  2023-04-17 13:11 [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1 Ahmad Fatoum
                   ` (4 preceding siblings ...)
  2023-04-17 13:11 ` [DistroKit] [PATCH 5/5] v7a: add Wifx L1 SD-Card image Ahmad Fatoum
@ 2023-04-17 13:59 ` Robert Schwebel
  5 siblings, 0 replies; 7+ messages in thread
From: Robert Schwebel @ 2023-04-17 13:59 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Mon, Apr 17, 2023 at 03:11:36PM +0200, Ahmad Fatoum wrote:
> The Wifx L1 is a SAMA5D4-based LoRaWAN gateway. This commit adds first
> support for booting DistroKit on it from SD-Card.

Thanks, applied to next.

For changing rules from upstream ptxdist, I prefer one commit that
copies the rule and states in the commit message which version was
copied from, and a 2nd commit that makes the actual change, but I don't
care enough for letting you change it this time.

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



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

end of thread, other threads:[~2023-04-17 13:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17 13:11 [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1 Ahmad Fatoum
2023-04-17 13:11 ` [DistroKit] [PATCH 1/5] at91bootstrap2: make targetinstall v4.x compatible Ahmad Fatoum
2023-04-17 13:11 ` [DistroKit] [PATCH 2/5] v7a: at91bootstrap: configure v4.0.6-rc1 for Wifx L1 Ahmad Fatoum
2023-04-17 13:11 ` [DistroKit] [PATCH 3/5] v7a: barebox: extend support to SAMA5D4-based " Ahmad Fatoum
2023-04-17 13:11 ` [DistroKit] [PATCH 4/5] v7a: kernel: " Ahmad Fatoum
2023-04-17 13:11 ` [DistroKit] [PATCH 5/5] v7a: add Wifx L1 SD-Card image Ahmad Fatoum
2023-04-17 13:59 ` [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1 Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox