From patchwork Wed Nov 28 17:53:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703039 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 A226D16B1 for ; Wed, 28 Nov 2018 17:54:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FE282DC10 for ; Wed, 28 Nov 2018 17:54:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03A772DC11; Wed, 28 Nov 2018 17:54:11 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 E09E32DC13 for ; Wed, 28 Nov 2018 17:54:10 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=4tkHUU5eVW5mBroR33PSwvGQgYz1zPkN5gomMXrIATY=; b=bfP6YnUSqAZru2 keHQlBoDEYw1GdoQHWjRNzhJlAGJZbosvb5iO2/hrzNPQSRlnrnCXmP15HvuSw4XBbNQTH6pj+Mqd 13I5Yu9df2Pr8oZyFaK2Lbdukvh/xqBpeGl6VoWhoUU4OAVeq5QvQwWGx5fSDxkjFUvvKl2H7dwnU At2BMGeGlsUQsmB+GcvmcAiZYXcu65wBsrgfitHeKsiB6e0kPgMlDDJR2qW78d79aJAZxaikWWWc8 wmSPFAxeuYHqMfDf+zSrqWImPevDk7gRWtdSh+HkZg7bkZT2QZj+Qr9S4zfgECKbexJdkKjYdMNJn TSQVNnltow7weSrcgV2w==; 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 1gS42K-0004YO-S0; Wed, 28 Nov 2018 17:54:08 +0000 Received: from shell.v3.sk ([90.176.6.54]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42G-0004Gt-0R for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:06 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 189D799A17; Wed, 28 Nov 2018 18:53:46 +0100 (CET) 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 29Xke9XCB3Wx; Wed, 28 Nov 2018 18:53:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id CD80799A4A; Wed, 28 Nov 2018 18:53:29 +0100 (CET) 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 1U4dFWeQEasq; Wed, 28 Nov 2018 18:53:28 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 3B72299986; Wed, 28 Nov 2018 18:53:28 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 01/20] dt-bindings: mrvl,mmp-timer: add clock Date: Wed, 28 Nov 2018 18:53:05 +0100 Message-Id: <20181128175324.163202-2-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_095404_384703_80D028FE X-CRM114-Status: UNSURE ( 7.51 ) X-CRM114-Notice: Please train this message. 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 The timer needs the timer clock to be enabled, otherwise it stops ticking. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring Acked-by: Pavel Machek --- Changes since v1: - Made the clock optional, to keep compatibility with DTs without it Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt b/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt index 9a6e251462e7..b8f02c663521 100644 --- a/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt +++ b/Documentation/devicetree/bindings/timer/mrvl,mmp-timer.txt @@ -5,9 +5,13 @@ Required properties: - reg : Address and length of the register set of timer controller. - interrupts : Should be the interrupt number. +Optional properties: +- clocks : Should contain a single entry describing the clock input. + Example: timer0: timer@d4014000 { compatible = "mrvl,mmp-timer"; reg = <0xd4014000 0x100>; interrupts = <13>; + clocks = <&coreclk 2>; }; From patchwork Wed Nov 28 17:53:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703075 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 34A2417F0 for ; Wed, 28 Nov 2018 18:09:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24A6E2DC53 for ; Wed, 28 Nov 2018 18:09:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1604B2DC71; Wed, 28 Nov 2018 18:09:58 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 C071F2DC53 for ; Wed, 28 Nov 2018 18:09:57 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=6qXar9ZeAfDWQAsTxyyyWeLu+bsLPLhJQIBhBSYv/iM=; b=WmsuwxwRn0OEvC d0CodULdMAYqLVfnWgRF8ZW2S3SX9Scu5v2cDfkl+7Jd3NLHUrBroppXt9+pFNOedpPwIzbFN7TpO MGmbBq9l6qTCugJ2IN8xiBiqDekRqz0o0bcnSSR+8z8gBDEgXvioCZg33oqRGMTPGkUyfofpQ2uVo +FlAEVzPVsJyryZeoebFX1dxiBCY/3RdZ0LybAicCAzsDQkL4wdu/6Ol+GfTje9KrK1QueGy/+2J3 f7ez84dzXJ4HCiK9lmZ/xA9YwfJTEkRsdDvuT/nWvqnUgkI1RPY6/Wkjs4csMgqABxg3JPVr/ILPU WhNmxPTzzkEbeHI3cU0g==; 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 1gS4Ha-0005po-Om; Wed, 28 Nov 2018 18:09:54 +0000 Received: from shell.v3.sk ([90.176.6.54]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42G-0004Ib-0N for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:08 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3F59B99AAE; Wed, 28 Nov 2018 18:53:48 +0100 (CET) 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 vL6m4VF9kuaQ; Wed, 28 Nov 2018 18:53:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 01D8999B20; Wed, 28 Nov 2018 18:53:32 +0100 (CET) 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 7kpk_oJUPwfL; Wed, 28 Nov 2018 18:53:29 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 7BDC299994; Wed, 28 Nov 2018 18:53:28 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 02/20] DT: marvell, mmp2: fix the gpio interrupt cell number Date: Wed, 28 Nov 2018 18:53:06 +0100 Message-Id: <20181128175324.163202-3-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_095404_410796_C122D1FA X-CRM114-Status: GOOD ( 10.33 ) 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 gpio-pxa uses two cell to encode the interrupt source: the pin number and the trigger type. Adjust the device node accordingly. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/boot/dts/mmp2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index 766bbb8495b6..db15d1186cd0 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -180,7 +180,7 @@ clocks = <&soc_clocks MMP2_CLK_GPIO>; resets = <&soc_clocks MMP2_CLK_GPIO>; interrupt-controller; - #interrupt-cells = <1>; + #interrupt-cells = <2>; ranges; gcb0: gpio@d4019000 { From patchwork Wed Nov 28 17:53:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703073 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 71E5C13BB for ; Wed, 28 Nov 2018 18:09:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EBF12DC53 for ; Wed, 28 Nov 2018 18:09:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 523D32DC70; Wed, 28 Nov 2018 18:09:39 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 0580C2DC53 for ; Wed, 28 Nov 2018 18:09:39 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=cISPjxlWT1qQPbIOvN/sidi0jJ51wvo4BcOjYr0E7C8=; b=DeiWgvODbTr5gL sylsNS5o9EzicVvz7zfkkpBAXMPnrwrrMqppYlETzHRij5w9sfR2B7a56q6WZucV9hRsr6AZoyFF4 RWCleMgr7PXPPBUGNl6lRshF93wqEfyGRSQQRyt8gbot+Us8YXXTIv5d/uss1JYH/Zeoowq6pnKtL q/OL3dj/3a+8scNYSXFf5J0W4mM+pt9R4Tf1Hn+airgVGFVCEbRc1pTsS2XCcb28TsxByhUkxqYTL PbEM+2yMnP9qgAYkL+j1qRWYWkadKvbcMVJSIqF0u9IdUxre2w3HXs+4P+pNd2koDWYdJzDFOfqjW +6s4LxH61YFcIIJmi/Vg==; 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 1gS4H5-0005M1-9R; Wed, 28 Nov 2018 18:09:23 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS4Fl-00043d-PO for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 18:08:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=Ge2+OA0KCr4xxhGDOsy1K1FVoiwCPyfpxHs2ODSbWLw=; b=YQBqgQUvIYgzicQ4xpr3LxFchL 3Ej1GF5bxt2frbh1EFPtnE/b9sNh1hIkR2YG5NYLahLCWXy2CTjNDIcgScH2xZHUv9xNnz2hTu3Yz expQJoRnFstPY86mB0EUKPaw5lLYPQOo6T679LXz9fCsRdAzDSKDbAhYsBA61WoJbkUa+eZdbm1p2 xpRmmwynljYbvWfDu5ZGPS0ZHHYjlUrB5G5wLlKdju22mjiEUn2E1vbAByWBOmyTwRWWBuPD0MxSV Dngzq+RawwOMZS83qQ2hhOb90xGDWrBmSFFBpug9xX+uobyCL586HJUb1PjbfRMKpjxoGgBkV8BH+ h6sTlsEQ==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42Q-00083P-50 for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:19 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 48E0E99C43; Wed, 28 Nov 2018 18:53:57 +0100 (CET) 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 OQjGWfaThnOI; Wed, 28 Nov 2018 18:53:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id D906B99A51; Wed, 28 Nov 2018 18:53:32 +0100 (CET) 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 2McAsATP1mSK; Wed, 28 Nov 2018 18:53:29 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id BC53A999DE; Wed, 28 Nov 2018 18:53:28 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 03/20] DT: marvell,mmp2: give gpio node a name Date: Wed, 28 Nov 2018 18:53:07 +0100 Message-Id: <20181128175324.163202-4-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_175414_302130_E4287833 X-CRM114-Status: UNSURE ( 9.78 ) X-CRM114-Notice: Please train this message. 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 This will be useful for boards that actually use GPIO pins. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/boot/dts/mmp2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index db15d1186cd0..f2a18779de7c 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -168,7 +168,7 @@ status = "disabled"; }; - gpio@d4019000 { + gpio: gpio@d4019000 { compatible = "marvell,mmp2-gpio"; #address-cells = <1>; #size-cells = <1>; From patchwork Wed Nov 28 17:53:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703055 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 1CBFA14BD for ; Wed, 28 Nov 2018 17:56:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06C682DA08 for ; Wed, 28 Nov 2018 17:56:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED22A2CDD8; Wed, 28 Nov 2018 17:56:32 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 9A1DB2CDD8 for ; Wed, 28 Nov 2018 17:56:32 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=6b6dwNS+Vb0ykNHXzSutvgGUBboAf/Co76T1uyIegjI=; b=WEGI5xpoqRRBbv 9gn27mfjAUuEliPNUSuYTuXUSMLUg6JSyKaktxYL4izwBadV6z1B+Od+19SyopCWA6X4Hf7+rHsKm PrKMUPELhTd+1lFh/E017wiGJHwMI2m81YdMqNjAuiC4eUUp3NWCRzPhqFCiIfRMfeM938GwjIm0h 8avqgTwDjteo4tHbORNq9jZnixWRhEF4DC2Raxo/7M80NefxBEB5fMCA3rQzJK3iPFcOSjlXaXfep v22ndlj0fpcI7cgX9jlMapceKbIwpCdgy9N1zpxpUhFgKeSCWbDxb/oqIoFdOBGZdW/wy24M+90FV 5kreXdHW1M6Ba8sOXRsQ==; 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 1gS44W-0007aC-Ni; Wed, 28 Nov 2018 17:56:24 +0000 Received: from shell.v3.sk ([90.176.6.54]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42U-0004Yy-Eq for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:39 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 2762999A17; Wed, 28 Nov 2018 18:54:07 +0100 (CET) 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 6tfT1axgIUZm; Wed, 28 Nov 2018 18:53:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 57B7999B6E; Wed, 28 Nov 2018 18:53:33 +0100 (CET) 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 4OmlhAQJyMQ0; Wed, 28 Nov 2018 18:53:29 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 148F1999EF; Wed, 28 Nov 2018 18:53:29 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 04/20] DT: marvell,mmp2: add clock to the timer Date: Wed, 28 Nov 2018 18:53:08 +0100 Message-Id: <20181128175324.163202-5-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_095418_997077_F4C7A34C X-CRM114-Status: UNSURE ( 8.57 ) X-CRM114-Notice: Please train this message. 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 The timer needs the timer clock to be enabled, otherwise it stops ticking. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/boot/dts/mmp2.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index f2a18779de7c..4743a1288280 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -130,6 +130,7 @@ compatible = "mrvl,mmp-timer"; reg = <0xd4014000 0x100>; interrupts = <13>; + clocks = <&soc_clocks MMP2_CLK_TIMER>; }; uart1: uart@d4030000 { From patchwork Wed Nov 28 17:53:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703077 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 15BDA13BB for ; Wed, 28 Nov 2018 18:09:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06A022DC53 for ; Wed, 28 Nov 2018 18:09:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF1142DC71; Wed, 28 Nov 2018 18:09:58 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 9C4E22DC53 for ; Wed, 28 Nov 2018 18:09:58 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=OdjFQa5TF48UbJykhgpBOVz6vPUnslC2S7Lzxc0Yb0I=; b=CpiROtW9XBw+7X 33Y+amQC2yMlHmrv3XCm5mYcSzac5cHzbxR1pbiyol5z2NAiMSUabyJ9F68/KFi+yAmyua/L37TP9 9FFPS+CcfFeHqAepLaKXOPEP/scGip7nhxthX35z4OCsKzkKd7v85agXfvO2S8GyUfCuDKeDkUxn/ rRo9tsNtaosAm49PaXQWpg/tzPAHJxE9X2R/hcd+QGkVPLCtuxFZsZ6P3JaqyN3NV4r1kmDBpjDhX 8ytOs7o5In4N9R0cmcPZVN1JS6cBKSJ8hORdSk44LAVbr6BzZ+1GQmvlVnC7GQuo4jQYLurdRLW5o oYW1kwzqCvh0aZ4DtHwQ==; 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 1gS4Hc-0005sc-Jt; Wed, 28 Nov 2018 18:09:56 +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 1gS42g-0004mf-KZ for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 17:54:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=uKnAvMAKsI23gDLXakIyduuMfd5qBT6wvT9+uDlrTQY=; b=o/kysv04Z6+xhDywMCA7x9XZl2 o2STWLhFnWm+00yAvtACdERpas4nRuk0X7P7HyZmOyys+rNHaFJEyEwV+yiRh64Myq+vD9xeeLct8 C3F1MpTCKzwkEB9YsU+s9IwmItabzTJCHVurT/B+FLsj30EyZxpLPOcltzsZY/2BJab81FVcl6RZy n8aGOfC58Sslfh219maGn4P9Ot2tJziqd4a1O+3TMbQfBtUeikci3mCwKgo3aDJzKqYzkjUN7v0z+ tpGa5q12JRVREIw8zyHLKlDxUtB3klRK8ATrIzNyzwo/rw6w1NFePW/wDkQvOH2L8pZCN69m5irbp dQpGYKfw==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42Y-0007wd-Sm for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:23 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 0094399A93; Wed, 28 Nov 2018 18:54:04 +0100 (CET) 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 PfmE0zDODrht; Wed, 28 Nov 2018 18:53:46 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 16D8C99AB6; Wed, 28 Nov 2018 18:53:35 +0100 (CET) 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 qVk-QmR5mnfo; Wed, 28 Nov 2018 18:53:30 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 9D16B99A2C; Wed, 28 Nov 2018 18:53:29 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 05/20] DT: marvell,mmp2: add MMC controllers Date: Wed, 28 Nov 2018 18:53:09 +0100 Message-Id: <20181128175324.163202-6-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_125423_059427_ED93EAF6 X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 There's apparently four of them on a MMP2. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- Changes since v3: - Fixed the mmc4 node name Changes since v1: - The controllers seem to be on AXI bus, not APB. Move them. - Remove aliases. arch/arm/boot/dts/mmp2.dtsi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index 4743a1288280..1120fe6abbdc 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -117,6 +117,42 @@ reg-names = "mux status", "mux mask"; mrvl,intc-nr-irqs = <2>; }; + + mmc1: mmc@d4280000 { + compatible = "mrvl,pxav3-mmc"; + reg = <0xd4280000 0x120>; + clocks = <&soc_clocks MMP2_CLK_SDH0>; + clock-names = "io"; + interrupts = <39>; + status = "disabled"; + }; + + mmc2: mmc@d4280800 { + compatible = "mrvl,pxav3-mmc"; + reg = <0xd4280800 0x120>; + clocks = <&soc_clocks MMP2_CLK_SDH1>; + clock-names = "io"; + interrupts = <52>; + status = "disabled"; + }; + + mmc3: mmc@d4281000 { + compatible = "mrvl,pxav3-mmc"; + reg = <0xd4281000 0x120>; + clocks = <&soc_clocks MMP2_CLK_SDH2>; + clock-names = "io"; + interrupts = <53>; + status = "disabled"; + }; + + mmc4: mmc@d4281800 { + compatible = "mrvl,pxav3-mmc"; + reg = <0xd4281800 0x120>; + clocks = <&soc_clocks MMP2_CLK_SDH3>; + clock-names = "io"; + interrupts = <54>; + status = "disabled"; + }; }; apb@d4000000 { /* APB */ From patchwork Wed Nov 28 17:53:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703059 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 55E5D16B1 for ; Wed, 28 Nov 2018 17:57:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F4FA2DD16 for ; Wed, 28 Nov 2018 17:57:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EFBC2DD0F; Wed, 28 Nov 2018 17:57:02 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 8CDAF2DD0F for ; Wed, 28 Nov 2018 17:57:01 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=JZZ3o69+kbMot/r8JIiRdUF/AAeKcvV4mYX1CX3VK0Y=; b=HIVfxVmtACNUp+ fvFgKooXk5mEVudHHSwO4u9vsm4Bs+Vs0c8hD++yJ4mHi6abnqQIi6eYKFeqqiaqFffaq3cjNHDa2 dQjq4RgatANoNhOMeNm+q6pU+SG1Eof/sCtPGhKyDmBk2iYfTqdqOhtQbg0eomA/yU3G061U1pmCc qkJb2uER8+doJcUDh75qCAoh/iaSUcjFh+c7eVOJPSLnrpzoBuyQ+rty57NfRBAOTncFttC02bfVv ry/zvPxWVQyuCTcKqUIwJuuizoQB1m3hs5EsQoiSe0kxpYiPZq/jeisrZiFZZTKg/BjNM7Ox4bsDu sB1XuXXfN8pn+xN8PBVg==; 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 1gS44y-00083I-Dl; Wed, 28 Nov 2018 17:56:52 +0000 Received: from shell.v3.sk ([90.176.6.54]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42U-0004XX-Eo for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:40 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id C0660998D3; Wed, 28 Nov 2018 18:54:01 +0100 (CET) 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 MCss26D1fWYR; Wed, 28 Nov 2018 18:53:46 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id E5BC9999DE; Wed, 28 Nov 2018 18:53:34 +0100 (CET) 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 SYZR2wloU1lC; Wed, 28 Nov 2018 18:53:30 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id DDEE399A91; Wed, 28 Nov 2018 18:53:29 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 06/20] DT: marvell,mmp2: fix TWSI2 Date: Wed, 28 Nov 2018 18:53:10 +0100 Message-Id: <20181128175324.163202-7-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_095419_234655_EB28C77D X-CRM114-Status: UNSURE ( 9.47 ) X-CRM114-Notice: Please train this message. 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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. Signed-off-by: Lubomir Rintel Tested-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 1120fe6abbdc..c5787eea57c7 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -257,12 +257,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 Wed Nov 28 17:53:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703081 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 AF77F17F0 for ; Wed, 28 Nov 2018 18:10:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EF4F2DC53 for ; Wed, 28 Nov 2018 18:10:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 930882DC71; Wed, 28 Nov 2018 18:10:40 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 912582DC53 for ; Wed, 28 Nov 2018 18:10:39 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=mehf2hhhKxMIouol64yZeNotwXNIlLF1i4//Zw4v/ts=; b=mfU9VMlS7ep8Dd E6fgKG5/NI8OXJGPC4eqYbrKasuLBNnZebyL+bcK8NK9wc7JhpIxgXt9xvLmNmkKYloYQcD6kaeOr lWJ+8ZViZpcKu+nHz2yUSPx+ISMmJhCHe/bseXAPvVV2hyDlm/+lWI5NhG6Wz+8byOgh2J1H/80NK WjUQp06s+zHlf5QlNfp5gBceUyStN81yVLNmm6mUlV54D5NPEnQhFNUCIzW++PEW1nu8CkzzTnHHG 5Q7bV892YDw6V9ePsDvHOoVhfDF4OQw4GQX8HuPnF9jDO2PvEpMnZLe5pn3+UGUYOsb/Cr77bNU3Z /9TMb2X/NvD7ZHPomixw==; 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 1gS4IG-0007lA-76; Wed, 28 Nov 2018 18:10:36 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS4Fj-00043d-M5 for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 18:07:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=WlJykdq3kfgBOwOlIu1H2yf4XtKc5NaxCdqUdcBMO74=; b=IcnwleJ504l9seDXLfQ6/wRmnV R7HyJOUdnajA2lm7rYnZKSBz5M6eoKVF1DpuUmn6jTfNIZ3ol2DdJsLy/PBzVXgMZ2x1IDF1WxvJU CevtN0qovHnBEQoA/uNgrB+f6p/WKglbwk2MDI7byd1iN08u1dPVEYdk8beti5GqwuJ8xntZe1T1C OFvlDjvCgSqkP152GExz/nmd/tY3w6SH+/0zFEMRC7erzFKoiZGDeFCiZugcPmH+qW+h6ZHhkkt8I /4FG7ker5uZhpxffKrjkhrdpzHJ4/4cjv+vXzU58MMaj2JxnPAJrU+LEMRGbK2X/Sk2jq3mueau8G YFipK1Wg==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42Q-00083U-5l for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:19 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id B291599A51; Wed, 28 Nov 2018 18:53:58 +0100 (CET) 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 Rjb3amOlC977; Wed, 28 Nov 2018 18:53:46 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id CDCBD999EF; Wed, 28 Nov 2018 18:53:35 +0100 (CET) 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 6MFQQnOlA8bM; Wed, 28 Nov 2018 18:53:31 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 2C952998D3; Wed, 28 Nov 2018 18:53:30 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 07/20] DT: marvell,mmp2: add more TWSI controllers Date: Wed, 28 Nov 2018 18:53:11 +0100 Message-Id: <20181128175324.163202-8-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_175414_355163_1A72A06E X-CRM114-Status: UNSURE ( 9.35 ) X-CRM114-Notice: Please train this message. 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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. 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 c5787eea57c7..c48d17a38d6b 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -269,6 +269,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>; From patchwork Wed Nov 28 17:53:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703071 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 3F72A15A8 for ; Wed, 28 Nov 2018 18:08:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D6D72D78E for ; Wed, 28 Nov 2018 18:08:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20F512D7A3; Wed, 28 Nov 2018 18:08:43 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 AEB612D78E for ; Wed, 28 Nov 2018 18:08:42 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=b0Dj6NChwci25guFGpLdgKIm8fujAGLsHA2izGGe85c=; b=eIbKd3C7/BqUwc 1d9yvTgKd2jIdvcokDDWX4+1DPnj7cfIIO3OeaHj/2EZGp/iZCzEukcNdkZsDfsfNayBWpWqL4LaB qy9HSX9QXTacunnZUAEhvSaL+f/FismkbV7ah5mWKZSZ6o1Asd4vwJXvnQVqdm3lboyVhSnJurT+Y svvhSqc7Z6kPKIaOQ4HC5xYqqQnlYpE8sLWM34vCHh1Z+6FDGnRxVwBYax218x/Pk3wk0wcX+tt8k YBvoGLaxqvODYI/DT/XfPv50Fz1sGMYpo1ENi/RW5OxgFHiII55l9n9YUQtP+LNCyFtAUHY849tRg ImQV3y0c3tckC/VZSbhQ==; 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 1gS4GJ-00052v-EG; Wed, 28 Nov 2018 18:08:35 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS4Fk-00043d-Nr for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 18:08:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=w0+Ab7G5RswWtvDuOs+otni2G2UrjdsBNlJ4OC/rHP4=; b=i8PpAiMjechN+i7/Sj7rh9qJll fTUN+hjTPVRuw6rJHl5FPJaWm1zEM9Co4Krfx5Ti3hjt3GUo+iT8WmI1WiGrprgEgVEjkKgKNJyZe HVjyWcumGuQsPU4oaHSB9oY/yfs9PB6egm+U/+NlWfoVXxZ1tXMXqlRKDqUEqJpwS+dC1uTLTFm7S tu3j/ozf6ClaGtezsIG/uesPyaPP5Ff1wZMbZr7L3zVCb+ElWEHgs8zvPP8rczot47ESdXk524L0+ JpzzKXnLO4rS67FkI/l4OjhPOZLcFKhLmheXZP4wtih+3qIBZzn71+kUIiXGMLLDg6al/JWtJMykp XXcCsliw==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42Q-00085M-3E for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:19 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id ECF1D99A4A; Wed, 28 Nov 2018 18:54:05 +0100 (CET) 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 gjDAAwm5tDNL; Wed, 28 Nov 2018 18:53:46 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 4770699A91; Wed, 28 Nov 2018 18:53:36 +0100 (CET) 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 VQSDspP75paX; Wed, 28 Nov 2018 18:53:32 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 6D87399AAE; Wed, 28 Nov 2018 18:53:30 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 08/20] DT: marvell,mmp2: add OTG PHY Date: Wed, 28 Nov 2018 18:53:12 +0100 Message-Id: <20181128175324.163202-9-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_175414_329580_F7F43D8F X-CRM114-Status: UNSURE ( 8.13 ) X-CRM114-Notice: Please train this message. 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 The USB OTG PHY chip. To be used by the OTG controller. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/boot/dts/mmp2.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index c48d17a38d6b..57f6248f17cd 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -118,6 +118,13 @@ mrvl,intc-nr-irqs = <2>; }; + usb_otg_phy0: usb-otg-phy@d4207000 { + compatible = "marvell,mmp2-usb-phy"; + reg = <0xd4207000 0x40>; + #phy-cells = <0>; + status = "disabled"; + }; + mmc1: mmc@d4280000 { compatible = "mrvl,pxav3-mmc"; reg = <0xd4280000 0x120>; From patchwork Wed Nov 28 17:53:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703057 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 1423A16B1 for ; Wed, 28 Nov 2018 17:56:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 001502DBEC for ; Wed, 28 Nov 2018 17:56:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E757A2DD46; Wed, 28 Nov 2018 17:56:44 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 4B0232DBEC for ; Wed, 28 Nov 2018 17:56: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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=qVgUerjqLsrl7B42QBfBYu+1kEvVCctESSceZKEXQiA=; b=We2uJF5ik2q7w9 tQ9lWyzpt5L17jj7To3Mat7XXKx3JXolnV15m5yDaSzNcN6tKpK9sktOQzU6kxlJkGS0NLeaf7uD4 TUhgx4k/GcHi3YalIYllylDndEOtVKnVPQ5h9rh1i9s0vABS/mg6QNfuK8Isi1NA5WooSZZwaHg84 GSkIIitWIYnOmg0vqVbhzobDUm2AEEb2bdKkC0ehcmW0SnhGDHLLPJIwpmQq8BK186dHxZK/Se3Rt qZbgqbCIG7d5N9NhpNApcHOyD8TEstR142z8zQxdPSVp88OL4RhV5nLUy2hCUnoyz24e1N1nf9mpd Px5IMP83zCsLl14Rbynw==; 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 1gS44j-0007ny-Vb; Wed, 28 Nov 2018 17:56:37 +0000 Received: from shell.v3.sk ([90.176.6.54]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42U-0004XW-Er for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:40 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3403399B34; Wed, 28 Nov 2018 18:54:00 +0100 (CET) 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 K07jvnSuJADW; Wed, 28 Nov 2018 18:53:49 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 34E94998D3; Wed, 28 Nov 2018 18:53:37 +0100 (CET) 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 pMBotLKBxSl4; Wed, 28 Nov 2018 18:53:33 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id B7CD2999C5; Wed, 28 Nov 2018 18:53:30 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 09/20] DT: marvell,mmp2: add USB OTG host controller Date: Wed, 28 Nov 2018 18:53:13 +0100 Message-Id: <20181128175324.163202-10-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_095419_260180_6DE5D9BF X-CRM114-Status: UNSURE ( 7.74 ) X-CRM114-Notice: Please train this message. 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/boot/dts/mmp2.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index 57f6248f17cd..0c5a51b98c3f 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -125,6 +125,17 @@ status = "disabled"; }; + usb_otg0: usb-otg@d4208000 { + compatible = "marvell,pxau2o-ehci"; + reg = <0xd4208000 0x200>; + interrupts = <44>; + clocks = <&soc_clocks MMP2_CLK_USB>; + clock-names = "USBCLK"; + phys = <&usb_otg_phy0>; + phy-names = "usb"; + status = "disabled"; + }; + mmc1: mmc@d4280000 { compatible = "mrvl,pxav3-mmc"; reg = <0xd4280000 0x120>; From patchwork Wed Nov 28 17:53:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703069 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 550E316B1 for ; Wed, 28 Nov 2018 18:08:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 446332DC4E for ; Wed, 28 Nov 2018 18:08:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 383B42DC70; Wed, 28 Nov 2018 18:08:21 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 C24AE2DC4E for ; Wed, 28 Nov 2018 18:08:20 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=7vyDs+Bh1V24WRtPMOK1MFgVNlsIAe6obi0vFUOzirE=; b=peGIua/OuvZ3EE fKNfGKOnUHO6cORaNlB54acM6gYjbaUQOqzn2FJHXhkovHTnKHkcb+Jyj76+efMYcQKwJDq63dRYk +qEF0F3+x8YpXi66r9sr/rx+zqp1p0x/rO+qJf8giloKh71yVElIY9kM+haT8V3py+9GhTeDmR0zh AU8P9ZLZ5mucFX8UP11nMjsr6eyfSWQpd4OWVC+xd+GHGD3X7zpcBCCcTXaghmQidhor+LvjP1mey pVkeNHrFXeczBerCUyYUpkmYv4jRjoUVs3YnTP0jw4WStKJpU/DQ1mUAmqi672gZVv36VMa+qVV4m Du0hHcYLQskfRBsPqZNA==; 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 1gS4Fx-0004dQ-3m; Wed, 28 Nov 2018 18:08:13 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS4FY-00043d-Gd for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 18:07:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=bg1+htXU8eQ82dHrHiPkai1p+De7rOQPr/HlS/Z8bDs=; b=s/cTZ0+1hfYSAvwbmrph3WrZGQ 8y0+yo/ZsI5VYno7+UhiN3FKabgEAIxXvVpcMD91yiaoTgH5oXCEzLw6S6c6oy8zoB8XwjXfePerE ySK7wnBO+5eZkw5ABFzsgjRHRRasSAO+gT+2SuJv9AZwZAH/78YV/YMyOrfPOI8xniatULNh4dHqY Ff6uQZTiAtYyoYh3At7pTY8cCTy6WC8x2k/2d4Np/hv9zcAzKC3r0hWNbssC8lzGaWuXkzps4Agxm /Rv6dyvfucULsCC0XcIjWGIp6l8qbq/HC4l1Kp8+F82ddzFtShe/7x/ItT8NiEksgt6k0/iIqlIVJ RQ0aMT7A==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42g-00087Y-4k for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:33 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 86066999FD; Wed, 28 Nov 2018 18:54:19 +0100 (CET) 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 X6g6Az3bFM78; Wed, 28 Nov 2018 18:53:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 5C66799BE7; Wed, 28 Nov 2018 18:53:39 +0100 (CET) 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 i_e2eqEx6tsK; Wed, 28 Nov 2018 18:53:34 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 05F7499986; Wed, 28 Nov 2018 18:53:31 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 10/20] DT: marvell,mmp2: Add SSP controllers Date: Wed, 28 Nov 2018 18:53:14 +0100 Message-Id: <20181128175324.163202-11-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_175430_283179_A13C087D X-CRM114-Status: UNSURE ( 8.58 ) X-CRM114-Notice: Please train this message. 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 Despite Marvel keeps their base addresses secret there's a good chance they're actually correct. SSP1 and SSP3 bases were taken from OLPC 1.75: OpenFirmware and kernel respectively. SSP2 and SSP4 addresses are from James Cameron who actually has a copy of the data sheet. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- Changes since v2: - Added SSP2 and SSP4 (thanks James Cameron ) Changes since v1: - Dropped the aliases arch/arm/boot/dts/mmp2.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi index 0c5a51b98c3f..ee03e0846740 100644 --- a/arch/arm/boot/dts/mmp2.dtsi +++ b/arch/arm/boot/dts/mmp2.dtsi @@ -346,6 +346,38 @@ resets = <&soc_clocks MMP2_CLK_RTC>; status = "disabled"; }; + + ssp1: ssp@d4035000 { + compatible = "marvell,mmp2-ssp"; + reg = <0xd4035000 0x1000>; + clocks = <&soc_clocks MMP2_CLK_SSP0>; + interrupts = <0>; + status = "disabled"; + }; + + ssp2: ssp@d4036000 { + compatible = "marvell,mmp2-ssp"; + reg = <0xd4036000 0x1000>; + clocks = <&soc_clocks MMP2_CLK_SSP1>; + interrupts = <1>; + status = "disabled"; + }; + + ssp3: ssp@d4037000 { + compatible = "marvell,mmp2-ssp"; + reg = <0xd4037000 0x1000>; + clocks = <&soc_clocks MMP2_CLK_SSP2>; + interrupts = <20>; + status = "disabled"; + }; + + ssp4: ssp@d4039000 { + compatible = "marvell,mmp2-ssp"; + reg = <0xd4039000 0x1000>; + clocks = <&soc_clocks MMP2_CLK_SSP3>; + interrupts = <21>; + status = "disabled"; + }; }; soc_clocks: clocks{ From patchwork Wed Nov 28 17:53:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703131 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 5FD84109C for ; Wed, 28 Nov 2018 18:33:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F9B228D3A for ; Wed, 28 Nov 2018 18:33:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4151C28DD0; Wed, 28 Nov 2018 18:33: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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 7F05628D3A for ; Wed, 28 Nov 2018 18:33: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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=vriCenOS+pET7TxvYJiM5rW7ndbgTO32+vBqnBSEzuM=; b=Yj/TQUmHSqH6v7 kXUuo0aISGQxI2jLKNI9ksjXWyLQoNvsIdkhChrHVpJsJsHGiqbEF9zXPrSlN29w8/IygTLisu3C1 ZVMFdTw+nn7PzT1GLYkiy/utOApy2KRV3vI506l8nYQAcN25UPQ8dHIYI4/TjfxtQebfSnj/zon+6 gN+CUvB7LU8O0v7Tc5wN+Qx7yHG5TDWylf9c31/iQLTkHHdP908LJnkX3OaVJKoqX5AMdRD5Drrsp wlhNog+hVKgI8J3dQidc7x9qJFtvbXlr8z4JRjnflnS2TnIx/SxgznsdqKRZJF3k+sAaMrO/G2UFu Cf07PzG5un8tH8G6no5w==; 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 1gS4eY-0001Gj-8u; Wed, 28 Nov 2018 18:33:38 +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 1gS4eW-0001GN-R9 for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 18:33:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=lt4vOoa5IQeY71aScK9LTTx0oQoJ6XnjVdiOq/9ThQU=; b=ALehMaKmR/ilepF3Yg7edgjxWl ueZzRVUEBVhBVVNABF+1a8jmXcev6bO8kvLmamlntlrKBYLrASMMb/OKyuybeQGfkI09Mfj6sjbYW 8ghpEPVUVKh7sKdYsKndgKFn16YN0uSON08CNZdPSLUXXXMeFv/6Tk0OLG0CVmur0lULGg64XUD/r 9vCacY5cL7LqeYoZqwY75mui2fRdxImN500sWiAcqcDYtu29LrS7jHIWCJWwdZjxvk0ReKKQy77kS q/6Dz6bMXKWd1cPR3V3lt//taLP9wGy18RNzG/RZRDLxdPBbdHyyUnbVcqX3sb6WDWPN+sxngCQsA zfcRsPGQ==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42k-0007z6-Lm for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:35 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 9A6E499B89; Wed, 28 Nov 2018 18:54:26 +0100 (CET) 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 Qk0XRBjJaXMz; Wed, 28 Nov 2018 18:53:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3659799C03; Wed, 28 Nov 2018 18:53:40 +0100 (CET) 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 I9DSNTMSk98N; Wed, 28 Nov 2018 18:53:35 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 4B6CE999FD; Wed, 28 Nov 2018 18:53:31 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 11/20] irqchip/mmp: only touch the PJ4 & FIQ bits on enable/disable Date: Wed, 28 Nov 2018 18:53:15 +0100 Message-Id: <20181128175324.163202-12-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_125435_217961_B84F3B86 X-CRM114-Status: GOOD ( 12.15 ) 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 On an OLPC XO 1.75 machine, the "security processor" handles the GPIO 71 and 72 interrupts. Don't reset the "route to SP" bit (4). I'm just assuming the bit 4 is the "route to SP" bit -- it fixes the SP-based keyboard for me and defines ICU_INT_ROUTE_SP_IRQ to be 1 << 4. When asked for a data sheet, Marvell was not helpful. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- Changes since v1: - Adjusted wording & ack from Pavel drivers/irqchip/irq-mmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c index 25f32e1d7764..1ed38f9f1d0a 100644 --- a/drivers/irqchip/irq-mmp.c +++ b/drivers/irqchip/irq-mmp.c @@ -190,7 +190,7 @@ static const struct mmp_intc_conf mmp_conf = { static const struct mmp_intc_conf mmp2_conf = { .conf_enable = 0x20, .conf_disable = 0x0, - .conf_mask = 0x7f, + .conf_mask = 0x60, }; static void __exception_irq_entry mmp_handle_irq(struct pt_regs *regs) From patchwork Wed Nov 28 17:53:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703053 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 2C40E14BD for ; Wed, 28 Nov 2018 17:56:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17A662CDD8 for ; Wed, 28 Nov 2018 17:56:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 090152DBEC; Wed, 28 Nov 2018 17:56:22 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 8A6A32CDD8 for ; Wed, 28 Nov 2018 17:56:21 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=Oe32748VIc9S9HB/LzznBE/Rz/xV/s3HXsp0AOXNZ4k=; b=HyxTkTXKKhAs1I nU4BNo3EDxD6v5jFPJgjVIEShIg5l9t4ovKvW+K4LVgE99sK9UeedRhGfoKaFYfkJttlT2Obpg7TF PfUrQKMzkLcjToZAv+7fWv2xpYrK0WH7J8hmFKRxIBqt4PyDVX4XqJ9YcbO6VY4j2I0GGJ90Sb8lX eQ26iquv/WofbkF3xEtoQbvJrjELdaSXllw5E/x1ZNqcfS7WKRPm0pgDpEijV6o4NGwK5OS9JrwUu 43T3ldOkP8b2iAV6arnfBZcYTMLSNvqFNcYUAfmw7UmTEHjCXuwiIZOi5qz7l7ax9cZ5AkNFKhjjj xdHc5CAG+4OjkVna2crA==; 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 1gS44H-0007OD-3o; Wed, 28 Nov 2018 17:56:09 +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 1gS42f-0004mf-6b for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 17:54:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=57gUT9nudy/lhdbHrPjygzJvxiDrwFuYDC1M3d+60N4=; b=qVY1itlpY/Osa9TUPPfMiHxxVn LdZReOqecuExU3p4sPlIJM5Qag+XpC1zwJL1YMfbgZ5NoPsIW4CiAs6Jd/MFa4voUmtahUU73z5vU Jojr/P89lgV9kxpnslvVyLYxbNtb1voBfUv6SRoacq0lb803OOrS1m7R3MOvT7vZSTHrcJPmyS4P4 QjHMAnFGvj5SP6z9KEeDZZKL3D9jI6KFkpjyIjVntLMycjptiRmbCT79ZQmOYnpwdhXD9AoZ9UAM5 I9j1MNOICbwW4JIJOgsDwuSkOHNqWdsSCNgMLjX7Tu6IBLaHcSphBYazcShL/KOpCy567cqKC6su/ oTWQTJZA==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42Y-0007wc-Vk for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:24 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 28241999DE; Wed, 28 Nov 2018 18:54:03 +0100 (CET) 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_Cd3_dyJWBx; Wed, 28 Nov 2018 18:53:49 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3D2D6999C5; Wed, 28 Nov 2018 18:53:39 +0100 (CET) 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 Ysa8GWDGdrcW; Wed, 28 Nov 2018 18:53:36 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 8D02799B07; Wed, 28 Nov 2018 18:53:31 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 12/20] irqchip/mmp: do not use of_address_to_resource() to get mux regs Date: Wed, 28 Nov 2018 18:53:16 +0100 Message-Id: <20181128175324.163202-13-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_125423_187144_F9138347 X-CRM114-Status: GOOD ( 11.41 ) 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 The "regs" property of the "mrvl,mmp2-mux-intc" devices are silly. They are offsets from intc's base, not addresses on the parent bus. At this point it probably can't be fixed. On an OLPC XO-1.75 machine, the muxes are children of the intc, not the axi bus, and thus of_address_to_resource() won't work. We should treat the values as mere integers as opposed to bus addresses. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- Changes since v3: - Added this patch drivers/irqchip/irq-mmp.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c index 1ed38f9f1d0a..e34b57f006e3 100644 --- a/drivers/irqchip/irq-mmp.c +++ b/drivers/irqchip/irq-mmp.c @@ -423,9 +423,9 @@ IRQCHIP_DECLARE(mmp2_intc, "mrvl,mmp2-intc", mmp2_of_init); static int __init mmp2_mux_of_init(struct device_node *node, struct device_node *parent) { - struct resource res; int i, ret, irq, j = 0; u32 nr_irqs, mfp_irq; + u32 reg[4]; if (!parent) return -ENODEV; @@ -437,18 +437,13 @@ static int __init mmp2_mux_of_init(struct device_node *node, pr_err("Not found mrvl,intc-nr-irqs property\n"); return -EINVAL; } - ret = of_address_to_resource(node, 0, &res); + ret = of_property_read_u32_array(node, "reg", reg, ARRAY_SIZE(reg)); if (ret < 0) { pr_err("Not found reg property\n"); return -EINVAL; } - icu_data[i].reg_status = mmp_icu_base + res.start; - ret = of_address_to_resource(node, 1, &res); - if (ret < 0) { - pr_err("Not found reg property\n"); - return -EINVAL; - } - icu_data[i].reg_mask = mmp_icu_base + res.start; + icu_data[i].reg_status = mmp_icu_base + reg[0]; + icu_data[i].reg_mask = mmp_icu_base + reg[2]; icu_data[i].cascade_irq = irq_of_parse_and_map(node, 0); if (!icu_data[i].cascade_irq) return -EINVAL; From patchwork Wed Nov 28 17:53:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703079 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 42D9813BB for ; Wed, 28 Nov 2018 18:10:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 313C82DC53 for ; Wed, 28 Nov 2018 18:10:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20F322DC71; Wed, 28 Nov 2018 18:10:25 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 B15AD2DC53 for ; Wed, 28 Nov 2018 18:10:24 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=Wk0MfiYZ7JsR4HNEoy5bJecu4aFbm9cyxpXIVzhyAkI=; b=N85lXgmCIOzmTC YFg7DigW8n+1AfNYkVaDtGTbFy68eAdeJYRQRA6YnYvZyDcCKxwJQHtGOnliqAcLsW895A/52SDrK PHnwFoE6x1SYZN6vuQuTEJ4i5I98+epo7Xzk0KN1++bLL4+GTTVDIA9NFnt76uWjMrhsGkdFBP6an 252iBUK/Y4FYxbVWkQCLAY0Ftqo05qOzvfplzGyqG3gheB1d7vI4vy0Y++jTximcYNLgkXi+PKNUk l6NfpW7MlqtSFBDl3vpt1PGBDGVLhyypL2vNBh/rX9Iy0sh+Z+ZiWNhiIXcUn4D3L6r3JY8tybctc PcUXasbv8iA01mEMzlSA==; 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 1gS4Hw-0006kl-HH; Wed, 28 Nov 2018 18:10:16 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS4FZ-00043d-Qv for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 18:07:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=actFPeww1UvVr11KBjkoPDLUS/KRArsIjrNKWozAHWA=; b=wWZRlgkUr2IjMwoawpGH5NFCHp 9TSzdPAvB7UBDExrj1da0ywcKCyn1NHExouhxSDF0BCzv77fQuWx2yVQcHeGIGFbJz2Vu9fqZ8s/T pukyeKyhhQNPzyTmFSQOrrf4hUdhfyrbbD7YvuNErD3VllkfJWHnkirgOObTM0Hri1RBoy1ZvMeuM dClHKj4lubiD4Gbm6/uIL6UUxAEt9Grnq9qSbVQgymWhOo5sOjwrEmdzYTgUUm/6RSSvzHhsLTCE+ msaO+Y8/Ns+ojYVwwOtlWJK9tcxyyGtjWnYpT8pWaa7rzgKDBWcbfnyDPSUdRbXYysb5NoDdJPMWe gawDNo+A==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42g-00089Z-4i for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:31 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 4A15E999DE; Wed, 28 Nov 2018 18:54:28 +0100 (CET) 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 3VeWBeqWhqfc; Wed, 28 Nov 2018 18:53:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id EE6AF99986; Wed, 28 Nov 2018 18:53:40 +0100 (CET) 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 gsYqW018y048; Wed, 28 Nov 2018 18:53:36 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id D14C099B17; Wed, 28 Nov 2018 18:53:31 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 13/20] gpio: pxa: avoid attempting to set pin direction via pinctrl on MMP2 Date: Wed, 28 Nov 2018 18:53:17 +0100 Message-Id: <20181128175324.163202-14-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_175430_235682_65876314 X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 Similarly to PXA3xx pinctrl-single can't set pin direction on MMP2 either. See also: commit 9dabfdd84bdfa ("gpio: pxa: disable pinctrl calls for PXA3xx") Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- drivers/gpio/gpio-pxa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index bfe4c5c9f41c..1b437bbe5cf5 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -245,6 +245,7 @@ static bool pxa_gpio_has_pinctrl(void) { switch (gpio_type) { case PXA3XX_GPIO: + case MMP2_GPIO: return false; default: From patchwork Wed Nov 28 17:53:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703067 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 3409016B1 for ; Wed, 28 Nov 2018 18:08:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23E4E2DC4E for ; Wed, 28 Nov 2018 18:08:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17C4E2DC71; Wed, 28 Nov 2018 18:08:03 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 B18172DC4E for ; Wed, 28 Nov 2018 18:08:02 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=J91kGcTGiOPoexN2NrGkrb7she3555v0MhUy0vKP4GA=; b=CBjJjUJ/ov110P o1XzZ9ZvnPuRjgDbrKgEzrNRDFpFAw3B7hfbh1w3XKyM4SW2c6BwpJ061k0EGzKINHGNJPhfTtdmn ETdLNC/fwjohu3nmoymfJr6Zkk2zqY46ozng4wCmCrtN4bNJ8gur1lI9wrRKBKat08dLcRbz43/S6 J8ghDpcvtH1T8vE/FYIYpE4zZEA8ZAPiIIRZXMZ5XCbmDZ5CI6yZfLJLLb1l4HCk//j2SXGw0FTk5 Wa8mN4zdzW+ZGJmzYZSIdzDgtpxlaztepL0Vql1ftM/bpeDLlxoX7ql5AfRnyf7Th1ysFzK3bWMw2 ZtTKoddoEbZyDrXtwCQg==; 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 1gS4Fl-0004Ps-Pg; Wed, 28 Nov 2018 18:08:01 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS4FX-00043d-FF for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 18:07:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=PkkYeuYC49AsYmo6gnufd03KvW3/Aco2+RctAp43r74=; b=euy7b01NkaP1oxez5Lf/c20OQi BtkKO0hxs70TzcUO824C8nL8lJnAedLkF7ndDvm4QZYl7iom6VXLtNybZyZtomzvCF7LWh638MAd2 +OywY5pcBDXva3KFpjXw7NWEhaFO68zRRRgFTjbnJii2YdgtgwvEcYTNrRq06r+v/v7PYVLw+zwRh qXmn4UarDaH28dm8M6MakDTM1BOefeqold8tr+MxTfkn9KNVTrSItCbf2MCc+o2nLn0ZgW76yFZYG jrPUt+vaO3CvoX8b7ToNlU43wy/awNKXeyuEvZzEk7/SXroM6c0s3uRaDrDiobJcDzcINervOkWk6 3n9grbPg==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42g-000884-4j for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:33 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 70E9B99A51; Wed, 28 Nov 2018 18:54:21 +0100 (CET) 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 bRXCUJoswf8E; Wed, 28 Nov 2018 18:54:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id B2EAD99B07; Wed, 28 Nov 2018 18:53:41 +0100 (CET) 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 dWUQ9O-UcFzV; Wed, 28 Nov 2018 18:53:36 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 2757D99B26; Wed, 28 Nov 2018 18:53:32 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 14/20] ARM: mmp/mmp2: use cpu_is_pj4() instead of cpu_is_mmp2() Date: Wed, 28 Nov 2018 18:53:18 +0100 Message-Id: <20181128175324.163202-15-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_175430_383373_BD1977E0 X-CRM114-Status: GOOD ( 14.95 ) 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 The MMP2 platform uses the PJ4 CPU. The cpu_is_mmp2() macro is thus actually not useful at all and moreover gives the wrong result on MACH_MMP2_DT. The actual problem I aim to fix is that on a device-tree enabled system, the timer ends up being initialized incorrectly. In fact, it ticks like at rate that's 1/100 slower or so. Perhaps the other cpu_is_mmp2() uses are more benign, but still useless. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/mach-mmp/cputype.h | 9 --------- arch/arm/mach-mmp/mmp2.c | 2 +- arch/arm/mach-mmp/pm-mmp2.c | 2 +- arch/arm/mach-mmp/time.c | 2 +- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-mmp/cputype.h b/arch/arm/mach-mmp/cputype.h index 446edaeb78a7..405dbbbbbcdd 100644 --- a/arch/arm/mach-mmp/cputype.h +++ b/arch/arm/mach-mmp/cputype.h @@ -44,13 +44,4 @@ static inline int cpu_is_pxa910(void) #define cpu_is_pxa910() (0) #endif -#ifdef CONFIG_CPU_MMP2 -static inline int cpu_is_mmp2(void) -{ - return (((read_cpuid_id() >> 8) & 0xff) == 0x58); -} -#else -#define cpu_is_mmp2() (0) -#endif - #endif /* __ASM_MACH_CPUTYPE_H */ diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index afba5460cdaf..b670fafedeac 100644 --- a/arch/arm/mach-mmp/mmp2.c +++ b/arch/arm/mach-mmp/mmp2.c @@ -104,7 +104,7 @@ void __init mmp2_init_irq(void) static int __init mmp2_init(void) { - if (cpu_is_mmp2()) { + if (cpu_is_pj4()) { #ifdef CONFIG_CACHE_TAUROS2 tauros2_init(0); #endif diff --git a/arch/arm/mach-mmp/pm-mmp2.c b/arch/arm/mach-mmp/pm-mmp2.c index 17699be3bc3d..bcd5111ffb37 100644 --- a/arch/arm/mach-mmp/pm-mmp2.c +++ b/arch/arm/mach-mmp/pm-mmp2.c @@ -220,7 +220,7 @@ static int __init mmp2_pm_init(void) { uint32_t apcr; - if (!cpu_is_mmp2()) + if (!cpu_is_pj4()) return -EIO; suspend_set_ops(&mmp2_pm_ops); diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index 96ad1db0b04b..0f49ac579a17 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c @@ -163,7 +163,7 @@ static void __init timer_config(void) __raw_writel(0x0, mmp_timer_base + TMR_CER); /* disable */ - ccr &= (cpu_is_mmp2()) ? (TMR_CCR_CS_0(0) | TMR_CCR_CS_1(0)) : + ccr &= (cpu_is_pj4()) ? (TMR_CCR_CS_0(0) | TMR_CCR_CS_1(0)) : (TMR_CCR_CS_0(3) | TMR_CCR_CS_1(3)); __raw_writel(ccr, mmp_timer_base + TMR_CCR); From patchwork Wed Nov 28 17:53:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703111 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 2EC4E14BD for ; Wed, 28 Nov 2018 18:24:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15FF42B389 for ; Wed, 28 Nov 2018 18:24:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 099C82B3EE; Wed, 28 Nov 2018 18:24:54 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 4AF702B389 for ; Wed, 28 Nov 2018 18:24:53 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=opDQZBmkimz4PW0+yAOfwdK0ZLHL3Rr81hjy1qDkMS4=; b=jL6A6dyY8Xzm6a QkZ7dnm7N0kIZt1o50uUcZzoqz5Mct05zRBMzy4ut99/I05d0Ye4C1XEXpOwRgAnUL8fv5g9y0AFx C44zYiyN5dF++FoUbJFcnUlv0z8+B5vaQok5Sce9z0AZpvkPmq+RhOvfFGS/vS3wEM+k3tZeOWzcN XUIDZ8Up95E21ERsh5Wi3UZTya6QhRJwMsOIYCoxSsz0gH8Eawizq2uOCNGqo49ZbjzqQeOx0eqM8 nbJR3GlYCzAPg1F1UmvAFNY76wiaJ9RmO29Mmj08eLbmarbL7CsGvVnwQuKgpS7AhYtd1uAcImb0C ZBxiskCHGOYVLBF2Zrcw==; 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 1gS4W4-0003pz-JB; Wed, 28 Nov 2018 18:24:52 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS4Fa-00043d-Vh for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 18:07:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=Oa/vdOOGJWYIBGZt8oh5dKgNq7LHuoYUsFdy6jDwWTU=; b=vb/YPZotRttyUSUa5q+RcBZ/+k eohYpcOrzfN3YsKIQDY2mUla6hpwBsqQaMk6dHSNfdlh1Yfkaj5GxR67GfOgksrzR+GyIWjTznGZg unabpcwABRIjck/ynxom/fnYLQEoDpufX/VuMhQJUW1fH4FxQELrU8+inW4Xlgq95+gMIff0YU8qk kZGuP145zR4eC+OneihIUjFj0ZJmwRA/wpP+iXXTzQ0f53p8wF+whBOiLmcQLRt0jPz5sAF2Rwazv iY6NW8efPaTn4X4Y5tIxAi+EQw+uZQqtQB8w/QLL0bTgvsYC+b0dtLnR5DPcJKKR0368zd/+KY6Ik OINZi3sA==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42g-000878-4h for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:31 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id AD81F99AAE; Wed, 28 Nov 2018 18:54:14 +0100 (CET) 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 OpN2uRK6Ek7P; Wed, 28 Nov 2018 18:54:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 7695199994; Wed, 28 Nov 2018 18:53:42 +0100 (CET) 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 AkCB2kB47FYv; Wed, 28 Nov 2018 18:53:37 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 68E6299B34; Wed, 28 Nov 2018 18:53:32 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 15/20] ARM: mmp2: initialize clocks before the timer Date: Wed, 28 Nov 2018 18:53:19 +0100 Message-Id: <20181128175324.163202-16-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_175430_227498_A57A23AB X-CRM114-Status: GOOD ( 10.47 ) 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 The timer shall enable its clock. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- arch/arm/mach-mmp/mmp2-dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-mmp/mmp2-dt.c b/arch/arm/mach-mmp/mmp2-dt.c index 0341359b24a4..50c5e8b5be3d 100644 --- a/arch/arm/mach-mmp/mmp2-dt.c +++ b/arch/arm/mach-mmp/mmp2-dt.c @@ -26,8 +26,8 @@ static void __init mmp_init_time(void) #ifdef CONFIG_CACHE_TAUROS2 tauros2_init(0); #endif - mmp_dt_init_timer(); of_clk_init(NULL); + mmp_dt_init_timer(); } static const char *const mmp2_dt_board_compat[] __initconst = { From patchwork Wed Nov 28 17:53:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703051 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 54B0614BD for ; Wed, 28 Nov 2018 17:55:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FC432CDD8 for ; Wed, 28 Nov 2018 17:55:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32E462DBEC; Wed, 28 Nov 2018 17:55:50 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 AE7972CDD8 for ; Wed, 28 Nov 2018 17:55:49 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=wUMeAdPDGEfAE3Mzq+4PXL5EMwqOAfEp/acYGcNaLyo=; b=bqhIrwXxyiqvKL ruxy+cxdT8usxIir1KyvTex+t7s37lK5hSWHc7LZSeOVeeIE959Ft0gfrOQDafRit52mZdiPAVItR 5hlrhbPrHr+ef7f5BLyDWtfhCFmgWU86Id4gW2qTFtviN970jpC0MiXmKNUzXDT/VP1mwYHAmguh5 PTHgprVZuUNXphURRYBHej0bKX2jVC0Xpdt8PJz6uOnhxuNA2vtM5HPvQNfvPYb9xMUiTvj2x01tm R1EiZQn/cR7Jt+0YtHf3hQ2L+R4kfWtN+VDyada/0l2vGJWgGpmSOgAPin/Jb+Vzt1z7I5YRXIbkV P0lQIbVtLBzXsUKICQBg==; 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 1gS43w-00073K-HE; Wed, 28 Nov 2018 17:55:48 +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 1gS42d-0004mf-KW for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 17:54:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=3F77iAqTCpnf+LODcQi1Mx6Sz9/eP/30oCfeZ/fk+4w=; b=cnYwUmIoiLPregvMztyyx21O2q GHm4ToCJZXE3mcG6OrELOcxmjVy5OTZK1g8RUiDWjfEWt4K5fmDYzyoJ6eJf+eDmra5Rf/d7dW+Tm ERLsaK6PoC1D+s/uA59EHPepnJaXBgIrwJXhNb/If2XxxulXRmYlbaxidUC+ni9BZhZZ32F5JFtlC bcBd1Ncr8akD9HPu5AQN/bb5oz+BjiJUQaygx1OrOLEjpjr0yg2vxiWD7HInnueCBKMK6IXdPNeVT zWR3XmhrLpslrwaGUa9ceZxOpzTj3qm/lJyApC6WIi5Bc5bkUV1MMZR+dL18k+kirDyjfDlQ7wL+c A4Va1c8A==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42Z-0007xg-6c for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:24 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3C77399C7E; Wed, 28 Nov 2018 18:54:18 +0100 (CET) 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 zI2nU5Q9Rce1; Wed, 28 Nov 2018 18:53:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 78FE7999FD; Wed, 28 Nov 2018 18:53:41 +0100 (CET) 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 smAYdk7ILxdn; Wed, 28 Nov 2018 18:53:38 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id B2A0399994; Wed, 28 Nov 2018 18:53:32 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 16/20] ARM: mmp/mmp2: dt: enable the clock Date: Wed, 28 Nov 2018 18:53:20 +0100 Message-Id: <20181128175324.163202-17-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_125423_520813_34D92FA6 X-CRM114-Status: GOOD ( 18.11 ) 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 The device-tree booted MMP2 needs to enable the timer clock, otherwise it would stop ticking when the boot finishes. It can also use the clock rate from the clk, the non-DT boards need to keep using the hardcoded rates. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- Changes since v2: - Wording improvement, whitespace fix and an ack from Pavel Changes since v1: - Made the clock optional, to keep compatibility with DTs without it arch/arm/mach-mmp/common.h | 2 +- arch/arm/mach-mmp/mmp2.c | 2 +- arch/arm/mach-mmp/pxa168.c | 2 +- arch/arm/mach-mmp/time.c | 32 ++++++++++++++++++++------------ 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h index 7e284d9c429f..5ac2851ef5d3 100644 --- a/arch/arm/mach-mmp/common.h +++ b/arch/arm/mach-mmp/common.h @@ -2,7 +2,7 @@ #include #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) -extern void timer_init(int irq); +extern void timer_init(int irq, unsigned long rate); extern void __init mmp_map_io(void); extern void mmp_restart(enum reboot_mode, const char *); diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index b670fafedeac..8717de7d0757 100644 --- a/arch/arm/mach-mmp/mmp2.c +++ b/arch/arm/mach-mmp/mmp2.c @@ -134,7 +134,7 @@ void __init mmp2_timer_init(void) clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1); __raw_writel(clk_rst, APBC_TIMERS); - timer_init(IRQ_MMP2_TIMER1); + timer_init(IRQ_MMP2_TIMER1, 6500000); } /* on-chip devices */ diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 0f5f16fb8c66..77a358165a56 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c @@ -79,7 +79,7 @@ void __init pxa168_timer_init(void) /* 3.25MHz, bus/functional clock enabled, release reset */ __raw_writel(TIMER_CLK_RST, APBC_TIMERS); - timer_init(IRQ_PXA168_TIMER1); + timer_init(IRQ_PXA168_TIMER1, 6500000); } void pxa168_clear_keypad_wakeup(void) diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index 0f49ac579a17..007b94a92923 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -38,12 +39,6 @@ #include "cputype.h" #include "clock.h" -#ifdef CONFIG_CPU_MMP2 -#define MMP_CLOCK_FREQ 6500000 -#else -#define MMP_CLOCK_FREQ 3250000 -#endif - #define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE #define MAX_DELTA (0xfffffffe) @@ -189,19 +184,18 @@ static struct irqaction timer_irq = { .dev_id = &ckevt, }; -void __init timer_init(int irq) +void __init timer_init(int irq, unsigned long rate) { timer_config(); - sched_clock_register(mmp_read_sched_clock, 32, MMP_CLOCK_FREQ); + sched_clock_register(mmp_read_sched_clock, 32, rate); ckevt.cpumask = cpumask_of(0); setup_irq(irq, &timer_irq); - clocksource_register_hz(&cksrc, MMP_CLOCK_FREQ); - clockevents_config_and_register(&ckevt, MMP_CLOCK_FREQ, - MIN_DELTA, MAX_DELTA); + clocksource_register_hz(&cksrc, rate); + clockevents_config_and_register(&ckevt, rate, MIN_DELTA, MAX_DELTA); } #ifdef CONFIG_OF @@ -213,7 +207,9 @@ static const struct of_device_id mmp_timer_dt_ids[] = { void __init mmp_dt_init_timer(void) { struct device_node *np; + struct clk *clk; int irq, ret; + unsigned long rate; np = of_find_matching_node(NULL, mmp_timer_dt_ids); if (!np) { @@ -221,6 +217,18 @@ void __init mmp_dt_init_timer(void) goto out; } + clk = of_clk_get(np, 0); + if (!IS_ERR(clk)) { + ret = clk_prepare_enable(clk); + if (ret) + goto out; + rate = clk_get_rate(clk) / 2; + } else if (cpu_is_pj4()) { + rate = 6500000; + } else { + rate = 3250000; + } + irq = irq_of_parse_and_map(np, 0); if (!irq) { ret = -EINVAL; @@ -231,7 +239,7 @@ void __init mmp_dt_init_timer(void) ret = -ENOMEM; goto out; } - timer_init(irq); + timer_init(irq, rate); return; out: pr_err("Failed to get timer from device tree with error:%d\n", ret); From patchwork Wed Nov 28 17:53:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703049 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 78D6114BD for ; Wed, 28 Nov 2018 17:55:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64A372CDD8 for ; Wed, 28 Nov 2018 17:55:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 580692DBEC; Wed, 28 Nov 2018 17:55:43 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 F1F9F2CDD8 for ; Wed, 28 Nov 2018 17:55:42 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=6zBleMCHDFnT+SMr6G8RjeSu0Y36Imjr/4pk+OQhc4M=; b=epNr8qgywJuz5J ONjy/dhR1lGYIYUbFZnl641Bqjd7upnu7nHL9LqYq48bj5xivFZ12wQ82g9WLxiAvtmj9bmvGGiXl lwdW/W7EPJXGOsjyM45pAVgB6bdiLReBRsaRYWQTqRC+Dq4ZRgbjDOo7mmjE+iPBEsL+GS57R2U17 qQ0SgyyvhQuAXmWJXCWC9e5tL7gYkuk5QQSA6FJ4gvZ4hI6mqCkiHjis/sQ69m3d0uEPtNO73Qmbl cQzpuI/Y0XSE1LgiO8NjwcRtoraZzWDxiGWKN3zXdEzv9si22fv+f1spYldEtZfwmnEAJQ4XRYlko QxAkl6w+QGBEgm7W2FwQ==; 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 1gS43h-0006mz-UB; Wed, 28 Nov 2018 17:55:33 +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 1gS42c-0004mf-4e for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 17:54:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=eJesBJt1Yi3wb0N4DK63VmugL0BgSCk8U9n8jpg2fOY=; b=kEIKkwZWh7SxcV3cA7FU5k5dMm aRlDODAUzSO5BaNDfUM0d2UUexfjpl7Tf3IwK4TRzk4RRtoBEs4E/Ah6v5L4Jh05F0wi/ipj8XraA tIb0Y56OhJ9PicKYJkesGzPL8vzKCfkCVaVaU2u8EdrIFcmPKYDOxKzLNtdcvKNiAEXihpcYdxQyU kSNzww0m1Xmm47CkcL623TrddgAjWLzbBWSyIIW1/3NMvp+nQH0p/+nxpgTCRlcIODNDkBtp+A5Zj pnxQ03EGVZ+azD4as0O667urV52LDDYneEm7r4clgqJG2n452IrqpZYGGXidgDjDRHPOXkDdiwSL6 9xBBnlww==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42Y-0007xf-U8 for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:23 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3E12D99994; Wed, 28 Nov 2018 18:54:16 +0100 (CET) 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 jdfuYrtUC_6B; Wed, 28 Nov 2018 18:54:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id D151A99B26; Wed, 28 Nov 2018 18:53:43 +0100 (CET) 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 lpCOhlH7fOn4; Wed, 28 Nov 2018 18:53:40 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 0727B99B42; Wed, 28 Nov 2018 18:53:33 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 17/20] ARM: mmp: add a pxa-usb-phy device Date: Wed, 28 Nov 2018 18:53:21 +0100 Message-Id: <20181128175324.163202-18-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_125423_140137_3C7D3697 X-CRM114-Status: GOOD ( 12.47 ) 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 This is to replace the USB PHY initialization code (pxa_usb_phy_init(), pxa_usb_phy_deinit()) with a proper PHY driver. Signed-off-by: Lubomir Rintel --- arch/arm/mach-mmp/devices.c | 21 +++++++++++++++++++++ arch/arm/mach-mmp/pxa910.h | 1 + 2 files changed, 22 insertions(+) diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c index 0fca63c80e1a..822b8be042b9 100644 --- a/arch/arm/mach-mmp/devices.c +++ b/arch/arm/mach-mmp/devices.c @@ -240,6 +240,27 @@ void pxa_usb_phy_deinit(void __iomem *phy_reg) #if IS_ENABLED(CONFIG_USB_SUPPORT) static u64 __maybe_unused usb_dma_mask = ~(u32)0; +#if IS_ENABLED(CONFIG_PHY_PXA_USB) +struct resource pxa168_usb_phy_resources[] = { + [0] = { + .start = PXA168_U2O_PHYBASE, + .end = PXA168_U2O_PHYBASE + USB_PHY_RANGE, + .flags = IORESOURCE_MEM, + }, +}; + +struct platform_device pxa168_device_usb_phy = { + .name = "pxa-usb-phy", + .id = -1, + .resource = pxa168_usb_phy_resources, + .num_resources = ARRAY_SIZE(pxa168_usb_phy_resources), + .dev = { + .dma_mask = &usb_dma_mask, + .coherent_dma_mask = 0xffffffff, + } +}; +#endif /* CONFIG_PHY_PXA_USB */ + #if IS_ENABLED(CONFIG_USB_MV_UDC) struct resource pxa168_u2o_resources[] = { /* regbase */ diff --git a/arch/arm/mach-mmp/pxa910.h b/arch/arm/mach-mmp/pxa910.h index 42009c349eae..2dfe38e4acc1 100644 --- a/arch/arm/mach-mmp/pxa910.h +++ b/arch/arm/mach-mmp/pxa910.h @@ -22,6 +22,7 @@ extern struct pxa_device_desc pxa910_device_pwm2; extern struct pxa_device_desc pxa910_device_pwm3; extern struct pxa_device_desc pxa910_device_pwm4; extern struct pxa_device_desc pxa910_device_nand; +extern struct platform_device pxa168_device_usb_phy; extern struct platform_device pxa168_device_u2o; extern struct platform_device pxa168_device_u2ootg; extern struct platform_device pxa168_device_u2oehci; From patchwork Wed Nov 28 17:53:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703135 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 52E49109C for ; Wed, 28 Nov 2018 18:34:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 442EA2B53E for ; Wed, 28 Nov 2018 18:34:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 358CF2B5A2; Wed, 28 Nov 2018 18:34:18 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 CBACE2B53E for ; Wed, 28 Nov 2018 18:34:17 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=PaGySdrj7t6+3U8gF4xVcbDf04pvEklIZt8cVfDYAvA=; b=B6sMLLKvpxNV1Q 28M0h52waEAPzu0/iZCf7O9y8qxYE/3AYNRUZ73N/5Nv43iV00VWLXWCDrbOttkC6+J1fqYAMsSVh MOSVaZnqu7TaPGDKLje0xhUoA8WOcwfPx7RNusxMu5bUVh3PMTZRyXVwBax/AnDqd1TX0+G8tkHoF zeppg9UoboZ3j1qPLms0/d50UFQtJQ8+21vKyTtTlVr68zDK6bdX/2pSj+Kn139/C5Us74VtFw1zR 09AsP0VISLUQoU0+dOA7xYzPpOSUX5KGlAVNmvH6lPyEKMvi4IpkfT/zIO8SlbORnj9+FEvONc3vB gHu3+aixVFZTiwLjwg+Q==; 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 1gS4f4-0001sP-TQ; Wed, 28 Nov 2018 18:34:10 +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 1gS4eZ-0001GN-MG for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 18:33:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=pazM6nsUZYPFOu14GLDVLBRCC5ClbD/DPrvxvbKtNR8=; b=IwcHz7H7T3sFYRBCsDbRtRjllq 6EjXr7bnYAoDOsVwdoCt4wc6vRJNBSh+sK5BmAn67uqecb8hjCS3xoY0OaUfY20MO82klTJDX73MH p6BTbGUKxz8YmrfiMAwXjaZW2Om1vigIzAOzuodfTvDm0eqw1gFgekP1hvYEuMVGIj0XuF/h0q2OL P34MPR6p1IfYltZhXUkYk7j4qv3LI+l+P/IYEGQ7kgcenVmPRO45n3qGI/kiO5bU5kijgAKKMkksk sUJaJPzPVAKwCh4K9+k1IXM3ktY2rRsqs+HcXch9DDTcg0Q6pvfAP78YVnVkxxAvSPXUlAnRcVpmv Fd9bbXwg==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42k-0007yr-Ln for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:35 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id A22D999B60; Wed, 28 Nov 2018 18:54:24 +0100 (CET) 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 ZDkLyjsMOyjW; Wed, 28 Nov 2018 18:54:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 542E899B6F; Wed, 28 Nov 2018 18:53:44 +0100 (CET) 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 xJV4-jz0wLzJ; Wed, 28 Nov 2018 18:53:41 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 4751599B64; Wed, 28 Nov 2018 18:53:33 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 18/20] ARM: mmp: add an instance of pxa-usb-phy to ttc_dkb and aspenite Date: Wed, 28 Nov 2018 18:53:22 +0100 Message-Id: <20181128175324.163202-19-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_125435_228292_E6B838CD X-CRM114-Status: UNSURE ( 9.40 ) X-CRM114-Notice: Please train this message. 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 This will replace the *_pdata.phy_{de,}init() Signed-off-by: Lubomir Rintel --- Changes since v1: - Squashed patches with ttc_dkb and aspenite changes together. arch/arm/mach-mmp/aspenite.c | 4 ++++ arch/arm/mach-mmp/ttc_dkb.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 6c2ebf01893a..23f99976b5f5 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c @@ -256,6 +256,10 @@ static void __init common_init(void) /* off-chip devices */ platform_device_register(&smc91x_device); +#if IS_ENABLED(CONFIG_PHY_PXA_USB) + platform_device_register(&pxa168_device_usb_phy); +#endif + #if IS_ENABLED(CONFIG_USB_EHCI_MV) pxa168_add_usb_host(&pxa168_sph_pdata); #endif diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c index c7897fb2b6da..767dcb23ee1c 100644 --- a/arch/arm/mach-mmp/ttc_dkb.c +++ b/arch/arm/mach-mmp/ttc_dkb.c @@ -282,6 +282,10 @@ static void __init ttc_dkb_init(void) sizeof(struct pxa_gpio_platform_data)); platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices)); +#if IS_ENABLED(CONFIG_PHY_PXA_USB) + platform_device_register(&pxa168_device_usb_phy); +#endif + #if IS_ENABLED(CONFIG_USB_MV_UDC) pxa168_device_u2o.dev.platform_data = &ttc_usb_pdata; platform_device_register(&pxa168_device_u2o); From patchwork Wed Nov 28 17:53:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703065 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 DDF5D16B1 for ; Wed, 28 Nov 2018 18:07:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAAD32DC4E for ; Wed, 28 Nov 2018 18:07:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAA792DC70; Wed, 28 Nov 2018 18:07:48 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 8ED5C2DC4E for ; Wed, 28 Nov 2018 18:07:47 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=htNv1riMXaBwVn52LY9OoxTlWiF/K4ZdfNDKgPipR+o=; b=HfUByOBfVR0aXW ZU7HKBblAbd7MAF5DX9zCsBLC9au6yZXP6cmmKAbJqnaa1uudwx8bLFIIQ6+88NGWmxZUeQ2XpAeO Jn1gsoKhL0s+I2keCnRGYjp2PHgPNLWHQrRUo+0sGC7KrYJAOa2JI2u3s08DO9HMAmD5WCq5FHR9E h7W748MVc4lxzYHqxVcRdDoFWSYbiUlkfoVLObAsmK5gkye4w2APbIcJR36s/pc0PTRZ3HleFgwwy 7UMsmQB4+U707bOeC5XlulFq9ufG/5BYUncr3BpLTaMjzNg8EZ16J3NCPBlIpGVE1SFY0yCVoGCDR 6MHkr3URZmin38M1KorA==; 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 1gS4FV-00049O-Is; Wed, 28 Nov 2018 18:07:45 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS4FT-00043d-Lm for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 18:07:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=uU5o4/sg4hKLicV+XU3ZcNF+hyYuSd8NhkQD1ubLioY=; b=u+tvwINXVLNET8jQqRGBP1UfoW XfPy5kq483e6CQNR25Ze3EOfCk2p2cZuGzefph8+56ii2BDMpg0DkjhqW5hDRoCqBfZD7QzdkfypQ 1+OI5+kg/FOBooVl2OS6QrWI/BkT0TnDarrbdcDDOod5T9QqvMjOSI2MxIDm38dD+1EFUYFNvX7jR kaIWJ31YRGGg9OoQynl262mDN7uCzQH+xDXUgU1e7q2t/fgrjypL/A3wzFkh6rjeo4y3JqHndW2a5 23wGQTcDQZor8lmtu94xCfI2X0B6wR2mzICyHZNsXQMWyD77N00xW82QqjTdXXefIBhh5kih6Bc8s 5gdkyrLQ==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42s-0008Ao-6o for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:47 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 86BE699B64; Wed, 28 Nov 2018 18:54:30 +0100 (CET) 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 2ez4KxhkMu71; Wed, 28 Nov 2018 18:54:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 24CD599B17; Wed, 28 Nov 2018 18:53:45 +0100 (CET) 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 fTorNjoABbQ9; Wed, 28 Nov 2018 18:53:42 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 8E13599BB9; Wed, 28 Nov 2018 18:53:33 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 19/20] USB: phy-mv-usb: use phy-pxa-usb Date: Wed, 28 Nov 2018 18:53:23 +0100 Message-Id: <20181128175324.163202-20-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_175442_402299_C828CA75 X-CRM114-Status: GOOD ( 21.44 ) 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 Use a proper PHY driver, instead of hooks to a board support package. Signed-off-by: Lubomir Rintel Tested-by: Pavel Machek --- arch/arm/mach-mmp/devices.c | 11 +--- drivers/usb/phy/phy-mv-usb.c | 123 ++++++++++++++++------------------- drivers/usb/phy/phy-mv-usb.h | 8 ++- 3 files changed, 62 insertions(+), 80 deletions(-) diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c index 822b8be042b9..eb9b3c34e90a 100644 --- a/arch/arm/mach-mmp/devices.c +++ b/arch/arm/mach-mmp/devices.c @@ -325,21 +325,12 @@ struct platform_device pxa168_device_u2oehci = { #if IS_ENABLED(CONFIG_USB_MV_OTG) struct resource pxa168_u2ootg_resources[] = { - /* regbase */ [0] = { - .start = PXA168_U2O_REGBASE + U2x_CAPREGS_OFFSET, + .start = PXA168_U2O_REGBASE, .end = PXA168_U2O_REGBASE + USB_REG_RANGE, .flags = IORESOURCE_MEM, - .name = "capregs", }, - /* phybase */ [1] = { - .start = PXA168_U2O_PHYBASE, - .end = PXA168_U2O_PHYBASE + USB_PHY_RANGE, - .flags = IORESOURCE_MEM, - .name = "phyregs", - }, - [2] = { .start = IRQ_PXA168_USB1, .end = IRQ_PXA168_USB1, .flags = IORESOURCE_IRQ, diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c index cfd9add10bf4..0f67c5b65fe9 100644 --- a/drivers/usb/phy/phy-mv-usb.c +++ b/drivers/usb/phy/phy-mv-usb.c @@ -50,7 +50,7 @@ static char *state_string[] = { static int mv_otg_set_vbus(struct usb_otg *otg, bool on) { - struct mv_otg *mvotg = container_of(otg->usb_phy, struct mv_otg, phy); + struct mv_otg *mvotg = container_of(otg->usb_phy, struct mv_otg, usb_phy); if (mvotg->pdata->set_vbus == NULL) return -ENODEV; @@ -193,7 +193,7 @@ static void mv_otg_init_irq(struct mv_otg *mvotg) static void mv_otg_start_host(struct mv_otg *mvotg, int on) { #ifdef CONFIG_USB - struct usb_otg *otg = mvotg->phy.otg; + struct usb_otg *otg = mvotg->usb_phy.otg; struct usb_hcd *hcd; if (!otg->host) @@ -214,12 +214,12 @@ static void mv_otg_start_host(struct mv_otg *mvotg, int on) static void mv_otg_start_periphrals(struct mv_otg *mvotg, int on) { - struct usb_otg *otg = mvotg->phy.otg; + struct usb_otg *otg = mvotg->usb_phy.otg; if (!otg->gadget) return; - dev_info(mvotg->phy.dev, "gadget %s\n", on ? "on" : "off"); + dev_info(mvotg->usb_phy.dev, "gadget %s\n", on ? "on" : "off"); if (on) usb_gadget_vbus_connect(otg->gadget); @@ -247,14 +247,11 @@ static int mv_otg_enable_internal(struct mv_otg *mvotg) dev_dbg(&mvotg->pdev->dev, "otg enabled\n"); otg_clock_enable(mvotg); - if (mvotg->pdata->phy_init) { - retval = mvotg->pdata->phy_init(mvotg->phy_regs); - if (retval) { - dev_err(&mvotg->pdev->dev, - "init phy error %d\n", retval); - otg_clock_disable(mvotg); - return retval; - } + retval = phy_init(mvotg->phy); + if (retval) { + dev_err(&mvotg->pdev->dev, "init phy error %d\n", retval); + otg_clock_disable(mvotg); + return retval; } mvotg->active = 1; @@ -274,8 +271,7 @@ static void mv_otg_disable_internal(struct mv_otg *mvotg) { if (mvotg->active) { dev_dbg(&mvotg->pdev->dev, "otg disabled\n"); - if (mvotg->pdata->phy_deinit) - mvotg->pdata->phy_deinit(mvotg->phy_regs); + phy_exit(mvotg->phy); otg_clock_disable(mvotg); mvotg->active = 0; } @@ -329,68 +325,68 @@ static void mv_otg_update_inputs(struct mv_otg *mvotg) static void mv_otg_update_state(struct mv_otg *mvotg) { struct mv_otg_ctrl *otg_ctrl = &mvotg->otg_ctrl; - int old_state = mvotg->phy.otg->state; + int old_state = mvotg->usb_phy.otg->state; switch (old_state) { case OTG_STATE_UNDEFINED: - mvotg->phy.otg->state = OTG_STATE_B_IDLE; + mvotg->usb_phy.otg->state = OTG_STATE_B_IDLE; /* FALL THROUGH */ case OTG_STATE_B_IDLE: if (otg_ctrl->id == 0) - mvotg->phy.otg->state = OTG_STATE_A_IDLE; + mvotg->usb_phy.otg->state = OTG_STATE_A_IDLE; else if (otg_ctrl->b_sess_vld) - mvotg->phy.otg->state = OTG_STATE_B_PERIPHERAL; + mvotg->usb_phy.otg->state = OTG_STATE_B_PERIPHERAL; break; case OTG_STATE_B_PERIPHERAL: if (!otg_ctrl->b_sess_vld || otg_ctrl->id == 0) - mvotg->phy.otg->state = OTG_STATE_B_IDLE; + mvotg->usb_phy.otg->state = OTG_STATE_B_IDLE; break; case OTG_STATE_A_IDLE: if (otg_ctrl->id) - mvotg->phy.otg->state = OTG_STATE_B_IDLE; + mvotg->usb_phy.otg->state = OTG_STATE_B_IDLE; else if (!(otg_ctrl->a_bus_drop) && (otg_ctrl->a_bus_req || otg_ctrl->a_srp_det)) - mvotg->phy.otg->state = OTG_STATE_A_WAIT_VRISE; + mvotg->usb_phy.otg->state = OTG_STATE_A_WAIT_VRISE; break; case OTG_STATE_A_WAIT_VRISE: if (otg_ctrl->a_vbus_vld) - mvotg->phy.otg->state = OTG_STATE_A_WAIT_BCON; + mvotg->usb_phy.otg->state = OTG_STATE_A_WAIT_BCON; break; case OTG_STATE_A_WAIT_BCON: if (otg_ctrl->id || otg_ctrl->a_bus_drop || otg_ctrl->a_wait_bcon_timeout) { mv_otg_cancel_timer(mvotg, A_WAIT_BCON_TIMER); mvotg->otg_ctrl.a_wait_bcon_timeout = 0; - mvotg->phy.otg->state = OTG_STATE_A_WAIT_VFALL; + mvotg->usb_phy.otg->state = OTG_STATE_A_WAIT_VFALL; otg_ctrl->a_bus_req = 0; } else if (!otg_ctrl->a_vbus_vld) { mv_otg_cancel_timer(mvotg, A_WAIT_BCON_TIMER); mvotg->otg_ctrl.a_wait_bcon_timeout = 0; - mvotg->phy.otg->state = OTG_STATE_A_VBUS_ERR; + mvotg->usb_phy.otg->state = OTG_STATE_A_VBUS_ERR; } else if (otg_ctrl->b_conn) { mv_otg_cancel_timer(mvotg, A_WAIT_BCON_TIMER); mvotg->otg_ctrl.a_wait_bcon_timeout = 0; - mvotg->phy.otg->state = OTG_STATE_A_HOST; + mvotg->usb_phy.otg->state = OTG_STATE_A_HOST; } break; case OTG_STATE_A_HOST: if (otg_ctrl->id || !otg_ctrl->b_conn || otg_ctrl->a_bus_drop) - mvotg->phy.otg->state = OTG_STATE_A_WAIT_BCON; + mvotg->usb_phy.otg->state = OTG_STATE_A_WAIT_BCON; else if (!otg_ctrl->a_vbus_vld) - mvotg->phy.otg->state = OTG_STATE_A_VBUS_ERR; + mvotg->usb_phy.otg->state = OTG_STATE_A_VBUS_ERR; break; case OTG_STATE_A_WAIT_VFALL: if (otg_ctrl->id || (!otg_ctrl->b_conn && otg_ctrl->a_sess_vld) || otg_ctrl->a_bus_req) - mvotg->phy.otg->state = OTG_STATE_A_IDLE; + mvotg->usb_phy.otg->state = OTG_STATE_A_IDLE; break; case OTG_STATE_A_VBUS_ERR: if (otg_ctrl->id || otg_ctrl->a_clr_err || otg_ctrl->a_bus_drop) { otg_ctrl->a_clr_err = 0; - mvotg->phy.otg->state = OTG_STATE_A_WAIT_VFALL; + mvotg->usb_phy.otg->state = OTG_STATE_A_WAIT_VFALL; } break; default: @@ -409,8 +405,8 @@ static void mv_otg_work(struct work_struct *work) run: /* work queue is single thread, or we need spin_lock to protect */ - phy = &mvotg->phy; - otg = mvotg->phy.otg; + phy = &mvotg->usb_phy; + otg = mvotg->usb_phy.otg; old_state = otg->state; if (!mvotg->active) @@ -419,24 +415,24 @@ static void mv_otg_work(struct work_struct *work) mv_otg_update_inputs(mvotg); mv_otg_update_state(mvotg); - if (old_state != mvotg->phy.otg->state) { + if (old_state != mvotg->usb_phy.otg->state) { dev_info(&mvotg->pdev->dev, "change from state %s to %s\n", state_string[old_state], - state_string[mvotg->phy.otg->state]); + state_string[mvotg->usb_phy.otg->state]); - switch (mvotg->phy.otg->state) { + switch (mvotg->usb_phy.otg->state) { case OTG_STATE_B_IDLE: otg->default_a = 0; if (old_state == OTG_STATE_B_PERIPHERAL) mv_otg_start_periphrals(mvotg, 0); mv_otg_reset(mvotg); mv_otg_disable(mvotg); - usb_phy_set_event(&mvotg->phy, USB_EVENT_NONE); + usb_phy_set_event(&mvotg->usb_phy, USB_EVENT_NONE); break; case OTG_STATE_B_PERIPHERAL: mv_otg_enable(mvotg); mv_otg_start_periphrals(mvotg, 1); - usb_phy_set_event(&mvotg->phy, USB_EVENT_ENUMERATED); + usb_phy_set_event(&mvotg->usb_phy, USB_EVENT_ENUMERATED); break; case OTG_STATE_A_IDLE: otg->default_a = 1; @@ -536,8 +532,8 @@ a_bus_req_store(struct device *dev, struct device_attribute *attr, return -1; /* We will use this interface to change to A device */ - if (mvotg->phy.otg->state != OTG_STATE_B_IDLE - && mvotg->phy.otg->state != OTG_STATE_A_IDLE) + if (mvotg->usb_phy.otg->state != OTG_STATE_B_IDLE + && mvotg->usb_phy.otg->state != OTG_STATE_A_IDLE) return -1; /* The clock may disabled and we need to set irq for ID detected */ @@ -566,7 +562,7 @@ a_clr_err_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct mv_otg *mvotg = dev_get_drvdata(dev); - if (!mvotg->phy.otg->default_a) + if (!mvotg->usb_phy.otg->default_a) return -1; if (count > 2) @@ -602,7 +598,7 @@ a_bus_drop_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct mv_otg *mvotg = dev_get_drvdata(dev); - if (!mvotg->phy.otg->default_a) + if (!mvotg->usb_phy.otg->default_a) return -1; if (count > 2) @@ -656,7 +652,7 @@ static int mv_otg_remove(struct platform_device *pdev) mv_otg_disable(mvotg); - usb_remove_phy(&mvotg->phy); + usb_remove_phy(&mvotg->usb_phy); return 0; } @@ -687,6 +683,10 @@ static int mv_otg_probe(struct platform_device *pdev) mvotg->pdev = pdev; mvotg->pdata = pdata; + mvotg->phy = devm_phy_get(&pdev->dev, "usb"); + if (IS_ERR(mvotg->phy)) + return PTR_ERR(mvotg->phy); + mvotg->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(mvotg->clk)) return PTR_ERR(mvotg->clk); @@ -701,12 +701,12 @@ static int mv_otg_probe(struct platform_device *pdev) /* OTG common part */ mvotg->pdev = pdev; - mvotg->phy.dev = &pdev->dev; - mvotg->phy.otg = otg; - mvotg->phy.label = driver_name; + mvotg->usb_phy.dev = &pdev->dev; + mvotg->usb_phy.otg = otg; + mvotg->usb_phy.label = driver_name; otg->state = OTG_STATE_UNDEFINED; - otg->usb_phy = &mvotg->phy; + otg->usb_phy = &mvotg->usb_phy; otg->set_host = mv_otg_set_host; otg->set_peripheral = mv_otg_set_peripheral; otg->set_vbus = mv_otg_set_vbus; @@ -715,36 +715,23 @@ static int mv_otg_probe(struct platform_device *pdev) timer_setup(&mvotg->otg_ctrl.timer[i], mv_otg_timer_await_bcon, 0); - r = platform_get_resource_byname(mvotg->pdev, - IORESOURCE_MEM, "phyregs"); - if (r == NULL) { - dev_err(&pdev->dev, "no phy I/O memory resource defined\n"); - retval = -ENODEV; - goto err_destroy_workqueue; - } - - mvotg->phy_regs = devm_ioremap(&pdev->dev, r->start, resource_size(r)); - if (mvotg->phy_regs == NULL) { - dev_err(&pdev->dev, "failed to map phy I/O memory\n"); - retval = -EFAULT; - goto err_destroy_workqueue; - } - - r = platform_get_resource_byname(mvotg->pdev, - IORESOURCE_MEM, "capregs"); + r = platform_get_resource(mvotg->pdev, IORESOURCE_MEM, 0); if (r == NULL) { dev_err(&pdev->dev, "no I/O memory resource defined\n"); retval = -ENODEV; goto err_destroy_workqueue; } - mvotg->cap_regs = devm_ioremap(&pdev->dev, r->start, resource_size(r)); - if (mvotg->cap_regs == NULL) { + mvotg->base = devm_ioremap(&pdev->dev, r->start, resource_size(r)); + if (mvotg->base == NULL) { dev_err(&pdev->dev, "failed to map I/O memory\n"); retval = -EFAULT; goto err_destroy_workqueue; } + mvotg->cap_regs = + (void __iomem *) ((unsigned long)mvotg->base + U2x_CAPREGS_OFFSET); + /* we will acces controller register, so enable the udc controller */ retval = mv_otg_enable_internal(mvotg); if (retval) { @@ -804,7 +791,7 @@ static int mv_otg_probe(struct platform_device *pdev) goto err_disable_clk; } - retval = usb_add_phy(&mvotg->phy, USB_PHY_TYPE_USB2); + retval = usb_add_phy(&mvotg->usb_phy, USB_PHY_TYPE_USB2); if (retval < 0) { dev_err(&pdev->dev, "can't register transceiver, %d\n", retval); @@ -831,7 +818,7 @@ static int mv_otg_probe(struct platform_device *pdev) return 0; err_remove_phy: - usb_remove_phy(&mvotg->phy); + usb_remove_phy(&mvotg->usb_phy); err_disable_clk: mv_otg_disable_internal(mvotg); err_destroy_workqueue: @@ -846,10 +833,10 @@ static int mv_otg_suspend(struct platform_device *pdev, pm_message_t state) { struct mv_otg *mvotg = platform_get_drvdata(pdev); - if (mvotg->phy.otg->state != OTG_STATE_B_IDLE) { + if (mvotg->usb_phy.otg->state != OTG_STATE_B_IDLE) { dev_info(&pdev->dev, "OTG state is not B_IDLE, it is %d!\n", - mvotg->phy.otg->state); + mvotg->usb_phy.otg->state); return -EAGAIN; } diff --git a/drivers/usb/phy/phy-mv-usb.h b/drivers/usb/phy/phy-mv-usb.h index 96701a1229ad..9b7bc6d958a8 100644 --- a/drivers/usb/phy/phy-mv-usb.h +++ b/drivers/usb/phy/phy-mv-usb.h @@ -8,6 +8,9 @@ #include +/* registers */ +#define U2x_CAPREGS_OFFSET 0x100 + /* Command Register Bit Masks */ #define USBCMD_RUN_STOP (0x00000001) #define USBCMD_CTRL_RESET (0x00000002) @@ -132,11 +135,11 @@ struct mv_otg_regs { }; struct mv_otg { - struct usb_phy phy; + struct usb_phy usb_phy; struct mv_otg_ctrl otg_ctrl; /* base address */ - void __iomem *phy_regs; + void __iomem *base; void __iomem *cap_regs; struct mv_otg_regs __iomem *op_regs; @@ -155,6 +158,7 @@ struct mv_otg { unsigned int active; unsigned int clock_gating; struct clk *clk; + struct phy *phy; }; #endif From patchwork Wed Nov 28 17:53:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703133 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 64AAD109C for ; Wed, 28 Nov 2018 18:33:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5587128D3A for ; Wed, 28 Nov 2018 18:33:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49A4E28EA3; Wed, 28 Nov 2018 18:33:59 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 932E828D3A for ; Wed, 28 Nov 2018 18:33:58 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=cw0c52GGzrkr9qr8pT8BKri7N7GnTqWlhyloGcgJTwI=; b=M0HVO5FF8AijLH f8/D2d9zAT2PgjHFObUOVerGx+aGpg6YHsDYMp6ePsOqK2J08Zx6tr+sF4K7n9lpVjiExx7r1TC8U eck52ZmTxNMbfUaAaXejA3QHc2UWpxTOsDc3MDP9R4WFNj3SwGcHMl2ebJqWLbubqCJWmXDlSic+f dK6T7GK+tWjUa77RPuqIU4CRTyBfXD50a7HWcKmoMG7sApV7MV8SEZYQRtHB6DHG0z2PBSUzR471+ MVRpfMW4cLXtUfKf3pW4gFlCGwb/lgBBWQ+AkmR7H1NU8QJzoaItJ3QHgsNknc7v5OkIggoeEnzTd lwFUVs7F18YnNkGGVN8w==; 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 1gS4eq-0001ai-J3; Wed, 28 Nov 2018 18:33:56 +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 1gS4eY-0001GN-7e for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 18:33:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type: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=wJ81DmizkmFCgIF586PwwfqhXxXdqXVECrOBs1pa2bE=; b=PFVGSAt2gsD4qQRoS7lKrWemC3 xM/EdWzPlLK7sQHlSEUUG/XTArfTw5cFj6oxENSXysdR+J97zA2IWVPOs55789lZXa1nfRr5lRYR5 84R4xTsDaLANX266/FCy5QYVpbBUA7SVYkHG2yawhKVYarwq1JRRXYObI2ASgw8Q+BzlRf4fkjIo+ r6DBGkYfZjr+vEkKGq0SljgntgASZBc0VfDVXOmhtdDeGRHP2z0F6mzDSwW/FAEObljIqHVEPWZwu j+UF5PiPDEWIk0I52E/iJdO8btjgyzRMqy7Fl22NrTVRB+q6FC++6ALVJRxYCK5Q9kEEpR9Jxu18s olBCVEZA==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42k-0007yb-Ll for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:36 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id DEED199B07; Wed, 28 Nov 2018 18:54:22 +0100 (CET) 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 p1eUjYhcIjan; Wed, 28 Nov 2018 18:54:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 7883199B60; Wed, 28 Nov 2018 18:53:45 +0100 (CET) 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 q0tCLb9Z7Ki5; Wed, 28 Nov 2018 18:53:42 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id D2E8399B67; Wed, 28 Nov 2018 18:53:33 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 20/20] USB: gadget: mv-udc: use phy-pxa-usb Date: Wed, 28 Nov 2018 18:53:24 +0100 Message-Id: <20181128175324.163202-21-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_125435_229699_158EBE88 X-CRM114-Status: GOOD ( 14.62 ) 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: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 Use a proper PHY driver, instead of hooks to a board support package. Signed-off-by: Lubomir Rintel --- arch/arm/mach-mmp/devices.c | 11 +------- drivers/usb/gadget/udc/mv_udc.h | 7 ++++- drivers/usb/gadget/udc/mv_udc_core.c | 38 ++++++++-------------------- 3 files changed, 17 insertions(+), 39 deletions(-) diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c index eb9b3c34e90a..d925be9f14a9 100644 --- a/arch/arm/mach-mmp/devices.c +++ b/arch/arm/mach-mmp/devices.c @@ -263,21 +263,12 @@ struct platform_device pxa168_device_usb_phy = { #if IS_ENABLED(CONFIG_USB_MV_UDC) struct resource pxa168_u2o_resources[] = { - /* regbase */ [0] = { - .start = PXA168_U2O_REGBASE + U2x_CAPREGS_OFFSET, + .start = PXA168_U2O_REGBASE, .end = PXA168_U2O_REGBASE + USB_REG_RANGE, .flags = IORESOURCE_MEM, - .name = "capregs", }, - /* phybase */ [1] = { - .start = PXA168_U2O_PHYBASE, - .end = PXA168_U2O_PHYBASE + USB_PHY_RANGE, - .flags = IORESOURCE_MEM, - .name = "phyregs", - }, - [2] = { .start = IRQ_PXA168_USB1, .end = IRQ_PXA168_USB1, .flags = IORESOURCE_IRQ, diff --git a/drivers/usb/gadget/udc/mv_udc.h b/drivers/usb/gadget/udc/mv_udc.h index b3f759c0962c..6f04f432964d 100644 --- a/drivers/usb/gadget/udc/mv_udc.h +++ b/drivers/usb/gadget/udc/mv_udc.h @@ -6,6 +6,9 @@ #ifndef __MV_UDC_H #define __MV_UDC_H +/* registers */ +#define U2x_CAPREGS_OFFSET 0x100 + #define VUSBHS_MAX_PORTS 8 #define DQH_ALIGNMENT 2048 @@ -174,9 +177,9 @@ struct mv_udc { struct platform_device *dev; int irq; + void __iomem *base; struct mv_cap_regs __iomem *cap_regs; struct mv_op_regs __iomem *op_regs; - void __iomem *phy_regs; unsigned int max_eps; struct mv_dqh *ep_dqh; size_t ep_dqh_size; @@ -219,6 +222,8 @@ struct mv_udc { /* some SOC has mutiple clock sources for USB*/ struct clk *clk; + + struct phy *phy; }; /* endpoint data structure */ diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c index cafde053788b..35b0bde2d46f 100644 --- a/drivers/usb/gadget/udc/mv_udc_core.c +++ b/drivers/usb/gadget/udc/mv_udc_core.c @@ -1069,14 +1069,11 @@ static int mv_udc_enable_internal(struct mv_udc *udc) if (retval) return retval; - if (udc->pdata->phy_init) { - retval = udc->pdata->phy_init(udc->phy_regs); - if (retval) { - dev_err(&udc->dev->dev, - "init phy error %d\n", retval); - udc_clock_disable(udc); - return retval; - } + retval = phy_init(udc->phy); + if (retval) { + dev_err(&udc->dev->dev, "init phy error %d\n", retval); + udc_clock_disable(udc); + return retval; } udc->active = 1; @@ -1095,8 +1092,7 @@ static void mv_udc_disable_internal(struct mv_udc *udc) { if (udc->active) { dev_dbg(&udc->dev->dev, "disable udc\n"); - if (udc->pdata->phy_deinit) - udc->pdata->phy_deinit(udc->phy_regs); + phy_exit(udc->phy); udc_clock_disable(udc); udc->active = 0; } @@ -2147,30 +2143,16 @@ static int mv_udc_probe(struct platform_device *pdev) if (IS_ERR(udc->clk)) return PTR_ERR(udc->clk); - r = platform_get_resource_byname(udc->dev, IORESOURCE_MEM, "capregs"); + r = platform_get_resource(udc->dev, IORESOURCE_MEM, 0); if (r == NULL) { dev_err(&pdev->dev, "no I/O memory resource defined\n"); return -ENODEV; } - udc->cap_regs = (struct mv_cap_regs __iomem *) - devm_ioremap(&pdev->dev, r->start, resource_size(r)); - if (udc->cap_regs == NULL) { - dev_err(&pdev->dev, "failed to map I/O memory\n"); - return -EBUSY; - } - - r = platform_get_resource_byname(udc->dev, IORESOURCE_MEM, "phyregs"); - if (r == NULL) { - dev_err(&pdev->dev, "no phy I/O memory resource defined\n"); - return -ENODEV; - } + udc->base = devm_ioremap(&pdev->dev, r->start, resource_size(r)); - udc->phy_regs = devm_ioremap(&pdev->dev, r->start, resource_size(r)); - if (udc->phy_regs == NULL) { - dev_err(&pdev->dev, "failed to map phy I/O memory\n"); - return -EBUSY; - } + udc->cap_regs = + (void __iomem *) ((unsigned long)udc->base + U2x_CAPREGS_OFFSET); /* we will acces controller register, so enable the clk */ retval = mv_udc_enable_internal(udc);