Skip to content

Commit f708f9b

Browse files
authored
Merge pull request #1397 from kernelkit/sama7g54
Add support for Microchip SamA7G54 Eval Kit Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2 parents b691868 + 055c8dd commit f708f9b

26 files changed

Lines changed: 632 additions & 67 deletions

.github/workflows/build-boot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
- nanopi_r2s_boot
2525
- rpi2_boot
2626
- rpi64_boot
27+
- sama7g54_ek_emmc_boot
28+
- sama7g54_ek_sd_boot
2729
env:
2830
MAKEFLAGS: -j5
2931
steps:

.github/workflows/build-image.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- raspberrypi-rpi64
1313
- bananapi-bpi-r3
1414
- friendlyarm-nanopi-r2s
15+
- microchip-sama7g54-ek
1516
default: 'raspberrypi-rpi64'
1617

1718
jobs:
@@ -71,6 +72,12 @@ jobs:
7172
echo "ARCH=aarch64" >> $GITHUB_ENV
7273
echo "BUILD_EMMC=false" >> $GITHUB_ENV
7374
;;
75+
microchip-sama7g54-ek)
76+
echo "BOOTLOADER_SD=sama7g54-ek-sd-boot" >> $GITHUB_ENV
77+
echo "BOOTLOADER_EMMC=sama7g54-ek-emmc-boot" >> $GITHUB_ENV
78+
echo "ARCH=arm" >> $GITHUB_ENV
79+
echo "BUILD_EMMC=true" >> $GITHUB_ENV
80+
;;
7481
*)
7582
echo "Error: Unknown board ${{ inputs.board }}"
7683
exit 1

board/arm/Config.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
if BR2_arm
22

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

56
endif
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
config BR2_PACKAGE_MICROCHIP_SAMA7G54_EK
2+
bool "Microchip SAMA7G54-EK Evaluation Kit"
3+
depends on BR2_arm
4+
select SDCARD_AUX
5+
help
6+
Support for the Microchip SAMA7G54 Evaluation Kit featuring
7+
a Cortex-A7 processor with MACB Gigabit Ethernet and MMC storage.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) 2026 The KernelKit Authors
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted, provided that the above
5+
copyright notice and this permission notice appear in all copies.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
Microchip SAMA7G54-EK
2+
=====================
3+
4+
The [SAMA7G54-EK][1] is an evaluation kit for the Microchip SAMA7G5 series,
5+
featuring an ARM Cortex-A7 processor @ 800 MHz with 512 MB DDR3L RAM.
6+
7+
The board features:
8+
9+
- 2x MACB Gigabit Ethernet ports
10+
- 8 GB eMMC (SDMMC0) + microSD card slot (SDMMC1)
11+
- QSPI NOR flash
12+
- USB 2.0 host ports
13+
- CAN bus interfaces
14+
- Flexcom serial ports (UART, SPI, I2C)
15+
16+
How to Build
17+
------------
18+
19+
Since there are no pre-built images for ARM 32-bit, you need to build
20+
both Infix and the bootloader from source.
21+
22+
### SD Card
23+
24+
1. Build the bootloader
25+
26+
make O=x-boot-sama7g54 sama7g54_ek_sd_boot_defconfig
27+
make O=x-boot-sama7g54
28+
29+
2. Build Infix
30+
31+
make O=x-arm arm_defconfig
32+
make O=x-arm
33+
34+
3. Create the SD card image
35+
36+
./utils/mkimage.sh -b x-boot-sama7g54 -r x-arm microchip-sama7g54-ek
37+
38+
### eMMC
39+
40+
1. Build the bootloader
41+
42+
make O=x-boot-sama7g54-emmc sama7g54_ek_emmc_boot_defconfig
43+
make O=x-boot-sama7g54-emmc
44+
45+
2. Build Infix (same as above, skip if already built)
46+
47+
make O=x-arm arm_defconfig
48+
make O=x-arm
49+
50+
3. Create the eMMC image
51+
52+
./utils/mkimage.sh -b x-boot-sama7g54-emmc -r x-arm -t emmc microchip-sama7g54-ek
53+
54+
Flashing to SD Card
55+
-------------------
56+
57+
[Flash the image][0] to a microSD card (at least 2 GB):
58+
59+
```bash
60+
sudo dd if=x-boot-sama7g54/images/infix-arm-sdcard.img of=/dev/sdX \
61+
bs=1M status=progress oflag=direct
62+
```
63+
64+
You can also use `bmaptool` for faster writes:
65+
66+
```bash
67+
sudo bmaptool copy x-boot-sama7g54/images/infix-arm-sdcard.img /dev/sdX
68+
```
69+
70+
> [!WARNING]
71+
> Ensure `/dev/sdX` is the correct device for your SD card and not used
72+
> by the host system! Use `lsblk` to verify.
73+
74+
Flashing to eMMC
75+
-----------------
76+
77+
The SAMA7G5EK has an on-board 8 GB eMMC (SDMMC0/mmc0). Jumper J22
78+
controls if booting from onboard storage is allowed or not; open means
79+
allowed. When open, the SW4 button can also prevent booting from eMMC
80+
if held at power on.
81+
82+
The easiest method is to flash from a running SD card system:
83+
84+
1. Boot the board from SD card
85+
2. Transfer the eMMC image to the board (USB drive, network, etc.)
86+
3. Flash the eMMC:
87+
88+
sudo bmaptool copy emmc.img /dev/mmcblk0
89+
90+
4. Power off, remove SD card, and boot from eMMC
91+
92+
Booting the Board
93+
-----------------
94+
95+
1. Insert the flashed SD card (or ensure eMMC is flashed)
96+
2. Connect an Ethernet cable
97+
3. Power up the board
98+
4. Find the assigned IP and SSH in, default login: `admin` / `admin`
99+
100+
Console Port
101+
------------
102+
103+
The debug console is on Flexcom3 (active by default):
104+
105+
- Baud rate: 115200
106+
- Data bits: 8
107+
- Parity: None
108+
- Stop bits: 1
109+
110+
Connect a USB-to-serial adapter to the board's debug UART header.
111+
112+
> [!WARNING]
113+
> Use only 3.3V serial adapters.
114+
115+
[0]: https://kernelkit.org/posts/flashing-sdcard/
116+
[1]: https://www.microchip.com/en-us/development-tool/EV21H18A
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dtb-y += microchip/at91-sama7g5ek.dtb
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Infix OS device tree for Microchip SAMA7G5 Evaluation Kit
4+
*/
5+
6+
#include <arm/microchip/at91-sama7g5ek.dts>
7+
#include "infix.dtsi"
8+
9+
/ {
10+
chosen {
11+
stdout-path = "serial0:115200n8";
12+
};
13+
};
14+
15+
/* Thermal sensor disabled until OTP is calibrated */
16+
&thermal_sensor {
17+
status = "disabled";
18+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Common Infix OS defaults
4+
*/
5+
6+
/ {
7+
chosen {
8+
infix {
9+
/* Default admin user password: 'admin' */
10+
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
11+
};
12+
};
13+
};
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Disk image for Microchip SAMA7G5EK (sama7g5 evaluation kit)
2+
3+
image boot.vfat {
4+
vfat {
5+
files = {
6+
"boot.bin",
7+
"u-boot.bin"
8+
}
9+
}
10+
11+
size = 16M
12+
}
13+
14+
image cfg.ext4 {
15+
empty = true
16+
temporary = true
17+
size = 16M
18+
19+
ext4 {
20+
label = "cfg"
21+
use-mke2fs = true
22+
features = "uninit_bg"
23+
extraargs = "-m 0 -i 4096"
24+
}
25+
}
26+
27+
# The /var partition will be expanded automatically at first boot
28+
# to use the full size of the SD-card or eMMC media.
29+
image var.ext4 {
30+
empty = true
31+
temporary = true
32+
size = 128M
33+
34+
ext4 {
35+
label = "var"
36+
use-mke2fs = true
37+
features = "uninit_bg"
38+
extraargs = "-m 0 -i 4096"
39+
}
40+
}
41+
42+
image #INFIX_ID##VERSION#-sama7g54-ek-#TARGET#.img {
43+
hdimage {
44+
partition-table-type = "hybrid"
45+
}
46+
47+
partition boot {
48+
partition-type = 0xC
49+
bootable = "true"
50+
image = "boot.vfat"
51+
offset = 1M
52+
}
53+
54+
partition aux {
55+
partition-uuid = D4EF35A0-0652-45A1-B3DE-D63339C82035
56+
image = "aux.ext4"
57+
}
58+
59+
partition primary {
60+
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
61+
bootable = true
62+
size = 250M
63+
image = "rootfs.squashfs"
64+
}
65+
66+
partition secondary {
67+
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
68+
bootable = true
69+
size = 250M
70+
image = "rootfs.squashfs"
71+
}
72+
73+
partition cfg {
74+
partition-uuid = 7aa497f0-73b5-47e5-b2ab-8752d8a48105
75+
image = "cfg.ext4"
76+
}
77+
78+
partition var {
79+
partition-uuid = 8046A06A-E45A-4A14-A6AD-6684704A393F
80+
image = "var.ext4"
81+
}
82+
}
83+
84+
# Silence genimage warnings
85+
config {}

0 commit comments

Comments
 (0)