From patchwork Fri Oct 17 09:27:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Longchamp X-Patchwork-Id: 400488 X-Patchwork-Delegate: michael@ellerman.id.au Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D0EEF1400B2 for ; Fri, 17 Oct 2014 20:33:45 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 956431A1A77 for ; Fri, 17 Oct 2014 20:33:45 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org X-Greylist: delayed 349 seconds by postgrey-1.34 at bilbo; Fri, 17 Oct 2014 20:33:07 AEDT Received: from mail-de.keymile.com (mail-de.keymile.com [195.8.104.250]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 117731A0382 for ; Fri, 17 Oct 2014 20:33:07 +1100 (AEDT) Received: from frodo.de.keymile.net ([10.9.1.54]:36452 helo=mailrelay.de.keymile.net) by mail-de.keymile.com with esmtp (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1Xf3oU-00013H-2m; Fri, 17 Oct 2014 11:27:10 +0200 Received: from ch10650.keymile.net (ch10650.keymile.net [172.31.40.247]) by mailrelay.de.keymile.net (8.12.2/8.12.2) with ESMTP id s9H9R6oD008075; Fri, 17 Oct 2014 11:27:07 +0200 (MEST) From: Valentin Longchamp To: Linux PowerPC Kernel , Linux device trees , Linux I2C , Scott Wood Subject: [PATCH] i2c-qoriq: modified compatibility for correct prescaler Date: Fri, 17 Oct 2014 11:27:06 +0200 Message-Id: <1413538026-15739-1-git-send-email-valentin.longchamp@keymile.com> X-Mailer: git-send-email 1.8.0.1 Cc: Rainer Boschung , Valentin Longchamp , Holger Brunck X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 Signed-off-by: Valentin Longchamp --- 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;