Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for QSPI on SOM devices #208

Open
wants to merge 1 commit into
base: dunfell
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions conf/machine/sama5d27-som1-ek-qspi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#@TYPE: Machine
#@Name: ATMEL SAMA5D2 SOM1 EK QSPI
#@DESCRIPTION: Machine configuration for Atmel/Microchip's evaluation board

require include/sama5d2.inc

MACHINE_FEATURES = "apm alsa ext2 ext3 usbhost usbgadget touchscreen"
KERNEL_DEVICETREE = " \
at91-sama5d27_som1_ek.dtb \
"

do_image_wic[depends] += "u-boot-at91:do_deploy"
IMAGE_FSTYPES += " tar.gz wic"
WKS_FILE = "sdimage.wks"

IMAGE_BOOT_FILES = "BOOT.BIN u-boot.bin uboot.env sama5d27_som1_ek.itb \
"

UBOOT_MACHINE ?= "sama5d27_som1_ek_qspiflash_defconfig"
UBOOT_ENTRYPOINT = "0x20008000"
UBOOT_LOADADDRESS = "0x20008000"
UBOOT_ENV_SIZE = "0x20000"

AT91BOOTSTRAP_MACHINE ?= "sama5d27_som1_ek"

# Needed for FIT
MACHINE_ESSENTIAL_EXTRA_RDEPENDS = " dt-overlay-at91"
27 changes: 27 additions & 0 deletions conf/machine/sama5d27-wlsom1-ek-qspi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#@TYPE: Machine
#@Name: ATMEL SAMA5D2 WLSOM1 EK QSPI
#@DESCRIPTION: Machine configuration for Atmel/Microchip's evaluation board

require include/sama5d2.inc

MACHINE_FEATURES = "apm alsa ext2 ext3 usbhost usbgadget touchscreen"
KERNEL_DEVICETREE = " \
at91-sama5d27_wlsom1_ek.dtb \
"

do_image_wic[depends] += "u-boot-at91:do_deploy"
IMAGE_FSTYPES += " tar.gz wic"
WKS_FILE = "sdimage.wks"

IMAGE_BOOT_FILES = "BOOT.BIN u-boot.bin uboot.env sama5d27_wlsom1_ek.itb \
"

UBOOT_MACHINE ?= "sama5d27_wlsom1_ek_qspiflash_defconfig"
UBOOT_ENTRYPOINT = "0x20008000"
UBOOT_LOADADDRESS = "0x20008000"
UBOOT_ENV_SIZE = "0x20000"

AT91BOOTSTRAP_MACHINE ?= "sama5d27_wlsom1_ek"

# Needed for FIT
MACHINE_ESSENTIAL_EXTRA_RDEPENDS = " dt-overlay-at91"
2 changes: 2 additions & 0 deletions recipes-bsp/at91bootstrap/at91bootstrap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ AT91BOOTSTRAP_CONFIG_sama5d2-xplained-sd ??= "${AT91BOOTSTRAP_MACHINE}-bsrsd_ubo
AT91BOOTSTRAP_CONFIG_sama5d2-ptc-ek-sd ??= "${AT91BOOTSTRAP_MACHINE}sd_uboot"
AT91BOOTSTRAP_CONFIG_sama5d27-som1-ek ??= "${AT91BOOTSTRAP_MACHINE}qspi_uboot"
AT91BOOTSTRAP_CONFIG_sama5d27-som1-ek-sd ??= "${AT91BOOTSTRAP_MACHINE}sd_uboot"
AT91BOOTSTRAP_CONFIG_sama5d27-som1-ek-qspi ??= "${AT91BOOTSTRAP_MACHINE}qspi_uboot"
AT91BOOTSTRAP_CONFIG_sama5d27-wlsom1-ek-sd ??= "${AT91BOOTSTRAP_MACHINE}-bsrsd_uboot"
AT91BOOTSTRAP_CONFIG_sama5d27-wlsom1-ek-qspi ??= "${AT91BOOTSTRAP_MACHINE}df_qspi_uboot"
AT91BOOTSTRAP_CONFIG_sama5d2-icp-sd ??= "${AT91BOOTSTRAP_MACHINE}-bsrsd_uboot"
AT91BOOTSTRAP_CONFIG_sam9x60ek ??= "${AT91BOOTSTRAP_MACHINE}nf_uboot"
AT91BOOTSTRAP_CONFIG_sam9x60ek-sd ??= "${AT91BOOTSTRAP_MACHINE}sd_uboot"
Expand Down
2 changes: 1 addition & 1 deletion recipes-bsp/at91bootstrap/at91bootstrap_3.10.2.bb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require at91bootstrap.inc

LIC_FILES_CHKSUM = "file://main.c;endline=27;md5=a2a70db58191379e2550cbed95449fbd"

COMPATIBLE_MACHINE = '(sama5d3xek|sama5d3-xplained|sama5d3-xplained-sd|at91sam9x5ek|at91sam9rlek|at91sam9m10g45ek|sama5d4ek|sama5d4-xplained|sama5d4-xplained-sd|sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama7g5ek)'
COMPATIBLE_MACHINE = '(sama5d3xek|sama5d3-xplained|sama5d3-xplained-sd|at91sam9x5ek|at91sam9rlek|at91sam9m10g45ek|sama5d4ek|sama5d4-xplained|sama5d4-xplained-sd|sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d27-som1-ek-qspi|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama5d27-wlsom1-ek-qspi|sama7g5ek)'

SRC_URI = "git://github.com/linux4sam/at91bootstrap.git;protocol=https"

Expand Down
2 changes: 1 addition & 1 deletion recipes-bsp/at91bootstrap/at91bootstrap_4.0.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require at91bootstrap.inc
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSES/MIT.txt;md5=12c44f58fe16bd407f016e45950c2f3d"

COMPATIBLE_MACHINE = '(sama5d3-xplained|sama5d3-xplained-sd|sama5d4-xplained|sama5d4-xplained-sd|sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama7g5ek-sd|sama7g5ek-emmc)'
COMPATIBLE_MACHINE = '(sama5d3-xplained|sama5d3-xplained-sd|sama5d4-xplained|sama5d4-xplained-sd|sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d27-som1-ek-qspi|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama5d27-wlsom1-ek-qspi|sama7g5ek-sd|sama7g5ek-emmc)'

SRC_URI = "git://github.com/linux4sam/at91bootstrap.git;protocol=https;branch=at91bootstrap-4.x"

Expand Down
2 changes: 1 addition & 1 deletion recipes-bsp/dt-overlay-at91/dt-overlay-at91_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=775626b7bc958bdcc525161f725ece0f \

inherit deploy

COMPATIBLE_MACHINE = '(sama5d3-xplained|sama5d3-xplained-sd|at91sam9x5ek|at91sam9x5ek-sd|sama5d4-xplained|sama5d4-xplained-sd|sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama7g5ek)'
COMPATIBLE_MACHINE = '(sama5d3-xplained|sama5d3-xplained-sd|at91sam9x5ek|at91sam9x5ek-sd|sama5d4-xplained|sama5d4-xplained-sd|sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d27-som1-ek-qspi|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama5d27-wlsom1-ek-qspi|sama7g5ek)'

SRC_URI = "git://github.com/linux4sam/dt-overlay-at91.git;protocol=https"

Expand Down
23 changes: 23 additions & 0 deletions recipes-bsp/u-boot/files/envs/sama5d27-som1-ek-qspi.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
video_mode_pda4=Unknown-1:480x272-16
video_mode_pda5=Unknown-1:800x480-16
video_mode_pda7=Unknown-1:800x480-16
video_mode_pda7b=Unknown-1:800x480-16
at91_pda_detect=run pda4300test; run pda7000test; run pda7000btest; run pda5000test; run pda4301test; run pda4301btest;
pda7000btest=test -n $display && test $display = 7000B && setenv display_var 'pda7b' && setenv video_mode ${video_mode_pda7b}
at91_set_display=test -n $pda && setenv display $pda
pda4300test=test -n $display && test $display = 4300 && setenv display_var 'pda4' && setenv video_mode ${video_mode_pda4}
pda4301test=test -n $display && test $display = 4301 && setenv display_var 'pda4' && setenv video_mode ${video_mode_pda4}
pda4301btest=test -n $display && test $display = 4301B && setenv display_var 'pda4' && setenv video_mode ${video_mode_pda4}
at91_prepare_bootargs=test -n $display_var && setenv bootargs ${bootargs} ${at91_video_bootargs}
at91_prepare_video_bootargs=test -n $display_var && setenv at91_video_bootargs video=${video_mode}
pda7000test=test -n $display && test $display = 7000 && setenv display_var 'pda7' && setenv video_mode ${video_mode_pda7}
at91_prepare_overlays_config=test -n $display_var && setenv at91_overlays_config '#'${display_var}
bootcmd=run at91_set_display; run at91_pda_detect; run at91_prepare_video_bootargs; run at91_prepare_bootargs; run at91_prepare_overlays_config; run bootcmd_boot;
pda5000test=test -n $display && test $display = 5000 && setenv display_var 'pda5' && setenv video_mode ${video_mode_pda5}
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p1 rw rootfstype=ext4 rootwait atmel.pm_modes=standby,ulp1
bootcmd_boot=sf probe; sf read 0x24000000 0x180000 0x680000; bootm 0x24000000#kernel_dtb${at91_overlays_config}
bootdelay=1
ethact=gmac0
stderr=serial
stdin=serial
stdout=serial
23 changes: 23 additions & 0 deletions recipes-bsp/u-boot/files/envs/sama5d27-wlsom1-ek-qspi.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
video_mode_pda4=Unknown-1:480x272-16
video_mode_pda5=Unknown-1:800x480-16
video_mode_pda7=Unknown-1:800x480-16
video_mode_pda7b=Unknown-1:800x480-16
at91_pda_detect=run pda4300test; run pda7000test; run pda7000btest; run pda5000test; run pda4301test; run pda4301btest;
pda7000btest=test -n $display && test $display = 7000B && setenv display_var 'pda7b' && setenv video_mode ${video_mode_pda7b}
at91_set_display=test -n $pda && setenv display $pda
pda4300test=test -n $display && test $display = 4300 && setenv display_var 'pda4' && setenv video_mode ${video_mode_pda4}
at91_prepare_bootargs=test -n $display_var && setenv bootargs ${bootargs} ${at91_video_bootargs}
at91_prepare_video_bootargs=test -n $display_var && setenv at91_video_bootargs video=${video_mode}
pda7000test=test -n $display && test $display = 7000 && setenv display_var 'pda7' && setenv video_mode ${video_mode_pda7}
pda4301test=test -n $display && test $display = 4301 && setenv display_var 'pda4' && setenv video_mode ${video_mode_pda4}
pda4301btest=test -n $display && test $display = 4301B && setenv display_var 'pda4' && setenv video_mode ${video_mode_pda4}
at91_prepare_overlays_config=test -n $display_var && setenv at91_overlays_config '#'${display_var}
bootcmd=run at91_set_display; run at91_pda_detect; run at91_prepare_video_bootargs; run at91_prepare_bootargs; run at91_prepare_overlays_config; run bootcmd_boot;
pda5000test=test -n $display && test $display = 5000 && setenv display_var 'pda5' && setenv video_mode ${video_mode_pda5}
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p1 rw rootfstype=ext4 rootwait atmel.pm_modes=standby,ulp1 rng_core.default_quality=700
bootcmd_boot=sf probe; sf read 0x24000000 0x180000 0x680000; bootm 0x24000000#kernel_dtb${at91_overlays_config}
bootdelay=1
ethact=gmac0
stderr=serial
stdin=serial
stdout=serial
2 changes: 1 addition & 1 deletion recipes-bsp/u-boot/u-boot-at91_2020.01.bb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PV = "v2020.01-at91+git${SRCPV}"

DEPENDS += "bison-native flex-native"

COMPATIBLE_MACHINE = '(sama5d3xek|sama5d3-xplained|sama5d3-xplained-sd|at91sam9x5ek|at91sam9rlek|at91sam9m10g45ek|sama5d4ek|sama5d4-xplained|sama5d4-xplained-sd|sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama7g5ek)'
COMPATIBLE_MACHINE = '(sama5d3xek|sama5d3-xplained|sama5d3-xplained-sd|at91sam9x5ek|at91sam9rlek|at91sam9m10g45ek|sama5d4ek|sama5d4-xplained|sama5d4-xplained-sd|sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d27-som1-ek-qspi|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama5d27-wlsom1-ek-qspi|sama7g5ek)'

UBRANCH = "u-boot-2020.01-at91"
UBRANCH_sama7g5 = "sama7g5_early"
Expand Down
2 changes: 1 addition & 1 deletion recipes-bsp/u-boot/u-boot-at91_2021.04.bb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PV = "v2021.04-at91+git${SRCPV}"

DEPENDS += "bison-native flex-native"

COMPATIBLE_MACHINE = '(sama5d3xek|sama5d3-xplained|sama5d3-xplained-sd|at91sam9x5ek|at91sam9rlek|at91sam9m10g45ek|sama5d4ek|sama5d4-xplained|sama5d4-xplained-sd|sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama7g5ek)'
COMPATIBLE_MACHINE = '(sama5d3xek|sama5d3-xplained|sama5d3-xplained-sd|at91sam9x5ek|at91sam9rlek|at91sam9m10g45ek|sama5d4ek|sama5d4-xplained|sama5d4-xplained-sd|sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d27-som1-ek-qspi|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama5d27-wlsom1-ek-qspi|sama7g5ek)'

UBRANCH = "u-boot-2021.04-at91"

Expand Down
2 changes: 1 addition & 1 deletion recipes-kernel/linux/linux-at91_5.10.50.bb
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ do_deploy_append() {
KERNEL_MODULE_AUTOLOAD += "atmel_usba_udc g_serial"
KERNEL_MODULE_AUTOLOAD_append_sama5d27-wlsom1-ek-sd = " wilc-sdio"

COMPATIBLE_MACHINE = "(sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d4-xplained|sama5d4-xplained-sd|sama5d4ek|sama5d3-xplained|sama5d3-xplained-sd|sama5d3xek|at91sam9x5ek|at91sam9m10g45ek|at91sam9rlek|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama7g5ek)"
COMPATIBLE_MACHINE = "(sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d27-som1-ek-qspi|sama5d4-xplained|sama5d4-xplained-sd|sama5d4ek|sama5d3-xplained|sama5d3-xplained-sd|sama5d3xek|at91sam9x5ek|at91sam9m10g45ek|at91sam9rlek|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama5d27-wlsom1-ek-qspi|sama7g5ek)"
2 changes: 1 addition & 1 deletion recipes-kernel/linux/linux-at91_5.4.81.bb
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ do_deploy_append() {
KERNEL_MODULE_AUTOLOAD += "atmel_usba_udc g_serial"
KERNEL_MODULE_AUTOLOAD_append_sama5d27-wlsom1-ek-sd = " wilc-sdio"

COMPATIBLE_MACHINE = "(sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d4-xplained|sama5d4-xplained-sd|sama5d4ek|sama5d3-xplained|sama5d3-xplained-sd|sama5d3xek|at91sam9x5ek|at91sam9m10g45ek|at91sam9rlek|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama7g5ek)"
COMPATIBLE_MACHINE = "(sama5d2-xplained|sama5d2-xplained-sd|sama5d2-xplained-emmc|sama5d2-ptc-ek|sama5d2-ptc-ek-sd|sama5d27-som1-ek|sama5d27-som1-ek-sd|sama5d27-som1-ek-qspi|sama5d4-xplained|sama5d4-xplained-sd|sama5d4ek|sama5d3-xplained|sama5d3-xplained-sd|sama5d3xek|at91sam9x5ek|at91sam9m10g45ek|at91sam9rlek|sama5d2-icp-sd|sam9x60ek|sam9x60ek-sd|sama5d27-wlsom1-ek-sd|sama5d27-wlsom1-ek-qspi|sama7g5ek)"