Skip to content

Commit 58e7b1d

Browse files
ldesrochesNicolas Ferre
authored andcommitted
ARM: at91: sama5d3: reduce TWI internal clock frequency
With some devices, transfer hangs during I2C frame transmission. This issue disappears when reducing the internal frequency of the TWI IP. Even if it is indicated that internal clock max frequency is 66MHz, it seems we have oversampling on I2C signals making TWI believe that a transfer in progress is done. This fix has no impact on the I2C bus frequency. Cc: <stable@vger.kernel.org> #3.10+ Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
1 parent 6ce4eac commit 58e7b1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/arm/mach-at91/sama5d3.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,19 @@ static struct clk twi0_clk = {
9595
.name = "twi0_clk",
9696
.pid = SAMA5D3_ID_TWI0,
9797
.type = CLK_TYPE_PERIPHERAL,
98-
.div = AT91_PMC_PCR_DIV2,
98+
.div = AT91_PMC_PCR_DIV8,
9999
};
100100
static struct clk twi1_clk = {
101101
.name = "twi1_clk",
102102
.pid = SAMA5D3_ID_TWI1,
103103
.type = CLK_TYPE_PERIPHERAL,
104-
.div = AT91_PMC_PCR_DIV2,
104+
.div = AT91_PMC_PCR_DIV8,
105105
};
106106
static struct clk twi2_clk = {
107107
.name = "twi2_clk",
108108
.pid = SAMA5D3_ID_TWI2,
109109
.type = CLK_TYPE_PERIPHERAL,
110-
.div = AT91_PMC_PCR_DIV2,
110+
.div = AT91_PMC_PCR_DIV8,
111111
};
112112
static struct clk mmc0_clk = {
113113
.name = "mci0_clk",

0 commit comments

Comments
 (0)