From patchwork Mon Sep 17 11:39:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10602635 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 68BCB15E8 for ; Mon, 17 Sep 2018 12:26:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 557F429A4A for ; Mon, 17 Sep 2018 12:26:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46D6E29A3C; Mon, 17 Sep 2018 12:26:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6685529A3C for ; Mon, 17 Sep 2018 12:26:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0Mb6SHxKqQ6zeqGHPASkdevQOJA9ofJHO35y/FBfQ/o=; b=EE03drsLQZ4GzLPyYcSJGu4fcY uaOwKdL3DAWRNTrjhMhveM8s2lWTn2JYSVFHSlWNnCFibSNy2IparMCXCklBCap5x0WYeSJYMrQMo 1sd6OVpeCdE5aKtcebZ89I3EWeV99ZJpCqQzCQs3tsM5q+e60hCctzWCjG85KAhWr4nH1L//96Do1 le/zjMd3SCFPESqpyJ1Fpkj8qAT/Mvz1wYAVNricGKaxajw8LkOI+8q9WE+75+xmFAo4eLD3Nf4Su u27U62Bt/Y+c4RcksVvm+mWB74wSnw16C0WfwobQA3YNN+DgMwiPRrrpBgnSOtbgLDSZ07PSvjNJL o3Avi66w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1sbo-0007NX-Dn; Mon, 17 Sep 2018 12:26:32 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1sbm-0007NK-07 for linux-arm-kernel@bombadil.infradead.org; Mon, 17 Sep 2018 12:26:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=L1nNOR0Hmag8XjUiqVzmXAXjwvnfj9eyO/essQXSs8U=; b=SseOMNov38Bax3adTzA6ouO03 RBrPR+ejhYxn5nzBt1EGZeH2cwR+OQwlchUHXWrhFvj6euu8lv7w9RAKxmmWm8DoTvTpdNCxfE+tO kTMiFHElFy0M9P+PG45zPU/nXwIekmwTMa2EwHsupcFcjkPq48OBmwG9I3pY0gFxKDuUuoWsqXvB6 6iRzmo8V1QuoOSStyjmkvG6UEMSYm0P3JNSRU0kKtr7BsEzidIpHEnh2ToTik91SGgEEeoHbK0sNp SxWnESAUK32rPmeVRls4Afxv0SxrJwMrjcLKT9uHoL5iO1gAVo9z9RKLRBF95BHLaS77gAYe9VC3K YUqMhlgpA==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1rt7-0003Ug-47 for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2018 11:40:21 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id C7ADAAE7E1; Mon, 17 Sep 2018 13:40:08 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 6_3pXpW5yxEd; Mon, 17 Sep 2018 13:40:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 35750AD8FB; Mon, 17 Sep 2018 13:40:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0bCEc6N2vjwS; Mon, 17 Sep 2018 13:40:02 +0200 (CEST) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id E0A36ACF8C; Mon, 17 Sep 2018 13:40:01 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 1/2] DT: marvell,mmp2: fix TWSI2 Date: Mon, 17 Sep 2018 13:39:46 +0200 Message-Id: <20180917113947.12626-2-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180917113947.12626-1-lkundrak@v3.sk> References: <20180917113947.12626-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180917_074021_322602_82D5CDA9 X-CRM114-Status: GOOD ( 12.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Eric Miao , Haojian Zhuang , Lubomir Rintel , Rob Herring , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Marvell keeps their MMP2 datasheet secret, but there are good clues that TWSI2 is not on 0xd4025000 on that platform, not does it use IRQ 58. In fact, the IRQ 58 on MMP2 seems to be a signal processor: arch/arm/mach-mmp/irqs.h:#define IRQ_MMP2_MSP 58 I'm taking a somewhat educated guess that is probably a copy & paste error from PXA168 or PXA910 and that the real controller in fact hides at address 0xd4031000 and uses an interrupt line multiplexed via IRQ 17. I'm also copying some properties from TWSI1 that were missing or incorrect. Tested on a OLPC XO 1.75 machine, where the RTC is on TWSI2. Cc: Eric Miao Cc: Haojian Zhuang Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/boot/dts/mmp2.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index 766bbb8495b6..47e5b63339d1 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -220,12 +220,15 @@ status = "disabled"; }; - twsi2: i2c@d4025000 { + twsi2: i2c@d4031000 { compatible = "mrvl,mmp-twsi"; - reg = <0xd4025000 0x1000>; - interrupts = <58>; + reg = <0xd4031000 0x1000>; + interrupt-parent = <&intcmux17>; + interrupts = <0>; clocks = <&soc_clocks MMP2_CLK_TWSI1>; resets = <&soc_clocks MMP2_CLK_TWSI1>; + #address-cells = <1>; + #size-cells = <0>; status = "disabled"; }; From patchwork Mon Sep 17 11:39:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10602613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0BA2415E8 for ; Mon, 17 Sep 2018 11:44:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDF6C28FD8 for ; Mon, 17 Sep 2018 11:44:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D18F129015; Mon, 17 Sep 2018 11:44:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1039928FD8 for ; Mon, 17 Sep 2018 11:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=TIgHCJwqU4GVs3SElC7CgJXW4tW10KixIwgjsaLgZEc=; b=nJ6IkHeqH/vciGN+MYmZ7QDCAH vCEcBDPSiNz6fnapIwO0jVlIyw2lfhFYgR4gG7XbqLVLpMfoFizB89UL/pEb/nq+XLEcEkJ5TGdcA KpRiRrZQGyd96sKtPHJeC9DzF8yJIDa/4/akqJ0bhkXZLI5dTovFsSZKhFp8tNcaRdY33Np8dhA9+ QiypR27zpGVBAFxT48N8c32Sv5QRc2GLYwjDp5jfzWfKfz0dYZdpVf76CC7cixwM474sgl3cdkbHW su7HvznIIxXw06hBDB0Xrk2NuxO/LMo1/xR45RN05CF1kLHO1PpnaylxY8O9qwIo+IWGyenYCQ68m H480BhBg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1rwd-0007rH-6t; Mon, 17 Sep 2018 11:43:59 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1rwa-0007ph-Mb for linux-arm-kernel@bombadil.infradead.org; Mon, 17 Sep 2018 11:43:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RaSev3ae7rmUwkP1QC0Qn+bu/sMnfsI0Pisk3nxa4zU=; b=qaE4iAYy7/U+prpgKVkW6sXMF sBX+4wLdtn9EFrIESy4eq09oCrO/b39JzBzTcI4ZcJBwYybkeN/3ETAk4CGA1kgQ0r8SnTOZglaA7 MwtCAdgnejxfVNyxTk0m9Rkl/6P6GyfEn9NJCFocNwj8bveqT1cnvw7ldj/tMu8VFbmXW5F6vhEvH clmxG0s2WMF1al9fQrEA2eC3acJ6GxC2mOF73RdiWsIfNSud/O19ZmofntKVG26gUxHGAMS/iglon eY2bH5VtE/Aa+gtQdwxPE8T1U7/GludqjMqYB3kgl+oNTQTXCi0VyB3xN0ZkYsrKfo1JIYgwIWXgQ 4nagrdIpg==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1rtB-0003ho-Cx for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2018 11:40:27 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 33D06AD8FC; Mon, 17 Sep 2018 13:40:10 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id MBhsnkIt30f6; Mon, 17 Sep 2018 13:40:04 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id B5087ACF8C; Mon, 17 Sep 2018 13:40:04 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hiQoKGcFoNE1; Mon, 17 Sep 2018 13:40:03 +0200 (CEST) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 4CB14ADC9F; Mon, 17 Sep 2018 13:40:03 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Subject: [PATCH 2/2] DT: marvell,mmp2: add more TWSI controllers Date: Mon, 17 Sep 2018 13:39:47 +0200 Message-Id: <20180917113947.12626-3-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180917113947.12626-1-lkundrak@v3.sk> References: <20180917113947.12626-1-lkundrak@v3.sk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180917_124025_485732_11E210A1 X-CRM114-Status: GOOD ( 10.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Eric Miao , Haojian Zhuang , Lubomir Rintel , Rob Herring , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP I've gotten the base addresses, clocks and interrupts from an rusty and old out-of-tree driver. I haven't actually checked against the datasheet, since that one is reserved for the Marvell inner circle. Tested with an accelerometer on TWSI6 on an OLPC XO 1.75 machine. Cc: Eric Miao Cc: Haojian Zhuang Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/boot/dts/mmp2.dtsi | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index 47e5b63339d1..2bd4e94501ce 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -232,6 +232,55 @@ status = "disabled"; }; + twsi3: i2c@d4032000 { + compatible = "mrvl,mmp-twsi"; + reg = <0xd4032000 0x1000>; + interrupt-parent = <&intcmux17>; + interrupts = <1>; + clocks = <&soc_clocks MMP2_CLK_TWSI2>; + resets = <&soc_clocks MMP2_CLK_TWSI2>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + twsi4: i2c@d4033000 { + compatible = "mrvl,mmp-twsi"; + reg = <0xd4033000 0x1000>; + interrupt-parent = <&intcmux17>; + interrupts = <2>; + clocks = <&soc_clocks MMP2_CLK_TWSI3>; + resets = <&soc_clocks MMP2_CLK_TWSI3>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + + twsi5: i2c@d4033800 { + compatible = "mrvl,mmp-twsi"; + reg = <0xd4033800 0x1000>; + interrupt-parent = <&intcmux17>; + interrupts = <3>; + clocks = <&soc_clocks MMP2_CLK_TWSI4>; + resets = <&soc_clocks MMP2_CLK_TWSI4>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + twsi6: i2c@d4034000 { + compatible = "mrvl,mmp-twsi"; + reg = <0xd4034000 0x1000>; + interrupt-parent = <&intcmux17>; + interrupts = <4>; + clocks = <&soc_clocks MMP2_CLK_TWSI5>; + resets = <&soc_clocks MMP2_CLK_TWSI5>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + rtc: rtc@d4010000 { compatible = "mrvl,mmp-rtc"; reg = <0xd4010000 0x1000>;