01 Nov, 2019

1 commit


17 Jan, 2019

1 commit

  • Add new u-boot command "imx_tamper" to configure and check the tamper pins.
    The codes are used for reference and test. So command is disabled at default,
    user can enable it by adding CONFIG_IMX_TAMPER=y to defconfig

    The iMX7D has 10 tamper pins those can be used for SNVS tamper detection.

    Tamper 9 pin is NVCC_DRAM power switch for LPSR by default.
    It must be fused to tamper function by command
    => fuse prog -y 1 3 0x80000000
    Otherwise, SNVS power consumption would be high

    When tamper is detected, CPU can't enter/stay in SNVS mode,
    the tamper must be cleared and disabled before enter SNVS.

    Signed-off-by: Ye Li
    Signed-off-by: Shaojun Wang
    Acked-by: Peng Fan

    Ye Li
     

06 Dec, 2018

1 commit

  • Because the ROM info on iMX7D does not set device type to USB when booting
    from serial download mode, we have to use the mechanism on mx6 to implement
    the is_boot_from_usb. The original implementation is checking USB controller
    register, it can't work correctly after any USB functionality is run in u-boot.

    Signed-off-by: Ye Li

    Ye Li
     

12 Nov, 2018

1 commit

  • Add support for fastboot variable 'at-vboot-state', it's composed
    by 6 sub-variable: 'bootloader-locked', 'bootloader-min-versions',
    'avb-perm-attr-set', 'avb-locked', 'avb-unlock-disabled' and
    'avb-min-versions'.

    Test: All 'at-vboot-state' variables are returned
    correctly on imx7d_pico and AIY.

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

    Ji Luo
     

23 Aug, 2018

1 commit


17 Jul, 2018

1 commit


13 Jun, 2018

4 commits


31 May, 2018

2 commits


27 Apr, 2018

2 commits

  • According to the Cortex-A7 TRM, for ACTLR.SMP bit "You must ensure this bit
    is set to 1 before the caches and MMU are enabled, or any cache and TLB
    maintenance operations are performed".
    ROM sets this bit in normal boot flow, but when in serial download mode, it is not set.
    Here we add it in u-boot as a common flow for all i.MX cortex-a7 platforms,
    including mx7d, mx6ul/ull and mx7ulp.

    Signed-off-by: Ye Li
    (cherry picked from commit 14990af03450f3e1898135c86fd8b93328007617)
    (cherry picked from commit 79e968112ebeeb4c656263a434f6fbffc8f533d9)

    Ye Li
     
  • This EPDC/EPXP QoS setting is needed for EPDC stress test to pass.

    Signed-off-by: Robby Cai
    Signed-off-by: Peng Fan
    (cherry picked from commit 1b32518d1c27f05eb84a4cb93594710354b2e343)
    (cherry picked from commit 8fd2dbe9097b09715f84e1c0c17dcd6a6351fb35)

    Peng Fan
     

04 Feb, 2018

8 commits

  • This patch adds a sec_init call into arch_misc_init(). Doing so in
    conjunction with the patch "drivers/crypto/fsl: assign job-rings to
    non-TrustZone" enables use of the CAAM in Linux when OPTEE/TrustZone is
    active.

    u-boot will initialise the RNG and assign ownership of the job-ring
    registers to a non-TrustZone context. With recent changes by Lukas Auer to
    fully initialize the RNG in sec_init() this means that u-boot will hand-off
    the CAAM in a state that Linux then can use the CAAM without touching the
    reserved DECO registers.

    This change is safe both for the OPTEE/TrustZone boot path and the regular
    non-OPTEE/TrustZone boot path.

    Signed-off-by: Bryan O'Donoghue
    Cc: Fabio Estevam
    Cc: Peng Fan
    Cc: Marco Franchi
    Cc: Vanessa Maegima
    Cc: Stefano Babic
    Cc: Lukas Auer
    Tested-by: Lukas Auer
    Reviewed-by: Fabio Estevam

    Bryan O'Donoghue
     
  • The mx7 mmc env code is shared by i.MX8M, so move it to mmc_env.c.

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Move get_boot_device to cpu.c to prepare adding i.MX8M support,
    because i.MX8M share same code with i.MX7.

    Signed-off-by: Peng Fan
    Cc: Stefano Babic
    Cc: Fabio Estevam
    Reviewed-by: Stefano Babic

    Peng Fan
     
  • Move i.MX6/7 bootaux code to imx_bootaux.c.
    The i.MX6/7 has different src layout, so define M4 reg offset
    to ease the cleanup. Redefine the M4 related BIT for share
    common code.

    Signed-off-by: Peng Fan
    Cc: Stefano Babic
    Cc: Fabio Estevam

    Peng Fan
     
  • Move imx_get_mac_from_fuse to a new mac.c for i.MX6/7.
    Since fuse regs structure are different for i.MX6/7, use mac
    address offset in code and define a new local struture
    imx_mac_fuse.

    Also sort the config order.

    Signed-off-by: Peng Fan
    Cc: Stefano Babic
    Cc: Fabio Estevam
    Reviewed-by: Stefano Babic

    Peng Fan
     
  • The i.MX7 cpu speed/temp code could be reused on i.MX8M,
    so move them to common cpu code.

    Signed-off-by: Peng Fan
    Cc: Stefano Babic
    Cc: Fabio Estevam
    Reviewed-by: Stefano Babic

    Peng Fan
     
  • Add i.MX7 PSCI system power off support, linux
    kernel can use "poweroff" command to power off
    system via SNVS, PMIC power will be disabled.

    Signed-off-by: Anson Huang

    Anson Huang
     
  • Add i.MX7 PSCI system reset support, linux
    kernel can use "reboot" command to reset
    system even wdog driver is disabled in kernel.

    Signed-off-by: Anson Huang

    Anson Huang
     

12 Jan, 2018

1 commit

  • The "clocks" and "bootaux" commands are only usable in full U-Boot, not
    SPL, so do not link them inside of SPL. Rework a little of the bootaux
    related code to make use of __weak and declare parts of it static as
    it's local to the file.

    Cc: Stefano Babic
    Cc: Fabio Estevam
    Signed-off-by: Tom Rini
    Reviewed-by: Fabio Estevam

    Tom Rini
     

09 Jan, 2018

1 commit


29 Dec, 2017

1 commit

  • Currently CONFIG_SECURE_BOOT is selecting FSL_CAAM for all i.MX devices,
    this causes the following error when building mx6sl boards since
    this SoC doesn't have the CAAM block:

    In file included from drivers/crypto/fsl/jobdesc.c:12:0:
    drivers/crypto/fsl/jobdesc.c: In function 'inline_cnstr_jobdesc_blob_dek':
    include/fsl_sec.h:268:25: error: 'CAAM_ARB_BASE_ADDR' undeclared (first use
    in this function)
    #define SEC_MEM_PAGE1 (CAAM_ARB_BASE_ADDR + 0x1000)
    ^
    drivers/crypto/fsl/jobdesc.c:140:21: note: in expansion of macro 'SEC_MEM_PAGE1'
    memcpy((uint32_t *)SEC_MEM_PAGE1, (uint32_t *)plain_txt, in_sz);
    ^
    include/fsl_sec.h:268:25: note: each undeclared identifier is reported only
    once for each function it appears in
    #define SEC_MEM_PAGE1 (CAAM_ARB_BASE_ADDR + 0x1000)
    ^
    drivers/crypto/fsl/jobdesc.c:140:21: note: in expansion of macro 'SEC_MEM_PAGE1'
    memcpy((uint32_t *)SEC_MEM_PAGE1, (uint32_t *)plain_txt, in_sz);
    ^
    scripts/Makefile.build:280: recipe for target 'drivers/crypto/fsl/jobdesc.o'
    failed
    make[3]: *** [drivers/crypto/fsl/jobdesc.o] Error 1
    scripts/Makefile.build:425: recipe for target 'drivers/crypto/fsl' failed
    make[2]: *** [drivers/crypto/fsl] Error 2
    scripts/Makefile.build:425: recipe for target 'drivers/crypto' failed
    make[1]: *** [drivers/crypto] Error 2

    Add HAS_CAAM configuration to avoid this error.

    Signed-off-by: Breno Lima
    Reviewed-by: Fabio Estevam

    Breno Lima
     

27 Nov, 2017

1 commit

  • imx_set_wdog_powerdown() is always used to disable the power down
    enable bit, so remove the boolean parameter of the function.

    It is also a bit strange to write a boolean value into registers,
    so this new version makes explicit that we are writing 0.

    While at it, rename it to imx_wdog_disable_powerdown().

    Signed-off-by: Fabio Estevam

    Fabio Estevam
     

12 Oct, 2017

2 commits


18 Sep, 2017

1 commit


23 Aug, 2017

1 commit


17 Aug, 2017

1 commit


16 Aug, 2017

3 commits

  • We are now using an env_ prefix for environment functions. Rename setenv()
    for consistency. Also add function comments in common.h.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     
  • Fix build warning when CONFIG_IMX_RDC not defined in defconfig.

    Signed-off-by: Peng Fan
    Cc: Stefano Babic
    Cc: Fabio Estevam

    Peng Fan
     
  • At present we support multiple environment drivers but there is not way to
    select between them at run time. Also settings related to the position and
    size of the environment area are global (i.e. apply to all locations).

    Until these limitations are removed we cannot really support more than one
    environment location. Adjust the location to be a choice so that only one
    can be selected. By default the environment is 'nowhere', meaning that the
    environment exists only in memory and cannot be saved.

    Also expand the help for the 'nowhere' option and move it to the top since
    it is the default.

    Signed-off-by: Simon Glass
    [trini: Move all of the imply logic to default X if Y so it works again]
    Signed-off-by: Tom Rini

    Simon Glass
     

26 Jul, 2017

1 commit

  • This converts the following to Kconfig:
    CONFIG_ENV_IS_IN_MMC
    CONFIG_ENV_IS_IN_NAND
    CONFIG_ENV_IS_IN_UBI
    CONFIG_ENV_IS_NOWHERE

    In fact this already exists for sunxi as a 'choice' config. However not
    all the choices are available in Kconfig yet so we cannot use that. It
    would lead to more than one option being set.

    In addition, one purpose of this series is to allow the environment to be
    stored in more than one place. So the existing choice is converted to a
    normal config allowing each option to be set independently.

    There are not many opportunities for Kconfig updates to reduce the size of
    this patch. This was tested with

    ./tools/moveconfig.py -i CONFIG_ENV_IS_IN_MMC

    And then manual updates. This is because for CHAIN_OF_TRUST boards they
    can only have ENV_IS_NOWHERE set, so we enforce that via Kconfig logic
    now.

    Signed-off-by: Simon Glass
    Signed-off-by: Tom Rini

    Simon Glass
     

12 Jul, 2017

1 commit

  • Change is consistent with other SOCs and it is in preparation
    for adding SOMs. SOC's related files are moved from cpu/ to
    mach-imx/.

    This change is also coherent with the structure in kernel.

    Signed-off-by: Stefano Babic

    CC: Fabio Estevam
    CC: Akshay Bhat
    CC: Ken Lin
    CC: Marek Vasut
    CC: Heiko Schocher
    CC: "Sébastien Szymanski"
    CC: Christian Gmeiner
    CC: Stefan Roese
    CC: Patrick Bruenn
    CC: Troy Kisky
    CC: Nikita Kiryanov
    CC: Otavio Salvador
    CC: "Eric Bénard"
    CC: Jagan Teki
    CC: Ye Li
    CC: Peng Fan
    CC: Adrian Alonso
    CC: Alison Wang
    CC: Tim Harvey
    CC: Martin Donnelly
    CC: Marcin Niestroj
    CC: Lukasz Majewski
    CC: Adam Ford
    CC: "Albert ARIBAUD (3ADEV)"
    CC: Boris Brezillon
    CC: Soeren Moch
    CC: Richard Hu
    CC: Wig Cheng
    CC: Vanessa Maegima
    CC: Max Krummenacher
    CC: Stefan Agner
    CC: Markus Niebel
    CC: Breno Lima
    CC: Francesco Montefoschi
    CC: Jaehoon Chung
    CC: Scott Wood
    CC: Joe Hershberger
    CC: Anatolij Gustschin
    CC: Simon Glass
    CC: "Andrew F. Davis"
    CC: "Łukasz Majewski"
    CC: Patrice Chotard
    CC: Nobuhiro Iwamatsu
    CC: Hans de Goede
    CC: Masahiro Yamada
    CC: Stephen Warren
    CC: Andre Przywara
    CC: "Álvaro Fernández Rojas"
    CC: York Sun
    CC: Xiaoliang Yang
    CC: Chen-Yu Tsai
    CC: George McCollister
    CC: Sven Ebenfeld
    CC: Filip Brozovic
    CC: Petr Kulhavy
    CC: Eric Nelson
    CC: Bai Ping
    CC: Anson Huang
    CC: Sanchayan Maity
    CC: Lokesh Vutla
    CC: Patrick Delaunay
    CC: Gary Bisson
    CC: Alexander Graf
    CC: u-boot@lists.denx.de
    Reviewed-by: Fabio Estevam
    Reviewed-by: Christian Gmeiner

    Stefano Babic