board: add support for Acme Systems Acqua A5
PATCH 1/1 board: add support for Acme Systems Acqua A5
The Acqua A5 is a system on module based on the Microchip SAMA5D31 SoC:
https://www.acmesystems.it/acqua
It is available in both 256 MiB and 512 MiB versions, hence the two defconfig files. These configs build microSD card images with:
- AT91Bootstrap 3
- Linux 5.4.107
- default buildroot packages (uClibc, Busybox)
The device tree blob comes from Acme Systems:
https://github.com/AcmeSystems/dts-archive
It is licensed under GPLv2 or later.
--- .../acqua-a5/at91-sama5d3_acqua.dts | 301 ++++++++++++++++++ board/acmesystems/acqua-a5/genimage.cfg | 28 ++ board/acmesystems/acqua-a5/readme.txt | 44 +++ configs/acmesystems_acqua_a5_256mb_defconfig | 20 ++ configs/acmesystems_acqua_a5_512mb_defconfig | 20 ++ 5 files changed, 413 insertions(+) create mode 100644 board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts create mode 100644 board/acmesystems/acqua-a5/genimage.cfg create mode 100644 board/acmesystems/acqua-a5/readme.txt create mode 100644 configs/acmesystems_acqua_a5_256mb_defconfig create mode 100644 configs/acmesystems_acqua_a5_512mb_defconfig
board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts new file +301 -0
@@ -0,0 +1,301 @@ +/* + * acme-acqua.dts - Device Tree file for Acqua A5 Board + * + * Copyright (C) 2014 Atmel, + * 2014 Nicolas Ferre <[email protected]> + * + * 2020 Sergio Tanzilli <[email protected]> + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "sama5d31.dtsi" + +/ { + model = "Acme Systems Acqua SOM"; + compatible = "acme,acqua", "atmel,sama5d3", "atmel,sama5"; + + chosen { + stdout-path = "serial0:115200n8"; + bootargs = "mem=256M console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait consoleblank=0"; + }; + + memory { + reg = <0x20000000 0x10000000>; + }; + + clocks { + slow_xtal { + clock-frequency = <32768>; + }; + + main_xtal { + clock-frequency = <12000000>; + }; + }; + + ahb { + apb { + hlcdc: hlcdc at f0030000 { + status = "disabled"; + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888_alt>; + port at 0 { + hlcdc_panel_output: endpoint at 0 { + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + + /* MicroSD mounted on the SOM */ + + mmc0: mmc at f0000000 { + pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>; + status = "okay"; + slot at 0 { + reg = <0>; + bus-width = <4>; + }; + }; + + /* Optional MicroSD to mount on the carrier board */ + + mmc1: mmc at f8000000 { + pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>; + status = "disabled"; + slot at 0 { + reg = <0>; + bus-width = <4>; + cd-gpios = <&pioE 1 GPIO_ACTIVE_LOW>; + }; + }; + + spi0: spi at f0004000 { + cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>; + status = "disabled"; + }; + + can0: can at f000c000 { + status = "disabled"; + }; + + tcb0: timer at f0010000 { + timer0: timer at 0 { + compatible = "atmel,tcb-timer"; + reg = <0>; + }; + + timer1: timer at 1 { + compatible = "atmel,tcb-timer"; + reg = <1>; + }; + }; + + i2c0: i2c at f0014000 { + pinctrl-0 = <&pinctrl_i2c0_pu>; + status = "disabled"; + }; + + i2c1: i2c at f0018000 { + status = "disabled"; + }; + + macb1: ethernet at f802c000 { + compatible = "atmel,sama5d3-macb", "cdns,at91sam9260-macb", "cdns,macb"; + + status = "okay"; + phy-mode = "rmii"; + #address-cells = <1>; + #size-cells = <0>; + + nvmem-cells = <ð0_addr>; + nvmem-cell-names = "mac-address"; + + phy0: ethernet-phy at 1 { + interrupt-parent = <&pioE>; + interrupts = <30 IRQ_TYPE_EDGE_FALLING>; + reg = <1>; + }; + + /*ethernet-phy at 1 { + reg = <0x1>; + };*/ + }; + + /* Bit banging internal I2C to manage the AT24MAC402 chip */ + + i2c3@ { + compatible = "i2c-gpio"; + gpios = <&pioE 1 0 /* SDA */ + &pioE 2 0 /* SCK */ + >; + i2c-gpio,delay-us = <4>; /* ~178 kHz */ + #address-cells = <1>; + #size-cells = <0>; + + /* EEPROM contains the eth0 MAC address */ + + eeprom at 58 { + compatible = "atmel,24mac402"; + pagesize = <256>; + read-only; + reg = <0x58>; + #address-cells = <1>; + #size-cells = <1>; + + eth0_addr: eth-mac-addr at 9A { + reg = <0x0 0x06>; + }; + }; + }; + + pwm0: pwm at f002c000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm0_pwmh0_0 &pinctrl_pwm0_pwmh1_0>; + status = "disabled"; + }; + + usart0: serial at f001c000 { + status = "okay"; + }; + + usart1: serial at f0020000 { + pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>; + status = "disabled"; + }; + + uart0: serial at f0024000 { + status = "disabled"; + }; + + + spi1: spi at f8008000 { + cs-gpios = <&pioC 25 0>; + status = "disabled"; + }; + + adc0: adc at f8018000 { + atmel,adc-vref = <3300>; + atmel,adc-channels-used = <0xfe>; + pinctrl-0 = < + &pinctrl_adc0_adtrg + &pinctrl_adc0_ad1 + &pinctrl_adc0_ad2 + &pinctrl_adc0_ad3 + &pinctrl_adc0_ad4 + &pinctrl_adc0_ad5 + &pinctrl_adc0_ad6 + &pinctrl_adc0_ad7 + >; + status = "disabled"; + }; + + i2c2: i2c at f801c000 { + dmas = <0>, <0>; /* Do not use DMA for i2c2 */ + pinctrl-0 = <&pinctrl_i2c2_pu>; + status = "disabled"; + }; + + + dbgu: serial at ffffee00 { + status = "okay"; + }; + + pinctrl at fffff200 { + board { + pinctrl_i2c0_pu: i2c0_pu { + atmel,pins = + <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>, + <AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; + }; + + pinctrl_i2c2_pu: i2c2_pu { + atmel,pins = + <AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>, + <AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; + }; + + pinctrl_key_gpio: key_gpio_0 { + atmel,pins = + <AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; + }; + + pinctrl_mmc0_cd: mmc0_cd { + atmel,pins = + <AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; + }; + + pinctrl_mmc1_cd: mmc1_cd { + atmel,pins = + <AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; + }; + + pinctrl_usba_vbus: usba_vbus { + atmel,pins = + <AT91_PIOE 9 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PE9, conflicts with A9 */ + }; + }; + }; + }; + + usb0: gadget at 500000 { + status = "okay"; + }; + + usb1: ohci at 600000 { + status = "okay"; + }; + + usb2: ehci at 700000 { + status = "okay"; + }; + + }; + + + panel: panel { + /* compatible = "acme,43inch", "simple-panel"; */ + compatible = "acme,50inch", "simple-panel"; + /* compatible = "acme,70inch", "simple-panel"; */ + + status = "disable"; + + port at 0 { + panel_input: endpoint at 0 { + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; + + + leds { + compatible = "gpio-leds"; + + led0 { + label = "led0"; + gpios = <&pioE 3 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + led1 { + label = "led1"; + gpios = <&pioE 4 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + led2 { + label = "led2"; + gpios = <&pioE 5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + }; + + led3 { + label = "led3"; + gpios = <&pioE 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "mmc0"; + default-state = "off"; + }; + }; +};
board/acmesystems/acqua-a5/genimage.cfg new file +28 -0
@@ -0,0 +1,28 @@ +# Minimal SD card image for the Acme Systems Acqua A5 + +image boot.vfat { + vfat { + files = { + "boot.bin", + "zImage", + "at91-sama5d3_acqua.dtb" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +}
board/acmesystems/acqua-a5/readme.txt new file +44 -0
44 lines not on this page · raw message
configs/acmesystems_acqua_a5_256mb_defconfig new file +20 -0
@@ -0,0 +1,20 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/acqua-a5/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.107" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="acqua-256m" +BR2_PACKAGE_HOST_GENIMAGE=y
configs/acmesystems_acqua_a5_512mb_defconfig new file +20 -0
@@ -0,0 +1,20 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_INSTRUCTIONS_THUMB2=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/acqua-a5/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.107" +BR2_LINUX_KERNEL_DEFCONFIG="sama5" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_AT91BOOTSTRAP3=y +BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="acqua-512m" +BR2_PACKAGE_HOST_GENIMAGE=y
Signature · 1 line
2.25.1
PATCH 1/1 board: add support for Acme Systems Acqua A5
Hello Edgar,
Thanks a lot for this contribution!
Quoted 11 lines · On Mon, 22 Mar 2021 18:14:24 +0100 Edgar Bonet <[email protected]> wrote:
The Acqua A5 is a system on module based on the Microchip SAMA5D31 SoC:
https://www.acmesystems.it/acqua
It is available in both 256 MiB and 512 MiB versions, hence the two defconfig files. These configs build microSD card images with:
- AT91Bootstrap 3
- Linux 5.4.107
- default buildroot packages (uClibc, Busybox)
Quoted 5 lines
The device tree blob comes from Acme Systems:
https://github.com/AcmeSystems/dts-archive
It is licensed under GPLv2 or later.
It is a bit annoying that we have to include the .dts directly in Buildroot, but it seems easier than creating a package for just downloading this Device Tree file, so I've kept your solution there.
Quoted 9 lines
Signed-off-by Edgar Bonet <[email protected]>--- .../acqua-a5/at91-sama5d3_acqua.dts | 301 ++++++++++++++++++ board/acmesystems/acqua-a5/genimage.cfg | 28 ++ board/acmesystems/acqua-a5/readme.txt | 44 +++ configs/acmesystems_acqua_a5_256mb_defconfig | 20 ++ configs/acmesystems_acqua_a5_512mb_defconfig | 20 ++ 5 files changed, 413 insertions(+)
And entry in the DEVELOPERS file was missing, so I've added that.
Quoted 1 line
+BR2_PACKAGE_HOST_GENIMAGE=y
This is not sufficient for your genimage configuration, you also need:
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_MTOOLS=y
since you have a FAT partition.
I've fixed those two minor issues, and applied your patch to our master branch. Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com