27 Apr, 2018

7 commits

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

    Signed-off-by: Ye Li

    Ye Li
     
  • When doing "i2c dev 4; i2c probe" with ENET daughter card connected on iMX8QXP MEK
    board, we met a i2c bus busy issue, that the BBF of lpi2c always show busy, but the
    master is idle, and stop is detected (SDF set).

    This patch addes a handling to re-init the lpi2c master for this case. Then the issue
    can be worked around.

    Signed-off-by: Ye Li
    Acked-by: Peng Fan
    (cherry picked from commit 6b4021d04c7f637fd60cf73f9cc46fdebc853790)

    Ye Li
     
  • In xfer function, both bus_i2c_read and bus_i2c_write will
    send a STOP command. This causes a problem when reading register
    data from i2c device.

    Generally two operations comprise the register data reading:
    1. Write the register address to i2c device.
    START | chip_addr | W | ACK | register_addr | ACK |

    2. Read the Data from i2c device.
    START | chip_addr | R | ACK | DATA | NACK | STOP

    The STOP command should happen at the end of the transfer, otherwise
    we will always get data from register address 0

    Signed-off-by: Ye Li
    Acked-by: Peng Fan
    (cherry picked from commit c8dac8ea2f07c4fb358b824365a1d345bab017fc)

    Ye Li
     
  • For LPI2C IP, NACK is detected by the rising edge of the ninth clock.
    In current uboot driver, once NACK is detected, it will reset and then
    disable LPI2C master. As a result, we can never see the falling edge
    of the ninth clock.

    Signed-off-by: Gao Pan
    (cherry picked from commit dd139ee52b709c95af3e0c968bcbc3cf42cca408)
    (cherry picked from commit 59643c7b34415c6a23e0d73a8aed9145b0220a47)

    Gao Pan
     
  • Add compatible string for i.MX8 and move imx_lpi2c.h from mx7ulp directory
    to u-boot include directory as a common header file.

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

    Ye Li
     
  • add dependency for CONFIG_SYS_I2C_MXC

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

    Peng Fan
     
  • Add the fuse checking in drivers, when the module is disabled in fuse,
    the driver will not work.

    Changed drivers: BEE, GPMI, APBH-DMA, ESDHC, FEC, QSPI, ECSPI, I2C,
    USB-EHCI, GIS, LCDIF and EPDC.

    Signed-off-by: Ye Li
    (cherry picked from commit 1704e116f9b39aeb99201919a18bc2b1e19a980e)
    (cherry picked from commit 2d3b5df8530cd5ef883750378838dea7c40259af)

    Ye Li
     

09 Mar, 2018

1 commit

  • The @gdsys.cc addresses are supposed to be used for mailing lists.
    Switch all occurrences of @gdsys.de mail addresses to their @gdsys.cc
    equivalent.

    Also, Dirk's address was wrong in one place; fix that as well.

    Signed-off-by: Mario Six

    Mario Six
     

01 Mar, 2018

4 commits


19 Feb, 2018

1 commit

  • Previous patch for this driver breaks i2c initialization.

    commit 8bcf12ccce89 ("i2c: mvtwsi.c: Avoid NULL dereference")

    If actual_speed is passed as NULL in this function:
    static void __twsi_i2c_init(struct mvtwsi_registers *twsi, int speed,
    int slaveadd, uint *actual_speed)
    than __twsi_i2c_set_bus_speed never get called. This causes i2c clock
    to run on default speed - 2MHz (measured with oscilloscope). This is issue
    on some boards, sunxi for example, since on I2C0 bus PMU is connected.

    The bootlogs with and without the patch are as follows:

    Wihtout the patch:
    U-Boot SPL 2018.03-rc2 (Feb 13 2018 - 09:23:17 +0200)
    DRAM: 1024 MiB
    Failed to set core voltage! Can't set CPU frequency
    Trying to boot from FEL

    U-Boot 2018.03-rc2 (Feb 13 2018 - 09:23:17 +0200) Allwinner Technology

    CPU: Allwinner A20 (SUN7I)
    Model: Olimex A20-OLinuXino-LIME2
    I2C: ready
    DRAM: 1 GiB
    MMC: SUNXI SD/MMC: 0

    With the patch:
    U-Boot SPL 2018.03-rc2-00001-g838ff85 (Feb 13 2018 - 09:24:34 +0200)
    DRAM: 1024 MiB
    CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
    Trying to boot from FEL

    U-Boot 2018.03-rc2-00001-g838ff85 (Feb 13 2018 - 09:24:34 +0200) Allwinner Technology

    CPU: Allwinner A20 (SUN7I)
    Model: Olimex A20-OLinuXino-LIME2
    I2C: ready
    DRAM: 1 GiB
    MMC: SUNXI SD/MMC: 0

    Signed-off-by: Stefan Mavrodiev
    Reviewed-by: Heiko Schocher

    Stefan Mavrodiev
     

18 Feb, 2018

1 commit


06 Feb, 2018

7 commits


31 Jan, 2018

1 commit


16 Jan, 2018

2 commits


07 Dec, 2017

6 commits

  • The .probe_chip function is supposed to probe an i2c device on the bus to
    determine whether a device is answering to a particular address.
    at91_i2c_probe_chip() did not do anything resembling this and always
    returned 0.

    It looks as though at91_i2c_probe_chip() was intended to be a .probe
    function for the controller, as it was copied-and-pasted to become
    at91_i2c_probe() in 0bc8f640a4d7ed.

    Removing the at91_i2c_probe_chip() function makes the higher layer
    (i2c_probe_chip()) try a zero-length read transfer to test for the
    presence of a device instead, which does work.

    Signed-off-by: Alan Ott
    Acked-by: Wenyou Yang
    Reviewed-by: Heiko Schocher

    Alan Ott
     
  • The driver must wait for TXRDY after each byte is pushed into
    the i2c FIFO before pushing the next byte. Previously this was
    not done for the first byte, causing a race condition with zeros
    sometimes being sent for the next byte (which is typically the
    first actual data byte).

    Signed-off-by: Alan Ott
    Reviewed-by: Heiko Schocher

    Alan Ott
     
  • Add some comment describing the purpose of struct members and
    functions.

    Signed-off-by: Beniamino Galvani
    Reviewed-by: Simon Glass
    Reviewed-by: Heiko Schocher

    Beniamino Galvani
     
  • Change meson_i2c_xfer_msg() to return -EREMOTEIO in case of NACK, as
    done by other drivers. Also, don't change the return error in
    meson_i2c_xfer().

    Signed-off-by: Beniamino Galvani
    Reviewed-by: Simon Glass
    Reviewed-by: Heiko Schocher

    Beniamino Galvani
     
  • The datasheet doesn't specify a suggested timeout and 500ms seems very
    long: reduce it to 100ms.

    Signed-off-by: Beniamino Galvani
    Reviewed-by: Simon Glass
    Reviewed-by: Heiko Schocher

    Beniamino Galvani
     
  • Expand the Kconfig description with hardware features.

    Signed-off-by: Beniamino Galvani
    Reviewed-by: Simon Glass
    Reviewed-by: Heiko Schocher

    Beniamino Galvani
     

30 Nov, 2017

1 commit


27 Nov, 2017

1 commit


20 Nov, 2017

2 commits


27 Oct, 2017

2 commits


17 Oct, 2017

3 commits


15 Oct, 2017

1 commit