1. 15 4月, 2018 1 次提交
    • B
      imx: mx7: snvs: Add an SNVS init routine · 723f8359
      Bryan O'Donoghue 提交于
      Working with HAB on the i.MX7 we've encountered a case where a board that
      successfully authenticates u-boot when booting Linux via OPTEE subsequently
      fails to properly bring up the RTC.
      
      The RTC registers live in the low-power block of the Secure Non-Volatile
      Storage (SNVS) block.
      
      The root cause of the error has been traced to the HAB handing off the
      SNVS-RTC in a state where HPCOMR::NPSWA_EN = 0 in other words where the
      Non-Privileged Software Access Enable bit is zero. In ordinary
      circumstances this is OK since we typically do not run in TZ mode, however
      when we boot via HAB and enablng TrustZone, it is required to set
      HPCOMR::NPSWA_EN = 1 in order for the upstream Linux driver to have
      sufficient permissions to manipulate the SNVS-LP block.
      
      On our reference board it is the difference between Linux doing this:
      
      root@imx7s-warp-mbl:~# dmesg | grep rtc
      snvs_rtc_enable read 0x00000000 from SNVS_LPLR @ 0x00000034
      snvs_rtc_enable read 0x00000021 from SNVS_LPCR @ 0x00000038
      snvs_rtc_enable read 0x00000000 from SNVS_HPLR @ 0x00000000
      snvs_rtc_enable read 0x80002100 from SNVS_HPCOMR @ 0x00000004
      snvs_rtc 30370000.snvs:snvs-rtc-lp: rtc core: registered
               30370000.snvs:snvs-rtc-lp as rtc0
      snvs_rtc 30370000.snvs:snvs-rtc-lp: setting system clock to2018-04-01 00:51:04 UTC (1522543864)
      
      and doing this:
      
      root@imx7s-warp-mbl:~# dmesg | grep rtc
      snvs_rtc_enable read 0x00000000 from SNVS_LPLR @ 0x00000034
      snvs_rtc_enable read 0x00000020 from SNVS_LPCR @ 0x00000038
      snvs_rtc_enable read 0x00000001 from SNVS_HPLR @ 0x00000000
      snvs_rtc_enable read 0x00002020 from SNVS_HPCOMR @ 0x00000004
      snvs_rtc 30370000.snvs:snvs-rtc-lp: failed to enable rtc -110
      snvs_rtc: probe of 30370000.snvs:snvs-rtc-lp failed with error -110
      hctosys: unable to open rtc device (rtc0)
      
      Note bit 1 of LPCR is not set in the second case and is set in the first
      case and that bit 31 of HPCOMR is set in the second case but not in the
      first.
      
      Setting NPSWA_EN in HPCOMR allows us to boot through enabling TrustZone
      and continue onto the kernel. The kernel then has the necessary permissions
      to set LPCR::SRTC_ENV (RTC enable in the LP command register) whereas in
      contrast - in the failing case the non-privileged kernel cannot do so.
      
      This patch adds a simple init_snvs() call which sets the permission-bit
      called from soc.c for the i.MX7. It may be possible, safe and desirable to
      perform this on other i.MX processors but for now this is only tested on
      i.MX7 as working.
      Signed-off-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org>
      723f8359
  2. 04 2月, 2018 2 次提交
  3. 03 1月, 2018 1 次提交
    • E
      imx: spl: Fix NAND bootmode detection · af104ae5
      Eran Matityahu 提交于
      commit 20f14714 ("imx: spl: Update NAND bootmode detection bit")
      broke the NAND bootmode detection by checking if
      BOOT_CFG1[7:4] == 0x8 for NAND boot mode.
      This commit essentially reverts it, while using the IMX6_BMODE_*
      macros that were introduced since.
      
      Tables 8-7 & 8-10 from IMX6DQRM say the NAND boot mode selection
      is done when BOOT_CFG1[7] is 1, but BOOT_CFG1[6:4] is not
      necessarily 0x0 in this case.
      Actually, NAND boot mode is when 0x8 <= BOOT_CFG1[7:4] <= 0xf,
      like it was in the code before.
      Signed-off-by: NEran Matityahu <eran.m@variscite.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Jagan Teki <jagan@openedev.com>
      Cc: Tim Harvey <tharvey@gateworks.com>
      af104ae5
  4. 29 12月, 2017 1 次提交
  5. 27 11月, 2017 1 次提交
  6. 12 10月, 2017 1 次提交
  7. 28 8月, 2017 1 次提交
  8. 25 8月, 2017 1 次提交
    • S
      imx: fix USB boot mode detection for i.MX 6UL and 6ULL · 3bd1642d
      Stefan Agner 提交于
      Add the reserved boot mode used in the bmode command for i.MX 6UL
      and 6ULL as introduced in commit 3fd95790 ("imx: mx6ull: fix USB
      bmode for i.MX 6UL and 6ULL").
      
      Also replace BMODE_UART with BMODE_RESERVED, which is more appropriate.
      Commit 96aac843 ("imx: Use IMX6_BMODE_* macros instead of numericals")
      added macros for boot modes, in the process the reserved boot mode got
      named BMODE_UART. We use the reserved boot mode in the bmode command to
      let the boot ROM enter serial downloader recovery mode. But this is only
      a side effect, the actual boot mode is reserved...
      Signed-off-by: NStefan Agner <stefan.agner@toradex.com>
      3bd1642d
  9. 12 7月, 2017 1 次提交
    • S
      imx: reorganize IMX code as other SOCs · 552a848e
      Stefano Babic 提交于
      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/<SOC>.
      
      This change is also coherent with the structure in kernel.
      Signed-off-by: NStefano Babic <sbabic@denx.de>
      
      CC: Fabio Estevam <fabio.estevam@nxp.com>
      CC: Akshay Bhat <akshaybhat@timesys.com>
      CC: Ken Lin <Ken.Lin@advantech.com.tw>
      CC: Marek Vasut <marek.vasut@gmail.com>
      CC: Heiko Schocher <hs@denx.de>
      CC: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com>
      CC: Christian Gmeiner <christian.gmeiner@gmail.com>
      CC: Stefan Roese <sr@denx.de>
      CC: Patrick Bruenn <p.bruenn@beckhoff.com>
      CC: Troy Kisky <troy.kisky@boundarydevices.com>
      CC: Nikita Kiryanov <nikita@compulab.co.il>
      CC: Otavio Salvador <otavio@ossystems.com.br>
      CC: "Eric Bénard" <eric@eukrea.com>
      CC: Jagan Teki <jagan@amarulasolutions.com>
      CC: Ye Li <ye.li@nxp.com>
      CC: Peng Fan <peng.fan@nxp.com>
      CC: Adrian Alonso <adrian.alonso@nxp.com>
      CC: Alison Wang <b18965@freescale.com>
      CC: Tim Harvey <tharvey@gateworks.com>
      CC: Martin Donnelly <martin.donnelly@ge.com>
      CC: Marcin Niestroj <m.niestroj@grinn-global.com>
      CC: Lukasz Majewski <lukma@denx.de>
      CC: Adam Ford <aford173@gmail.com>
      CC: "Albert ARIBAUD (3ADEV)" <albert.aribaud@3adev.fr>
      CC: Boris Brezillon <boris.brezillon@free-electrons.com>
      CC: Soeren Moch <smoch@web.de>
      CC: Richard Hu <richard.hu@technexion.com>
      CC: Wig Cheng <wig.cheng@technexion.com>
      CC: Vanessa Maegima <vanessa.maegima@nxp.com>
      CC: Max Krummenacher <max.krummenacher@toradex.com>
      CC: Stefan Agner <stefan.agner@toradex.com>
      CC: Markus Niebel <Markus.Niebel@tq-group.com>
      CC: Breno Lima <breno.lima@nxp.com>
      CC: Francesco Montefoschi <francesco.montefoschi@udoo.org>
      CC: Jaehoon Chung <jh80.chung@samsung.com>
      CC: Scott Wood <oss@buserror.net>
      CC: Joe Hershberger <joe.hershberger@ni.com>
      CC: Anatolij Gustschin <agust@denx.de>
      CC: Simon Glass <sjg@chromium.org>
      CC: "Andrew F. Davis" <afd@ti.com>
      CC: "Łukasz Majewski" <l.majewski@samsung.com>
      CC: Patrice Chotard <patrice.chotard@st.com>
      CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
      CC: Hans de Goede <hdegoede@redhat.com>
      CC: Masahiro Yamada <yamada.masahiro@socionext.com>
      CC: Stephen Warren <swarren@nvidia.com>
      CC: Andre Przywara <andre.przywara@arm.com>
      CC: "Álvaro Fernández Rojas" <noltari@gmail.com>
      CC: York Sun <york.sun@nxp.com>
      CC: Xiaoliang Yang <xiaoliang.yang@nxp.com>
      CC: Chen-Yu Tsai <wens@csie.org>
      CC: George McCollister <george.mccollister@gmail.com>
      CC: Sven Ebenfeld <sven.ebenfeld@gmail.com>
      CC: Filip Brozovic <fbrozovic@gmail.com>
      CC: Petr Kulhavy <brain@jikos.cz>
      CC: Eric Nelson <eric@nelint.com>
      CC: Bai Ping <ping.bai@nxp.com>
      CC: Anson Huang <Anson.Huang@nxp.com>
      CC: Sanchayan Maity <maitysanchayan@gmail.com>
      CC: Lokesh Vutla <lokeshvutla@ti.com>
      CC: Patrick Delaunay <patrick.delaunay@st.com>
      CC: Gary Bisson <gary.bisson@boundarydevices.com>
      CC: Alexander Graf <agraf@suse.de>
      CC: u-boot@lists.denx.de
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      Reviewed-by: NChristian Gmeiner <christian.gmeiner@gmail.com>
      552a848e
  10. 17 3月, 2017 4 次提交
  11. 16 12月, 2016 1 次提交
  12. 26 10月, 2016 1 次提交
    • J
      arm: imx: Add Engicam i.CoreM6 QDL Starter Kit initial support · f4b7532f
      Jagan Teki 提交于
      Boot Log for i.CoreM6 DualLite/Solo Starter Kit:
      -----------------------------------------------
      
      U-Boot SPL 2016.09-rc2-30739-gd1fa290 (Sep 17 2016 - 00:37:46)
      Trying to boot from MMC1
      
      U-Boot 2016.09-rc2-30739-gd1fa290 (Sep 17 2016 - 00:37:46 +0530)
      
      CPU:   Freescale i.MX6SOLO rev1.3 at 792MHz
      CPU:   Industrial temperature grade (-40C to 105C) at 31C
      Reset cause: POR
      DRAM:  256 MiB
      MMC:   FSL_SDHC: 0
      *** Warning - bad CRC, using default environment
      
      In:    serial
      Out:   serial
      Err:   serial
      Net:   CPU Net Initialization Failed
      No ethernet found.
      Hit any key to stop autoboot:  0
      switch to partitions #0, OK
      mmc0 is current device
      switch to partitions #0, OK
      mmc0 is current device
      reading boot.scr
      ** Unable to read file boot.scr **
      reading zImage
      6741808 bytes read in 341 ms (18.9 MiB/s)
      Booting from mmc ...
      reading imx6dl-icore.dtb
      30600 bytes read in 19 ms (1.5 MiB/s)
         Booting using the fdt blob at 0x18000000
         Using Device Tree in place at 18000000, end 1800a787
      
      Starting kernel ...
      
      [    0.000000] Booting Linux on physical CPU 0x0
      
      Boot Log for i.CoreM6 Quad/Dual Starter Kit:
      --------------------------------------------
      
      U-Boot SPL 2016.09-rc2-30739-gd1fa290 (Sep 17 2016 - 00:37:46)
      Trying to boot from MMC1
      
      U-Boot 2016.09-rc2-30739-gd1fa290 (Sep 17 2016 - 00:37:46 +0530)
      
      CPU:   Freescale i.MX6Q rev1.2 at 792MHz
      CPU:   Industrial temperature grade (-40C to 105C) at 28C
      Reset cause: POR
      DRAM:  512 MiB
      MMC:   FSL_SDHC: 0
      *** Warning - bad CRC, using default environment
      
      In:    serial
      Out:   serial
      Err:   serial
      Net:   CPU Net Initialization Failed
      No ethernet found.
      Hit any key to stop autoboot:  0
      icorem6qdl>
      
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Matteo Lisi <matteo.lisi@engicam.com>
      Cc: Michael Trimarchi <michael@amarulasolutions.com>
      Acked-by: NPeng Fan <peng.fan@nxp.com>
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      f4b7532f
  13. 04 10月, 2016 1 次提交
  14. 24 5月, 2016 1 次提交
  15. 13 11月, 2015 1 次提交
    • P
      video: mxsfb: introduce lcdif_power_down · a3c252d6
      Peng Fan 提交于
      Introudce a new function lcdif_power_down.
      
      1. Waits for a VSYNC interrupt to guarantee the reset is done at the
         VSYNC edge, which somehow makes the LCDIF consume the display FIFO(?)
         and helps the LCDIF work normally at the kernel stage.
      2. Add power down function to stop lcdif.
      
      The reason to introduce lcdif_power_down is that we want lcdif to be in
      initial state when doing uboot reset or before kernel boot to make
      system stable, otherwise system may hang.
      Signed-off-by: NPeng Fan <Peng.Fan@freescale.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Anatolij Gustschin <agust@denx.de>
      Acked-by: NAnatolij Gustschin <agust@denx.de>
      a3c252d6
  16. 13 9月, 2015 3 次提交
  17. 02 9月, 2015 1 次提交
    • P
      imx-common: consolidate macros and prototypes into sys_proto.h · fc684e87
      Peng Fan 提交于
      Move most macro definitions and prototypes into
      "arch/arm/include/asm/imx-common/sys_proto.h" to avoid duplicated
      function prototypes and marco definitions for different i.MX SoCs.
      
      This patch do not remove the sys_proto.h for different i.MX SoCs,
      because we need to modify lots of driver code and others. This patch
      remove duplicated macros and prototypes and incude "sys_proto.h"
      of imx-common for each sys_proto.h of different i.MX platforms.
      Then later we should avoid add stuff in sys_proto.h of each platform,
      and modify driver to include common sys_proto.h.
      Signed-off-by: NPeng Fan <Peng.Fan@freescale.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Reviewed-by: NStefano Babic <sbabic@denx.de>
      fc684e87
  18. 02 8月, 2015 1 次提交
  19. 28 6月, 2015 2 次提交
  20. 19 5月, 2015 2 次提交
    • T
      imx: mx6: add get_cpu_temp_grade to obtain cpu temperature grade from OTP · f0e8e894
      Tim Harvey 提交于
      The MX6 has a temperature grade defined by OCOTP_MEM0[7:6] which is at 0x480
      in the Fusemap Description Table in the reference manual. Return this value
      as well as min/max temperature based on the value.
      
      Note that the IMX6SDLRM and the IMX6SXRM do not indicate this in the
      their Fusemap Description Table however Freescale has confirmed that these
      eFUSE bits match the description within the IMX6DQRM and that they will
      be added to the next revision of the respective reference manuals.
      
      This has been tested with IMX6 Automative and Industrial parts.
      Signed-off-by: NTim Harvey <tharvey@gateworks.com>
      f0e8e894
    • T
      imx: mx6: add get_cpu_speed_grade_hz func to return MHz speed grade from OTP · 9b9449c3
      Tim Harvey 提交于
      The IMX6 has four different speed grades determined by eFUSE SPEED_GRADING
      indicated by OCOTP_CFG3[17:16] which is at 0x440 in the Fusemap Description
      Table. Return this frequency so that it can be used elsewhere.
      
      Note that the IMX6SDLRM and the IMX6SXRM do not indicate this in the
      their Fusemap Description Table however Freescale has confirmed that these
      eFUSE bits match the description within the IMX6DQRM and that they will
      be added to the next revision of the respective reference manuals.
      
      These have been tested with IMX6 Quad/Solo/Dual-light 800Mhz and 1GHz grades.
      Signed-off-by: NTim Harvey <tharvey@gateworks.com>
      9b9449c3
  21. 20 11月, 2014 1 次提交
  22. 09 9月, 2014 1 次提交
  23. 20 8月, 2014 1 次提交
  24. 17 6月, 2014 1 次提交
  25. 11 2月, 2014 1 次提交
  26. 03 1月, 2014 1 次提交
  27. 01 9月, 2013 1 次提交
  28. 24 7月, 2013 1 次提交
  29. 22 4月, 2013 1 次提交
    • S
      imx: Move some i.MX common functions into the imx-common directory · 8870e459
      Stefan Roese 提交于
      This patch moves the following functions into the imx-common
      directory:
      
      - mxs_wait_mask_set()
      - mxs_wait_mask_clr()
      - mxs_reset_block()
      
      These are currently used by i.MX28. But the upcoming GPMI NAND port
      for i.MX6 will also use these functions. So lets move them to a
      common location to re-use them.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      8870e459
  30. 10 11月, 2012 2 次提交
  31. 15 5月, 2012 1 次提交
    • D
      i.MX6: Add ANATOP regulator init · cac833a9
      Dirk Behme 提交于
      Init the core regulator voltage to 1.2V. This is required for the correct
      functioning of the GPU and when the ARM LDO is set to 1.225V. This is a
      workaround to fix some memory clock jitter.
      
      Note: This should be but can't be done in the DCD. The bootloader
            prevents access to the ANATOP registers.
      Signed-off-by: NDirk Behme <dirk.behme@de.bosch.com>
      CC: Jason Chen <b02280@freescale.com>
      CC: Jason Liu <r64343@freescale.com>
      CC: Ranjani Vaidyanathan <ra5478@freescale.com>
      CC: Stefano Babic <sbabic@denx.de>
      CC: Fabio Estevam <festevam@gmail.com>
      cac833a9