Commit Graph

526 Commits

Author SHA1 Message Date
Peng Fan 7ee3f149fe i2c: lpi2c: add lpi2c driver for i.MX7ULP
Add lpi2c driver for i.MX7ULP.
Need to enable the two options to use this driver:
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_IMX_LPI2C=y

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2017-03-17 09:27:08 +01:00
Tom Rini 645cb46e2b fsl_i2c.c: Fix warning on gcc-6.x
With gcc-6.x we see:
drivers/i2c/fsl_i2c.c:86:3: warning: ‘fsl_i2c_speed_map’ defined but not
used [-Wunused-const-variable=]

The easy way to fix this is that since we only use fsl_i2c_speed_map at
all on __M68K__ move the existing guards around slightly.

Reported-by: Thomas Schaefer <Thomas.Schaefer@kontron.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Heiko Schocher <hs@denx.de>
2017-02-17 14:15:12 -05:00
Masahiro Yamada c77c7db58e i2c: sandbox: remove code snippet from Kconfig help
With the Kconfig re-sync with Linux 4.10, characters such as
'}', ';' in Kconfig help message cause warnings:

$ make defconfig
*** Default configuration is based on 'sandbox_defconfig'
drivers/i2c/Kconfig:132:warning: ignoring unsupported character '}'
drivers/i2c/Kconfig:132:warning: ignoring unsupported character ';'

Drop the Device Tree fragment from the help.

Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-02-13 07:18:25 -05:00
Simon Glass e160f7d430 dm: core: Replace of_offset with accessor
At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree, which uses a node pointer instead, refactor existing code to
access this field through an inline function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-02-08 06:12:14 -07:00
Masahiro Yamada 68578582ab i2c: uniphier-f: use readl_poll_timeout() to poll registers
The readl_poll_timeout() is a useful helper to poll registers
and error out if the condition is not met.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-29 20:59:08 +09:00
Masahiro Yamada 800acb850e i2c: uniphier(-f): remove unneeded #include <dm/root.h>
This include is unnecessary for low-level drivers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-01-29 20:59:08 +09:00
Tom Rini 755b06d1c0 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2017-01-18 07:21:33 -05:00
Tom Rini 2c45f8040e Merge git://git.denx.de/u-boot-samsung 2017-01-18 07:21:12 -05:00
Moritz Fischer 19cdd5c5be i2c: i2c-cdns: No need for dedicated probe function
The generic probe code in dm works, so get rid of the leftover cruft.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: u-boot@lists.denx.de
2017-01-18 06:39:01 +01:00
Moritz Fischer 08c11aaefb i2c: i2c-cdns: Implement workaround for hold quirk of the rev 1.0
Revision 1.0 of this IP has a quirk where if during a long read transfer
the transfer_size register will go to 0, the master will send a NACK to
the slave prematurely.
The way to work around this is to reprogram the transfer_size register
mid-transfer when the only the receive fifo is known full, i.e. the I2C
bus is known non-active.
The workaround is based on the implementation in the linux-kernel.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: u-boot@lists.denx.de
2017-01-18 06:38:20 +01:00
Moritz Fischer 0ec0c58643 i2c: i2c-cdns: Reorder timeout loop for interrupt waiting
Reorder the timeout loop such that we first check if the
condition is already true, and then call udelay() so if
the condition is already true, break early.

Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: u-boot@lists.denx.de
2017-01-18 06:38:14 +01:00
Moritz Fischer 5e42985208 i2c: i2c-cdns: Detect unsupported sequences for rev 1.0
Revision 1.0 of this IP has a couple of issues, such as not supporting
repeated start conditions for read transfers.

So scan through the list of i2c messages for these conditions
and report an error if they are attempted.

This has been fixed for revision 1.4 of the IP, so only report the error
when the IP can really not do it.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: u-boot@lists.denx.de
2017-01-18 06:38:06 +01:00
Moritz Fischer 12e8d58415 i2c: mux: Allow muxes to work as children of i2c bus without i2c-parent
For mux check if the parent is already a device of UCLASS_I2C and if yes
just use that. Otherwise see if someone specified an i2c-parent phandle.
This mimics the behavior found in the Kernel, as it removes the
requirement to explicitly specify a i2c-parent phandle.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: u-boot@lists.denx.de
2017-01-18 06:37:57 +01:00
Jaehoon Chung 1d61ad959e i2c: Kconfig: Add SYS_I2C_S3C24X0 entry
Adding Kconfig for SYS_I2C_S3C24X0.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2017-01-18 13:25:56 +09:00
Jaehoon Chung a298712e94 i2c: s3c24x0: fix the compiler error for exynos4
If CONFIG_SYS_I2C_S3C24X0_SLAVE isn't defined, then complie error should
be occurred.
This patch is for preventing it.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2017-01-18 13:25:56 +09:00
Moritz Fischer 50994ab757 i2c: cdns: Add additional compatible string for r1p14 of the IP.
Adding additional compatible string for version 1.4 of the IP block.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-10 10:18:12 +01:00
Tom Rini 2346511961 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2016-12-20 08:41:54 -05:00
Bradley Bolen 77466267eb i2c: mv_i2c.c: Correct address endianness
0c0f719ad2 accidentally changed the
endianness of the i2c read and write addresses.  This was noticable when
accessing EEPROMs that use 2 byte addressing as the LSB was being sent
first.

Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2016-12-19 09:32:00 +01:00
Jagan Teki 2da24fe551 i2c: mxc: Make 'no gpio pinctrl state' print as debug
Some I2C bus devicetree nodes, doesn't require to have
gpio pinctrl so replace the dev_info to debug so the
print never comes on the console and for bus that uses
gpio pinctrl anyway have dev_err.

Before:
------
U-Boot> i2c dev 1
Setting bus to 1
i2c bus 1 at 0x21a4000, no gpio pinctrl state.

After:
------
U-Boot> i2c dev 1
Setting bus to 1

Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Heiko Schocher <hs@denx.de>
2016-12-16 17:15:27 +01:00
Jagan Teki 65c92e4f39 i2c: mxc: Print hex instead of decimal for bus address
Better to print the hex value for bus address instead of
decimal, for more readbility on bus addressing.

Before:
------
U-Boot> i2c dev 1
Setting bus to 1
i2c bus 1 at 35274752, no gpio pinctrl state.

After:
------
U-Boot> i2c dev 1
Setting bus to 1
i2c bus 1 at 0x21a4000, no gpio pinctrl state.

Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Heiko Schocher <hs@denx.de>
2016-12-16 17:15:27 +01:00
Jagan Teki 72c8c10b73 i2c: Kconfig: Add SYS_I2C_MXC entry
Added kconfig for SYS_I2C_MXC driver.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2016-12-16 17:15:27 +01:00
Simon Glass 2852709676 dm: i2c: Add a note to I2C drivers which need conversion
Maintainers need to be notified more directly of the need to convert these
drivers. Add a note to the top each affected file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2016-12-05 13:28:03 +01:00
Simon Glass 37b8eb37f8 samsung: i2c: Split the high-speed I2C code into a new driver
Now that driver model is used for I2C on all boards, we can split the
high-speed code into its own driver. There is virtually no common code,
and this significantly reduces confusion.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2016-12-05 13:27:54 +01:00
Simon Glass 9a1bff69cd samsung: i2c: Drop old code from I2C driver
Now that all boards use DM_I2C we can drop the old code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2016-12-05 13:27:41 +01:00
Jagan Teki aec9a0f19f sunxi: Rename CONFIG_SUNXI to CONFIG_ARCH_SUNXI
CONFIG_SUNXI -> CONFIG_ARCH_SUNXI
and removed CONFIG_SUNIX from config_whitelist.txt

Cc: Simon Glass <sjg@chromium.org>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-10-30 11:38:04 +01:00
Tom Rini 1df182ddf7 Merge branch 'master' of git://git.denx.de/u-boot-atmel 2016-10-28 14:14:18 -04:00
Wenyou Yang 52f37333bc i2c: at91_i2c: Change error return -ENODEV to -EINVAL
Change the error return value -ENODEV from to -EINVAL for more
reasonable.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2016-10-28 18:37:14 +02:00
Wenyou Yang 2ccc07bbdc i2c: at91_i2c: Remove unnecessary clock calling
Due to the peripheral clock driver improvement, remove the
unnecessary clock calling.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2016-10-28 18:37:14 +02:00
Marek Vasut b03380805b i2c: designware: Avoid overwriting the cmd_data register
Make sure the driver writes the cmd_data register only once per
read transfer instead of doing so potentially repeatedly.

In case the read transfer didn't finish quickly enough, the loop
in the driver code would spin fast enough to write the same value
into the cmd_data register again before re-checking whether the
transfer completed, which would cause another spurious read transfer
on the bus.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
2016-10-24 18:15:47 +02:00
Simon Glass b02e4044ff libfdt: Bring in upstream stringlist functions
These have now landed upstream. The naming is different and in one case the
function signature has changed. Update the code to match.

This applies the following upstream commits by
Thierry Reding <treding@nvidia.com> :

   604e61e fdt: Add functions to retrieve strings
   8702bd1 fdt: Add a function to get the index of a string
   2218387 fdt: Add a function to count strings

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-10-13 13:54:10 -06:00
Simon Glass fac3e796b9 x86: i2c: Fix cast of address to 32-bit value
This gives a build warning on 64-bit x86. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-10-11 11:55:33 +08:00
Moritz Fischer 6d1a718fdf cros_ec: Honor the google,remote-bus dt property
Boards where ECs that use a I2C port != 0 specify this in the
devicetree file via the google,remote-bus property.
Previously this was ignored and hardcoded to port 0.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
Cc: u-boot@lists.denx.de
Acked-by: Simon Glass <sjg@chromium.org>
2016-10-08 09:33:36 -04:00
Stephen Warren fc607d9ab9 i2c: tegra: only use new clock/reset APIs
Now that the standard clock/reset APIs are available for all Tegra SoCs,
convert the I2C driver to use them exclusively, and remove any references
to the custom Tegra-specific APIs.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-09-27 09:11:03 -07:00
Stefan Roese 87de0eb31c i2c: mvtwsi.c: Add support for Marvell Armada 7K/8K
By adding the "marvell,mv78230-i2c" compatible property, we can enable
this I2C driver to support these new ARM64 chips as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Neta Zur Hershkovits <neta@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Omri Itach <omrii@marvell.com>
Cc: Igal Liberman <igall@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Heiko Schocher <hs@denx.de>
2016-09-26 10:43:10 +02:00
jinghua 85f03f0ea8 i2c: mv_i2c.c: Validate read length in I2C command
The I2C bus will get stuck when reading 0 byte. So we add validation of
the read length in i2c_read(). This issue only occurs on read operation.

Signed-off-by: jinghua <jinghua@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Heiko Schocher <hs@denx.de>
2016-09-26 10:42:56 +02:00
Stefan Roese 9ad5a00712 i2c: mv_i2c.c: Enable runtime speed selection (standard vs fast mode)
This patch adds runtime speed configuration to the mv_i2c driver.
Currently standard (max 100kHz) and fast mode (max 400kHz) are
supported.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Heiko Schocher <hs@denx.de>
2016-09-26 10:42:37 +02:00
Stefan Roese 0c0f719ad2 i2c: mv_i2c.c: Add DM support
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Heiko Schocher <hs@denx.de>
2016-09-26 10:41:59 +02:00
Stefan Roese 7b46ee521e i2c: mv_i2c.c: Prepare driver for DM conversion
To prepare for the DM conversion, we add a layer of compatibility
functions to be used by both the legacy and the DM functions.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Heiko Schocher <hs@denx.de>
2016-09-26 10:41:17 +02:00
Stefan Roese 340fcd66cc i2c: mv_i2c.c: Remove CONFIG_HARD_I2C
CONFIG_HARD_I2C is not needed, lets remove it.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Heiko Schocher <hs@denx.de>
2016-09-26 10:41:03 +02:00
Stefan Roese 8eff909a56 i2c: mv_i2c.c: cosmetic: Coding style cleanups
Some mostly indentation coding style cleanups. Also, move this driver
to use debug() for debug output.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Heiko Schocher <hs@denx.de>
2016-09-26 10:40:41 +02:00
Masahiro Yamada 1221ce459d treewide: replace #include <asm/errno.h> with <linux/errno.h>
Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have
the same content.  (both just wrap <asm-generic/errno.h>)

Replace all include directives for <asm/errno.h> with <linux/errno.h>.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[trini: Fixup include/clk.]
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-09-23 17:55:42 -04:00
Wenyou Yang 76062b9cdb i2c: at91_i2c: Fix the wrong include file
Since the 'clk_client.h' doesn't exist, it should be 'clk.h'.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-09-13 06:58:54 +02:00
John Keeping 21d4b7d4e1 rockchip: i2c: fix >32 byte writes
The special handling of the chip address and register address must only
happen before we send the data buffer, otherwise we will end up
inserting both of these every 32 bytes.

Signed-off-by: John Keeping <john@metanate.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-09-13 06:57:27 +02:00
John Keeping 551288bd8b rockchip: i2c: move register write out of inner loop
There is no point in writing intermediate values to the txdata
registers.

Also add padding to the debug logging to make it easier to read when
there are leading zeroes.

Signed-off-by: John Keeping <john@metanate.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-09-13 06:57:16 +02:00
John Keeping 80333fd85c rockchip: i2c: use named constant when appropriate
Make it clear that we are using the same value in two adjacent lines.

Signed-off-by: John Keeping <john@metanate.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-09-13 06:57:05 +02:00
Tom Rini da968c7bfa Merge branch 'master' of git://git.denx.de/u-boot-i2c 2016-08-26 07:42:06 -04:00
Stefan Roese 03d6cd972e i2c: mvtwsi: Fix order of address bytes (high to low)
Patch f8a10ed1 [i2c: mvtwsi: Make address length variable] accidentally
inverted the sequence of address bytes sent to the I2C device. This
patch corrects this by sending the highest byte first and the lowest
byte last again.

Tested on theadorable Armada-XP board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Heiko Schocher <hs@denx.de>
2016-08-26 07:02:49 +02:00
Stephen Warren 6002c75c59 ARM: tegra: remove stale nvidia, bpmp I2C DT property
The nvidia,bpmp property is left over from an old BPMP I2C binding, and
shouldn't be present. Remove it from the SoC DT file, and update the
I2C driver not to parse it; the value wasn't used for anything any more
anyway.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-08-25 13:48:11 -07:00
Stephen Warren b4ee081e5a ARM: tegra: fix Tegra186 I2C clock name
The Tegra I2C binding dictates that the clock name for the Tegra I2C clock
be "div-clk" not "i2c". Fix the Tegra186 DT and I2C driver to honor this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-08-25 13:47:49 -07:00
Stefan Roese ca6c5e03f1 i2c: intel_i2c: SMBus driver PCI addition (e.g. BayTrail)
This patch adds support for the SMBus block read/write functionality.
Other protocols like the SMBus quick command need to get added
if this is needed.

This patch also removed the SMBus related defines from the Ivybridge
pch.h header. As they are integrated in this driver and should be
used from here. This change is added in this patch to avoid compile
breakage to keep the source git bisectable.

Tested on a congatec BayTrail board to configure the SMSC2513 USB
hub.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
Cc: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-16 11:44:09 +08:00