提交 1d5b4c0f 编写于 作者: P Peter Korsgaard 提交者: Russell King

ARM: 6406/1: at91sam9g45: fix i2c bus speed

Use a correct udelay value to get bus speed around 100KHz. The udelay
value was most likely copied from the older devices, but the 9g45
is signicantly faster (400MHz, DDR, ..), so a udelay of 2 gives a
bus speed of around 190KHz, which is too fast for some devices.
A udelay value of 5 gives a bus speed of around 90KHz here.
Signed-off-by: NPeter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 94bf2758
...@@ -426,7 +426,7 @@ static struct i2c_gpio_platform_data pdata_i2c0 = { ...@@ -426,7 +426,7 @@ static struct i2c_gpio_platform_data pdata_i2c0 = {
.sda_is_open_drain = 1, .sda_is_open_drain = 1,
.scl_pin = AT91_PIN_PA21, .scl_pin = AT91_PIN_PA21,
.scl_is_open_drain = 1, .scl_is_open_drain = 1,
.udelay = 2, /* ~100 kHz */ .udelay = 5, /* ~100 kHz */
}; };
static struct platform_device at91sam9g45_twi0_device = { static struct platform_device at91sam9g45_twi0_device = {
...@@ -440,7 +440,7 @@ static struct i2c_gpio_platform_data pdata_i2c1 = { ...@@ -440,7 +440,7 @@ static struct i2c_gpio_platform_data pdata_i2c1 = {
.sda_is_open_drain = 1, .sda_is_open_drain = 1,
.scl_pin = AT91_PIN_PB11, .scl_pin = AT91_PIN_PB11,
.scl_is_open_drain = 1, .scl_is_open_drain = 1,
.udelay = 2, /* ~100 kHz */ .udelay = 5, /* ~100 kHz */
}; };
static struct platform_device at91sam9g45_twi1_device = { static struct platform_device at91sam9g45_twi1_device = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册