27 Apr, 2018

40 commits

  • Update for HS400 ES and enable iMX8QM/QXP for HS400 and HS400 ES.

    Signed-off-by: Ye Li

    Ye Li
     
  • The eMMC 5.1 supports the HS400 Enhanced Strobe mode, add this
    support to mmc.

    Signed-off-by: Ye Li

    Ye Li
     
  • Change i2c mux compatible to pca9646

    Signed-off-by: Ye Li

    Ye Li
     
  • Add the PCA9646 support, which is 2-wire bus switch and buffered 4-channel.

    Signed-off-by: Ye Li

    Ye Li
     
  • 600ms is not enough to erase erase_grp_size for some sdcard.
    enlarge to to 1200ms.

    Change-Id: Ic980794fa3064f92b479b87380e694f853f83c6a
    Signed-off-by: zhang sanshan
    (cherry picked from commit 4a1db2cd700ea434e25c0692c545e571f5841a00)

    zhang sanshan
     
  • When sd/mmc work at DDR mode, like HS400/HS400ES/DDR52/DDR50 mode,
    the actual clock rate is just half of the expected clock.

    This patch set the DDR_EN bit first for DDR mode, hardware divide
    the usdhc clock automatically, then follow the original sdr clock
    setting method.

    Signed-off-by: Haibo Chen
    Signed-off-by: Ye Li

    Ye Li
     
  • Add off-on-delay-us for fixed regulator.

    Signed-off-by: Peng Fan
    (cherry picked from commit 53856166e9df6d2e204c5d0f3469b9333ecf734e)

    Peng Fan
     
  • Make sure that all devices that are powered up by uboot
    are powered down before bringing up kernel.
    Else the subsystem/device will never be powered down by SCFW even though
    from the kernel's point of view it should be powered down.

    Benefiting from power domain driver, We have implemented the function "power_off_pd_devices"
    to power off all active devices. No need to explicitly power off them in board_quiesce_devices.

    Signed-off-by: Ranjani Vaidyanathan
    Signed-off-by: Ye Li

    Ye Li
     
  • Add board level codes and configs for i.MX8QXP MEK board.

    - Enabled DM driver:
    FEC, LPUART, LPI2C, GPIO, SD/MMC, FSPI, PCA953X, pinctrl, USB host(EHCI/XHCI)
    Power-domain, SC thermal

    - Enabled Non-DM driver:
    PCIE, fuse, iomux, video(IMXDPUV1), USB device(CI-UDC), TCPC

    - Disabled driver:
    mailbox

    - Board defconfigs:
    imx8qxp_mek_defconfig
    imx8qxp_mek_fspi_defconfig

    Signed-off-by: Ye Li

    Ye Li
     
  • Ported the DTS file from u-boot v2017.03 for i.MX8QXP MEK board.

    Signed-off-by: Ye Li

    Ye Li
     
  • Add board level codes and configs for i.MX8QM MEK board.

    - Enabled DM driver:
    FEC, LPUART, LPI2C, GPIO, SD/MMC, FSPI, pinctrl, USB host(EHCI/XHCI)
    Power-domain, SC thermal

    - Enabled Non-DM driver:
    SATA, PCIE, fuse, iomux, video(IMXDPUV1), USB device(CI-UDC)

    - Disabled driver:
    mailbox

    - Board defconfigs:
    imx8qm_mek_defconfig
    imx8qm_mek_fspi_defconfig

    Signed-off-by: Ye Li

    Ye Li
     
  • Ported the DTS file from u-boot v2017.03 for i.MX8QM MEK board.

    Signed-off-by: Ye Li

    Ye Li
     
  • NAND module is pin conflict with SD/eMMC on i.MX8QXP ARM2 board,
    add new config to disable SD/eMMC when booting from NAND.

    Signed-off-by: Han Xu
    Signed-off-by: Ye Li

    Ye Li
     
  • enable the GPMI NAND driver for i.MX8, the major changes

    - register defination for i.mx8
    - Makefile change for misc.c
    - DMA structure must be 32bit address

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

    Han Xu
     
  • change the maximum oob size to 1872 for the MT29F128G08CBCCB raw NAND
    chip on i.MX8QXP

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

    Han Xu
     
  • Add board level codes and configs for i.MX8QXP LPDDR4 ARM2 board
    and i.MX8QXP DDR3 ARM2 board.

    - Enabled DM driver:
    FEC, LPUART, LPI2C, GPIO, SD/MMC, FSPI, PCA953X, pinctrl, USB host(EHCI/XHCI)
    Power-domain, SC thermal

    - Enabled Non-DM driver:
    PCIE, fuse, iomux, video(IMXDPUV1), USB device(CI-UDC)

    - Disabled driver:
    mailbox

    - Board defconfigs:
    imx8qxp_ddr3_arm2_defconfig
    imx8qxp_lpddr4_arm2_fspi_defconfig
    imx8qxp_ddr4_arm2_defconfig

    Signed-off-by: Ye Li

    Ye Li
     
  • Ported the DTS file from u-boot v2017.03 for i.MX8QXP LPDDR4 ARM2
    board and i.MX8QXP DDR3 ARM2 board.

    Signed-off-by: Ye Li

    Ye Li
     
  • Add board level codes and configs for i.MX8QM LPDDR4 ARM2 board
    and DDR4 ARM2 board.

    - Enabled DM driver:
    FEC, LPUART, LPI2C, GPIO, SD/MMC, FSPI, PCA953X, pinctrl, USB host(EHCI/XHCI)
    Power-domain, SC thermal

    - Enabled Non-DM driver:
    SATA, PCIE, fuse, iomux, video(IMXDPUV1), USB device(CI-UDC)

    - Disabled driver:
    mailbox

    - Board defconfigs:
    imx8qm_lpddr4_arm2_defconfig
    imx8qm_lpddr4_arm2_fspi_defconfig
    imx8qm_ddr4_arm2_defconfig

    Signed-off-by: Ye Li

    Ye Li
     
  • Ported the DTS files from u-boot v2017.03 for i.MX8QM LPDDR4 ARM2
    board and i.MX8QM DDR4 ARM2 board.

    Signed-off-by: Ye Li

    Ye Li
     
  • Copy the imx8qm DTS files and its binding header files from imx_4.9.y kernel
    (commit "MLK-16174: ASoC: fsl_hifi4: load firmware in device open phase.")

    Add extra support used in u-boot:
    1. Add alias for FSPI nodes
    2. Add GPIO alias which is used as seq number in u-boot DM GPIO driver.
    3. Ajust GPIO nodes ahead of i2c nodes. The PCA9557 is a i2c device, if we
    arrange the i2c nodes ahead of GPIO nodes, the GPIO seq number for PCA9557
    will overlay with GPIO nodes. This will cause issue to use GPIO in u-boot.
    4. Add i2c alias for i2c0 to i2c3.
    5. Add mipi0/mipi1 i2c0 controllers' nodes.
    6. Add "u-boot,dm-pre-reloc" to thermal node in QXP DTSi
    7. Add USB alias for OTG and USB3 ports.
    8. Sync power domains of display resources with kernel
    (commit "MLK-17978[IMX8QXP B0] Add a buffer null flag to ensure the buffer is not")
    9. Removed mmc alias

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

    Ye Li
     
  • Copy the imx8qm DTS files and its binding header files from imx_4.9.y kernel
    (commit "MLK-16174: ASoC: fsl_hifi4: load firmware in device open phase.")

    Add extra support used in u-boot:
    1. Add mbox-cells used for mailbox
    2. Add alias for FSPI nodes
    3. Add GPIO alias which is used as seq number in u-boot DM GPIO driver.
    4. Ajust GPIO nodes ahead of i2c nodes. The PCA9557 is a i2c device, if we
    arrange the i2c nodes ahead of GPIO nodes, the GPIO seq number for PCA9557
    will overlay with GPIO nodes. This will cause issue to use GPIO in u-boot.
    5. Add i2c alias for i2c0 to i2c4, i2c6 and i2c8.
    6. Modify ethernet alias index start from 0
    7. Add the usb alias for OTG and USB3.
    8. Add "u-boot,dm-pre-reloc" to thermal node to DTSi
    9. Sync power domains of display resources with kernel
    (commit "MLK-17978[IMX8QXP B0] Add a buffer null flag to ensure the buffer is not")
    10. Add "power-domains" property to all GPIO nodes and flexspi node, since
    they miss to add it.
    11. Add "simple-bus" compatible strings to imx8qm-pm node.
    12. Removed mmc alias

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

    Ye Li
     
  • Using SC thermal sensor to get temperature and print the CPU
    temperature at booting.

    Signed-off-by: Ye Li

    Ye Li
     
  • Add the DM thermal driver for i.MX8QM and QXP. The driver depends on DTB thermal
    sensor nodes. Will create device for each thermal in thermal-zones. User can
    use the thermal name to get the device from UCLASS_THERMAL.

    The driver flag is set to DM_FLAG_PRE_RELOC, to support run it at early stage,
    need add "u-boot,dm-pre-reloc" property to the thermal node.

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

    Ye Li
     
  • Add common functions for LVDS/DC setup, video framebuffer init/disable,
    LVDS to HDMI card settings, etc. Refactor it from video_imxdpuv1.c.
    1. Add power, clocks, PLL relevant setup for LVDS and DC.
    2. Configure the LVDS and its PHY settings for the display format and pixel link.
    3. Setup the LVDS to HDMI card.
    4. Implement the video_hw_init by calling DC driver API to output data to
    specified display panel.

    Signed-off-by: Oliver Brown
    Signed-off-by: Ye Li
    (cherry picked from commit 9317f7ea4d976335a633f7056bbac1f77b01247a)

    Ye Li
     
  • Adding new IMXDPUV1 (aka Seeris, Iris-lite) display control driver.

    Signed-off-by: Oliver Brown
    Signed-off-by: Ye Li
    (cherry picked from commit 43541cba14f851c6eebaa84becd42967f94a9cfd)

    Ye Li
     
  • There are some integer to pointer convert. To support 64 bits system,
    change the unsigned int to unsigned long.

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

    Ye Li
     
  • It is for imx8qm and imx8qxp, and the cadence IP is in it.

    Both DM and Non-DM are supported in this driver. The DM support
    only probes the USB3 node, but won't parse any properties from node in DTS.
    The registers address are still hard coded, that share with non-DM codes.

    The DM driver will enable the power of USB3 controller and USB3 PHY. But
    for Non-DM driver, users need to power up them in board level codes.

    Signed-off-by: Peter Chen
    Signed-off-by: Ye Li

    Peter Chen
     
  • Since there is no uclass for USB PHY. The device won't be setup for the USB PHY
    node in DTB. And its associated power domain device won't be turned on neither
    by DM framework.

    This patch modifies the ehci-mx6 driver to enable the power domain device before
    access the USB PHY. This is only for DM driver. For non-DM part, users still
    need to power on the USB PHY in boards/SoC codes.

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

    Ye Li
     
  • When the power domain driver is enabled, we need to enable clocks after power
    domain on. The clock settings in board level codes must be removed, needs to
    set them when the device is probed. Add this weak function in flexspi driver,
    that SoC codes can implement the clock settings.

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

    Ye Li
     
  • When the power domain driver is enabled, we need to enable clocks after power
    domain on. So the clock settings can't set in board_init, needs to set them
    when the device is probed. Add this weak function in driver, that SoC codes
    can implement the clock settings.

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

    Ye Li
     
  • When power domain driver is enabled, power on the power domain
    for the device be probed.

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

    Ye Li
     
  • Add power_domain_lookup_name interface to power domain uclass to find
    a power domain device by its DTB node name, not using its associated
    client device.

    Through this interface, we can operate the power domain devices directly.
    This is needed for non-DM drivers.

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

    Ye Li
     
  • Add the power domain DM driver for i.MX8, that it depends on the DTB
    power domain trees to generate the power domain provider devices. Users
    needs add power domain trees with property "compatible = "nxp,imx8-pd";"

    - When power on one PD device, the driver will power on its ancestor PD devices
    in power domain tree.

    - When power off on PD device, the driver will check its child PD devices first,
    only all child PD devices are off, then power off the current PD device. Then the
    driver checks sibling PD devices. If sibling PD devices are off, then it will power
    off parent PD device.

    - There is no counter maintained in this driver, but a state to hold current on/off
    state. So the request and free functions are empty.

    - The power domain implemetation in i.MX8 DTB set the "#power-domain-cells" to 0, so
    there is no ID binding with each PD device. We don't use "id" variable in
    struct power_domain. At same time, we have to set of_xlate to empty to bypass standard
    of_xlate in uclass driver.

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

    Ye Li
     
  • Add pinctrl driver for i.MX8 platform (QM/QXP). The driver can
    parse the iomuxc settings from DTB and set them through IPC to SCU.

    Enable CONFIG_PINCTRL_IMX8 to use this pinctrl driver.

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

    Ye Li
     
  • The i.MX8 has two USB controllers: USBOH and USB3. The USBOH reuses
    previous i.MX6/7. It has same PHY IP as i.MX7ULP but NC registers
    are same as i.MX7D. So add its support in ehci-mx6 driver.

    Also the driver is updated to remove build warning for 64 bits CPU.

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

    Ye Li
     
  • implement i.MX Messaging Unit driver within the DM Mailbox uclass

    Signed-off-by: Teo Hall
    Signed-off-by: Ye Li
    (cherry picked from commit 9caafe21ddf12c9ab994fe9e65dc7afe5e7bab3d)

    Teo Hall
     
  • Add a timeout to allow non-blocking use in the
    same way as mbox_recv

    Signed-off-by: Teo Hall
    (cherry picked from commit c2296701fa91dc8d4144c84c19ffe40dba3df88c)

    Teo Hall
     
  • Add support for iMX8 SoC platforms, and extend to support LSIO GPIO0..GPIO7 ports.
    Since the i.MX8 GPIO banks are indexed from 0 not 1 on other i.MX platforms,
    so we have to adjust the index accordingly.

    Signed-off-by: Adrian Alonso
    Signed-off-by: Ye Li
    (cherry picked from commit cb3eabdb56173a75495717bf88fbc1d04623f6d7)

    Adrian Alonso
     
  • i.MX8QM ROM didn't calculate the DLL correctly in some cases, to avoid
    the wrong DLL setting impact the following functions, reset them to the
    default value when probe.

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

    Han Xu
     
  • Update the LUT settings, spi_xfer to use the 4bytes address read/write/erase
    commands.
    Also add a function to enter the 4bytes mode for flash device.

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

    Ye Li