arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC
Subsystems (10)
PATCH v4 1/1 arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC
From: Patrick Bruenn <[email protected]>
Add CX9020 board based on mx53loco.
Add simplified imx53 base device tree from kernel v4.8-rc8, to reuse serial_mxc with DTE and prepare for device tree migration of other functions and imx53 devices.
The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- CCAT FPGA connected to emi
- enable rtc
---
Version 4 should address most of the issues Stefan, Jagan and Simon pointed out. Missing:
- moving CONFIG_FSL_ESDHC from mx53cx9020.h to defconfig, which would require DM_GPIO. But as soon as I enable that my imx53 device does not boot up and shows nothing on uart anymore.
- and because of that DM_GPIO issue I am unable to use DM_LED_GPIO
- I couldn't get DM_VIDEO working, too.
If you have any hint or reference on how to get that running on imx53, please let me know and I will improve that.
Changes in v4:
- move TARGET_MX53CX9020 from arch/arm/Kconfig to arch/arm/cpu/armv7/mx5/Kconfig
- move CONFIG_MX53 to arch/arm/cpu/armv7/mx5/Kconfig
- move CONFIG_MXC_UART to mx53cx9020_defconfig
- move CONFIG_FEC_MXC to mx53cx9020_defconfig
- remove redundant SYS_SOC from board/beckhoff/mx53cx9020/Kconfig
- enable MXC_UART for MX5 devices
- enable FEC_MXC for MX5 devices
- group ethernet related configs in mx53cx9020.h
- make clear mx53cx9020 was derived from the u-boot version of mx53loco not from kernel code
- replace 'loadccat' with 'fpga load'
- add pinctrl-imx5 driver and use device tree for pinmux configuration on cx9020
Changes in v3:
- replace CONFIG_TARGET_MX53CX9020 with CONFIG_MX53 in dts/Makefile
- remove redundant CONFIG_DISPLAY_BOARDINFO from mx53cx9020.h
Changes in v2:
- remove #include <asm/errno.h> from mx53cx9020.c
- remove obsolete CONFIG_CMD_CCAT from mx53cx9020.h
arch/arm/cpu/armv7/mx5/Kconfig | 8 + arch/arm/dts/Makefile | 2 + arch/arm/dts/imx53-cx9020.dts | 190 ++++ arch/arm/dts/imx53-pinfunc.h | 1189 ++++++++++++++++++++++++++ arch/arm/dts/imx53.dtsi | 110 +++ board/beckhoff/mx53cx9020/Kconfig | 12 + board/beckhoff/mx53cx9020/MAINTAINERS | 6 + board/beckhoff/mx53cx9020/Makefile | 9 + board/beckhoff/mx53cx9020/imximage.cfg | 82 ++ board/beckhoff/mx53cx9020/mx53cx9020.c | 367 ++++++++ board/beckhoff/mx53cx9020/mx53cx9020_video.c | 49 ++ configs/mx53cx9020_defconfig | 29 + drivers/fpga/Kconfig | 20 + drivers/net/Kconfig | 2 +- drivers/pinctrl/nxp/Kconfig | 14 + drivers/pinctrl/nxp/Makefile | 1 + drivers/pinctrl/nxp/pinctrl-imx5.c | 44 + drivers/serial/Kconfig | 2 +- include/configs/mx53cx9020.h | 202 +++++ include/dt-bindings/clock/imx5-clock.h | 219 +++++ 20 files changed, 2555 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/imx53-cx9020.dts create mode 100644 arch/arm/dts/imx53-pinfunc.h create mode 100644 arch/arm/dts/imx53.dtsi create mode 100644 board/beckhoff/mx53cx9020/Kconfig create mode 100644 board/beckhoff/mx53cx9020/MAINTAINERS create mode 100644 board/beckhoff/mx53cx9020/Makefile create mode 100644 board/beckhoff/mx53cx9020/imximage.cfg create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020.c create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020_video.c create mode 100644 configs/mx53cx9020_defconfig create mode 100644 drivers/pinctrl/nxp/pinctrl-imx5.c create mode 100644 include/configs/mx53cx9020.h create mode 100644 include/dt-bindings/clock/imx5-clock.h
arch/arm/cpu/armv7/mx5/Kconfig +8 -0
@@ -18,11 +18,19 @@ config TARGET_USBARMORY bool "Support USB armory" select CPU_V7 +config TARGET_MX53CX9020 + bool "Support CX9020" + select CPU_V7 + select MX53 + select DM + select DM_SERIAL + endchoice config SYS_SOC default "mx5" +source "board/beckhoff/mx53cx9020/Kconfig" source "board/inversepath/usbarmory/Kconfig" endif
arch/arm/dts/Makefile +2 -0
@@ -282,6 +282,8 @@ dtb-$(CONFIG_VF610) += vf500-colibri.dtb \ pcm052.dtb \ bk4r1.dtb +dtb-$(CONFIG_MX53) += imx53-cx9020.dtb + dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \ imx6dl-icore.dtb \ imx6q-icore.dtb
arch/arm/dts/imx53-cx9020.dts new file +190 -0
190 lines not on this page · raw message
arch/arm/dts/imx53-pinfunc.h new file +1189 -0
1,189 lines not on this page · raw message
arch/arm/dts/imx53.dtsi new file +110 -0
110 lines not on this page · raw message
board/beckhoff/mx53cx9020/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_MX53CX9020 + +config SYS_BOARD + default "mx53cx9020" + +config SYS_VENDOR + default "beckhoff" + +config SYS_CONFIG_NAME + default "mx53cx9020" + +endif
board/beckhoff/mx53cx9020/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +MX53 CX9020 +M: Patrick Bruenn <[email protected]> +S: Maintained +F: board/beckhoff/mx53cx9020/ +F: include/configs/mx53cx9020.h +F: configs/mx53cx9020_defconfig
board/beckhoff/mx53cx9020/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# +# Copyright (C) 2015 Beckhoff Automation GmbH & Co. KG +# Patrick Bruenn <[email protected]> +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += mx53cx9020.o +obj-$(CONFIG_VIDEO) += mx53cx9020_video.o
board/beckhoff/mx53cx9020/imximage.cfg new file +82 -0
82 lines not on this page · raw message
board/beckhoff/mx53cx9020/mx53cx9020.c new file +367 -0
367 lines not on this page · raw message
board/beckhoff/mx53cx9020/mx53cx9020_video.c new file +49 -0
49 lines not on this page · raw message
configs/mx53cx9020_defconfig new file +29 -0
@@ -0,0 +1,29 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX5=y +CONFIG_TARGET_MX53CX9020=y +CONFIG_DEFAULT_DEVICE_TREE="imx53-cx9020" +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/beckhoff/mx53cx9020/imximage.cfg" +CONFIG_BOOTDELAY=1 +CONFIG_HUSH_PARSER=y +# CONFIG_DM_MMC_OPS is not set +CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_IMLS is not set +CONFIG_CMD_MMC=y +#CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_NETDEVICES=y +CONFIG_FEC_MXC=y +CONFIG_MXC_UART=y +CONFIG_OF_CONTROL=y +CONFIG_FPGA_ALTERA=y +CONFIG_FPGA_CYCLON2=y +CONFIG_CMD_FPGA=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX5=y
drivers/fpga/Kconfig +20 -0
@@ -3,6 +3,26 @@ menu "FPGA support" config FPGA bool +config FPGA_ALTERA + bool "Enable Altera FPGA drivers" + select FPGA + help + Say Y here to enable the Altera FPGA driver + + This provides basic infrastructure to support Altera FPGA devices. + Enable Altera FPGA specific functions which includes bitstream + (in BIT format), fpga and device validation. + +config FPGA_CYCLON2 + bool "Enable Altera FPGA driver for Cyclone II" + depends on FPGA_ALTERA + help + Say Y here to enable the Altera Cyclone II FPGA specific driver + + This provides common functionality for Altera Cyclone II devices. + Enable FPGA driver for loading bitstream in BIT and BIN format + on Altera Cyclone II device. + config FPGA_XILINX bool "Enable Xilinx FPGA drivers" select FPGA
drivers/net/Kconfig +1 -1
@@ -131,7 +131,7 @@ config ETHOC config FEC_MXC bool "FEC Ethernet controller" - depends on MX6 + depends on MX5 || MX6 help This driver supports the 10/100 Fast Ethernet controller for NXP i.MX processors.
drivers/pinctrl/nxp/Kconfig +14 -0
@@ -1,6 +1,20 @@ config PINCTRL_IMX bool +config PINCTRL_IMX5 + bool "IMX5 pinctrl driver" + depends on ARCH_MX5 && PINCTRL_FULL + select DEVRES + select PINCTRL_IMX + help + Say Y here to enable the imx5 pinctrl driver + + This provides a simple pinctrl driver for i.MX 53SoC familiy, + i.MX53. This feature depends on device tree + configuration. This driver is different from the linux one, + this is a simple implementation, only parses the 'fsl,pins' + property and configure related registers. + config PINCTRL_IMX6 bool "IMX6 pinctrl driver" depends on ARCH_MX6 && PINCTRL_FULL
drivers/pinctrl/nxp/Makefile +1 -0
@@ -1,3 +1,4 @@ obj-$(CONFIG_PINCTRL_IMX) += pinctrl-imx.o +obj-$(CONFIG_PINCTRL_IMX5) += pinctrl-imx5.o obj-$(CONFIG_PINCTRL_IMX6) += pinctrl-imx6.o obj-$(CONFIG_PINCTRL_IMX7) += pinctrl-imx7.o
drivers/pinctrl/nxp/pinctrl-imx5.c new file +44 -0
44 lines not on this page · raw message
drivers/serial/Kconfig +1 -1
@@ -311,7 +311,7 @@ config MVEBU_A3700_UART config MXC_UART bool "IMX serial port support" - depends on MX6 + depends on MX5 || MX6 help If you have a machine based on a Motorola IMX CPU you can enable its onboard serial port by enabling this option.
include/configs/mx53cx9020.h new file +202 -0
202 lines not on this page · raw message
include/dt-bindings/clock/imx5-clock.h new file +219 -0
219 lines not on this page · raw message
Signature · 1 line
2.10.1
PATCH v4 1/1 arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC
Hi Patrick,
Quoted 14 lines · linux-kernel-dev at beckhoff.com
From: Patrick Bruenn <[email protected]>
Add CX9020 board based on mx53loco.
Add simplified imx53 base device tree from kernel v4.8-rc8, to reuseserial_mxcwith DTE and prepare for device tree migration of other functions and imx53 devices.The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- CCAT FPGA connected to emi
- enable rtc
Quoted 4 lines
Signed-off-by Patrick Bruenn <[email protected]>---
Version 4 should address most of the issues Stefan, Jagan and Simon pointed out.
There is still some small issues that avoid the patches to be merged. Board cannot be built due to missing CONFIG_:
arm: + mx53cx9020
+drivers/video/cfb_console.c: In function 'cfg_video_init':+drivers/video/cfb_console.c:2022:23: error: 'CONFIG_SYS_CONSOLE_FG_COL' undeclared (first use in this function) +drivers/video/cfb_console.c:2022:23: note: each undeclared identifier is reported only once for each function it appears in +drivers/video/cfb_console.c:2025:23: error: 'CONFIG_SYS_CONSOLE_BG_COL' undeclared (first use in this function)
+make[3]: *** [drivers/video/cfb_console.o] Error 1 +make[2]: *** [drivers/video] Error 2
+make[1]: *** [drivers] Error 2
I have checked why and I could fix with the following patch:
--- configs/mx53cx9020_defconfig | 6 ++++++ include/configs/mx53cx9020.h | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-)
configs/mx53cx9020_defconfig +6 -0
@@ -11,6 +11,7 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_MMC=y #CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set +CONFIG_VIDEO=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y
@@ -27,3 +28,8 @@ CONFIG_FPGA_CYCLON2=y CONFIG_CMD_FPGA=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX5=y +# CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_CFB_CONSOLE=y +CONFIG_VGA_AS_SINGLE_DEVICE=y +CONFIG_SYS_CONSOLE_BG_COL=0x00 +CONFIG_SYS_CONSOLE_FG_COL=0xa0
include/configs/mx53cx9020.h +0 -4
@@ -187,11 +187,7 @@/* Framebuffer and LCD */ #define CONFIG_PREBOOT -#define CONFIG_VIDEO #define CONFIG_VIDEO_IPUV3 -#define CONFIG_CFB_CONSOLE -#define CONFIG_VGA_AS_SINGLE_DEVICE -#define CONFIG_SYS_CONSOLE_IS_IN_ENV #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE #define CONFIG_VIDEO_BMP_RLE8 #define CONFIG_SPLASH_SCREEN
Signature · 15 lines
2.7.4 Now on you: if you agree, I can integrate this fix into your patch and merge it into the u-boot-imx tree. If you disagree, please check it and send an update version, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v4 1/1 arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC
Hi Stefano,
Quoted 40 lines · linux-kernel-dev at beckhoff.com
Quoted 14 lines
From: Patrick Bruenn <[email protected]>
Add CX9020 board based on mx53loco.
Add simplified imx53 base device tree from kernel v4.8-rc8, to reuseserial_mxcwith DTE and prepare for device tree migration of other functions and imx53 devices.The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- CCAT FPGA connected to emi
- enable rtcQuoted 4 lines
Signed-off-by Patrick Bruenn <[email protected]>---
Version 4 should address most of the issues Stefan, Jagan and Simonpointed out.
There is still some small issues that avoid the patches to be merged. Board cannot be built due to missing
CONFIG_:arm: + mx53cx9020(quoted diff) +2
-0+drivers/video/cfb_console.c: In function 'cfg_video_init': +drivers/video/cfb_console.c:2022:23: error:'
CONFIG_SYS_CONSOLE_FG_COL'
undeclared (first use in this function)+drivers/video/cfb_console.c:2022:23: note: each undeclared identifier is reported only once for each function it appears in+drivers/video/cfb_console.c:2025:23: error:
'CONFIG_SYS_CONSOLE_BG_COL'
undeclared (first use in this function)(quoted diff) +3
-0+make[3]: *** [drivers/video/cfb_console.o] Error 1 +make[2]: *** [drivers/video] Error 2 +make[1]: *** [drivers] Error 2
Quoted 2 lines
I have checked why and I could fix with the following patch:
Thank you for your effort!
Quoted 46 lines
---
configs/mx53cx9020_defconfig | 6 ++++++include/configs/mx53cx9020.h| 4 ----2 files changed, 6 insertions(+), 4 deletions(-)configs/mx53cx9020_defconfig +0
-0@@ -11,6 +11,7 @@ CONFIG_CMD_BOOTZ=y
CONFIG_CMD_MMC=y
#CONFIG_CMD_USB=y
#CONFIG_CMD_SETEXPRis not set
+CONFIG_VIDEO=yCONFIG_CMD_DHCP=yCONFIG_CMD_MII=yCONFIG_CMD_PING=yconfigs/mx53cx9020_defconfig +0
-0@@ -27,3 +28,8 @@ CONFIG_FPGA_CYCLON2=y
CONFIG_CMD_FPGA=yCONFIG_PINCTRL=yCONFIG_PINCTRL_IMX5=yconfigs/mx53cx9020_defconfig +5
-0+# CONFIG_VIDEO_SW_CURSOR is not set +CONFIG_CFB_CONSOLE=y +CONFIG_VGA_AS_SINGLE_DEVICE=y +CONFIG_SYS_CONSOLE_BG_COL=0x00 +CONFIG_SYS_CONSOLE_FG_COL=0xa0include/configs/mx53cx9020.h +0
-5@@ -187,11 +187,7 @@/* Framebuffer and LCD */ #define CONFIG_PREBOOT -#define CONFIG_VIDEO #define CONFIG_VIDEO_IPUV3 -#define CONFIG_CFB_CONSOLE -#define CONFIG_VGA_AS_SINGLE_DEVICE -#define CONFIG_SYS_CONSOLE_IS_IN_ENV #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE #define CONFIG_VIDEO_BMP_RLE8 #define CONFIG_SPLASH_SCREEN --2.7.4
Quoted 3 lines
Now on you: if you agree, I can integrate this fix into your patch and merge it into the u-boot-imx tree. If you disagree, please check it and send an update version, thanks !
Agreed!
I applied it and did a test run. Everything works as it is supposed to be.
Best regards,
Patrick
Quoted 4 lines
Best regards,
Stefano Babic
Quoted 8 lines
--
===========================================================
==========
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
===========================================================
==========
Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075