imx6q-lxr: Add board support
Subsystems (3)
Fabio Estevam
reviewerPATCH 1/1 imx6q-lxr: Add board support
From: Fabio Estevam <[email protected]>
Add support for the Comvetia i.MX6Q LXR2 board, which is uses the Phytec PFLA02 SoM.
Based on the original work from Stefano Babic <[email protected]>.
The Phytec PFLA02 devicetrees are taken from kernel 6.11-rc7.
The imx6q-lxr.dts has been submitted upstream:
https://lore.kernel.org/linux-devicetree/[email protected]/
After it gets accepted in mainline (most likely in kernel 6.13), the lxr2 board can then be switched to OF_UPSTREAM and these device trees can be removed from U-Boot.
--- arch/arm/dts/Makefile | 1 + arch/arm/dts/imx6q-lxr.dts | 87 +++++ arch/arm/dts/imx6q-phytec-pfla02.dtsi | 17 + arch/arm/dts/imx6qdl-phytec-pfla02.dtsi | 467 ++++++++++++++++++++++++ arch/arm/mach-imx/mx6/Kconfig | 11 + board/comvetia/lxr2/Kconfig | 12 + board/comvetia/lxr2/MAINTAINERS | 6 + board/comvetia/lxr2/Makefile | 3 + board/comvetia/lxr2/lxr2.c | 388 ++++++++++++++++++++ board/comvetia/lxr2/lxr2.env | 34 ++ configs/lxr2_defconfig | 118 ++++++ include/configs/lxr2.h | 23 ++ 12 files changed, 1167 insertions(+) create mode 100644 arch/arm/dts/imx6q-lxr.dts create mode 100644 arch/arm/dts/imx6q-phytec-pfla02.dtsi create mode 100644 arch/arm/dts/imx6qdl-phytec-pfla02.dtsi create mode 100644 board/comvetia/lxr2/Kconfig create mode 100644 board/comvetia/lxr2/MAINTAINERS create mode 100644 board/comvetia/lxr2/Makefile create mode 100644 board/comvetia/lxr2/lxr2.c create mode 100644 board/comvetia/lxr2/lxr2.env create mode 100644 configs/lxr2_defconfig create mode 100644 include/configs/lxr2.h
arch/arm/dts/Makefile +1 -0
@@ -812,6 +812,7 @@ dtb-y += \ imx6q-icore-rqs.dtb \ imx6q-kp.dtb \ imx6q-logicpd.dtb \ + imx6q-lxr.dtb \ imx6q-marsboard.dtb \ imx6q-mccmon6.dtb\ imx6q-nitrogen6x.dtb \
arch/arm/dts/imx6q-lxr.dts new file +87 -0
87 lines not on this page · raw message
arch/arm/dts/imx6q-phytec-pfla02.dtsi new file +17 -0
@@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright 2013 Christian Hemp, Phytec Messtechnik GmbH + */ + +#include "imx6q.dtsi" +#include "imx6qdl-phytec-pfla02.dtsi" + +/ { + model = "Phytec phyFLEX-i.MX6 Quad"; + compatible = "phytec,imx6q-pfla02", "fsl,imx6q"; + + memory@10000000 { + device_type = "memory"; + reg = <0x10000000 0x80000000>; + }; +};
arch/arm/dts/imx6qdl-phytec-pfla02.dtsi new file +467 -0
467 lines not on this page · raw message
arch/arm/mach-imx/mx6/Kconfig +11 -0
@@ -541,6 +541,16 @@ config TARGET_LITEBOARD select BOARD_LATE_INIT select MX6UL_LITESOM +config TARGET_LXR2 + bool "Comvetia i.MX6Q LXR2" + depends on MX6Q + select BOARD_EARLY_INIT_F + select BOARD_LATE_INIT + select DM + select DM_THERMAL + select SUPPORT_SPL + imply CMD_DM + config TARGET_PCM058 bool "Phytec PCM058 i.MX6 Quad" depends on MX6Q
@@ -696,6 +706,7 @@ source "board/boundary/nitrogen6x/Kconfig" source "board/bsh/imx6ulz_smm_m2/Kconfig" source "board/bticino/mamoj/Kconfig" source "board/compulab/cm_fx6/Kconfig" +source "board/comvetia/lxr2/Kconfig" source "board/dhelectronics/dh_imx6/Kconfig" source "board/embest/mx6boards/Kconfig" source "board/engicam/imx6q/Kconfig"
board/comvetia/lxr2/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_LXR2 + +config SYS_BOARD + default "lxr2" + +config SYS_VENDOR + default "comvetia" + +config SYS_CONFIG_NAME + default "lxr2" + +endif
board/comvetia/lxr2/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +COMVETIA LXR2 +M: Fabio Estevam <[email protected]> +S: Maintained +F: board/comvetia/lxr2/ +F: include/configs/lxr2.h +F: configs/lxr2_defconfig
board/comvetia/lxr2/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0+ + +obj-y := lxr2.o
board/comvetia/lxr2/lxr2.c new file +388 -0
388 lines not on this page · raw message
board/comvetia/lxr2/lxr2.env new file +34 -0
@@ -0,0 +1,34 @@ +addcons=setenv bootargs ${bootargs} console=${console},${baudrate} +addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off +addmisc=setenv bootargs ${bootargs} ${miscargs} +addmtd=run mtdnand;run mtdspi;setenv bootargs ${bootargs} ${mtdparts} +altbootcmd=run swupdate +bootcmd=run nandboot;run swupdate +bootcount=2 +bootlimit=3 +console=ttymxc3 +cpu=armv7 +ethprime=FEC +fdt_addr_r=0x18000000 +fitfile=fitImage +flash-all-from-sd-card=env default -f -a;load mmc 0:1 10000000 u-boot.scr;source 10000000;saveenv +initrd_high=0xffffffff +kernel_addr_r=0x12000000 +loadaddr=0x12000000 +miscargs=panic=1 +mmcargs=setenv bootargs root=${mmcroot} rw rootwait +mmcboot=if run mmcload;then run mmcargs addcons addmisc;bootm;fi +mmcload=mmc rescan;load mmc 0:${mmcpart} ${kernel_addr_r} boot/fitImage +mmcpart=1 +mmcroot=/dev/mmcblk0p1 +mtdnand=setenv mtdparts mtdparts=gpmi-nand:40m(Kernels),860m(root),-(nand) +mtdspi=setenv mtdparts ${mtdparts}';spi2.0:1024k(bootloader),64k(env1),64k(env2),-(rescue)' +nanboot_fit=tftp ${kernel_addr_r} ${board_name}/${fitfile};run nandargs addip addcons addmtd addmisc;bootm +nandargs=setenv bootargs ubi.mtd=1 root=ubi0:rootfs${ubiroot} rootfstype=ubifs +nandboot=run mtdnand;ubi part Kernels;ubi readvol ${kernel_addr_r} kernel${ubiroot};run nandargs addip addcons addmtd addmisc;bootm ${kernel_addr_r} +net_nfs=tftp ${kernel_addr_r} ${board_name}/${bootfile};tftp ${fdt_addr_r} ${board_name}/${fdt_file};run nfsargs addip addcons addmtd addmisc;bootm ${kernel_addr_r} - ${fdt_addr_r} +net_nfs_fit=tftp ${kernel_addr_r} ${board_name}/${fitfile};run nfsargs addip addcons addmtd addmisc;bootm ${kernel_addr_r} +netmask=255.255.255.0 +nfsargs=setenv bootargs root=/dev/nfs nfsroot=${serverip}:${nfsroot},v3 panic=1 +swupdate=setenv bootargs root=/dev/ram;run addip addcons addmtd addmisc;sf probe;sf read ${kernel_addr_r} 120000 600000;sf read 14000000 730000 800000;bootm ${kernel_addr_r} 14000000 +ubiroot=1
configs/lxr2_defconfig new file +118 -0
118 lines not on this page · raw message
include/configs/lxr2.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +// Copyright (C) Stefano Babic <[email protected]> + +#ifndef __LXR2_CONFIG_H +#define __LXR2_CONFIG_H + +#include <config_distro_bootcmd.h> + +#include "mx6_common.h" + +#define PHYS_SDRAM_SIZE SZ_1G + +/* Physical Memory Map */ +#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR + +#define CFG_SYS_SDRAM_BASE PHYS_SDRAM +#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR +#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE + +#define CFG_SYS_FSL_ESDHC_ADDR 0 +#define CFG_MXC_UART_BASE UART4_BASE + +#endif
Signature · 1 line
2.34.1
Fabio Estevam
reviewerQuoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Add support for the Comvetia i.MX6Q LXR2 board, which is uses the Phytec PFLA02 SoM.
Applied to u-boot-imx/next, thanks.