28 Oct, 2019

1 commit


25 Oct, 2019

1 commit


24 Oct, 2019

2 commits

  • Since commit c98b47f1ff60 ("MLK-22749 imx8mq: Add workaround to fix sticky
    bits lock up") it's not possible to build i.MX8MM and i.MX8MN targets with
    CONFIG_SECURE_BOOT enabled:

    CC cmd/version.o
    arch/arm/mach-imx/imx8m/soc.c:326:23: error: ‘CONFIG_IMX_UNIQUE_ID’ undeclared \
    (first use in this function); did you mean ‘CONFIG_IMX_VIDEO_SKIP’?
    if (!is_uid_matched(CONFIG_IMX_UNIQUE_ID))
    ^~~~~~~~~~~~~~~~~~~~

    The OCOTP sticky bit workaround is only needed for i.MX8MQ devices, other devices
    should not build the secure_lockup() function.

    Add CONFIG_IMX8MQ to the conditional compilation to avoid such issue.

    Fixes: c98b47f1ff60 ("MLK-22749 imx8mq: Add workaround to fix sticky bits lock up")
    Signed-off-by: Breno Lima
    Reviewed-by: Ye Li
    (cherry picked from commit be033bff3c718e8bd7d4ac5ecfe4361892fc6e61)

    Breno Lima
     
  • add the missing bch register debug0

    Signed-off-by: Han Xu
    (cherry picked from commit 0883946855f7e1eabe26787fbc8529ac412047e7)

    Han Xu
     

15 Oct, 2019

4 commits


12 Oct, 2019

1 commit

  • Currently is not possible to use dek_blob command in
    mx8mq:

    u-boot=> dek_blob 0x40400000 0x40401000 128
    Cannot get OP-TEE device

    Add OP-TEE Device Tree Bindings to fix this issue.

    Reviewed-by: Ye Li
    Signed-off-by: Clement Faure
    Signed-off-by: Breno Lima
    (cherry picked from commit f762fe218ec60025e2dfd6173efaa826286ba297)

    Clement Faure
     

11 Oct, 2019

5 commits

  • Current flexspi driver enables the Quad DTR read, so the measured
    100Mhz SCLK is actually for DTR mode not SDR. However, according to
    MT25QU256ABA datasheet, this flash only supports max DTR at 90Mhz and
    max SDR at 166Mhz. It means current clock setting violate the flash
    spec. So change back the flexspi clock to align with imx8mm.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit 3bf41bae974003550b70ea1a8b44ccb3117d818f)
    (cherry picked from commit 4a369b527c3842751a4edf0171562a0e40c331ba)

    Ye Li
     
  • On B1 chips with HAB v4.4, the sticky bits are not locked up in
    HAB closed mode. We introduce a workaround in SPL to lock up
    these bits and clear Manufacturing Protection Private Key for
    secure boot.

    For field return case, user has to build a SPL with
    CONFIG_SECURE_STICKY_BITS_LOCKUP=n and set CONFIG_IMX_UNIQUE_ID to
    part's unique id. When the UID check is passed, sticky bits are not
    lockup and users can burn field return fuse. Otherwise the boot will
    stop.

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

    Ye Li
     
  • Add REVC informaiton.

    Signed-off-by: Frank Li
    (cherry picked from commit c7231f2c7a5c1dc754b5fb9bf05941141877a0ec)
    (cherry picked from commit 9a33170a4f4ff2ad2ab0d87e74e722a0e833abaa)

    Frank Li
     
  • bchtype in FCB should be associated to the gf_13/14 settings in BCH, fix
    the issue and test on Micron 29F64G08CBABB, it can boot after the
    change.

    Signed-off-by: Han Xu
    (cherry picked from commit 9cc7bf9b17565b4e0d73acd690e32394034dfae2)

    Han Xu
     
  • gf_13/14 mask was not set correctly in register definition.

    Signed-off-by: Han Xu
    (cherry picked from commit b8aed98b2ecfb0def64c474e1ae171930da4c9fc)

    Han Xu
     

29 Sep, 2019

6 commits

  • ROM SError happens on two cases:

    1. ERR050342, on iMX8MQ HDCP enabled parts ROM writes to GPV1 register, but
    when ROM patch lock is fused, this write will cause SError.

    2. ERR050350, on iMX8MQ/MM/MN, when the field return fuse is burned, HAB
    is field return mode, but the last 4K of ROM is still protected and cause SError.

    Since ROM mask SError until ATF unmask it, so then ATF always meets the exception.
    This patch works around the issue in SPL by enabling SPL Exception vectors table
    and the SError exception, take the exception to eret immediately to clear the SError.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit f05dd45251ca82cc54e13a616f00744c26faab53)
    (cherry picked from commit 25d059411e702a4002f1aa157839001f796dd9f6)

    Ye Li
     
  • Sometimes we met SERROR, but only to catch it when Linux boots up.
    Let's enable catching in U-Boot to catch it ealier and ease debug.

    Signed-off-by: Peng Fan
    (cherry picked from commit 7a0c9b08886e5dc7d50e640ed56eed0fe612161f)
    (cherry picked from commit 33da22c4793e56077033a4f6c567894badb8e907)
    (cherry picked from commit 4da3e872b7c61b93fa227935a7b45eb5fcb252e1)

    Peng Fan
     
  • Add subcommand for add writing BCB only, where we provide appropriate
    offsets for firmware1 and firmware2 and size.

    Example of usage:
    > nandbcb bcbonly 0x00180000 0x00080000 0x00200000
    Writing 1024 bytes to 0x0: randomizing
    OK
    Writing 1024 bytes to 0x20000: randomizing
    OK

    Signed-off-by: Igor Opaniuk
    (cherry picked from commit 353a38576ed6f21431bf499a4b402a5ca571f0fa)

    Igor Opaniuk
     
  • Move code for writing FCB/DBBT pages to a separate function

    Signed-off-by: Igor Opaniuk
    (cherry picked from commit c4e8b725681c9e7d18845260ac1061aedb9166a4)

    Igor Opaniuk
     
  • Add support for updating FCB/DBBT on i.MX7:
    - additional new fields in FCB structure
    - Leverage hardware BCH/randomizer for writing FCB

    Signed-off-by: Igor Opaniuk

    Signed-off-by: Alice Guo
    (cherry picked from commit b4b3049b1e4a069e522a1112bf4f9e0253836b2d)

    Igor Opaniuk
     
  • Extend GPMI Integrated ECC Control Register Description, include
    additional defines for enabling randomizer function and providing
    proper randomizer type.

    For additional details check i.MX7 APR, section
    9.6.6.3 GPMI Integrated ECC Control Register Description
    (GPMI_ECCCTRLn)

    Signed-off-by: Igor Opaniuk
    (cherry picked from commit 212ab2205175b9be726ef6c00f523391882a7824)

    Igor Opaniuk
     

23 Sep, 2019

1 commit

  • Update the mx7ulp wdog disable sequence to avoid potential reset issue
    in unlock or refresh sequence. Both sequence need two words write
    to wdog CNT register in 16 bus clocks window, if miss the window,
    the write will cause violation in wdog and reset the chip.

    Current u-boot code is using writel() function which has a DMB barrier
    to order the memory access. The DMB between two words write may introduce
    some delay in certain circumstance, causing the wdog reset due to 16 bus
    clock window requirement.

    This patch replaces writel() function by __raw_writel() to avoid such issue,
    and improve to check if watchdog is already disabled or unlocked.

    Signed-off-by: Ye Li
    Tested-by: Breno Lima
    Reviewed-by: Peng Fan
    (cherry picked from commit b8c99d5f5bcc5573d3394b68890db16b6bb5fc88)

    Ye Li
     

11 Sep, 2019

2 commits

  • When enable u-boot splash screen and set kernel dtb with -hdmi.dtb on
    imx8qm, the kernel reboot (partition reboot) will hang in u-boot if HDMI
    cable is plugged in.
    The root cause is kernel set the clock source of DC0 display0 channel to
    bypass clock, when doing reboot this clock setting may not be cleared. So
    u-boot has wrong clock source and cause lpcg stop bit always set.

    Fix the issue by adding the clock parent setting and not depend on default
    parent value.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit 104c4b5cdc83fb671c6474708bdd00c2dfb01113)
    (cherry picked from commit 8a287c629018e6bf647c3c617fca3e6c94a3d2a4)

    Ye Li
     
  • Have missed the lpcg settings when porting to 2019.04 u-boot

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit 4096d7806a0dcc501123c8c2cdf734620e37d169)

    Ye Li
     

30 Aug, 2019

2 commits


12 Aug, 2019

1 commit


09 Aug, 2019

6 commits


07 Aug, 2019

1 commit


06 Aug, 2019

1 commit


01 Aug, 2019

1 commit

  • We may need to enable the dual bootloader feature on non-trusty
    platforms, skip the bootloader rollback index check in spl if
    trusty is not enabled.

    Don't generate rpmb key in spl, it should be generated in u-boot
    proper with u-boot commands.

    Test: dual bootloader on imx8mm.

    Change-Id: Iac454e0140cd6f4472a66d267d9ba0d40df7102c
    Signed-off-by: Ji Luo

    Ji Luo
     

31 Jul, 2019

3 commits

  • The iMX8DXL phantom chip is 15x15 iMX8QXP, so we will use 8QXP as SOC,
    add configs and codes for the new board.

    Signed-off-by: Ye Li

    Ye Li
     
  • Since one dts node can only bind to one DM driver in uboot, for usbotg
    node, we can not use it for both DM usb host driver and DM usb gadget
    driver. So a new usb gadget node is added to each usbotg node, the
    original usbotg node is bind to usb host driver as default, and the
    new usb gadget node is bind to usb gadet driver as default.

    Signed-off-by: Sherry Sun
    Reviewed-by: Ye Li

    Sherry Sun
     
  • Convert the ci_udc driver to driver model by using the uclass
    UCLASS_USB_GADGET_GENERIC. The clk and power of USB controller and USB
    PHY both are initialized by parsing the device tree nodes.

    If CONFIG_DM_USB_GADGET is defined, we use the ci_udc driver in DM way,
    if it does not defined, we can use ci_udc driver in its original Non-DM
    way.

    Move some USB PHY register definitions from ehci-mx6.c to
    asm/mach-imx/regs-usbphy.h in order to share with DM usb gadget driver.

    Signed-off-by: Sherry Sun
    Reviewed-by: Ye Li

    Sherry Sun
     

30 Jul, 2019

1 commit

  • There is an divider on imx8mn will always divide 2 to flexspi root clock.
    So actual SCLK output to device is 50Mhz on imx8mn not 100Mhz.

    After changing the root clock setting to configure SCLK to 100Mhz, found
    the read data is not correct. Must enable the internal DQS pad loopback
    to fix the problem.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit 9ff3ae4f9ebbb81bd42d81729cec4525c6e9b33e)

    Ye Li
     

26 Jul, 2019

1 commit

  • Because u-boot does not support syscon_regmap_lookup_by_compatible,
    we have to add a gpr phandle property to point to iomuxc gpr node.
    and uses syscon_regmap_lookup_by_phandle to get gpr node in driver.

    This is common implementation in other nodes and better than
    by_compatible interface.

    Signed-off-by: Ye Li

    Ye Li