From: Stijn Tintel Date: Mon, 12 Nov 2018 17:11:21 +0000 (+0200) Subject: imx6: add support for UDOO Dual and Quad boards X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=fd81afcbaee78212e1d69ec954707f0c1ce986b2;p=openwrt%2Fstaging%2Fstintel.git imx6: add support for UDOO Dual and Quad boards --- diff --git a/package/boot/uboot-imx6/Makefile b/package/boot/uboot-imx6/Makefile index 193a35d27c..636e77b774 100644 --- a/package/boot/uboot-imx6/Makefile +++ b/package/boot/uboot-imx6/Makefile @@ -62,6 +62,13 @@ define U-Boot/nitrogen6s1g NAME:=Nitrogen6x i.MX6Solo 1GB board endef +define U-Boot/udoo + NAME:=UDOO Dual/Quad + BUILD_DEVICES:=udoo + UBOOT_IMAGE:=SPL u-boot.img + UBOOT_MAKE_FLAGS:=SPL u-boot.img +endef + define U-Boot/wandboard NAME:=Wandboard Dual Lite/Quad/Solo BUILD_DEVICES:=wandboard @@ -77,6 +84,7 @@ UBOOT_TARGETS := \ nitrogen6q2g \ nitrogen6s \ nitrogen6s1g \ + udoo \ wandboard UBOOT_MAKE_FLAGS += u-boot.imx diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index f9d5c1b1bb..11372a75f3 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -295,6 +295,23 @@ endef $(eval $(call KernelPackage,drm-amdgpu)) +define KernelPackage/drm-etnaviv + SUBMENU:=$(VIDEO_MENU) + TITLE:=Vivante DRM support + DEPENDS:=@TARGET_imx6 +kmod-drm +kmod-thermal + KCONFIG:= \ + CONFIG_CMA=y \ + CONFIG_DRM_ETNAVIV \ + CONFIG_DRM_ETNAVIV_THERMAL=y + FILES:=$(LINUX_DIR)/drivers/gpu/drm/etnaviv/etnaviv.ko +AUTOLOAD:=$(call AutoProbe,etnaviv) +endef + +define KernelPackage/drm-etnaviv/description + DRM Driver for Vivante GPUs +endef + +$(eval $(call KernelPackage,drm-etnaviv)) define KernelPackage/drm-imx SUBMENU:=$(VIDEO_MENU) @@ -313,7 +330,8 @@ define KernelPackage/drm-imx CONFIG_DRM_IMX_PARALLEL_DISPLAY=n \ CONFIG_DRM_IMX_TVE=n \ CONFIG_DRM_IMX_LDB=n \ - CONFIG_DRM_IMX_HDMI=n + CONFIG_DRM_IMX_HDMI=n \ + CONFIG_VIDEOMODE_HELPERS FILES:= \ $(LINUX_DIR)/drivers/gpu/drm/imx/imxdrm.ko \ $(LINUX_DIR)/drivers/gpu/ipu-v3/imx-ipu-v3.ko diff --git a/target/linux/imx6/base-files/etc/board.d/02_network b/target/linux/imx6/base-files/etc/board.d/02_network index 6ec667346d..da087b1c3d 100755 --- a/target/linux/imx6/base-files/etc/board.d/02_network +++ b/target/linux/imx6/base-files/etc/board.d/02_network @@ -13,7 +13,8 @@ case "$board" in cubox-i |\ *gw51xx |\ *gw52xx |\ -*gw5904) +*gw5904 |\ +udoo) ucidef_set_interface_lan 'eth0' ;; *gw53xx |\ diff --git a/target/linux/imx6/base-files/lib/imx6.sh b/target/linux/imx6/base-files/lib/imx6.sh index 68caaff15f..21830753d2 100755 --- a/target/linux/imx6/base-files/lib/imx6.sh +++ b/target/linux/imx6/base-files/lib/imx6.sh @@ -95,6 +95,11 @@ imx6_board_detect() { name="apalis,eval" ;; + "Udoo i.MX6 Dual Board" |\ + "Udoo i.MX6 Quad Board") + name="udoo" + ;; + "Wandboard i.MX6 Dual Lite Board") name="wandboard" ;; diff --git a/target/linux/imx6/base-files/lib/upgrade/platform.sh b/target/linux/imx6/base-files/lib/upgrade/platform.sh index 0dfaf0163d..0743b1b540 100755 --- a/target/linux/imx6/base-files/lib/upgrade/platform.sh +++ b/target/linux/imx6/base-files/lib/upgrade/platform.sh @@ -41,6 +41,10 @@ platform_check_image() { nand_do_platform_check $board $1 return $?; ;; + udoo) + blkdev_check_image "$1" + return $?; + ;; esac echo "Sysupgrade is not yet supported on $board." @@ -57,6 +61,9 @@ platform_do_upgrade() { *gw5*) nand_do_upgrade "$1" ;; + udoo) + blkdev_do_upgrade "$1" + ;; esac } diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile index 85d6823021..1fec4d6d0d 100644 --- a/target/linux/imx6/image/Makefile +++ b/target/linux/imx6/image/Makefile @@ -223,4 +223,19 @@ define Device/apalis endef TARGET_DEVICES += apalis +define Device/udoo + BOOT_SCRIPT = bootscript-udoo + DEVICE_DTS := imx6dl-udoo imx6q-udoo + DEVICE_TITLE := UDOO Dual/Quad + DEVICE_PACKAGES := \ + kmod-drm-imx kmod-drm-imx-hdmi kmod-rt2800-usb kmod-sound-soc-imx \ + kmod-usb-hid wpad + IMAGES := combined.bin + IMAGE/combined.bin := append-rootfs | pad-extra 128k | imx6-sdcard + KERNEL := kernel-bin | install-dtb + KERNEL_LOADADDR := 0x12000000 + UBOOT := udoo +endef +TARGET_DEVICES += udoo + $(eval $(call BuildImage)) diff --git a/target/linux/imx6/image/bootscript-udoo b/target/linux/imx6/image/bootscript-udoo new file mode 100644 index 0000000000..7b6136280d --- /dev/null +++ b/target/linux/imx6/image/bootscript-udoo @@ -0,0 +1,28 @@ +echo "UDOO OpenWrt Boot script" + +# Set console variable for both UART and HDMI +setenv console console=ttymxc1,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 + +# Find correct dtb +if test ${board_rev} = MX6DL; then + setenv fdt_soc_type imx6dl; +elif test ${board_rev} = MX6Q; then + setenv fdt_soc_type imx6q; +fi + +setenv fdt_name ${fdt_soc_type}-udoo.dtb; + +# Set correct devtype and partition +if test ${devtype} != mmc; then setenv devtype mmc; fi +if mmc dev 0; then + setenv mmcdev 0 +elif mmc dev 1; then + setenv mmcdev 1 +fi + +# Boot from the SD card is supported at the moment +setenv bootargs "${console} root=/dev/mmcblk0p2 rw rootwait" +mmc dev ${mmcdev} +load ${devtype} ${mmcdev}:${devplist} ${loadaddr} /uImage +load ${devtype} ${mmcdev}:${devplist} ${fdt_addr} /${fdt_name} +bootz ${loadaddr} - ${fdt_addr}