[PATCH v2 4/4] at91: add support for sama7g5-ek board

2022-02-23 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA7G5-EK board.
Hardware:
- SoC: SAMA7G5
- RAM: Aliance Memory AS4C256M16D3LC (4 Gbit DDR3L)
- SD/MMC: 1 standard 4bit SD Card interface
- USB: 1 Micro-AB host/device, 1 Type-A host, 1 Type-C host
- CAN: 2 interfaces
- Ethernet: 10/100 port, 1Gbps port
- Wi-Fi/BT: 1 optional interface
- Audio: 1 SPDIF RX port, 1 SPDIF TX port, 4 digital microphones
- Camera: 1 RPi CSI camera interface
- Debug: 1 J-Link-OB + CDC, 1 JTAG
- LEDs: 1 RGB
- Buttons: 4 push buttons
- Expansions: 1 RPi Expansion connector, 2 mikroBUS connectors
- Power management: 1 power management IC, 1 power consumption
  measurement device

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile   |  9 ++-
 package/boot/uboot-at91/Makefile  |  9 ++-
 .../at91/base-files/etc/board.d/02_network|  2 +-
 target/linux/at91/image/sama7.mk  | 57 +++
 target/linux/at91/image/uboot-env.txt |  7 ++-
 5 files changed, 78 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/at91/image/sama7.mk

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 92dbf27a1ef5..72afefd2 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -172,6 +172,12 @@ define AT91Bootstrap/sama5d2_ptc_eksd_uboot
   BUILD_DEVICES:=microchip_sama5d2-ptc-ek
 endef
 
+define AT91Bootstrap/sama7g5eksd_uboot
+  TITLE:=AT91Bootstrap for SAMA7G5-EK (SDCard)
+  BUILD_SUBTARGET:=sama7
+  BUILD_DEVICES:=microchip_sama7g5-ek
+endef
+
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
@@ -192,7 +198,8 @@ AT91BOOTSTRAP_TARGETS := \
sama5d27_wlsom1_eksd_uboot \
sama5d27_wlsom1_ekdf_qspi_uboot \
sama5d2_ptc_eknf_uboot \
-   sama5d2_ptc_eksd_uboot
+   sama5d2_ptc_eksd_uboot \
+   sama7g5eksd_uboot
 
 define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 7052329ecd5e..ed69b8b06c8a 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -143,6 +143,12 @@ define U-Boot/sama5d2_ptc_ek_mmc
   BUILD_DEVICES:=microchip_sama5d2-ptc-ek
 endef
 
+define U-Boot/sama7g5ek_mmc1
+  NAME:=SAMA7G5-EK (SDCard)
+  BUILD_SUBTARGET:=sama7
+  BUILD_DEVICES:=microchip_sama7g5-ek
+endef
+
 UBOOT_TARGETS := \
at91sam9m10g45ek_nandflash \
at91sam9x5ek_nandflash \
@@ -162,7 +168,8 @@ UBOOT_TARGETS := \
sama5d27_wlsom1_ek_mmc \
sama5d27_wlsom1_ek_qspiflash \
sama5d2_ptc_ek_nandflash \
-   sama5d2_ptc_ek_mmc
+   sama5d2_ptc_ek_mmc \
+   sama7g5ek_mmc1
 
 define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
diff --git a/target/linux/at91/base-files/etc/board.d/02_network 
b/target/linux/at91/base-files/etc/board.d/02_network
index 3e11f40b325b..857417c7fddc 100644
--- a/target/linux/at91/base-files/etc/board.d/02_network
+++ b/target/linux/at91/base-files/etc/board.d/02_network
@@ -8,7 +8,7 @@ board_config_update
 
 case "$(board_name)" in
 
-atmel,sama5d3-xplained)
+atmel,sama5d3-xplained|microchip,sama7g5ek)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
 
diff --git a/target/linux/at91/image/sama7.mk b/target/linux/at91/image/sama7.mk
new file mode 100644
index ..bf1704dfb337
--- /dev/null
+++ b/target/linux/at91/image/sama7.mk
@@ -0,0 +1,57 @@
+
+define Device/default-nand
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  SUBPAGESIZE := 2048
+  MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 2048
+endef
+
+define Build/at91-sdcard
+  $(if $(findstring ext4,$@), \
+  rm -f $@.boot
+  mkfs.fat -C $@.boot $(FAT32_BLOCKS)
+
+  mcopy -i $@.boot \
+   $(KDIR)/$(DEVICE_NAME)-fit-zImage.itb \
+   ::$(DEVICE_NAME)-fit.itb
+
+  mcopy -i $@.boot \
+   $(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc1/u-boot.bin \
+   ::u-boot.bin
+
+  mcopy -i $@.boot \
+   
$(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd_uboot/at91bootstrap.bin \
+   ::BOOT.bin
+
+  $(CP) uboot-env.txt $@-uboot-env.txt
+  sed -i '2d;3d' $@-uboot-env.txt
+  sed -i '2i board='"$(DEVICE_NAME)"'' $@-uboot-env.txt
+  sed -i '3i board_name='"$(firstword $(SUPPORTED_DEVICES))"'' $@-uboot-env.txt
+
+  mkenvimage -s 0x4000 -o $@-uboot.env $@-uboot-env.txt
+
+  mcopy -i $@.boot $@-uboot.env ::uboot.env
+
+  ./gen_at91_sdcard_img.sh \
+   $@.img \
+   $@.boot \
+   $(KDIR)/root.ext4 \
+   $(AT91_SD_BOOT_PARTSIZE) \
+   $(CONFIG_TARGET_ROOTFS_PARTSIZE)
+
+  gzip -nc9 $@.img > $@
+
+  rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
+endef
+
+define Device/microchip_sama7g5-ek
+  

[PATCH v2 2/4] uboot-at91: update to linux4sam-2021.10

2022-02-23 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Update uboot-at91 to linux4sam-2021.10 version.

Signed-off-by: Claudiu Beznea 
---
 package/boot/uboot-at91/Makefile  |  6 +--
 .../patches/001-fix-Wformat-security.patch| 49 +--
 ...10-fix_dtc_compilation_on_host_gcc10.patch | 46 -
 3 files changed, 38 insertions(+), 63 deletions(-)
 delete mode 100644 
package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch

diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index ad65247e3e53..7052329ecd5e 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -7,13 +7,13 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_VERSION:=linux4sam-2020.04
+PKG_VERSION:=linux4sam-2021.10
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/linux4sam/u-boot-at91.git
-PKG_MIRROR_HASH:=4f106d215c01c4d024c4612bbd3ef189188d19abc1ab2cc316b257d308534feb
-PKG_SOURCE_VERSION:=0e1d1b6efb7f8e27c372279a906fcd2524df09da
+PKG_MIRROR_HASH:=f1190062f2012b182b45b78263a4cce4ada9b7b8d6f5a66d68fa51437105fc8c
+PKG_SOURCE_VERSION:=39854ce82232cdc05c20158d0439bdbc40991e4a
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch 
b/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
index 4c968a2448ae..d39a91aaf04a 100644
--- a/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
+++ b/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
@@ -1,17 +1,46 @@
+From 3b05406c02070df3e7f19399d81ebd35ed6deae5 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea 
+Date: Tue, 12 Oct 2021 17:43:28 +0300
+Subject: [PATCH] fix -Wformat-security
+
+Signed-off-by: Claudiu Beznea 
+---
+ cmd/panic.c  | 2 +-
+ cmd/version.c| 2 +-
+ drivers/pinctrl/pinctrl-uclass.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/cmd/panic.c b/cmd/panic.c
+index f13b3f094fab..197e2d0870ff 100644
+--- a/cmd/panic.c
 b/cmd/panic.c
+@@ -11,7 +11,7 @@ static int do_panic(struct cmd_tbl *cmdtp, int flag, int 
argc,
+ {
+   char *text = (argc < 2) ? "" : argv[1];
+ 
+-  panic(text);
++  panic("%s\n", text);
+ 
+   return CMD_RET_SUCCESS;
+ }
+diff --git a/cmd/version.c b/cmd/version.c
+index 3686b8733249..35b52c48171d 100644
 --- a/cmd/version.c
 +++ b/cmd/version.c
-@@ -18,7 +18,7 @@ static int do_version(cmd_tbl_t *cmdtp,
+@@ -19,7 +19,7 @@ static int do_version(struct cmd_tbl *cmdtp, int flag, int 
argc,
  {
char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
  
 -  printf(display_options_get_banner(false, buf, sizeof(buf)));
-+  printf("%s",display_options_get_banner(false, buf, sizeof(buf)));
++  printf("%s", display_options_get_banner(false, buf, sizeof(buf)));
  #ifdef CC_VERSION_STRING
puts(CC_VERSION_STRING "\n");
  #endif
+diff --git a/drivers/pinctrl/pinctrl-uclass.c 
b/drivers/pinctrl/pinctrl-uclass.c
+index b0f30aa1f758..aa62a890609a 100644
 --- a/drivers/pinctrl/pinctrl-uclass.c
 +++ b/drivers/pinctrl/pinctrl-uclass.c
-@@ -368,7 +368,7 @@ int pinctrl_get_pin_name(struct udevice
+@@ -371,7 +371,7 @@ int pinctrl_get_pin_name(struct udevice *dev, int 
selector, char *buf,
if (!ops->get_pin_name)
return -ENOSYS;
  
@@ -20,14 +49,6 @@
  
return 0;
  }
 a/lib/efi_loader/efi_variable.c
-+++ b/lib/efi_loader/efi_variable.c
-@@ -522,7 +522,7 @@ efi_status_t EFIAPI efi_set_variable(u16
- 
-   if (old_size)
-   /* APPEND_WRITE */
--  s += sprintf(s, old_val);
-+  s += sprintf(s, "%s", old_val);
-   else
-   s += sprintf(s, "(blob)");
- 
+-- 
+2.33.0
+
diff --git 
a/package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch 
b/package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch
deleted file mode 100644
index 6abb15160812..
--- 
a/package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From e33a814e772cdc36436c8c188d8c42d019fda639 Mon Sep 17 00:00:00 2001
-From: Dirk Mueller 
-Date: Tue, 14 Jan 2020 18:53:41 +0100
-Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration
-
-gcc 10 will default to -fno-common, which causes this error at link
-time:
-
-  (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from 
plugin):(.text+0x0): first defined here
-
-This is because both dtc-lexer as well as dtc-parser define the same
-global symbol yyloc. Before with -fcommon those were merged into one
-defintion. The proper solution would be to to mark this as "extern",
-however that leads to:
-
-  

[PATCH v2 1/4] at91bootstrap: update to v3.10.4, v4.0.1

2022-02-23 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
AT91Bootstrap version 4 is available only for SAM9X60, SAMA5D2, SAMA5D3,
SAMA5D4 (except sama5d4_xplaineddf_uboot_secure_defconfig for the
moment), SAMA7G5. Thus use v4.0.1 for the above targets and v3.10.4 for
the rest of them. With the switch to v4 AT91Bootstrap binaries are now
on build/binaries. Take also this into account. Also, patches directory
is not needed anymore with the version update.

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile   | 24 ++--
 package/boot/at91bootstrap/at91bootstrap.mk   |  2 +-
 ...ile-Remove-nostartfiles-from-LDFLAGS.patch | 38 ---
 3 files changed, 22 insertions(+), 42 deletions(-)
 delete mode 04 package/boot/at91bootstrap/patches
 delete mode 100644 
package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 2d77f7099721..92dbf27a1ef5 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -9,13 +9,31 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=at91bootstrap
-PKG_VERSION:=v3.9.3
+PKG_VERSION:=v4.0.1
+PKG_MIRROR_HASH:=3d45a4bcb52162097d4cdf042b8fe1ccf53e88b512e7541f42a23f2a73692a69
+PKG_SOURCE_VERSION:=4d41296e9ae12379555fb46a941897e7264600a2
+BINARIES_DIR:=build/binaries
+
+AT91BOOTSTRAP_V4=y
+ifdef CONFIG_PACKAGE_at91bootstrap-sama5d4_xplaineddf_uboot_secure
+  AT91BOOTSTRAP_V4=n
+else ifdef CONFIG_TARGET_at91_sam9x
+  ifndef CONFIG_TARGET_at91_sam9x_DEVICE_microchip_sam9x60ek
+AT91BOOTSTRAP_V4=n
+  endif
+endif
+
+ifeq ($(AT91BOOTSTRAP_V4),n)
+  PKG_VERSION=v3.10.4
+  
PKG_MIRROR_HASH=6fe61fe90838e785917383bb9e887fa05e1bd061a6725954242f504e38b5c426
+  PKG_SOURCE_VERSION=404846dd283894367a015ca59189bcf927d92e11
+  BINARIES_DIR=binaries
+endif
+
 PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/linux4sam/at91bootstrap.git
-PKG_MIRROR_HASH:=06753d673756edc9753932db00f4e5b8c1f9fa7708337c4d6ce280573efb86b4
-PKG_SOURCE_VERSION:=d96833a4b6680b237708eb4dc9f10708b9e709d8
 PKG_BUILD_DIR = \
$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
diff --git a/package/boot/at91bootstrap/at91bootstrap.mk 
b/package/boot/at91bootstrap/at91bootstrap.mk
index fe6577f58927..d4e807d9a219 100644
--- a/package/boot/at91bootstrap/at91bootstrap.mk
+++ b/package/boot/at91bootstrap/at91bootstrap.mk
@@ -5,7 +5,7 @@ PKG_FLAGS:=nonshared
 export GCC_HONOUR_COPTS=s
 
 define Package/at91bootstrap/install/default
-   $(CP) -avL $(PKG_BUILD_DIR)/binaries/at91bootstrap.bin $(1)/
+   $(CP) -avL $(PKG_BUILD_DIR)/$(BINARIES_DIR)/at91bootstrap.bin $(1)/
 endef
 
 Package/at91bootstrap/install = $(Package/at91bootstrap/install/default)
diff --git 
a/package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch
 
b/package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch
deleted file mode 100644
index 9d48758bdad2..
--- 
a/package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 59c8963d8e6a08222616d1b384e1009ba05e6b82 Mon Sep 17 00:00:00 2001
-From: Chris Elledge 
-Date: Tue, 8 Jun 2021 14:01:14 -0400
-Subject: Makefile: Remove -nostartfiles from LDFLAGS
-
-Binutils linker ld does not support the flag -nostartfiles.
-This is interpreted as "-n -o startfiles" which fortunately has no impact
-on the build process. Removing -nostartfiles has no impact on the build.
-
-Binutils 2.36 and later ld has improved flag parsing and throws an error if
--nostartfiles is passed as an argument. Removing the flag fixes the problem.
-
-Details on the Binutils ML:
-https://sourceware.org/pipermail/binutils/2021-June/116826.html
-
-In our ld command line there are explicit
--n -o $(BINDIR)/$(BOOT_NAME).elf options,
-hence removing -nostartfiles will not alter the build.
-
-Signed-off-by: Chris Elledge 
-Reviewed-by: Aubin Constans 
-[eugen.hris...@microchip.com: ported to at91bootstrap4]
-Signed-off-by: Eugen Hristev 

- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
 a/Makefile
-+++ b/Makefile
-@@ -275,7 +275,7 @@ endif
- #--cref:add cross reference to map file
- #  -lc   :tells the linker to tie in newlib
- #  -lgcc   :  tells the linker to tie in newlib
--LDFLAGS=-nostartfiles -Map=$(BINDIR)/$(BOOT_NAME).map --cref -static
-+LDFLAGS=-Map=$(BINDIR)/$(BOOT_NAME).map --cref -static
- LDFLAGS+=-T $(link_script) $(GC_SECTIONS) -Ttext $(LINK_ADDR)
- 
- ifneq ($(DATA_SECTION_ADDR),)
-- 
2.33.0


--- End Message ---
___
openwrt-devel mailing list

[PATCH v2 0/4] at91: add support for sama7g5 SoC and sama7g5-ek board

2022-02-23 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hi,

The following patches add support for Microchip SAMA7G5 SoC by
backporting the remaining patches from mainline kernel. Along with SoC
support board support has been added (board is called SAMA7G5-EK).

Patches 1/4, 2/4 are preparatory patches to update AT91Bootstrap and
U-Boot AT91.

Please note that patch 3/4 of this series is bigger than expected by
OpenWrt mailing list, thus it needs approval from admin. 

Thank you,
Claudiu Beznea

Changes in v2:
- fix compilation of sama5d4_xplaineddf_uboot_secure_defconfig in
  AT91Bootstrap project: the specified config hasn't been ported to
  AT91Bootstrap v4.x, thus we build it at the moment with
  AT91Bootstrap v3.x
- refreshed at91 kernel configs 

Claudiu Beznea (4):
  at91bootstrap: update to v3.10.4, v4.0.1
  uboot-at91: update to linux4sam-2021.10
  at91: add kernel support for sama7g5 soc
  at91: add support for sama7g5-ek board

 package/boot/at91bootstrap/Makefile   |   33 +-
 package/boot/at91bootstrap/at91bootstrap.mk   |2 +-
 ...ile-Remove-nostartfiles-from-LDFLAGS.patch |   38 -
 package/boot/uboot-at91/Makefile  |   15 +-
 .../patches/001-fix-Wformat-security.patch|   49 +-
 ...10-fix_dtc_compilation_on_host_gcc10.patch |   46 -
 target/linux/at91/Makefile|2 +-
 .../at91/base-files/etc/board.d/02_network|2 +-
 target/linux/at91/image/sama7.mk  |   57 +
 target/linux/at91/image/uboot-env.txt |7 +-
 ...s-clock-at91-add-sama7g5-pll-defines.patch |   72 +
 ...-allow-SYS-and-CPU-PLLs-to-be-export.patch |   46 +
 ...aster-add-5th-divisor-for-mck-master.patch |   49 +
 ...-add-5th-divisor-for-mck0-layout-and.patch |   41 +
 ...9x60-pll-allow-runtime-changes-for-p.patch |  521 
 ...-remove-mck0-from-parent-list-of-oth.patch |  201 ++
 ...5-decrease-lower-limit-for-MCK0-rate.patch |   35 +
 ...-do-not-allow-cpu-pll-to-go-higher-t.patch |  226 ++
 ...91-clk-master-re-factor-master-clock.patch | 1261 ++
 ...-clk-at91-sama7g5-register-cpu-clock.patch |   72 +
 ...91-Fix-the-declaration-of-the-clocks.patch |  202 ++
 ...ial-typo-fixes-in-the-file-sama7g5.c.patch |   50 +
 ...-remove-all-kernel-doc-kernel-doc-wa.patch |   95 +
 ...serio-bits-as-platform-configuration.patch |  186 ++
 ...capability-to-not-set-the-clock-rate.patch |   92 +
 ...-function-to-disable-all-macb-clocks.patch |   87 +
 ...-unprepare-clocks-in-case-of-failure.patch |   65 +
 ...dd-support-for-sama7g5-gem-interface.patch |   59 +
 ...d-support-for-sama7g5-emac-interface.patch |   44 +
 ...-ASoC-pcm5102a-Make-codec-selectable.patch |   33 +
 ...i2s-do-not-warn-if-muxclk-is-missing.patch |   35 +
 ...egulator-mcp16502-add-linear_min_sel.patch |   30 +
 ...02-adapt-for-get-set-on-other-regist.patch |  122 +
 ...-mcp16502-add-support-for-ramp-delay.patch |  146 ++
 ...02-remove-void-documentation-of-stru.patch |   32 +
 ...alidate-selector-against-linear_min_.patch |   71 +
 ...re-do-not-continue-if-selector-match.patch |   31 +
 ...eturn-zero-for-selectors-lower-than-.patch |   71 +
 ...02-lpm-pin-can-be-optional-on-some-p.patch |   35 +
 ...4-add-support-for-fewer-lines-on-las.patch |   75 +
 ...ac-adapt-perid-for-mem2mem-operation.patch |   55 +
 ...ac-add-support-for-sama7g5-based-at_.patch |  285 +++
 ...ac-add-AXI-priority-support-and-reco.patch |  118 +
 ...t-usage-of-MACB_CAPS_CLK_HW_CHG-flag.patch |   50 +
 ...0-SiP-types-added-to-soc-description.patch |   50 +
 .../137-drivers-soc-atmel-use-GENMASK.patch   |   30 +
 ...l-fix-__initconst-should-be-placed-a.patch |   31 +
 ...l-add-per-soc-id-and-version-match-m.patch |  355 +++
 ...rs-soc-atmel-add-support-for-sama7g5.patch |   94 +
 ...oc-atmel-add-spdx-license-identifier.patch |   56 +
 ...drivers-soc-atmel-fix-type-for-same7.patch |   33 +
 ...ers-timer-microchip-pit64b-Add-clock.patch |  178 ++
 ...dc-Use-managed-DMA-buffer-allocation.patch |  140 ++
 ...-sama5d2_shdwc-add-support-for-sama7.patch |  146 ++
 ...-at91-pio4-add-support-for-slew-rate.patch |  126 +
 ...4-fix-Prefer-unsigned-int-to-bare-us.patch |  345 +++
 ...ault-usrio-config-to-default-gem-con.patch |   63 +
 ...-prototypes-to-mutually-included-hea.patch |  118 +
 ...p-i2s-mcc-Add-compatible-for-SAMA7G5.patch |   53 +
 ...c-Add-multi-channel-support-for-I2S-.patch |  118 +
 ...s-mcc-Add-support-to-select-TDM-pins.patch |  113 +
 ...-ASoC-mchp-i2s-mcc-Add-FIFOs-support.patch |  192 ++
 ...-at91-pio4-Fix-slew-rate-disablement.patch |   54 +
 ...-media-atmel-properly-get-pm_runtime.patch |  166 ++
 ...l-isc-Remove-redundant-assignment-to.patch |   37 +
 ...l-isc-specialize-gamma-table-into-pr.patch |  196 ++
 ...l-isc-specialize-driver-name-constan.patch |   79 +
 ...l-isc-add-checks-for-limiting-frame-.patch | 

[PATCH 2/4] uboot-at91: update to linux4sam-2021.10

2022-02-04 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Update uboot-at91 to linux4sam-2021.10 version.

Signed-off-by: Claudiu Beznea 
---
 package/boot/uboot-at91/Makefile  |  6 +--
 .../patches/001-fix-Wformat-security.patch| 49 +--
 ...10-fix_dtc_compilation_on_host_gcc10.patch | 46 -
 3 files changed, 38 insertions(+), 63 deletions(-)
 delete mode 100644 
package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch

diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index ad65247e3e53..7052329ecd5e 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -7,13 +7,13 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_VERSION:=linux4sam-2020.04
+PKG_VERSION:=linux4sam-2021.10
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/linux4sam/u-boot-at91.git
-PKG_MIRROR_HASH:=4f106d215c01c4d024c4612bbd3ef189188d19abc1ab2cc316b257d308534feb
-PKG_SOURCE_VERSION:=0e1d1b6efb7f8e27c372279a906fcd2524df09da
+PKG_MIRROR_HASH:=f1190062f2012b182b45b78263a4cce4ada9b7b8d6f5a66d68fa51437105fc8c
+PKG_SOURCE_VERSION:=39854ce82232cdc05c20158d0439bdbc40991e4a
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch 
b/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
index 4c968a2448ae..d39a91aaf04a 100644
--- a/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
+++ b/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
@@ -1,17 +1,46 @@
+From 3b05406c02070df3e7f19399d81ebd35ed6deae5 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea 
+Date: Tue, 12 Oct 2021 17:43:28 +0300
+Subject: [PATCH] fix -Wformat-security
+
+Signed-off-by: Claudiu Beznea 
+---
+ cmd/panic.c  | 2 +-
+ cmd/version.c| 2 +-
+ drivers/pinctrl/pinctrl-uclass.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/cmd/panic.c b/cmd/panic.c
+index f13b3f094fab..197e2d0870ff 100644
+--- a/cmd/panic.c
 b/cmd/panic.c
+@@ -11,7 +11,7 @@ static int do_panic(struct cmd_tbl *cmdtp, int flag, int 
argc,
+ {
+   char *text = (argc < 2) ? "" : argv[1];
+ 
+-  panic(text);
++  panic("%s\n", text);
+ 
+   return CMD_RET_SUCCESS;
+ }
+diff --git a/cmd/version.c b/cmd/version.c
+index 3686b8733249..35b52c48171d 100644
 --- a/cmd/version.c
 +++ b/cmd/version.c
-@@ -18,7 +18,7 @@ static int do_version(cmd_tbl_t *cmdtp,
+@@ -19,7 +19,7 @@ static int do_version(struct cmd_tbl *cmdtp, int flag, int 
argc,
  {
char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
  
 -  printf(display_options_get_banner(false, buf, sizeof(buf)));
-+  printf("%s",display_options_get_banner(false, buf, sizeof(buf)));
++  printf("%s", display_options_get_banner(false, buf, sizeof(buf)));
  #ifdef CC_VERSION_STRING
puts(CC_VERSION_STRING "\n");
  #endif
+diff --git a/drivers/pinctrl/pinctrl-uclass.c 
b/drivers/pinctrl/pinctrl-uclass.c
+index b0f30aa1f758..aa62a890609a 100644
 --- a/drivers/pinctrl/pinctrl-uclass.c
 +++ b/drivers/pinctrl/pinctrl-uclass.c
-@@ -368,7 +368,7 @@ int pinctrl_get_pin_name(struct udevice
+@@ -371,7 +371,7 @@ int pinctrl_get_pin_name(struct udevice *dev, int 
selector, char *buf,
if (!ops->get_pin_name)
return -ENOSYS;
  
@@ -20,14 +49,6 @@
  
return 0;
  }
 a/lib/efi_loader/efi_variable.c
-+++ b/lib/efi_loader/efi_variable.c
-@@ -522,7 +522,7 @@ efi_status_t EFIAPI efi_set_variable(u16
- 
-   if (old_size)
-   /* APPEND_WRITE */
--  s += sprintf(s, old_val);
-+  s += sprintf(s, "%s", old_val);
-   else
-   s += sprintf(s, "(blob)");
- 
+-- 
+2.33.0
+
diff --git 
a/package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch 
b/package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch
deleted file mode 100644
index 6abb15160812..
--- 
a/package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From e33a814e772cdc36436c8c188d8c42d019fda639 Mon Sep 17 00:00:00 2001
-From: Dirk Mueller 
-Date: Tue, 14 Jan 2020 18:53:41 +0100
-Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration
-
-gcc 10 will default to -fno-common, which causes this error at link
-time:
-
-  (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from 
plugin):(.text+0x0): first defined here
-
-This is because both dtc-lexer as well as dtc-parser define the same
-global symbol yyloc. Before with -fcommon those were merged into one
-defintion. The proper solution would be to to mark this as "extern",
-however that leads to:
-
-  

[PATCH 0/4] at91: add support for sama7g5 SoC and sama7g5-ek board

2022-02-04 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hi,

The following patches add support for Microchip SAMA7G5 SoC by
backporting the remaining patches from mainline kernel. Along with SoC
support board support has been added (board is called SAMA7G5-EK).

Patches 1/4, 2/4 are preparatory patches to update AT91Bootstrap and
U-Boot AT91.

Thank you,
Claudiu Beznea

Claudiu Beznea (4):
  at91bootstrap: update to v3.10.4, v4.0.1
  uboot-at91: update to linux4sam-2021.10
  at91: add kernel support for sama7g5 soc
  at91: add support for sama7g5-ek board

 package/boot/at91bootstrap/Makefile   |   26 +-
 package/boot/at91bootstrap/at91bootstrap.mk   |2 +-
 ...ile-Remove-nostartfiles-from-LDFLAGS.patch |   38 -
 package/boot/uboot-at91/Makefile  |   15 +-
 .../patches/001-fix-Wformat-security.patch|   49 +-
 ...10-fix_dtc_compilation_on_host_gcc10.patch |   46 -
 target/linux/at91/Makefile|2 +-
 .../at91/base-files/etc/board.d/02_network|2 +-
 target/linux/at91/image/sama7.mk  |   57 +
 target/linux/at91/image/uboot-env.txt |7 +-
 ...s-clock-at91-add-sama7g5-pll-defines.patch |   72 +
 ...-allow-SYS-and-CPU-PLLs-to-be-export.patch |   46 +
 ...aster-add-5th-divisor-for-mck-master.patch |   49 +
 ...-add-5th-divisor-for-mck0-layout-and.patch |   41 +
 ...9x60-pll-allow-runtime-changes-for-p.patch |  521 
 ...-remove-mck0-from-parent-list-of-oth.patch |  201 ++
 ...5-decrease-lower-limit-for-MCK0-rate.patch |   35 +
 ...-do-not-allow-cpu-pll-to-go-higher-t.patch |  226 ++
 ...91-clk-master-re-factor-master-clock.patch | 1261 ++
 ...-clk-at91-sama7g5-register-cpu-clock.patch |   72 +
 ...91-Fix-the-declaration-of-the-clocks.patch |  202 ++
 ...ial-typo-fixes-in-the-file-sama7g5.c.patch |   50 +
 ...-remove-all-kernel-doc-kernel-doc-wa.patch |   95 +
 ...serio-bits-as-platform-configuration.patch |  186 ++
 ...capability-to-not-set-the-clock-rate.patch |   92 +
 ...-function-to-disable-all-macb-clocks.patch |   87 +
 ...-unprepare-clocks-in-case-of-failure.patch |   65 +
 ...dd-support-for-sama7g5-gem-interface.patch |   59 +
 ...d-support-for-sama7g5-emac-interface.patch |   44 +
 ...-ASoC-pcm5102a-Make-codec-selectable.patch |   33 +
 ...i2s-do-not-warn-if-muxclk-is-missing.patch |   35 +
 ...egulator-mcp16502-add-linear_min_sel.patch |   30 +
 ...02-adapt-for-get-set-on-other-regist.patch |  122 +
 ...-mcp16502-add-support-for-ramp-delay.patch |  146 ++
 ...02-remove-void-documentation-of-stru.patch |   32 +
 ...alidate-selector-against-linear_min_.patch |   71 +
 ...re-do-not-continue-if-selector-match.patch |   31 +
 ...eturn-zero-for-selectors-lower-than-.patch |   71 +
 ...02-lpm-pin-can-be-optional-on-some-p.patch |   35 +
 ...4-add-support-for-fewer-lines-on-las.patch |   75 +
 ...ac-adapt-perid-for-mem2mem-operation.patch |   55 +
 ...ac-add-support-for-sama7g5-based-at_.patch |  285 +++
 ...ac-add-AXI-priority-support-and-reco.patch |  118 +
 ...t-usage-of-MACB_CAPS_CLK_HW_CHG-flag.patch |   50 +
 ...0-SiP-types-added-to-soc-description.patch |   50 +
 .../137-drivers-soc-atmel-use-GENMASK.patch   |   30 +
 ...l-fix-__initconst-should-be-placed-a.patch |   31 +
 ...l-add-per-soc-id-and-version-match-m.patch |  355 +++
 ...rs-soc-atmel-add-support-for-sama7g5.patch |   94 +
 ...oc-atmel-add-spdx-license-identifier.patch |   56 +
 ...drivers-soc-atmel-fix-type-for-same7.patch |   33 +
 ...ers-timer-microchip-pit64b-Add-clock.patch |  178 ++
 ...dc-Use-managed-DMA-buffer-allocation.patch |  140 ++
 ...-sama5d2_shdwc-add-support-for-sama7.patch |  146 ++
 ...-at91-pio4-add-support-for-slew-rate.patch |  126 +
 ...4-fix-Prefer-unsigned-int-to-bare-us.patch |  345 +++
 ...ault-usrio-config-to-default-gem-con.patch |   63 +
 ...-prototypes-to-mutually-included-hea.patch |  118 +
 ...p-i2s-mcc-Add-compatible-for-SAMA7G5.patch |   53 +
 ...c-Add-multi-channel-support-for-I2S-.patch |  118 +
 ...s-mcc-Add-support-to-select-TDM-pins.patch |  113 +
 ...-ASoC-mchp-i2s-mcc-Add-FIFOs-support.patch |  192 ++
 ...-at91-pio4-Fix-slew-rate-disablement.patch |   54 +
 ...-media-atmel-properly-get-pm_runtime.patch |  166 ++
 ...l-isc-Remove-redundant-assignment-to.patch |   37 +
 ...l-isc-specialize-gamma-table-into-pr.patch |  196 ++
 ...l-isc-specialize-driver-name-constan.patch |   79 +
 ...l-isc-add-checks-for-limiting-frame-.patch |   50 +
 ...l-isc-specialize-max-width-and-max-h.patch |  140 ++
 ...a-atmel-atmel-isc-specialize-dma-cfg.patch |   69 +
 ...l-isc-extract-CSC-submodule-config-i.patch |  103 +
 ...l-isc-base-add-id-to-clock-debug-mes.patch |   33 +
 ...l-isc-create-register-offsets-struct.patch |  126 +
 ...l-isc-extract-CBC-submodule-config-i.patch |   89 +
 

[PATCH 1/4] at91bootstrap: update to v3.10.4, v4.0.1

2022-02-04 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
AT91Bootstrap version 4 is available only for SAM9X60, SAMA5D2, SAMA5D3,
SAMA5D4, SAMA7G5. Thus use v4.0.1 for the above targets and v3.10.4 for
the rest of them. With the switch to v4 AT91Bootstrap binaries are now
on build/binaries. Take also this into account. Also, patches directory
is not needed anymore with the version update.

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile   | 17 +++--
 package/boot/at91bootstrap/at91bootstrap.mk   |  2 +-
 ...ile-Remove-nostartfiles-from-LDFLAGS.patch | 38 ---
 3 files changed, 15 insertions(+), 42 deletions(-)
 delete mode 04 package/boot/at91bootstrap/patches
 delete mode 100644 
package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 2d77f7099721..a06eea90a416 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -9,13 +9,24 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=at91bootstrap
-PKG_VERSION:=v3.9.3
+PKG_VERSION:=v4.0.1
+PKG_MIRROR_HASH:=3d45a4bcb52162097d4cdf042b8fe1ccf53e88b512e7541f42a23f2a73692a69
+PKG_SOURCE_VERSION:=4d41296e9ae12379555fb46a941897e7264600a2
+BINARIES_DIR:=build/binaries
+
+ifdef CONFIG_TARGET_at91_sam9x
+  ifndef CONFIG_TARGET_at91_sam9x_DEVICE_microchip_sam9x60ek
+PKG_VERSION=v3.10.4
+
PKG_MIRROR_HASH=6fe61fe90838e785917383bb9e887fa05e1bd061a6725954242f504e38b5c426
+PKG_SOURCE_VERSION=404846dd283894367a015ca59189bcf927d92e11
+BINARIES_DIR=binaries
+  endif
+endif
+
 PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/linux4sam/at91bootstrap.git
-PKG_MIRROR_HASH:=06753d673756edc9753932db00f4e5b8c1f9fa7708337c4d6ce280573efb86b4
-PKG_SOURCE_VERSION:=d96833a4b6680b237708eb4dc9f10708b9e709d8
 PKG_BUILD_DIR = \
$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
diff --git a/package/boot/at91bootstrap/at91bootstrap.mk 
b/package/boot/at91bootstrap/at91bootstrap.mk
index fe6577f58927..d4e807d9a219 100644
--- a/package/boot/at91bootstrap/at91bootstrap.mk
+++ b/package/boot/at91bootstrap/at91bootstrap.mk
@@ -5,7 +5,7 @@ PKG_FLAGS:=nonshared
 export GCC_HONOUR_COPTS=s
 
 define Package/at91bootstrap/install/default
-   $(CP) -avL $(PKG_BUILD_DIR)/binaries/at91bootstrap.bin $(1)/
+   $(CP) -avL $(PKG_BUILD_DIR)/$(BINARIES_DIR)/at91bootstrap.bin $(1)/
 endef
 
 Package/at91bootstrap/install = $(Package/at91bootstrap/install/default)
diff --git 
a/package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch
 
b/package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch
deleted file mode 100644
index 9d48758bdad2..
--- 
a/package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 59c8963d8e6a08222616d1b384e1009ba05e6b82 Mon Sep 17 00:00:00 2001
-From: Chris Elledge 
-Date: Tue, 8 Jun 2021 14:01:14 -0400
-Subject: Makefile: Remove -nostartfiles from LDFLAGS
-
-Binutils linker ld does not support the flag -nostartfiles.
-This is interpreted as "-n -o startfiles" which fortunately has no impact
-on the build process. Removing -nostartfiles has no impact on the build.
-
-Binutils 2.36 and later ld has improved flag parsing and throws an error if
--nostartfiles is passed as an argument. Removing the flag fixes the problem.
-
-Details on the Binutils ML:
-https://sourceware.org/pipermail/binutils/2021-June/116826.html
-
-In our ld command line there are explicit
--n -o $(BINDIR)/$(BOOT_NAME).elf options,
-hence removing -nostartfiles will not alter the build.
-
-Signed-off-by: Chris Elledge 
-Reviewed-by: Aubin Constans 
-[eugen.hris...@microchip.com: ported to at91bootstrap4]
-Signed-off-by: Eugen Hristev 

- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
 a/Makefile
-+++ b/Makefile
-@@ -275,7 +275,7 @@ endif
- #--cref:add cross reference to map file
- #  -lc   :tells the linker to tie in newlib
- #  -lgcc   :  tells the linker to tie in newlib
--LDFLAGS=-nostartfiles -Map=$(BINDIR)/$(BOOT_NAME).map --cref -static
-+LDFLAGS=-Map=$(BINDIR)/$(BOOT_NAME).map --cref -static
- LDFLAGS+=-T $(link_script) $(GC_SECTIONS) -Ttext $(LINK_ADDR)
- 
- ifneq ($(DATA_SECTION_ADDR),)
-- 
2.33.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 4/4] at91: add support for sama7g5-ek board

2022-02-04 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA7G5-EK board.
Hardware:
- SoC: SAMA7G5
- RAM: Aliance Memory AS4C256M16D3LC (4 Gbit DDR3L)
- SD/MMC: 1 standard 4bit SD Card interface
- USB: 1 Micro-AB host/device, 1 Type-A host, 1 Type-C host
- CAN: 2 interfaces
- Ethernet: 10/100 port, 1Gbps port
- Wi-Fi/BT: 1 optional interface
- Audio: 1 SPDIF RX port, 1 SPDIF TX port, 4 digital microphones
- Camera: 1 RPi CSI camera interface
- Debug: 1 J-Link-OB + CDC, 1 JTAG
- LEDs: 1 RGB
- Buttons: 4 push buttons
- Expansions: 1 RPi Expansion connector, 2 mikroBUS connectors
- Power management: 1 power management IC, 1 power consumption
  measurement device

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile   |  9 ++-
 package/boot/uboot-at91/Makefile  |  9 ++-
 .../at91/base-files/etc/board.d/02_network|  2 +-
 target/linux/at91/image/sama7.mk  | 57 +++
 target/linux/at91/image/uboot-env.txt |  7 ++-
 5 files changed, 78 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/at91/image/sama7.mk

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index a06eea90a416..41ccea479020 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -165,6 +165,12 @@ define AT91Bootstrap/sama5d2_ptc_eksd_uboot
   BUILD_DEVICES:=microchip_sama5d2-ptc-ek
 endef
 
+define AT91Bootstrap/sama7g5eksd_uboot
+  TITLE:=AT91Bootstrap for SAMA7G5-EK (SDCard)
+  BUILD_SUBTARGET:=sama7
+  BUILD_DEVICES:=microchip_sama7g5-ek
+endef
+
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
@@ -185,7 +191,8 @@ AT91BOOTSTRAP_TARGETS := \
sama5d27_wlsom1_eksd_uboot \
sama5d27_wlsom1_ekdf_qspi_uboot \
sama5d2_ptc_eknf_uboot \
-   sama5d2_ptc_eksd_uboot
+   sama5d2_ptc_eksd_uboot \
+   sama7g5eksd_uboot
 
 define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 7052329ecd5e..ed69b8b06c8a 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -143,6 +143,12 @@ define U-Boot/sama5d2_ptc_ek_mmc
   BUILD_DEVICES:=microchip_sama5d2-ptc-ek
 endef
 
+define U-Boot/sama7g5ek_mmc1
+  NAME:=SAMA7G5-EK (SDCard)
+  BUILD_SUBTARGET:=sama7
+  BUILD_DEVICES:=microchip_sama7g5-ek
+endef
+
 UBOOT_TARGETS := \
at91sam9m10g45ek_nandflash \
at91sam9x5ek_nandflash \
@@ -162,7 +168,8 @@ UBOOT_TARGETS := \
sama5d27_wlsom1_ek_mmc \
sama5d27_wlsom1_ek_qspiflash \
sama5d2_ptc_ek_nandflash \
-   sama5d2_ptc_ek_mmc
+   sama5d2_ptc_ek_mmc \
+   sama7g5ek_mmc1
 
 define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
diff --git a/target/linux/at91/base-files/etc/board.d/02_network 
b/target/linux/at91/base-files/etc/board.d/02_network
index 3e11f40b325b..857417c7fddc 100644
--- a/target/linux/at91/base-files/etc/board.d/02_network
+++ b/target/linux/at91/base-files/etc/board.d/02_network
@@ -8,7 +8,7 @@ board_config_update
 
 case "$(board_name)" in
 
-atmel,sama5d3-xplained)
+atmel,sama5d3-xplained|microchip,sama7g5ek)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
 
diff --git a/target/linux/at91/image/sama7.mk b/target/linux/at91/image/sama7.mk
new file mode 100644
index ..bf1704dfb337
--- /dev/null
+++ b/target/linux/at91/image/sama7.mk
@@ -0,0 +1,57 @@
+
+define Device/default-nand
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  SUBPAGESIZE := 2048
+  MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 2048
+endef
+
+define Build/at91-sdcard
+  $(if $(findstring ext4,$@), \
+  rm -f $@.boot
+  mkfs.fat -C $@.boot $(FAT32_BLOCKS)
+
+  mcopy -i $@.boot \
+   $(KDIR)/$(DEVICE_NAME)-fit-zImage.itb \
+   ::$(DEVICE_NAME)-fit.itb
+
+  mcopy -i $@.boot \
+   $(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc1/u-boot.bin \
+   ::u-boot.bin
+
+  mcopy -i $@.boot \
+   
$(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd_uboot/at91bootstrap.bin \
+   ::BOOT.bin
+
+  $(CP) uboot-env.txt $@-uboot-env.txt
+  sed -i '2d;3d' $@-uboot-env.txt
+  sed -i '2i board='"$(DEVICE_NAME)"'' $@-uboot-env.txt
+  sed -i '3i board_name='"$(firstword $(SUPPORTED_DEVICES))"'' $@-uboot-env.txt
+
+  mkenvimage -s 0x4000 -o $@-uboot.env $@-uboot-env.txt
+
+  mcopy -i $@.boot $@-uboot.env ::uboot.env
+
+  ./gen_at91_sdcard_img.sh \
+   $@.img \
+   $@.boot \
+   $(KDIR)/root.ext4 \
+   $(AT91_SD_BOOT_PARTSIZE) \
+   $(CONFIG_TARGET_ROOTFS_PARTSIZE)
+
+  gzip -nc9 $@.img > $@
+
+  rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
+endef
+
+define Device/microchip_sama7g5-ek
+  

[PATCH v5 6/6] at91: add support for sam9x60-ek board

2021-10-11 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAM9X60-EK board.

Hardware:
- SoC: SAM9X60
- RAM: Winbond W972GG6KB-25 (2Gbit DDR2)
- NAND Flash: Micron MT29F4G08ABAEA
- QSPI Flash: Microchip SST26VF064B
- EEPROM: Microchip 24AA02E48
- SDMMC: One standard 4-bit SD card interface
- USB: two stacked Type-A connectors with power switches, one micro-B
   USB device
- CAN: 2 interfaces (Microchip MCP2542)
- Ethernet: one 10/100Mbps
- WiFi/BT: one optional WiFi/Bluetooth interface
- Audio: one ClassD port
- Display: one 24-bit LCD interface
- Camera: one 12-bit image sensor interface
- IO: one IO expander (Microchip MCP23008)
- Debug ports: one J-Link-OB + CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: 4 push button switches
- Expansion: one PIO connector, one mikrobus connector
- Power management: two power regulators, two power consumption measurement
devices

Flashing:
- follow the procedure at [1]

[1] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sam9x60EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile| 14 ++
 target/linux/at91/image/sam9x.mk| 13 +++--
 3 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 8711acd286bd..2d77f7099721 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -40,6 +40,18 @@ define AT91Bootstrap/at91sam9x5eksd_uboot
   BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
 endef
 
+define AT91Bootstrap/sam9x60eknf_uboot
+  NAME:=AT91Bootstrap for SAM9X60-EK board (NandFlash)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
+define AT91Bootstrap/sam9x60eksd_uboot
+  NAME:=AT91Bootstrap for SAM9X60-EK board (SDcard)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
 define AT91Bootstrap/sama5d2_icpdf_qspi_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 ICP board (QSPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -145,6 +157,8 @@ endef
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
+   sam9x60eknf_uboot \
+   sam9x60eksd_uboot \
sama5d2_icpdf_qspi_uboot \
sama5d2_icpsd_uboot \
sama5d2_xplaineddf_uboot \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 5aade7de9cf9..ed929794bdb1 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -47,6 +47,18 @@ define U-Boot/at91sam9x5ek_mmc
  atmel_at91sam9x35ek
 endef
 
+define U-Boot/sam9x60ek_nandflash
+  NAME:=SAM9X60-EK board (NandFlash)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
+define U-Boot/sam9x60ek_mmc
+  NAME:=SAM9X60-EK board (SDcard)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
 define U-Boot/sama5d3_xplained_nandflash
   NAME:=SAMA5D3 Xplained board (NandFlash)
   BUILD_SUBTARGET:=sama5
@@ -135,6 +147,8 @@ UBOOT_TARGETS := \
at91sam9m10g45ek_nandflash \
at91sam9x5ek_nandflash \
at91sam9x5ek_mmc \
+   sam9x60ek_nandflash \
+   sam9x60ek_mmc \
sama5d3_xplained_nandflash \
sama5d3_xplained_mmc \
sama5d2_icp_mmc \
diff --git a/target/linux/at91/image/sam9x.mk b/target/linux/at91/image/sam9x.mk
index 6f10123bbaae..b6c5e33ac44f 100644
--- a/target/linux/at91/image/sam9x.mk
+++ b/target/linux/at91/image/sam9x.mk
@@ -16,11 +16,11 @@ define Build/at91-sdcard
::$(DEVICE_NAME)-fit.itb
 
   mcopy -i $@.boot \
-   $(BIN_DIR)/u-boot-at91sam9x5ek_mmc/u-boot.bin \
+   $(BIN_DIR)/u-boot-$(if $(findstring 
sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)_mmc/u-boot.bin \
::u-boot.bin
 
   mcopy -i $@.boot \
-   $(BIN_DIR)/at91bootstrap-at91sam9x5eksd_uboot/at91bootstrap.bin \
+   $(BIN_DIR)/at91bootstrap-$(if $(findstring 
sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)sd_uboot/at91bootstrap.bin \
::BOOT.bin
 
   $(CP) uboot-env.txt $@-uboot-env.txt
@@ -112,6 +112,15 @@ define Device/atmel_at91sam9x35ek
 endef
 TARGET_DEVICES += atmel_at91sam9x35ek
 
+define Device/microchip_sam9x60ek
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAM9X60-EK
+  DEVICE_DTS := at91-sam9x60ek
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sam9x60ek
+
 define Device/calamp_lmu5000
   $(Device/production)
   DEVICE_VENDOR := CalAmp
-- 
2.33.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v5 4/6] at91: add support for sama5d27-wlsom1-ek board

2021-10-11 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA5D27 WLSOM1-EK board.

Hardware:
- SIP: SAMA5D27C-LD2G-CU including SAMA5D27 MPU and 2Gbit LPDDR2-SDRAM
- MMC: one standard SD card interface
- Flash: 64 Mb serial quad I/O flash memory (SST26VF064BEUIT-104I/MF)
 with embedded EUI-48 and EUI-64 MAC addresses
- USB: one USB device, one USB host one HSIC interface
- Ethernet: 1x10/100Mbps port
- WiFi/BT: IEEE 802.11 b/g/n Wi-Fi plus Bluetooth (Wi-Fi/BT) module
   (ATWILC3000-MR110UA)
- Crypto: one ATECC608B-TNGTLS secure element
- Video: one LCD RGB 18-bit interface, one ISC 12-bit camera interface
- Debug port: one JTAG interface, one UART interface, one WILC UART
  interface
- Leds: one RGB LED
- Buttons: start, reset, wakeup, user buttons
- Expansion: one tamper connector, one mikrobus interface, 2 XPRO PTC
 connector
- Power managament: PMIC (MCP16502)

Flashing:
- follow procedure at [1]

[1] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d27WLSom1EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile| 14 ++
 target/linux/at91/image/sama5.mk| 11 +++
 3 files changed, 39 insertions(+)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 56e14c57703c..8711acd286bd 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -118,6 +118,18 @@ define AT91Bootstrap/sama5d27_som1_ekqspi_uboot
   BUILD_DEVICES:=microchip_sama5d27-som1-ek
 endef
 
+define AT91Bootstrap/sama5d27_wlsom1_eksd_uboot
+  TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (SDcard0)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
+define AT91Bootstrap/sama5d27_wlsom1_ekdf_qspi_uboot
+  TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
 define AT91Bootstrap/sama5d2_ptc_eknf_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 PTC EK (Nand Flash)
   BUILD_SUBTARGET:=sama5
@@ -145,6 +157,8 @@ AT91BOOTSTRAP_TARGETS := \
sama5d4_xplainedsd_uboot_secure \
sama5d27_som1_eksd1_uboot \
sama5d27_som1_ekqspi_uboot \
+   sama5d27_wlsom1_eksd_uboot \
+   sama5d27_wlsom1_ekdf_qspi_uboot \
sama5d2_ptc_eknf_uboot \
sama5d2_ptc_eksd_uboot
 
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 193f26dae471..5aade7de9cf9 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -107,6 +107,18 @@ define U-Boot/sama5d27_som1_ek_qspiflash
   BUILD_DEVICES:=microchip_sama5d27-som1-ek
 endef
 
+define U-Boot/sama5d27_wlsom1_ek_mmc
+  NAME:=SAMA5D27 WLSOM1 Ek (SDCard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
+define U-Boot/sama5d27_wlsom1_ek_qspiflash
+  NAME:=SAMA5D27 WLSOM1 Ek (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
 define U-Boot/sama5d2_ptc_ek_nandflash
   NAME:=SAMA5D2 PTC Ek (Nand Flash)
   BUILD_SUBTARGET:=sama5
@@ -133,6 +145,8 @@ UBOOT_TARGETS := \
sama5d4_xplained_nandflash\
sama5d27_som1_ek_mmc1 \
sama5d27_som1_ek_qspiflash \
+   sama5d27_wlsom1_ek_mmc \
+   sama5d27_wlsom1_ek_qspiflash \
sama5d2_ptc_ek_nandflash \
sama5d2_ptc_ek_mmc
 
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index ae3494332139..9078db525f97 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -87,6 +87,17 @@ define Device/microchip_sama5d27-som1-ek
 endef
 TARGET_DEVICES += microchip_sama5d27-som1-ek
 
+define Device/microchip_sama5d27-wlsom1-ek
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAMA5D27 WSOM1 Ek
+  DEVICE_DTS := at91-sama5d27_wlsom1_ek
+  SUPPORTED_DEVICES := microchip,sama5d27-wlsom1-ek
+  KERNEL_SIZE := 6144k
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sama5d27-wlsom1-ek
+
 define Device/microchip_sama5d2-ptc-ek
   $(Device/evaluation-dtb)
   DEVICE_VENDOR := Microchip
-- 
2.33.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v5 3/6] at91: add support for sama5d2 icp board

2021-10-11 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA5D2 ICP board.

Hardware:
- SoC: SAMA5D27
- RAM: 512 MB DDR3L
- MMC: One stanard SD card interface
- USB: One USB host switch 4 ports with power switch,
   One USB device type Micro-AB
- CAN: 2 interfaces
- Ethernet: One Gigabit Ethernet PHY through HSIC,
One ETH switchport,
One EtherCAT interface
- WiFi/BT: Footprint for IEEE 802.11 b/g/n Wi-Fi plus
   Bluetooth module (Wi-Fi/BT), suitable for
   Microchip WILC3000-MR110CA or WILC3000-MR110UA
- Debug port: One J-Link-OB/J-Link-CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: reset, wakeup, 2 user buttons
- Expansion: one PIOBU/PIO connector, 3 mikrobus sockets
- Power mangament: PMIC (MCP16502), one power consumption device
   (PAC1934)

Not working in Linux:
- EtherCAT interface: there is no Linux support integrated
- PAC1934: driver available at [1] but not integrated in Linux

Flashing:
- follow the procedure at [2]

[1] https://ww1.microchip.com/downloads/en/DeviceDoc/pac193x_linux_driver.zip
[2] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d2IcpMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile|  7 +++
 target/linux/at91/image/sama5.mk| 11 +++
 3 files changed, 32 insertions(+)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index f66472fa9c29..56e14c57703c 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -40,6 +40,18 @@ define AT91Bootstrap/at91sam9x5eksd_uboot
   BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
 endef
 
+define AT91Bootstrap/sama5d2_icpdf_qspi_uboot
+  TITLE:=AT91Bootstrap for SAMA5D2 ICP board (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
+define AT91Bootstrap/sama5d2_icpsd_uboot
+  TITLE:=AT91Bootstrap for SAMA5D2 ICP board (SDcard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
 define AT91Bootstrap/sama5d2_xplaineddf_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -121,6 +133,8 @@ endef
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
+   sama5d2_icpdf_qspi_uboot \
+   sama5d2_icpsd_uboot \
sama5d2_xplaineddf_uboot \
sama5d2_xplaineddf_qspi_uboot \
sama5d2_xplainedsd_uboot \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index a8a71239a398..193f26dae471 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -59,6 +59,12 @@ define U-Boot/sama5d3_xplained_mmc
   BUILD_DEVICES:=microchip_sama5d3-xplained
 endef
 
+define U-Boot/sama5d2_icp_mmc
+  NAME:=SAMA5D2 ICP board (SDCard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
 define U-Boot/sama5d2_xplained_spiflash
   NAME:=SAMA5D2 Xplained board (SPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -119,6 +125,7 @@ UBOOT_TARGETS := \
at91sam9x5ek_mmc \
sama5d3_xplained_nandflash \
sama5d3_xplained_mmc \
+   sama5d2_icp_mmc \
sama5d2_xplained_mmc \
sama5d2_xplained_spiflash \
sama5d4_xplained_mmc \
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index f8e05aae9343..ae3494332139 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -54,6 +54,17 @@ define Build/at91-sdcard
   rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
 endef
 
+define Device/microchip_sama5d2-icp
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAMA5D2 ICP
+  DEVICE_DTS := at91-sama5d2_icp
+  SUPPORTED_DEVICES := microchip,sama5d2-icp
+  KERNEL_SIZE := 6144k
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sama5d2-icp
+
 define Device/microchip_sama5d2-xplained
   $(Device/evaluation-dtb)
   DEVICE_VENDOR := Microchip
-- 
2.33.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v5 1/6] at91: kernel: bump to 5.10

2021-10-11 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Bump at91 targets to kernel v5.10. With this patches and files for
wb45n and wb50n were removed as they are now included in upstream
kernel. Along with:
- this the kernel config for sama5d2 and sam9x targets has been
  refreshed (with make kernel_menuconfig + save);
- CONFIG_ARCH_AT91 and specific sam9x SoCs (AT91RM9200, AT91SAM9,
  SAM9X60) has been enabled such that sam9x SoCs to be able to boot.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/Makefile|   2 +-
 .../at91/files/arch/arm/boot/dts/wb45n.dts| 220 --
 .../at91/files/arch/arm/boot/dts/wb50n.dts| 113 -
 .../at91/files/arch/arm/boot/dts/wb50n.dtsi   | 205 
 target/linux/at91/image/sam9x.mk  |   1 +
 target/linux/at91/image/sama5.mk  |   1 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 -
 .../102-ARM-at91-build-dtb-for-wb45n.patch|  12 -
 ...2-ARM-at91-wb45n-fix-duplicate-label.patch |  20 --
 .../103-ARM-at91-build-dtb-for-wb50n.patch|  12 -
 ...3-ARM-at91-wb50n-fix-duplicate-label.patch |  39 
 target/linux/at91/sam9x/config-default| 133 ++-
 target/linux/at91/sama5/config-default| 110 +++--
 14 files changed, 109 insertions(+), 779 deletions(-)
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi
 create mode 04 target/linux/at91/patches-5.10
 create mode 100644 
target/linux/at91/patches-5.10/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 04 target/linux/at91/patches-5.4
 delete mode 100644 
target/linux/at91/patches-5.4/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-build-dtb-for-wb45n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-wb45n-fix-duplicate-label.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-build-dtb-for-wb50n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-wb50n-fix-duplicate-label.patch

diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile
index fe6a93244a5f..e4da7fb7e7da 100644
--- a/target/linux/at91/Makefile
+++ b/target/linux/at91/Makefile
@@ -10,7 +10,7 @@ BOARDNAME:=Microchip (Atmel AT91)
 FEATURES:=ext4 squashfs targz usb usbgadget ubifs
 SUBTARGETS:=sama5 sam9x
 
-KERNEL_PATCHVER:=5.4
+KERNEL_PATCHVER:=5.10
 
 include $(INCLUDE_DIR)/target.mk
 
diff --git a/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts 
b/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
deleted file mode 100644
index fd9d260f2ab5..
--- a/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
+++ /dev/null
@@ -1,220 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * wb45n.dts - Device Tree file for WB45NBT board
- *
- *  Copyright (C) 2015 Laird
- */
-
-/dts-v1/;
-#include "at91sam9g25.dtsi"
-
-/ {
-   model = "Laird Workgroup Bridge 45N - Atmel AT91SAM (dt)";
-   compatible = "laird,wb45n", "laird,wbxx", "atmel,at91sam9x5", 
"atmel,at91sam9";
-
-   chosen {
-   bootargs = "console=ttyS0,115200 root=/dev/mtdblock1 rw 
rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs";
-   };
-
-   memory {
-   reg = <0x2000 0x400>;
-   };
-
-   clocks {
-   #address-cells = <1>;
-   #size-cells = <1>;
-   ranges;
-
-   main_clock: clock@0 {
-   compatible = "atmel,osc", "fixed-clock";
-   clock-frequency = <1200>;
-   };
-
-   slow_xtal {
-   clock-frequency = <32768>;
-   };
-
-   main_xtal {
-   clock-frequency = <1200>;
-   };
-   };
-
-   ahb {
-   apb {
-
-   rstc@fe00 {
-   compatible = "atmel,sama5d3-rstc";
-   };
-
-   pinctrl@f400 {
-   nand {
-   pinctrl_nand: nand-0 {
-   atmel,pins =
-   ;  /* PD5 gpio RDY/BUSY pin pull_up */
-   };
-   };
-
-   usb2 {
-   pinctrl_board_usb2: usb2-board {
-   atmel,pins =
-   ;  /* 

[PATCH v5 5/6] at91: enable kernel config for sam9x60

2021-10-11 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Enable kernel config for SAM9X60.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/sam9x/config-default | 29 --
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/target/linux/at91/sam9x/config-default 
b/target/linux/at91/sam9x/config-default
index 51a746b7f052..95c229880bb9 100644
--- a/target/linux/at91/sam9x/config-default
+++ b/target/linux/at91/sam9x/config-default
@@ -15,6 +15,7 @@ CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
+CONFIG_ARM_CPU_SUSPEND=y
 CONFIG_ARM_HAS_SG_CHAIN=y
 CONFIG_ARM_L1_CACHE_SHIFT=5
 CONFIG_ARM_PATCH_PHYS_VIRT=y
@@ -22,6 +23,8 @@ CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 # CONFIG_AT91RM9200_WATCHDOG is not set
 CONFIG_AT91SAM9X_WATCHDOG=y
+# CONFIG_AT91_ADC is not set
+CONFIG_AT91_SAMA5D2_ADC=y
 CONFIG_AT91_SOC_ID=y
 # CONFIG_AT91_SOC_SFR is not set
 CONFIG_ATMEL_AIC5_IRQ=y
@@ -30,16 +33,19 @@ CONFIG_ATMEL_CLOCKSOURCE_PIT=y
 CONFIG_ATMEL_CLOCKSOURCE_TCB=y
 CONFIG_ATMEL_EBI=y
 CONFIG_ATMEL_PIT=y
+CONFIG_ATMEL_PM=y
 CONFIG_ATMEL_SDRAMC=y
 CONFIG_ATMEL_SSC=y
 CONFIG_ATMEL_ST=y
 CONFIG_ATMEL_TCB_CLKSRC=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_AT_HDMAC=y
-# CONFIG_AT_XDMAC is not set
+CONFIG_AT_XDMAC=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_PM=y
 CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLKSRC_MMIO=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_AT91=y
@@ -60,6 +66,7 @@ CONFIG_CPU_CP15_MMU=y
 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
 CONFIG_CPU_NO_EFFICIENT_FFS=y
 CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_PM=y
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V4WBI=y
 CONFIG_CPU_USE_DOMAINS=y
@@ -89,8 +96,10 @@ CONFIG_EEPROM_AT24=y
 CONFIG_EXT4_FS=y
 CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FREEZER=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
+CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ATOMIC64=y
@@ -132,6 +141,11 @@ CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_COMPAT=y
 CONFIG_I2C_GPIO=y
+CONFIG_IIO=y
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_KFIFO_BUF=y
+CONFIG_IIO_TRIGGER=y
+CONFIG_IIO_TRIGGERED_BUFFER=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INPUT=y
 CONFIG_IRQCHIP=y
@@ -155,11 +169,13 @@ CONFIG_MDIO_DEVRES=y
 CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
 CONFIG_MFD_AT91_USART=y
+CONFIG_MFD_ATMEL_FLEXCOM=y
 CONFIG_MFD_ATMEL_HLCDC=y
 CONFIG_MFD_ATMEL_SMC=y
 CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MICREL_PHY=y
+CONFIG_MICROCHIP_PIT64B=y
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
 CONFIG_MMC_ATMELMCI=y
@@ -204,6 +220,12 @@ CONFIG_PHYLINK=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 # CONFIG_PINCTRL_AT91PIO4 is not set
+CONFIG_PINCTRL_MCP23S08=y
+CONFIG_PINCTRL_MCP23S08_I2C=y
+CONFIG_PINCTRL_MCP23S08_SPI=y
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PM_SLEEP=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_AT91_POWEROFF=y
 CONFIG_POWER_RESET_AT91_RESET=y
@@ -218,6 +240,7 @@ CONFIG_RATIONAL=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_I2C=y
 CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_RTC_CLASS=y
@@ -225,7 +248,7 @@ CONFIG_RTC_DRV_AT91RM9200=y
 CONFIG_RTC_DRV_AT91SAM9=y
 CONFIG_RTC_I2C_AND_SPI=y
 CONFIG_RTC_MC146818_LIB=y
-# CONFIG_SAMA5D4_WATCHDOG is not set
+CONFIG_SAMA5D4_WATCHDOG=y
 # CONFIG_SERIAL_8250 is not set
 CONFIG_SERIAL_ATMEL=y
 CONFIG_SERIAL_ATMEL_CONSOLE=y
@@ -252,6 +275,8 @@ CONFIG_SPLIT_PTLOCK_CPUS=99
 CONFIG_SRAM=y
 CONFIG_SRAM_EXEC=y
 CONFIG_SRCU=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
 CONFIG_SWPHY=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_TICK_CPU_ACCOUNTING=y
-- 
2.33.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v5 2/6] at91: enable specific sam9x kernel config flags

2021-10-11 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Enable specific sam9x kernel config flags.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/sam9x/config-default | 112 +++--
 1 file changed, 106 insertions(+), 6 deletions(-)

diff --git a/target/linux/at91/sam9x/config-default 
b/target/linux/at91/sam9x/config-default
index 51d1e763cf0b..51a746b7f052 100644
--- a/target/linux/at91/sam9x/config-default
+++ b/target/linux/at91/sam9x/config-default
@@ -21,7 +21,7 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 # CONFIG_AT91RM9200_WATCHDOG is not set
-# CONFIG_AT91SAM9X_WATCHDOG is not set
+CONFIG_AT91SAM9X_WATCHDOG=y
 CONFIG_AT91_SOC_ID=y
 # CONFIG_AT91_SOC_SFR is not set
 CONFIG_ATMEL_AIC5_IRQ=y
@@ -31,9 +31,12 @@ CONFIG_ATMEL_CLOCKSOURCE_TCB=y
 CONFIG_ATMEL_EBI=y
 CONFIG_ATMEL_PIT=y
 CONFIG_ATMEL_SDRAMC=y
+CONFIG_ATMEL_SSC=y
 CONFIG_ATMEL_ST=y
 CONFIG_ATMEL_TCB_CLKSRC=y
-# CONFIG_ATMEL_TCLIB is not set
+CONFIG_ATMEL_TCLIB=y
+CONFIG_AT_HDMAC=y
+# CONFIG_AT_XDMAC is not set
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
 CONFIG_CLKDEV_LOOKUP=y
@@ -60,20 +63,34 @@ CONFIG_CPU_PABRT_LEGACY=y
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V4WBI=y
 CONFIG_CPU_USE_DOMAINS=y
+CONFIG_CRC16=y
 CONFIG_CRC7=y
 CONFIG_CRC_CCITT=y
 CONFIG_CRC_ITU_T=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_GF128MUL=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LZO=y
 CONFIG_CRYPTO_NULL2=y
 CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_ZSTD=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
 CONFIG_DMA_OPS=y
 CONFIG_DMA_REMAP=y
 CONFIG_DTC=y
 CONFIG_EDAC_ATOMIC_SCRUB=y
 CONFIG_EDAC_SUPPORT=y
+CONFIG_EEPROM_AT24=y
+CONFIG_EXT4_FS=y
+CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ATOMIC64=y
@@ -102,34 +119,72 @@ CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_ATMEL=y
 CONFIG_HZ=128
 CONFIG_HZ_FIXED=128
 CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_AT91=y
+# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_GPIO=y
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
 CONFIG_IRQCHIP=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_GPIO=y
 CONFIG_LIBFDT=y
 CONFIG_LLD_VERSION=0
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MACB=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
 CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
-# CONFIG_MFD_AT91_USART is not set
+CONFIG_MFD_AT91_USART=y
+CONFIG_MFD_ATMEL_HLCDC=y
 CONFIG_MFD_ATMEL_SMC=y
+CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
+CONFIG_MICREL_PHY=y
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
-# CONFIG_MMC_ATMELMCI is not set
+CONFIG_MMC_ATMELMCI=y
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_OF_AT91=y
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_DATAFLASH=y
+# CONFIG_MTD_DATAFLASH_OTP is not set
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+# CONFIG_MTD_UBI_BLOCK is not set
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_GLUEBI=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_KUSER_HELPERS=y
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NLS=y
+CONFIG_NVMEM=y
+CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
@@ -137,35 +192,74 @@ CONFIG_OF_FLATTREE=y
 CONFIG_OF_GPIO=y
 CONFIG_OF_IRQ=y
 CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
 CONFIG_OF_NET=y
 CONFIG_OLD_SIGACTION=y
 CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_PAGE_OFFSET=0xC000
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 # CONFIG_PINCTRL_AT91PIO4 is not set
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_AT91_POWEROFF=y
+CONFIG_POWER_RESET_AT91_RESET=y
+CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PWM=y
+CONFIG_PWM_ATMEL=y
+CONFIG_PWM_ATMEL_HLCDC_PWM=y
+CONFIG_PWM_ATMEL_TCB=y
+CONFIG_PWM_SYSFS=y
 CONFIG_RATIONAL=y
 CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
 CONFIG_REGMAP_MMIO=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_AT91RM9200=y
+CONFIG_RTC_DRV_AT91SAM9=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_MC146818_LIB=y
 # CONFIG_SAMA5D4_WATCHDOG is not set
-CONFIG_SERIAL_8250_FSL=y
-# CONFIG_SERIAL_ATMEL is not set
+# CONFIG_SERIAL_8250 is 

[PATCH v5 0/6] at91: add support for sama5d2 icp, sama5d27 wlsom1 ek and sam9x60ek

2021-10-11 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hi,

This series adds support for SAMA5D2 ICP, SAMA5D27-WLSOM1-EK and
SAM9X60EK boards.

Since SAM9X60's kernel support is included in 5.10 but not on 5.4
1st (patch 1/6) switches to kernel 5.10.

Patches 2/6, 5/6 updates the kernel config for sam9x SoCs and sam9x60.

Patch 3/6, 4/6, 6/6 adds the boards support.

Thank you,
Claudiu Beznea

Changes in v5:
- refreshed also sama5 config-default kernel config
- on sam9x config default: removed CONFIG_INPUT_KEYBOARD, keep USB stuf
  as it is on sama5 config, removed CONFIG_SERIAL_DEV_BUS,
  CONFIG_SERIAL_DEV_CTRL_TTYPORT (as it was on sama5 config-default) -
  (in general keep it close to sama5 config-default)

Changes in v4:
- avoid selecting kernel features as modules

Changes in v3:
- squash patches "at91: use make kernel_menuconfig and save for sam9x
  kernel config" and "at91: enable CONFIG_ARCH_AT91 and specific sam9x
  SoCs" from v2 into "at91: kernel: bump to 5.10"
- keep only SoC specific and boot specific flags in pach "at91: enable
  specific sam9x kernel config flags"

Changes in v2:
- changed series title from "at91: add support for sama5d2 icp and" to
  "at91: add support for sama5d2 icp, sama5d27 wlsom1 ek and sam9x60ek"
- bump at91 to kernel 5.10
- adds sam9x60 and sam9x60ek specific support
- drop patch 1/3 from v1

Claudiu Beznea (6):
  at91: kernel: bump to 5.10
  at91: enable specific sam9x kernel config flags
  at91: add support for sama5d2 icp board
  at91: add support for sama5d27-wlsom1-ek board
  at91: enable kernel config for sam9x60
  at91: add support for sam9x60-ek board

 package/boot/at91bootstrap/Makefile   |  42 +++
 package/boot/uboot-at91/Makefile  |  35 +++
 target/linux/at91/Makefile|   2 +-
 .../at91/files/arch/arm/boot/dts/wb45n.dts| 220 ---
 .../at91/files/arch/arm/boot/dts/wb50n.dts| 113 
 .../at91/files/arch/arm/boot/dts/wb50n.dtsi   | 205 --
 target/linux/at91/image/sam9x.mk  |  14 +-
 target/linux/at91/image/sama5.mk  |  23 ++
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 -
 .../102-ARM-at91-build-dtb-for-wb45n.patch|  12 -
 ...2-ARM-at91-wb45n-fix-duplicate-label.patch |  20 --
 .../103-ARM-at91-build-dtb-for-wb50n.patch|  12 -
 ...3-ARM-at91-wb50n-fix-duplicate-label.patch |  39 ---
 target/linux/at91/sam9x/config-default| 260 +-
 target/linux/at91/sama5/config-default| 110 ++--
 16 files changed, 345 insertions(+), 782 deletions(-)
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi
 create mode 04 target/linux/at91/patches-5.10
 create mode 100644 
target/linux/at91/patches-5.10/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 04 target/linux/at91/patches-5.4
 delete mode 100644 
target/linux/at91/patches-5.4/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-build-dtb-for-wb45n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-wb45n-fix-duplicate-label.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-build-dtb-for-wb50n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-wb50n-fix-duplicate-label.patch

-- 
2.33.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v4 5/6] at91: enable kernel config for sam9x60

2021-09-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Enable kernel config for SAM9X60.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/sam9x/config-default | 29 --
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/target/linux/at91/sam9x/config-default 
b/target/linux/at91/sam9x/config-default
index a9f66766b1f2..aa29527d3467 100644
--- a/target/linux/at91/sam9x/config-default
+++ b/target/linux/at91/sam9x/config-default
@@ -15,6 +15,7 @@ CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
+CONFIG_ARM_CPU_SUSPEND=y
 CONFIG_ARM_HAS_SG_CHAIN=y
 CONFIG_ARM_L1_CACHE_SHIFT=5
 CONFIG_ARM_PATCH_PHYS_VIRT=y
@@ -22,6 +23,8 @@ CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 # CONFIG_AT91RM9200_WATCHDOG is not set
 CONFIG_AT91SAM9X_WATCHDOG=y
+# CONFIG_AT91_ADC is not set
+CONFIG_AT91_SAMA5D2_ADC=y
 CONFIG_AT91_SOC_ID=y
 # CONFIG_AT91_SOC_SFR is not set
 CONFIG_ATMEL_AIC5_IRQ=y
@@ -30,16 +33,19 @@ CONFIG_ATMEL_CLOCKSOURCE_PIT=y
 CONFIG_ATMEL_CLOCKSOURCE_TCB=y
 CONFIG_ATMEL_EBI=y
 CONFIG_ATMEL_PIT=y
+CONFIG_ATMEL_PM=y
 CONFIG_ATMEL_SDRAMC=y
 CONFIG_ATMEL_SSC=y
 CONFIG_ATMEL_ST=y
 CONFIG_ATMEL_TCB_CLKSRC=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_AT_HDMAC=y
-# CONFIG_AT_XDMAC is not set
+CONFIG_AT_XDMAC=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_PM=y
 CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLKSRC_MMIO=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_AT91=y
@@ -60,6 +66,7 @@ CONFIG_CPU_CP15_MMU=y
 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
 CONFIG_CPU_NO_EFFICIENT_FFS=y
 CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_PM=y
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V4WBI=y
 CONFIG_CPU_USE_DOMAINS=y
@@ -89,8 +96,10 @@ CONFIG_EEPROM_AT24=y
 CONFIG_EXT4_FS=y
 CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FREEZER=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
+CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ATOMIC64=y
@@ -132,6 +141,11 @@ CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_COMPAT=y
 CONFIG_I2C_GPIO=y
+CONFIG_IIO=y
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_KFIFO_BUF=y
+CONFIG_IIO_TRIGGER=y
+CONFIG_IIO_TRIGGERED_BUFFER=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INPUT=y
 CONFIG_INPUT_KEYBOARD=y
@@ -156,11 +170,13 @@ CONFIG_MDIO_DEVRES=y
 CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
 CONFIG_MFD_AT91_USART=y
+CONFIG_MFD_ATMEL_FLEXCOM=y
 CONFIG_MFD_ATMEL_HLCDC=y
 CONFIG_MFD_ATMEL_SMC=y
 CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MICREL_PHY=y
+CONFIG_MICROCHIP_PIT64B=y
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
 CONFIG_MMC_ATMELMCI=y
@@ -205,6 +221,12 @@ CONFIG_PHYLINK=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 # CONFIG_PINCTRL_AT91PIO4 is not set
+CONFIG_PINCTRL_MCP23S08=y
+CONFIG_PINCTRL_MCP23S08_I2C=y
+CONFIG_PINCTRL_MCP23S08_SPI=y
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PM_SLEEP=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_AT91_POWEROFF=y
 CONFIG_POWER_RESET_AT91_RESET=y
@@ -220,6 +242,7 @@ CONFIG_RATIONAL=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_I2C=y
 CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_RTC_CLASS=y
@@ -227,7 +250,7 @@ CONFIG_RTC_DRV_AT91RM9200=y
 CONFIG_RTC_DRV_AT91SAM9=y
 CONFIG_RTC_I2C_AND_SPI=y
 CONFIG_RTC_MC146818_LIB=y
-# CONFIG_SAMA5D4_WATCHDOG is not set
+CONFIG_SAMA5D4_WATCHDOG=y
 # CONFIG_SERIAL_8250 is not set
 CONFIG_SERIAL_ATMEL=y
 CONFIG_SERIAL_ATMEL_CONSOLE=y
@@ -256,6 +279,8 @@ CONFIG_SPLIT_PTLOCK_CPUS=99
 CONFIG_SRAM=y
 CONFIG_SRAM_EXEC=y
 CONFIG_SRCU=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
 CONFIG_SWPHY=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_TICK_CPU_ACCOUNTING=y
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v4 6/6] at91: add support for sam9x60-ek board

2021-09-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAM9X60-EK board.

Hardware:
- SoC: SAM9X60
- RAM: Winbond W972GG6KB-25 (2Gbit DDR2)
- NAND Flash: Micron MT29F4G08ABAEA
- QSPI Flash: Microchip SST26VF064B
- EEPROM: Microchip 24AA02E48
- SDMMC: One standard 4-bit SD card interface
- USB: two stacked Type-A connectors with power switches, one micro-B
   USB device
- CAN: 2 interfaces (Microchip MCP2542)
- Ethernet: one 10/100Mbps
- WiFi/BT: one optional WiFi/Bluetooth interface
- Audio: one ClassD port
- Display: one 24-bit LCD interface
- Camera: one 12-bit image sensor interface
- IO: one IO expander (Microchip MCP23008)
- Debug ports: one J-Link-OB + CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: 4 push button switches
- Expansion: one PIO connector, one mikrobus connector
- Power management: two power regulators, two power consumption measurement
devices

Flashing:
- follow the procedure at [1]

[1] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sam9x60EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile| 14 ++
 target/linux/at91/image/sam9x.mk| 13 +++--
 3 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 8711acd286bd..2d77f7099721 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -40,6 +40,18 @@ define AT91Bootstrap/at91sam9x5eksd_uboot
   BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
 endef
 
+define AT91Bootstrap/sam9x60eknf_uboot
+  NAME:=AT91Bootstrap for SAM9X60-EK board (NandFlash)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
+define AT91Bootstrap/sam9x60eksd_uboot
+  NAME:=AT91Bootstrap for SAM9X60-EK board (SDcard)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
 define AT91Bootstrap/sama5d2_icpdf_qspi_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 ICP board (QSPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -145,6 +157,8 @@ endef
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
+   sam9x60eknf_uboot \
+   sam9x60eksd_uboot \
sama5d2_icpdf_qspi_uboot \
sama5d2_icpsd_uboot \
sama5d2_xplaineddf_uboot \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 5aade7de9cf9..ed929794bdb1 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -47,6 +47,18 @@ define U-Boot/at91sam9x5ek_mmc
  atmel_at91sam9x35ek
 endef
 
+define U-Boot/sam9x60ek_nandflash
+  NAME:=SAM9X60-EK board (NandFlash)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
+define U-Boot/sam9x60ek_mmc
+  NAME:=SAM9X60-EK board (SDcard)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
 define U-Boot/sama5d3_xplained_nandflash
   NAME:=SAMA5D3 Xplained board (NandFlash)
   BUILD_SUBTARGET:=sama5
@@ -135,6 +147,8 @@ UBOOT_TARGETS := \
at91sam9m10g45ek_nandflash \
at91sam9x5ek_nandflash \
at91sam9x5ek_mmc \
+   sam9x60ek_nandflash \
+   sam9x60ek_mmc \
sama5d3_xplained_nandflash \
sama5d3_xplained_mmc \
sama5d2_icp_mmc \
diff --git a/target/linux/at91/image/sam9x.mk b/target/linux/at91/image/sam9x.mk
index 6f10123bbaae..b6c5e33ac44f 100644
--- a/target/linux/at91/image/sam9x.mk
+++ b/target/linux/at91/image/sam9x.mk
@@ -16,11 +16,11 @@ define Build/at91-sdcard
::$(DEVICE_NAME)-fit.itb
 
   mcopy -i $@.boot \
-   $(BIN_DIR)/u-boot-at91sam9x5ek_mmc/u-boot.bin \
+   $(BIN_DIR)/u-boot-$(if $(findstring 
sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)_mmc/u-boot.bin \
::u-boot.bin
 
   mcopy -i $@.boot \
-   $(BIN_DIR)/at91bootstrap-at91sam9x5eksd_uboot/at91bootstrap.bin \
+   $(BIN_DIR)/at91bootstrap-$(if $(findstring 
sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)sd_uboot/at91bootstrap.bin \
::BOOT.bin
 
   $(CP) uboot-env.txt $@-uboot-env.txt
@@ -112,6 +112,15 @@ define Device/atmel_at91sam9x35ek
 endef
 TARGET_DEVICES += atmel_at91sam9x35ek
 
+define Device/microchip_sam9x60ek
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAM9X60-EK
+  DEVICE_DTS := at91-sam9x60ek
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sam9x60ek
+
 define Device/calamp_lmu5000
   $(Device/production)
   DEVICE_VENDOR := CalAmp
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v4 1/6] at91: kernel: bump to 5.10

2021-09-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Bump at91 targets to kernel v5.10. With this patches and files for
wb45n and wb50n were removed as they are now included in upstream
kernel. Along with:
- this the kernel config for sam9x targets has been refreshed (with
  make kernel_menuconfig + save);
- CONFIG_ARCH_AT91 and specific sam9x SoCs (AT91RM9200, AT91SAM9,
  SAM9X60) has been enabled such that sam9x SoCs to be able to boot.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/Makefile|   2 +-
 .../at91/files/arch/arm/boot/dts/wb45n.dts| 220 --
 .../at91/files/arch/arm/boot/dts/wb50n.dts| 113 -
 .../at91/files/arch/arm/boot/dts/wb50n.dtsi   | 205 
 target/linux/at91/image/sam9x.mk  |   1 +
 target/linux/at91/image/sama5.mk  |   1 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 -
 .../102-ARM-at91-build-dtb-for-wb45n.patch|  12 -
 ...2-ARM-at91-wb45n-fix-duplicate-label.patch |  20 --
 .../103-ARM-at91-build-dtb-for-wb50n.patch|  12 -
 ...3-ARM-at91-wb50n-fix-duplicate-label.patch |  39 
 target/linux/at91/sam9x/config-default| 105 -
 13 files changed, 57 insertions(+), 693 deletions(-)
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi
 create mode 04 target/linux/at91/patches-5.10
 create mode 100644 
target/linux/at91/patches-5.10/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 04 target/linux/at91/patches-5.4
 delete mode 100644 
target/linux/at91/patches-5.4/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-build-dtb-for-wb45n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-wb45n-fix-duplicate-label.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-build-dtb-for-wb50n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-wb50n-fix-duplicate-label.patch

diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile
index fe6a93244a5f..e4da7fb7e7da 100644
--- a/target/linux/at91/Makefile
+++ b/target/linux/at91/Makefile
@@ -10,7 +10,7 @@ BOARDNAME:=Microchip (Atmel AT91)
 FEATURES:=ext4 squashfs targz usb usbgadget ubifs
 SUBTARGETS:=sama5 sam9x
 
-KERNEL_PATCHVER:=5.4
+KERNEL_PATCHVER:=5.10
 
 include $(INCLUDE_DIR)/target.mk
 
diff --git a/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts 
b/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
deleted file mode 100644
index fd9d260f2ab5..
--- a/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
+++ /dev/null
@@ -1,220 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * wb45n.dts - Device Tree file for WB45NBT board
- *
- *  Copyright (C) 2015 Laird
- */
-
-/dts-v1/;
-#include "at91sam9g25.dtsi"
-
-/ {
-   model = "Laird Workgroup Bridge 45N - Atmel AT91SAM (dt)";
-   compatible = "laird,wb45n", "laird,wbxx", "atmel,at91sam9x5", 
"atmel,at91sam9";
-
-   chosen {
-   bootargs = "console=ttyS0,115200 root=/dev/mtdblock1 rw 
rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs";
-   };
-
-   memory {
-   reg = <0x2000 0x400>;
-   };
-
-   clocks {
-   #address-cells = <1>;
-   #size-cells = <1>;
-   ranges;
-
-   main_clock: clock@0 {
-   compatible = "atmel,osc", "fixed-clock";
-   clock-frequency = <1200>;
-   };
-
-   slow_xtal {
-   clock-frequency = <32768>;
-   };
-
-   main_xtal {
-   clock-frequency = <1200>;
-   };
-   };
-
-   ahb {
-   apb {
-
-   rstc@fe00 {
-   compatible = "atmel,sama5d3-rstc";
-   };
-
-   pinctrl@f400 {
-   nand {
-   pinctrl_nand: nand-0 {
-   atmel,pins =
-   ;  /* PD5 gpio RDY/BUSY pin pull_up */
-   };
-   };
-
-   usb2 {
-   pinctrl_board_usb2: usb2-board {
-   atmel,pins =
-   ;  /* PB11 gpio vbus sense, 
deglitch */
-   };
- 

[PATCH v4 2/6] at91: enable specific sam9x kernel config flags

2021-09-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Enable specific sam9x kernel config flags.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/sam9x/config-default | 168 +++--
 1 file changed, 159 insertions(+), 9 deletions(-)

diff --git a/target/linux/at91/sam9x/config-default 
b/target/linux/at91/sam9x/config-default
index d8b5c31dc7e5..a9f66766b1f2 100644
--- a/target/linux/at91/sam9x/config-default
+++ b/target/linux/at91/sam9x/config-default
@@ -1,7 +1,6 @@
 CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ARCH_32BIT_OFF_T=y
 CONFIG_ARCH_AT91=y
-CONFIG_ARCH_CLOCKSOURCE_DATA=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_KEEP_MEMBLOCK=y
 CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
@@ -12,6 +11,8 @@ CONFIG_ARCH_MULTI_V4_V5=y
 CONFIG_ARCH_MULTI_V5=y
 CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
 CONFIG_ARM_HAS_SG_CHAIN=y
@@ -20,8 +21,9 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 # CONFIG_AT91RM9200_WATCHDOG is not set
-# CONFIG_AT91SAM9X_WATCHDOG is not set
+CONFIG_AT91SAM9X_WATCHDOG=y
 CONFIG_AT91_SOC_ID=y
+# CONFIG_AT91_SOC_SFR is not set
 CONFIG_ATMEL_AIC5_IRQ=y
 CONFIG_ATMEL_AIC_IRQ=y
 CONFIG_ATMEL_CLOCKSOURCE_PIT=y
@@ -29,9 +31,12 @@ CONFIG_ATMEL_CLOCKSOURCE_TCB=y
 CONFIG_ATMEL_EBI=y
 CONFIG_ATMEL_PIT=y
 CONFIG_ATMEL_SDRAMC=y
+CONFIG_ATMEL_SSC=y
 CONFIG_ATMEL_ST=y
 CONFIG_ATMEL_TCB_CLKSRC=y
-# CONFIG_ATMEL_TCLIB is not set
+CONFIG_ATMEL_TCLIB=y
+CONFIG_AT_HDMAC=y
+# CONFIG_AT_XDMAC is not set
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
 CONFIG_CLKDEV_LOOKUP=y
@@ -39,6 +44,7 @@ CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_AT91=y
 CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONFIGFS_FS=y
 CONFIG_CPU_32v4T=y
 CONFIG_CPU_32v5=y
 CONFIG_CPU_ABRT_EV4T=y
@@ -57,17 +63,34 @@ CONFIG_CPU_PABRT_LEGACY=y
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V4WBI=y
 CONFIG_CPU_USE_DOMAINS=y
+CONFIG_CRC16=y
 CONFIG_CRC7=y
 CONFIG_CRC_CCITT=y
 CONFIG_CRC_ITU_T=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_GF128MUL=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_NULL2=y
 CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_ZSTD=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
 CONFIG_DMA_REMAP=y
 CONFIG_DTC=y
 CONFIG_EDAC_ATOMIC_SCRUB=y
 CONFIG_EDAC_SUPPORT=y
+CONFIG_EEPROM_AT24=y
+CONFIG_EXT4_FS=y
+CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ATOMIC64=y
@@ -96,33 +119,73 @@ CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_ATMEL=y
 CONFIG_HZ=128
 CONFIG_HZ_FIXED=128
 CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_AT91=y
+# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_GPIO=y
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_INPUT_KEYBOARD=y
 CONFIG_IRQCHIP=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_GPIO=y
 CONFIG_LIBFDT=y
+CONFIG_LLD_VERSION=0
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MACB=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
 CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
-# CONFIG_MFD_AT91_USART is not set
+CONFIG_MFD_AT91_USART=y
+CONFIG_MFD_ATMEL_HLCDC=y
 CONFIG_MFD_ATMEL_SMC=y
+CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
-# CONFIG_MICROCHIP_PIT64B is not set
+CONFIG_MICREL_PHY=y
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
-# CONFIG_MMC_ATMELMCI is not set
+CONFIG_MMC_ATMELMCI=y
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_OF_AT91=y
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_DATAFLASH=y
+# CONFIG_MTD_DATAFLASH_OTP is not set
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+# CONFIG_MTD_UBI_BLOCK is not set
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_GLUEBI=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_KUSER_HELPERS=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NLS=y
+CONFIG_NVMEM=y
+CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
@@ -130,40 +193,127 @@ CONFIG_OF_FLATTREE=y
 CONFIG_OF_GPIO=y
 CONFIG_OF_IRQ=y
 CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
 CONFIG_OF_NET=y
 CONFIG_OLD_SIGACTION=y
 CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_PAGE_OFFSET=0xC000
 

[PATCH v4 3/6] at91: add support for sama5d2 icp board

2021-09-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA5D2 ICP board.

Hardware:
- SoC: SAMA5D27
- RAM: 512 MB DDR3L
- MMC: One stanard SD card interface
- USB: One USB host switch 4 ports with power switch,
   One USB device type Micro-AB
- CAN: 2 interfaces
- Ethernet: One Gigabit Ethernet PHY through HSIC,
One ETH switchport,
One EtherCAT interface
- WiFi/BT: Footprint for IEEE 802.11 b/g/n Wi-Fi plus
   Bluetooth module (Wi-Fi/BT), suitable for
   Microchip WILC3000-MR110CA or WILC3000-MR110UA
- Debug port: One J-Link-OB/J-Link-CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: reset, wakeup, 2 user buttons
- Expansion: one PIOBU/PIO connector, 3 mikrobus sockets
- Power mangament: PMIC (MCP16502), one power consumption device
   (PAC1934)

Not working in Linux:
- EtherCAT interface: there is no Linux support integrated
- PAC1934: driver available at [1] but not integrated in Linux

Flashing:
- follow the procedure at [2]

[1] https://ww1.microchip.com/downloads/en/DeviceDoc/pac193x_linux_driver.zip
[2] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d2IcpMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile|  7 +++
 target/linux/at91/image/sama5.mk| 11 +++
 3 files changed, 32 insertions(+)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index f66472fa9c29..56e14c57703c 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -40,6 +40,18 @@ define AT91Bootstrap/at91sam9x5eksd_uboot
   BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
 endef
 
+define AT91Bootstrap/sama5d2_icpdf_qspi_uboot
+  TITLE:=AT91Bootstrap for SAMA5D2 ICP board (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
+define AT91Bootstrap/sama5d2_icpsd_uboot
+  TITLE:=AT91Bootstrap for SAMA5D2 ICP board (SDcard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
 define AT91Bootstrap/sama5d2_xplaineddf_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -121,6 +133,8 @@ endef
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
+   sama5d2_icpdf_qspi_uboot \
+   sama5d2_icpsd_uboot \
sama5d2_xplaineddf_uboot \
sama5d2_xplaineddf_qspi_uboot \
sama5d2_xplainedsd_uboot \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index a8a71239a398..193f26dae471 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -59,6 +59,12 @@ define U-Boot/sama5d3_xplained_mmc
   BUILD_DEVICES:=microchip_sama5d3-xplained
 endef
 
+define U-Boot/sama5d2_icp_mmc
+  NAME:=SAMA5D2 ICP board (SDCard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
 define U-Boot/sama5d2_xplained_spiflash
   NAME:=SAMA5D2 Xplained board (SPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -119,6 +125,7 @@ UBOOT_TARGETS := \
at91sam9x5ek_mmc \
sama5d3_xplained_nandflash \
sama5d3_xplained_mmc \
+   sama5d2_icp_mmc \
sama5d2_xplained_mmc \
sama5d2_xplained_spiflash \
sama5d4_xplained_mmc \
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index f8e05aae9343..ae3494332139 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -54,6 +54,17 @@ define Build/at91-sdcard
   rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
 endef
 
+define Device/microchip_sama5d2-icp
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAMA5D2 ICP
+  DEVICE_DTS := at91-sama5d2_icp
+  SUPPORTED_DEVICES := microchip,sama5d2-icp
+  KERNEL_SIZE := 6144k
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sama5d2-icp
+
 define Device/microchip_sama5d2-xplained
   $(Device/evaluation-dtb)
   DEVICE_VENDOR := Microchip
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v4 0/6] at91: add support for sama5d2 icp, sama5d27 wlsom1 ek and sam9x60ek

2021-09-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hi,

This series adds support for SAMA5D2 ICP, SAMA5D27-WLSOM1-EK and
SAM9X60EK boards.

Since SAM9X60's kernel support is included in 5.10 but not on 5.4
1st (patch 1/6) switches to kernel 5.10.

Patches 2/6, 5/6 updates the kernel config for sam9x SoCs and sam9x60.

Patch 3/6, 4/6, 6/6 adds the boards support.

Thank you,
Claudiu Beznea

Claudiu Beznea (6):
  at91: kernel: bump to 5.10
  at91: enable specific sam9x kernel config flags
  at91: add support for sama5d2 icp board
  at91: add support for sama5d27-wlsom1-ek board
  at91: enable kernel config for sam9x60
  at91: add support for sam9x60-ek board

 package/boot/at91bootstrap/Makefile   |  42 +++
 package/boot/uboot-at91/Makefile  |  35 +++
 target/linux/at91/Makefile|   2 +-
 .../at91/files/arch/arm/boot/dts/wb45n.dts| 220 --
 .../at91/files/arch/arm/boot/dts/wb50n.dts| 113 ---
 .../at91/files/arch/arm/boot/dts/wb50n.dtsi   | 205 -
 target/linux/at91/image/sam9x.mk  |  14 +-
 target/linux/at91/image/sama5.mk  |  23 ++
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 -
 .../102-ARM-at91-build-dtb-for-wb45n.patch|  12 -
 ...2-ARM-at91-wb45n-fix-duplicate-label.patch |  20 --
 .../103-ARM-at91-build-dtb-for-wb50n.patch|  12 -
 ...3-ARM-at91-wb50n-fix-duplicate-label.patch |  39 ---
 target/linux/at91/sam9x/config-default| 286 ++
 15 files changed, 345 insertions(+), 698 deletions(-)
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi
 create mode 04 target/linux/at91/patches-5.10
 create mode 100644 
target/linux/at91/patches-5.10/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 04 target/linux/at91/patches-5.4
 delete mode 100644 
target/linux/at91/patches-5.4/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-build-dtb-for-wb45n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-wb45n-fix-duplicate-label.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-build-dtb-for-wb50n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-wb50n-fix-duplicate-label.patch

-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v4 4/6] at91: add support for sama5d27-wlsom1-ek board

2021-09-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA5D27 WLSOM1-EK board.

Hardware:
- SIP: SAMA5D27C-LD2G-CU including SAMA5D27 MPU and 2Gbit LPDDR2-SDRAM
- MMC: one standard SD card interface
- Flash: 64 Mb serial quad I/O flash memory (SST26VF064BEUIT-104I/MF)
 with embedded EUI-48 and EUI-64 MAC addresses
- USB: one USB device, one USB host one HSIC interface
- Ethernet: 1x10/100Mbps port
- WiFi/BT: IEEE 802.11 b/g/n Wi-Fi plus Bluetooth (Wi-Fi/BT) module
   (ATWILC3000-MR110UA)
- Crypto: one ATECC608B-TNGTLS secure element
- Video: one LCD RGB 18-bit interface, one ISC 12-bit camera interface
- Debug port: one JTAG interface, one UART interface, one WILC UART
  interface
- Leds: one RGB LED
- Buttons: start, reset, wakeup, user buttons
- Expansion: one tamper connector, one mikrobus interface, 2 XPRO PTC
 connector
- Power managament: PMIC (MCP16502)

Flashing:
- follow procedure at [1]

[1] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d27WLSom1EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile| 14 ++
 target/linux/at91/image/sama5.mk| 11 +++
 3 files changed, 39 insertions(+)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 56e14c57703c..8711acd286bd 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -118,6 +118,18 @@ define AT91Bootstrap/sama5d27_som1_ekqspi_uboot
   BUILD_DEVICES:=microchip_sama5d27-som1-ek
 endef
 
+define AT91Bootstrap/sama5d27_wlsom1_eksd_uboot
+  TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (SDcard0)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
+define AT91Bootstrap/sama5d27_wlsom1_ekdf_qspi_uboot
+  TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
 define AT91Bootstrap/sama5d2_ptc_eknf_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 PTC EK (Nand Flash)
   BUILD_SUBTARGET:=sama5
@@ -145,6 +157,8 @@ AT91BOOTSTRAP_TARGETS := \
sama5d4_xplainedsd_uboot_secure \
sama5d27_som1_eksd1_uboot \
sama5d27_som1_ekqspi_uboot \
+   sama5d27_wlsom1_eksd_uboot \
+   sama5d27_wlsom1_ekdf_qspi_uboot \
sama5d2_ptc_eknf_uboot \
sama5d2_ptc_eksd_uboot
 
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 193f26dae471..5aade7de9cf9 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -107,6 +107,18 @@ define U-Boot/sama5d27_som1_ek_qspiflash
   BUILD_DEVICES:=microchip_sama5d27-som1-ek
 endef
 
+define U-Boot/sama5d27_wlsom1_ek_mmc
+  NAME:=SAMA5D27 WLSOM1 Ek (SDCard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
+define U-Boot/sama5d27_wlsom1_ek_qspiflash
+  NAME:=SAMA5D27 WLSOM1 Ek (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
 define U-Boot/sama5d2_ptc_ek_nandflash
   NAME:=SAMA5D2 PTC Ek (Nand Flash)
   BUILD_SUBTARGET:=sama5
@@ -133,6 +145,8 @@ UBOOT_TARGETS := \
sama5d4_xplained_nandflash\
sama5d27_som1_ek_mmc1 \
sama5d27_som1_ek_qspiflash \
+   sama5d27_wlsom1_ek_mmc \
+   sama5d27_wlsom1_ek_qspiflash \
sama5d2_ptc_ek_nandflash \
sama5d2_ptc_ek_mmc
 
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index ae3494332139..9078db525f97 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -87,6 +87,17 @@ define Device/microchip_sama5d27-som1-ek
 endef
 TARGET_DEVICES += microchip_sama5d27-som1-ek
 
+define Device/microchip_sama5d27-wlsom1-ek
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAMA5D27 WSOM1 Ek
+  DEVICE_DTS := at91-sama5d27_wlsom1_ek
+  SUPPORTED_DEVICES := microchip,sama5d27-wlsom1-ek
+  KERNEL_SIZE := 6144k
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sama5d27-wlsom1-ek
+
 define Device/microchip_sama5d2-ptc-ek
   $(Device/evaluation-dtb)
   DEVICE_VENDOR := Microchip
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 6/6] at91: add support for sam9x60-ek board

2021-08-30 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAM9X60-EK board.

Hardware:
- SoC: SAM9X60
- RAM: Winbond W972GG6KB-25 (2Gbit DDR2)
- NAND Flash: Micron MT29F4G08ABAEA
- QSPI Flash: Microchip SST26VF064B
- EEPROM: Microchip 24AA02E48
- SDMMC: One standard 4-bit SD card interface
- USB: two stacked Type-A connectors with power switches, one micro-B
   USB device
- CAN: 2 interfaces (Microchip MCP2542)
- Ethernet: one 10/100Mbps
- WiFi/BT: one optional WiFi/Bluetooth interface
- Audio: one ClassD port
- Display: one 24-bit LCD interface
- Camera: one 12-bit image sensor interface
- IO: one IO expander (Microchip MCP23008)
- Debug ports: one J-Link-OB + CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: 4 push button switches
- Expansion: one PIO connector, one mikrobus connector
- Power management: two power regulators, two power consumption measurement
devices

Flashing:
- follow the procedure at [1]

[1] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sam9x60EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile| 14 ++
 target/linux/at91/image/sam9x.mk| 13 +++--
 3 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 8711acd286bd..2d77f7099721 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -40,6 +40,18 @@ define AT91Bootstrap/at91sam9x5eksd_uboot
   BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
 endef
 
+define AT91Bootstrap/sam9x60eknf_uboot
+  NAME:=AT91Bootstrap for SAM9X60-EK board (NandFlash)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
+define AT91Bootstrap/sam9x60eksd_uboot
+  NAME:=AT91Bootstrap for SAM9X60-EK board (SDcard)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
 define AT91Bootstrap/sama5d2_icpdf_qspi_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 ICP board (QSPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -145,6 +157,8 @@ endef
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
+   sam9x60eknf_uboot \
+   sam9x60eksd_uboot \
sama5d2_icpdf_qspi_uboot \
sama5d2_icpsd_uboot \
sama5d2_xplaineddf_uboot \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 5aade7de9cf9..ed929794bdb1 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -47,6 +47,18 @@ define U-Boot/at91sam9x5ek_mmc
  atmel_at91sam9x35ek
 endef
 
+define U-Boot/sam9x60ek_nandflash
+  NAME:=SAM9X60-EK board (NandFlash)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
+define U-Boot/sam9x60ek_mmc
+  NAME:=SAM9X60-EK board (SDcard)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
 define U-Boot/sama5d3_xplained_nandflash
   NAME:=SAMA5D3 Xplained board (NandFlash)
   BUILD_SUBTARGET:=sama5
@@ -135,6 +147,8 @@ UBOOT_TARGETS := \
at91sam9m10g45ek_nandflash \
at91sam9x5ek_nandflash \
at91sam9x5ek_mmc \
+   sam9x60ek_nandflash \
+   sam9x60ek_mmc \
sama5d3_xplained_nandflash \
sama5d3_xplained_mmc \
sama5d2_icp_mmc \
diff --git a/target/linux/at91/image/sam9x.mk b/target/linux/at91/image/sam9x.mk
index 6f10123bbaae..b6c5e33ac44f 100644
--- a/target/linux/at91/image/sam9x.mk
+++ b/target/linux/at91/image/sam9x.mk
@@ -16,11 +16,11 @@ define Build/at91-sdcard
::$(DEVICE_NAME)-fit.itb
 
   mcopy -i $@.boot \
-   $(BIN_DIR)/u-boot-at91sam9x5ek_mmc/u-boot.bin \
+   $(BIN_DIR)/u-boot-$(if $(findstring 
sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)_mmc/u-boot.bin \
::u-boot.bin
 
   mcopy -i $@.boot \
-   $(BIN_DIR)/at91bootstrap-at91sam9x5eksd_uboot/at91bootstrap.bin \
+   $(BIN_DIR)/at91bootstrap-$(if $(findstring 
sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)sd_uboot/at91bootstrap.bin \
::BOOT.bin
 
   $(CP) uboot-env.txt $@-uboot-env.txt
@@ -112,6 +112,15 @@ define Device/atmel_at91sam9x35ek
 endef
 TARGET_DEVICES += atmel_at91sam9x35ek
 
+define Device/microchip_sam9x60ek
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAM9X60-EK
+  DEVICE_DTS := at91-sam9x60ek
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sam9x60ek
+
 define Device/calamp_lmu5000
   $(Device/production)
   DEVICE_VENDOR := CalAmp
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 4/6] at91: add support for sama5d27-wlsom1-ek board

2021-08-30 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA5D27 WLSOM1-EK board.

Hardware:
- SIP: SAMA5D27C-LD2G-CU including SAMA5D27 MPU and 2Gbit LPDDR2-SDRAM
- MMC: one standard SD card interface
- Flash: 64 Mb serial quad I/O flash memory (SST26VF064BEUIT-104I/MF)
 with embedded EUI-48 and EUI-64 MAC addresses
- USB: one USB device, one USB host one HSIC interface
- Ethernet: 1x10/100Mbps port
- WiFi/BT: IEEE 802.11 b/g/n Wi-Fi plus Bluetooth (Wi-Fi/BT) module
   (ATWILC3000-MR110UA)
- Crypto: one ATECC608B-TNGTLS secure element
- Video: one LCD RGB 18-bit interface, one ISC 12-bit camera interface
- Debug port: one JTAG interface, one UART interface, one WILC UART
  interface
- Leds: one RGB LED
- Buttons: start, reset, wakeup, user buttons
- Expansion: one tamper connector, one mikrobus interface, 2 XPRO PTC
 connector
- Power managament: PMIC (MCP16502)

Flashing:
- follow procedure at [1]

[1] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d27WLSom1EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile| 14 ++
 target/linux/at91/image/sama5.mk| 11 +++
 3 files changed, 39 insertions(+)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 56e14c57703c..8711acd286bd 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -118,6 +118,18 @@ define AT91Bootstrap/sama5d27_som1_ekqspi_uboot
   BUILD_DEVICES:=microchip_sama5d27-som1-ek
 endef
 
+define AT91Bootstrap/sama5d27_wlsom1_eksd_uboot
+  TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (SDcard0)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
+define AT91Bootstrap/sama5d27_wlsom1_ekdf_qspi_uboot
+  TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
 define AT91Bootstrap/sama5d2_ptc_eknf_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 PTC EK (Nand Flash)
   BUILD_SUBTARGET:=sama5
@@ -145,6 +157,8 @@ AT91BOOTSTRAP_TARGETS := \
sama5d4_xplainedsd_uboot_secure \
sama5d27_som1_eksd1_uboot \
sama5d27_som1_ekqspi_uboot \
+   sama5d27_wlsom1_eksd_uboot \
+   sama5d27_wlsom1_ekdf_qspi_uboot \
sama5d2_ptc_eknf_uboot \
sama5d2_ptc_eksd_uboot
 
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 193f26dae471..5aade7de9cf9 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -107,6 +107,18 @@ define U-Boot/sama5d27_som1_ek_qspiflash
   BUILD_DEVICES:=microchip_sama5d27-som1-ek
 endef
 
+define U-Boot/sama5d27_wlsom1_ek_mmc
+  NAME:=SAMA5D27 WLSOM1 Ek (SDCard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
+define U-Boot/sama5d27_wlsom1_ek_qspiflash
+  NAME:=SAMA5D27 WLSOM1 Ek (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
 define U-Boot/sama5d2_ptc_ek_nandflash
   NAME:=SAMA5D2 PTC Ek (Nand Flash)
   BUILD_SUBTARGET:=sama5
@@ -133,6 +145,8 @@ UBOOT_TARGETS := \
sama5d4_xplained_nandflash\
sama5d27_som1_ek_mmc1 \
sama5d27_som1_ek_qspiflash \
+   sama5d27_wlsom1_ek_mmc \
+   sama5d27_wlsom1_ek_qspiflash \
sama5d2_ptc_ek_nandflash \
sama5d2_ptc_ek_mmc
 
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index ae3494332139..9078db525f97 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -87,6 +87,17 @@ define Device/microchip_sama5d27-som1-ek
 endef
 TARGET_DEVICES += microchip_sama5d27-som1-ek
 
+define Device/microchip_sama5d27-wlsom1-ek
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAMA5D27 WSOM1 Ek
+  DEVICE_DTS := at91-sama5d27_wlsom1_ek
+  SUPPORTED_DEVICES := microchip,sama5d27-wlsom1-ek
+  KERNEL_SIZE := 6144k
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sama5d27-wlsom1-ek
+
 define Device/microchip_sama5d2-ptc-ek
   $(Device/evaluation-dtb)
   DEVICE_VENDOR := Microchip
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 3/6] at91: add support for sama5d2 icp board

2021-08-30 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA5D2 ICP board.

Hardware:
- SoC: SAMA5D27
- RAM: 512 MB DDR3L
- MMC: One stanard SD card interface
- USB: One USB host switch 4 ports with power switch,
   One USB device type Micro-AB
- CAN: 2 interfaces
- Ethernet: One Gigabit Ethernet PHY through HSIC,
One ETH switchport,
One EtherCAT interface
- WiFi/BT: Footprint for IEEE 802.11 b/g/n Wi-Fi plus
   Bluetooth module (Wi-Fi/BT), suitable for
   Microchip WILC3000-MR110CA or WILC3000-MR110UA
- Debug port: One J-Link-OB/J-Link-CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: reset, wakeup, 2 user buttons
- Expansion: one PIOBU/PIO connector, 3 mikrobus sockets
- Power mangament: PMIC (MCP16502), one power consumption device
   (PAC1934)

Not working in Linux:
- EtherCAT interface: there is no Linux support integrated
- PAC1934: driver available at [1] but not integrated in Linux

Flashing:
- follow the procedure at [2]

[1] https://ww1.microchip.com/downloads/en/DeviceDoc/pac193x_linux_driver.zip
[2] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d2IcpMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile|  7 +++
 target/linux/at91/image/sama5.mk| 11 +++
 3 files changed, 32 insertions(+)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index f66472fa9c29..56e14c57703c 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -40,6 +40,18 @@ define AT91Bootstrap/at91sam9x5eksd_uboot
   BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
 endef
 
+define AT91Bootstrap/sama5d2_icpdf_qspi_uboot
+  TITLE:=AT91Bootstrap for SAMA5D2 ICP board (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
+define AT91Bootstrap/sama5d2_icpsd_uboot
+  TITLE:=AT91Bootstrap for SAMA5D2 ICP board (SDcard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
 define AT91Bootstrap/sama5d2_xplaineddf_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -121,6 +133,8 @@ endef
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
+   sama5d2_icpdf_qspi_uboot \
+   sama5d2_icpsd_uboot \
sama5d2_xplaineddf_uboot \
sama5d2_xplaineddf_qspi_uboot \
sama5d2_xplainedsd_uboot \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index a8a71239a398..193f26dae471 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -59,6 +59,12 @@ define U-Boot/sama5d3_xplained_mmc
   BUILD_DEVICES:=microchip_sama5d3-xplained
 endef
 
+define U-Boot/sama5d2_icp_mmc
+  NAME:=SAMA5D2 ICP board (SDCard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
 define U-Boot/sama5d2_xplained_spiflash
   NAME:=SAMA5D2 Xplained board (SPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -119,6 +125,7 @@ UBOOT_TARGETS := \
at91sam9x5ek_mmc \
sama5d3_xplained_nandflash \
sama5d3_xplained_mmc \
+   sama5d2_icp_mmc \
sama5d2_xplained_mmc \
sama5d2_xplained_spiflash \
sama5d4_xplained_mmc \
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index f8e05aae9343..ae3494332139 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -54,6 +54,17 @@ define Build/at91-sdcard
   rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
 endef
 
+define Device/microchip_sama5d2-icp
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAMA5D2 ICP
+  DEVICE_DTS := at91-sama5d2_icp
+  SUPPORTED_DEVICES := microchip,sama5d2-icp
+  KERNEL_SIZE := 6144k
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sama5d2-icp
+
 define Device/microchip_sama5d2-xplained
   $(Device/evaluation-dtb)
   DEVICE_VENDOR := Microchip
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 0/6] at91: add support for sama5d2 icp, sama5d27 wlsom1 ek and sam9x60ek

2021-08-30 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hi,

This series adds support for SAMA5D2 ICP, SAMA5D27-WLSOM1-EK and
SAM9X60EK boards.

Since SAM9X60's kernel support is included in 5.10 but not on 5.4
1st (patch 1/6) switches to kernel 5.10.

Patches 2/6, 5/6 updates the kernel config for sam9x SoCs and sam9x60.

Patch 3/6, 4/6, 6/6 adds the boards support.

Thank you,
Claudiu Beznea

Changes in v3:
- squash patches "at91: use make kernel_menuconfig and save for sam9x
  kernel config" and "at91: enable CONFIG_ARCH_AT91 and specific sam9x
  SoCs" from v2 into "at91: kernel: bump to 5.10"
- keep only SoC specific and boot specific flags in pach "at91: enable
  specific sam9x kernel config flags"

Changes in v2:
- changed series title from "at91: add support for sama5d2 icp and" to
  "at91: add support for sama5d2 icp, sama5d27 wlsom1 ek and sam9x60ek"
- bump at91 to kernel 5.10
- adds sam9x60 and sam9x60ek specific support
- drop patch 1/3 from v1

Claudiu Beznea (6):
  at91: kernel: bump to 5.10
  at91: enable specific sam9x kernel config flags
  at91: add support for sama5d2 icp board
  at91: add support for sama5d27-wlsom1-ek board
  at91: enable kernel config for sam9x60
  at91: add support for sam9x60-ek board

 package/boot/at91bootstrap/Makefile   |  42 +++
 package/boot/uboot-at91/Makefile  |  35 +++
 target/linux/at91/Makefile|   2 +-
 .../at91/files/arch/arm/boot/dts/wb45n.dts| 220 --
 .../at91/files/arch/arm/boot/dts/wb50n.dts| 113 ---
 .../at91/files/arch/arm/boot/dts/wb50n.dtsi   | 205 -
 target/linux/at91/image/sam9x.mk  |  14 +-
 target/linux/at91/image/sama5.mk  |  23 ++
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 -
 .../102-ARM-at91-build-dtb-for-wb45n.patch|  12 -
 ...2-ARM-at91-wb45n-fix-duplicate-label.patch |  20 --
 .../103-ARM-at91-build-dtb-for-wb50n.patch|  12 -
 ...3-ARM-at91-wb50n-fix-duplicate-label.patch |  39 ---
 target/linux/at91/sam9x/config-default| 286 ++
 15 files changed, 345 insertions(+), 698 deletions(-)
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi
 create mode 04 target/linux/at91/patches-5.10
 create mode 100644 
target/linux/at91/patches-5.10/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 04 target/linux/at91/patches-5.4
 delete mode 100644 
target/linux/at91/patches-5.4/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-build-dtb-for-wb45n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-wb45n-fix-duplicate-label.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-build-dtb-for-wb50n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-wb50n-fix-duplicate-label.patch

-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 2/6] at91: enable specific sam9x kernel config flags

2021-08-30 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Enable specific sam9x kernel config flags.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/sam9x/config-default | 168 +++--
 1 file changed, 159 insertions(+), 9 deletions(-)

diff --git a/target/linux/at91/sam9x/config-default 
b/target/linux/at91/sam9x/config-default
index d8b5c31dc7e5..619e00e9d76f 100644
--- a/target/linux/at91/sam9x/config-default
+++ b/target/linux/at91/sam9x/config-default
@@ -1,7 +1,6 @@
 CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ARCH_32BIT_OFF_T=y
 CONFIG_ARCH_AT91=y
-CONFIG_ARCH_CLOCKSOURCE_DATA=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_KEEP_MEMBLOCK=y
 CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
@@ -12,6 +11,8 @@ CONFIG_ARCH_MULTI_V4_V5=y
 CONFIG_ARCH_MULTI_V5=y
 CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
 CONFIG_ARM_HAS_SG_CHAIN=y
@@ -20,8 +21,9 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 # CONFIG_AT91RM9200_WATCHDOG is not set
-# CONFIG_AT91SAM9X_WATCHDOG is not set
+CONFIG_AT91SAM9X_WATCHDOG=y
 CONFIG_AT91_SOC_ID=y
+# CONFIG_AT91_SOC_SFR is not set
 CONFIG_ATMEL_AIC5_IRQ=y
 CONFIG_ATMEL_AIC_IRQ=y
 CONFIG_ATMEL_CLOCKSOURCE_PIT=y
@@ -29,9 +31,12 @@ CONFIG_ATMEL_CLOCKSOURCE_TCB=y
 CONFIG_ATMEL_EBI=y
 CONFIG_ATMEL_PIT=y
 CONFIG_ATMEL_SDRAMC=y
+CONFIG_ATMEL_SSC=y
 CONFIG_ATMEL_ST=y
 CONFIG_ATMEL_TCB_CLKSRC=y
-# CONFIG_ATMEL_TCLIB is not set
+CONFIG_ATMEL_TCLIB=y
+CONFIG_AT_HDMAC=y
+# CONFIG_AT_XDMAC is not set
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
 CONFIG_CLKDEV_LOOKUP=y
@@ -39,6 +44,7 @@ CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_AT91=y
 CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONFIGFS_FS=m
 CONFIG_CPU_32v4T=y
 CONFIG_CPU_32v5=y
 CONFIG_CPU_ABRT_EV4T=y
@@ -57,17 +63,34 @@ CONFIG_CPU_PABRT_LEGACY=y
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V4WBI=y
 CONFIG_CPU_USE_DOMAINS=y
+CONFIG_CRC16=y
 CONFIG_CRC7=y
 CONFIG_CRC_CCITT=y
 CONFIG_CRC_ITU_T=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_GF128MUL=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_NULL2=y
 CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_ZSTD=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
 CONFIG_DMA_REMAP=y
 CONFIG_DTC=y
 CONFIG_EDAC_ATOMIC_SCRUB=y
 CONFIG_EDAC_SUPPORT=y
+CONFIG_EEPROM_AT24=m
+CONFIG_EXT4_FS=y
+CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ATOMIC64=y
@@ -96,33 +119,73 @@ CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_ATMEL=y
 CONFIG_HZ=128
 CONFIG_HZ_FIXED=128
 CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_AT91=y
+# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_GPIO=y
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_INPUT_KEYBOARD=y
 CONFIG_IRQCHIP=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_GPIO=y
 CONFIG_LIBFDT=y
+CONFIG_LLD_VERSION=0
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MACB=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
 CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
-# CONFIG_MFD_AT91_USART is not set
+CONFIG_MFD_AT91_USART=y
+CONFIG_MFD_ATMEL_HLCDC=y
 CONFIG_MFD_ATMEL_SMC=y
+CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
-# CONFIG_MICROCHIP_PIT64B is not set
+CONFIG_MICREL_PHY=y
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
-# CONFIG_MMC_ATMELMCI is not set
+CONFIG_MMC_ATMELMCI=y
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_OF_AT91=y
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_DATAFLASH=y
+# CONFIG_MTD_DATAFLASH_OTP is not set
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+# CONFIG_MTD_UBI_BLOCK is not set
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_GLUEBI=m
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_KUSER_HELPERS=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NLS=y
+CONFIG_NVMEM=y
+CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
@@ -130,40 +193,127 @@ CONFIG_OF_FLATTREE=y
 CONFIG_OF_GPIO=y
 CONFIG_OF_IRQ=y
 CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
 CONFIG_OF_NET=y
 CONFIG_OLD_SIGACTION=y
 CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_PAGE_OFFSET=0xC000
 

[PATCH v3 1/6] at91: kernel: bump to 5.10

2021-08-30 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Bump at91 targets to kernel v5.10. With this patches and files for
wb45n and wb50n were removed as they are now included in upstream
kernel. Along with this:
- the kernel config for sam9x targets has been refreshed (with
  make kernel_menuconfig + save);
- CONFIG_ARCH_AT91 and specific sam9x SoCs (AT91RM9200, AT91SAM9,
  SAM9X60) has been enabled such that sam9x SoCs to be able to boot.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/Makefile|   2 +-
 .../at91/files/arch/arm/boot/dts/wb45n.dts| 220 --
 .../at91/files/arch/arm/boot/dts/wb50n.dts| 113 -
 .../at91/files/arch/arm/boot/dts/wb50n.dtsi   | 205 
 target/linux/at91/image/sam9x.mk  |   1 +
 target/linux/at91/image/sama5.mk  |   1 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 -
 .../102-ARM-at91-build-dtb-for-wb45n.patch|  12 -
 ...2-ARM-at91-wb45n-fix-duplicate-label.patch |  20 --
 .../103-ARM-at91-build-dtb-for-wb50n.patch|  12 -
 ...3-ARM-at91-wb50n-fix-duplicate-label.patch |  39 
 target/linux/at91/sam9x/config-default| 105 -
 13 files changed, 57 insertions(+), 693 deletions(-)
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi
 create mode 04 target/linux/at91/patches-5.10
 create mode 100644 
target/linux/at91/patches-5.10/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 04 target/linux/at91/patches-5.4
 delete mode 100644 
target/linux/at91/patches-5.4/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-build-dtb-for-wb45n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-wb45n-fix-duplicate-label.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-build-dtb-for-wb50n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-wb50n-fix-duplicate-label.patch

diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile
index fe6a93244a5f..e4da7fb7e7da 100644
--- a/target/linux/at91/Makefile
+++ b/target/linux/at91/Makefile
@@ -10,7 +10,7 @@ BOARDNAME:=Microchip (Atmel AT91)
 FEATURES:=ext4 squashfs targz usb usbgadget ubifs
 SUBTARGETS:=sama5 sam9x
 
-KERNEL_PATCHVER:=5.4
+KERNEL_PATCHVER:=5.10
 
 include $(INCLUDE_DIR)/target.mk
 
diff --git a/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts 
b/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
deleted file mode 100644
index fd9d260f2ab5..
--- a/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
+++ /dev/null
@@ -1,220 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * wb45n.dts - Device Tree file for WB45NBT board
- *
- *  Copyright (C) 2015 Laird
- */
-
-/dts-v1/;
-#include "at91sam9g25.dtsi"
-
-/ {
-   model = "Laird Workgroup Bridge 45N - Atmel AT91SAM (dt)";
-   compatible = "laird,wb45n", "laird,wbxx", "atmel,at91sam9x5", 
"atmel,at91sam9";
-
-   chosen {
-   bootargs = "console=ttyS0,115200 root=/dev/mtdblock1 rw 
rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs";
-   };
-
-   memory {
-   reg = <0x2000 0x400>;
-   };
-
-   clocks {
-   #address-cells = <1>;
-   #size-cells = <1>;
-   ranges;
-
-   main_clock: clock@0 {
-   compatible = "atmel,osc", "fixed-clock";
-   clock-frequency = <1200>;
-   };
-
-   slow_xtal {
-   clock-frequency = <32768>;
-   };
-
-   main_xtal {
-   clock-frequency = <1200>;
-   };
-   };
-
-   ahb {
-   apb {
-
-   rstc@fe00 {
-   compatible = "atmel,sama5d3-rstc";
-   };
-
-   pinctrl@f400 {
-   nand {
-   pinctrl_nand: nand-0 {
-   atmel,pins =
-   ;  /* PD5 gpio RDY/BUSY pin pull_up */
-   };
-   };
-
-   usb2 {
-   pinctrl_board_usb2: usb2-board {
-   atmel,pins =
-   ;  /* PB11 gpio vbus sense, 
deglitch */
-   };
- 

[PATCH v3 5/6] at91: enable kernel config for sam9x60

2021-08-30 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Enable kernel config for SAM9X60.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/sam9x/config-default | 29 --
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/target/linux/at91/sam9x/config-default 
b/target/linux/at91/sam9x/config-default
index 619e00e9d76f..4251e295 100644
--- a/target/linux/at91/sam9x/config-default
+++ b/target/linux/at91/sam9x/config-default
@@ -15,6 +15,7 @@ CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
+CONFIG_ARM_CPU_SUSPEND=y
 CONFIG_ARM_HAS_SG_CHAIN=y
 CONFIG_ARM_L1_CACHE_SHIFT=5
 CONFIG_ARM_PATCH_PHYS_VIRT=y
@@ -22,6 +23,8 @@ CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 # CONFIG_AT91RM9200_WATCHDOG is not set
 CONFIG_AT91SAM9X_WATCHDOG=y
+# CONFIG_AT91_ADC is not set
+CONFIG_AT91_SAMA5D2_ADC=y
 CONFIG_AT91_SOC_ID=y
 # CONFIG_AT91_SOC_SFR is not set
 CONFIG_ATMEL_AIC5_IRQ=y
@@ -30,16 +33,19 @@ CONFIG_ATMEL_CLOCKSOURCE_PIT=y
 CONFIG_ATMEL_CLOCKSOURCE_TCB=y
 CONFIG_ATMEL_EBI=y
 CONFIG_ATMEL_PIT=y
+CONFIG_ATMEL_PM=y
 CONFIG_ATMEL_SDRAMC=y
 CONFIG_ATMEL_SSC=y
 CONFIG_ATMEL_ST=y
 CONFIG_ATMEL_TCB_CLKSRC=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_AT_HDMAC=y
-# CONFIG_AT_XDMAC is not set
+CONFIG_AT_XDMAC=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_PM=y
 CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLKSRC_MMIO=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_AT91=y
@@ -60,6 +66,7 @@ CONFIG_CPU_CP15_MMU=y
 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
 CONFIG_CPU_NO_EFFICIENT_FFS=y
 CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_PM=y
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V4WBI=y
 CONFIG_CPU_USE_DOMAINS=y
@@ -89,8 +96,10 @@ CONFIG_EEPROM_AT24=m
 CONFIG_EXT4_FS=y
 CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FREEZER=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
+CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ATOMIC64=y
@@ -132,6 +141,11 @@ CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_COMPAT=y
 CONFIG_I2C_GPIO=y
+CONFIG_IIO=y
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_KFIFO_BUF=y
+CONFIG_IIO_TRIGGER=y
+CONFIG_IIO_TRIGGERED_BUFFER=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INPUT=y
 CONFIG_INPUT_KEYBOARD=y
@@ -156,11 +170,13 @@ CONFIG_MDIO_DEVRES=y
 CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
 CONFIG_MFD_AT91_USART=y
+CONFIG_MFD_ATMEL_FLEXCOM=y
 CONFIG_MFD_ATMEL_HLCDC=y
 CONFIG_MFD_ATMEL_SMC=y
 CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MICREL_PHY=y
+CONFIG_MICROCHIP_PIT64B=y
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
 CONFIG_MMC_ATMELMCI=y
@@ -205,6 +221,12 @@ CONFIG_PHYLINK=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 # CONFIG_PINCTRL_AT91PIO4 is not set
+CONFIG_PINCTRL_MCP23S08=m
+CONFIG_PINCTRL_MCP23S08_I2C=m
+CONFIG_PINCTRL_MCP23S08_SPI=m
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PM_SLEEP=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_AT91_POWEROFF=y
 CONFIG_POWER_RESET_AT91_RESET=y
@@ -220,6 +242,7 @@ CONFIG_RATIONAL=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_I2C=m
 CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=m
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_RTC_CLASS=y
@@ -227,7 +250,7 @@ CONFIG_RTC_DRV_AT91RM9200=y
 CONFIG_RTC_DRV_AT91SAM9=y
 CONFIG_RTC_I2C_AND_SPI=y
 CONFIG_RTC_MC146818_LIB=y
-# CONFIG_SAMA5D4_WATCHDOG is not set
+CONFIG_SAMA5D4_WATCHDOG=y
 # CONFIG_SERIAL_8250 is not set
 CONFIG_SERIAL_ATMEL=y
 CONFIG_SERIAL_ATMEL_CONSOLE=y
@@ -256,6 +279,8 @@ CONFIG_SPLIT_PTLOCK_CPUS=99
 CONFIG_SRAM=y
 CONFIG_SRAM_EXEC=y
 CONFIG_SRCU=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
 CONFIG_SWPHY=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_TICK_CPU_ACCOUNTING=y
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 8/8] at91: add support for sam9x60-ek board

2021-08-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAM9X60-EK board.

Hardware:
- SoC: SAM9X60
- RAM: Winbond W972GG6KB-25 (2Gbit DDR2)
- NAND Flash: Micron MT29F4G08ABAEA
- QSPI Flash: Microchip SST26VF064B
- EEPROM: Microchip 24AA02E48
- SDMMC: One standard 4-bit SD card interface
- USB: two stacked Type-A connectors with power switches, one micro-B
   USB device
- CAN: 2 interfaces (Microchip MCP2542)
- Ethernet: one 10/100Mbps
- WiFi/BT: one optional WiFi/Bluetooth interface
- Audio: one ClassD port
- Display: one 24-bit LCD interface
- Camera: one 12-bit image sensor interface
- IO: one IO expander (Microchip MCP23008)
- Debug ports: one J-Link-OB + CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: 4 push button switches
- Expansion: one PIO connector, one mikrobus connector
- Power management: two power regulators, two power consumption measurement
devices

Flashing:
- follow the procedure at [1]

[1] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sam9x60EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile| 14 ++
 target/linux/at91/image/sam9x.mk| 13 +++--
 3 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 8711acd286bd..2d77f7099721 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -40,6 +40,18 @@ define AT91Bootstrap/at91sam9x5eksd_uboot
   BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
 endef
 
+define AT91Bootstrap/sam9x60eknf_uboot
+  NAME:=AT91Bootstrap for SAM9X60-EK board (NandFlash)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
+define AT91Bootstrap/sam9x60eksd_uboot
+  NAME:=AT91Bootstrap for SAM9X60-EK board (SDcard)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
 define AT91Bootstrap/sama5d2_icpdf_qspi_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 ICP board (QSPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -145,6 +157,8 @@ endef
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
+   sam9x60eknf_uboot \
+   sam9x60eksd_uboot \
sama5d2_icpdf_qspi_uboot \
sama5d2_icpsd_uboot \
sama5d2_xplaineddf_uboot \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 5aade7de9cf9..ed929794bdb1 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -47,6 +47,18 @@ define U-Boot/at91sam9x5ek_mmc
  atmel_at91sam9x35ek
 endef
 
+define U-Boot/sam9x60ek_nandflash
+  NAME:=SAM9X60-EK board (NandFlash)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
+define U-Boot/sam9x60ek_mmc
+  NAME:=SAM9X60-EK board (SDcard)
+  BUILD_SUBTARGET:=sam9x
+  BUILD_DEVICES:=microchip_sam9x60ek
+endef
+
 define U-Boot/sama5d3_xplained_nandflash
   NAME:=SAMA5D3 Xplained board (NandFlash)
   BUILD_SUBTARGET:=sama5
@@ -135,6 +147,8 @@ UBOOT_TARGETS := \
at91sam9m10g45ek_nandflash \
at91sam9x5ek_nandflash \
at91sam9x5ek_mmc \
+   sam9x60ek_nandflash \
+   sam9x60ek_mmc \
sama5d3_xplained_nandflash \
sama5d3_xplained_mmc \
sama5d2_icp_mmc \
diff --git a/target/linux/at91/image/sam9x.mk b/target/linux/at91/image/sam9x.mk
index 6f10123bbaae..b6c5e33ac44f 100644
--- a/target/linux/at91/image/sam9x.mk
+++ b/target/linux/at91/image/sam9x.mk
@@ -16,11 +16,11 @@ define Build/at91-sdcard
::$(DEVICE_NAME)-fit.itb
 
   mcopy -i $@.boot \
-   $(BIN_DIR)/u-boot-at91sam9x5ek_mmc/u-boot.bin \
+   $(BIN_DIR)/u-boot-$(if $(findstring 
sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)_mmc/u-boot.bin \
::u-boot.bin
 
   mcopy -i $@.boot \
-   $(BIN_DIR)/at91bootstrap-at91sam9x5eksd_uboot/at91bootstrap.bin \
+   $(BIN_DIR)/at91bootstrap-$(if $(findstring 
sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)sd_uboot/at91bootstrap.bin \
::BOOT.bin
 
   $(CP) uboot-env.txt $@-uboot-env.txt
@@ -112,6 +112,15 @@ define Device/atmel_at91sam9x35ek
 endef
 TARGET_DEVICES += atmel_at91sam9x35ek
 
+define Device/microchip_sam9x60ek
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAM9X60-EK
+  DEVICE_DTS := at91-sam9x60ek
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sam9x60ek
+
 define Device/calamp_lmu5000
   $(Device/production)
   DEVICE_VENDOR := CalAmp
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 6/8] at91: enable specific sam9x kernel config flags

2021-08-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Enable specific sam9x kernel config flags.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/sam9x/config-default | 182 -
 1 file changed, 176 insertions(+), 6 deletions(-)

diff --git a/target/linux/at91/sam9x/config-default 
b/target/linux/at91/sam9x/config-default
index d8b5c31dc7e5..0b8e8947ee12 100644
--- a/target/linux/at91/sam9x/config-default
+++ b/target/linux/at91/sam9x/config-default
@@ -20,7 +20,7 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 # CONFIG_AT91RM9200_WATCHDOG is not set
-# CONFIG_AT91SAM9X_WATCHDOG is not set
+CONFIG_AT91SAM9X_WATCHDOG=y
 CONFIG_AT91_SOC_ID=y
 CONFIG_ATMEL_AIC5_IRQ=y
 CONFIG_ATMEL_AIC_IRQ=y
@@ -29,16 +29,22 @@ CONFIG_ATMEL_CLOCKSOURCE_TCB=y
 CONFIG_ATMEL_EBI=y
 CONFIG_ATMEL_PIT=y
 CONFIG_ATMEL_SDRAMC=y
+CONFIG_ATMEL_SSC=y
 CONFIG_ATMEL_ST=y
 CONFIG_ATMEL_TCB_CLKSRC=y
-# CONFIG_ATMEL_TCLIB is not set
+CONFIG_ATMEL_TCLIB=y
+CONFIG_AT_HDMAC=y
+# CONFIG_AT_XDMAC is not set
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_SCSI_REQUEST=y
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_AT91=y
 CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_CPU_32v4T=y
 CONFIG_CPU_32v5=y
 CONFIG_CPU_ABRT_EV4T=y
@@ -57,17 +63,36 @@ CONFIG_CPU_PABRT_LEGACY=y
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V4WBI=y
 CONFIG_CPU_USE_DOMAINS=y
+CONFIG_CRC16=y
 CONFIG_CRC7=y
 CONFIG_CRC_CCITT=y
 CONFIG_CRC_ITU_T=y
+CONFIG_CRYPTO_ACOMP2=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LZO=y
 CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_ZSTD=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
 CONFIG_DMA_REMAP=y
 CONFIG_DTC=y
+CONFIG_DUMMY_CONSOLE=y
 CONFIG_EDAC_ATOMIC_SCRUB=y
 CONFIG_EDAC_SUPPORT=y
+CONFIG_EEPROM_AT24=m
+CONFIG_EXT4_FS=y
+CONFIG_FAT_FS=y
+CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ATOMIC64=y
@@ -91,38 +116,84 @@ CONFIG_GENERIC_STRNLEN_USER=y
 CONFIG_GLOB=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GRACE_PERIOD=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HW_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_ATMEL=y
 CONFIG_HZ=128
 CONFIG_HZ_FIXED=128
 CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_AT91=y
+# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_GPIO=y
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_IPV6=y
+# CONFIG_IPV6_SEG6_LWTUNNEL is not set
 CONFIG_IRQCHIP=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_GPIO=y
 CONFIG_LIBFDT=y
+CONFIG_LOCKD=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MACB=y
+CONFIG_MACB_USE_HWSTAMP=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
 CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
-# CONFIG_MFD_AT91_USART is not set
+CONFIG_MFD_AT91_USART=y
+CONFIG_MFD_ATMEL_HLCDC=y
 CONFIG_MFD_ATMEL_SMC=y
+CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
+CONFIG_MICREL_PHY=y
 # CONFIG_MICROCHIP_PIT64B is not set
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
-# CONFIG_MMC_ATMELMCI is not set
+CONFIG_MMC_ATMELMCI=y
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_OF_AT91=y
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_DATAFLASH=y
+# CONFIG_MTD_DATAFLASH_OTP is not set
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+# CONFIG_MTD_UBI_BLOCK is not set
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_GLUEBI=m
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_KUSER_HELPERS=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NFS_FS=y
+CONFIG_NLS=y
+CONFIG_NVMEM=y
+CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
@@ -130,40 +201,139 @@ CONFIG_OF_FLATTREE=y
 CONFIG_OF_GPIO=y
 CONFIG_OF_IRQ=y
 CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
 CONFIG_OF_NET=y
 CONFIG_OLD_SIGACTION=y
 CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_PAGE_OFFSET=0xC000
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 # CONFIG_PINCTRL_AT91PIO4 is not set
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_AT91_POWEROFF=y
+CONFIG_POWER_RESET_AT91_RESET=y
+# 

[PATCH 7/8] at91: enable kernel config for sam9x60

2021-08-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Enable kernel config for SAM9X60.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/sam9x/config-default | 28 +++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/target/linux/at91/sam9x/config-default 
b/target/linux/at91/sam9x/config-default
index 0b8e8947ee12..e425f19091ae 100644
--- a/target/linux/at91/sam9x/config-default
+++ b/target/linux/at91/sam9x/config-default
@@ -14,6 +14,7 @@ CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
+CONFIG_ARM_CPU_SUSPEND=y
 CONFIG_ARM_HAS_SG_CHAIN=y
 CONFIG_ARM_L1_CACHE_SHIFT=5
 CONFIG_ARM_PATCH_PHYS_VIRT=y
@@ -21,6 +22,8 @@ CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 # CONFIG_AT91RM9200_WATCHDOG is not set
 CONFIG_AT91SAM9X_WATCHDOG=y
+# CONFIG_AT91_ADC is not set
+CONFIG_AT91_SAMA5D2_ADC=y
 CONFIG_AT91_SOC_ID=y
 CONFIG_ATMEL_AIC5_IRQ=y
 CONFIG_ATMEL_AIC_IRQ=y
@@ -28,17 +31,20 @@ CONFIG_ATMEL_CLOCKSOURCE_PIT=y
 CONFIG_ATMEL_CLOCKSOURCE_TCB=y
 CONFIG_ATMEL_EBI=y
 CONFIG_ATMEL_PIT=y
+CONFIG_ATMEL_PM=y
 CONFIG_ATMEL_SDRAMC=y
 CONFIG_ATMEL_SSC=y
 CONFIG_ATMEL_ST=y
 CONFIG_ATMEL_TCB_CLKSRC=y
 CONFIG_ATMEL_TCLIB=y
 CONFIG_AT_HDMAC=y
-# CONFIG_AT_XDMAC is not set
+CONFIG_AT_XDMAC=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_PM=y
 CONFIG_BLK_SCSI_REQUEST=y
 CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLKSRC_MMIO=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_AT91=y
@@ -60,6 +66,7 @@ CONFIG_CPU_CP15_MMU=y
 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
 CONFIG_CPU_NO_EFFICIENT_FFS=y
 CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_PM=y
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V4WBI=y
 CONFIG_CPU_USE_DOMAINS=y
@@ -91,6 +98,7 @@ CONFIG_EXT4_FS=y
 CONFIG_FAT_FS=y
 CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FREEZER=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
@@ -136,6 +144,11 @@ CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_COMPAT=y
 CONFIG_I2C_GPIO=y
+CONFIG_IIO=y
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_KFIFO_BUF=y
+CONFIG_IIO_TRIGGER=y
+CONFIG_IIO_TRIGGERED_BUFFER=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INPUT=y
 CONFIG_INPUT_KEYBOARD=y
@@ -162,12 +175,13 @@ CONFIG_MDIO_DEVICE=y
 CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
 CONFIG_MFD_AT91_USART=y
+CONFIG_MFD_ATMEL_FLEXCOM=y
 CONFIG_MFD_ATMEL_HLCDC=y
 CONFIG_MFD_ATMEL_SMC=y
 CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MICREL_PHY=y
-# CONFIG_MICROCHIP_PIT64B is not set
+CONFIG_MICROCHIP_PIT64B=y
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
 CONFIG_MMC_ATMELMCI=y
@@ -212,6 +226,10 @@ CONFIG_PHYLIB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 # CONFIG_PINCTRL_AT91PIO4 is not set
+CONFIG_PINCTRL_MCP23S08=m
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PM_SLEEP=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_AT91_POWEROFF=y
 CONFIG_POWER_RESET_AT91_RESET=y
@@ -231,6 +249,7 @@ CONFIG_REFCOUNT_FULL=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_I2C=m
 CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=m
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_RTC_CLASS=y
@@ -238,7 +257,7 @@ CONFIG_RTC_DRV_AT91RM9200=y
 CONFIG_RTC_DRV_AT91SAM9=y
 CONFIG_RTC_I2C_AND_SPI=y
 CONFIG_RTC_MC146818_LIB=y
-# CONFIG_SAMA5D4_WATCHDOG is not set
+CONFIG_SAMA5D4_WATCHDOG=y
 CONFIG_SCSI=y
 # CONFIG_SERIAL_8250 is not set
 CONFIG_SERIAL_ATMEL=y
@@ -271,6 +290,8 @@ CONFIG_SRAM=y
 CONFIG_SRAM_EXEC=y
 CONFIG_SRCU=y
 CONFIG_SUNRPC=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
 CONFIG_SWPHY=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_TICK_CPU_ACCOUNTING=y
@@ -328,6 +349,7 @@ CONFIG_VFAT_FS=y
 # CONFIG_VFP is not set
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
+CONFIG_VT_CONSOLE_SLEEP=y
 # CONFIG_VT_HW_CONSOLE_BINDING is not set
 CONFIG_WATCHDOG_CORE=y
 CONFIG_XXHASH=y
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 0/8] at91: add support for sama5d2 icp, sama5d27 wlsom1 ek and sam9x60ek

2021-08-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hi,

This series adds support for SAMA5D2 ICP, SAMA5D27-WLSOM1-EK and
SAM9X60EK boards.

Since SAM9X60's kernel support is included in 5.10 but not on 5.4
1st (patch 1/8) switches to kernel 5.10.

Patch 2/8, 3/8, 8/8 adds the boards support.

Patches 5-7/8 updates the kernel config for sam9x SoCs and sam9x60.

Thank you,
Claudiu Beznea

Changes in v2:
- changed series title from "at91: add support for sama5d2 icp and" to
  "at91: add support for sama5d2 icp, sama5d27 wlsom1 ek and sam9x60ek"
- bump at91 to kernel 5.10
- adds sam9x60 and sam9x60ek specific support
- drop patch 1/3 from v1

Claudiu Beznea (8):
  at91: kernel: bump to 5.10
  at91: add support for sama5d2 icp board
  at91: add support for sama5d27-wlsom1-ek board
  at91: use make kernel_menuconfig and save for sam9x kernel config
  at91: enable CONFIG_ARCH_AT91 and specific sam9x SoCs
  at91: enable specific sam9x kernel config flags
  at91: enable kernel config for sam9x60
  at91: add support for sam9x60-ek board

 package/boot/at91bootstrap/Makefile   |  42 +++
 package/boot/uboot-at91/Makefile  |  35 ++
 target/linux/at91/Makefile|   2 +-
 .../at91/files/arch/arm/boot/dts/wb45n.dts| 220 -
 .../at91/files/arch/arm/boot/dts/wb50n.dts| 113 ---
 .../at91/files/arch/arm/boot/dts/wb50n.dtsi   | 205 
 target/linux/at91/image/sam9x.mk  |  14 +-
 target/linux/at91/image/sama5.mk  |  23 ++
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 -
 .../102-ARM-at91-build-dtb-for-wb45n.patch|  12 -
 ...2-ARM-at91-wb45n-fix-duplicate-label.patch |  20 --
 .../103-ARM-at91-build-dtb-for-wb50n.patch|  12 -
 ...3-ARM-at91-wb50n-fix-duplicate-label.patch |  39 ---
 target/linux/at91/sam9x/config-default| 299 ++
 15 files changed, 360 insertions(+), 696 deletions(-)
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi
 create mode 04 target/linux/at91/patches-5.10
 create mode 100644 
target/linux/at91/patches-5.10/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 04 target/linux/at91/patches-5.4
 delete mode 100644 
target/linux/at91/patches-5.4/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-build-dtb-for-wb45n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-wb45n-fix-duplicate-label.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-build-dtb-for-wb50n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-wb50n-fix-duplicate-label.patch

-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 1/8] at91: kernel: bump to 5.10

2021-08-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Bump at91 targets to kernel v5.10. With this, patches and files for
wb45n and wb50n were removed as they are now included in upstream
kernel.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/Makefile|   2 +-
 .../at91/files/arch/arm/boot/dts/wb45n.dts| 220 --
 .../at91/files/arch/arm/boot/dts/wb50n.dts| 113 -
 .../at91/files/arch/arm/boot/dts/wb50n.dtsi   | 205 
 target/linux/at91/image/sam9x.mk  |   1 +
 target/linux/at91/image/sama5.mk  |   1 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch|  10 -
 .../102-ARM-at91-build-dtb-for-wb45n.patch|  12 -
 ...2-ARM-at91-wb45n-fix-duplicate-label.patch |  20 --
 .../103-ARM-at91-build-dtb-for-wb50n.patch|  12 -
 ...3-ARM-at91-wb50n-fix-duplicate-label.patch |  39 
 12 files changed, 13 insertions(+), 632 deletions(-)
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dts
 delete mode 100644 target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi
 create mode 04 target/linux/at91/patches-5.10
 create mode 100644 
target/linux/at91/patches-5.10/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 04 target/linux/at91/patches-5.4
 delete mode 100644 
target/linux/at91/patches-5.4/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-build-dtb-for-wb45n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/102-ARM-at91-wb45n-fix-duplicate-label.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-build-dtb-for-wb50n.patch
 delete mode 100644 
target/linux/at91/patches-5.4/103-ARM-at91-wb50n-fix-duplicate-label.patch

diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile
index fe6a93244a5f..e4da7fb7e7da 100644
--- a/target/linux/at91/Makefile
+++ b/target/linux/at91/Makefile
@@ -10,7 +10,7 @@ BOARDNAME:=Microchip (Atmel AT91)
 FEATURES:=ext4 squashfs targz usb usbgadget ubifs
 SUBTARGETS:=sama5 sam9x
 
-KERNEL_PATCHVER:=5.4
+KERNEL_PATCHVER:=5.10
 
 include $(INCLUDE_DIR)/target.mk
 
diff --git a/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts 
b/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
deleted file mode 100644
index fd9d260f2ab5..
--- a/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts
+++ /dev/null
@@ -1,220 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * wb45n.dts - Device Tree file for WB45NBT board
- *
- *  Copyright (C) 2015 Laird
- */
-
-/dts-v1/;
-#include "at91sam9g25.dtsi"
-
-/ {
-   model = "Laird Workgroup Bridge 45N - Atmel AT91SAM (dt)";
-   compatible = "laird,wb45n", "laird,wbxx", "atmel,at91sam9x5", 
"atmel,at91sam9";
-
-   chosen {
-   bootargs = "console=ttyS0,115200 root=/dev/mtdblock1 rw 
rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs";
-   };
-
-   memory {
-   reg = <0x2000 0x400>;
-   };
-
-   clocks {
-   #address-cells = <1>;
-   #size-cells = <1>;
-   ranges;
-
-   main_clock: clock@0 {
-   compatible = "atmel,osc", "fixed-clock";
-   clock-frequency = <1200>;
-   };
-
-   slow_xtal {
-   clock-frequency = <32768>;
-   };
-
-   main_xtal {
-   clock-frequency = <1200>;
-   };
-   };
-
-   ahb {
-   apb {
-
-   rstc@fe00 {
-   compatible = "atmel,sama5d3-rstc";
-   };
-
-   pinctrl@f400 {
-   nand {
-   pinctrl_nand: nand-0 {
-   atmel,pins =
-   ;  /* PD5 gpio RDY/BUSY pin pull_up */
-   };
-   };
-
-   usb2 {
-   pinctrl_board_usb2: usb2-board {
-   atmel,pins =
-   ;  /* PB11 gpio vbus sense, 
deglitch */
-   };
-   };
-   };
-
-   dbgu: serial@f200 {
-   status = "okay";
-   };
-
-   usart0: serial@f801c000 {
-   status = "okay";
-   

[PATCH 3/8] at91: add support for sama5d27-wlsom1-ek board

2021-08-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA5D27 WLSOM1-EK board.

Hardware:
- SIP: SAMA5D27C-LD2G-CU including SAMA5D27 MPU and 2Gbit LPDDR2-SDRAM
- MMC: one standard SD card interface
- Flash: 64 Mb serial quad I/O flash memory (SST26VF064BEUIT-104I/MF)
 with embedded EUI-48 and EUI-64 MAC addresses
- USB: one USB device, one USB host one HSIC interface
- Ethernet: 1x10/100Mbps port
- WiFi/BT: IEEE 802.11 b/g/n Wi-Fi plus Bluetooth (Wi-Fi/BT) module
   (ATWILC3000-MR110UA)
- Crypto: one ATECC608B-TNGTLS secure element
- Video: one LCD RGB 18-bit interface, one ISC 12-bit camera interface
- Debug port: one JTAG interface, one UART interface, one WILC UART
  interface
- Leds: one RGB LED
- Buttons: start, reset, wakeup, user buttons
- Expansion: one tamper connector, one mikrobus interface, 2 XPRO PTC
 connector
- Power managament: PMIC (MCP16502)

Flashing:
- follow procedure at [1]

[1] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d27WLSom1EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile| 14 ++
 target/linux/at91/image/sama5.mk| 11 +++
 3 files changed, 39 insertions(+)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 56e14c57703c..8711acd286bd 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -118,6 +118,18 @@ define AT91Bootstrap/sama5d27_som1_ekqspi_uboot
   BUILD_DEVICES:=microchip_sama5d27-som1-ek
 endef
 
+define AT91Bootstrap/sama5d27_wlsom1_eksd_uboot
+  TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (SDcard0)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
+define AT91Bootstrap/sama5d27_wlsom1_ekdf_qspi_uboot
+  TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
 define AT91Bootstrap/sama5d2_ptc_eknf_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 PTC EK (Nand Flash)
   BUILD_SUBTARGET:=sama5
@@ -145,6 +157,8 @@ AT91BOOTSTRAP_TARGETS := \
sama5d4_xplainedsd_uboot_secure \
sama5d27_som1_eksd1_uboot \
sama5d27_som1_ekqspi_uboot \
+   sama5d27_wlsom1_eksd_uboot \
+   sama5d27_wlsom1_ekdf_qspi_uboot \
sama5d2_ptc_eknf_uboot \
sama5d2_ptc_eksd_uboot
 
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 193f26dae471..5aade7de9cf9 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -107,6 +107,18 @@ define U-Boot/sama5d27_som1_ek_qspiflash
   BUILD_DEVICES:=microchip_sama5d27-som1-ek
 endef
 
+define U-Boot/sama5d27_wlsom1_ek_mmc
+  NAME:=SAMA5D27 WLSOM1 Ek (SDCard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
+define U-Boot/sama5d27_wlsom1_ek_qspiflash
+  NAME:=SAMA5D27 WLSOM1 Ek (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
 define U-Boot/sama5d2_ptc_ek_nandflash
   NAME:=SAMA5D2 PTC Ek (Nand Flash)
   BUILD_SUBTARGET:=sama5
@@ -133,6 +145,8 @@ UBOOT_TARGETS := \
sama5d4_xplained_nandflash\
sama5d27_som1_ek_mmc1 \
sama5d27_som1_ek_qspiflash \
+   sama5d27_wlsom1_ek_mmc \
+   sama5d27_wlsom1_ek_qspiflash \
sama5d2_ptc_ek_nandflash \
sama5d2_ptc_ek_mmc
 
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index ae3494332139..9078db525f97 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -87,6 +87,17 @@ define Device/microchip_sama5d27-som1-ek
 endef
 TARGET_DEVICES += microchip_sama5d27-som1-ek
 
+define Device/microchip_sama5d27-wlsom1-ek
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAMA5D27 WSOM1 Ek
+  DEVICE_DTS := at91-sama5d27_wlsom1_ek
+  SUPPORTED_DEVICES := microchip,sama5d27-wlsom1-ek
+  KERNEL_SIZE := 6144k
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sama5d27-wlsom1-ek
+
 define Device/microchip_sama5d2-ptc-ek
   $(Device/evaluation-dtb)
   DEVICE_VENDOR := Microchip
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 5/8] at91: enable CONFIG_ARCH_AT91 and specific sam9x SoCs

2021-08-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Enable CONFIG_ARCH_AT91 and specific sam9x SoCs (AT91RM9200, AT91SAM9,
SAM9X60). Without enabled options the targets are not able to boot.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/sam9x/config-default | 44 +-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/target/linux/at91/sam9x/config-default 
b/target/linux/at91/sam9x/config-default
index ebfd38d131db..d8b5c31dc7e5 100644
--- a/target/linux/at91/sam9x/config-default
+++ b/target/linux/at91/sam9x/config-default
@@ -1,5 +1,6 @@
 CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_AT91=y
 CONFIG_ARCH_CLOCKSOURCE_DATA=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_KEEP_MEMBLOCK=y
@@ -18,11 +19,25 @@ CONFIG_ARM_L1_CACHE_SHIFT=5
 CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
+# CONFIG_AT91RM9200_WATCHDOG is not set
+# CONFIG_AT91SAM9X_WATCHDOG is not set
+CONFIG_AT91_SOC_ID=y
+CONFIG_ATMEL_AIC5_IRQ=y
+CONFIG_ATMEL_AIC_IRQ=y
+CONFIG_ATMEL_CLOCKSOURCE_PIT=y
+CONFIG_ATMEL_CLOCKSOURCE_TCB=y
+CONFIG_ATMEL_EBI=y
+CONFIG_ATMEL_PIT=y
+CONFIG_ATMEL_SDRAMC=y
+CONFIG_ATMEL_ST=y
+CONFIG_ATMEL_TCB_CLKSRC=y
+# CONFIG_ATMEL_TCLIB is not set
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_AT91=y
 CONFIG_COMPAT_32BIT_TIME=y
 CONFIG_CPU_32v4T=y
 CONFIG_CPU_32v5=y
@@ -61,20 +76,28 @@ CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_EARLY_IOREMAP=y
 CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_CHIP=y
 CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
 CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
 CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_PINCTRL_GROUPS=y
+CONFIG_GENERIC_PINMUX_FUNCTIONS=y
 CONFIG_GENERIC_SCHED_CLOCK=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_STRNCPY_FROM_USER=y
 CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GLOB=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HZ_FIXED=0
+CONFIG_HZ=128
+CONFIG_HZ_FIXED=128
 CONFIG_HZ_PERIODIC=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_IRQCHIP=y
@@ -84,9 +107,14 @@ CONFIG_IRQ_WORK=y
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY=y
+# CONFIG_MFD_AT91_USART is not set
+CONFIG_MFD_ATMEL_SMC=y
+CONFIG_MFD_SYSCON=y
 # CONFIG_MICROCHIP_PIT64B is not set
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
+# CONFIG_MMC_ATMELMCI is not set
 CONFIG_MMC_BLOCK=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_OF_AT91=y
@@ -99,6 +127,7 @@ CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
 CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
 CONFIG_OF_IRQ=y
 CONFIG_OF_KOBJ=y
 CONFIG_OF_NET=y
@@ -107,9 +136,22 @@ CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_PAGE_OFFSET=0xC000
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+# CONFIG_PINCTRL_AT91PIO4 is not set
 CONFIG_RATIONAL=y
 CONFIG_REFCOUNT_FULL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+# CONFIG_SAMA5D4_WATCHDOG is not set
 CONFIG_SERIAL_8250_FSL=y
+# CONFIG_SERIAL_ATMEL is not set
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SOC_AT91RM9200=y
+CONFIG_SOC_AT91SAM9=y
+CONFIG_SOC_BUS=y
+CONFIG_SOC_SAM9X60=y
+CONFIG_SOC_SAM_V4_V5=y
 CONFIG_SPARSE_IRQ=y
 CONFIG_SPLIT_PTLOCK_CPUS=99
 CONFIG_SRCU=y
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 2/8] at91: add support for sama5d2 icp board

2021-08-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA5D2 ICP board.

Hardware:
- SoC: SAMA5D27
- RAM: 512 MB DDR3L
- MMC: One stanard SD card interface
- USB: One USB host switch 4 ports with power switch,
   One USB device type Micro-AB
- CAN: 2 interfaces
- Ethernet: One Gigabit Ethernet PHY through HSIC,
One ETH switchport,
One EtherCAT interface
- WiFi/BT: Footprint for IEEE 802.11 b/g/n Wi-Fi plus
   Bluetooth module (Wi-Fi/BT), suitable for
   Microchip WILC3000-MR110CA or WILC3000-MR110UA
- Debug port: One J-Link-OB/J-Link-CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: reset, wakeup, 2 user buttons
- Expansion: one PIOBU/PIO connector, 3 mikrobus sockets
- Power mangament: PMIC (MCP16502), one power consumption device
   (PAC1934)

Not working in Linux:
- EtherCAT interface: there is no Linux support integrated
- PAC1934: driver available at [1] but not integrated in Linux

Flashing:
- follow the procedure at [2]

[1] https://ww1.microchip.com/downloads/en/DeviceDoc/pac193x_linux_driver.zip
[2] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d2IcpMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile | 14 ++
 package/boot/uboot-at91/Makefile|  7 +++
 target/linux/at91/image/sama5.mk| 11 +++
 3 files changed, 32 insertions(+)

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index f66472fa9c29..56e14c57703c 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -40,6 +40,18 @@ define AT91Bootstrap/at91sam9x5eksd_uboot
   BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
 endef
 
+define AT91Bootstrap/sama5d2_icpdf_qspi_uboot
+  TITLE:=AT91Bootstrap for SAMA5D2 ICP board (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
+define AT91Bootstrap/sama5d2_icpsd_uboot
+  TITLE:=AT91Bootstrap for SAMA5D2 ICP board (SDcard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
 define AT91Bootstrap/sama5d2_xplaineddf_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -121,6 +133,8 @@ endef
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
+   sama5d2_icpdf_qspi_uboot \
+   sama5d2_icpsd_uboot \
sama5d2_xplaineddf_uboot \
sama5d2_xplaineddf_qspi_uboot \
sama5d2_xplainedsd_uboot \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index a8a71239a398..193f26dae471 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -59,6 +59,12 @@ define U-Boot/sama5d3_xplained_mmc
   BUILD_DEVICES:=microchip_sama5d3-xplained
 endef
 
+define U-Boot/sama5d2_icp_mmc
+  NAME:=SAMA5D2 ICP board (SDCard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
 define U-Boot/sama5d2_xplained_spiflash
   NAME:=SAMA5D2 Xplained board (SPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -119,6 +125,7 @@ UBOOT_TARGETS := \
at91sam9x5ek_mmc \
sama5d3_xplained_nandflash \
sama5d3_xplained_mmc \
+   sama5d2_icp_mmc \
sama5d2_xplained_mmc \
sama5d2_xplained_spiflash \
sama5d4_xplained_mmc \
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index f8e05aae9343..ae3494332139 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -54,6 +54,17 @@ define Build/at91-sdcard
   rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
 endef
 
+define Device/microchip_sama5d2-icp
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAMA5D2 ICP
+  DEVICE_DTS := at91-sama5d2_icp
+  SUPPORTED_DEVICES := microchip,sama5d2-icp
+  KERNEL_SIZE := 6144k
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sama5d2-icp
+
 define Device/microchip_sama5d2-xplained
   $(Device/evaluation-dtb)
   DEVICE_VENDOR := Microchip
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 4/8] at91: use make kernel_menuconfig and save for sam9x kernel config

2021-08-20 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Use kernel_menuconfig and save for sam9x kernel config.

Signed-off-by: Claudiu Beznea 
---
 target/linux/at91/sam9x/config-default | 61 +-
 1 file changed, 1 insertion(+), 60 deletions(-)

diff --git a/target/linux/at91/sam9x/config-default 
b/target/linux/at91/sam9x/config-default
index d0a1cbc0a45b..ebfd38d131db 100644
--- a/target/linux/at91/sam9x/config-default
+++ b/target/linux/at91/sam9x/config-default
@@ -1,22 +1,6 @@
 CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ARCH_32BIT_OFF_T=y
 CONFIG_ARCH_CLOCKSOURCE_DATA=y
-CONFIG_ARCH_HAS_BINFMT_FLAT=y
-CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
-CONFIG_ARCH_HAS_DMA_WRITE_COMBINE=y
-CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
-CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
-CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
-CONFIG_ARCH_HAS_KCOV=y
-CONFIG_ARCH_HAS_KEEPINITRD=y
-CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
-CONFIG_ARCH_HAS_PHYS_TO_DMA=y
-CONFIG_ARCH_HAS_SETUP_DMA_OPS=y
-CONFIG_ARCH_HAS_SET_MEMORY=y
-CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
-CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
-CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y
-CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_KEEP_MEMBLOCK=y
 CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
@@ -27,14 +11,7 @@ CONFIG_ARCH_MULTI_V4_V5=y
 CONFIG_ARCH_MULTI_V5=y
 CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
-CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
-CONFIG_ARCH_SUPPORTS_UPROBES=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_USE_BUILTIN_BSWAP=y
-CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
-CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
-CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
-CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARM=y
 CONFIG_ARM_HAS_SG_CHAIN=y
 CONFIG_ARM_L1_CACHE_SHIFT=5
@@ -43,7 +20,6 @@ CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
-CONFIG_CC_HAS_KASAN_GENERIC=y
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
@@ -98,42 +74,6 @@ CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HAVE_ARCH_AUDITSYSCALL=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_ARCH_KGDB=y
-CONFIG_HAVE_ARCH_PFN_VALID=y
-CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
-CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
-CONFIG_HAVE_ARCH_TRACEHOOK=y
-CONFIG_HAVE_CLK=y
-CONFIG_HAVE_CLK_PREPARE=y
-CONFIG_HAVE_CONTEXT_TRACKING=y
-CONFIG_HAVE_COPY_THREAD_TLS=y
-CONFIG_HAVE_C_RECORDMCOUNT=y
-CONFIG_HAVE_DEBUG_KMEMLEAK=y
-CONFIG_HAVE_DMA_CONTIGUOUS=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
-CONFIG_HAVE_EBPF_JIT=y
-CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
-CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y
-CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
-CONFIG_HAVE_NET_DSA=y
-CONFIG_HAVE_OPROFILE=y
-CONFIG_HAVE_OPTPROBES=y
-CONFIG_HAVE_PCI=y
-CONFIG_HAVE_PERF_EVENTS=y
-CONFIG_HAVE_PERF_REGS=y
-CONFIG_HAVE_PERF_USER_STACK_DUMP=y
-CONFIG_HAVE_PROC_CPU=y
-CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
-CONFIG_HAVE_RSEQ=y
-CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-CONFIG_HAVE_UID16=y
-CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 CONFIG_HZ_FIXED=0
 CONFIG_HZ_PERIODIC=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -144,6 +84,7 @@ CONFIG_IRQ_WORK=y
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_MEMFD_CREATE=y
+# CONFIG_MICROCHIP_PIT64B is not set
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
 CONFIG_MMC_BLOCK=y
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 2/3] at91: add support for sama5d2 icp board

2021-07-15 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA5D2 ICP board.

Hardware:
- SoC: SAMAA5D27
- RAM: 512 MB DDR3L
- MMC: One stanard SD card interface
- USB: One USB host switch 4 ports with power switch,
   One USB device type Micro-AB
- CAN: 2 interfaces
- Ethernet: One Gigabit Ethernet PHY through HSIC,
One ETH switchport
One EtherCAT interface
- WiFi/BT: Footprint for IEEE 802.11 b/g/n Wi-Fi plus
   Bluetooth module (Wi-Fi/BT), suitable for
   Microchip WILC3000-MR110CA or WILC3000-MR110UA
- Debug port: One J-Link-OB/J-Link-CDC, one JTAG interface
- Leds: one RGB LED
- Buttons: reset, wakeup, 2 user buttons
- Expansion: one PIOBU/PIO connector, 3 mikrobus sockets
- Power mangament: PMIC (MCP16502), one power consumption device
   (PAC1934)

Not working in Linux:
- EtherCAT interface: there is no Linux support integrated
- PAC1934: driver available at [1] but not integrated in Linux

Flashing:
- follow the procedure at [2]

[1] https://ww1.microchip.com/downloads/en/DeviceDoc/pac193x_linux_driver.zip
[2] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d2IcpMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile   |  14 +
 package/boot/uboot-at91/Makefile  |   7 +
 target/linux/at91/image/sama5.mk  |  11 +
 .../linux/at91/patches-5.4/105-add-icp.patch  | 780 ++
 4 files changed, 812 insertions(+)
 create mode 100644 target/linux/at91/patches-5.4/105-add-icp.patch

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index f66472fa9c29..56e14c57703c 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -40,6 +40,18 @@ define AT91Bootstrap/at91sam9x5eksd_uboot
   BUILD_DEVICES:=atmel_at91sam9x25ek atmel_at91sam9x35ek
 endef
 
+define AT91Bootstrap/sama5d2_icpdf_qspi_uboot
+  TITLE:=AT91Bootstrap for SAMA5D2 ICP board (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
+define AT91Bootstrap/sama5d2_icpsd_uboot
+  TITLE:=AT91Bootstrap for SAMA5D2 ICP board (SDcard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
 define AT91Bootstrap/sama5d2_xplaineddf_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 Xplained board (SPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -121,6 +133,8 @@ endef
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
+   sama5d2_icpdf_qspi_uboot \
+   sama5d2_icpsd_uboot \
sama5d2_xplaineddf_uboot \
sama5d2_xplaineddf_qspi_uboot \
sama5d2_xplainedsd_uboot \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index a8a71239a398..193f26dae471 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -59,6 +59,12 @@ define U-Boot/sama5d3_xplained_mmc
   BUILD_DEVICES:=microchip_sama5d3-xplained
 endef
 
+define U-Boot/sama5d2_icp_mmc
+  NAME:=SAMA5D2 ICP board (SDCard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d2-icp
+endef
+
 define U-Boot/sama5d2_xplained_spiflash
   NAME:=SAMA5D2 Xplained board (SPI Flash)
   BUILD_SUBTARGET:=sama5
@@ -119,6 +125,7 @@ UBOOT_TARGETS := \
at91sam9x5ek_mmc \
sama5d3_xplained_nandflash \
sama5d3_xplained_mmc \
+   sama5d2_icp_mmc \
sama5d2_xplained_mmc \
sama5d2_xplained_spiflash \
sama5d4_xplained_mmc \
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index d644f89266d1..d02d09e835ec 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -54,6 +54,17 @@ define Build/at91-sdcard
   rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
 endef
 
+define Device/microchip_sama5d2-icp
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAMA5D2 ICP
+  DEVICE_DTS := at91-sama5d2_icp
+  SUPPORTED_DEVICES := microchip,sama5d2-icp
+  KERNEL_SIZE := 6144k
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sama5d2-icp
+
 define Device/microchip_sama5d2-xplained
   $(Device/evaluation-dtb)
   DEVICE_VENDOR := Microchip
diff --git a/target/linux/at91/patches-5.4/105-add-icp.patch 
b/target/linux/at91/patches-5.4/105-add-icp.patch
new file mode 100644
index ..a8f34bcdfa6a
--- /dev/null
+++ b/target/linux/at91/patches-5.4/105-add-icp.patch
@@ -0,0 +1,780 @@
+--- a/arch/arm/boot/dts/Makefile
 b/arch/arm/boot/dts/Makefile
+@@ -48,6 +48,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
+   at91-kizbox2.dtb \
+   at91-nattis-2-natte-2.dtb \
+   at91-sama5d27_som1_ek.dtb \
++  at91-sama5d2_icp.dtb \
+   at91-sama5d2_ptc_ek.dtb \
+   

[PATCH 0/3] at91: add support for sama5d2 icp and

2021-07-15 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hi,

This series adds support for SAMA5D2 ICP and SAMA5D27-WLSOM1-EK boards.
Patch 1/3 is needed as the pioBU label is necessary for PMIC
functionality on SAMA5D2 ICP and SAMA5D27-WLSOM1-EK boards.

Thank you,
Claudiu Beznea

Claudiu Beznea (3):
  at91: add pioBU label to secumod
  at91: add support for sama5d2 icp board
  at91: add support for sama5d27-wlsom1-ek board

 package/boot/at91bootstrap/Makefile   |  28 +
 package/boot/uboot-at91/Makefile  |  21 +
 target/linux/at91/image/sama5.mk  |  22 +
 .../at91/patches-5.4/104-add-piobu.patch  |  16 +
 .../linux/at91/patches-5.4/105-add-icp.patch  | 780 ++
 .../at91/patches-5.4/106-add-wlsom1.patch | 600 ++
 6 files changed, 1467 insertions(+)
 create mode 100644 target/linux/at91/patches-5.4/104-add-piobu.patch
 create mode 100644 target/linux/at91/patches-5.4/105-add-icp.patch
 create mode 100644 target/linux/at91/patches-5.4/106-add-wlsom1.patch

-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 3/3] at91: add support for sama5d27-wlsom1-ek board

2021-07-15 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA5D27 WLSOM1-EK board.

Hardware:
- SIP: SAMA5D27C-LD2G-CU including SAMA5D27 MPU and 2Gbit LPDDR2-SDRAM
- MMC: one standard SD card interface
- Flash: 64 Mb serial quad I/O flash memory (SST26VF064BEUIT-104I/MF)
 with embedded EUI-48 and EUI-64 MAC addresses
- USB: one USB device, one USB host one HSIC interface
- Ethernet: 1x10/100Mbps port
- WiFi/BT: IEEE 802.11 b/g/n Wi-Fi plus Bluetooth (Wi-Fi/BT) module
   (ATWILC3000-MR110UA)
- Crypto: one ATECC608B-TNGTLS secure element
- Video: one LCD RGB 18-bit interface, one ISC 12-bit camera interface
- Debug port: one JTAG interface, one UART interface, one WILC UART
  interface
- Leds: one RGB LED
- Buttons: start, reset, wakeup, user buttons
- Expansion: one tamper connector, one mikrobus interface, 2 XPRO PTC
 connector
- Power managament: PMIC (MCP16502)

Flashing:
- follow procedure at [1]

[1] 
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d27WLSom1EKMainPage#Create_a_SD_card_with_the_demo

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile   |  14 +
 package/boot/uboot-at91/Makefile  |  14 +
 target/linux/at91/image/sama5.mk  |  11 +
 .../at91/patches-5.4/106-add-wlsom1.patch | 600 ++
 4 files changed, 639 insertions(+)
 create mode 100644 target/linux/at91/patches-5.4/106-add-wlsom1.patch

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 56e14c57703c..8711acd286bd 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -118,6 +118,18 @@ define AT91Bootstrap/sama5d27_som1_ekqspi_uboot
   BUILD_DEVICES:=microchip_sama5d27-som1-ek
 endef
 
+define AT91Bootstrap/sama5d27_wlsom1_eksd_uboot
+  TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (SDcard0)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
+define AT91Bootstrap/sama5d27_wlsom1_ekdf_qspi_uboot
+  TITLE:=AT91Bootstrap for SAMA5D27 WLSOM1 Ek (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
 define AT91Bootstrap/sama5d2_ptc_eknf_uboot
   TITLE:=AT91Bootstrap for SAMA5D2 PTC EK (Nand Flash)
   BUILD_SUBTARGET:=sama5
@@ -145,6 +157,8 @@ AT91BOOTSTRAP_TARGETS := \
sama5d4_xplainedsd_uboot_secure \
sama5d27_som1_eksd1_uboot \
sama5d27_som1_ekqspi_uboot \
+   sama5d27_wlsom1_eksd_uboot \
+   sama5d27_wlsom1_ekdf_qspi_uboot \
sama5d2_ptc_eknf_uboot \
sama5d2_ptc_eksd_uboot
 
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 193f26dae471..5aade7de9cf9 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -107,6 +107,18 @@ define U-Boot/sama5d27_som1_ek_qspiflash
   BUILD_DEVICES:=microchip_sama5d27-som1-ek
 endef
 
+define U-Boot/sama5d27_wlsom1_ek_mmc
+  NAME:=SAMA5D27 WLSOM1 Ek (SDCard)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
+define U-Boot/sama5d27_wlsom1_ek_qspiflash
+  NAME:=SAMA5D27 WLSOM1 Ek (QSPI Flash)
+  BUILD_SUBTARGET:=sama5
+  BUILD_DEVICES:=microchip_sama5d27-wlsom1-ek
+endef
+
 define U-Boot/sama5d2_ptc_ek_nandflash
   NAME:=SAMA5D2 PTC Ek (Nand Flash)
   BUILD_SUBTARGET:=sama5
@@ -133,6 +145,8 @@ UBOOT_TARGETS := \
sama5d4_xplained_nandflash\
sama5d27_som1_ek_mmc1 \
sama5d27_som1_ek_qspiflash \
+   sama5d27_wlsom1_ek_mmc \
+   sama5d27_wlsom1_ek_qspiflash \
sama5d2_ptc_ek_nandflash \
sama5d2_ptc_ek_mmc
 
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index d02d09e835ec..af1ef44dc83a 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -87,6 +87,17 @@ define Device/microchip_sama5d27-som1-ek
 endef
 TARGET_DEVICES += microchip_sama5d27-som1-ek
 
+define Device/microchip_sama5d27-wlsom1-ek
+  $(Device/evaluation-dtb)
+  DEVICE_VENDOR := Microchip
+  DEVICE_MODEL := SAMA5D27 WSOM1 Ek
+  DEVICE_DTS := at91-sama5d27_wlsom1_ek
+  SUPPORTED_DEVICES := microchip,sama5d27-wlsom1-ek
+  KERNEL_SIZE := 6144k
+  $(Device/evaluation-sdimage)
+endef
+TARGET_DEVICES += microchip_sama5d27-wlsom1-ek
+
 define Device/microchip_sama5d2-ptc-ek
   $(Device/evaluation-dtb)
   DEVICE_VENDOR := Microchip
diff --git a/target/linux/at91/patches-5.4/106-add-wlsom1.patch 
b/target/linux/at91/patches-5.4/106-add-wlsom1.patch
new file mode 100644
index ..9d86aadd0da7
--- /dev/null
+++ b/target/linux/at91/patches-5.4/106-add-wlsom1.patch
@@ -0,0 +1,600 @@
+--- a/arch/arm/boot/dts/Makefile
 b/arch/arm/boot/dts/Makefile
+@@ -48,6 +48,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
+   

[PATCH 1/3] at91: add pioBU label to secumod

2021-07-15 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add pioBU label to secumod. Along with this set gpio controller
properties for secumod.

Signed-off-by: Claudiu Beznea 
---
 .../linux/at91/patches-5.4/104-add-piobu.patch   | 16 
 1 file changed, 16 insertions(+)
 create mode 100644 target/linux/at91/patches-5.4/104-add-piobu.patch

diff --git a/target/linux/at91/patches-5.4/104-add-piobu.patch 
b/target/linux/at91/patches-5.4/104-add-piobu.patch
new file mode 100644
index ..2495fe4635a1
--- /dev/null
+++ b/target/linux/at91/patches-5.4/104-add-piobu.patch
@@ -0,0 +1,16 @@
+--- a/arch/arm/boot/dts/sama5d2.dtsi
 b/arch/arm/boot/dts/sama5d2.dtsi
+@@ -885,9 +885,12 @@
+   clocks = < PMC_TYPE_PERIPHERAL 18>;
+   };
+ 
+-  secumod@fc04 {
++  pioBU: secumod@fc04 {
+   compatible = "atmel,sama5d2-secumod", "syscon";
+   reg = <0xfc04 0x100>;
++
++  gpio-controller;
++  #gpio-cells = <2>;
+   };
+ 
+   tdes@fc044000 {
-- 
2.23.0


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel