diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-06-12 12:53:32 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-06-15 07:37:48 -0400 |
commit | 3d66ac7d81ac70dfaab8a573f7ad2be94f7d6da3 (patch) | |
tree | b12ae02330d6bda6d94b4db3fdd31e4742aa578b /drivers/i2c | |
parent | 004e8ed7cc67f4ba07cba95af269210db11a544c (diff) |
i2c: mv64xxx: Add Allwinner sun4i compatible
Add the compatible string for the Allwinner A10 i2c controller and the
associated register layout.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/Kconfig | 3 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-mv64xxx.c | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 6582611bfee6..96c6d82da3ed 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
@@ -497,10 +497,11 @@ config I2C_MPC | |||
497 | 497 | ||
498 | config I2C_MV64XXX | 498 | config I2C_MV64XXX |
499 | tristate "Marvell mv64xxx I2C Controller" | 499 | tristate "Marvell mv64xxx I2C Controller" |
500 | depends on (MV64X60 || PLAT_ORION) | 500 | depends on (MV64X60 || PLAT_ORION || ARCH_SUNXI) |
501 | help | 501 | help |
502 | If you say yes to this option, support will be included for the | 502 | If you say yes to this option, support will be included for the |
503 | built-in I2C interface on the Marvell 64xxx line of host bridges. | 503 | built-in I2C interface on the Marvell 64xxx line of host bridges. |
504 | This driver is also used for Allwinner SoCs I2C controllers. | ||
504 | 505 | ||
505 | This driver can also be built as a module. If so, the module | 506 | This driver can also be built as a module. If so, the module |
506 | will be called i2c-mv64xxx. | 507 | will be called i2c-mv64xxx. |
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index 7ba9bac18478..7a0e39b7f928 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c | |||
@@ -129,6 +129,16 @@ static struct mv64xxx_i2c_regs mv64xxx_i2c_regs_mv64xxx = { | |||
129 | .soft_reset = 0x1c, | 129 | .soft_reset = 0x1c, |
130 | }; | 130 | }; |
131 | 131 | ||
132 | static struct mv64xxx_i2c_regs mv64xxx_i2c_regs_sun4i = { | ||
133 | .addr = 0x00, | ||
134 | .ext_addr = 0x04, | ||
135 | .data = 0x08, | ||
136 | .control = 0x0c, | ||
137 | .status = 0x10, | ||
138 | .clock = 0x14, | ||
139 | .soft_reset = 0x18, | ||
140 | }; | ||
141 | |||
132 | static void | 142 | static void |
133 | mv64xxx_i2c_prepare_for_io(struct mv64xxx_i2c_data *drv_data, | 143 | mv64xxx_i2c_prepare_for_io(struct mv64xxx_i2c_data *drv_data, |
134 | struct i2c_msg *msg) | 144 | struct i2c_msg *msg) |
@@ -509,6 +519,7 @@ static const struct i2c_algorithm mv64xxx_i2c_algo = { | |||
509 | ***************************************************************************** | 519 | ***************************************************************************** |
510 | */ | 520 | */ |
511 | static const struct of_device_id mv64xxx_i2c_of_match_table[] = { | 521 | static const struct of_device_id mv64xxx_i2c_of_match_table[] = { |
522 | { .compatible = "allwinner,sun4i-i2c", .data = &mv64xxx_i2c_regs_sun4i}, | ||
512 | { .compatible = "marvell,mv64xxx-i2c", .data = &mv64xxx_i2c_regs_mv64xxx}, | 523 | { .compatible = "marvell,mv64xxx-i2c", .data = &mv64xxx_i2c_regs_mv64xxx}, |
513 | {} | 524 | {} |
514 | }; | 525 | }; |