27 Apr, 2018

21 commits

  • No need to provide two prototype for this function.
    Use ulong for the first parameter, then this function
    could be shared for DM/non DM case.

    Signed-off-by: Peng Fan
    Acked-by: Joe Hershberger

    Peng Fan
     
  • When using ethernet DM driver, the recv interface has a
    change with non-DM interface, that driver needs to set
    the packet pointer and provide it to upper layer to process.

    In fec driver, the fecmxc_recv functions does not handle the
    packet pointer parameter. This may cause crash in upper layer
    processing because the packet pointer is not set.

    This patch allocates a buffer for the packet pointer and free it
    through free_pkt interface.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    Acked-by: Joe Hershberger

    Ye Li
     
  • The strobe dll code is ported from Linux Kernel:
    drivers/mmc/host/sdhci-esdhc-imx.c
    The comments are from the above file,
    "For HS400 eMMC, there is a data_strobe line. This signal is generated
    by the device and used for data output and CRC status response output
    in HS400 mode. The frequency of this signal follows the frequency of
    CLK generated by host. The host receives the data which is aligned to the
    edge of data_strobe line. Due to the time delay between CLK line and
    data_strobe line, if the delay time is larger than one clock cycle,
    then CLK and data_strobe line will be misaligned, read error shows up.
    So when the CLK is higher than 100MHz, each clock cycle is short enough,
    host should configure the delay target. "

    Signed-off-by: Peng Fan
    Cc: Jaehoon Chung
    Cc: Stefano Babic

    Peng Fan
     
  • Add HS400 support.
    Selecting HS400 needs first select HS199 according to spec, so use
    a dedicated function for HS400.
    Add HS400 related macros.
    Remove the restriction of only using the low 6 bits of
    EXT_CSD_CARD_TYPE, using all the 8 bits.

    Signed-off-by: Peng Fan
    Cc: Jaehoon Chung
    Cc: Jean-Jacques Hiblot
    Cc: Stefano Babic
    Cc: Simon Glass
    Cc: Kishon Vijay Abraham I
    Cc: Bin Meng

    Peng Fan
     
  • sd_read_ssr returns 0, means no error.
    Fixes: 5b2e72f32721484("mmc: read ssr only if MMC write support is enabled")

    Signed-off-by: Peng Fan
    Cc: Jaehoon Chung
    Cc: Jean-Jacques Hiblot

    Peng Fan
     
  • Align to imx_v2015.04, dynamic setting mmcdev and mmcroot.
    Then when boot linux, we can have correct "root=/dev/mmcblk[x]p2"

    Signed-off-by: Peng Fan
    (cherry picked from commit b46b99a901eb194e81fc4836ee2259ad8857f4d3)
    (cherry picked from commit 6f6a828fbe7478efd5932c302e6368877107bbca)

    Peng Fan
     
  • Debug monitor will print out last failed AXI access info when
    system reboot is caused by AXI access failure, only works when
    debug monitor is enabled.

    Enable this module on i.MX6SX.

    Signed-off-by: Anson Huang
    Signed-off-by: Ye.Li
    (cherry picked from commit df6ac8531d498021ed379c74fc1847bd2cec7179)
    Signed-off-by: Peng Fan
    (cherry picked from commit 4f4ecdbf6fe2673b8ad117df1a4974bdb7e6aa4a)
    (cherry picked from commit e1c98a672e50fd0405686b74dad50680a75a8a9f)

    Ye.Li
     
  • Add gis module, current gis is support vadc input.
    Add power down function to lcdif driver.

    Signed-off-by: Sandor Yu
    Signed-off-by: Ye.Li
    (cherry picked from commit a007b00dd8ef9f773dfdebef0b1deb0990281793)
    (cherry picked from commit a31dcdafb0963381e7213c59f79a340ef27ec2e2)
    (cherry picked from commit 02dfe2e4af5f51d39a51542fb0e81f93faf505bc)
    (cherry picked from commit a8e94954d8ccc44c41d77a5e356d6a99b3d45649)

    Ye.Li
     
  • Add pxp module.
    Support csc between YUV444 and RGB888 and scaling.

    Signed-off-by: Sandor Yu
    Signed-off-by: Ye.Li
    (cherry picked from commit 4c6e1f9ed1b2f5c98a34502b44b6414593fdd290)
    Signed-off-by: Peng Fan
    (cherry picked from commit 92295fafcdbaa3a3fe0a63ede15f896dfc9ce0b0)
    (cherry picked from commit 096a63e81a8c78b3f8bbc65a9d418aa032d62231)
    (cherry picked from commit b24cce0ad3ec9f386ca7aa231d8a2db33462f092)

    Ye.Li
     
  • Add csi module.

    Signed-off-by: Sandor Yu
    Signed-off-by: Ye.Li
    (cherry picked from commit 854ae26758ec8132ef749b98645dd2f43b84e5e2)
    Signed-off-by: Peng Fan
    (cherry picked from commit 5f133bd9420109951fd03bd5168801327e929c3b)
    (cherry picked from commit 16960e59fa3334162d2e2212ee4bc1e7f0c420a3)
    (cherry picked from commit bc0639ed8f5069f198067916caf088908492329d)

    Ye.Li
     
  • Add vadc module.
    Both PAL and NTSC mode can work.

    Signed-off-by: Sandor Yu
    Signed-off-by: Ye.Li
    (cherry picked from commit 03c31ae30c1e81c99f6824221e4801433445e04a)
    Signed-off-by: Peng Fan
    (cherry picked from commit b5d776ffc1519c16091736445b3217ffb7fcd7db)
    (cherry picked from commit 2377eb9fd299b76888f11faf76383b68e77bcc8a)
    (cherry picked from commit 808d447235bd0f9134c7d00fa480cd55b4e0426e)

    Ye.Li
     
  • Add vadc power up/down function.
    When gis enable in uboot, the CSI0 input mux select setting
    to vadc module, clean the bit when gis disabled

    Signed-off-by: Ye Li
    Signed-off-by: Sandor Yu
    Signed-off-by: Peng Fan

    Ye Li
     
  • Add vadc clock enable function.

    Signed-off-by: Sandor Yu
    Signed-off-by: Ye.Li
    (cherry picked from commit 721c7a1448c5b7265b597b83d18f8338a27ea213)
    Signed-off-by: Peng Fan
    (cherry picked from commit 903a59ef941f39b6d7f693dd7c60528e166de079)
    (cherry picked from commit dc767fb7d5c155f2a6ef01c4dee808b9c1944fc2)
    (cherry picked from commit 0a48932f375a969e6f7e72d171522146981b2135)

    Ye.Li
     
  • Fix build warning:
    common/lcd.c: In function 'lcd_clear':
    common/lcd.c:166:6: warning: variable 'bg_color' set but not used [-Wunused-but-set-variable]
    int bg_color;
    ^
    common/lcd.c: In function 'lcd_setmem':
    common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 2 has type 'u_long' [-Wformat=]
    debug("LCD panel info: %d x %d, %d bit/pix\n", panel_info.vl_col,
    ^
    common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long' [-Wformat=]

    Signed-off-by: Peng Fan
    (cherry picked from commit acfeb43685efb04423ce064c67228d15fa6d3da5)
    (cherry picked from commit 69a7c6f0877f4a984209f1be3e14ed5fe56928ad)

    Peng Fan
     
  • Update the board_video_skip to use CONFIG_VIDEO_MXS for LCD display support.

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

    Ye Li
     
  • Add a new interface "mxs_lcd_panel_setup" to setup fb parameters and
    specifies the LCDIF controller for multiple controllers of iMX6SX.
    Pass fb parameters via "videomode" env remains work if the new interface
    is not called before video initialization.

    Modify LCDIF clock interface "mxs_set_lcdclk" to support multiple
    LCDIF controllers on iMX6SX.

    Signed-off-by: Ye.Li
    Signed-off-by: Peng Fan
    (cherry picked from commit d7f49b9378547c3a57b96bcdb907fc44616beb3d)
    (cherry picked from commit e1343191b9de227c582847e7eeb5ce9238be0754)
    (cherry picked from commit 9632ebeccc34d663e21bd19f2fe62de51947296e)
    Signed-off-by: Ye Li

    Ye.Li
     
  • Support EPDC.
    E-Ink feature is supported by i.MX6DL/SL/SLL/ULL and i.MX7D.

    This driver supports user defined logo file, if there is no logo file, it will
    draw a black border around a white screen.

    If need to enable EPDC, a waveform file is required to let all
    work.

    Since we need LCD_MONOCHROME mode for EPDC, we introduce LCD_MONOCHROME
    support.

    Please refer to Linux Reference Manual for how to flash WAVEFORM file.

    Signed-off-by: Peng Fan
    Signed-off-by: Robby Cai
    Signed-off-by: Nitin Garg
    Signed-off-by: Ye.Li
    (cherry picked from commit a7244f279cc3c3994bcd103f5e9a183b1075ae71)

    Peng Fan
     
  • Implement a functionality to read the soc fuses and check if any module
    is fused. For fused module, we have to disable it in u-boot dynamically,
    and change the its node in FDT to "disabled" status before starting the kernel.

    In this patch, we implement the ft_system_setup for FDT fixup. This function will
    be called during boot process or by "fdt systemsetup" command.

    To enable the module fuse checking, two configurations must be defined:
    CONFIG_MODULE_FUSE
    CONFIG_OF_SYSTEM_SETUP

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

    Ye Li
     
  • Add defconfigs to support various boot devices and platforms
    for MX6DQ/DQP/DL/S sabreauto and sabresd boards.

    Signed-off-by: Ye Li

    Ye Li
     
  • Porting the mx6dq/dqp/dl/s sabresd and sabreauto codes from v2017.03
    The major change is moving back to non-SPL mode for sabre boards.
    which means all old things like DCD, plugin are added back for each
    platform. This inherits the way used in v2017.03

    Signed-off-by: Ye Li

    Ye Li
     
  • Port the DTS and relevent binding files from v2017.03 for i.MX6DQ/DQP/DL/S
    Sabreauto and SabreSD boards.

    Removed the MMC alias from v2017.03, since the MMC will use it as device index when
    DM MMC is enabled. This causes mismatch with Non-DM MMC case.

    Signed-off-by: Ye Li

    Ye Li
     

26 Apr, 2018

19 commits

  • Align the common head file with v2017.03, since some configurations
    have been moved to Kconfig, so don't need them in mx6_common.h now.

    Signed-off-by: Ye Li

    Ye Li
     
  • Update the pins.h for i.MX6SL/UL/ULL to align with v2017.03

    Signed-off-by: Ye Li

    Ye Li
     
  • Update the CCM and AIPS registers mapping files to align with v2017.03

    Signed-off-by: Ye Li

    Ye Li
     
  • Update codes for i.MX6 soc and clock settings to align with v2017.03

    Signed-off-by: Ye Li

    Ye Li
     
  • Enable pcie support in uboot on imx6sx sd boards
    - enable_pcie_clock should be call before ssp_en is set,
    since that ssp_en control the phy_ref clk gate, turn on
    it after the source of the pcie clks are stable.
    - add debug info
    - add rx_eq of gpr12 on imx6sx
    - there are random link down issue on imx6sx. It's
    pcie ep reset issue.
    solution:reset ep, then retry link can fix it.

    (cherry picked from commit ec78595a24b5ff1020baa97b6d6e79a3a3326307)
    Signed-off-by: Richard Zhu
    Signed-off-by: Ye Li
    (cherry picked from commit 81fd30250110d72992758f08b66c07306126892b)

    Ye Li
     
  • There are about 0.02% percentage on some imx6q/dl/solo
    hw boards, random pcie link down when warm-reset is used.
    Make sure to clear the ref_ssp_en bit16 of gpr1 before
    warm-rst, and set ref_ssp_en after the pcie clks are
    stable to workaround it.

    imx6sl doesn't have the pcie module, mask the pcie
    related codes from imx6sl.

    rootcause:
    * gpr regisers wouldn't be reset by warm-rst, while the
    ref_ssp_en is required to be reset by pcie.
    (work-around in u-boot)
    * ref_ssp_en should be set after pcie clks are stable.
    (work-around in kernel)

    Signed-off-by: Richard Zhu
    (cherry picked from commit 5cc825b12c6b86a22f1a6a0535b52cf3ee142e77)
    Signed-off-by: Peng Fan
    (cherry picked from commit 6193cf4e3384a59e29546d13a67657f7faeafc9e)
    (cherry picked from commit 7b4aabeddffabca46d7d6e7ef2611de468a6b4f7)

    Richard Zhu
     
  • To resolve USB camera bandwidth issue, the patch sets recommended AQoS
    setting from IC team value for peripheral and only on imx6qp.

    The address is: 0xbb0608, the value is: 0x80000201

    Signed-off-by: Ye.Li
    (cherry picked from commit 11906c712a52e7a20caf71d7c5da4e951a59db29)
    (cherry picked from commit 5dcf073b8f2479a2adbb8d9fb03d9c9c70664e32)

    Ye.Li
     
  • Shutdown VDDPU and PCIE phy to save power.

    For PCIE, the i.MX6SL and i.MX6UL does not have this module,
    so don't need it.

    For VDDPU, the i.MX6UL does not have GPU, does not need it. And on
    i.MX6QP there is narrow window that PRE driver is ready but GPU driver probe later,
    and the later GPU driver turn on PU may cause 'PRE hang' issue. To simplify
    thing, do not turn off PU in u-boot.

    Reference:
    commit: 6b0787b726e2ff32210d742d93ecd3f4bb2ae402
    commit: 4bd0032c0eba50fa0caf43f50f735a3cfbe36a8d

    Signed-off-by: Ye Li
    (cherry picked from commit 5c96ea91fe89c67991c929c9b39ffaa940d28391)
    (cherry picked from commit 6a5442b41ef400edd0b332962a3450e909b85df5)

    Ye Li
     
  • The pads name bind with CONFIG_MX6Q and CONFIG_6DL should start with MX6_PAD
    not MX6Q_PAD and MX6DL_PAD. Otherwise we will get build break.

    Signed-off-by: Ye Li

    Ye Li
     
  • The i.MX6D is a variant of i.MX6Q. The only difference is the core number.
    So we can select CONFIG_MX6Q to reduce duplicated codes and remove duplicated
    usages of CONFIG_MX6D.

    Signed-off-by: Ye Li

    Ye Li
     
  • Since i.MX6QP is a variant of i.MX6Q, the CONFIG_MX6QP will select CONFIG_MX6Q.
    Users can use is_mx6dqp to distinguish them at runtime.

    The reason to add this kconfig is plugin mode will use this configuration.

    Signed-off-by: Ye Li

    Ye Li
     
  • This patch is to support Bus Encryption Engine(BEE) for i.MX 6UL.
    Supported feature:
    1. SNVS key and soft key
    2. CTR and ECB mode
    3. Specify address region to bee.

    Two commands are included:
    bee init [key] [mode] [start] [end] - BEE block initial
    "Example: bee init 1 1 0x80000000 0x80010000\n"
    bee test [region]
    "Example: bee test 1\n"

    Mapping:
    [0x10000000 - (0x10000000 + size - 1)] : [start - (start + size - 1)]
    [0x30000000 - (0x30000000 + IRAM_SIZE - 1)] : [IRAM_BASE_ADDR -
    (IRAM_BASE_ADDR + IRAM_SIZE - 1)]

    Whatever start is, start - (start + size -1) will be fixed mapping to
    0x10000000 - (0x10000000 + size - 1)

    Since default AES region's protected size is SZ_512M, so
    on mx6ul evk board, you can not simply run 'bee init', it will
    overlap with uboot execution environment, you can use
    'bee init 0 0 0x80000000 0x81000000'.

    If want to use bee, Need to define CONFIG_CMD_BEE in board configuration
    header file, since CONFIG_CMD_BEE default is not enabled.

    This patch also checks fuse bit 25 of bank 0 word 4 before initialize bee.
    The bit: 0 means bee enabled, 1 means bee disabled.

    Signed-off-by: Peng Fan
    Signed-off-by: Ye Li

    Ye Li
     
  • Port LDO bypass SOC codes from v2017 to support the features:

    1. Add check for 1.2GHz core speed. If Speed grading fuse is for 1.2GHz,
    enable LDO bypass and setup PMIC voltages. LDO bypass is dependent
    on the flatten device tree file.

    2. We set WDOG_B in set_anatop_bypass() before, because it is the only case, but now
    on i.mx6sabreauto board, we didn't use ldo-bypass mode, but have to use WDOG_B to
    reboot whole board, so split these code to independent function so that board file
    can call it freely.

    Signed-off-by: Ye Li

    Ye Li
     
  • Modify the GPT common platform driver for mx7 which only use 24Mhz
    OSC as clock source.

    Note: at default, the mx7d will use system counter as timer. The GPT
    is disabled.

    Signed-off-by: Ye Li
    Signed-off-by: Peng Fan

    Ye Li
     
  • The ENV_IS_IN_SATA config is missed, add it into env/Kconfig, that
    we can enable it for SATA boot.

    Signed-off-by: Ye Li

    Ye Li
     
  • Fix below build warning and errors:
    env/sata.c: In function ‘env_sata_save’:
    env/sata.c:59:9: warning: implicit declaration of function ‘sata_get_dev’ [-Wimplicit-function-declaration]
    sata = sata_get_dev(env_sata);
    ^~~~~~~~~~~~
    env/sata.c:59:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    sata = sata_get_dev(env_sata);
    ^
    env/sata.c: In function ‘env_sata_load’:
    env/sata.c:101:10: warning: ‘return’ with a value, in function returning void
    return -EIO;
    ^
    env/sata.c:94:13: note: declared here
    static void env_sata_load(void)
    ^~~~~~~~~~~~~
    env/sata.c:105:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    sata = sata_get_dev(env_sata);
    ^
    env/sata.c:108:10: warning: ‘return’ with a value, in function returning void
    return -EIO;
    ^
    env/sata.c:94:13: note: declared here
    static void env_sata_load(void)
    ^~~~~~~~~~~~~
    env/sata.c:113:10: warning: ‘return’ with a value, in function returning void
    return -EIO;
    ^
    env/sata.c:94:13: note: declared here
    static void env_sata_load(void)
    ^~~~~~~~~~~~~
    env/sata.c:116:9: warning: ‘return’ with a value, in function returning void
    return env_import(buf, 1);
    ^~~~~~~~~~~~~~~~~~
    env/sata.c:94:13: note: declared here
    static void env_sata_load(void)
    ^~~~~~~~~~~~~
    env/sata.c: At top level:
    env/sata.c:120:14: error: ‘ENVL_ESATA’ undeclared here (not in a function)
    .location = ENVL_ESATA,
    ^~~~~~~~~~
    env/sata.c:122:11: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
    .load = env_sata_load,

    Signed-off-by: Ye Li

    Ye Li
     
  • Wrong env buffer was passed into sata write function, so the saveenv can't work.
    Fix this issue.

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

    Ye Li
     
  • From i2c spec, if device pull down the SDA line that causes
    i2c bus dead, host can send out 9 clock to let device release
    SDA.

    But for some special device like pfuze100, it pull down SDA line
    and the solution cannot take effort.

    The patch just add NACK and STOP signal after 8 dummy clock, and pmic
    can release SDA line after the recovery. Test case catch 375 times of
    i2c hang, and all are recovered.

    Signed-off-by: Fugang Duan
    Signed-off-by: Peng Fan
    Signed-off-by: Ye Li

    Ye Li
     
  • Apply errata based on PL310 version instead of compile
    time. Also set Prefetch offset to 15, since it improves
    memcpy performance by 35%. Don't enable Incr double
    Linefill enable since it adversely affects memcpy
    performance by about 32MB/s and reads by 90MB/s. Tested
    with 4K to 16MB sized src and dst aligned buffer.

    Signed-off-by: Nitin Garg
    Signed-off-by: Ye Li

    Ye Li