Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build-boot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
- nanopi_r2s_boot
- rpi2_boot
- rpi64_boot
- sama7g54_ek_emmc_boot
- sama7g54_ek_sd_boot
env:
MAKEFLAGS: -j5
steps:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- raspberrypi-rpi64
- bananapi-bpi-r3
- friendlyarm-nanopi-r2s
- microchip-sama7g54-ek
default: 'raspberrypi-rpi64'

jobs:
Expand Down Expand Up @@ -71,6 +72,12 @@ jobs:
echo "ARCH=aarch64" >> $GITHUB_ENV
echo "BUILD_EMMC=false" >> $GITHUB_ENV
;;
microchip-sama7g54-ek)
echo "BOOTLOADER_SD=sama7g54-ek-sd-boot" >> $GITHUB_ENV
echo "BOOTLOADER_EMMC=sama7g54-ek-emmc-boot" >> $GITHUB_ENV
echo "ARCH=arm" >> $GITHUB_ENV
echo "BUILD_EMMC=true" >> $GITHUB_ENV
;;
*)
echo "Error: Unknown board ${{ inputs.board }}"
exit 1
Expand Down
1 change: 1 addition & 0 deletions board/arm/Config.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
if BR2_arm

source "$BR2_EXTERNAL_INFIX_PATH/board/arm/microchip-sama7g54-ek/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/arm/raspberrypi-rpi2/Config.in"

endif
7 changes: 7 additions & 0 deletions board/arm/microchip-sama7g54-ek/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
config BR2_PACKAGE_MICROCHIP_SAMA7G54_EK
bool "Microchip SAMA7G54-EK Evaluation Kit"
depends on BR2_arm
select SDCARD_AUX
help
Support for the Microchip SAMA7G54 Evaluation Kit featuring
a Cortex-A7 processor with MACB Gigabit Ethernet and MMC storage.
13 changes: 13 additions & 0 deletions board/arm/microchip-sama7g54-ek/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2026 The KernelKit Authors

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
116 changes: 116 additions & 0 deletions board/arm/microchip-sama7g54-ek/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
Microchip SAMA7G54-EK
=====================

The [SAMA7G54-EK][1] is an evaluation kit for the Microchip SAMA7G5 series,
featuring an ARM Cortex-A7 processor @ 800 MHz with 512 MB DDR3L RAM.

The board features:

- 2x MACB Gigabit Ethernet ports
- 8 GB eMMC (SDMMC0) + microSD card slot (SDMMC1)
- QSPI NOR flash
- USB 2.0 host ports
- CAN bus interfaces
- Flexcom serial ports (UART, SPI, I2C)

How to Build
------------

Since there are no pre-built images for ARM 32-bit, you need to build
both Infix and the bootloader from source.

### SD Card

1. Build the bootloader

make O=x-boot-sama7g54 sama7g54_ek_sd_boot_defconfig
make O=x-boot-sama7g54

2. Build Infix

make O=x-arm arm_defconfig
make O=x-arm

3. Create the SD card image

./utils/mkimage.sh -b x-boot-sama7g54 -r x-arm microchip-sama7g54-ek

### eMMC

1. Build the bootloader

make O=x-boot-sama7g54-emmc sama7g54_ek_emmc_boot_defconfig
make O=x-boot-sama7g54-emmc

2. Build Infix (same as above, skip if already built)

make O=x-arm arm_defconfig
make O=x-arm

3. Create the eMMC image

./utils/mkimage.sh -b x-boot-sama7g54-emmc -r x-arm -t emmc microchip-sama7g54-ek

Flashing to SD Card
-------------------

[Flash the image][0] to a microSD card (at least 2 GB):

```bash
sudo dd if=x-boot-sama7g54/images/infix-arm-sdcard.img of=/dev/sdX \
bs=1M status=progress oflag=direct
```

You can also use `bmaptool` for faster writes:

```bash
sudo bmaptool copy x-boot-sama7g54/images/infix-arm-sdcard.img /dev/sdX
```

> [!WARNING]
> Ensure `/dev/sdX` is the correct device for your SD card and not used
> by the host system! Use `lsblk` to verify.

Flashing to eMMC
-----------------

The SAMA7G5EK has an on-board 8 GB eMMC (SDMMC0/mmc0). Jumper J22
controls if booting from onboard storage is allowed or not; open means
allowed. When open, the SW4 button can also prevent booting from eMMC
if held at power on.

The easiest method is to flash from a running SD card system:

1. Boot the board from SD card
2. Transfer the eMMC image to the board (USB drive, network, etc.)
3. Flash the eMMC:

sudo bmaptool copy emmc.img /dev/mmcblk0

4. Power off, remove SD card, and boot from eMMC

Booting the Board
-----------------

1. Insert the flashed SD card (or ensure eMMC is flashed)
2. Connect an Ethernet cable
3. Power up the board
4. Find the assigned IP and SSH in, default login: `admin` / `admin`

Console Port
------------

The debug console is on Flexcom3 (active by default):

- Baud rate: 115200
- Data bits: 8
- Parity: None
- Stop bits: 1

Connect a USB-to-serial adapter to the board's debug UART header.

> [!WARNING]
> Use only 3.3V serial adapters.

[0]: https://kernelkit.org/posts/flashing-sdcard/
[1]: https://www.microchip.com/en-us/development-tool/EV21H18A
1 change: 1 addition & 0 deletions board/arm/microchip-sama7g54-ek/dts/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dtb-y += microchip/at91-sama7g5ek.dtb
18 changes: 18 additions & 0 deletions board/arm/microchip-sama7g54-ek/dts/microchip/at91-sama7g5ek.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Infix OS device tree for Microchip SAMA7G5 Evaluation Kit
*/

#include <arm/microchip/at91-sama7g5ek.dts>
#include "infix.dtsi"

/ {
chosen {
stdout-path = "serial0:115200n8";
};
};

/* Thermal sensor disabled until OTP is calibrated */
&thermal_sensor {
status = "disabled";
};
13 changes: 13 additions & 0 deletions board/arm/microchip-sama7g54-ek/dts/microchip/infix.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Common Infix OS defaults
*/

/ {
chosen {
infix {
/* Default admin user password: 'admin' */
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
};
};
};
85 changes: 85 additions & 0 deletions board/arm/microchip-sama7g54-ek/genimage.cfg.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Disk image for Microchip SAMA7G5EK (sama7g5 evaluation kit)

image boot.vfat {
vfat {
files = {
"boot.bin",
"u-boot.bin"
}
}

size = 16M
}

image cfg.ext4 {
empty = true
temporary = true
size = 16M

ext4 {
label = "cfg"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}

# The /var partition will be expanded automatically at first boot
# to use the full size of the SD-card or eMMC media.
image var.ext4 {
empty = true
temporary = true
size = 128M

ext4 {
label = "var"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}

image #INFIX_ID##VERSION#-sama7g54-ek-#TARGET#.img {
hdimage {
partition-table-type = "hybrid"
}

partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
offset = 1M
}

partition aux {
partition-uuid = D4EF35A0-0652-45A1-B3DE-D63339C82035
image = "aux.ext4"
}

partition primary {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
bootable = true
size = 250M
image = "rootfs.squashfs"
}

partition secondary {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
bootable = true
size = 250M
image = "rootfs.squashfs"
}

partition cfg {
partition-uuid = 7aa497f0-73b5-47e5-b2ab-8752d8a48105
image = "cfg.ext4"
}

partition var {
partition-uuid = 8046A06A-E45A-4A14-A6AD-6684704A393F
image = "var.ext4"
}
}

# Silence genimage warnings
config {}
69 changes: 69 additions & 0 deletions board/arm/microchip-sama7g54-ek/microchip-sama7g54-ek.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Microchip SAMA7G54-EK kernel configuration fixups
define MICROCHIP_SAMA7G54_EK_LINUX_CONFIG_FIXUPS
# AT91/Microchip SoC
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_AT91)
$(call KCONFIG_ENABLE_OPT,CONFIG_SOC_SAMA7G5)
$(call KCONFIG_ENABLE_OPT,CONFIG_ATMEL_CLOCKSOURCE_TCB)

# Serial console (FLEXCOM)
# Use ttyAT naming to avoid major/minor conflict with the
# 8250 driver (needed by Raspberry Pi 2 in the shared ARM config)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_ATMEL)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_ATMEL_CONSOLE)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_ATMEL_TTYAT)
$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_ATMEL_FLEXCOM)

# Network: MACB Ethernet
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_MICROCHIP)
$(call KCONFIG_ENABLE_OPT,CONFIG_MACB)
$(call KCONFIG_ENABLE_OPT,CONFIG_MICREL_PHY)

# MMC/SD
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_SDHCI)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_SDHCI_PLTFM)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_SDHCI_OF_AT91)

# Pin control and GPIO
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_AT91)
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_AT91PIO4)
$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_SYSFS)

# I2C and SPI
$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_AT91)
$(call KCONFIG_ENABLE_OPT,CONFIG_SPI_ATMEL)
$(call KCONFIG_ENABLE_OPT,CONFIG_SPI_ATMEL_QUADSPI)

# Power management and reset
$(call KCONFIG_ENABLE_OPT,CONFIG_POWER_RESET)
$(call KCONFIG_ENABLE_OPT,CONFIG_POWER_RESET_AT91_RESET)
$(call KCONFIG_ENABLE_OPT,CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC)

# Watchdog
$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG)
$(call KCONFIG_ENABLE_OPT,CONFIG_SAMA5D4_WATCHDOG)

# DMA and RTC
$(call KCONFIG_ENABLE_OPT,CONFIG_AT_XDMAC)
$(call KCONFIG_ENABLE_OPT,CONFIG_RTC_CLASS)
$(call KCONFIG_ENABLE_OPT,CONFIG_RTC_DRV_AT91SAM9)

# Crypto hardware acceleration
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_DEV_ATMEL_AES)
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_DEV_ATMEL_TDES)
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_DEV_ATMEL_SHA)

# USB Host
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_EHCI_HCD)
$(call KCONFIG_ENABLE_OPT,CONFIG_USB_OHCI_HCD)

# Regulators
$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR)
$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR_FIXED_VOLTAGE)
$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR_MCP16502)

# NVMEM for OTP
$(call KCONFIG_ENABLE_OPT,CONFIG_NVMEM_MICROCHIP_OTPC)
endef

$(eval $(ix-board))
$(eval $(generic-package))
12 changes: 12 additions & 0 deletions board/arm/microchip-sama7g54-ek/rootfs/etc/rauc/system.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[system]
compatible=infix-sama7g54-ek
bootloader=uboot
statusfile=/mnt/aux/rauc.status

[slot.rootfs.0]
device=/dev/disk/by-partlabel/primary
bootname=primary

[slot.rootfs.1]
device=/dev/disk/by-partlabel/secondary
bootname=secondary
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"@ethtool:driver=macb": {
"broken-flow-control": true
}
}
1 change: 1 addition & 0 deletions board/arm/microchip-sama7g54-ek/uboot/emmc-extras.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_DEVICE_TREE_INCLUDES="infix-env.dtsi infix-key.dtsi sama7g54-ek-env-emmc.dtsi"
Loading
Loading