Note: Kontron SMARC-sAMX6i

from https://lists.yoctoproject.org/pipermail/meta-freescale/2014-December/011841.html download device tree files

The board always boot from ECSPI4, use W25Q16DW (16MBits/2MBytes)
ECSPI4 memory space layout

Partition 0, from 0 ~ 0xbffff (768KB), for bootloader
Partition 1, from 0xc0000 ~ 0xcffff (64KB), for U-Boot Environment use 32KB
Partition 2, others space, for user

LCD Brightness control through the below pins

MX6QDL_PAD_SD1_DAT0__GPIO1_IO16, Backlight Enabled
MX6QDL_PAD_SD1_DAT1__GPIO1_IO17, LCD Power Enabled
MX6QDL_PAD_SD1_CMD__PWM4_OUT, Brightness PWM ouput

I2C ports

I2C1, for SMARC General Purpose

MX6QDL_PAD_CSI0_DAT8__I2C1_SDA
MX6QDL_PAD_CSI0_DAT9__I2C1_SCL

I2C2, for HDMI

MX6QDL_PAD_KEY_COL3__I2C2_SCL
MX6QDL_PAD_KEY_ROW3__I2C2_SDA

I2C3, for Power Managmenet
I2C-GPIO0, for System management (PMIC:PFUZE100 on the bus)

MX6QDL_PAD_ENET_TXD0__GPIO1_IO30, SCL   MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28, SDA

I2C-GPIO1, for SMARC CAMERA

MX6QDL_PAD_GPIO_6__GPIO1_IO06, SCL
MX6QDL_PAD_KEY_COL2__GPIO4_IO10, SDA

I2C-GPIO2, for SMARC LCD

MX6QDL_PAD_SD1_DAT2__GPIO1_IO19, SCL
MX6QDL_PAD_SD1_DAT3__GPIO1_IO21, SDA

 

 

廣告

Note: U-Boot update read from SD card then write into SPI Flash

這兩天拿到一張 IMX 的 SMARC 版子,想要弄Android 但是只有Freescale 的codebase ,所以從u-boot 開始搞起。

接上 console 後,測試版上的u-boot 發現需要更新到新版本,研究一下u-boot 現在可以自我更新,嘗試了一下發現按照下面的command 順序即可

  1. mmc dev 1  # 切換mmc 到那一個slot
  2. mmcinfo   # 可以確認是否有認到sdcard
  3. fatload mmc 1 0x10800400 u-boot.bin # 讀SD card 上的u-boot.bin 到DRAM中, 讀完會有檔案大小
  4. sf probe
  5. sf erase 0 0x200000 # erase all
  6. sf write 0x10800000  0 0x58000 # 0x58000 是檔案大小 + 1024(0x400), 注意第三步已經偏移了 0x400, 這是IMX6的需求
  7. reset

Note: Freescale 3.14.28-1.0.1 release kernel & u-boot

一開始的工作應該是改這兩個kernel & u-boot東西 還要看一下怎樣做才正確

Bitbake 的 Recipes

  • ./yocto_3.14.28-1.0.1/sources/meta-fsl-bsp-release/imx/meta-fsl-arm/recipes-bsp/u-boot/u-boot-imx_2014.04.bb
  • ./yocto_3.14.28-1.0.1/sources/meta-fsl-bsp-release/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.14.28.bb

透過 Recipes 會把Source code 解壓縮或是透過git clone/pull 的方式弄到下面對應的build folder 裡面去,主要看 Recipes 的寫法

  • ./yocto_3.14.28-1.01/build/tmp/work/imx6dlsabresd-poky-linux-gnueabi/u-boot-imx/2014.04-r0/git
  • ./yocto_3.14.28-1.01/build/tmp/work/imx6dlsabresd-poky-linux-gnueabi/linux-imx/3.14.28-r0/git