Skip to content
Snippets Groups Projects
  1. Nov 29, 2016
  2. Oct 26, 2016
    • Jagan Teki's avatar
      arm: imx: Add Engicam i.CoreM6 QDL Starter Kit initial support · f4b7532f
      Jagan Teki authored
      
      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: default avatarPeng Fan <peng.fan@nxp.com>
      Signed-off-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      f4b7532f
  3. Oct 04, 2016
  4. May 24, 2016
  5. Mar 28, 2016
    • Peng Fan's avatar
      dm: i2c: mxc_i2c: implement i2c_idle_bus · e1bed802
      Peng Fan authored
      
      Implement i2c_idle_bus in driver, then setup_i2c can
      be dropped for boards which enable DM_I2C/DM_GPIO/PINCTRL.
      The i2c_idle_bus force bus idle flow follows setup_i2c in
      arch/arm/imx-common/i2c-mxv7.c
      
      This patch is an implementation following linux kernel patch:
      "
      commit 1c4b6c3bcf30d0804db0d0647d8ebeb862c6f7e5
      Author: Gao Pan <b54642@freescale.com>
      Date:   Fri Oct 23 20:28:54 2015 +0800
      
          i2c: imx: implement bus recovery
      
          Implement bus recovery methods for i2c-imx so we can recover from
          situations where SCL/SDA are stuck low.
      
          Once i2c bus SCL/SDA are stuck low during transfer, config the i2c
          pinctrl to gpio mode by calling pinctrl sleep set function, and then
          use GPIO to emulate the i2c protocol to send nine dummy clock to recover
          i2c device. After recovery, set i2c pinctrl to default group setting.
      "
      
      See Documentation/devicetree/bindings/i2c/i2c-imx.txt for detailed
      description.
      1. Introuduce scl_gpio/sda_gpio/bus in mxc_i2c_bus.
      2. Discard the __weak attribute for i2c_idle_bus and implement it,
         since we have pinctrl driver/driver model gpio driver. We can
         use device tree, but not let board code to do this.
      3. gpio state for mxc_i2c is not a must, but it is recommended. If
         there is no gpio state, driver will give tips, but not fail.
      4. The i2c controller was first probed, default pinctrl state will
         be used, so when need to use gpio function, need to do
         "pinctrl_select_state(dev, "gpio")" and after force bus idle,
         need to switch back "pinctrl_select_state(dev, "default")".
      
      This is example about how to use the gpio force bus
      idle function:
      "
       &i2c1 {
       	clock-frequency = <100000>;
      	pinctrl-names = "default", "gpio";
       	pinctrl-0 = <&pinctrl_i2c1>;
      	pinctrl-1 = <&pinctrl_i2c1_gpio>;
      	scl-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
      	sda-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
      	status = "okay";
      	[....]
       };
      
      [.....]
      
      	pinctrl_i2c1_gpio: i2c1grp_gpio {
      		fsl,pins = <
      			MX6UL_PAD_UART4_TX_DATA__GPIO1_IO28 0x1b8b0
      			MX6UL_PAD_UART4_RX_DATA__GPIO1_IO29 0x1b8b0
      		>;
      	};
      "
      
      Signed-off-by: default avatarPeng Fan <van.freenix@gmail.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: York Sun <york.sun@nxp.com>
      e1bed802
  6. Feb 21, 2016
  7. Jan 24, 2016
  8. Nov 25, 2015
  9. Nov 12, 2015
  10. Oct 30, 2015
  11. Sep 13, 2015
  12. Sep 02, 2015
    • Adrian Alonso's avatar
      imx: iomux-v3: add imx7d support for iomuxc · 03f0e4c7
      Adrian Alonso authored
      
      * Add imx7d support for iomux controller
      * imx7d has two iomux controllers iomuxc (0x3033000) and iomuxc-lpsr
        (0x302C0000) each conroller provides control and mux mode pad
        registers but shares iomuxc input select register with iomuxc-lpsr
        IOMUX_CONFIG_LPSR flag is used to properly set daisy chain settings
        for iomuxc-lpsr pads.
      * Since mx7d introduces LPSR IOMUX pins, add new base to IOMUX v3
        driver for these LPSR pins.
      
      Signed-off-by: default avatarAdrian Alonso <aalonso@freescale.com>
      Signed-off-by: default avatarFugang Duan <B38611@freescale.com>
      Signed-off-by: default avatarYe.Li <B37916@freescale.com>
      03f0e4c7
    • Peng Fan's avatar
      imx-common: consolidate macros and prototypes into sys_proto.h · fc684e87
      Peng Fan authored
      
      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: default avatarPeng Fan <Peng.Fan@freescale.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Reviewed-by: default avatarStefano Babic <sbabic@denx.de>
      fc684e87
  13. Aug 26, 2015
    • Peng Fan's avatar
      mtd: nand: mxs support oobsize bigger than 512 · 63b29d80
      Peng Fan authored
      
      If ecc chunk data size is 512 and oobsize is bigger than 512, there is
      a chance that block_mark_bit_offset conflicts with bch ecc area.
      
      The following graph is modified from kernel gpmi-nand.c driver with
      each data block 512 bytes. We can see that Block Mark conflicts with
      ecc area from bch view. We can enlarge the ecc chunk size to avoid
      this problem to those oobsize which is larger than 512.
      
         |                          P                                        |
         |<----------------------------------------------------------------->|
         |                                                                   |
         |                                                (Block Mark)       |
         |                      P'                             |           | |   |
         |<--------------------------------------------------->|     D     | | O'|
         |                                                     |<--------->| |<->|
         V                                                     V           V V   V
         +---+--------------+-+--------------+-+--------------+-+----------+-+---+
         | M |   data       |E|   data       |E|   data       |E|   data   |E|   |
         +---+--------------+-+--------------+-+--------------+-+----------+-+---+
                                                              ^                  ^
                                                              |         O        |
                                                              |<---------------->|
      
             P : the page size for BCH module.
             E : The ECC strength.
             G : the length of Galois Field.
             N : The chunk count of per page.
             M : the metasize of per page.
             C : the ecc chunk size, aka the "data" above.
             P': the nand chip's page size.
             O : the nand chip's oob size.
             O': the free oob.
      
      Signed-off-by: default avatarPeng Fan <Peng.Fan@freescale.com>
      Reviewed-by: default avatarMarek Vasut <marex@denx.de>
      Tested-By: default avatarTim Harvey <tharvey@gateworks.com>
      63b29d80
  14. Aug 02, 2015
  15. Jul 10, 2015
  16. Jun 08, 2015
  17. May 26, 2015
    • Peng Fan's avatar
      imx: dma: correct MXS_DMA_ALIGNMENT · ab87fc6b
      Peng Fan authored
      
      We should not hardcode MXS_DMA_ALIGNMENT to 32, since we can not guarantee
      that socs' cache line size is 32 bytes.
      If on chips whose cache line size is 64 bytes, error occurs:
      "
      NAND:  ERROR: v7_dcache_inval_range - start address is not aligned - 0xbdf1d1a0
      ERROR: v7_dcache_inval_range - stop address is not aligned - 0xbdf1f4a0
      ERROR: v7_dcache_inval_range - start address is not aligned - 0xbdf1d1a0
      "
      Align MXS_DMA_ALIGNMENT with ARCH_DMA_MINALIGN whose value is same to
      CONFIG_SYS_CACHELINE_SIZE if CONFIG_SYS_CACHELINE_SIZE defined.
      
      Signed-off-by: default avatarPeng Fan <Peng.Fan@freescale.com>
      Acked-by: default avatarMarek Vasut <marex@denx.de>
      ab87fc6b
  18. May 15, 2015
    • Peng Fan's avatar
      i2c: mxc: refactor i2c driver and support dm · 71204e95
      Peng Fan authored
      
      1. Introduce a new structure `struct mxc_i2c_bus`, this structure will
         used for non-DM and DM.
      2. Remove `struct mxc_i2c_regs` structure, but use register offset to access
         registers based on `base` entry of `struct mxc_i2c_bus`.
      3. Remove most `#ifdef I2C_QUIRK_REG`. Using driver_data to contain platform
         flags. A new flag is introduced, I2C_QUIRK_FLAG.
      4. Most functions use `struct mxc_i2c_bus` as one of the parameters.
         Make most functions common to DM and non-DM, try to avoid duplicated code.
      5. Support DM, but pinctrl is not included. Pinmux setting is still set
         by setup_i2c, but we do not need bus_i2c_init for DM.
      6. struct i2c_parms and struct sram_data are removed.
      7. Remove bus_i2c_read bus_i2c_write prototype in header file. The frist
         paramter of bus_i2c_init is modified to i2c index. Add new prototype
         i2c_idle_bus and force_bus_idle. Since bus_i2c_init is not good for
         DM I2C and pinctrl is missed, we use a weak function for i2c_idle_bus.
         Board file take the responsibility to implement this function, like this:
         "
         int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus)
         {
      	   if (i2c_bus->index == 0)
      		   force_bus_idle(i2c_pads_info0);
      	   else if (i2c_bus->index == 1)
      		   force_bus_idle(i2c_pads_info1);
      	   else
      		   xxxxxx
         }
         "
      8. Introduce a weak function, enable_i2c_clk
      9. Tested on an i.MX7 platform. Log info:
       => dm tree
       Class       Probed   Name
       ----------------------------------------
       root        [ + ]    root_driver
       simple_bus  [   ]    |-- soc
       simple_bus  [   ]    |   |-- aips-bus@30000000
       simple_bus  [   ]    |   |   |-- anatop@30360000
       simple_bus  [   ]    |   |   `-- snvs@30370000
       simple_bus  [   ]    |   |-- aips-bus@30400000
       simple_bus  [   ]    |   `-- aips-bus@30800000
       i2c         [   ]    |       |-- i2c@30a20000
       i2c         [   ]    |       `-- i2c@30a40000
       simple_bus  [   ]    `-- regulators
       => i2c dev 0
       Setting bus to 0
       => i2c probe
       Valid chip addresses: 08 50
       => i2c md 8 31
       0031: 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08
      
      Signed-off-by: default avatarPeng Fan <Peng.Fan@freescale.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      71204e95
  19. Apr 23, 2015
  20. Apr 20, 2015
  21. Nov 03, 2014
    • Ye.Li's avatar
      imx: mx6 sabreauto: Add board support for USB EHCI · 8fe280f3
      Ye.Li authored
      
      On mx6 sabreauto board, there are two USB ports:
      0: OTG
      1: HOST
      The EHCI driver is enabled for this board, but the IOMUX and VBUS power
      control is not implemented, which cause both USB port failed to work.
      This patch fix the problem by adding the board support codes.
      
      Since the power control uses the GPIO pin from port expander MAX7310,
      the PCA953X driver is enabled for accessing the MAX7310.
      
      The ID pin of OTG Port needs to configure the GPR1 bit 13 for selecting
      its daisy chain. Add a new function "imx_iomux_set_gpr_register" to
      handle GPR register setting.
      
      Signed-off-by: default avatarYe.Li <B37916@freescale.com>
      8fe280f3
  22. Oct 22, 2014
  23. Oct 21, 2014
  24. Oct 07, 2014
  25. Sep 09, 2014
  26. Aug 30, 2014
Loading