linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Valentin Longchamp <valentin.longchamp@keymile.com>
To: Linux PowerPC Kernel <linuxppc-dev@lists.ozlabs.org>,
	Linux device trees <devicetree@vger.kernel.org>,
	Linux I2C <linux-i2c@vger.kernel.org>,
	Scott Wood <scottwood@freescale.com>
Cc: Rainer Boschung <rainer.boschung@keymile.com>,
	Valentin Longchamp <valentin.longchamp@keymile.com>,
	Holger Brunck <holger.brunck@keymile.com>
Subject: [PATCH] i2c-qoriq: modified compatibility for correct prescaler
Date: Fri, 17 Oct 2014 11:27:06 +0200	[thread overview]
Message-ID: <1413538026-15739-1-git-send-email-valentin.longchamp@keymile.com> (raw)

With "fsl-i2c" compatibility the i2c frequency is not set
correctly, because it sets no prescaler. According to the AN2919 from
Freescale and the QorIQ (P2041) documentation, the source clock is 1/2
the platform clock. This implies that a prescaler of 2 must be used.

This changes the compatibility of the qoriq-i2c .dtsi files to pick the
mpc8543, which uses the same driver but sets the correct prescaler.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
---

 arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi | 4 ++--
 arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi
index 5f9bf7d..aa6c366 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi
@@ -36,7 +36,7 @@ i2c@118000 {
 	#address-cells = <1>;
 	#size-cells = <0>;
 	cell-index = <0>;
-	compatible = "fsl-i2c";
+	compatible = "fsl,mpc8543-i2c", "fsl-i2c";
 	reg = <0x118000 0x100>;
 	interrupts = <38 2 0 0>;
 	dfsrr;
@@ -46,7 +46,7 @@ i2c@118100 {
 	#address-cells = <1>;
 	#size-cells = <0>;
 	cell-index = <1>;
-	compatible = "fsl-i2c";
+	compatible = "fsl,mpc8543-i2c", "fsl-i2c";
 	reg = <0x118100 0x100>;
 	interrupts = <38 2 0 0>;
 	dfsrr;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi
index 7989bf5..b697a3b 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi
@@ -36,7 +36,7 @@ i2c@119000 {
 	#address-cells = <1>;
 	#size-cells = <0>;
 	cell-index = <2>;
-	compatible = "fsl-i2c";
+	compatible = "fsl,mpc8543-i2c", "fsl-i2c";
 	reg = <0x119000 0x100>;
 	interrupts = <39 2 0 0>;
 	dfsrr;
@@ -46,7 +46,7 @@ i2c@119100 {
 	#address-cells = <1>;
 	#size-cells = <0>;
 	cell-index = <3>;
-	compatible = "fsl-i2c";
+	compatible = "fsl,mpc8543-i2c", "fsl-i2c";
 	reg = <0x119100 0x100>;
 	interrupts = <39 2 0 0>;
 	dfsrr;
-- 
1.8.0.1

             reply	other threads:[~2014-10-17  9:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17  9:27 Valentin Longchamp [this message]
2014-10-28 23:08 ` [PATCH] i2c-qoriq: modified compatibility for correct prescaler Scott Wood
2014-10-29  8:59   ` Valentin Longchamp
2014-11-06 21:58     ` Scott Wood
2014-11-13  0:34     ` Wolfram Sang
2014-11-14  7:43       ` Valentin Longchamp
2014-11-14  8:28         ` Wolfram Sang
2014-11-18  1:28           ` Scott Wood
2014-11-25 18:13             ` Wolfram Sang
2014-11-26  1:41               ` Scott Wood
2014-11-30  4:30                 ` Danielle Costantino
2014-12-01 17:23                   ` Wolfram Sang
2014-12-11 13:44                 ` Valentin Longchamp
2014-12-23 13:23                   ` Valentin Longchamp
2014-12-23 13:49                     ` Wolfram Sang
2014-12-27  2:43                       ` Scott Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413538026-15739-1-git-send-email-valentin.longchamp@keymile.com \
    --to=valentin.longchamp@keymile.com \
    --cc=devicetree@vger.kernel.org \
    --cc=holger.brunck@keymile.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=rainer.boschung@keymile.com \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).