This guide describes how to modify the Linux BSP to utilize PWM3 with the development kit. PWM3 is already setup and configured to be used for backlight control when connecting the PEB-AV-02 display expansion board. In this guide the PEB-AV-02 expansion board is removed so PWM3 can be controlled for general use from Linux.
Once you have completed the BSP Development Guide you will have access to all the source files.
Navigate to the Linux source code
Edit the device tree source file (imx7d-phyboard-zeta-004.dts).
Make the following change to remove the PEB-AV-02 expansion board:
- #include "imx7-peb-av-02.dtsi" /* LCD adapter */ +#include "imx7-peb-av-06.dtsi" /* MIPI DSI and CSI adapter */CODE
/* * Copyright (C) 2019 PHYTEC America, LLC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * * DTS for PHYTEC kit KPB-01910-004 */ /dts-v1/; #include "imx7d.dtsi" /* Dual Processor */ #include "imx7-phycore-som.dtsi" /* Superset - includes all SOM population options */ #include "imx7d-pba-c-09.dtsi" /* Carrier board */ /* #include "imx7-peb-av-02.dtsi Parallel LCD adapter */ #include "imx7-peb-d-rpi.dtsi" /* PEB-D-RPI module */ #include "imx7d-pcm-061-2110111c.dtsi" /* SOM variant */
- Save the changes
- From the command line, navigate back to the Yocto build Directory
- Rebuild the Linux Kernel with the following command:
MACHINE=imx7-phyboard-zeta bitbake linux-phytec-fsl -f -c compile && bitbake linux-phytec-fsl
- The above command only re-compiles and generates the zImage and dtb and should take far less time than it took to first build the entire BSP.
- The images generated are deployed to $YOCTO_DIR/build/tmp/deploy/images/imx7-phyboard-zeta. The file you will need is zImage-imx7-phyboard-rdk.dtb.
- To test out the file PHYTEC recommends copying it over to the boot partition of your SD card using the following commands. This will allow for swapping back and forth between this modified device tree and the default device tree.
cp $YOCTO_DIR/build/tmp/deploy/images/imx7-phyboard-zeta/zImage-imx7-phyboard-rdk.dtb /media/user/Boot\ imx7d-/imx7d-phyboard-zeta-004-PWM3.dtb