summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hatch <jhatch@multitech.com>2021-05-13 17:49:54 -0500
committerJeff Hatch <jhatch@multitech.com>2021-05-13 17:49:54 -0500
commitbe52481045c3c8ae1336b701e25412d6f6594670 (patch)
tree337422e5186ba09ac091e75c256704227fd6b478
parent6238d429a8bf2008602e46dc515aa42e34a08e1e (diff)
parentc797a01598b0298e84678f349bc6b1d6803ce67a (diff)
downloadmeta-multitech-atmel-be52481045c3c8ae1336b701e25412d6f6594670.tar.gz
meta-multitech-atmel-be52481045c3c8ae1336b701e25412d6f6594670.tar.bz2
meta-multitech-atmel-be52481045c3c8ae1336b701e25412d6f6594670.zip
Merge branch 'mtre-dunfell' into 'dunfell'
Add MTRE support See merge request !12
-rw-r--r--conf/machine/mtre.conf44
-rw-r--r--recipes-bsp/at91bootstrap/at91bootstrap.inc6
-rw-r--r--recipes-bsp/u-boot/u-boot-2016.09.01/mtre.patch259
-rw-r--r--recipes-bsp/u-boot/u-boot_2016.09.01.bb3
-rw-r--r--recipes-kernel/linux/crypto.inc4
-rw-r--r--recipes-kernel/linux/driver.inc2
-rw-r--r--recipes-kernel/linux/linux-at91-4.9.87/defconfig4
-rw-r--r--recipes-kernel/linux/linux-at91-4.9.87/mtre/linux-4.9-mtre-device-tree.patch517
-rw-r--r--recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtre.dts1476
-rw-r--r--recipes-kernel/linux/linux-at91_4.9.87.bb7
-rw-r--r--recipes-kernel/linux/linux-at91_5.4.81.bb10
-rw-r--r--recipes-kernel/linux/net.inc4
-rw-r--r--recipes-kernel/vizzini/vizzini-1.1/vizzini-1.1-ledrtig.patch117
-rw-r--r--recipes-kernel/vizzini/vizzini_1.1.bb2
14 files changed, 2450 insertions, 5 deletions
diff --git a/conf/machine/mtre.conf b/conf/machine/mtre.conf
new file mode 100644
index 0000000..8e588f8
--- /dev/null
+++ b/conf/machine/mtre.conf
@@ -0,0 +1,44 @@
+#@TYPE: Machine
+#@Name: Multi-Tech MTRE
+#@DESCRIPTION: Machine configuration for the MTRE hardware
+
+require conf/machine/include/tune-arm926ejs.inc
+
+MACHINE_FEATURES = "ext2 ext3 usbhost usbgadget ppp"
+PREFERRED_PROVIDER_virtual/kernel = "linux-at91"
+PREFERRED_VERSION_linux = "4.9.%"
+
+MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "kernel-module-vizzini"
+PREFERRED_VERSION_kernel-module-vizzini ?= "1.1"
+
+DEFAULTTUNE = "arm926ejs"
+TUNE_CCARGS = " -march=armv5te -marm -mthumb-interwork -mtune=arm926ej-s"
+TUNE_FEATURES = "arm armv5 thumb dsp arm926ejs"
+ARMPKGSFX_THUMB="t"
+
+# used by sysvinit_2
+SERIAL_CONSOLES = "115200;ttyS0"
+#don't try to access tty1
+USE_VT = "0"
+
+UBOOT_MACHINE = "at91sam9x5ek_nandflash_config"
+PREFERRED_VERSION_u-boot = "2016.09.01"
+
+AT91BOOTSTRAP_BOARD = "at91sam9x5eknf_uboot"
+PREFERRED_VERSION_at91bootstrap = "3.8.12"
+
+KERNEL_IMAGETYPE = "uImage"
+# remove kernel-image from rootfs by overriding kernel-base DEPS
+RDEPENDS_kernel-base = ""
+
+EXTRA_IMAGEDEPENDS += "at91bootstrap u-boot"
+
+IMAGE_FSTYPES =+ "jffs2 tar.gz"
+EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x20000 --pagesize=0x800 -n"
+
+UBOOT_ENTRYPOINT = "0x20008000"
+UBOOT_LOADADDRESS = "0x20008000"
+
+PRINC ?= "0"
+
+PACKAGECONFIG_append_pn-boost = " python"
diff --git a/recipes-bsp/at91bootstrap/at91bootstrap.inc b/recipes-bsp/at91bootstrap/at91bootstrap.inc
index 25d72ee..07dfda4 100644
--- a/recipes-bsp/at91bootstrap/at91bootstrap.inc
+++ b/recipes-bsp/at91bootstrap/at91bootstrap.inc
@@ -31,6 +31,10 @@ SRC_URI_append_mtrv1 = " file://0001-mtrv1-DDRlowDriveStrength.patch \
SRC_URI_append_mtr = " file://defconfig.mtr \
file://0005-at91bootstrap-3.8-mtr.patch \
"
+SRC_URI_append_mtre = " file://0001-mtrv1-DDRlowDriveStrength.patch \
+ file://defconfig.mtr \
+ file://0005-at91bootstrap-3.8-mtr.patch \
+"
SRC_URI_append_mtcdt = " file://0005-at91bootstrap-3.8-mtcdt.patch "
SRC_URI_append_mtcap = " file://0005-at91bootstrap-3.8-mtcap.patch "
@@ -78,7 +82,7 @@ do_configure() {
# Copy defconfig to .config if .config does not exist. This allows
# recipes to manage the .config themselves in do_configure_prepend()
# and to override default settings with a custom file.
- if [[ ${MACHINE} == mtr ]] || [[ ${MACHINE} == mtrv1 ]] ; then
+ if [[ ${MACHINE} == mtr ]] || [[ ${MACHINE} == mtrv1 ]] || [[ ${MACHINE} == mtre ]] ; then
CTYPE=".mtr"
fi
diff --git a/recipes-bsp/u-boot/u-boot-2016.09.01/mtre.patch b/recipes-bsp/u-boot/u-boot-2016.09.01/mtre.patch
new file mode 100644
index 0000000..887a6bc
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-2016.09.01/mtre.patch
@@ -0,0 +1,259 @@
+diff -raNu a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c
+--- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c 2016-09-19 17:45:12.000000000 +0300
++++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c 2021-01-12 17:40:47.185029658 +0200
+@@ -44,7 +44,8 @@
+ csa = readl(&matrix->ebicsa);
+ csa |= AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA;
+ /* NAND flash on D16 */
+- csa |= AT91_MATRIX_NFD0_ON_D16;
++ /* MTR: nand flash is set up by bootstrap, so leave it alone here */
++ /* csa |= AT91_MATRIX_NFD0_ON_D16; */
+
+ /* Configure IO drive */
+ csa &= ~AT91_MATRIX_EBI_EBI_IOSR_NORMAL;
+@@ -256,6 +257,9 @@
+
+ int board_init(void)
+ {
++ /* Set Status LED High */
++ /* at91_set_gpio_output(BOOT_STATUS_LED, 0); */
++
+ /* arch number of AT91SAM9X5EK-Board */
+ gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9X5EK;
+
+@@ -362,4 +366,61 @@
+ /* DDRAM2 Controller initialize */
+ ddr2_init(ATMEL_BASE_DDRSDRC, ATMEL_BASE_CS1, &ddr2);
+ }
++
+ #endif
++
++/* on-board EEPROM */
++struct mts_id_eeprom_layout {
++ char vendor_id[32];
++ char product_id[32];
++ char device_id[32];
++ char hw_version[32];
++ uint8_t mac_addr[6];
++ char imei[32];
++ uint8_t capa[32];
++ uint8_t mac_bluetooth[6];
++ uint8_t mac_wifi[6];
++ uint8_t reserved[302];
++};
++
++int board_get_enetaddr(uchar *enetaddr)
++{
++ struct mts_id_eeprom_layout eeprom_buffer = {0};
++
++ if (eeprom_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, &eeprom_buffer, sizeof(eeprom_buffer))) {
++ printf("EEPROM: read error\n");
++ return 0;
++ }
++
++ if (eeprom_buffer.vendor_id[0] == 0x00 || eeprom_buffer.vendor_id[0] == 0xFF) {
++ printf("EEPROM: uninitialized\n");
++ return 0;
++ }
++
++ printf("vendor-id: %s\n", eeprom_buffer.vendor_id);
++ printf("product-id: %s\n", eeprom_buffer.product_id);
++ printf("device-id: %s\n", eeprom_buffer.device_id);
++ printf("hw-version: %s\n", eeprom_buffer.hw_version);
++ printf("mac-addr: %02x:%02x:%02x:%02x:%02x:%02x\n", eeprom_buffer.mac_addr[0],
++ eeprom_buffer.mac_addr[1],
++ eeprom_buffer.mac_addr[2],
++ eeprom_buffer.mac_addr[3],
++ eeprom_buffer.mac_addr[4],
++ eeprom_buffer.mac_addr[5]);
++
++ memcpy(enetaddr, eeprom_buffer.mac_addr, 6);
++
++ return 1;
++}
++
++int misc_init_r(void)
++{
++ uchar enetaddr[6];
++
++ /* set MAC address from EEPROM if read successful */
++ if (board_get_enetaddr(enetaddr)) {
++ eth_setenv_enetaddr("ethaddr", enetaddr);
++ }
++
++ return 0;
++}
+diff -raNu a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig
+--- a/configs/at91sam9x5ek_nandflash_defconfig 2021-01-09 18:01:02.000000000 +0200
++++ b/configs/at91sam9x5ek_nandflash_defconfig 2021-01-09 18:24:57.023488603 +0200
+@@ -30,7 +30,6 @@
+ CONFIG_CMD_NAND=y
+ CONFIG_CMD_BOOTZ=y
+ CONFIG_CMD_MII=y
+-CONFIG_CMD_I2C=y
+
+ # The config option CONFIG_SILENT_CONSOLE can be used to quiet messages
+ # on the console. If the option has been enabled, the output can be
+diff -raNu a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
+--- a/include/configs/at91sam9x5ek.h 2016-09-19 17:45:12.000000000 +0300
++++ b/include/configs/at91sam9x5ek.h 2021-01-09 18:38:28.231749990 +0200
+@@ -9,8 +9,10 @@
+ #ifndef __CONFIG_H__
+ #define __CONFIG_H__
+
++#include <linux/kconfig.h>
+ #include <asm/hardware.h>
+
++#define USE_MTR
+ #define CONFIG_SYS_TEXT_BASE 0x26f00000
+
+ /* ARM asynchronous clock */
+@@ -26,6 +28,8 @@
+ #define CONFIG_BOARD_EARLY_INIT_F
+ #define CONFIG_DISPLAY_CPUINFO
+
++#define CONFIG_MISC_INIT_R /* enable platform-dependent misc_init_r() */
++
+ /* general purpose I/O */
+ #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */
+ #define CONFIG_AT91_GPIO
+@@ -36,6 +40,8 @@
+ #define CONFIG_USART_ID ATMEL_ID_SYS
+
+ /* LCD */
++/* MTR has no LCD */
++#if !defined(MTR)
+ #define CONFIG_LCD
+ #define LCD_BPP LCD_COLOR16
+ #define LCD_OUTPUT_BPP 24
+@@ -46,7 +52,13 @@
+ #define CONFIG_ATMEL_HLCD
+ #define CONFIG_ATMEL_LCD_RGB565
+ #define CONFIG_SYS_CONSOLE_IS_IN_ENV
++#endif /* !defined(MTR) */
++
++/* check for keypress even if bootdelay is 0 */
++#define CONFIG_ZERO_BOOTDELAY_CHECK
+
++/*STATUS LED*/
++#define BOOT_STATUS_LED AT91_PIN_PC21
+
+ /*
+ * BOOTP options
+@@ -59,10 +71,7 @@
+ /* no NOR flash */
+ #define CONFIG_SYS_NO_FLASH
+
+-/*
+- * Command line configuration.
+- */
+-#define CONFIG_CMD_NAND
++#define CONFIG_SYS_I2C
+
+ /*
+ * define CONFIG_USB_EHCI to enable USB Hi-Speed (aka 2.0)
+@@ -94,13 +103,30 @@
+ /* our CLE is AD22 */
+ #define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
+ #define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PD4
+-#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PD5
++/* MTR nand ready is PC31 */
++#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PC31
+
+ /* PMECC & PMERRLOC */
+ #define CONFIG_ATMEL_NAND_HWECC 1
+ #define CONFIG_ATMEL_NAND_HW_PMECC 1
+-#define CONFIG_PMECC_CAP 2
++
++/* MTR: 4-bit PMECC */
++#define CONFIG_PMECC_CAP 4
+ #define CONFIG_PMECC_SECTOR_SIZE 512
++/*
++ * CONFIG_PMECC_INDEX_TABLE_OFFSET has been replaced by:
++ * ATMEL_PMECC_INDEX_OFFSET_512 and
++ * ATMEL_PMECC_INDEX_OFFSET_1024
++ *
++ * Which as used depends on:
++ * host->pmecc_sector_size == 512
++ *
++ * 2012.10:
++ * #define CONFIG_PMECC_INDEX_TABLE_OFFSET 0x8000
++ * 2016.03 (at91sam9x5.h):
++ * 182:#define ATMEL_PMECC_INDEX_OFFSET_512 0x8000
++ */
++
+
+ #define CONFIG_CMD_NAND_TRIMFFS
+
+@@ -147,6 +173,23 @@
+ #endif
+ #endif
+
++#define CONFIG_SYS_I2C_SOFT
++#define CONFIG_SOFT_I2C
++#define CONFIG_SOFT_I2C_GPIO_SCL AT91_PIN_PA31
++#define CONFIG_SOFT_I2C_GPIO_SDA AT91_PIN_PA30
++#define CONFIG_SYS_I2C_SOFT_SPEED 50000
++#define CONFIG_SYS_I2C_SPEED CONFIG_SYS_I2C_SOFT_SPEED
++/* Values from previous levels of Conduit U-Boot */
++#define CONFIG_SYS_I2C_SLAVE 0xfe
++#define I2C_RXTX_LEN 128
++
++/* I2C eeprom support */
++#define CONFIG_CMD_EEPROM
++#define CONFIG_SYS_I2C_EEPROM_ADDR 0x56 /* at24c04 */
++#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address<---><------>*/
++#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
++
++
+ #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
+
+ #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
+@@ -156,11 +199,11 @@
+ /* bootstrap + u-boot + env + linux in nandflash */
+ #define CONFIG_ENV_IS_IN_NAND
+ #define CONFIG_ENV_OFFSET 0xc0000
+-#define CONFIG_ENV_OFFSET_REDUND 0x100000
++#define CONFIG_ENV_OFFSET_REDUND 0x160000
+ #define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */
+-#define CONFIG_BOOTCOMMAND "nand read " \
+- "0x22000000 0x200000 0x300000; " \
+- "bootm 0x22000000"
++/* MTR: read from env variables for boot */
++#define CONFIG_BOOTCOMMAND "nboot.jffs2 ${loadaddr} 0 ${kernel_addr}; bootm ${loadaddr}"
++
+ #elif defined(CONFIG_SYS_USE_SPIFLASH)
+ /* bootstrap + u-boot + env + linux in spi flash */
+ #define CONFIG_ENV_IS_IN_SPI_FLASH
+@@ -197,6 +240,9 @@
+ "8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
+ "root=/dev/mmcblk0p2 " \
+ "rw rootfstype=ext4 rootwait"
++#elif defined(USE_MTR)
++/* MTR uses jffs2 */
++#define CONFIG_BOOTARGS "mem=128M console=ttyS0,115200 root=/dev/mtdblock8 ro rootfstype=jffs2"
+ #else
+ #define CONFIG_BOOTARGS \
+ "console=ttyS0,115200 earlyprintk " \
+@@ -274,4 +320,21 @@
+
+ #endif
+
++/* MTR defaults */
++#define CONFIG_ENV_OVERWRITE 1 /* Allow Overwrite of serial# & ethaddr */
++#define CONFIG_ETHADDR 00:08:00:87:00:02
++#define CONFIG_IPADDR 192.168.2.1
++#define CONFIG_NETMASK 255.255.255.0
++#define CONFIG_SERVERIP 192.168.2.2
++#define CONFIG_HOSTNAME AT91SAM9G25
++#define CONFIG_LOADADDR 0x22000000
++
++/* MTR - enable watchdog */
++#define CONFIG_AT91SAM9_WATCHDOG 1
++#define CONFIG_HW_WATCHDOG 1
++#define CONFIG_AT91_HW_WDT_TIMEOUT 16
++#define CONFIG_EXTRA_ENV_SETTINGS \
++ "kernel_addr=0x200000\0" \
++ ""
++
+ #endif
diff --git a/recipes-bsp/u-boot/u-boot_2016.09.01.bb b/recipes-bsp/u-boot/u-boot_2016.09.01.bb
index 59b3c4c..3f4d2d5 100644
--- a/recipes-bsp/u-boot/u-boot_2016.09.01.bb
+++ b/recipes-bsp/u-boot/u-boot_2016.09.01.bb
@@ -27,6 +27,9 @@ SRC_URI_append_mtr = "\
SRC_URI_append_mtrv1 = "\
file://mtrv1.patch \
"
+SRC_URI_append_mtre = "\
+ file://mtre.patch \
+"
SRC_URI[md5sum] = "61c628f8034477c946e173ed174efeb4"
SRC_URI[sha256sum] = "95728e89dd476d17428f94080752ab48884be477b6a678941582aeef618b70bb"
diff --git a/recipes-kernel/linux/crypto.inc b/recipes-kernel/linux/crypto.inc
index a557ded..1d8e2ba 100644
--- a/recipes-kernel/linux/crypto.inc
+++ b/recipes-kernel/linux/crypto.inc
@@ -15,3 +15,7 @@ KERNEL_MODULE_AUTOLOAD_mtr += " \
KERNEL_MODULE_AUTOLOAD_mtcap += " \
sha512_generic \
"
+
+KERNEL_MODULE_AUTOLOAD_mtre += " \
+ sha512_generic \
+"
diff --git a/recipes-kernel/linux/driver.inc b/recipes-kernel/linux/driver.inc
index 5e21ed6..82c4747 100644
--- a/recipes-kernel/linux/driver.inc
+++ b/recipes-kernel/linux/driver.inc
@@ -20,3 +20,5 @@ KERNEL_MODULE_AUTOLOAD_mtcap += "${DRIVER_LOAD_ALL_MACHINES}"
KERNEL_MODULE_AUTOLOAD_mtrv1 += "${DRIVER_LOAD_ALL_MACHINES}"
KERNEL_MODULE_AUTOLOAD_mtr += "${DRIVER_LOAD_ALL_MACHINES}"
+
+KERNEL_MODULE_AUTOLOAD_mtre += "${DRIVER_LOAD_ALL_MACHINES}" \ No newline at end of file
diff --git a/recipes-kernel/linux/linux-at91-4.9.87/defconfig b/recipes-kernel/linux/linux-at91-4.9.87/defconfig
index 79285b4..10aae27 100644
--- a/recipes-kernel/linux/linux-at91-4.9.87/defconfig
+++ b/recipes-kernel/linux/linux-at91-4.9.87/defconfig
@@ -3050,7 +3050,7 @@ CONFIG_LEDS_GPIO=y
# CONFIG_LEDS_LP5562 is not set
# CONFIG_LEDS_LP8501 is not set
# CONFIG_LEDS_LP8860 is not set
-# CONFIG_LEDS_PCA955X is not set
+CONFIG_LEDS_PCA955X=m
# CONFIG_LEDS_PCA963X is not set
# CONFIG_LEDS_DAC124S085 is not set
CONFIG_LEDS_PWM=y
@@ -3115,7 +3115,7 @@ CONFIG_RTC_INTF_DEV=y
#
# CONFIG_RTC_DRV_ABB5ZES3 is not set
# CONFIG_RTC_DRV_ABX80X is not set
-# CONFIG_RTC_DRV_DS1307 is not set
+CONFIG_RTC_DRV_DS1307=m
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_HYM8563 is not set
diff --git a/recipes-kernel/linux/linux-at91-4.9.87/mtre/linux-4.9-mtre-device-tree.patch b/recipes-kernel/linux/linux-at91-4.9.87/mtre/linux-4.9-mtre-device-tree.patch
new file mode 100644
index 0000000..77f6caa
--- /dev/null
+++ b/recipes-kernel/linux/linux-at91-4.9.87/mtre/linux-4.9-mtre-device-tree.patch
@@ -0,0 +1,517 @@
+diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/mtre.dts linux-4.9.87/arch/arm/boot/dts/mtre.dts
+--- linux-4.9.87.orig/arch/arm/boot/dts/mtre.dts 1969-12-31 18:00:00.000000000 -0600
++++ linux-4.9.87/arch/arm/boot/dts/mtre.dts 2019-05-07 19:03:19.378605555 -0500
+@@ -0,0 +1,266 @@
++/*
++ * DTS file for Multi-Tech Systems MTRE Hardware
++ *
++ * Copyright (C) 2016 by Multi-Tech Systems,
++ *
++ * Licensed under GPLv2 or later.
++ */
++
++/dts-v1/;
++#include "at91sam9g25.dtsi"
++#include "at91sam9x5ek.dtsi"
++
++/ {
++ model = "Multi-Tech Systems MTRE";
++ compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
++ aliases {
++ serial1 = &uart0;
++ };
++
++ chosen {
++ bootargs = "mem=128M console=ttyS0,115200 root=/dev/mtdblock8 ro rootfstype=jffs2";
++ };
++
++ memory {
++ reg = <0x20000000 0x8000000>;
++ };
++
++ clocks {
++ #address-cells = <1>;
++ #size-cells = <1>;
++ ranges;
++
++ main_clock: clock@0 {
++ compatible = "atmel,osc", "fixed-clock";
++ clock-frequency = <12000000>;
++ };
++ };
++
++ ahb {
++ apb {
++ /delete-node/ spi@f0004000;
++ macb0: ethernet@f802c000 {
++ phy-mode = "rmii";
++ status = "okay";
++ };
++
++
++ pinctrl@fffff400 {
++ nand {
++ pinctrl_nand: nand-0 {
++ atmel,pins =
++ <AT91_PIOD 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD0 periph A Read Enable */
++ AT91_PIOD 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD1 periph A Write Enable */
++ AT91_PIOD 2 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD2 periph A Address Latch Enable */
++ AT91_PIOD 3 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD3 periph A Command Latch Enable */
++ AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PD4 gpio Chip Enable pin pull_up */
++ AT91_PIOC 31 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PC31 gpio RDY/BUSY pin pull_up */
++ AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD6 periph A Data bit 0 */
++ AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD7 periph A Data bit 1 */
++ AT91_PIOD 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD8 periph A Data bit 2 */
++ AT91_PIOD 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD9 periph A Data bit 3 */
++ AT91_PIOD 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD10 periph A Data bit 4 */
++ AT91_PIOD 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD11 periph A Data bit 5 */
++ AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD12 periph A Data bit 6 */
++ AT91_PIOD 13 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD13 periph A Data bit 7 */
++ };
++ /delete-node/ nand_16bits-0;
++ };
++
++ /delete-node/ spi1;
++ /delete-node/ mmc0;
++ mts-io {
++ pinctrl_mts_io_out: mts_io-0 {
++ atmel,pins =
++ <AT91_PIOD 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD14 WiFi BT reset */
++ AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD16 Secure reset */
++ AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD17 MTQ reset */
++ AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PD18 USB Hub reset */
++ AT91_PIOD 19 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD19 GNSS Int */
++ output-high;
++ };
++ pinctrl_mts_io_in: mts_io-1 {
++ atmel,pins =
++ <AT91_PIOD 20 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD20 WiFi_BT_LPMode Input */
++ };
++ pinctrl_mts_io_gnss: mts_io-2 {
++ atmel,pins =
++ <AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PD20 WiFi_BT_LPMode Input */
++ output-low;
++ };
++ };
++ /*
++ * Pin A23 will be left floating when the power goes off on the radio.
++ * We need to pull it down to ensure it is low during radio power-off.
++ * pinctrl is loaded during the call to platform_device_register() in mts-io.
++ * If we need to customize this for various hardware revisions, these can
++ * be loaded as overlays prior to loading the mts-io module, overwriting the
++ * atmel,pins section.
++ */
++ mts_io {
++ pinctrl_mts_io: mts_io-0 {
++ atmel,pins =
++ <AT91_PIOA 21 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PA21 GPIO pull-up radio-power */
++ AT91_PIOA 22 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP /* PA22 GPIO pull-up radio-reset */
++ AT91_PIOA 23 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_DOWN>; /* PA23 GPIO pull-down radio-monitor */
++ };
++ };
++
++ 1wire_cm {
++ pinctrl_1wire_cm: 1wire_cm-0 {
++ atmel,pins = <AT91_PIOB 18 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>; /* PB18 multidrive, conflicts with led */
++ };
++ };
++ };
++
++ rtc@fffffeb0 {
++ /* use mcp79410 rtc instead */
++ status = "disabled";
++ };
++
++ dbgu: serial@fffff200 {
++ status = "okay";
++ atmel,use-dma-rx;
++ atmel,use-dma-tx;
++ };
++
++ spi@f0000000 {
++ /delete-node/ m25p80@0;
++ };
++
++ /delete-node/ serial@f801c000;
++ /delete-node/ mmc@f0008000;
++
++ uart0: serial@f8040000 {
++ status = "okay";
++ atmel,use-dma-rx;
++ atmel,use-dma-tx;
++ dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(11)>,
++ <&dma0 1 (AT91_DMA_CFG_PER_ID(12) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
++ dma-names = "tx", "rx";
++ };
++
++ usb2: gadget@f803c000 {
++ /delete-property/ atmel,vbus-gpio; /* mtrv1 has no vbus-gpio */
++ status = "okay";
++ };
++ watchdog@fffffe40 {
++ status = "okay";
++ };
++ };
++
++ nand0: nand@40000000 {
++ nand-bus-width = <8>;
++ nand-ecc-mode = "hw";
++ atmel,has-pmecc; /* Enable PMECC */
++ atmel,pmecc-sector-size = <512>;
++ status = "okay";
++ reg = < 0x40000000 0x10000000
++ 0xffffe000 0x600 /* PMECC Registers */
++ 0xffffe600 0x200 /* PMECC Error Location Registers */
++ 0x00100000 0x100000 /* PMECC looup table in ROM code */
++ >;
++ atmel,pmecc-lookup-table-offset = <0x8000 0x10000>;
++ gpios = < &pioC 31 GPIO_ACTIVE_HIGH
++ &pioD 4 GPIO_ACTIVE_HIGH
++ 0
++ >;
++ atmel,pmecc-cap = <4>;
++ atmel,nand-has-dma;
++
++ nand@0 {
++ label = "NANDFlash";
++ reg = <0x0 0x10000000>;
++ };
++ at91bootstrap@0 {
++ label = "at91bootstrap";
++ reg = <0x0 0x40000>;
++ };
++ uboot@40000 {
++ label = "u-Boot";
++ reg = <0x40000 0x80000>;
++ };
++ ubootconfig0@c0000 {
++ label = "u-Boot Config";
++ reg = <0xc0000 0xa0000>;
++ };
++ ubootconfig1@160000 {
++ label = "u-Boot Redundant Config";
++ reg = <0x160000 0xa0000>;
++ };
++ uImage@200000 {
++ label = "uImage";
++ reg = <0x200000 0x600000>;
++ };
++ config0@800000 {
++ label = "Config";
++ reg = <0x800000 0x4000000>;
++ };
++ config1@4800000 {
++ label = "OEM Config";
++ reg = <0x4800000 0x800000>;
++ };
++ rootfs@5000000 {
++ label = "Rootfs";
++ reg = <0x5000000 0x8000000>;
++ };
++ user@D000000 {
++ label = "User data";
++ reg = <0xD000000 0x3000000>;
++ };
++ };
++
++ usb0: ohci@00600000 {
++ status = "okay";
++ num-ports = <3>;
++ };
++
++ usb1: ehci@00700000 {
++ status = "okay";
++ };
++ };
++
++
++ i2c-gpio-0 {
++ status = "okay";
++
++ id_eeprom@56 {
++ compatible = "atmel,24c04";
++ reg = <0x56>;
++ pagesize = <16>;
++ status = "okay";
++ };
++ };
++
++ i2c-gpio-1 {
++ status = "okay";
++
++ pca9552@60 {
++ /* 16-bit I2C LED blinker */
++ compatible = "nxp,pca9552";
++ reg = <0x66>;
++ };
++
++ mcp79410@6f {
++ /* Battery-backed I2C Real-Time Clock/Calendar */
++ compatible = "microchip,mcp7941x";
++ reg = <0x6f>;
++ };
++ };
++
++ pps-0 {
++ compatible = "pps-gpio";
++ gpios = <&pioB 18 0>; /* MTRV1-0.0 */
++ capture-clear;
++ status = "okay";
++ };
++
++ mts-io-0 {
++ status = "okay";
++ compatible = "mts,mts-io";
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_mts_io_out>;
++ pinctrl-1 = <&pinctrl_mts_io_in>;
++ pinctrl-2 = <&pinctrl_mts_io_gnss>;
++ };
++};
+diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5cm.dtsi linux-4.9.87/arch/arm/boot/dts/at91sam9x5cm.dtsi
+--- linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5cm.dtsi 2019-01-03 15:21:25.339570341 -0600
++++ linux-4.9.87/arch/arm/boot/dts/at91sam9x5cm.dtsi 2019-01-03 15:17:51.911576659 -0600
+@@ -43,48 +43,8 @@
+ atmel,has-pmecc; /* Enable PMECC */
+ atmel,pmecc-cap = <2>;
+ atmel,pmecc-sector-size = <512>;
+- nand-on-flash-bbt;
++ /* nand-on-flash-bbt; */
+ status = "okay";
+-
+- at91bootstrap@0 {
+- label = "at91bootstrap";
+- reg = <0x0 0x40000>;
+- };
+-
+- uboot@40000 {
+- label = "u-boot";
+- reg = <0x40000 0x80000>;
+- };
+-
+- ubootenv@c0000 {
+- label = "U-Boot Env";
+- reg = <0xc0000 0x140000>;
+- };
+-
+- kernel@200000 {
+- label = "kernel";
+- reg = <0x200000 0x600000>;
+- };
+-
+- rootfs@800000 {
+- label = "rootfs";
+- reg = <0x800000 0x1f800000>;
+- };
+- };
+- };
+-
+- leds {
+- compatible = "gpio-leds";
+-
+- pb18 {
+- label = "pb18";
+- gpios = <&pioB 18 GPIO_ACTIVE_LOW>;
+- linux,default-trigger = "heartbeat";
+- };
+-
+- pd21 {
+- label = "pd21";
+- gpios = <&pioD 21 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+@@ -96,5 +56,4 @@
+ pinctrl-0 = <&pinctrl_1wire_cm>;
+ status = "okay";
+ };
+-
+ };
+diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5ek.dtsi linux-4.9.87/arch/arm/boot/dts/at91sam9x5ek.dtsi
+--- linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5ek.dtsi 2018-03-27 11:05:05.000000000 -0500
++++ linux-4.9.87/arch/arm/boot/dts/at91sam9x5ek.dtsi 2019-01-23 19:14:23.443999491 -0600
+@@ -25,23 +25,11 @@
+ &pinctrl_mmc0_slot0_clk_cmd_dat0
+ &pinctrl_mmc0_slot0_dat1_3>;
+ status = "okay";
++ /* external micro SD slot */
+ slot@0 {
+ reg = <0>;
+ bus-width = <4>;
+- cd-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>;
+- };
+- };
+-
+- mmc1: mmc@f000c000 {
+- pinctrl-0 = <
+- &pinctrl_board_mmc1
+- &pinctrl_mmc1_slot0_clk_cmd_dat0
+- &pinctrl_mmc1_slot0_dat1_3>;
+- status = "okay";
+- slot@0 {
+- reg = <0>;
+- bus-width = <4>;
+- cd-gpios = <&pioD 14 GPIO_ACTIVE_HIGH>;
++ cd-gpios = <&pioA 1 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+@@ -58,25 +46,12 @@
+ usb2: gadget@f803c000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_board_usb2>;
+- atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
+- status = "okay";
+- };
+-
+- i2c0: i2c@f8010000 {
+- status = "okay";
+-
+- wm8731: wm8731@1a {
+- compatible = "wm8731";
+- reg = <0x1a>;
+- };
+- };
+-
+- adc0: adc@f804c000 {
+- atmel,adc-ts-wires = <4>;
+- atmel,adc-ts-pressure-threshold = <10000>;
++ /* atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>; mtcdt: no vbus-gpio */
+ status = "okay";
+ };
+
++ /* A/D convertor is unusable on Conduit */
++
+ pinctrl@fffff400 {
+ camera_sensor {
+ pinctrl_pck0_as_isi_mck: pck0_as_isi_mck-0 {
+@@ -118,7 +93,7 @@
+ };
+
+ spi0: spi@f0000000 {
+- status = "disabled"; /* conflict with mmc1 */
++ status = "okay";
+ cs-gpios = <&pioA 14 0>, <0>, <0>, <0>;
+ m25p80@0 {
+ compatible = "atmel,at25df321a";
+@@ -131,37 +106,20 @@
+ status = "okay";
+ };
+
+- ssc0: ssc@f0010000 {
+- status = "okay";
+- };
+ };
+
+ usb0: ohci@00600000 {
+ status = "okay";
+ num-ports = <3>;
+- atmel,vbus-gpio = <0 /* &pioD 18 GPIO_ACTIVE_LOW *//* Activate to have access to port A */
+- &pioD 19 GPIO_ACTIVE_LOW
+- &pioD 20 GPIO_ACTIVE_LOW
+- >;
++ //mtcdt: no vbus-gpio
++ // atmel,vbus-gpio = <0 /* &pioD 18 GPIO_ACTIVE_LOW *//* Activate to have access to port A */
++ // &pioD 19 GPIO_ACTIVE_LOW
++ // &pioD 20 GPIO_ACTIVE_LOW
++ // >;
+ };
+
+ usb1: ehci@00700000 {
+ status = "okay";
+ };
+ };
+-
+- sound {
+- compatible = "atmel,sam9x5-wm8731-audio";
+-
+- atmel,model = "wm8731 @ AT91SAM9X5EK";
+-
+- atmel,audio-routing =
+- "Headphone Jack", "RHPOUT",
+- "Headphone Jack", "LHPOUT",
+- "LLINEIN", "Line In Jack",
+- "RLINEIN", "Line In Jack";
+-
+- atmel,ssc-controller = <&ssc0>;
+- atmel,audio-codec = <&wm8731>;
+- };
+ };
+diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/Makefile linux-4.9.87/arch/arm/boot/dts/Makefile
+--- linux-4.9.87.orig/arch/arm/boot/dts/Makefile 2019-01-03 15:21:25.339570341 -0600
++++ linux-4.9.87/arch/arm/boot/dts/Makefile 2019-01-03 15:17:51.911576659 -0600
+@@ -43,7 +43,8 @@
+ at91sam9g25ek.dtb \
+ at91sam9g35ek.dtb \
+ at91sam9x25ek.dtb \
+- at91sam9x35ek.dtb
++ at91sam9x35ek.dtb \
++ mtre.dtb
+ dtb-$(CONFIG_SOC_SAM_V7) += \
+ at91-kizbox2.dtb \
+ at91-sama5d2_ptc_ek.dtb \
+diff -Naru linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5.dtsi linux-4.9.87/arch/arm/boot/dts/at91sam9x5.dtsi
+--- linux-4.9.87.orig/arch/arm/boot/dts/at91sam9x5.dtsi 2019-01-03 15:21:25.339570341 -0600
++++ linux-4.9.87/arch/arm/boot/dts/at91sam9x5.dtsi 2019-01-03 15:17:51.911576659 -0600
+@@ -32,9 +32,6 @@
+ gpio3 = &pioD;
+ tcb0 = &tcb0;
+ tcb1 = &tcb1;
+- i2c0 = &i2c0;
+- i2c1 = &i2c1;
+- i2c2 = &i2c2;
+ ssc0 = &ssc0;
+ pwm0 = &pwm0;
+ };
+@@ -963,50 +960,7 @@
+ status = "disabled";
+ };
+
+- i2c0: i2c@f8010000 {
+- compatible = "atmel,at91sam9x5-i2c";
+- reg = <0xf8010000 0x100>;
+- interrupts = <9 IRQ_TYPE_LEVEL_HIGH 6>;
+- dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(7)>,
+- <&dma0 1 AT91_DMA_CFG_PER_ID(8)>;
+- dma-names = "tx", "rx";
+- #address-cells = <1>;
+- #size-cells = <0>;
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_i2c0>;
+- clocks = <&twi0_clk>;
+- status = "disabled";
+- };
+-
+- i2c1: i2c@f8014000 {
+- compatible = "atmel,at91sam9x5-i2c";
+- reg = <0xf8014000 0x100>;
+- interrupts = <10 IRQ_TYPE_LEVEL_HIGH 6>;
+- dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(5)>,
+- <&dma1 1 AT91_DMA_CFG_PER_ID(6)>;
+- dma-names = "tx", "rx";
+- #address-cells = <1>;
+- #size-cells = <0>;
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_i2c1>;
+- clocks = <&twi1_clk>;
+- status = "disabled";
+- };
+-
+- i2c2: i2c@f8018000 {
+- compatible = "atmel,at91sam9x5-i2c";
+- reg = <0xf8018000 0x100>;
+- interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
+- dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(9)>,
+- <&dma0 1 AT91_DMA_CFG_PER_ID(10)>;
+- dma-names = "tx", "rx";
+- #address-cells = <1>;
+- #size-cells = <0>;
+- pinctrl-names = "default";
+- pinctrl-0 = <&pinctrl_i2c2>;
+- clocks = <&twi2_clk>;
+- status = "disabled";
+- };
++ /* /delete_node/ command does not work. */
+
+ uart0: serial@f8040000 {
+ compatible = "atmel,at91sam9260-usart";
diff --git a/recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtre.dts b/recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtre.dts
new file mode 100644
index 0000000..7153e59
--- /dev/null
+++ b/recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtre.dts
@@ -0,0 +1,1476 @@
+/*
+*
+* This is base DTS file for all AT91 SAM9g25 the MTS devices
+* composed by manual merging of:
+* #include "at91sam9g25.dtsi"
+* #include "at91sam9x5ek.dtsi"
+* and sub-includes into one big file.
+*
+*/
+
+/dts-v1/;
+
+#include <dt-bindings/dma/at91.h>
+#include <dt-bindings/pinctrl/at91.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/at91.h>
+
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ model = "Multi-Tech Systems MTRE";