* [GIT PULL] Renesas ARM Based SoC Fixes for v3.18
@ 2014-11-17 2:45 Simon Horman
2014-11-17 2:45 ` [PATCH] ARM: shmobile: kzm9g legacy: Set i2c clks_per_count to 2 Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Simon Horman @ 2014-11-17 2:45 UTC (permalink / raw)
To: linux-arm-kernel
Hi Olof, Hi Kevin, Hi Arnd,
Please consider these Renesas ARM based SoC fixes for v3.18.
Or alternatively for v3.19 if you feel they are too late for v3.18.
* ARM: shmobile: kzm9g legacy: Set i2c clks_per_count
This problem appears to have been introduced when i2c shmobile support was
added to the sh73a0 by b028f94b76319e1b8 ("ARM: mach-shmobile: sh73a0
i2c_shmobile support.") in v2.6.37.
Without this fix i2c may not operate correctly on the sh73a0/kzm9g.
The following changes since commit f114040e3ea6e07372334ade75d1ee0775c355e1:
Linux 3.18-rc1 (2014-10-19 18:08:38 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc-fixes-for-v3.18
for you to fetch changes up to b207422bb92f17f4f892a9b8737d44b37fece25b:
ARM: shmobile: kzm9g legacy: Set i2c clks_per_count to 2 (2014-11-12 10:38:30 +0900)
----------------------------------------------------------------
Renesas ARM Based SoC Fixes for v3.18
* Set i2c clks_per_count to 2 on kzm9g
----------------------------------------------------------------
Geert Uytterhoeven (1):
ARM: shmobile: kzm9g legacy: Set i2c clks_per_count to 2
arch/arm/mach-shmobile/setup-sh73a0.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] ARM: shmobile: kzm9g legacy: Set i2c clks_per_count to 2
2014-11-17 2:45 [GIT PULL] Renesas ARM Based SoC Fixes for v3.18 Simon Horman
@ 2014-11-17 2:45 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2014-11-17 2:45 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
On sh73a0/kzm9g-legacy, probing of the i2c masters fails with:
i2c-sh_mobile i2c-sh_mobile.0: timing values out of range: L/H=0x208/0x1bf
sh_mobile: probe of i2c-sh_mobile.0 failed with error -22
According to the datasheet, the transfer rate is derived from the HP
clock (which runs at 104 MHz) divided by two. Hence
i2c_sh_mobile_platform_data.clks_per_count should be set to two.
Now probing succeeds, and i2c works:
i2c-sh_mobile i2c-sh_mobile.0: I2C adapter 0 with bus speed 100000 Hz (L/H=0x104/0xe0)
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-sh73a0.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index b7bd8e5..328657d 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -26,6 +26,7 @@
#include <linux/of_platform.h>
#include <linux/delay.h>
#include <linux/input.h>
+#include <linux/i2c/i2c-sh_mobile.h>
#include <linux/io.h>
#include <linux/serial_sci.h>
#include <linux/sh_dma.h>
@@ -192,11 +193,18 @@ static struct resource i2c4_resources[] = {
},
};
+static struct i2c_sh_mobile_platform_data i2c_platform_data = {
+ .clks_per_count = 2,
+};
+
static struct platform_device i2c0_device = {
.name = "i2c-sh_mobile",
.id = 0,
.resource = i2c0_resources,
.num_resources = ARRAY_SIZE(i2c0_resources),
+ .dev = {
+ .platform_data = &i2c_platform_data,
+ },
};
static struct platform_device i2c1_device = {
@@ -204,6 +212,9 @@ static struct platform_device i2c1_device = {
.id = 1,
.resource = i2c1_resources,
.num_resources = ARRAY_SIZE(i2c1_resources),
+ .dev = {
+ .platform_data = &i2c_platform_data,
+ },
};
static struct platform_device i2c2_device = {
@@ -211,6 +222,9 @@ static struct platform_device i2c2_device = {
.id = 2,
.resource = i2c2_resources,
.num_resources = ARRAY_SIZE(i2c2_resources),
+ .dev = {
+ .platform_data = &i2c_platform_data,
+ },
};
static struct platform_device i2c3_device = {
@@ -218,6 +232,9 @@ static struct platform_device i2c3_device = {
.id = 3,
.resource = i2c3_resources,
.num_resources = ARRAY_SIZE(i2c3_resources),
+ .dev = {
+ .platform_data = &i2c_platform_data,
+ },
};
static struct platform_device i2c4_device = {
@@ -225,6 +242,9 @@ static struct platform_device i2c4_device = {
.id = 4,
.resource = i2c4_resources,
.num_resources = ARRAY_SIZE(i2c4_resources),
+ .dev = {
+ .platform_data = &i2c_platform_data,
+ },
};
static const struct sh_dmae_slave_config sh73a0_dmae_slaves[] = {
--
2.1.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-17 2:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 2:45 [GIT PULL] Renesas ARM Based SoC Fixes for v3.18 Simon Horman
2014-11-17 2:45 ` [PATCH] ARM: shmobile: kzm9g legacy: Set i2c clks_per_count to 2 Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).