24 May, 2019

40 commits

  • Add defconfigs for iMX6SX 19x19 DDR3/LPDDR2 ARM2 boards to support
    SD boot, NAND boot, QSPI boot, SPINOR boot, EIMNOR boot and plugin.

    Signed-off-by: Ye Li
    (cherry picked from commit b6ddcff28891ea60ace1319992f7b4711b1095c0)
    (cherry picked from commit 76669ca5a39d9bd3ecddb34611b13f8556190c63)

    Ye Li
     
  • Porting the 19x19 ARM2 board codes from v2017.03, support DDR3 board
    and LPDDR2 board.

    Signed-off-by: Ye Li
    (cherry picked from commit 5ca84daa1dca4a7f5d80c05f006932857ffcc60c)
    (cherry picked from commit a475773fee36343b0fe1fb0b4279364adc38ffcf)

    Ye Li
     
  • Add DTS files to support iMX6SX 19x19 ARM2. Due to pin conflicts,
    need specified DTS for NAND/EIMNOR enabled.

    Signed-off-by: Ye Li
    (cherry picked from commit acac1789301ba4570b676c35cd08a281a365cbe2)
    (cherry picked from commit 56f89c74f65307298cd4c2777fd9ecaa0c921361)

    Ye Li
     
  • Add defconfigs for iMX6SX 14x14 ARM2 boards to support SD boot,
    NAND boot, plugin.

    Signed-off-by: Ye Li
    (cherry picked from commit 7ffcc49d2fe023328f6b4f9c1a6e1fa64267ff49)
    (cherry picked from commit b43bb3fbd4bc968e886bdfa57b51c41ad4da0ba6)

    Ye Li
     
  • To support various boot devices on iMX6SX 17x17 ARM2, add the
    relevant defconfigs.

    Signed-off-by: Ye Li
    (cherry picked from commit e5c717176588449def0efcf2540d37a3d9d65094)
    (cherry picked from commit 5c9a35a9507e1df7b571ff4463555032ba823284)

    Ye Li
     
  • Porting the 17x17 ARM2 and 14x14 ARM2 board codes from v2017.03. The
    14x14 ARM2 shares similar board design with 17x17 ARM2, but uses LPDDR2
    memory. So share the codes for them.

    Signed-off-by: Ye Li
    (cherry picked from commit 0ca855a9e2718339692681594cfd225aa54adf56)
    (cherry picked from commit b1ff35f8d90d59964c20f8b98488727be045a8c3)

    Ye Li
     
  • Add DTS file for the iMX6SX 14x14 ARM2 from v2017.03

    Signed-off-by: Ye Li
    (cherry picked from commit 6a09251091354b132280010f8156b83c799d618e)
    (cherry picked from commit b67bfab4a0699dba9ff55393b19277c4c104f832)

    Ye Li
     
  • Add DTS files to support iMX6SX 17x17 ARM2. Due to pin conflicts,
    need specified DTS for SPI nor enabled and NAND/EIMNOR enabled.

    Signed-off-by: Ye Li
    (cherry picked from commit 16e5b9415bab10938b73f42848fdb26eaf50ea02)
    (cherry picked from commit c1cd8ba678bb65a0424b1fe10456ec429d7705a0)

    Ye Li
     
  • Since we enabled MMC alias, the USDHC index in u-boot is the usdhc port.
    So we don't need to convert them for kernel and u-boot env device.

    Signed-off-by: Ye Li
    (cherry picked from commit 8fd6e14f5c1598684bc08a7917f89cd94e988d8f)

    Ye Li
     
  • Adding new config file and uTee file name to enable OP-TEE support
    on imx6ulz EVK.

    Signed-off-by: Silvano di Ninno
    (cherry picked from commit e3c26a7b908a6a3591ab2e619735c44a85e23972)
    Signed-off-by: Ye Li
    (cherry picked from commit 6f6c9a9a838981eb9c6c0dd3558125039250c319)

    Silvano di Ninno
     
  • Since we set the fdt_file value when running on iMX6ULZ. This
    cause the saved fdt_file change be overwritten. So users can't
    set to their own fdt_file.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit 389161ef31bed9dad5a502fb24e445402e1465eb)
    (cherry picked from commit 40ca6115b88597c27df3d4a27c0caa50a5b0a63a)

    Ye Li
     
  • Since the mx6ulz don't have FEC, it needs to use USB2NET dongle
    to connect network. We decouple the CONFIG_FEC_MXC with CONFIG_CMD_NET.
    For 6ull, all defconfigs need to enable the CONFIG_FEC_MXC explicitly.

    Another change is adding ${usb_net_cmd} environment for usb start command
    in netboot scripts on 6ulz.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit 9018cc2ba39d079625c6856347c787bb8642c270)
    (cherry picked from commit 70c014c5b78504e0a1eb8d74687e4ed08cba3d7a)

    Ye Li
     
  • add config for emmc, nand and qspi boot

    Signed-off-by: Robby Cai
    (cherry picked from commit 82d61c0fd30ae6d131b155e2b7840e5a26411ca9)
    (cherry picked from commit e0b4764f6b361d2158b082c4d30aa5c7993e52b8)

    Robby Cai
     
  • Add i.MX6ULZ support. the i.MX6ULZ is SW compatible
    with i.MX6ULL. so most code of i.MX6ULL can be reused
    by i.MX6ULZ.

    Signed-off-by: Bai Ping
    (cherry picked from commit 99a6bc0ccc69e1517316056e23772d7743f3ae1e)
    (cherry picked from commit 7b58ff50dddec98ba6f5acae208eaf9cd99f7a6c)

    Bai Ping
     
  • In optee enabled defconfig, the trust zone is enabled in DCD. On iMX6UL/ULL, there
    is IC limitation that LCDIF master access can only be non-secure, because PL301
    hard code the m_3/4/5 to non-secure masters. It causes LCDIF fails to fetch data
    from memory.

    This patch adds a workaround to change trust zone Region 0 attribute to allow both secure
    and non-secure read/write. So it permits the LCDIF master access to memory.
    Since optee will configure Region 0 by itself, this should not introduce problem to optee.

    Signed-off-by: Ye Li
    (cherry picked from commit 85be73bb5bab319c096f0893729835b3ceddafde)
    (cherry picked from commit a7ab49a0856caea6114b4f9d1f6cddb75c944c33)
    (cherry picked from commit 5a54394012b76adbd7efe2aa2cea8a8dade860c0)

    Ye Li
     
  • When IMX_OPTEE is enabled for secure boot, update bootm to authenticate the optee
    image and the kernel zImage before booting into optee.

    Signed-off-by: Ye Li
    (cherry picked from commit d3bee08f12f1d41c83c47773aec6cfa28056694a)
    (cherry picked from commit 3825c3fedbbe59fdf8c4f59f10221823a5fc6f03)
    (cherry picked from commit a09dca5eff735ef8ef46313de09cfa0f3b4cf189)

    Ye Li
     
  • Add defconfig for tee support;
    Enable the TZASC support;
    Add env config for tee support.

    Signed-off-by: Bai Ping
    Reviewed-by: Peng Fan
    (cherry picked from commit 3535868b89df84d3e6554114f7867f9ef908ff01)
    (cherry picked from commit 82a0b53092cdc0b025749f4d8f1cdfcc66e07db7)
    (cherry picked from commit dc1602c2d7f9d1ff021e46a9187bbcb10f172a71)

    Bai Ping
     
  • Add different defconfig for optee;
    Enable the TZASC support;
    Add env config for tee support.

    Signed-off-by: Bai Ping
    Reviewed-by: Peng Fan
    (cherry picked from commit 1f86ee60e72bb56af69a4128e8234e08c9bb1f59)
    (cherry picked from commit 819b988f3f1a8a207a380b09b4c71374b4b3ae0b)
    (cherry picked from commit 7d816e96f304a2a899efb675fda153ebe84775d2)

    Bai Ping
     
  • Add different defconfigs.
    Enable Trustzone.
    Update env to runtime boot OP-TEE.
    mx7d arm2 board not supported now.

    Signed-off-by: Peng Fan
    (cherry picked from commit 435807b41ae99bb9f4e0b2c7b9e5287c2bd520c0)
    (cherry picked from commit b78124c2f68b9aa4ec2f160d99364bfab72ab5e3)
    (cherry picked from commit 641b195a5633cfc3960a42bbb332dd8fead9f939)

    Peng Fan
     
  • Add different defconfigs.
    Enable Trustzone.
    Update env to runtime boot OP-TEE.

    Signed-off-by: Peng Fan
    (cherry picked from commit af4e26c34e091994615ec721bc357b45e43c89e9)
    (cherry picked from commit cd8397e9c973ac31766adf9565b2af18db9f9606)
    (cherry picked from commit 79e2e2fbe7ddf376619efb43c4b4e6c4285a6f5c)

    Peng Fan
     
  • Add different defconfigs.
    Enable Trustzone.
    Update env to runtime boot OP-TEE.

    Signed-off-by: Peng Fan
    (cherry picked from commit 7c93e616d69f57668fb7e5ac24d8f7fa98dbe1f2)
    (cherry picked from commit eb9063ee64bc30f51a20eec9da0750b0e82f3799)
    (cherry picked from commit 580e0b29ca6501f706af6140357019e7f83692dd)

    Peng Fan
     
  • Add different defconfigs
    Enable Trustzone.
    Update env to runtime boot OP-TEE.
    To 6QP SDB, TZASC enabled, need board rework and new ddr script.

    Signed-off-by: Peng Fan
    (cherry picked from commit 2db3156d89ad13133fb1444186e906a5db178913)
    (cherry picked from commit a1370b6768c0ce71555ac056bca94102e8a7228e)

    Peng Fan
     
  • Add defconfigs.
    Enable Trustzone.
    Update env to runtime boot OP-TEE.
    To 6QP AUTO, TZASC not enabled now.

    Signed-off-by: Peng Fan
    (cherry picked from commit 62277d7e521894b079911fd8e8b26507ff03c018)
    (cherry picked from commit b7be942860a15feb0bd660b1922d4ed9306f1184)
    (cherry picked from commit 56d2100c6b3c483d063ce70ad7ce9d6da378ada6)

    Peng Fan
     
  • Add tee environment variable to fix mfgtool/uuu bootcmd error

    Signed-off-by: Peng Fan
    (cherry picked from commit 2604fd8bdcd0c36d17899b01f370fd4507cea33e)

    Signed-off-by: Ye Li
    (cherry picked from commit e8f86c28bdb867a2d020a02140722661ebbae467)

    Ye Li
     
  • Add IMX_OPTEE Kconfig entry

    Signed-off-by: Peng Fan
    (cherry picked from commit 28b0bcbef4dadd33a273dd18a2274f3c679efb2d)
    (cherry picked from commit bda0f36309e7752bf6c78d71473cc5cf7f8f58c1)
    (cherry picked from commit d3188f62b659dda60128a67f8cdf2920108e004d)

    Peng Fan
     
  • The csf_additional_images.txt example should match with
    mx6_mx7_secure_boot.txt guide.

    Fix addresses provided in csf_additional_images.txt CSF
    example.

    Reviewed-by: Ye Li
    Signed-off-by: Breno Lima
    (cherry picked from commit 17c3af7a1935a40057c01459766d41ff0a19723b)
    (cherry picked from commit 270185b4c78f1139e965587ea2f0f290f9c4348c)

    Breno Lima
     
  • When building 32-bit targets with CONFIG_SECURE_BOOT and DEBUG enabled
    the following warnings are displayed:

    arch/arm/mach-imx/hab.c:840:41: warning: format '%lx' expects argument \
    of type 'long unsigned int', but argument 3 has type 'uint32_t \
    {aka unsigned int}' [-Wformat=]
    printf("HAB check target 0x%08x-0x%08lx fail\n",
    ~~~~^
    %08x
    ddr_start, ddr_start + bytes);

    arch/arm/mach-imx/hab.c:845:45: warning: format '%x' expects argument \
    of type 'unsigned int', but argument 3 has type 'ulong \
    {aka long unsigned int}' [-Wformat=]
    printf("\nivt_offset = 0x%x, ivt addr = 0x%x\n", ivt_offset, ivt_addr);
    ~^
    %lx

    Fix warnings by providing the correct data type.

    Reviewed-by: Ye Li
    Signed-off-by: Breno Lima
    (cherry picked from commit 050beb8ee3fc4c690c9ce7c4f47adfc6f48dccdf)
    (cherry picked from commit e66c03a45b563b53485b8d662d29f2e9a143e433)

    Breno Lima
     
  • When booting in low power or dual boot modes the M4 binary is
    authenticated by the M4 ROM code.

    Add an option in hab_status command so users can retrieve M4 HAB
    failure and warning events.

    => hab_status m4

    Secure boot disabled

    HAB Configuration: 0xf0, HAB State: 0x66
    No HAB Events Found!

    Add command documentation in mx6_mx7_secure_boot.txt guide.

    As HAB M4 API cannot be called from A7 core the code is parsing
    the M4 HAB persistent memory region. The HAB persistent memory
    stores HAB events, public keys and others HAB related information.

    The HAB persistent memory region addresses and sizes can be found
    in AN12263 "HABv4 RVT Guidelines and Recommendations".

    Reviewed-by: Utkarsh Gupta
    Reviewed-by: Ye Li
    Signed-off-by: Breno Lima
    (cherry picked from commit 0efff16579fabcf57acb9c8857afac8fb58de355)
    (cherry picked from commit 4815444f293d8021f8bd62079bd576e88cdef639)

    Breno Lima
     
  • Enable the new mipi panel driver and add parameters to board codes.
    We enable the RM68200_WXGA as default panel, users can set "panel"
    environment variable to switch to different panel.

    Signed-off-by: Ye Li
    Reviewed-by: Fancy Fang
    (cherry picked from commit adb2db588c5b6401d6769b7766a5ed726d669b2b)
    (cherry picked from commit 901947a9c75b602f21f0f7eee65ee80c8c9b02dd)

    Ye Li
     
  • Since LCDIF does not have a dedicated PLL as its source, we have to
    find a best frequency closed to the target frequency. The previous
    method is finding a closed clock with actual frequency higher than target.
    But this causes problem to DSI PHY clock which uses target frequency to
    calculate its clock parameters. When the actaul pixclock is higher,
    it may violates the requirement between DSI PHY clock and LCDIF pixclock clock.
    clk_byte_freq >= dpi_pclk_freq * DPI_pixel_size / ( 8 * (cfg_num_lanes + 1))

    So we'd better selecting a LCDIF clock not exceed the target frequency.

    Signed-off-by: Ye Li
    (cherry picked from commit fcd5fac9eb68c3bfed27c5a613315414f37b5990)
    (cherry picked from commit ce59d991d21eaa929b20a50f168fde6d6bbfaaf4)

    Ye Li
     
  • The previous driver uses a hard coded value which generates the DSI
    PHY clock can fit HX8363 WVGA screen. But when switching to new WXGA
    screen which needs higher pixclock and higher DSI PHY clock, the
    hard coded parameters can't work.
    Change to follow kernel codes to find the best value of CM, CN, CO
    parameters for DSI PHY clock to meet pixclock requirement.

    Signed-off-by: Ye Li
    (cherry picked from commit d84ddab71eda66b22c702c7d358a53a22b9ac662)
    (cherry picked from commit 9fcb1cbae58042e75cd427c9c290a6830a9feff1)

    Ye Li
     
  • mx7ulp EVK B will use two mipi dsi panels, the new panel RM68200_WXGA
    supports WXGA resolution.

    Signed-off-by: Ye Li
    (cherry picked from commit 0d68c30cfa683764b889820c46b0935ee519c72d)
    (cherry picked from commit 5143bd49f3d41a8653ad892fea504ab249b49ca0)

    Ye Li
     
  • Since from B0 TO, there is a Mirror of JTAG ID register added in
    SIM. We can read the part revision from this register.
    Update codes to use this register.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit de14e88698b9ae9b0a9ac674f16d65b3ceb4ccc2)
    (cherry picked from commit 0d0d9acc04972792890776e3c066f05a349bb623)

    Ye Li
     
  • The iMX7ULP B0 chip has added more pins for muxing USB ID. The A3 board
    follows it to exploit PTC13 for USB ID, so we don't need to use GPIO
    any longer. The USB driver can recognize the USB mode from USB PHY.

    After this change, old boards with design using GPIO for USB mode won't
    be supported.

    Signed-off-by: Ye Li
    (cherry picked from commit 706b1a41b73d9604d4a590173f86fb398a908406)
    (cherry picked from commit 8302b13924a1e5c1ed356de6a9ce62198160c307)

    Ye Li
     
  • Align the new pinfunc names with header file for all iMX7ULP EVK DTS files.
    Also update the EVK DTS files to align with kernel for Rev A3
    board. Removed the extcon node for USB ID, since A3 board uses USB ID pin
    not GPIO.

    Signed-off-by: Ye Li
    (cherry picked from commit 4404440535e3ecdb645e68b69f66c475aa56dd05)
    (cherry picked from commit 68abcc89a3ad3853adf78aa13dcb473e7605140b)

    Ye Li
     
  • i.MX7ULP B0 silicon has below updates in iomux

    - GPIO function input buffer enable (IBE)/output buffer enable (OBE) is
    now controlled by RGPIO module. IOMUXC IBE/OBE is used as an override.
    - LPUART2_TX (I/O) to PTB12 (ALT4)
    - LPUART2_RX (I) to PTB13 (ALT4)
    - USB0_ID (I) to PTC13 (ALT11), PTC18 (ALT11) and PTC19 (ALT10)
    - VIU_DE (I) to PTC18 (ALT12), PTC19 (ALT12) and PTE5 (ALT12)
    - RTC_CLKOUT (O) to PTB5 (ALT11) and PTB14 (ALT11)
    - SEC_VIO_B (I) to PTB4 (ALT11)
    - Added new Input Selection Registers
    PSMI1_USB0_ID Address: 0x40ac_0338 To select USB_ID input pad/source
    PSMI1_VIU_DE Address: 0x40ac_033c To select VIU_DE input pad/source

    Copy the imx7ulp-pinfunc.h from latest kernel dts
    (commit 18cdeadfe1967ea33d3bdfc7ccead6d6d06a98a6), and update
    the mx7ulp-pins.h accordingly.

    Signed-off-by: Ye Li
    (cherry picked from commit 5e3da4cf8e217e7efe683bc63114e45927ebb28b)
    (cherry picked from commit 459c2fe202175e7201b4b863eb6d98d15406d923)

    Ye Li
     
  • Specify the default dtb file for kernel boot per i.MX7ULP
    board config.

    Signed-off-by: Shenwei Wang
    Reviewed-by: Frank Li
    Reviewed-by: Ye Li
    (cherry picked from commit 3fba1c1a76cadfe0177e61a85eac3da10ee086e0)
    (cherry picked from commit 013eb1fdfdb33df19a0917fd554160a84ec45dd1)

    Shenwei Wang
     
  • Default address of earlycon parameter is not correct,
    use correct value for imx7ulp_evk.

    Test: imx7ulp_evk boots ok.

    Change-Id: I2cecb6bfacca573013313ba4ae3783784ccfd506
    Signed-off-by: Luo Ji
    (cherry picked from commit 9dce3365b8ea0cbdaed06f0c9b98c98b2f150c5a)
    (cherry picked from commit c727966e6688fd3de199de1b631a8fd57a8c7149)

    Luo Ji
     
  • When TEE is enabled, the high 32MB memory is reserved to TEE. So the
    mtest end address 0x9e000000 will overlay with u-boot runtime text and data.

    Fix the issue by changing the mtest end to half of DDR size.

    Signed-off-by: Ye Li
    (cherry picked from commit 9b56f22639703bd70bfdd1de0cbdcef2b80f0bff)
    (cherry picked from commit e9c1c97f64df33eaded9f78268782a246010928f)
    (cherry picked from commit 87e7df87b7818052a8c915a5eaeb468d22004383)

    Ye Li
     
  • Pull down the DSI_EN gpio to disable mipi dsi panel before booting kernel.
    This avoids display full yellow screen before kernel mipi driver probes
    the device.

    For MIPI2HDMI card, this DSI_EN gpio is not used. So nothing impact to it.

    Signed-off-by: Ye Li
    (cherry picked from commit e73adc9a139f2e8bb92bda1631fa2f2391a8a5e3)
    (cherry picked from commit 7e07aa674bfdd37c6334f3a4b37d166f09d3ef90)

    Ye Li