diff options
author | Uros Majstorovic <majstor@majstor.org> | 2025-07-29 00:12:01 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2025-07-29 00:12:01 +0200 |
commit | 2357302c5e0228c1209b747cc5e0b11d7bef0a02 (patch) | |
tree | 97bf2f0165cc290596cd11a4cfd0232bb6591355 | |
parent | 5822459338be09a47e2e4cbf93b0673e539d3211 (diff) |
16 files changed, 626 insertions, 40 deletions
diff --git a/yocto/README b/yocto/README index f170e18..6c92a6e 100644 --- a/yocto/README +++ b/yocto/README @@ -7,6 +7,8 @@ https://developer.toradex.com/linux-bsp/os-development/build-yocto/build-a-refer https://developer.toradex.com/linux-bsp/os-development/build-u-boot-and-linux-kernel-from-source-code/build-u-boot/ https://developer.toradex.com/linux-bsp/os-development/build-u-boot-and-linux-kernel-from-source-code/build-linux-kernel-from-source-code/ https://developer.toradex.com/linux-bsp/os-development/build-u-boot-and-linux-kernel-from-source-code/build-device-tree-overlays-from-source-code/ +https://developer.toradex.com/linux-bsp/os-development/build-yocto/custom-meta-layers-recipes-and-images-in-yocto-project-hello-world-examples/ +https://developer.toradex.com/linux-bsp/os-development/build-yocto/device-tree-overlays-linux - install dependencies: # dependencies for yocto: @@ -43,12 +45,9 @@ curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > bin/repo chmod 755 bin/repo - install the ARM GCC toolchain: -mkdir arm -cd arm wget https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz tar xvf arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz ln -s arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu gcc-linaro-aarch64 -cd .. - install device tree compiler tool: git clone https://git.kernel.org/pub/scm/utils/dtc/dtc.git -b v1.7.2 @@ -95,11 +94,8 @@ MACHINE ?= "verdin-imx8mp" # set debian packages PACKAGE_CLASSES ?= "package_deb" ... -# append: +# append ACCEPT_FSL_EULA = "1" -TOOLCHAIN_TARGET_TASK:append = " kernel-devsrc" -TOOLCHAIN_TARGET_TASK:remove = "target-sdk-provides-dummy" -... - append mikrophone layer: vi conf/bblayers.conf @@ -110,9 +106,7 @@ vi conf/bblayers.conf # copy yocto/meta-mikrophone to ../layers/ dir from mikroPhone repo -- build: -# bitbake -k tdx-reference-minimal-image -# bitbake -k tdx-reference-minimal-image -c populate_sdk +- build image: bitbake -k mikrophone-image bitbake -k mikrophone-image -c populate_sdk @@ -121,14 +115,35 @@ deploy/sdk/tdx-xwayland-glibc-x86_64-mikroPhone-Image-armv8a-verdin-imx8mp-toolc # install into: /build/tdx-xwayland/7.x.y - machine.conf in: layers/meta-toradex-nxp/conf/machine/verdin-imx8mp.conf -- mikrophone distro.conf in: layers/meta-mikrophone/conf/distro/*.conf -- mikrophone images in: layers/meta-mikrophone/recipes-images/images/*.bb + layers/meta-mikrophone/conf/machine/include/verdin-imx8mp.inc +- mikrophone distro.conf in: layers/meta-mikrophone/conf/distro/mikrophone.conf +- mikrophone images in: layers/meta-mikrophone/recipes-images/images/mikrophone-image.bb + - deployable tarballs in: build/deploy/images/verdin-imx8mp/ - deployable sdk in: build/deploy/sdk/ - toradex distro.conf in: layers/meta-toradex-distro/conf/distro/*.conf - toradex demo images in: layers/meta-toradex-demos/recipes-images/images/*.bb + +upgrade yocto image +------------------- + +- upgrade yocto: +. /build/tools/start.sh +cd /build/oe-core +repo sync + +- build image: +. export +bitbake -k mikrophone-image +bitbake -k mikrophone-image -c populate_sdk + +- to launch TEZI installer: insert sdcard, reboot linux then stop u-boot auto boot and type: +setenv fdtfile imx8mp-verdin-wifi-dev.dtb +boot + + u-boot ------ diff --git a/yocto/meta-mikrophone/conf/machine/._verdin-imx8mp-mikrophone.conf b/yocto/meta-mikrophone/conf/machine/._verdin-imx8mp-mikrophone.conf Binary files differnew file mode 100644 index 0000000..fe7655c --- /dev/null +++ b/yocto/meta-mikrophone/conf/machine/._verdin-imx8mp-mikrophone.conf diff --git a/yocto/meta-mikrophone/conf/machine/include/verdin-imx8mp.inc b/yocto/meta-mikrophone/conf/machine/include/verdin-imx8mp.inc new file mode 100644 index 0000000..b64f4f1 --- /dev/null +++ b/yocto/meta-mikrophone/conf/machine/include/verdin-imx8mp.inc @@ -0,0 +1,14 @@ +# needed in recent builds for wifi and bt +MACHINE_FIRMWARE:append = " firmware-nxp-wifi-nxp8997-sdio" + +# our device tree +KERNEL_DEVICETREE:append = " \ + ${KERNEL_DTB_PREFIX}imx8mp-verdin-wifi-mikrophone.dtb \ + ${KERNEL_DTB_PREFIX}imx8mp-verdin-nonwifi-mikrophone.dtb \ +" +# DTB for u-boot only +UBOOT_DTB_NAME = "imx8mp-verdin-wifi-mikrophone.dtb" + +# for SDK only +TOOLCHAIN_TARGET_TASK:append = " kernel-devsrc" +TOOLCHAIN_TARGET_TASK:remove = "target-sdk-provides-dummy" diff --git a/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex/imx8mp-verdin-mikrophone.dtsi b/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex/imx8mp-verdin-mikrophone.dtsi new file mode 100644 index 0000000..6ce6362 --- /dev/null +++ b/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex/imx8mp-verdin-mikrophone.dtsi @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2025 Uros Majstorovic + */ + +/* Verdin SPI_1 */ +&ecspi1 { + status = "okay"; +}; + +&eqos { + status = "disable"; +}; + +&fec { + status = "disable"; +}; + +&flexcan1 { + status = "disable"; +}; + +&flexcan2 { + status = "disable"; +}; + +/* Verdin QSPI_1 */ +&flexspi { + status = "disable"; +}; + +/* Verdin I2C_2_DSI */ +&i2c2 { + status = "disabled"; +}; + +&i2c3 { + status = "disabled"; +}; + +/* Verdin I2C_1 */ +&i2c4 { + status = "okay"; +}; + +/* Verdin PCIE_1 */ +&pcie { + status = "okay"; +}; + +&pcie_phy { + status = "okay"; +}; + +/* Verdin PWM_1 */ +&pwm1 { + status = "okay"; +}; + +/* Verdin PWM_2 */ +&pwm2 { + status = "disabled"; +}; + +/* Verdin PWM_3_DSI */ +&pwm3 { + status = "disabled"; +}; + +®_usdhc2_vmmc { + vin-supply = <®_3p3v>; +}; + +/* Verdin UART_1 */ +&uart1 { + status = "disabled"; +}; + +/* Verdin UART_2 */ +&uart2 { + status = "disabled"; +}; + +/* Verdin UART_3, used as the Linux Console */ +&uart3 { + status = "okay"; +}; + +/* Verdin USB_1 */ +&usb3_0 { + status = "okay"; +}; + +&usb3_phy0 { + status = "okay"; +}; + +/* Verdin USB_2 */ +&usb3_1 { + fsl,permanently-attached; + status = "okay"; +}; + +&usb3_phy1 { + status = "okay"; +}; + +/* Verdin SDCard */ +&usdhc2 { + status = "okay"; +}; diff --git a/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex/imx8mp-verdin-nonwifi-mikrophone.dts b/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex/imx8mp-verdin-nonwifi-mikrophone.dts new file mode 100644 index 0000000..e8ba274 --- /dev/null +++ b/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex/imx8mp-verdin-nonwifi-mikrophone.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2025 Uros Majstorovic + */ + +/dts-v1/; + +#include "imx8mp-verdin.dtsi" +#include "imx8mp-verdin-nonwifi.dtsi" +#include "imx8mp-verdin-mikrophone.dtsi" + +/ { + model = "Toradex Verdin iMX8M Plus on mikroPhone"; + compatible = "toradex,verdin-imx8mp-nonwifi-mikrophone", + "toradex,verdin-imx8mp-nonwifi", + "toradex,verdin-imx8mp", + "fsl,imx8mp"; +}; diff --git a/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex/imx8mp-verdin-wifi-mikrophone.dts b/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex/imx8mp-verdin-wifi-mikrophone.dts new file mode 100644 index 0000000..3b04ab5 --- /dev/null +++ b/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex/imx8mp-verdin-wifi-mikrophone.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2025 Uros Majstorovic + */ + +/dts-v1/; + +#include "imx8mp-verdin.dtsi" +#include "imx8mp-verdin-wifi.dtsi" +#include "imx8mp-verdin-mikrophone.dtsi" + +/ { + model = "Toradex Verdin iMX8M Plus WB on mikroPhone"; + compatible = "toradex,verdin-imx8mp-wifi-mikrophone", + "toradex,verdin-imx8mp-wifi", + "toradex,verdin-imx8mp", + "fsl,imx8mp"; +}; diff --git a/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex_%.bbappend b/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex_%.bbappend new file mode 100644 index 0000000..0a6f719 --- /dev/null +++ b/yocto/meta-mikrophone/recipes-bsp/u-boot/u-boot-toradex_%.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-toradex:" + +SRC_URI += "\ + file://imx8mp-verdin-mikrophone.dtsi \ + file://imx8mp-verdin-wifi-mikrophone.dts \ + file://imx8mp-verdin-nonwifi-mikrophone.dts \ + " + +DTS_SRCDIR = "dts/upstream/src/arm64/freescale" + +do_configure:append() { + cp ${WORKDIR}/imx8mp-verdin-mikrophone.dtsi ${S}/${DTS_SRCDIR} + cp ${WORKDIR}/imx8mp-verdin-wifi-mikrophone.dts ${S}/${DTS_SRCDIR} + cp ${WORKDIR}/imx8mp-verdin-nonwifi-mikrophone.dts ${S}/${DTS_SRCDIR} + # Remove exisiting fdtfile, if there is one + sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/verdin-imx8mp.h + # Add new fdtfile + sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n\t"fdtfile=imx8mp-verdin-wifi-mikrophone.dtb\\0" \\/' ${S}/include/configs/verdin-imx8mp.h +}
\ No newline at end of file diff --git a/yocto/meta-mikrophone/recipes-images/images/mikrophone-image.bb b/yocto/meta-mikrophone/recipes-images/images/mikrophone-image.bb index a4ced94..4a88221 100644 --- a/yocto/meta-mikrophone/recipes-images/images/mikrophone-image.bb +++ b/yocto/meta-mikrophone/recipes-images/images/mikrophone-image.bb @@ -50,8 +50,8 @@ IMAGE_INSTALL += " \ 'timestamp-service systemd-analyze', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', \ 'weston-xwayland xterm', '', d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "tpm2", \ - "packagegroup-tpm2-tdx-cli", "",d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'tpm2', \ + 'packagegroup-tpm2-tdx-cli', '', d)} \ \ packagegroup-tdx-cli \ packagegroup-tdx-graphical \ @@ -70,5 +70,5 @@ IMAGE_INSTALL += " \ media-files \ \ gnupg \ - weston weston-init wayland-terminal-launch \ + weston weston-init wayland-terminal-launch \ " diff --git a/yocto/meta-mikrophone/recipes-kernel/linux/device-tree-overlays/mikroPhone-panel_overlay.dts b/yocto/meta-mikrophone/recipes-kernel/linux/device-tree-overlays/mikroPhone-panel_overlay.dts new file mode 100644 index 0000000..bee2682 --- /dev/null +++ b/yocto/meta-mikrophone/recipes-kernel/linux/device-tree-overlays/mikroPhone-panel_overlay.dts @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2025 Uros Majstorovic + */ + +// adapted from: https://git.toradex.com/cgit/device-tree-overlays.git/tree/overlays/verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts?h=toradex_6.6-2.2.x-imx +// Verdin iMX8M Plus single-channel LVDS + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/pwm/pwm.h> +#include "freescale/imx8mp-pinfunc.h" + +/ { + compatible = "toradex,verdin-imx8mp"; +}; + +&{/} { + backlight_lvds_native: backlight-lvds-native { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; + /* Verdin PWM_1 (SODIMM 15) */ + pwms = <&pwm1 0 6666667>; + }; + + panel-lvds-native { + compatible = "panel-lvds"; + backlight = <&backlight_lvds_native>; + data-mapping = "vesa-24"; + height-mm = <110>; + width-mm = <62>; + + panel-timing { + clock-frequency = <36000000>; + hactive = <480>; + hfront-porch = <23 60 71>; + hsync-len = <15 40 47>; + hback-porch = <23 60 71>; + + vactive = <854>; + vfront-porch = <5 7 10>; + vsync-len = <6 9 12>; + vback-porch = <5 7 10>; + + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <1>; /* positive edge */ + }; + + port { + panel_lvds_native_in: endpoint { + remote-endpoint = <&lvds_out>; + }; + }; + }; +}; + +/* Verdin I2C_1 */ +&i2c4 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + gt911@5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + pinctrl-names = "default"; + pinctrl-0 = <&gpio1>; + /* Verdin GPIO_3 (SODIMM 210) */ + interrupt-parent = <&gpio1>; + interrupts = <5 IRQ_TYPE_EDGE_FALLING>; + /* Verdin GPIO_4 (SODIMM 212) */ + reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + status = "okay"; + }; +}; + +&lcdif2 { + status = "okay"; +}; + +&ldb { + status = "okay"; + + lvds-channel@0 { + #address-cells = <1>; + #size-cells = <0>; + fsl,data-mapping = "spwg"; + fsl,data-width = <24>; + status = "okay"; + + port@1 { + reg = <1>; + + lvds_out: endpoint { + remote-endpoint = <&panel_lvds_native_in>; + }; + }; + }; +}; + +&ldb_phy { + status = "okay"; +}; diff --git a/yocto/meta-mikrophone/recipes-kernel/linux/device-tree-overlays_git.bbappend b/yocto/meta-mikrophone/recipes-kernel/linux/device-tree-overlays_git.bbappend new file mode 100644 index 0000000..cae7974 --- /dev/null +++ b/yocto/meta-mikrophone/recipes-kernel/linux/device-tree-overlays_git.bbappend @@ -0,0 +1,15 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/device-tree-overlays:" + +MIKROPHONE_OVERLAYS_BINARY = "verdin-imx8mp_hdmi_overlay.dtbo mikroPhone-panel_overlay.dtbo" + +SRC_URI += " \ + file://mikroPhone-panel_overlay.dts \ +" + +TEZI_EXTERNAL_KERNEL_DEVICETREE = "${MIKROPHONE_OVERLAYS_BINARY}" + +TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT = "${MIKROPHONE_OVERLAYS_BINARY}" + +do_collect_overlays:prepend() { + cp ${WORKDIR}/mikroPhone-panel_overlay.dts ${S} +}
\ No newline at end of file diff --git a/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex%.bbappend b/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex%.bbappend new file mode 100644 index 0000000..a706b06 --- /dev/null +++ b/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex%.bbappend @@ -0,0 +1,20 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/linux-toradex:" + +# Prevent the use of in-tree defconfig +# unset KBUILD_DEFCONFIG + +SRC_URI += "\ + file://imx8mp-verdin-mikrophone.dtsi \ + file://imx8mp-verdin-wifi-mikrophone.dts \ + file://imx8mp-verdin-nonwifi-mikrophone.dts \ + file://kernel_lvds_freq.patch \ + " + +# For arm64 bit freescale/NXP devices +DTS_SRCDIR = "arch/arm64/boot/dts/freescale" + +do_configure:append() { + cp ${WORKDIR}/imx8mp-verdin-mikrophone.dtsi ${S}/${DTS_SRCDIR} + cp ${WORKDIR}/imx8mp-verdin-wifi-mikrophone.dts ${S}/${DTS_SRCDIR} + cp ${WORKDIR}/imx8mp-verdin-nonwifi-mikrophone.dts ${S}/${DTS_SRCDIR} +}
\ No newline at end of file diff --git a/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/imx8mp-verdin-mikrophone.dtsi b/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/imx8mp-verdin-mikrophone.dtsi new file mode 100644 index 0000000..7c23309 --- /dev/null +++ b/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/imx8mp-verdin-mikrophone.dtsi @@ -0,0 +1,169 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2025 Uros Majstorovic + */ + +/* Verdin HDMI_1 Audio */ +&aud2htx { + status = "okay"; +}; + +/* Verdin SPI_1 */ +&ecspi1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + spidev@0 { + /* Use compatible "rohm,dh2228fv" to bind spidev driver */ + compatible = "rohm,dh2228fv"; + reg = <0>; + spi-max-frequency = <50000000>; + }; +}; + +&eqos { + status = "disabled"; +}; + +&fec { + status = "disabled"; +}; + +&flexcan1 { + status = "disabled"; +}; + +&flexcan2 { + status = "disabled"; +}; + +/* Verdin QSPI_1 */ +&flexspi { + status = "disabled"; +}; + +&gpio4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ctrl_sleep_moci>; +}; + +/* Verdin I2C_2_DSI */ +&i2c2 { + status = "disabled"; +}; + +/* CAM I2C, disabled for now */ +&i2c3 { + status = "disabled"; +}; + +/* Verdin I2C_1 */ +&i2c4 { + status = "okay"; +}; + +/* Verdin PCIE_1 */ +&pcie { + status = "okay"; +}; + +&pcie_phy { + status = "okay"; +}; + +/* Verdin PWM_1 */ +&pwm1 { + status = "okay"; +}; + +/* Verdin PWM_2 */ +&pwm2 { + status = "disabled"; +}; + +/* Verdin PWM_3_DSI */ +&pwm3 { + status = "disabled"; +}; + +®_usdhc2_vmmc { + vin-supply = <®_3p3v>; +}; + +/* Verdin HDMI_1 Audio */ +&sound_hdmi { + status = "okay"; +}; + +/* Verdin UART_1 */ +&uart1 { + status = "disabled"; +}; + +/* Verdin UART_2 */ +&uart2 { + status = "disabled"; +}; + +/* Verdin UART_3, used as the Linux Console */ +&uart3 { + status = "okay"; +}; + +/* Verdin USB_1 */ +&usb3_0 { + status = "okay"; +}; + +&usb3_phy0 { + status = "okay"; +}; + +/* Verdin USB_2 */ +&usb3_1 { + // fsl,permanently-attached; + status = "okay"; +}; + +&usb3_phy1 { + status = "okay"; +}; + +/* Verdin SDCard */ +&usdhc2 { + status = "okay"; +}; + +/* Video and graphics */ +&vpu_g1 { + status = "okay"; +}; + +&vpu_g2 { + status = "okay"; +}; + +&vpu_vc8000e { + status = "okay"; +}; + +&vpu_v4l2 { + status = "okay"; +}; + +&gpu_2d { + status = "okay"; +}; + +&gpu_3d { + status = "okay"; +}; + +&ml_vipsi { + status = "okay"; +}; + +&mix_gpu_ml { + status = "okay"; +}; diff --git a/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/imx8mp-verdin-nonwifi-mikrophone.dts b/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/imx8mp-verdin-nonwifi-mikrophone.dts new file mode 100644 index 0000000..91c08a7 --- /dev/null +++ b/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/imx8mp-verdin-nonwifi-mikrophone.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2025 Uros Majstorovic + */ + +/dts-v1/; + +#include "imx8mp-verdin.dtsi" +#include "imx8mp-verdin-nonwifi.dtsi" +#include "imx8mp-verdin-mikrophone.dtsi" + +/ { + model = "Toradex Verdin iMX8M Plus on mikroPhone"; + compatible = "toradex,verdin-imx8mp-nonwifi-mikrophone", + "toradex,verdin-imx8mp-wifi", + "toradex,verdin-imx8mp", + "fsl,imx8mp"; +}; diff --git a/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/imx8mp-verdin-wifi-mikrophone.dts b/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/imx8mp-verdin-wifi-mikrophone.dts new file mode 100644 index 0000000..35792e1 --- /dev/null +++ b/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/imx8mp-verdin-wifi-mikrophone.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2025 Uros Majstorovic + */ + +/dts-v1/; + +#include "imx8mp-verdin.dtsi" +#include "imx8mp-verdin-wifi.dtsi" +#include "imx8mp-verdin-mikrophone.dtsi" + +/ { + model = "Toradex Verdin iMX8M Plus WB on mikroPhone"; + compatible = "toradex,verdin-imx8mp-wifi-mikrophone", + "toradex,verdin-imx8mp-wifi", + "toradex,verdin-imx8mp", + "fsl,imx8mp"; +}; diff --git a/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/kernel_lvds_freq.patch b/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/kernel_lvds_freq.patch new file mode 100644 index 0000000..9955bc4 --- /dev/null +++ b/yocto/meta-mikrophone/recipes-kernel/linux/linux-toradex/kernel_lvds_freq.patch @@ -0,0 +1,62 @@ +diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi +index 55adf1bf45d9..c875474e6c45 100644 +--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi ++++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi +@@ -752,7 +752,7 @@ clk: clock-controller@30380000 { + <800000000>, + <393216000>, + <361267200>, +- <1039500000>; ++ <252000000>; + }; + + src: reset-controller@30390000 { +diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c +index 6c17786ecb9f..8c9840f08c0e 100644 +--- a/drivers/clk/imx/clk-pll14xx.c ++++ b/drivers/clk/imx/clk-pll14xx.c +@@ -75,6 +75,7 @@ static const struct imx_pll14xx_rate_table imx_pll1443x_tbl[] = { + PLL_1443X_RATE(49152000U, 393, 3, 6, 0x374c), + PLL_1443X_RATE(45158400U, 241, 2, 6, 0xd845), + PLL_1443X_RATE(40960000U, 109, 1, 6, 0x3a07), ++ PLL_1443X_RATE(252000000U, 84, 2, 2, 0), + }; + + struct imx_pll14xx_clk imx_1443x_pll = { +diff --git a/drivers/gpu/drm/imx/imx8mp-ldb.c b/drivers/gpu/drm/imx/imx8mp-ldb.c +index e3f5c5e6e842..55dbafa863cf 100644 +--- a/drivers/gpu/drm/imx/imx8mp-ldb.c ++++ b/drivers/gpu/drm/imx/imx8mp-ldb.c +@@ -186,15 +186,6 @@ imx8mp_ldb_encoder_atomic_check(struct drm_encoder *encoder, + return -EINVAL; + } + +- /* +- * Due to limited video PLL frequency points on i.MX8mp, +- * we do mode fixup here in case any mode is unsupported. +- */ +- if (ldb->dual) +- mode->clock = mode->clock > 100000 ? 148500 : 74250; +- else +- mode->clock = 74250; +- + return 0; + } + +@@ -212,16 +203,6 @@ imx8mp_ldb_encoder_mode_valid(struct drm_encoder *encoder, + if (ldb_ch->panel) + return MODE_OK; + +- /* +- * Due to limited video PLL frequency points on i.MX8mp, +- * we do mode valid check here. +- */ +- if (ldb->dual && mode->clock != 74250 && mode->clock != 148500) +- return MODE_NOCLOCK; +- +- if (!ldb->dual && mode->clock != 74250) +- return MODE_NOCLOCK; +- + return MODE_OK; + } + diff --git a/yocto/overlays/mikroPhone-panel_overlay.dts b/yocto/overlays/mikroPhone-panel_overlay.dts index 0bc14b3..bee2682 100644 --- a/yocto/overlays/mikroPhone-panel_overlay.dts +++ b/yocto/overlays/mikroPhone-panel_overlay.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /* - * Copyright 2023 Toradex + * Copyright 2025 Uros Majstorovic */ // adapted from: https://git.toradex.com/cgit/device-tree-overlays.git/tree/overlays/verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts?h=toradex_6.6-2.2.x-imx @@ -32,8 +32,8 @@ compatible = "panel-lvds"; backlight = <&backlight_lvds_native>; data-mapping = "vesa-24"; - height-mm = <136>; - width-mm = <217>; + height-mm = <110>; + width-mm = <62>; panel-timing { clock-frequency = <36000000>; @@ -61,16 +61,8 @@ }; }; -&gpu_2d { - status = "okay"; -}; - -&gpu_3d { - status = "okay"; -}; - /* Verdin I2C_1 */ -&i2c1 { +&i2c4 { #address-cells = <1>; #size-cells = <0>; status = "okay"; @@ -116,16 +108,3 @@ &ldb_phy { status = "okay"; }; - -&mix_gpu_ml { - status = "okay"; -}; - -&ml_vipsi { - status = "okay"; -}; - -/* Verdin PWM_2 */ -&pwm1 { - status = "okay"; -}; |