i.MXプロセッサ ナレッジベース

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX Processors Knowledge Base

ディスカッション

ソート順:
SW: Linux 4.14.98_2.2.0 bsp release , gpu sdk 5.3.0 and patch in this doc HW: i.MX8QXP MEK board Inspired by the GIMP adjust color curve tool,  I write similar gui test code for i.MX8QXP gamma curve tuning. That is on display will show one linear curve first, use mouse to change any part of this curve, after that calculate value of point on changed curve , then pass related value to i.MX8QXP DPU gammcor unit , at last the display effect will be changed by DPU. When test code start up , will draw Y=X curve on display, that will from (0,0) to (500, 500) to (1023,1023). After you use mouse drag some part of the curve, will generated a new point (x_new, y_new) which is not on original Y=X curve. Then need draw a new curve that pass  through the (0,0) , (500, 500) , (x_new, y_new), (1023,1023).  That new curve , i choose to use Catmull-Rom Splines to get it. Use Catmull-Rom Splines for approximate a curve that pass through n point, then need n+2 control point. Extra 2 point could be selected as you want ,and they will affect the shape of the curve. Catmull-Rom Splines could pass through all control point, it is C1 continuity, no convex hull property. For example, there is four control point p0, p1 , p2 , p3,  to draw the curve pass through all of them, it could divide to segment p0 to p1 , segment p1 to p2 , segment p2 to p3. For segment p1 to p2 , select four control point as p0,p1, p2, p3, use Catmull-Rom Splines as below: For segment p0 to p1 , need use four control point as p0, p0, p1, p2: For segment p2 to p3, need use four control point as p1, p2, p3, p3: In this test code,  i will use gpu vertex shader to calculate each segment of curve, then use transform feedback to read back point value of each segment to cpu side, cpu side will pass related value to DPU gammcor unit for gamma tuning.   Test steps: Apply 8qxp_dpu_gammacor_4.14.98_2.2.0.diff on linux-imx for i.MX8QXP DPU device driver. Apply dpu_gamma_curve_gpusdk5.3.0.diff on imx-gpu-sdk for build this gui test code. Update the new kernel image, and copy test code to rootfs. Run any other application first to draw some thing on screen, for example  /usr/share/cinematicexperience-1.0/Qt5_CinematicExperience. Then run gui test code in this code, S01_SimpleTriangle_Wayland. Then there will show one linear curve on display , use mouse to change the curve as you like by put mouse cursor close to the curve, press the mouse button , drag it and release the mouse button, you will see the new curve on display , and also the display effect also be changed. Reference: 1>https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-processors/i-mx-8x-family-arm-cortex-a35-3d-graphics-4k-video-dsp-error-correcting-code-on-ddr:i.MX8X  2>https://www.nxp.com/design/software/embedded-software/linux-software-and-development-tools/embedded-linux-for-i-mx-applications-processors:IMXLINUX?tab=Design_Tools_Tab  3>https://github.com/NXPmicro/gtec-demo-framework  4>https://en.wikipedia.org/wiki/Cubic_Hermite_spline  5>http://www.mvps.org/directx/articles/catmull
記事全体を表示
TFTP     TFTP service will be used to transfer the kernel image from host to target every time the system reboots. Select the Linux distribution: All Boards TFTP Fedora All Boards TFTP on OpenSuse All Boards TFTP on Ubuntu
記事全体を表示
Some processor’s GPIO settings on the i.MX Pins Tool version 7 may not show allow to select direction and just show an option “Input/Output” as shown. This will be fixed, but the settings can be changed on the local processor data as a workaround. For more information and documentation for the Pins Tool for i.MX please visit its home page on the link below: https://www.nxp.com/design/designs/pins-tool-for-i-mx-application-processors:PINS-TOOL-IMX   First, find where the Pins Tool data package is stored. To do this open the Pins Tool and click Help > About. On the About screen click the Details button. Take also note of the name of the package that needs to be fixed.   Go to the location where the data package is stored and find the processor data. The file that would need to be updated is signal_configuration.xml    Find the GPIO pin data and change the directions from the string ““inOut”to the string “in out”. Then save this file.    Close and reopen the Pins Tool. The direction on the updated package should now show the options Input and Output.  
記事全体を表示
These instructions used ltib-imx27ads-20071219. First, get u-boot v2.0: git clone http://git.denx.de/u-boot-v2.git u-boot-v2 Enter the U-Boot directory: cd u-boot-v2 Export the proper compilation paths and environment variables: export ARCH=arm export PATH="$PATH:/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/" export CROSS_COMPILE=arm-none-linux-gnueabi- Configure it for the i.MX27ADS board: make mx27ads_defconfig You may want to enable the FEC driver: make menuconfig And go to Drivers -> Network drivers and select Yes on i.MX FEC Ethernet driver Exit the config menu (don't forget to save the configuration) and just make it: make Or if you prefer the verbose mode make V=1 After a quick build, you should get a uboot.bin on your current directory. I used the ADS Toolkit to program the NOR flash.
記事全体を表示
i.MX27 PDK Board Flashing This tutorial teaches how to flash bootloader using ATK. To flash kernel and root file system, follow the directions: IMX27 PDK NAND Flashing RedBoot. Using ATK ATK (Advanced Toolkit) is a Windows software for programming the flash memory of i.MX boards. This section will describe the procedure to erase the flash memory and program the bootloader. 1 - Connect a serial cable between PC and i.MX board. 2 - Some hardware configurations (switches) must be done to flash the board. Set red and cream switches as below: Switch SW5 -> 00000 Switch SW4 -> 10000001 Installing ATK on Linux Download ATK: Download. Extract ATK: # unzip ATK_1_41_STD_installer.zip Execute the default install process: # wine SETUP.EXE Get mfc42.dll and msvcp60.dll from a Windows Machine (C:\Windows\System32) and copy to wine system32 (/root/.wine/drive_c/windows/system32) Run ATK: # wine ADSToolkit_std.exe Next Step To flash kernel and root file system, follow the directions: IMX27 PDK NAND Flashing RedBoot. PS: On SW5 and SW4, "1" means the keys selected towards the edge of the board. 3 - Run ATK by clicking Start -> Programs -> AdvancedToolKit -> AdvancedToolKit       Set the options:    Device memory -> DDR; Custom Initial File -> (keep it unmarked)    Communication Channel -> Serial Port (Usually COM1) 4 - Click on Flash Tools to erase, program or dump the the flash memory and click GO. Flash Erasing 1 - To erase Flash memory, select the parameters as shown in the figure below: 2 - Turn on the board and press Erase. 3 - ATK shows this message when flash is erased Flash Programming The next step is to program the bootloader image into the board's Flash following the steps below. 1 - Select the parameters as shown in the figure below and press Program. The bootloader binary image file can be found into your Board Support Package Set Program, NAND, Address: 0x00000000 2 - Add it on Image File field and press Program. 3 - Close ATK, turn off the board and set switch back as shown in the picture below. Installing ATK on Linux Download ATK: Download. Extract ATK: # unzip ATK_1_41_STD_installer.zip Execute the default install process: # wine SETUP.EXE Get mfc42.dll and msvcp60.dll from a Windows Machine (C:\Windows\System32) and copy to wine system32 (/root/.wine/drive_c/windows/system32) Run ATK: # wine ADSToolkit_std.exe Next Step To flash kernel and root file system, follow the directions: IMX27 PDK NAND Flashing RedBoot.
記事全体を表示
The Config Tools for i.MX is a set of configuration tools that provide an efficient method for evaluation and configuration of pins routing and DDR memory settings when designing with NXP's application processors based on Arm® Cortex®-A cores, including i.MX MPUs. The following tools are currently available: DDR Tool DDR Configuration and Validation tool allows you to create a configuration for the DDR component and to validate the DDR configuration using various validation scenarios Features: Support for iMX8M, iMX8MM, iMX8MN, iMX8MP and LX2160A DDR configuration UI using the tokenized RPA tool PHY initialization using dynamic library Import the output of the RPA tool will bypass UI configuration Support for multiple PHY firmware version including fw2020.06 Diagnostic fw2020.06 DDR PHY support for DDR3, DDR4, and LPDDR4 Cell color code Basic/Advanced user mode DDR controller Registers View support Auto-detect of available COM ports USB target connection Basic validation tests support (Write-Read-Compare, Walking Ones, Walking Zeros) DQ ODT and driver strength test vTSA (Virtual Timing Signal Analysis) support - RX data eye, TX data eye Stress tests support Export vTSA results in JPEG format Static Code generation in Uboot style Command line posibility PBL Tool PBL tool helps you create and modify pre-boot initialization data used for configuring LX2 devices. Features: Support for LX2160A Configure reset configuration word (RCW), which is 1024 bits of information Optional configure pre-boot initialization (PBI) command sequence Allow user to have full access to configuration by using Skip error checking and Display all fields Option to directly modify the configuration from RCW registers Import different formats of input Generate different types of output, including a binary file SerDes Tool The SerDes tool allows you to configure the SerDes block and provides you with a GUI application to validate the configuration Features: Support for LX2160A UI for SerDes blocks configuration Per lane tests Bist, Power Transmitter/Receiver, Reset Transmitter/Receiver tests Jitter scope, Pattern Independent Jitter scope, Start/Stop Tx Patter generation tests Read a configuration from the target   Trusted Execution Environment Configuration tool The Trusted Execution Environment (TEE) tool facilitates the protection and isolation of the sensitive parts of the code. Features: Graphical display of memory layout and resulting access to memory regions Configuration of access policies for memory areas, bus masters, and peripherals Configuration of pin and interrupt masking and security, as well as general features related to the ARMv8 core security Configuration of MPU Validation of settings Generation of configuration files (C code or ROM preset data) Pins Tool The Pins Tool is used for pin routing configuration, validation and code generation, including pin functional/electrical properties, power rails, run-time configurations. Features: Desktop application Muxing and pin configuration with consistency checking Multicore support Localized for English and Simplified Chinese Mostly Connected: On-Demand device data download Integrates with any compiler and IDE Supports English and Chinese (simplified) languages, based on locale settings. Please refer to user manual for details. ANSI-C initialization code Graphical processor package view Multiple configuration blocks/functions Easy-to-use device configuration Selection of Pins and Peripherals Package with IP blocks Routed pins with electrical characteristics Registers with configured and reset values Power Groups with assigned voltage levels Source code for C/C++ applications Documented and easy to understand source code CSV Report and Device Tree File Downloads & links To download the installer for all platforms, please login to our download site via:  https://www.nxp.com/design/designs/config-tools-for-i-mx-applications-processors:CONFIG-TOOLS-IMX Please refer to Documentation  for installation and quick start guides. For further information about DDR config and validation, please go to this blog post. Whats new in v12.1 Pins tool Deinit function now sets also the routing and direction to it's default state. It also tries to route the original peripheral signal to it's default pin.  
記事全体を表示
This is the procedure and patch to set up Ubuntu 13.10 64bit Linux Host PC and building i.MX6x L3.0.35_4.1.0. It has been tested to build GNOME profile and with FSL Standard MM Codec for i.MX6Q SDB board. A) Basic Requirement: Set up the Linux Host PC using ubuntu-13.10-desktop-amd64.iso Make sure the previous LTIB installation and the /opt/freescale have been removed B) Installed the needed packages to the Linux Host PC $ sudo apt-get update $ sudo apt-get install gettext libgtk2.0-dev rpm bison m4 libfreetype6-dev $ sudo apt-get install libdbus-glib-1-dev liborbit2-dev intltool $ sudo apt-get install ccache ncurses-dev zlib1g zlib1g-dev gcc g++ libtool $ sudo apt-get install uuid-dev liblzo2-dev $ sudo apt-get install tcl dpkg $ sudo apt-get install asciidoc texlive-latex-base dblatex xutils-dev $ sudo apt-get install texlive texinfo $ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 $ sudo apt-get install libc6-dev-i386 $ sudo apt-get install u-boot-tools $ sudo apt-get install scrollkeeper $ sudo apt-get install gparted $ sudo apt-get install nfs-common nfs-kernel-server $ sudo apt-get install git-core git-doc git-email git-gui gitk $ sudo apt-get install meld atftpd $ sudo ln -s /usr/lib/x86_64-linux-gnu/librt.so   /usr/lib/librt.so C) Unpack and install the LTIB source package and assume done on the home directory: $ cd ~ $ tar -zxvf L3.0.35_4.1.0_130816_source. tar.gz $ ./L3.0.35_4.1.0_130816_source/install      After that, you will find ~/ltib directory created D) Apply the patch to make L3.0.35_4.1.0 could be installed and compiled on Ubuntu 13.10 64bit OS $ cd ~/ltib $ git apply 0001_make_L3.0.35_4.1.0_compile_on_Ubuntu_13.10_64bit_OS.patch What the patch is doing: a) The patch modifies the following files:    dist/lfs-5.1/base_libs/base_libs.spec    dist/lfs-5.1/m4/m4.spec    dist/lfs-5.1/ncurses/ncurses.spec b) Add the following files to the pkgs directory:    pkgs/m4-1.4.16-1383761043.patch    pkgs/m4-1.4.16-1383761043.patch.md5 E) Then, it is ready to proceed the rest of the LTIB env setup process: $ cd ~/ltib $ ./ltib -m config $ ./ltib Reference: L3.0.35_4.1.0_130816_docs/doc/mx6/Setting_Up_LTIB_host.pdf https://community.freescale.com/message/332385#332385 https://community.freescale.com/thread/271675 https://community.freescale.com/message/360556#360556 m4 compilation issue: 1. https://github.com/hashdist/hashstack/commit/f6be2a58de62327d05e052d89c9aa931d4c926b3 2. https://github.com/hashdist/hashstack/issues/81 rpm-fs package failed to build issue: https://community.freescale.com/message/355771#355771 scrollkeeper is for the gnome-desktop compilation NOTE: When compiling gstreamer, this warning was pop up.  Just ignore it seems okay.
記事全体を表示
We use flash header which will be access by ROM code to do the NAND boot or secure boot. This is a document introduce the flash header.
記事全体を表示
Question: How much control of the bitrate does the i.MX6's VPU provide? VPU API includes a bitrate setting in the EcnOpenParam, is this a maximum, minimum, or something else? To encode two 1280x1080 streams at 30fps with a bit rate of at least 20Mbps, from the information in the following thread, it looks like this isn't supported due to VPU bandwitdh, Is there any limit on bitrate due to the VPU's processing bandwidth?  I.e., if the stream is limited to one 1280x1080 channel, can we choose a maximum bit rate and if so, how do we determine what it is? Answer: The bitRate field in the EncOpenParam structure is the desired target bit rate in kbps. If 0, there is no rate control and frames are encoded based on the quantization parameter specified by the quantParam field in EncParam.structure. It seems upper limit is 20Mbps for 1280x1080@30fps. So you should specified bitrate=2000 in your use case. In general, the maximum bitrate is about 30Mbps. Vpu driver will return invalid parameter if the appointed bitrate reach out of the range (0, 32767kbps). Please refer to Q&A: MX6 VPU H.264 Dual Stream Encode Limits.
記事全体を表示
In new iMX8QM and iMX8QXP BSP, it had implemented hardware partition to split the resource and memory regions. The default Android Auto BSP had given example for shared memory between M4 and A core, it is used for RPMSG. Here is an example to add a new shared memory for iMX8QXP MEK board with Android Auto P9.0.0_GA2.1.0 BSP, which can be accessed in both M4, Uboot and Linux Kernel. The new shared memory region is from 0xF6000000 to 0xFDFFFFFF, total 128MB, it covers the RPMSG region too. RPMSG shared memory is moved to 0xF6000000 ~ 0xF6BFFFFF, total 12MB. vendor_nxp_fsl-proprietary_uboot-firmware.patch SCFW patch for board file to change the old shared memory region (0x90000000~0x90BFFFFF) to new shared memory region (0xF6000000~0xFDFFFFFF). This patch is applied to android_build/vendor/nxp/fsl-proprietary/uboot-firmware/imx8q_car/board-imx8qxp.c, after patched, copy this file to SCFW porting kit and build out a new SCFW image, put it to "android_build/vendor/nxp/fsl-proprietary/uboot-firmware/imx8q_car/mx8qx-scfw-tcm.bin". vendor_nxp-opensource_uboot-imx.patch This is the Uboot patch to map the shared memory region, if Uboot doesn't need access these memory, this patch is not needed. vendor_nxp-opensource_kernel_imx.patch This is the kernel patch to map the shared memory region. Note: VPU reserved memory address shouldn't be changed, otherwise it will impact the VPU function. So the new reserved memory region had been moved to 0xF600000~0xFDFFFFFF. vendor_nxp_mcu-sdk-auto_SDK_MEK-MIMX8QX.patch M4 patch for RPMSG address changed from 0x90000000 to 0xF6000000. Note: 1. In this example, we put the two shared memory regions together, then it will not split the memory region used in Linux. Another reason for such modification is the limitation of memory region counts in SCFW. 2. Since the RPMSG shared memory had been moved from 0x90000000 to 0xF6000000, the M4 code who used shared memory should also be changed. 2019-07-29 Update: When "#define PHYS_SDRAM_2_SIZE  0x0" in Uboot, it will create a 0 size memory region, this will impact the Uboot shared memory patch. Added the "uboot_imx8_cpu.patch" to avoid such issue.
記事全体を表示
The i.MX 6 D/Q/DL/S/SL  Linux L3.0.101_4.1.1 Patch release is now available on [www.freescale.com]www.freescale.com ·          Target HW boards o   i.MX6DL  SABRE SD board o   i.MX6Q  SABRE SD board o   i.MX6DQ SABRE AI board o   i.MX6DL SABRE AI board o   i.MX6SL EVK board This patch release is based on the i.MX 6 Linux 3.0.35_4.1.0 release. The purposes of this patch release are as follows: ·         To fix the BSP multimedia GPU bugs ·         To upgrade the Linux kernel to v3.0.101 ·         To upgrade the multimedia library ·         To upgrade the GPU driver and library to 4.6.9p13 Please consult the release notes for more details. ​
記事全体を表示
U-boot expects uImage format for the kernel image. In order to LTIB generate a uImage file: $ export SYSCFG_KTARG=uImage $ ./ltib -p kernel Setup in U-Boot the kernel bootargs: u-boot> setenv bootargs noinitrd console=ttymxc0,115200 init=/linuxrc root=/dev/nfs nfsroot=10.29.244.27:/tftpboot/rootfs ip=dhcp Change 10.29.244.27 to your host IP. The procedure above is needed when default bootloader used by ltib was redboot. In some ltib releases (before 2010) default bootloader is u-boot. In this case, ltib will create uImage by default
記事全体を表示
i.MX25 for Industrial and General Embedded The i.MX25 family of multimedia applications processors extends the Freescale ARM9™ portfolio and makes the industrial and general embedded market a key focus of i.MX with the integration of many new features. Speed up to 400 MHz, low power consumption and multiple connectivity options support the growing needs of industrial and general embedded products, while allowing customers to reduce their overall system bill of materials cost. The i.MX258 processor provides additional security features making it the ideal solution for payment terminal (POS), or any other type of product needing secure system boot and tamper detection. i.MX25 for Automotive Today's drivers expect more connectivity in more places from more things—phones, media players and, increasingly, cars. Bluetooth™ connectivity is becoming the norm as more people keep their hands on the wheel instead of on the phone. Connectivity and compatibility with media players is becoming a requirement as consumers' media investment goes digital. The challenge: how can designers support high-end features such as connectivity and media playback without charging high-end prices? The i.MX25 family of processors offers integration that tailors itself to the connectivity requirements of today's automobile but eliminates expensive parts not needed for a cost-conscious infotainment system. The i.MX25 applications processor is a Freescale Energy-Efficient Solutions product. Product Information on Freescale.com i.MX257: Multimedia Applications Processor i.MX251: Multimedia Applications Processor i.MX253: Multimedia Applications Processor i.MX255: Multimedia Applications Processor i.MX258: Multimedia Applications Processor Additional Resources i.MX25 PDK Board I.MX25 PDK Board Get Started i.MX25 PDK Board Flashing NAND i.MX25 PDK Board Flashing SPI NOR i.MX25 PDK Board Flashing SD Card i.MX25 PDK Board Running Linux I.MX25 PDK U-boot SplashScreen I.MX25 PDK U-boot SDCard I.MX25 PDK Using FEC i.MX25: When using 120MHz UPLL as clock source, GPT counter returns unexpected results Limitations of the i.MX SIM Controller to Pass the EMV Certification
記事全体を表示
This article describes how to enable the GPIO support in SPL for i.MX 93 and how to use the associated library. Available GPIO banks Bank Registers' Base Address GPIO1 0x47400000 GPIO2 0x43810000 GPIO3 0x43820000 GPIO4 0x43830000   Software Tests performed using the LF6.12.20-2.0.0 BSP, but should work similarly in other versions.   Enable the GPIO support in SPL Enable the CONFIG_SPL_GPIO through menuconfig. Configure the GPIO pin Make sure the chosen GPIO pin is not used by any other peripheral, by checking U-Boot's device tree (example: imx93-11x11-evk.dts and its included files). If used, disable the conflicting peripheral in the device tree. To identify the exact macro associated to the GPIO functionality, please check the arch/arm/dts/imx93-pinfunc.h file.  Example 1: Use an available GPIO pin (e.g. GPIO2_IO05) This pin is not used by other peripheral, so there is nothing to disable.  To use the pin with the GPIO functionality, the following pin muxing must be added in the iomux node of the imx93-11x11-evk.dts file (located in dts/upstream/src/arm64/freescale/😞 😞 pinctrl_hog: hoggrp { fsl,pins = < MX93_PAD_GPIO_IO05__GPIO2_IO05 0x51e >; }; Note: 0x51e represents the value you want in the PAD register (SW_PAD_CTL_PAD_GPIO_IO05). You may configure it as you want.  Example 2: Use the XSPI1_TXC pin as GPIO (GPIO1_IO12) In our BSP, by default, this pin is used by the SAI1 peripheral. To use this pin as GPIO, SAI1 must be disabled in device tree. &sai1 { status = "disabled"; }; To use the XSPI1_TXC pin with the GPIO functionality, the following pin muxing must be added in the iomux node of the imx93-11x11-evk.dts file (located in dts/upstream/src/arm64/freescale/😞😞 pinctrl_hog: hoggrp { fsl,pins = < MX93_PAD_SAI1_TXC__GPIO1_IO12 0x51e >; }; Include the correct header files In the file you want to use the GPIO, include the following headers: #include <asm/arch-mx7ulp/gpio.h> #include <asm-generic/gpio.h> Define the GPIO To define the GPIO's handle, use the IMX_GPIO_NR(bank, index) macro. index = The pin number within the bank. bank = The GPIO bank number, mapped as follows (due to the way they are placed in memory): GPIO Bank bank value for IMX_GPIO_NR GPIO1 4 GPIO2 1 GPIO3 2 GPIO4 3 Example 1: Compute the handle for GPIO2_IO05 #define TIMED_GPIO IMX_GPIO_NR(1, 5) Example 2: Compute the handle for XSPI1_TXC (GPIO1_IO12) #define TIMED_GPIO IMX_GPIO_NR(4, 12)   Read the GPIO pin gpio_request(TIMED_GPIO, "timed_gpio"); gpio_direction_input(TIMED_GPIO); int val = gpio_get_value(TIMED_GPIO); printf("GPIO value is %d\n", val);   Write the GPIO pin gpio_request(TIMED_GPIO, "timed_gpio"); // set the pin as output and make it high gpio_direction_output(TIMED_GPIO, 1);   The driver used is drivers/gpio/gpio-uclass.c.
記事全体を表示
This is an example to show how to connect two cameras (with same I2C address) on the i.MX6Q board. In this example, the I2C switch is PCA9543A. Two cameras are OV5640 & OV5645. OV5640 is connected to CSI0, and other one OV5645 is connected to MIPI. The Linux BSP is L3.0.35. In the your_board.c file, add the following for pca954x. static struct pca954x_platform_mode pca954x_modes[] = {      {            .adap_id = 4,            .deselect_on_exit = true,      },      {            .adap_id = 5,            .deselect_on_exit = true,      }, }; static struct pca954x_platform_data pca954x_data = {      .modes = pca954x_modes,      .num_modes = ARRAY_SIZE(pca954x_modes) }; In this example, the I2C switch is connected to i.MX6Q’s I2C0. The I2C address of the PCA9543A is 0x70. static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {      {            I2C_BOARD_INFO("pca9543", 0x70),            .platform_data = (void *)&pca954x_data,      }, }; The channel 0 of PCA9543A is connected to the I2C of OV5645 MIPI. static struct i2c_board_info mux_i2c4_board_info[] __initdata = {      {            I2C_BOARD_INFO("ov5645_mipi", 0x3c),            .platform_data = (void *)&mipi_csi2_data,      }, }; The channel 1 of PCA9543A is connected to the I2C of OV5640 CSI0. static struct i2c_board_info mux_i2c5_board_info[] __initdata = {      {            I2C_BOARD_INFO("ov5640", 0x3c),            .platform_data = (void *)&csi0_camera_data,      }, }; In the board_init function, register the I2C4 and I2C5. i2c_register_board_info(4, mux_i2c4_board_info,                 ARRAY_SIZE(mux_i2c4_board_info)); i2c_register_board_info(5, mux_i2c5_board_info,                 ARRAY_SIZE(mux_i2c5_board_info)); Select the PCA954x driver In kernel configuration In Kernel Configuration, go to Device Drivers --> I2C support --> I2C bus multiplexing support --> Multiplexer I2C Chip support  --> Select <*> Philips PCA954x I2C Mux/switches
記事全体を表示
When flashing a Linux System on a SD card using the script mk_mx28_sd on a Ubuntu 12.04 host, one needs to modify it so partitions are created correctly.  Just follow these steps on the console: $ cd $SDK/L2.6.35_10.12.01_SDK_scripts $ cat > first_partition_sector.patch << EOF diff -Naur a/mk_mx28_sd b/mk_mx28_sd --- a/mk_mx28_sd        2010-10-06 09:47:42.000000000 -0500 +++ b/mk_mx28_sd        2012-11-30 13:38:34.508199154 -0600 @@ -178,7 +178,7 @@ n p 1 -1 +2048 +32M t b EOF $ patch -p1 < first_partition_sector.patch then, you can run the mk_mx28_sd command again with the device as parameter                $ cd $LIB $ export PATH=$PATH:$SDK/L2.6.35_10.12.01_SDK_scripts $ mk_mx28_sd /dev/$SDX
記事全体を表示
Even though the Advanced Tool Kit is not a supported tool anymore, it can be used to provision the code and blow fuses of an i.MX device during manufacturing. This is true when the secure boot has been enabled, which means that the code downloaded by the ATK to the target must be signed, as it will be authenticated prior to its execution. Once in secure mode, the Serial Download boot mode (SDP) can only access a restricted range of addresses, which is documented in the DCD section of the reference manual. An attempt to write outside this allowed area will result in an error, and will make the ROM restart the SDP by considering this as an attack. To automatically detect the mode (engineering or secure/production) of the chip, the ATK writes data to a memory location, and by retrieving the response it knows the configuration. The response can be one of two values: 0x56787856 means that the chip is in engineering mode. 0x12343412 means that the chip is in production/secure mode. It should be known that there is a bug that prevents a secure chip from being handled correctly. For instance, to perform the automatic detection mentioned above, the tool writes to 0xFFFF_FFFF for the i.MX25 or even i.MX35. This address is invalid by being outside the allowed address range, so the ROM code aborts the current session, and restarts a new one. The attached DLL library fixes this issue by writing to an appropriate area like the free iRAM space. This will allow use of the ATK for a chip whose secure boot is enabled.
記事全体を表示
Download ATK from Freescale Extract ATK: # unzip ATK_1_41_STD_installer.zip Get the wine-tricks script and install MFC-4.2 and VisualC++-6.0. ./winetricks  vcrun6sp6 Execute the default install process: # wine SETUP.EXE Edit the file /etc/udev/rules.d/50-udev-default.rules to set permission for everyone: KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp", MODE="0666" Run ATK: # wine ADSToolkit_std.exe
記事全体を表示
Installing OpenOCD and GDB i.MX27 This tutorial was tested on i.MX27ADS REV. 2.6 and may not work on other board revision. Step 0: Installing the FTDI library The libFTDI is necessary when using JTAG based on FT2232 or others FTDI chips. LibFTDI need libusb, then install it first: $ sudo apt-get install libusb-dev Download libftdi from http://www.intra2net.com/en/developer/libftdi: $ wget http://www.intra2net.com/en/developer/libftdi/download/libftdi-0.18.tar.gz Now decompress and install it: $ tar zxvf libftdi-0.18.tar.gz $ ./configure $ make $ sudo make install Step 1: Compiling OpenOCD To compile OpenOCD you need to have GCC, Autoconf and automake installed. Get the OpenOCD source code (we are using rev. 1083): svn checkout http://svn.berlios.de/svnroot/repos/openocd/trunk openocd --revision 1399 Create the configure file and Makefile.in: $ ./bootstrap Run configure: $ ./configure --enable-ft2232_libftdi Compile: $ make Install it: $ sudo make install Step 2: Initializing OpenOCD Connect your JTAG interface on computer and i.MX27ADS board. Run OpenOCD passing as parameter the processor config and JTAG interface config: $ sudo openocd -f interface/myinterface.cfg -f board/imx27ads.cfg Replace myinterface.cfg by jtag interface you are using. In our case we are using Signalyzer Jtag Interface: $ sudo openocd -f interface/signalyzer.cfg -f board/imx27ads.cfg Note: We need to add "jtag_speed 5" on signalyzer.cfg in order to it works on i.MX27ADS. You will see this init message: # openocd -f interface/signalyzer.cfg -f board/imx27ads.cfg Open On-Chip Debugger 1.0 (2009-03-06-08:47) svn:1399 BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS $URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $ jtag_speed: 5 dcc downloads are enabled Info : JTAG tap: imx27.bs tap/device found: 0x1b900f0f (Manufacturer: 0x787, Part: 0xb900, Version: 0x1) Info : JTAG Tap/device matched Info : JTAG tap: imx27.cpu tap/device found: 0x07926121 (Manufacturer: 0x090, Part: 0x7926, Version: 0x0) Info : JTAG Tap/device matched Warn : no telnet port specified, using default port 4444 Warn : no gdb port specified, using default port 3333 Warn : no tcl port specified, using default port 6666 Step 3: Creating an ARM GDB tool If you already have an arm-elf-gdb then skip this step, otherwise go on. To create an arm GDB enter on LTIB -> Package List and select this: [*] gdb [ ]   gdb to run natively on the target [*]   cross gdb (runs on build machine) It will create the ARM GDB file at ~/ltib-dir/bin/gdb $ cd /home/alan/ltib-imx27ads-20071219/bin Copy this gdb binary to /usr/bin renaming it to arm-elf-gdb: $ sudo cp gdb /usr/bin/arm-elf-gdb Step 4: Debugging an application You can test the ledtest application to i.MX27ADS supplied by OpenOCD: Enter in ledtest directory: $ cd openocd/testing/examples/ledtest-imx27ads Run arm-elf-gdb passing as argument the gdbinit_imx27ads file: $ arm-elf-gdb --command=gdbinit-imx27ads You will see this gdb message: $ arm-elf-gdb --command=gdbinit_imx27ads GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB.  Type "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-linux". Setting up for the Freescale iMX27 ADS Board. The target endianness is set automatically (currently little endian) The target may not be able to correctly handle a memory-write-packet-size of 1024 bytes. Change the packet size? (y or n) [answered Y; input not from terminal] 0xc0000260 in ?? () JTAG device found: 0x1b900f0f (Manufacturer: 0x787, Part: 0xb900, Version: 0x1) JTAG device found: 0x07926121 (Manufacturer: 0x090, Part: 0x7926, Version: 0x0) target state: halted target halted in ARM state due to debug-request, current mode: Supervisor cpsr: 0x200000d3 pc: 0xc0000264 MMU: disabled, D-Cache: disabled, I-Cache: disabled Loading section .text, size 0x13c lma 0xa0000000 Start address 0xa0000000, load size 316 Transfer rate: 45963 bits/sec, 316 bytes/write. Warning: the current language does not match this frame. Breakpoint 1 at 0xa000008c: file test.c, line 12.  Breakpoint 1, main () at test.c:12 12                    volatile unsigned char *ledoff = ((volatile unsigned char *)0xD4000008); (arm-gdb) Now issue continue (or just c) command and you will see D30 LED blinking! (arm-gdb) c Continuing. You can repeat this test and issue next (or just n) to debugging line by line then you can see the LED turning on and off. Using step (or just s) is not a good option because it will spend much time on for loop.
記事全体を表示
[中文翻译版] 见附件   原文链接: Guide to flash an eMMC from SD Card on i.MX6Q SABRE-SD 
記事全体を表示