From patchwork Mon Nov 12 03:20: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: 10678045 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 6DC9B14BA for ; Mon, 12 Nov 2018 03:21:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B1932A09E for ; Mon, 12 Nov 2018 03:21:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E4D02A0D4; Mon, 12 Nov 2018 03:21:38 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 B5DEB2A0CE for ; Mon, 12 Nov 2018 03:21:37 +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=O9W2CGAhqUXJ9c CUWYZcS4Op+YVqbNG/oD3z6a+6lrXS4RuiRoh71EE7qQu1McJpOA2KPbQdrht1CphN45I51uRXY1+ IDVOxq100UYItUu/w26lX6aokl77ZJPAZx3YQa8L1thI8eKI8IonFR9kQdyPF3jZwNtwwLz673YTV 5/q8yzUdhtyI/w1x7oai4X7S4Gq4g1OBDqHwAVz1q3Q1vIoNk5bX7uF0V5I+zkdCucCRPyKAGICFA WJYEhqYi4bcPPxnMDdnaoCIbxzpwi7Za+z8f3K6WjOG58PgyHeCj6yyItnfTGocU1tM4nToq71kiB JNtEg8ENOq9Kbb+qS9ug==; 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 1gM2n7-0006qB-7u; Mon, 12 Nov 2018 03:21:33 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mp-0006W2-2k for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:15 +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=4WDqwwqXRN4DMJYd8XIF7QTnNQ+TppMUbC1b6A29UjI=; b=BLlQkrtJojijsNCbVGvXLDXGvD izSt2GsIN2A6BAIK+WJZzNeFjyHynOhDBuHO4CNpStmDdssSqqsfuWyu51SR8+2GmHxN6beJjoiqz y5b2X1tp6/1hq1/KQS9VcKJNKYJ+8KtiunTaKLY1zPVRF09VTeIEQZk6PLaHYTAqEACJ5NfYKLiph v7aO2NgpVD2ggpBqM4DUmOu1Fd3jEw7k/luxffKDxQB97lgv/Qzay/MxWRe796gKJmM0Zswkih0Bm ue9k2ioxl7MLu7ZMgjHpl/iMpD8A7pOL4YnlNE0mhjt2RYceF3gUt26O7mT/ROv6N03t3uIYtQL+x SxTTCS0Q==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mk-0005uE-L7 for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:13 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 4AA95C6A2D; Mon, 12 Nov 2018 04:20:53 +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 RAKxe3cAYSOA; Mon, 12 Nov 2018 04:20:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 61C7EC6A2A; Mon, 12 Nov 2018 04:20: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 evc0Z8J5dUEe; Mon, 12 Nov 2018 04:20:36 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id A7754C6A21; Mon, 12 Nov 2018 04:20:35 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 01/18] dt-bindings: mrvl,mmp-timer: add clock Date: Mon, 12 Nov 2018 04:20:10 +0100 Message-Id: <20181112032027.653931-2-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032110_740656_CF393292 X-CRM114-Status: UNSURE ( 9.61 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20: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: 10678053 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 BC41614BA for ; Mon, 12 Nov 2018 03:22:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9EF42A0DC for ; Mon, 12 Nov 2018 03:22:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D9482A0E7; Mon, 12 Nov 2018 03:22:24 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 402142A0DC for ; Mon, 12 Nov 2018 03:22: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=6qXar9ZeAfDWQAsTxyyyWeLu+bsLPLhJQIBhBSYv/iM=; b=CV1ksFBWk7YpP1 +wxx5E26NIHXlcsQUH1Ri6+mE76zDRNhiI2v13fi/Qza9fv1t5qAWNBmGlIZmIS7qRsSNmn3TCxPy jSev3SG8dN+fJPB2CIG8koHl8NfMlYk+zNKdYCoWbh4xRToGBI3KA5abiQw0TCyuyG17up/XXN/zc lvb6XFejggW4wc+HdEzlVxA0u1UYWt3iwz6DimZFQjI5S4U+5206RZG/o975ZL6sB3q8emd0+5C7G p3z6/WiUsia6WJdLL05es+mQ/En42+l5nYPwvKjs9CmDrnp7tvWZc2yump7wPPN7SlR5MVJRXe1st tDxgCfTk5uOSCdd2VYiA==; 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 1gM2nn-0007ZP-Bd; Mon, 12 Nov 2018 03:22:15 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mp-0006W5-5e for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:15 +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=KoTV3JNebTTFgKjNT2gbXVzTkHtHZeUN+qVxWTV1qQg=; b=axUT4g/VKkB0Voch4GR0J0NDfo TW2q9XouRrcLmvk91o33JWpEcns18GEseapCrCb93XN4OnAbI878CjipckIsW+CncGBDKFxPW2XVN 5jq8dhnKVEVisUlJ0RZ/tWGQWOhzSkFOBkwDyazjDzchVrKfYo5jQtgSe9GqxSbO20ESLbEgTMqcO AsZPfpkC8s1y8Q7XrnkUq9VyNHWy/DWnUFbaADkB+oUEFSJJ1AtxqVlDmT6pOhnxcbT6+ZvD2NBB1 WS/pgCY7huB++oWo44MXv1G5vgDNXH4nM2NmnY1CBRDBaq6jwdb24u5MYV6WoVJ7hIUWSxxy8Em92 0k8h0c5A==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mk-0005uF-RW for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:13 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id E6C9BC6A2A; Mon, 12 Nov 2018 04:20:54 +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 EURzCtKKcbXH; Mon, 12 Nov 2018 04:20:41 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id BBD79C6A2E; Mon, 12 Nov 2018 04:20:38 +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 lzVDq2v5IkvT; Mon, 12 Nov 2018 04:20:36 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id EA47FC6A23; Mon, 12 Nov 2018 04:20:35 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 02/18] DT: marvell, mmp2: fix the gpio interrupt cell number Date: Mon, 12 Nov 2018 04:20:11 +0100 Message-Id: <20181112032027.653931-3-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032111_145573_78EE033C X-CRM114-Status: GOOD ( 10.51 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20: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: 10678043 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 C2A0D14BA for ; Mon, 12 Nov 2018 03:21:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1F2129198 for ; Mon, 12 Nov 2018 03:21:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A573A2A09A; Mon, 12 Nov 2018 03:21: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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 51F7A29198 for ; Mon, 12 Nov 2018 03:21:22 +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=uw+2G87ORMnHgr WdXPA0a32BG169aEvqNWRk0pdfrQqWTWHYAyffpt1Lg1xvp5blLQztNd5gYtcOzI/j5IQB/6guGtG 5RM4nPt/OQhs61oNch7Bo/gvrBPdpl+3RExA1AvwhtcT+DJN5Z8cyWEpfvEFO6o8Hf4I/FnXO3ti2 r1BLFvyEhXwU9+J8QH1t72KTYpEquVbUxzixnoQKkSS/5FvDJDYg2rt0w0+F+uI7pHp+Z0ZHs97cb bNR6G/K9RX1YVe3iTL4G55JG5rNpBK1TjTUaOdtse92qAQDAm9+f/zN6DuzktNIydZyalJ/uTwnsT 3t5QoSSiuh3d7qNMBzxg==; 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 1gM2mt-0006b4-EY; Mon, 12 Nov 2018 03:21:19 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mn-0006Vv-Ps for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:13 +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=ZQfenlY9sfc9FNHqf3kzFJJT1/ 2Aun6zlDP5kZ3CV1M4c7zcTOVwf3FzouVoxWCqqN0XqjeBmm9e6qg69MeXODgrQT84FD304cLiVG6 2LDaF01CIrQVcMvoUdHLUbL7jxchgvW/3fVQ4nooSlBk8U0/mlNIc1lB/u54A24Hj3kXGGndr3RUZ 3BkwxcW6OOTSOMaasv8OuV7u3/VJNvm0btL/5vSwXvkAWgYCErpJPcAAH1CDgX782sxi4wzNp8+mL 7uDjFPe6nkTXaLegUhQk4w4bh/Q35O2hNWKphTStQcXcLF/A98XAnq1Z+J/DWLMjzmk7KOhCZ9+/f 0dbMjqMw==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mk-0005uT-Ok for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:12 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 5C9C2C6A35; Mon, 12 Nov 2018 04:21: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 oVlZqWYL6TrW; Mon, 12 Nov 2018 04:20:47 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id A21E7C6A34; Mon, 12 Nov 2018 04:20: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 rICdwYt4te6l; Mon, 12 Nov 2018 04:20:36 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 39C03C6A24; Mon, 12 Nov 2018 04:20:36 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 03/18] DT: marvell,mmp2: give gpio node a name Date: Mon, 12 Nov 2018 04:20:12 +0100 Message-Id: <20181112032027.653931-4-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032110_855904_DD645A85 X-CRM114-Status: GOOD ( 10.04 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20: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: 10678051 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 877D714BA for ; Mon, 12 Nov 2018 03:21:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 762FA2A09E for ; Mon, 12 Nov 2018 03:21:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6ACB12A0E4; Mon, 12 Nov 2018 03:21:57 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 11CBA2A09E for ; Mon, 12 Nov 2018 03:21: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=6b6dwNS+Vb0ykNHXzSutvgGUBboAf/Co76T1uyIegjI=; b=hVucct9+peddwK 8vGkXzPfcjxshJ/JR5omWGGkEUmrc1vyPM13G0nbKY4JZhAC47RGN4N2K4iV/dTt9kwSXZXEH0435 M3/GSJWL3qOVzuwaafzXLgQ1PF9V4WrN76suSs9y2PtZfJtXYC72qIA0E0Vx/3LbqeOIVxP0JaaiM KV8vH9RY0VlEw+1Lwa9YbV6U6tf2ZnDqP/imLFdJZA+Ry3E8x79Xoi+qTXTYEqazMW9rWWaQjfzsN EL/tBA2WCpc7Wf/448HeYP2YAbB0sjf3mqss2XpBV1TywoGU0gfan1YZuUGmP04nPOqibpNtPO+YE 6tYFz6GOdEE+dr+Vpl7w==; 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 1gM2nS-0007HQ-6z; Mon, 12 Nov 2018 03:21:54 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mp-0006WE-As for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:15 +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=o2wdAPy6ssm4Wmis58MDb+N0gtrGj+Giiy7s2g9SPcY=; b=DqAzv6ovKPfmxl6AkPnTHO3Ij/ Ag0SkK3dOqf3B8cF9UBg5thSR88mdGstKODUscBED0M1/NwEouynnd1Qm82uNN9yHdCJG5bxTWkWL PjgBymU6L5bgETts3sk0LvNH+udLhB9Xh5vQwLk8MwSPzryrJ4kQip6VRJtbTyf9p7SNJi359pCdv QcGMdBl8UYTqDw6gC1nY0BFclgvI0apmf2rD9jT8DRGWOrgM2fMhG0LKdzk8YLXHEz3DtSWkSpgIV SaEfVMtmm5AYG9bYkJZa7H7Akszy6U0+jQQlFK4myO8n0dPoaC06JCBRIg5cZOkJa3ePD1QIa9jGa 5kemDQ2Q==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2ml-0005uV-V5 for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:14 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id D343EC6A3C; Mon, 12 Nov 2018 04:21:06 +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 0q2ckL-dCj41; Mon, 12 Nov 2018 04:20:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 5E937C6A37; Mon, 12 Nov 2018 04:20: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 LzCD15GllWzq; Mon, 12 Nov 2018 04:20:37 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 8626CC6A26; Mon, 12 Nov 2018 04:20:36 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 04/18] DT: marvell,mmp2: add clock to the timer Date: Mon, 12 Nov 2018 04:20:13 +0100 Message-Id: <20181112032027.653931-5-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032112_038111_FDB1FFE3 X-CRM114-Status: UNSURE ( 8.32 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20: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: 10678059 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 F129514BA for ; Mon, 12 Nov 2018 03:22:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E06592A0DB for ; Mon, 12 Nov 2018 03:22:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4A672A096; Mon, 12 Nov 2018 03:22:57 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 7ADB02A0DB for ; Mon, 12 Nov 2018 03:22: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=yf7/xUYQeLEZPGactHYoMeJH757G1VtdXUAQBBMz9zo=; b=aUSBxvHORoAtiJ hipoNJfqCgdKy2rMntfetIxbxtcYbuS1IuJwFLh0DNqVUgQCXG4Xe/X9ax15rDIBkrt8zh01liJqx MTM02OSOxEgXVJNdMdEmEkB6T/EuR+3rVEZdZdydXKscFglAi55QrPDnxRT1nq/ggH8cJakpTrfhX A9Jma/DmfHa5vk9AuRBf8cLXKE8GagmnanFtnzslGMo0v/AUSNPBlureHkTXdW4KCReIZ4NacgBF5 POF85ioGIFfb7tJmPUX8aLH64xd8JueY+9tHfOnJzSIbOJ9GsvQEvxUCdDCffo1OzMmte86xqttPr onFCz0hsSxSm8RgyLvAA==; 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 1gM2oO-00088F-Pv; Mon, 12 Nov 2018 03:22:52 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2my-0006i9-Ql for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:24 +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=ZbpcmPLomJib1fEBS46Cp4cahSWMWm/m/KcZXW8+04E=; b=n51oV4h+1HAoo4rbmvEKl5Go5E Tt+B/AuM2VPZanFkeavEYk0Ag1pi10jwI6UmCV6j57njzk+aaZWuZVqKksPuhM3hJUlKpmV2Yf9LS gM8W3yT0ZvwEdZ5sJWLOWXsADFrxVXZ58m9jV8KAM8gK4anr84jjo07qYcMv7UjmtXXSqulEShLWW odsNAgqm6IOi39PidO2j/8qx33R9mO1gbVJiabRovtUc3HOlB56uwvouSesYNqj1Ag2S4VyO0/BHn EHxaJXwIdpp5HV9TEJIEIHhAU7hpS/ZskRSpflUZ7xbx9T/KjKYigy4a8iAjImg22S8+I71CD2PnD s11wDmTw==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mv-0005vW-OC for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:23 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 73CDDC6A37; Mon, 12 Nov 2018 04:21:10 +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 M4Fxc6X250I8; Mon, 12 Nov 2018 04:20:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 9F31CC6A26; Mon, 12 Nov 2018 04:20: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 ojGcXMMpTKiF; Mon, 12 Nov 2018 04:20:38 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 06267C6A28; Mon, 12 Nov 2018 04:20:36 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 05/18] DT: marvell,mmp2: add MMC controllers Date: Mon, 12 Nov 2018 04:20:14 +0100 Message-Id: <20181112032027.653931-6-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032121_850476_541EB058 X-CRM114-Status: UNSURE ( 8.33 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 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..063382b3eaca 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@d4288000 { + 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 Mon Nov 12 03:20: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: 10678055 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 CE2F71709 for ; Mon, 12 Nov 2018 03:22:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC7BD2A096 for ; Mon, 12 Nov 2018 03:22:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0C532A0DB; Mon, 12 Nov 2018 03:22: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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 23E9A2A096 for ; Mon, 12 Nov 2018 03:22: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=GY/7iKaUKkESxQWN7wOeewkhYEsjjavwMo/QCRVXpso=; b=Uw2h/bLHggIF6T t5IzCK3Z9yRMwPcSrklbBydMEj7WOM4at7AVHABDUmBP4DDIBxl+HCwg98GAU9Wom0mZS+xgsZ8+c KsqaliHz3qvftF0S+S/ZUVobsfBZ77Pi3hfy/6AFpP9lLM64k812vMjQT3TZY4I2bezsSd4HKMGIa GSxcIsHPY8mLvmRC+LRp0G8LEZwoBF17f1mjqADdQWap21W0tcHuIsBmG8IublQ+o2ESD923yvbi2 KA+/9lLeEFD/orVKSPiJS6IelIV5Qr7yKnwO1szlXcaGEfc7lkJQOsVeYuxuZYEw5NSDq5+5Wf/wB /L52rL8CHMgK3JqspI/g==; 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 1gM2o7-0007rr-FD; Mon, 12 Nov 2018 03:22:35 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2my-0006iK-Ul for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:24 +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=Rj3l8oenTTp7T2m/849n4bXT/J1ZpwBwOjC4ab3vl0g=; b=Ivt2lfPLzB6QRx6twK6if1Qf9P J5WOLsvxSTkUC2PlWSCYndrg6KvlSbejsr7w7Tjp0DYqDivmxwr4TsEkt2R30sx15mRVIHkqBFRLY FH8B+t5qamtCFj70uktilHG1f0dAxMPYlylQzwsOkRKV0yKWwDfB+wnJd4R7/MmaYLlGJiRBh0qWm gu2DnMcoeK57rNUKgiNUZovuE1pKdy1+RQTBp05piUS37fRqfjqr7KkpR42wIx7w+zwf4VkZnObJH FFYQNM3answ0T1Kub3WoabcHMWBcliSnAxhHnsulP3kxnIji59OjqPaWPGBzPLYwRbY/aYGfY969d 3QZsT3sQ==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mv-0005vo-OD for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:23 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id BE078C6A26; Mon, 12 Nov 2018 04:21:12 +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 U1HmoKnjjoWh; Mon, 12 Nov 2018 04:20:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 0C557C6A3A; Mon, 12 Nov 2018 04:20: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 9a2CK5e2czg5; Mon, 12 Nov 2018 04:20:38 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 4912DC6A29; Mon, 12 Nov 2018 04:20:37 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 06/18] DT: marvell,mmp2: fix TWSI2 Date: Mon, 12 Nov 2018 04:20:15 +0100 Message-Id: <20181112032027.653931-7-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032121_857814_7DF74005 X-CRM114-Status: GOOD ( 11.98 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 063382b3eaca..63d49abf4e92 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 Mon Nov 12 03:20: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: 10678065 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 00E5A14BA for ; Mon, 12 Nov 2018 03:23:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E37012A10B for ; Mon, 12 Nov 2018 03:23:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEC042A133; Mon, 12 Nov 2018 03:23:37 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 603702A10B for ; Mon, 12 Nov 2018 03:23:37 +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=CgDAgmWu1jCFLONUgNbFIo1BbABi/HsH5qhRCk1cZ2U=; b=qhM8MxTtQ7dao0 g9hEq5y7tnmsnEURK56CYZDQDD54tQ6211BBJ28klED/hjw5vUqcpg24vb1ACo1ptaZAcIsh+fl8q Vhprwd6r8g3g21kdL6HTKelzsJBvQXd08vHQfg0SduA/9BPzXu3impq2N0OOQWVy17RGg8KsBaAAd dMOdw3Fw80kRvnbqdWskC9JxKaQ9z/y0p4PxO43vqCEtkCP0EMwgplV8crTQP0K2PDNis2dWD27ZX 20mVnGBJeNUObZqfOedGhXLYwVbUt3O/ZqyRcLr2T21qCtiLhI7toY4jx5syDfiE6Xk4b1l/Uak7T b/scrSGiKGnq7A4UQmTg==; 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 1gM2ou-0000AZ-Qo; Mon, 12 Nov 2018 03:23:24 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2n0-0006ks-Pe for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:26 +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=VPaU88KuGhxPZ34yqsUSGlKxYlG3rmHC2AScjAjB5l0=; b=GZxk8nQc3HHpovxYP/4L2T0G/8 7BozYb//HPzAic2I/zllnOiHl4ft5bnCBB/kLmb0WTt2KoO/aF+TeRXja8v+YSKtjvQ9xywDHFQK3 3IqEv7tViewJ5hCkPTjiUeNyX3vN9Q8nG/HhPRIT5+YTPw2ZlLk55gdJ4JW7Rj3zA8IuGHhqCmCIO vMy5zFW+hYG+hCwFxG25Zk43KMMXXGOHMXM3ylCc+u1A7IT1cBAevWuYA+PFTOoQBff3mCk0N6GCM wp0IaprTrsHFRwTN7kzx/4WKase3AwFq0lcfDCxPlKSHoQXn7vy3ntezfm5DxMSFeDmRPKo5CVcwP puWdfS+w==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mv-0005wX-OG for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:25 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 76362C6A2A; Mon, 12 Nov 2018 04:21:20 +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 M4vTv97Tntp7; Mon, 12 Nov 2018 04:20:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 49C6EC6A3B; Mon, 12 Nov 2018 04:20: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 wLyp121EKL0D; Mon, 12 Nov 2018 04:20:38 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 8C967C6A20; Mon, 12 Nov 2018 04:20:37 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 07/18] DT: marvell,mmp2: add more TWSI controllers Date: Mon, 12 Nov 2018 04:20:16 +0100 Message-Id: <20181112032027.653931-8-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032121_868969_CCF137E9 X-CRM114-Status: UNSURE ( 9.50 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 63d49abf4e92..7549680ab2e3 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 Mon Nov 12 03:20: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: 10678061 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 4AD5F14BA for ; Mon, 12 Nov 2018 03:23:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3968C2A0DC for ; Mon, 12 Nov 2018 03:23:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D7EC2A0E8; Mon, 12 Nov 2018 03:23:10 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 DBE2B2A0DC for ; Mon, 12 Nov 2018 03:23:09 +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=64ZCE+Aje8lLQYEHe0pK6gMR6mA6zn4o396Jjn46W4I=; b=KDAgJxsGbuigyD Bni+AqGsRkOYgNwlRnLerwx7TtYUWKm8OGAZn7Pxmppbs+TrlH4UjsvuPJLDNUewOExRFluT1OVGw 3unhmpz3+o5ayMCSXWMevW4/GLtoUWznHjwCkd+NkvnKVlwBXHvXgCFIIccE3deGO1/GxwTssllR7 jz8xAIWfLdkNJorNH3LwKGaCvY2Ox4R3BUPNq5seIwJ4CEFPH8Lg+aPKAqHMOI+YTIaQq6e+DfeoK Q6fd6J+eaLPauSh1bgDc4xQQZlIGfFdnMr7GOOSdeXG81LwkwMMcSJ3Rx4DK/V0vYag090I7Ogikz wwDrle+RNS2a1eqLZz0Q==; 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 1gM2oe-0008NW-Mr; Mon, 12 Nov 2018 03:23:08 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2n0-0006kp-Pg for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:26 +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=LCLTV2ubCdoLAuo7dms6cXM2C3e+qaryo5Oep1SCMdc=; b=RrflDode2S1t8Z/y18XEQYOzTa 8YQYnofe76YHGIwrib+KhAUb5srxoaqwdxRyu8PNEGofHgJrLkw3hfwQ8JVJM2Ab2225DH3WEnps3 L0ZShKZWxRy7hvDEpObqOeTmGzwSZcejX9838feVFhhjHwgMtPjITdIbpt/euZ5ak6NAL3X2q/AZT V0JxKQn36qkNKSibu+gnQI4nst+M/O9HyqZpkH0PA8Zvf/vZGHahzJqXjcTDkGhwAjnl6oxOsirzw QDabM/5sIl6Q5FmLgZ8JvUrhKvY01Ebe0gkOqU80R5L8bqykIIFu04NoOPZORRh+PjGtYllt55VyG SfUnkHqg==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mv-0005w6-OG for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:25 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 08C4FC6A2D; Mon, 12 Nov 2018 04:21:15 +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 jg1NYm2edZ5U; Mon, 12 Nov 2018 04:20:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 225C7C6A20; Mon, 12 Nov 2018 04:20: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 wcA7i16qKaKI; Mon, 12 Nov 2018 04:20:39 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id CF09FC6A22; Mon, 12 Nov 2018 04:20:37 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 08/18] DT: marvell,mmp2: add OTG PHY Date: Mon, 12 Nov 2018 04:20:17 +0100 Message-Id: <20181112032027.653931-9-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032121_866012_45639B56 X-CRM114-Status: UNSURE ( 8.29 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 7549680ab2e3..6ca1e17b6ac2 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 Mon Nov 12 03:20: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: 10678069 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 960301709 for ; Mon, 12 Nov 2018 03:24:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84D102A108 for ; Mon, 12 Nov 2018 03:24:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 794F82A154; Mon, 12 Nov 2018 03:24:07 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 307792A108 for ; Mon, 12 Nov 2018 03:24:07 +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=J0fdUtAxlLuM4ExBIumV0++5AlcSQe4EM7mpiBq4ybk=; b=uu+B888mbeuglj 3bTdz+fUxttmYxK7AM/pahdg5bejdc8otMqvW8Z4tJhY7MXel2J6hmrDgrsRGg3O0TLdX2bof7IQK GfzfLY5TVwRrVRoWlXotXFqrQ4NCTH8XW0nwg68VICV6SRnhGjFXH2eiaiVA5el5BYBodV/BPT1fH dRN8adA/ymRpM3fFRB+Kholo12huRu35kAFhFC4Pv90Itbbn6iNmkYJyJtZeWme/PDJWW0aCaq308 IQQH0CS0e6RSP5evVLMdhfcAfz5c2I78PeoVf6DjihGRyt1hnHhC1aDB4bo6KUkhGnVbdkjjWSznq wXFRJin1L/bCTbU9zKSg==; 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 1gM2pX-0000o8-7w; Mon, 12 Nov 2018 03:24:03 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2nB-0006ze-4R for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:37 +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=y9Kz5SLtU6KWsA4k6oSKiZ7I4iKdVBaO1CcVu5GJtWk=; b=cHJHc27X6H1FYLM8ZGLQC2ECwy 7IDLG0otZ27TOmsL7QrSbOye8pv07WEUmNkgtQMqQJJCr1oEaY1Y+JlJWym5LMjMkfl3eBhUC778H ACCCHp2El2xDaz66tabKDSBsKC7ue0pdk0VFQFq1mwCa38gf1wALGmpA9nwAia5TzMxKETqfDJYqk 0dS+piaA17S8zWm1NAV7tQwzgTiBeEXgneFRWGSbVeAklevrxkz9Qd4alSmB0QgCEQ7ZUl04BBRNp Torw6c/WHXG/hOeXNURJaSVEr1IZ6M1xLkPBCwItejrw2BAJjFX3X4Ae+wFmqbDbzXsuGiflbqTyb ig4yqcnw==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2n8-0005xn-8a for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:35 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 34CB5C6A3B; Mon, 12 Nov 2018 04:21:23 +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 8ju3UfLCW0qA; Mon, 12 Nov 2018 04:20:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 6C458C6A28; Mon, 12 Nov 2018 04:20: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 XUi1JapjYyCv; Mon, 12 Nov 2018 04:20:40 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 1CA67C6A2B; Mon, 12 Nov 2018 04:20:38 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 09/18] DT: marvell,mmp2: add USB OTG host controller Date: Mon, 12 Nov 2018 04:20:18 +0100 Message-Id: <20181112032027.653931-10-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032134_353179_CE7BCC7F X-CRM114-Status: UNSURE ( 8.39 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 6ca1e17b6ac2..fed28c754804 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 Mon Nov 12 03:20: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: 10678067 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 949A71709 for ; Mon, 12 Nov 2018 03:23:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 826A52A10F for ; Mon, 12 Nov 2018 03:23:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76BC32A125; Mon, 12 Nov 2018 03:23:45 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 E16942A10F for ; Mon, 12 Nov 2018 03:23:44 +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=hVlJHpFA0xBZz2 NAPtZlXWuORP47HCJeEq6SLFMGXMvz6cYC1jCCuUcSZHcGShbIWr/DQFufeTLe/QsRnmjO2xQuoeM 1FCyVieLxnoehVxHvvj6a0EW17LDhiyzF9KUMLlX1zgzEK/Fmre1Pw6/0zdaCxzQtg5uw5Uv8Gcf/ ++HFSI+iyALx7iwuoE8vTVelwQ33Ags59Gwox2OS3Vie3Z8+7TdlpvgLICBVHjVtOqwhvJMuGin1t fat46tWzV4bRLEE8mADiLOcr0Q53adWcUgluMLDWTvdcGIOczRdtylrN3BYe9HHZigIPeSmEvszUF NRwyeU5DwV7SX7povcyw==; 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 1gM2pC-0000Sv-6F; Mon, 12 Nov 2018 03:23:42 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2n0-0006ku-TW for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:26 +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=lt4vOoa5IQeY71aScK9LTTx0oQoJ6XnjVdiOq/9ThQU=; b=g/eb4NFlB+fwokt9Qff3F0UR5y 7qIKfWcN3cPkC3WYZeV1KXehReuMH+cmXAb+/+EQniIe1FgYUvI4eIlLTjjxMmXBUoE2SRPk8fOkh 30Dyzc8oy/OTo2NGx3ghchkfUl5XjgcW9JhjYqrrlk2iNdRMs4+yit++/3UqJCZ9r3Px8dkpUhUJ4 Oldjxty6ZOFwgLhJP+v3g+m4ijCdmDN6hjIgGD71SDxRTdBsfo6LKScs/WTWESpD/w0mzB2+tKf/N rJ6tg7t4tm4DBgGH2WpXCsvxwDryWyhsaB/S0sfdGtsKTgcHsmeSRe0nn7itANJjwkUgEWgwjLYM0 KR866pQg==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2mv-0005wA-OE for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:25 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id AF1B2C6A29; Mon, 12 Nov 2018 04:21:17 +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 ULqfkiF9Ad_v; Mon, 12 Nov 2018 04:20:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 009E1C6A24; Mon, 12 Nov 2018 04:20: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 0-3cuj2iekVB; Mon, 12 Nov 2018 04:20:40 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 5F56AC6A25; Mon, 12 Nov 2018 04:20:38 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 10/18] irqchip/mmp: only touch the PJ4 & FIQ bits on enable/disable Date: Mon, 12 Nov 2018 04:20:19 +0100 Message-Id: <20181112032027.653931-11-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032121_862635_B09A3A1A X-CRM114-Status: GOOD ( 12.90 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20: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: 10678083 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 EC59013BF for ; Mon, 12 Nov 2018 03:25:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAC562A150 for ; Mon, 12 Nov 2018 03:25:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF5CF2A154; Mon, 12 Nov 2018 03:25: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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 730352A155 for ; Mon, 12 Nov 2018 03:25: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=Wk0MfiYZ7JsR4HNEoy5bJecu4aFbm9cyxpXIVzhyAkI=; b=aDrBDn2CgKJjn/ PDJa60gQQGoOyGgCHq1dD7591a+YoZqQ2iBd/CMNmYOsraLz9MunxAVbUqR8cn3VUQABquOqXsa/5 LJUDLBZZUKsEy/Hk/JWLVFZ86qV3990ZKMYSUdeWJ4hL6y4r1wA06nQRJyJJyNwadkLEGAb+XyYPG /vYcU0S25ThwpZ2dtACiwAOFnXxI9slfR8uvnBGTDRoRvtnaTE/2ETfKfAG0vDz9i10/6TbpU7nOn zhygJw4vR4QX2sGoF7EwJSuAUFsm9qaccwPs1Dd5BFlbHbt5tuSOvmL7gMX38tRlag1VHk0bcAhab RnUrKkn2OdYgiJxEqndw==; 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 1gM2qz-0003K6-7q; Mon, 12 Nov 2018 03:25: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 1gM2nH-00075o-V8 for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:43 +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=actFPeww1UvVr11KBjkoPDLUS/KRArsIjrNKWozAHWA=; b=rI/9VWQuwJysJnWIGxiTuHsYX7 FqkyBsKaL4Yprk0sjZAAR84hV6CJCu60dEYdltmzLtXcOtFBB4TaohOpIM1Zle1UuBwvh3GsWJFkN aeGXR24A+IgXHT8fWqPa2MQOmjeUTw0DffSD9A7IPg5F4dxaVCtw6OMS0IPGMO58Gfxvlds73enMP cKBgfS9Q5Y8JQWoFg/7/gOQ0EOS8PdpmwLIIx9h8c4HuS4kZea/LXGM7UBFM6OV6BatvrAwahi7yI OMbCaAc/F/WVBnn6ImU25UtE8FdSlzfiNP75wEbOFYf7ssSaDMF3aSvgjF8dNup90SjcGoXfSCA/K le+lQXpg==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2nD-00057v-FM for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:41 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id C60A0C6A26; Mon, 12 Nov 2018 04:21:27 +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 NyUc583ayyXK; Mon, 12 Nov 2018 04:21:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 10C68C6A25; Mon, 12 Nov 2018 04:20:46 +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 R2cbrXh5lfsA; Mon, 12 Nov 2018 04:20:41 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id A29F7C6A2C; Mon, 12 Nov 2018 04:20:38 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 11/18] gpio: pxa: avoid attempting to set pin direction via pinctrl on MMP2 Date: Mon, 12 Nov 2018 04:20:20 +0100 Message-Id: <20181112032027.653931-12-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181111_222139_646861_074E29E4 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20: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: 10678081 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 51FA613BF for ; Mon, 12 Nov 2018 03:25:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40DAD2A108 for ; Mon, 12 Nov 2018 03:25:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 347D42A15A; Mon, 12 Nov 2018 03:25:19 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 6B2D72A108 for ; Mon, 12 Nov 2018 03:25:18 +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=OtE9jJuexj/6Zj GO5Nc3U9dKobfBKSFe/M1FJWNeaereNcVkIQ0NLAI/eaqIw56f+RdP6wwEtIsT0tycPy9oUTqotEx it0s2GiHMLHLHDn+wRHIzHg4Ztg4Z1An52YNps1XyKw8pJtycFA2AJzVLlFB3dTJgAetGe0xr/JdY 6PDUixlRJMQUM1JrIeyYSfVv4UVcUErU0m33BhNh1/4Mxr/zdr4Ga2SBXymLURpyobJJY+k/V8F8N +3gLSA0h3JFc4cDCTYNKIWh4shs13tzeySrALkRIpFD9iqn3bOtMJvnE5hsks+BFrBhPz4+FuLi4U IV7y9bp3xymO+rboYR6w==; 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 1gM2qh-0002VI-34; Mon, 12 Nov 2018 03:25:15 +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 1gM2nI-00076Z-AV for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:44 +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=PkkYeuYC49AsYmo6gnufd03KvW3/Aco2+RctAp43r74=; b=NeeBsuu0Nz6GhhEhAXJbI6mhh+ /0+yoHVub63ceOKyF9haPoAp1k/Oa/S87WUZgILTJBtup3sLRHFWZak4Yh0uyCp6nq/jC0umPUh5h fPv6hYiyQ+ddFMyvPbGsjHJLG4WqbtxgROfupradHqHbHLRIvRUDpHrKxxQa+xnGxCIkSqUB31wkG DX2QeZ7VF9YXdPXrCsMN3x3Jo7qlrVMy1TOODdKYmisoWgFsI27hk7yG0RvOChrdXNavqDne4Adxc vevb+OUOnoBHDJFcOL3eSvLVBcUnPAkPwtL7q5+rImU/l7oM3g/sSjQ8BFfNy+hVR438Twb30H3Eo caUp9ABg==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2nD-00058D-FM for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:42 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 865EFC6A25; Mon, 12 Nov 2018 04:21:32 +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 td-HEiEWCdsD; Mon, 12 Nov 2018 04:21:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 93245C6A30; Mon, 12 Nov 2018 04:20:47 +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 7HFOb2YEm9Md; Mon, 12 Nov 2018 04:20:42 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id EEDC4C6A2F; Mon, 12 Nov 2018 04:20:38 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 12/18] ARM: mmp/mmp2: use cpu_is_pj4() instead of cpu_is_mmp2() Date: Mon, 12 Nov 2018 04:20:21 +0100 Message-Id: <20181112032027.653931-13-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181111_222139_729475_67034890 X-CRM114-Status: GOOD ( 13.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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20: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: 10678077 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 587B31709 for ; Mon, 12 Nov 2018 03:24:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4711B2A14F for ; Mon, 12 Nov 2018 03:24:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B1F72A154; Mon, 12 Nov 2018 03: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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 E1A902A14F for ; Mon, 12 Nov 2018 03: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=ke67r/u0bSZZZc cj0Z1/R8eFkatDOXhYDulQePzPvTEn0E7g2eSQXkPDmCoKGjc1Gd6wlCa/VB+oA0BhqxwrmUtrRTp f0ShU0hsfoldmz764NBGJ8RjXlopZWhBTpkPZYAZVNK+ykdQw1vd5Y6kbISswR9EhvF4eHbkOS7Wa 0k/iXqgDzRCJbVxA/+y2pqMAipWvn32EuPJCp3Mw29p87QM+R9mY9cuu9Qr8IiHquiRGwUh7FQo0C iiqa2ojpKfzB6PwJ4U++XF8JZ/iMm2JGEbpIm95M9bF3lnsysaRwPwN2fq3MdODxa3iP+hlFes11D 2b0YED65oFGLNbVUJMyQ==; 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 1gM2qK-0001Yj-LB; Mon, 12 Nov 2018 03:24:52 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2nC-00071q-UJ for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:38 +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=A6QOv+3OVk/rSmdXpuMyI/craG 8P/3AcLFehuKJn/RGiEnYv2t+olFDtggbqOqjHALq/Mk62/HaGPzDh2NPLfCzxClDuseP/gDtgAQP dRh+n7VzsqltdoKlrPL9L5NLLeAEBpufF1+WZgWGH7z4iCXQzedfhMbRq4gb8pa8KpEdfKpotuBJw 4airHKki9BblY/wSBPv1ccqhXZMBXoUvHHTMkr+IIO/G5QYnRGkRCktryxSGA3Fr4r+lvMxv1yglb 3UJhEvyzGdaGVFFQOdmcBoxsDOjynzp4WlTdn2xWkcyesyexjvK0MpSsQGnAovbocx2LU6KXEKZ5X LxPkvZjg==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2n8-0005xv-8c for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:37 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id F24F1C6A35; Mon, 12 Nov 2018 04:21: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 oO8sutL-oE2o; Mon, 12 Nov 2018 04:21:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id C5564C6A31; Mon, 12 Nov 2018 04:20:46 +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 eBUYClaFBRsr; Mon, 12 Nov 2018 04:20:43 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 3EA76C6A30; Mon, 12 Nov 2018 04:20:39 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 13/18] ARM: mmp2: initialize clocks before the timer Date: Mon, 12 Nov 2018 04:20:22 +0100 Message-Id: <20181112032027.653931-14-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032134_360782_33FCE65D X-CRM114-Status: GOOD ( 10.45 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20: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: 10678085 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 C6A681709 for ; Mon, 12 Nov 2018 03:25:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3F4629261 for ; Mon, 12 Nov 2018 03:25:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A85102A154; Mon, 12 Nov 2018 03:25:55 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 148ED2A14F for ; Mon, 12 Nov 2018 03:25:55 +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=eWe9bsvgkFOZNU RgzoBuU7bp6fkrwgxlN7cFT6bkccqTm6CuAUsAHjdSuTQWjyW1aDUsQMYtNGwHWrqu6d+1wNJ/SAF SI//x5TyUHKFtFN9/15H3fh0kmI1yQLGyvBTTJ6ZhTe7nOFdnmrrb9RVj5qVi6MY4gBMmySZcl7Tq ZSJQJTjWMN9vSmRhD6B1Dzsvm2uMHfFJqO7UwR8xws5AWFFV1chFknE3yxt6F807l7WiQNZKO++Lq /ywIDvSDLmdQ+wr3XmJqfkb+vULsfaX2nyRZ/TpROVZfNJZgK5JVhz3pTwPUoGCuwBP1GtJuW/rHJ feOX9CYQJkEbCP/pVq2A==; 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 1gM2rH-0003bM-5p; Mon, 12 Nov 2018 03:25:51 +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 1gM2nI-00076a-AR for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:44 +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=RbxMYtaCOFIBOk0+RByndLAvIn UL98Tg8Z+Nq9gyEqLCrgkt/+GdgV4hsWs4XNCB29Ev5lg9J0Wdu9LnHfMMBgONFfQ/tB7Av9JuN67 oHDmJpsuit/pFWE14xrCcaxj3uMp6jLjwQ2Vxw2NxeXWIJxzCjYIIjpJJnYTJ0Jw3ZfuSbf6hv2fP 20Gl5UW1gYvh86WRS9ZQmGQonI/98VVROtkl/qYTW+sXeZFSEnI1ZlScXIUK025xQjd9JrL1XP2oQ dtWq4cPVEpsEShNL4W0biyeMp2yXUT+9fBRC6o+LCEbcPdW8rhEHGzwzNLZp6sdMyMgvX/NgopfA1 G1FwqZlg==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2nD-00058Q-FO for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:42 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 75E66C6A2C; Mon, 12 Nov 2018 04:21:36 +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 ZcsEWsQy-eFG; Mon, 12 Nov 2018 04:21:12 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 73984C6A2B; Mon, 12 Nov 2018 04:20:48 +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 JVOHOp1EGN_C; Mon, 12 Nov 2018 04:20:43 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 8D413C6A33; Mon, 12 Nov 2018 04:20:39 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 14/18] ARM: mmp/mmp2: dt: enable the clock Date: Mon, 12 Nov 2018 04:20:23 +0100 Message-Id: <20181112032027.653931-15-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181111_222139_836351_59F685FE X-CRM114-Status: GOOD ( 17.99 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20: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: 10678071 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 26A6414BA for ; Mon, 12 Nov 2018 03:24:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15C2B2A108 for ; Mon, 12 Nov 2018 03:24:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A0C82A155; Mon, 12 Nov 2018 03:24:24 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 778412A108 for ; Mon, 12 Nov 2018 03:24:23 +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=rTEBwRKq06wblU SHYGewXLFnpHmk1vMupma4XRQaBAwqyMqqBvYILhXj5qQnZjcqHQL/hsatEuX1xeUqsp1tNGmDzxE boKXDa+M40h9SNd/YuZ8mtc726jbW4qWb238DwLUB1VUAZ0QbF9a45dxtQuvyBiEQNlrAKM3N5n0u biBqPjzl8zs1x5QtbzfkAy5GvBJ7Uv4H5UcX//z4EOGOg5e4rfDXzgliAghHPQ8ejw1/MPF8ejaRS LP1lpQuuJG9gG4CgApuaako7XePplpa5EyiMfmA3f/mNAOghRy8YyZQy/fCDFVdV+cSfBxV/ld1Dl SSz2DMUCatZKTTgWg9lg==; 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 1gM2pp-00013U-BJ; Mon, 12 Nov 2018 03:24:21 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2nB-0006zt-Go for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:37 +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=eJesBJt1Yi3wb0N4DK63VmugL0BgSCk8U9n8jpg2fOY=; b=fvDRq/dIux7Y9UqK1j0Peq1ljh qGGIbDXpAtaaoHjuphTNdehJuO/spWgR8nl+mxtq6EWI4neDxhmJvbffCwgajBsW1dG7mQE+3rckg 9nSMPJE4oYlwPuX7en13KiNe2PXlfLoDI/y2Uq4R7gh0QGs5sIAuxhh6NPOF3whszazWlCFXSqtU2 24Q90My6AMt112dPagjEQDT7CG+DghqFUd0quHTS7E2jaQ4ErZPPE3zwZTCgmgSXVIlmOEcmKc1zc 54sIgWySuF5Fn5xLDV7bS3DPygmQg1lRYL4NsP6jE9eA28VkyfKPBGIQQ3gWC8qtFXTKe+Shs1Cvg 6dLL+d0A==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2n8-0005yM-8b for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:35 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 901FFC6A34; Mon, 12 Nov 2018 04:21: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 v5vkDEIy6beg; Mon, 12 Nov 2018 04:21:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3CE1FC6A2C; Mon, 12 Nov 2018 04:20:47 +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 mu-1YG6p01PQ; Mon, 12 Nov 2018 04:20:44 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id D1EE7C6A36; Mon, 12 Nov 2018 04:20:39 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 15/18] ARM: mmp: add a pxa-usb-phy device Date: Mon, 12 Nov 2018 04:20:24 +0100 Message-Id: <20181112032027.653931-16-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032134_355122_7E4B9349 X-CRM114-Status: GOOD ( 10.96 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10678075 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 304431709 for ; Mon, 12 Nov 2018 03:24:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EF1B2A108 for ; Mon, 12 Nov 2018 03:24:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12DDA2A156; Mon, 12 Nov 2018 03:24:49 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 BCE2A2A14F for ; Mon, 12 Nov 2018 03:24:48 +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=OqSAoG1izFHnAc ZmpGX+t+glEjtUHQUdULGy9AyI4X2S8YABx7o5EykN9IG53L+lFIXOKT5l+FMRqgDE/ubqCOcg3ph MB1QWQozyNPpYJ4ar9LDD6hDnt9b5st3Cw3ejfSem3qMxa5izy6K8wV7fH/RtY5tghzgKqEHMVuAk 2Vvm1DFb/Lw70ROSV6WtwY+e3QTBEhUrUIgKxvvWt8VHOtTc4LxnwWeNiHKdc2gWsEVG1L3AE0ruA VNopBcB0Kc1lPORqp4zJIyPfwqqyHeEbMobBOPUZJr6ZDenAEx7LeiPCB/eyouYJu8M6MWxiSv01U 5nIrYi3T/DJZmDS2Okbw==; 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 1gM2q6-0001K0-Eb; Mon, 12 Nov 2018 03:24: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 1gM2nI-00075m-3D for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:44 +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=vlZkAAQYeLHgsaEwAvqaaCy6OK HFtJrICMDHTqNcxU3R6NeWhrZfN/oqrfapGRd8JAcfje9VxMF1EvcfG0fYksBVPJkTwGlQZY2cR1Z mRP/f0omk6WbwEeKTrFSsmRIW6laeSgBtri+c1rPCadKFOXG8tSdUr5kI7I0iJwdXRntMRki/sOTY jDpH6+bY8LMAqIqayh+L+AOaT14tUDACXALBDc+RmKLdjTetR3y/pWEXduuvzfgs4iRVHsUf/d7hF inQ2eiR6EPoGZWQnT1zu/LX4tb8R7k8fm4X3XNZz6L7JTBuqkoU+FwJGQNIFQAHIILH7pOHz8ziCe /sdKIZ1g==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2nD-00058F-FO for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:41 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 11B22C6A2D; Mon, 12 Nov 2018 04:21:34 +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 OZ4MjX5mC-JM; Mon, 12 Nov 2018 04:21:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id AEAA5C6A21; Mon, 12 Nov 2018 04:20:48 +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 AZVK1SsSWV5w; Mon, 12 Nov 2018 04:20:45 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 23377C6A23; Mon, 12 Nov 2018 04:20:40 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 16/18] ARM: mmp: add an instance of pxa-usb-phy to ttc_dkb and aspenite Date: Mon, 12 Nov 2018 04:20:25 +0100 Message-Id: <20181112032027.653931-17-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181111_222139_715820_04C12B0A X-CRM114-Status: UNSURE ( 9.08 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10678091 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 895AC13BF for ; Mon, 12 Nov 2018 03:26:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 778A22A14F for ; Mon, 12 Nov 2018 03:26:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B50F2A154; Mon, 12 Nov 2018 03:26:35 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 6FB1F2A14F for ; Mon, 12 Nov 2018 03:26:34 +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=Lf9b+RO9QdA3wp DQzckGEbrVj6lLNL1Aoj0yyFuL9fpdCAL5wtwDrlEjp+K4LtSoTux+p65t+TItOdQZahoVak8r5bo zOp/ko4rS1tfRyT0mIdTLx/2XZjTuxDdnYi0x23GjHclmzoDBrixG1x0/qCLq3WcGbIsUjBhJy1Ei Bwhhs9OFNCPi/zilR0KtWBIz+tql255bdT5+0hna7HETFVGnDJzuslT9K7lq3pB0pRZzYpr5ZdPFW BpYnSH+octi7Ypd00NSVXSDPf39jrymWC6fhRDPaCpH96a78Z5YEV0K1nZhVb539Bxs7HyQXQ/7jh DfV2km6Cq2sUQkzdDbiw==; 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 1gM2ru-0004AK-W4; Mon, 12 Nov 2018 03:26:31 +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 1gM2nU-0007JI-0C for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:56 +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=uU5o4/sg4hKLicV+XU3ZcNF+hyYuSd8NhkQD1ubLioY=; b=fb+ij3QoZDGbPiwuDsSB5f5v6M jofj19oINKG5noNt+kbP0lJhV46E2jCXm77ELQOZzj63ZSrh6/XgtzWk7sOTTr9933S5sy+i23GYx uKhcDf/2JqxVexbS1KVGOEvJ3O6UziKcd0lUvLgQdDWkv8qLyTP7Dzqz1i8+7v57hxR0UNM2P46w3 K6A3b6u+XntcDnUVwmJN20bEXf8XlWc73n5Zjb0deP4u74oe4kieOYCVoHX0641ircVMaE5vax548 YQBB2Q0YwOA2NaGc33kIC2s0HPpVD3dUrhQMJtyuZTzblALGafIShEZivhElORwMu0qoZNb6EhCdF +2bdg1rg==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2nQ-00059e-S9 for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:53 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 8A240C6A26; Mon, 12 Nov 2018 04:21:41 +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 Mh_t0RkeHD2U; Mon, 12 Nov 2018 04:21:16 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 4E634C6A23; Mon, 12 Nov 2018 04:20:50 +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 ZxZiu81VbiYS; Mon, 12 Nov 2018 04:20:47 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 67167C6A38; Mon, 12 Nov 2018 04:20:40 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 17/18] USB: phy-mv-usb: use phy-pxa-usb Date: Mon, 12 Nov 2018 04:20:26 +0100 Message-Id: <20181112032027.653931-18-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181111_222153_187594_8C11B126 X-CRM114-Status: GOOD ( 19.80 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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 Mon Nov 12 03:20:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10678087 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 0988E13BF for ; Mon, 12 Nov 2018 03:26:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB97A2A14F for ; Mon, 12 Nov 2018 03:26:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF07D2A154; Mon, 12 Nov 2018 03:26: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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 EDD822A14F for ; Mon, 12 Nov 2018 03:26: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=cw0c52GGzrkr9qr8pT8BKri7N7GnTqWlhyloGcgJTwI=; b=Zdl2LP0xUyqEzD hKg0mt2PA5R8yNdlzA6ay8GzfaW2prlGv+8nfDsOp60X422fiusxy3GEEpoB0EZLaOppzEO/rSBS+ CbzIbs8lffmFCZkCQggZqcpQ3gFiH3Va75GOL+3oLtjvPiG2n3mM73vOhBkSYVXCyTtVX15aN64CR CrId71wNbfX8Q0y1jYFkIWRapPWG1rUeR6F5gznIPUwn9IMI0JX9ZKWtZkg4OJQGQTKy6m7AAZ8z4 9Jp4qCvjo/z8HLmR4rtjTcL1se50TwrWhzb0grrYH6A/CSAcdRaBD+Aw+2VIyRWo9008UzKIS6+p9 a7wXSxDmjnhj2cFUSdHw==; 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 1gM2rZ-0003pi-JK; Mon, 12 Nov 2018 03:26:09 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2nQ-0007G5-Aj for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:52 +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=wJ81DmizkmFCgIF586PwwfqhXxXdqXVECrOBs1pa2bE=; b=N8ogNcY9JYb2L2Ei+0TAfIYjrd ZJbM/P58W9o1eu9GDrpgBOTTOiUmfCXWPwQjNHhFuidMUgp62TAIwDwdODRg2PjTsqnx6TKbiNDT0 3wGMF/z9ZU1Yiq4Yxv+yYCuI0YcUKwkq6X08BUt9WquwsD22HjFY59EF4NtVbTeORZONhh2CN/tAR sWZOL8Gfa6blAFMYXlVxuV5l+lhzpThldoDIX/PVkyH+MuVuk3xTtVyAolAdrSXt1gdgN7gbta0e1 hPgRw6J/O/N8HJ/+O4DOe5Cb2oGbRQ0E03R1ogWRtYBxirWEEW0TIQZox6mrlABtbFw5XXy4wG+bH jQ9bA0Wg==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2nN-0005ze-1I for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:50 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3E7E0C6A2B; Mon, 12 Nov 2018 04:21:38 +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 PVXWGAwv_t7r; Mon, 12 Nov 2018 04:21:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 6B1E5C6A2F; Mon, 12 Nov 2018 04:20:50 +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 yB4Oi2-F2oTk; Mon, 12 Nov 2018 04:20:48 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id AD298C6A39; Mon, 12 Nov 2018 04:20:40 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 18/18] USB: gadget: mv-udc: use phy-pxa-usb Date: Mon, 12 Nov 2018 04:20:27 +0100 Message-Id: <20181112032027.653931-19-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032149_229390_02FFFB4B X-CRM114-Status: GOOD ( 15.17 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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);