From patchwork Tue Nov 10 06:22:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893351 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C80AC5517A for ; Tue, 10 Nov 2020 06:23:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D185920657 for ; Tue, 10 Nov 2020 06:23:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="do1xLlrP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D185920657 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=ZoDOemmvUs1dCy9QoLIfJI0BO8ydtYlHauqSUK/Pi8o=; b=do1xLlrPi0EIK5WFzps01prgo YGJcp0piejaB/e58UCqiJYg+bt1r20HzXxDLBwhwNM5XskTnpFzrnCfH0JNvizkQm7osJVuhHJF6o rM4nbxac58xLGORJWjZ2/mCG9YNadVbgXmcHQuS1V9pcyEJM8gpJnSGqJaYVj/0tFEnalWIwcBPAs NsA+5FTASnKFFZ6iYAzyPCMebmF3sVoSk+XYol2Ln6cus38Z9ihTREq8/NH5Mbycc7Qr8ON3Zq9SA WxynZ6pqgKMM+Tr8j4DWDay84BixMPJhKzzHS9+zYEpfXyynk7b93PFRmddGY+6l8QFq5vD3lcnP5 EjeV5UF9w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcN3b-0006r2-Ea; Tue, 10 Nov 2020 06:23:07 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcN3Z-0006qW-F9 for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:23:06 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.7373277|0.8969188; CH=green; DM=|SPAM|false|; DS=CONTINUE|ham_system_inform|0.0234519-0.000501654-0.976046; FP=9760415410618500791|1|1|17|0|-1|-1|-1; HT=ay29a033018047208; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=8; RT=8; SR=0; TI=SMTPD_---.Iuo2IDa_1604989377; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.Iuo2IDa_1604989377) by smtp.aliyun-inc.com(10.147.42.198); Tue, 10 Nov 2020 14:23:01 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 01/19] pinctrl: sunxi: fix irq bank map for the Allwinner A100 pin controller Date: Tue, 10 Nov 2020 14:22:55 +0800 Message-Id: <9db51667bf9065be55beafd56e5c319e3bbe8310.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_012305_739764_5A0FF282 X-CRM114-Status: GOOD ( 12.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , linux-kernel@vger.kernel.org, Maxime Ripard , linux-gpio@vger.kernel.org, Chen-Yu Tsai , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li A100's pin starts with PB, so it should start with 1. Fixes: 473436e7647d6 ("pinctrl: sunxi: add support for the Allwinner A100 pin controller") Signed-off-by: Yangtao Li --- drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c index 19cfd1e76ee2..e69f6da40dc0 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c @@ -677,7 +677,7 @@ static const struct sunxi_desc_pin a100_pins[] = { SUNXI_FUNCTION_IRQ_BANK(0x6, 6, 19)), }; -static const unsigned int a100_irq_bank_map[] = { 0, 1, 2, 3, 4, 5, 6}; +static const unsigned int a100_irq_bank_map[] = { 1, 2, 3, 4, 5, 6, 7}; static const struct sunxi_pinctrl_desc a100_pinctrl_data = { .pins = a100_pins, From patchwork Tue Nov 10 06:23:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893349 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D236BC388F7 for ; Tue, 10 Nov 2020 06:24:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C56420657 for ; Tue, 10 Nov 2020 06:24:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="m7CP+ZF2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C56420657 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=C8o6IG7ZxdboRl83/coVUMs5qiCMQfMqllyxoTrgeqo=; b=m7CP+ZF2HureGqwtqkQBiCu7o TRivUFfgQZA75ZdHPiXaUCJHUiBbm2LXu9DnsCMDWFJgjn2IDtUFWB3zbG/BRTw4d/Gc7RFAyRbs1 Tj+X4tCQUZArWqmTLdDLAo2J3ZBvOG9Gi658v7SOdsGAz0X4ZwKtWdiZ9Bw237FajY3oGRVGiRvVL w+u/m3681Tr4ye4nE+FXzbiasjIgWE+R90c2T3UrPg7ybeInXeCEIXK+uWj6Jg5Ag6pCULL6aHEvw PhmCRiq3K0u8zitCCWo5qM2H8gBf+xEbM5sX1RjeiDOVVrD8nFj/AtrG/LD1WtnubVQt+5jjlPCMM UrG7/PPyQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcN4W-0006zF-IE; Tue, 10 Nov 2020 06:24:04 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcN4U-0006yS-4T for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:24:02 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1783931|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.00551052-0.00222848-0.992261; FP=12104955532006367399|1|1|17|0|-1|-1|-1; HT=ay29a033018047205; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=8; RT=8; SR=0; TI=SMTPD_---.IunzMV9_1604989434; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IunzMV9_1604989434) by smtp.aliyun-inc.com(10.147.41.143); Tue, 10 Nov 2020 14:23:58 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 02/19] pinctrl: sunxi: Mark the irq bank not found in sunxi_pinctrl_irq_handler() with WARN_ON Date: Tue, 10 Nov 2020 14:23:44 +0800 Message-Id: <470ebae22fc5434ad5409c4f6e29255467b3cef6.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_012402_412650_27261769 X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , linux-kernel@vger.kernel.org, Maxime Ripard , linux-gpio@vger.kernel.org, Chen-Yu Tsai , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li The interrupt descriptor cannot be found in the interrupt processing function, and this situation cannot happen when the system is running normally. It doesn't seem right to return directly to the status of not handling gic. In this case, it must be a bug, let's mark it with WARN_ON. Signed-off-by: Yangtao Li --- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 8e792f8e2dc9..9d8b59dafa4b 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -1139,8 +1139,7 @@ static void sunxi_pinctrl_irq_handler(struct irq_desc *desc) if (irq == pctl->irq[bank]) break; - if (bank == pctl->desc->irq_banks) - return; + WARN_ON(bank == pctl->desc->irq_banks); reg = sunxi_irq_status_reg_from_bank(pctl->desc, bank); val = readl(pctl->membase + reg); From patchwork Tue Nov 10 06:24:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893353 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8914C388F7 for ; Tue, 10 Nov 2020 06:25:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 25A0D20657 for ; Tue, 10 Nov 2020 06:25:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xr/qL8NE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25A0D20657 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=UjSHypPa9Qk9uHE+vhNBM+MkN0u0MoXxFo3HsmxVmDw=; b=Xr/qL8NEq8Nye1DZl6uAeLtnY 16NYsRxfMmnUsz/qNbz9c9NGa3P5hXnBA8LRUPAkS3dVglTAnPjckAM1UM3Qj5Hk0eSnFEd4cuq6Z spqu7ID0ADckvEnYDapCAQjrVYYGBOO/S6HnvEA85zU+yLX73fyQgcNy27la0HZrw8kVtGvi/imBR yue8WylB0GIMihRfqdpkseivkQdx8pw4ZB3KB1zOaDxMlyM1f6D3Gs4z7MXeyN9zIqncZZZ0+ijTD K/Tx+kI701gRps8ZyIXmzmCgKjD7lZJggVjWmENxEHt8DlRYzsO5qCyGXL1kEv3y2ge01RYXIpeNe QRlXcjKgg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcN5H-00077L-OS; Tue, 10 Nov 2020 06:24:51 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcN5F-00076Q-Qm for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:24:50 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.272725|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_regular_dialog|0.00377925-0.00159347-0.994627; FP=11852684747916124327|1|1|17|0|-1|-1|-1; HT=ay29a033018047208; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=9; RT=9; SR=0; TI=SMTPD_---.Iunhutb_1604989482; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.Iunhutb_1604989482) by smtp.aliyun-inc.com(10.147.44.118); Tue, 10 Nov 2020 14:24:46 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 03/19] pinctrl: sunxi: Always call chained_irq_{enter, exit} in sunxi_pinctrl_irq_handler Date: Tue, 10 Nov 2020 14:24:40 +0800 Message-Id: <85263ce8b058e80cea25c6ad6383eb256ce96cc8.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_012450_123393_68AA52A6 X-CRM114-Status: GOOD ( 10.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-gpio@vger.kernel.org, Chen-Yu Tsai , Maxime Ripard , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li It is found on many allwinner soc that there is a low probability that the interrupt status cannot be read in sunxi_pinctrl_irq_handler. This will cause the interrupt status of a gpio bank to always be active on gic, preventing gic from responding to other spi interrupts correctly. So we should call the chained_irq_* each time enter sunxi_pinctrl_irq_handler(). Cc: stable@vger.kernel.org Signed-off-by: Yangtao Li --- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 9d8b59dafa4b..dc8d39ae045b 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -1141,20 +1141,22 @@ static void sunxi_pinctrl_irq_handler(struct irq_desc *desc) WARN_ON(bank == pctl->desc->irq_banks); + chained_irq_enter(chip, desc); + reg = sunxi_irq_status_reg_from_bank(pctl->desc, bank); val = readl(pctl->membase + reg); if (val) { int irqoffset; - chained_irq_enter(chip, desc); for_each_set_bit(irqoffset, &val, IRQ_PER_BANK) { int pin_irq = irq_find_mapping(pctl->domain, bank * IRQ_PER_BANK + irqoffset); generic_handle_irq(pin_irq); } - chained_irq_exit(chip, desc); } + + chained_irq_exit(chip, desc); } static int sunxi_pinctrl_add_function(struct sunxi_pinctrl *pctl, From patchwork Tue Nov 10 06:26:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893355 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4E16C55ABD for ; Tue, 10 Nov 2020 06:27:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 35A172065D for ; Tue, 10 Nov 2020 06:27:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DVAdLZRb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35A172065D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=qBJQncPAUsnCPXmNJ4+m+mbN1U08Y8HZs/lOz5H8Gqs=; b=DVAdLZRbEE/LF5wkf52Zdt92A 32XsVixtpH7O7RyQ0NDKyiSmmIJEgUFGCvvdhsPt8FjxUyx190BuGOEq5STh3FnLxg02v9rwyDIvV IJunZ7+seg6YNhUTtk+8uaDuhF7ehld9hSE6qnD3qAUxGt3anhrcph6QmFbMagrsR0NdkDxeukMJh Iz5u1lKRD6ueXSTTo3zAt+Alu06fQdyyoajbV5rCKeghedIVLNR55b30rpR8ZwaVqyvz32dh4lZ26 gDQrm3j5PXDsxSjZVRoX28L4l62YpGYKlpD75AAQnK/bKWHFBmlmsEwxVLShYutHORTFmzY45/kzl iihyBH/pw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcN7f-0007Y4-29; Tue, 10 Nov 2020 06:27:19 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcN7c-0007Wt-Ie for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:27:17 +0000 X-Alimail-AntiSpam: AC=SUSPECT; BC=0.61374|-1; BR=01201311R441b1; CH=blue; DM=|SUSPECT|false|; DS=CONTINUE|ham_system_inform|0.0102791-0.00112627-0.988595; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047204; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=10; RT=10; SR=0; TI=SMTPD_---.Iuo2KNX_1604989628; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.Iuo2KNX_1604989628) by smtp.aliyun-inc.com(10.147.42.198); Tue, 10 Nov 2020 14:27:12 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 04/19] dt-bindings: dma: allwinner, sun50i-a64-dma: Add A100 compatible Date: Tue, 10 Nov 2020 14:26:38 +0800 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_012716_977503_C883752C X-CRM114-Status: UNSURE ( 8.45 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Vinod Koul , Rob Herring , Yangtao Li , dmaengine@vger.kernel.org, Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li Add a binding for A100's dma controller. Signed-off-by: Yangtao Li Acked-by: Rob Herring --- .../devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml index 372679dbd216..b6e1ebfaf366 100644 --- a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml +++ b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml @@ -21,6 +21,7 @@ properties: compatible: oneOf: - const: allwinner,sun50i-a64-dma + - const: allwinner,sun50i-a100-dma - const: allwinner,sun50i-h6-dma - items: - const: allwinner,sun8i-r40-dma @@ -56,7 +57,9 @@ required: if: properties: compatible: - const: allwinner,sun50i-h6-dma + enum: + - allwinner,sun50i-a100-dma + - allwinner,sun50i-h6-dma then: properties: From patchwork Tue Nov 10 06:28:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B817BC388F7 for ; Tue, 10 Nov 2020 06:28:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AA032065D for ; Tue, 10 Nov 2020 06:28:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="X2woKOEB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AA032065D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=FjHf0vLD4ixK3cd6ZOpFta9CYRtIjbzuXR9MyZX3vfw=; b=X2woKOEBe/5dIx6S+aFliJEwQ /0p0jI8u6S50iuTjlJARMv9KYytaVuRxBKpQAF4dBTzPHnwlSvmei8jjiXHomlNaUpLjA2XI7mtFv endGyVSXwiQYNE0bYPh1xE7ZVRZmZIteE5oDDasyV53i8Gh6MvOW+ykjYW/mxxxo/U5T8Btvh2wkC 9Mzoqw4lankrkQQiYnhpOgGgGIHCC/hpfYxRgwDgUk/6eAjf6rufJLYSB1hDKe3jXpK15ilpZec8g yGc48N45JScmkNgfGZF0MbWvRSSwKc1T1Wi3BaCBTcqocMdWzR5Hnv/NNK7aou+0aPkOQ+k45fKnQ hNBA9HQmw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcN8b-0007mh-3q; Tue, 10 Nov 2020 06:28:17 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcN8X-0007kz-Lh for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:28:14 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.3419429|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.0519488-8.64106e-05-0.947965; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047212; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=9; RT=9; SR=0; TI=SMTPD_---.IunvbX0_1604989684; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IunvbX0_1604989684) by smtp.aliyun-inc.com(10.147.40.2); Tue, 10 Nov 2020 14:28:08 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 05/19] dmaengine: sun6i: Add support for A100 DMA Date: Tue, 10 Nov 2020 14:28:02 +0800 Message-Id: <719852c6a9a597bd2e82d01a268ca02b9dee826c.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_012814_375510_567D53DD X-CRM114-Status: GOOD ( 12.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Maxime Ripard , Vinod Koul , Yangtao Li , dmaengine@vger.kernel.org, Dan Williams , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li The dma of a100 is similar to h6, with some minor changes to support greater addressing capabilities. Add support for it. Signed-off-by: Yangtao Li --- drivers/dma/sun6i-dma.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index f5f9c86c50bc..5cadd4d2b824 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -1173,6 +1173,30 @@ static struct sun6i_dma_config sun50i_a64_dma_cfg = { BIT(DMA_SLAVE_BUSWIDTH_8_BYTES), }; +/* + * TODO: Add support for more than 4g physical addressing. + * + * The A100 binding uses the number of dma channels from the + * device tree node. + */ +static struct sun6i_dma_config sun50i_a100_dma_cfg = { + .clock_autogate_enable = sun6i_enable_clock_autogate_h3, + .set_burst_length = sun6i_set_burst_length_h3, + .set_drq = sun6i_set_drq_h6, + .set_mode = sun6i_set_mode_h6, + .src_burst_lengths = BIT(1) | BIT(4) | BIT(8) | BIT(16), + .dst_burst_lengths = BIT(1) | BIT(4) | BIT(8) | BIT(16), + .src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | + BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | + BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | + BIT(DMA_SLAVE_BUSWIDTH_8_BYTES), + .dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | + BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | + BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | + BIT(DMA_SLAVE_BUSWIDTH_8_BYTES), + .has_mbus_clk = true, +}; + /* * The H6 binding uses the number of dma channels from the * device tree node. @@ -1225,6 +1249,7 @@ static const struct of_device_id sun6i_dma_match[] = { { .compatible = "allwinner,sun8i-h3-dma", .data = &sun8i_h3_dma_cfg }, { .compatible = "allwinner,sun8i-v3s-dma", .data = &sun8i_v3s_dma_cfg }, { .compatible = "allwinner,sun50i-a64-dma", .data = &sun50i_a64_dma_cfg }, + { .compatible = "allwinner,sun50i-a100-dma", .data = &sun50i_a100_dma_cfg }, { .compatible = "allwinner,sun50i-h6-dma", .data = &sun50i_h6_dma_cfg }, { /* sentinel */ } }; From patchwork Tue Nov 10 06:29:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893363 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11713C388F7 for ; Tue, 10 Nov 2020 06:30:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94E902065D for ; Tue, 10 Nov 2020 06:30:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ru3ca//R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94E902065D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=OnOkwTlJdw/KU4+bU3Mqy8128FG27QWcqRCerW4oKmw=; b=Ru3ca//RsCNQhc/NFCXTkjZSW MIz+bXCoaQ2i9ATMjYArDhzA042v7wUMoisKRXwVjVu7SqouNz5PPIGyorGVLlq71m4z+L8KCGOJY Qdx7sKRaWY7OP50sZvDsEQHtyyv2kkSh5f00W8aRxg2zfLc3s926z892zb6EaptvgV+2cnfxyeWy1 oADdLvLHUlYZGjogjD4l41ii9qPkHqiHPGzrCM6+BoVuOiMnYrvKK3QJ8k28PbaR7mrP3ZcGViNCn moZcPz94G85T6OQDiW73FjmDxYHxf+6oP3zRM5qvAEk6N6EtxWk2RdwFg7RkGwqAguuFBslifmbcN MXzHMCYmQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNA7-00085E-Ou; Tue, 10 Nov 2020 06:29:51 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNA4-00083h-9R for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:29:49 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.137492|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.0231434-0.00763199-0.969225; FP=4947591482161697186|1|1|17|0|-1|-1|-1; HT=ay29a033018047211; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=8; RT=8; SR=0; TI=SMTPD_---.Iuo67q-_1604989774; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.Iuo67q-_1604989774) by smtp.aliyun-inc.com(10.147.41.137); Tue, 10 Nov 2020 14:29:41 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 06/19] arm64: allwinner: a100: Add device node for DMA controller Date: Tue, 10 Nov 2020 14:29:32 +0800 Message-Id: <1b15266045edbcfff2fc3791c88a5390d7bb3185.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_012949_064739_C1FDD257 X-CRM114-Status: UNSURE ( 9.70 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li The A100 SoC has a DMA controller that supports 8 DMA channels to and from various peripherals. Add a device node for it. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi index cc321c04f121..c34ed8045363 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi @@ -101,6 +101,18 @@ ccu: clock@3001000 { #reset-cells = <1>; }; + dma: dma-controller@3002000 { + compatible = "allwinner,sun50i-a100-dma"; + reg = <0x03002000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_DMA>, <&ccu CLK_MBUS_DMA>; + clock-names = "bus", "mbus"; + dma-channels = <8>; + dma-requests = <51>; + resets = <&ccu RST_BUS_DMA>; + #dma-cells = <1>; + }; + gic: interrupt-controller@3021000 { compatible = "arm,gic-400"; reg = <0x03021000 0x1000>, <0x03022000 0x2000>, From patchwork Tue Nov 10 06:31:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87CDFC388F7 for ; Tue, 10 Nov 2020 06:32:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FB5B2064C for ; Tue, 10 Nov 2020 06:32:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="zNwtAEhI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FB5B2064C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=g40H5PjSRv6Aupg8NEIBJKsskgsu1sXU4s5R5E9hQBc=; b=zNwtAEhI/nhy4RPHBY8RKeg5h /+smeyIJPoRPWSrC52h8/eBGK7vEgu+xKNFvPtWDLaVbyfmK4SR9SWyS4+Tn0XzdxxfPprXH0MYUL WF46MCjgzFcJDZjVOlyiVAiJ2+X1UEbK0wHut830bFYxDSNVAA6DFPMuC1Iv413wdCuWeli+L7YND D6I+OpsEglm6HSorOEV+5fvvn+3MY/x5mTvpYSkJMKOPFOcCiBlGXDwMFglo/kPBsYA+7Szj5Dd/S dQg7aKQYT3EqRK+5egHaxiM9nmQaTZ8OOaYYEmsAyn4DQKITD121MeFMloQhpM/z0owu/8YDZQ86j Mhm1eS+Ug==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNBc-0008OB-Qe; Tue, 10 Nov 2020 06:31:24 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNBY-0008MA-VL for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:31:23 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1356364|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.446168-0.0014012-0.552431; FP=16495670707795891115|1|1|17|0|-1|-1|-1; HT=ay29a033018047211; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=8; RT=8; SR=0; TI=SMTPD_---.IuocOSC_1604989871; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IuocOSC_1604989871) by smtp.aliyun-inc.com(10.147.41.178); Tue, 10 Nov 2020 14:31:15 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 07/19] arm64: dts: allwinner: A100: Add PMU mode Date: Tue, 10 Nov 2020 14:31:05 +0800 Message-Id: <5aede9ac5069e61913905617b20cdcf1ec84fe26.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_013122_136573_3AA23A4D X-CRM114-Status: UNSURE ( 9.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li Add the Performance Monitoring Unit (PMU) device tree node to the A100 .dtsi, which tells DT users which interrupts are triggered by PMU overflow events on each core. Signed-off-by: Yangtao Li Reviewed-by: Andre Przywara --- arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi index c34ed8045363..01ff53b5a7a8 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi @@ -25,21 +25,21 @@ cpu0: cpu@0 { enable-method = "psci"; }; - cpu@1 { + cpu1: cpu@1 { compatible = "arm,cortex-a53"; device_type = "cpu"; reg = <0x1>; enable-method = "psci"; }; - cpu@2 { + cpu2: cpu@2 { compatible = "arm,cortex-a53"; device_type = "cpu"; reg = <0x2>; enable-method = "psci"; }; - cpu@3 { + cpu3: cpu@3 { compatible = "arm,cortex-a53"; device_type = "cpu"; reg = <0x3>; @@ -47,6 +47,15 @@ cpu@3 { }; }; + pmu { + compatible = "arm,cortex-a53-pmu"; + interrupts = , + , + , + ; + interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; + }; + psci { compatible = "arm,psci-1.0"; method = "smc"; From patchwork Tue Nov 10 06:32:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AEC3C388F7 for ; Tue, 10 Nov 2020 06:33:45 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E8DFA2064C for ; Tue, 10 Nov 2020 06:33:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NhIJkqnp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8DFA2064C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=QzKy54pfTBBSwg2UfaFNJ4CjW3hN3UANmyD9BOcvDDk=; b=NhIJkqnppgOUCqU27ZYM/2B1Z bNxqmznLsG5WP3YF1UBoKmRcaMDzEzH7FHMqpFkibgSaki2RRFRSl8YeLwnv2TdH42LgQmmopVbAu UeA7pnwIa94C1Dd+MRbKzbUlStSk7YKt5eayen3tZJ8Hbf8kFEzlDWgLkqGVsl5I5u6SxbH9u7tnz BYHCAlYaKUpBzTE3nr1cu+RSX9U1CqbX6094NvMWpdhoB+zKdLDmmiwGNrWCpkixl1+K0GgkHLL0j q2/3aNyWhHttaFaDvugs5Gb/3KSSDegmiPa7/kf9Va92QcwJ8XE3h2pvswaOY10GFGObwBZeQ82W2 OeuYReuCw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNCu-0000CZ-LT; Tue, 10 Nov 2020 06:32:44 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNCr-0000AX-CJ for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:32:42 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.4007003|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.0424186-0.00157801-0.956003; FP=10697710607874107063|1|1|17|0|-1|-1|-1; HT=ay29a033018047204; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=10; RT=10; SR=0; TI=SMTPD_---.Iuod9cs_1604989949; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.Iuod9cs_1604989949) by smtp.aliyun-inc.com(10.147.41.187); Tue, 10 Nov 2020 14:32:33 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 08/19] phy: sun4i-usb: remove enable_pmu_unk1 from sun50i_h6_cfg Date: Tue, 10 Nov 2020 14:32:21 +0800 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_013241_664064_9B3B20FC X-CRM114-Status: UNSURE ( 9.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Maxime Ripard , Kishon Vijay Abraham I , Vinod Koul , Krzysztof Kozlowski , Yangtao Li , Colin Ian King , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li For the current code, enable_pmu_unk1 only works in non-a83t and non-h6 types. So let's delete it from the sun50i_h6_cfg. Signed-off-by: Yangtao Li --- drivers/phy/allwinner/phy-sun4i-usb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 651d5e2a25ce..0f1888b55dbd 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -969,7 +969,6 @@ static const struct sun4i_usb_phy_cfg sun50i_h6_cfg = { .disc_thresh = 3, .phyctl_offset = REG_PHYCTL_A33, .dedicated_clocks = true, - .enable_pmu_unk1 = true, .phy0_dual_route = true, .missing_phys = BIT(1) | BIT(2), }; From patchwork Tue Nov 10 06:35:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893375 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E2C0C388F7 for ; Tue, 10 Nov 2020 06:36:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B5C4120731 for ; Tue, 10 Nov 2020 06:36:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rCQ1p+JZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B5C4120731 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=tPbFTnY+5BKxvla7zTdh7RS7nIv0GDnz4o7kmpLimQE=; b=rCQ1p+JZi4e10eI10KuqzvK8I 89+WkrkR+72I5wykpkick8/JNY4HiBihePQ8eK+uID7oErl+mQnWLDDLJik0CqfP+GLlggjO20Un6 qu6HY03CD1eC3a1iBX4RiaIpWixo4wLpSsV8FUaCE0cHE1giivkzUQ0VAyvKkZFu6GagSsS33TwPN 7OJ1OQnc3WEZmMuWVEuEagU59aAmuFsDwM9gdK919geROmcj7WZjWBdM1lg2RT2aepuiMQzBQPwxE Rw3nk7XToDULndJ5xqhoUvGP0cIvp3UmAdtyDcGM9zrwC2/R6OUHwdDmteHNpIOEsTkSLBiJoc7Ob tN/Yf0ukw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNFR-0000iO-VN; Tue, 10 Nov 2020 06:35:21 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNFP-0000hH-9q for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:35:20 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.07436288|-1; CH=blue; DM=|OVERLOAD|false|; DS=CONTINUE|ham_system_inform|0.019185-0.0136594-0.967156; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047201; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=13; RT=13; SR=0; TI=SMTPD_---.IunzSG8_1604990111; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IunzSG8_1604990111) by smtp.aliyun-inc.com(10.147.41.143); Tue, 10 Nov 2020 14:35:15 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 09/19] phy: allwinner: Convert to devm_platform_ioremap_* API Date: Tue, 10 Nov 2020 14:35:01 +0800 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_013519_614852_B838A942 X-CRM114-Status: GOOD ( 12.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , Randy Dunlap , linux-kernel@vger.kernel.org, Maxime Ripard , Kishon Vijay Abraham I , Rikard Falkeborn , Vinod Koul , Krzysztof Kozlowski , Yangtao Li , Colin Ian King , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li Use the devm_platform_ioremap_resource_byname() and devm_platform_ioremap_resource helper to simplify the code. Signed-off-by: Yangtao Li --- drivers/phy/allwinner/phy-sun4i-usb.c | 9 +++------ drivers/phy/allwinner/phy-sun50i-usb3.c | 4 +--- drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 4 +--- drivers/phy/allwinner/phy-sun9i-usb.c | 4 +--- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 0f1888b55dbd..a6900495baa5 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -686,7 +686,6 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct phy_provider *phy_provider; - struct resource *res; int i, ret; data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); @@ -700,8 +699,7 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) if (!data->cfg) return -EINVAL; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy_ctrl"); - data->base = devm_ioremap_resource(dev, res); + data->base = devm_platform_ioremap_resource_byname(pdev, "phy_ctrl"); if (IS_ERR(data->base)) return PTR_ERR(data->base); @@ -796,9 +794,8 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) if (i || data->cfg->phy0_dual_route) { /* No pmu for musb */ snprintf(name, sizeof(name), "pmu%d", i); - res = platform_get_resource_byname(pdev, - IORESOURCE_MEM, name); - phy->pmu = devm_ioremap_resource(dev, res); + phy->pmu = devm_platform_ioremap_resource_byname(pdev, + name); if (IS_ERR(phy->pmu)) return PTR_ERR(phy->pmu); } diff --git a/drivers/phy/allwinner/phy-sun50i-usb3.c b/drivers/phy/allwinner/phy-sun50i-usb3.c index b1c04f71a31d..84055b720016 100644 --- a/drivers/phy/allwinner/phy-sun50i-usb3.c +++ b/drivers/phy/allwinner/phy-sun50i-usb3.c @@ -134,7 +134,6 @@ static int sun50i_usb3_phy_probe(struct platform_device *pdev) struct sun50i_usb3_phy *phy; struct device *dev = &pdev->dev; struct phy_provider *phy_provider; - struct resource *res; phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); if (!phy) @@ -153,8 +152,7 @@ static int sun50i_usb3_phy_probe(struct platform_device *pdev) return PTR_ERR(phy->reset); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - phy->regs = devm_ioremap_resource(dev, res); + phy->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(phy->regs)) return PTR_ERR(phy->regs); diff --git a/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c b/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c index 1fa761ba6cbb..f0bc87d654d4 100644 --- a/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c +++ b/drivers/phy/allwinner/phy-sun6i-mipi-dphy.c @@ -253,15 +253,13 @@ static int sun6i_dphy_probe(struct platform_device *pdev) { struct phy_provider *phy_provider; struct sun6i_dphy *dphy; - struct resource *res; void __iomem *regs; dphy = devm_kzalloc(&pdev->dev, sizeof(*dphy), GFP_KERNEL); if (!dphy) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(regs)) { dev_err(&pdev->dev, "Couldn't map the DPHY encoder registers\n"); return PTR_ERR(regs); diff --git a/drivers/phy/allwinner/phy-sun9i-usb.c b/drivers/phy/allwinner/phy-sun9i-usb.c index fc6784dd7fa0..2f9e60c188b8 100644 --- a/drivers/phy/allwinner/phy-sun9i-usb.c +++ b/drivers/phy/allwinner/phy-sun9i-usb.c @@ -117,7 +117,6 @@ static int sun9i_usb_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct phy_provider *phy_provider; - struct resource *res; phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); if (!phy) @@ -156,8 +155,7 @@ static int sun9i_usb_phy_probe(struct platform_device *pdev) } } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - phy->pmu = devm_ioremap_resource(dev, res); + phy->pmu = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(phy->pmu)) return PTR_ERR(phy->pmu); From patchwork Tue Nov 10 06:36:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893377 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81075C388F7 for ; Tue, 10 Nov 2020 06:38:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0074C20578 for ; Tue, 10 Nov 2020 06:38:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HmW6tFek" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0074C20578 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=Z+ZtNkYTizC5O77kR52X8UyFf+Ox14DlFjcq5lX6gP4=; b=HmW6tFeklpjeDK/vZolqOJko2 PS48SjkHB/xOtzNi53C/GkKwU1D5bNoBwVehJPMSM6dsoYSRFQ1g/yaUxf+G7NzkprIt3Fdw4m/eO owrvWSpgzvZgbx9K9YsMo8EyTV2JMHPVneO8GOABxhVPcBJ6Hsk/OFTimBmx5OsXCr99yEMgjN3qu yNG7MGC3KMRzR+CYo90mv1TsjpUI/bUsY2Q02WrWY6solS2EmRJaDHVitW3bSjBlHCMaUpKu0Acoy laYiTaUcbhICIJ1R+mYLn96syTq/oDKRevyi1xFbIPnTkyX3KoGQRIk7z1n39OkSU+1sMJpvbbUYq gfadOmU+g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNH7-00018j-Ld; Tue, 10 Nov 2020 06:37:05 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNH4-00016S-R5 for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:37:04 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.4385088|-1; CH=blue; DM=|OVERLOAD|false|; DS=CONTINUE|ham_system_inform|0.00646372-0.000493263-0.993043; FP=11946349065999613887|1|1|17|0|-1|-1|-1; HT=ay29a033018047209; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=11; RT=11; SR=0; TI=SMTPD_---.Iup7tB7_1604990210; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.Iup7tB7_1604990210) by smtp.aliyun-inc.com(10.147.40.2); Tue, 10 Nov 2020 14:36:54 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 10/19] dt-bindings: watchdog: sun4i: Add A100 compatible Date: Tue, 10 Nov 2020 14:36:48 +0800 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_013703_198382_084ADF18 X-CRM114-Status: UNSURE ( 9.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Guenter Roeck , Yangtao Li , Wim Van Sebroeck , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li Add a binding for A100's watchdog controller. Signed-off-by: Yangtao Li Acked-by: Rob Herring --- .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml index e8f226376108..5ac607de8be4 100644 --- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml @@ -21,6 +21,9 @@ properties: - items: - const: allwinner,sun50i-a64-wdt - const: allwinner,sun6i-a31-wdt + - items: + - const: allwinner,sun50i-a100-wdt + - const: allwinner,sun6i-a31-wdt - items: - const: allwinner,sun50i-h6-wdt - const: allwinner,sun6i-a31-wdt From patchwork Tue Nov 10 06:38:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893381 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66B23C388F7 for ; Tue, 10 Nov 2020 06:39:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E413C20578 for ; Tue, 10 Nov 2020 06:39:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="a3J+Ihrd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E413C20578 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=d8VdV9fgmr4ku3ZyJGdnvYF8THh/qdUEYgiR6nTaqFM=; b=a3J+IhrdIA11vTm5krlhrjD/i 60/IIqwIGbWeKF+8D1DBkPbyO+vCvgqCTHhrrQZLCcmVc11vDBbB4rnFY3dPe7KcWltWJIqQQaoZb Nw+8w1B9KY0veRypQ8wX3YfrfrxZzXor7lUgkAE7WVTqQWSL4b3oDo2kZs/cwFHHxCG90YMthwYM+ 2+al9/BVeDl0VEhnOneJABXKClrWYmxrmix9cdDGa7ddqF/pimsEeJBB8RwKMKvNYT0eqlSPji4AI 629rLX0RjuDw7BZKS1TtEWHAUGK5fYeO6OmuPYEWCN89TD8b7rVFMlR4X6Q66Wkd9uFXywbiRuj1O wzK+mZozA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNIZ-0001OS-2f; Tue, 10 Nov 2020 06:38:35 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNIW-0001NY-Fb for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:38:33 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.2879881|-1; CH=blue; DM=|OVERLOAD|false|; DS=CONTINUE|ham_system_inform|0.0479935-0.0017224-0.950284; FP=16566900786437395367|1|1|17|0|-1|-1|-1; HT=ay29a033018047205; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=8; RT=8; SR=0; TI=SMTPD_---.IuovS3c_1604990302; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IuovS3c_1604990302) by smtp.aliyun-inc.com(10.147.44.118); Tue, 10 Nov 2020 14:38:27 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 11/19] arm64: dts: allwinner: a100: add watchdog node Date: Tue, 10 Nov 2020 14:38:20 +0800 Message-Id: <7a7fc132cf3fa07f069d473d4600ec1449fb45ff.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_013832_760491_D85F646B X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li Declare A100's watchdog in the device-tree. Signed-off-by: Yangtao Li Reviewed-by: Andre Przywara --- arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi index 01ff53b5a7a8..6aa3337ce0e9 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi @@ -144,6 +144,14 @@ ths_calibration: calib@14 { }; }; + watchdog@30090a0 { + compatible = "allwinner,sun50i-a100-wdt", + "allwinner,sun6i-a31-wdt"; + reg = <0x030090a0 0x20>; + interrupts = ; + clocks = <&dcxo24M>; + }; + pio: pinctrl@300b000 { compatible = "allwinner,sun50i-a100-pinctrl"; reg = <0x0300b000 0x400>; From patchwork Tue Nov 10 06:39:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893383 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44931C388F7 for ; Tue, 10 Nov 2020 06:41:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE55420578 for ; Tue, 10 Nov 2020 06:40:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lZcO1pRM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE55420578 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=f+4KeV3Y5dtoKZsWmwCKGb/v7lyFdoRlPpfXALW9VhM=; b=lZcO1pRMFONKxICZXoG55N4M2 hFd2IeiAIWnjHh5uV/2+fZffuT1PYrh3KZ1uzyvYUv7j3ylhnV0lqRmxAgoxwrImsX+lk2jZ0FNrj vpxoUrk8lU7NucyS9RJO3cWwtAH95uqFJMW/ntz/KZMPxgcet7RrAzukyAP3ZMrTa/acRPKy6pUoN /Fmolr33V0Im0fdRPsUndd1cYTK24vQM/yrcZaHRDOqKlhYlvW1Dj2fzOwNOLqyzK7SYXTOArl5DA 59Fk6c76qx04PFU7EQzPbVNLWUMsDnIXvJ3FCq2ZNopom0NkFq7RUXKyI8NI27uOTdvl7Wary6nzt Eh0Z5Gprg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNJs-0001bb-PK; Tue, 10 Nov 2020 06:39:56 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNJq-0001ar-Ls for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:39:55 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.07902727|-1; CH=blue; DM=|OVERLOAD|false|; DS=CONTINUE|ham_system_inform|0.627402-0.00133112-0.371267; FP=17316820775139370430|1|1|17|0|-1|-1|-1; HT=ay29a033018047192; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=10; RT=10; SR=0; TI=SMTPD_---.IuovrI7_1604990386; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IuovrI7_1604990386) by smtp.aliyun-inc.com(10.147.41.158); Tue, 10 Nov 2020 14:39:50 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 12/19] dt-bindings: Add bindings for USB phy on Allwinner A100 Date: Tue, 10 Nov 2020 14:39:42 +0800 Message-Id: <1ce71bac2732620f8fe77b23ca84e062385e7e8a.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_013954_961279_1FACD7A8 X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Yangtao Li , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li Add a device tree binding for the A100's USB PHY. Signed-off-by: Yangtao Li --- .../phy/allwinner,sun50i-a100-usb-phy.yaml | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml new file mode 100644 index 000000000000..cc9bbebe2bd7 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml @@ -0,0 +1,105 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/allwinner,sun50i-a100-usb-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner A100 USB PHY Device Tree Bindings + +maintainers: + - Yangtao Li + +properties: + "#phy-cells": + const: 1 + + compatible: + const: allwinner,sun50i-a100-usb-phy + + reg: + items: + - description: PHY Control registers + - description: PHY PMU0 registers + - description: PHY PMU1 registers + + reg-names: + items: + - const: phy_ctrl + - const: pmu0 + - const: pmu1 + + clocks: + items: + - description: USB OTG PHY bus clock + - description: USB Host 0 PHY bus clock + + clock-names: + items: + - const: usb0_phy + - const: usb1_phy + + resets: + items: + - description: USB OTG reset + - description: USB Host 1 Controller reset + + reset-names: + items: + - const: usb0_reset + - const: usb1_reset + + usb0_id_det-gpios: + description: GPIO to the USB OTG ID pin + + usb0_vbus_det-gpios: + description: GPIO to the USB OTG VBUS detect pin + + usb0_vbus_power-supply: + description: Power supply to detect the USB OTG VBUS + + usb0_vbus-supply: + description: Regulator controlling USB OTG VBUS + + usb1_vbus-supply: + description: Regulator controlling USB1 Host controller + +required: + - "#phy-cells" + - compatible + - clocks + - clock-names + - reg + - reg-names + - resets + - reset-names + +additionalProperties: false + +examples: + - | + #include + #include + #include + + phy@5100400 { + #phy-cells = <1>; + compatible = "allwinner,sun50i-a100-usb-phy"; + reg = <0x05100400 0x14>, + <0x05101800 0x4>, + <0x05200800 0x4>; + reg-names = "phy_ctrl", + "pmu0", + "pmu1"; + clocks = <&ccu CLK_USB_PHY0>, + <&ccu CLK_USB_PHY1>; + clock-names = "usb0_phy", + "usb1_phy"; + resets = <&ccu RST_USB_PHY0>, + <&ccu RST_USB_PHY1>; + reset-names = "usb0_reset", + "usb1_reset"; + usb0_id_det-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ + usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_drivevbus>; + usb1_vbus-supply = <®_usb1_vbus>; + }; From patchwork Tue Nov 10 06:40:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893385 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54C18C388F7 for ; Tue, 10 Nov 2020 06:41:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DAB8B20639 for ; Tue, 10 Nov 2020 06:41:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kiftmseL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAB8B20639 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=wtQKlBy6DA7JOE5fFPmxNaSEwuMxjPY46d1LspF8ENk=; b=kiftmseLgLEGTA0WcROVSVoSO zNIkPYQttBxJ4U/F+j8Je/dvLUveZMuwnBjtKaH6RcQVnZFv1z8fAVhnFN7buczg7eRJBZzSb53sN +n3M9ynXcONV1pxNStT10AavTu+aOjx5crgVF8XpaDuRetRnka8gCos+A3RcyB/ZqK7TokHWQZ9sL w4j1WWWS+IsI81p2D1t7LLMLtzZUycTOwtdee/wELPk04Y2/10ZAG1MZkZKERnT+ip3iP2yZZchId Zb68g497orahyHTSdLd0LXu6u/kcvsKuXshHnxhFjPQ9Gap3A1NvtpSVuHUc1odZjXptSQArlANre DqL8OlW1w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNKg-0001lH-VB; Tue, 10 Nov 2020 06:40:47 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNKe-0001k4-5i for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:40:45 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.316818|-1; CH=blue; DM=|OVERLOAD|false|; DS=CONTINUE|ham_system_inform|0.414304-0.00181664-0.58388; FP=11418629599924430517|1|1|17|0|-1|-1|-1; HT=ay29a033018047194; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=11; RT=11; SR=0; TI=SMTPD_---.IuonUmF_1604990436; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IuonUmF_1604990436) by smtp.aliyun-inc.com(10.147.40.233); Tue, 10 Nov 2020 14:40:40 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 13/19] phy: sun4i-usb: add support for A100 USB PHY Date: Tue, 10 Nov 2020 14:40:32 +0800 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_014044_451673_D26E3E9A X-CRM114-Status: GOOD ( 11.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Randy Dunlap , linux-kernel@vger.kernel.org, Maxime Ripard , Kishon Vijay Abraham I , Vinod Koul , Krzysztof Kozlowski , Yangtao Li , Colin Ian King , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li Add support for a100's usb phy, which with 2 PHYs. Signed-off-by: Yangtao Li --- drivers/phy/allwinner/phy-sun4i-usb.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index a6900495baa5..1a0e403131e7 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -107,6 +107,7 @@ enum sun4i_usb_phy_type { sun8i_r40_phy, sun8i_v3s_phy, sun50i_a64_phy, + sun50i_a100_phy, sun50i_h6_phy, }; @@ -289,7 +290,13 @@ static int sun4i_usb_phy_init(struct phy *_phy) } if (data->cfg->type == sun8i_a83t_phy || + data->cfg->type == sun50i_a100_phy || data->cfg->type == sun50i_h6_phy) { + if (phy->pmu && data->cfg->enable_pmu_unk1) { + val = readl(phy->pmu + REG_PMU_UNK1); + writel(val & ~BIT(3), phy->pmu + REG_PMU_UNK1); + } + if (phy->index == 0) { val = readl(data->base + data->cfg->phyctl_offset); val |= PHY_CTL_VBUSVLDEXT; @@ -339,6 +346,7 @@ static int sun4i_usb_phy_exit(struct phy *_phy) if (phy->index == 0) { if (data->cfg->type == sun8i_a83t_phy || + data->cfg->type == sun50i_a100_phy || data->cfg->type == sun50i_h6_phy) { void __iomem *phyctl = data->base + data->cfg->phyctl_offset; @@ -960,6 +968,16 @@ static const struct sun4i_usb_phy_cfg sun50i_a64_cfg = { .phy0_dual_route = true, }; +static const struct sun4i_usb_phy_cfg sun50i_a100_cfg = { + .num_phys = 2, + .type = sun50i_a100_phy, + .disc_thresh = 3, + .phyctl_offset = REG_PHYCTL_A33, + .dedicated_clocks = true, + .enable_pmu_unk1 = true, + .phy0_dual_route = true, +}; + static const struct sun4i_usb_phy_cfg sun50i_h6_cfg = { .num_phys = 4, .type = sun50i_h6_phy, @@ -983,6 +1001,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = { { .compatible = "allwinner,sun8i-v3s-usb-phy", .data = &sun8i_v3s_cfg }, { .compatible = "allwinner,sun50i-a64-usb-phy", .data = &sun50i_a64_cfg}, + { .compatible = "allwinner,sun50i-a100-usb-phy", .data = &sun50i_a100_cfg }, { .compatible = "allwinner,sun50i-h6-usb-phy", .data = &sun50i_h6_cfg }, { }, }; From patchwork Tue Nov 10 06:41:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9F16C388F7 for ; Tue, 10 Nov 2020 06:42:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F9EF20639 for ; Tue, 10 Nov 2020 06:42:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YA66fWzL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F9EF20639 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=5w2ZY1L6JCWPW3jWaVN6gFaVGXpk8uY5kTaT6GYP4jE=; b=YA66fWzLeJDBUkAAfh3TcCT1t fxqdIt8q4XcKB/9MPlX63ZLg2tvC1EbCj9YKRVqzTtOVfkTAMBEMKlDk1z5Q/lFqqIYJghPCnDv/T lEne1RHnUyE9IC/fo9fhkrR0SzJhTz8M02SiZ/kTcZpACWoDnJXFUkJEFBNShcJhRjCmdwdhDXUFu lkNrf7Hf0Xhwkv5GCyZhY5Rrsq/0m+h181LXA/SQYH8tvTlbNMtuj4cenuSgvnhiY/3TE2ZIm38YG g+Qu2Pc7jAC9FJZ7P7i8q+E7MNfp6evt+vsJB3iJSr9sLQUTi09AEnnayQiW/MROlUpmc39o3DTC0 Tlu6dMGWA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNLf-00022i-PY; Tue, 10 Nov 2020 06:41:47 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNLc-00020N-5S for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:41:46 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.07599229|-1; CH=blue; DM=|OVERLOAD|false|; DS=CONTINUE|ham_system_inform|0.458737-0.00102727-0.540235; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047193; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=8; RT=8; SR=0; TI=SMTPD_---.Iuo7NOU_1604990492; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.Iuo7NOU_1604990492) by smtp.aliyun-inc.com(10.147.41.199); Tue, 10 Nov 2020 14:41:36 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 14/19] arm64: dts: allwinner: a100: add usb related nodes Date: Tue, 10 Nov 2020 14:41:31 +0800 Message-Id: <10e2377a9d20977b17b99584ee25960cbb5fbe74.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_014144_461167_66CAC258 X-CRM114-Status: UNSURE ( 9.27 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li Allwinner A64 have two HCI USB controllers, a OTG controller and a USB PHY device, let's add nodes on dts. Signed-off-by: Yangtao Li --- .../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi index 6aa3337ce0e9..c731bb9727c2 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi @@ -290,6 +290,97 @@ ths: thermal-sensor@5070400 { #thermal-sensor-cells = <1>; }; + usbphy: phy@5100400 { + #phy-cells = <1>; + compatible = "allwinner,sun50i-a100-usb-phy"; + reg = <0x05100400 0x14>, + <0x05101800 0x4>, + <0x05200800 0x4>; + reg-names = "phy_ctrl", + "pmu0", + "pmu1"; + clocks = <&ccu CLK_USB_PHY0>, + <&ccu CLK_USB_PHY1>; + clock-names = "usb0_phy", + "usb1_phy"; + resets = <&ccu RST_USB_PHY0>, + <&ccu RST_USB_PHY1>; + reset-names = "usb0_reset", + "usb1_reset"; + status = "disabled"; + }; + + ehci0: usb@5101000 { + compatible = "allwinner,sun50i-a100-ehci", + "generic-ehci"; + reg = <0x05101000 0x100>; + interrupts = ; + clocks = <&ccu CLK_BUS_OHCI0>, + <&ccu CLK_BUS_EHCI0>, + <&ccu CLK_USB_OHCI0>; + resets = <&ccu RST_BUS_OHCI0>, + <&ccu RST_BUS_EHCI0>; + phys = <&usbphy 0>; + phy-names = "usb"; + status = "disabled"; + }; + + ohci0: usb@5101400 { + compatible = "allwinner,sun50i-a100-ohci", + "generic-ohci"; + reg = <0x05101400 0x100>; + interrupts = ; + clocks = <&ccu CLK_BUS_OHCI0>, + <&ccu CLK_USB_OHCI0>; + resets = <&ccu RST_BUS_OHCI0>; + phys = <&usbphy 0>; + phy-names = "usb"; + status = "disabled"; + }; + + usb_otg: usb@5100000 { + compatible = "allwinner,sun50i-a100-musb", + "allwinner,sun8i-h3-musb"; + reg = <0x05100000 0x0400>; + clocks = <&ccu CLK_BUS_OTG>; + resets = <&ccu RST_BUS_OTG>; + interrupts = ; + interrupt-names = "mc"; + phys = <&usbphy 0>; + phy-names = "usb"; + extcon = <&usbphy 0>; + dr_mode = "otg"; + status = "disabled"; + }; + + ehci1: usb@5200000 { + compatible = "allwinner,sun50i-a100-ehci", + "generic-ehci"; + reg = <0x05200000 0x100>; + interrupts = ; + clocks = <&ccu CLK_BUS_OHCI1>, + <&ccu CLK_BUS_EHCI1>, + <&ccu CLK_USB_OHCI1>; + resets = <&ccu RST_BUS_OHCI1>, + <&ccu RST_BUS_EHCI1>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; + }; + + ohci1: usb@5200400 { + compatible = "allwinner,sun50i-a100-ohci", + "generic-ohci"; + reg = <0x05200400 0x100>; + interrupts = ; + clocks = <&ccu CLK_BUS_OHCI1>, + <&ccu CLK_USB_OHCI1>; + resets = <&ccu RST_BUS_OHCI1>; + phys = <&usbphy 1>; + phy-names = "usb"; + status = "disabled"; + }; + r_ccu: clock@7010000 { compatible = "allwinner,sun50i-a100-r-ccu"; reg = <0x07010000 0x300>; From patchwork Tue Nov 10 06:43:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28880C388F7 for ; Tue, 10 Nov 2020 06:44:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A20BA20639 for ; Tue, 10 Nov 2020 06:44:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AsAEhlKr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A20BA20639 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=cazqMjfFTtBy/fgPTDvGAqnDid5Tvbw7B7IArWuhzQE=; b=AsAEhlKrYXiVbUQsSfdi86cKo /kCNWasYjmB2IV0z18spVDpCHkmCO7vaFoAGcDl3JWuJnKDtCg4/KbAWnEcMafdDMM9lGevZpmVpm vYA731klzmGdYtc+7ioE7sWMZZYqULNwm/dhjc6+xtwt/qoDWEImRRUKi4JujjEtFbsnpc8ydzzl2 rwRY6/T9zC5Mw7hBMBy79NwV8FILasPfmj4gBRKfQZo1lDT6CUe7WNgt6GJI31AxoLrcQSQpWi/0t vNzpwj4ihEWK1TeDjwvXP8I+9PTbohVVdeJs3bm+t4jbAMERwFbYRSsYf0uTnYIbqR6nFUM+PhFPy 6RQQyhpxg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNNU-0002ay-KS; Tue, 10 Nov 2020 06:43:40 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNNS-0002aO-Ka for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:43:39 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1107549|-1; CH=blue; DM=|OVERLOAD|false|; DS=CONTINUE|ham_system_inform|0.343704-0.0050523-0.651244; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047194; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=7; RT=7; SR=0; TI=SMTPD_---.IuodFRh_1604990611; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IuodFRh_1604990611) by smtp.aliyun-inc.com(10.147.41.187); Tue, 10 Nov 2020 14:43:35 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 15/19] arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1 Date: Tue, 10 Nov 2020 14:43:28 +0800 Message-Id: <86d2814f666b748defa0460dea118a5eeaeecf01.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_014338_918337_8C4E2376 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li Add USB support on A100 perf1 board, which include two USB2.0 port. Signed-off-by: Yangtao Li --- .../allwinner/sun50i-a100-allwinner-perf1.dts | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts index d34c2bb1079f..ef205c9b8ff4 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts @@ -7,6 +7,8 @@ #include "sun50i-a100.dtsi" +#include + /{ model = "Allwinner A100 Perf1"; compatible = "allwinner,a100-perf1", "allwinner,sun50i-a100"; @@ -18,6 +20,35 @@ aliases { chosen { stdout-path = "serial0:115200n8"; }; + + reg_usb1_vbus: usb1-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb1-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ + enable-active-high; + }; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci1 { + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + +&usb_otg { + status = "okay"; }; &pio { @@ -178,3 +209,10 @@ &uart0 { pinctrl-0 = <&uart0_pb_pins>; status = "okay"; }; + +&usbphy { + usb0_id_det-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ + usb0_vbus-supply = <®_drivevbus>; + usb1_vbus-supply = <®_usb1_vbus>; + status = "okay"; +}; From patchwork Tue Nov 10 06:45:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F750C388F7 for ; Tue, 10 Nov 2020 06:45:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EAAA20639 for ; Tue, 10 Nov 2020 06:45:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lrZIX63f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EAAA20639 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=ipU0vxVRHSrTR174jc30jQRFKYDYQPE2DpZ2UIhz3D8=; b=lrZIX63ffsLAuxauzCgnAgAMi +ON6SRinpilW0i5sh67oS/H8841PzDXnqm7mBJYcIUCZK2Z/B6DX4XCGgnFkZg3h6ZjNM7Dj7Acvc QlQAZ/9daLKifHe1hf94PzkTQTrpF3Qh3Zam/lBpVdji65faX0IxfPNbAu52KGxu0A9dNqOICzVZ3 GNLv/ElVh4Qer30usUAHRZY6bIJ4cIf6BOgmqv7CajFzvMA7c3O9XFAlSZU2tjE3IoAhD67iQe4BB 2rv+26ESt1F/sVbEqN83lQqQP+k+dwJe8LQB4YJGOo4lWACfKHx2OhQK8tPolBE3mLvofDAXM4Ob0 xHd3fScFA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNPF-0002yU-48; Tue, 10 Nov 2020 06:45:29 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNPB-0002xC-Re for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:45:26 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.3935514|-1; CH=blue; DM=|OVERLOAD|false|; DS=CONTINUE|ham_system_inform|0.00453423-0.000349622-0.995116; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047209; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=10; RT=10; SR=0; TI=SMTPD_---.IuotDq6_1604990718; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IuotDq6_1604990718) by smtp.aliyun-inc.com(10.147.43.230); Tue, 10 Nov 2020 14:45:21 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 16/19] dt-bindings: mmc: sunxi: Add A100 compatibles Date: Tue, 10 Nov 2020 14:45:16 +0800 Message-Id: <1e6af41ce01eafd0d366257e5be9a0aa90bb97c8.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_014526_206067_594762C0 X-CRM114-Status: UNSURE ( 9.19 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li Add binding for A100's mmc and emmc controller. Signed-off-by: Yangtao Li Acked-by: Rob Herring --- .../devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml b/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml index e82c9a07b6fb..41821f14ecaa 100644 --- a/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml +++ b/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml @@ -26,6 +26,8 @@ properties: - const: allwinner,sun9i-a80-mmc - const: allwinner,sun50i-a64-emmc - const: allwinner,sun50i-a64-mmc + - const: allwinner,sun50i-a100-emmc + - const: allwinner,sun50i-a100-mmc - items: - const: allwinner,sun8i-a83t-mmc - const: allwinner,sun7i-a20-mmc From patchwork Tue Nov 10 06:46:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893401 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71FF4C388F7 for ; Tue, 10 Nov 2020 06:47:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 073452065C for ; Tue, 10 Nov 2020 06:47:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="1wIaEnTe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 073452065C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=3C6CE4bz3pjlX7y/ZU68mjrEGBDJ/uW+47Vzgsa5wnI=; b=1wIaEnTegJsAz/zquqGTeHd42 FtprgyX5oxgDq/7+lNTZcsjZcwRHMp8/efPpSTx5T+5m4F6LN99XuL7dNU130W2sreVGsO7y00Gdy BN93rEWfxjor9w+ve5PCLXV2WHVCMlf5B9xrXXPBbZ0mt9D6ijUeb0a07fqPFlLB4J1wPfYDNNod+ hN7q+53UTTprnSXzn9vAQTsMkEYvv0rG2te88epRRBtP7FWOUqrGltBEwfi6XOZvhGm5ShHno3a1d NfI5Ghyr2Ce2cOAEkFKtRYUsrolLoOLvYAxXSkZdB98rzg9/nTF0mkFYZuUE3nOaMqJw93b3qhNXS vwJFo4mww==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNQU-0003Ew-01; Tue, 10 Nov 2020 06:46:46 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNQP-0003DN-RG for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:46:42 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.09124708|-1; CH=blue; DM=|OVERLOAD|false|; DS=CONTINUE|ham_system_inform|0.0186312-0.000150051-0.981219; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047201; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=12; RT=12; SR=0; TI=SMTPD_---.IuoOt.3_1604990794; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IuoOt.3_1604990794) by smtp.aliyun-inc.com(10.147.40.7); Tue, 10 Nov 2020 14:46:38 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 17/19] mmc: sunxi: add support for A100 mmc controller Date: Tue, 10 Nov 2020 14:46:31 +0800 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_014642_148358_BCF06753 X-CRM114-Status: GOOD ( 13.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Ulf Hansson , Wolfram Sang , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Douglas Anderson , Rui Miguel Silva , Chen-Yu Tsai , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li This patch adds support for A100 MMC controller, which use word address for internal dma. Signed-off-by: Yangtao Li --- drivers/mmc/host/sunxi-mmc.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c index fc62773602ec..1518b64112b7 100644 --- a/drivers/mmc/host/sunxi-mmc.c +++ b/drivers/mmc/host/sunxi-mmc.c @@ -244,6 +244,7 @@ struct sunxi_idma_des { struct sunxi_mmc_cfg { u32 idma_des_size_bits; + u32 idma_des_shift; const struct sunxi_mmc_clk_delay *clk_delays; /* does the IP block support autocalibration? */ @@ -343,7 +344,7 @@ static int sunxi_mmc_init_host(struct sunxi_mmc_host *host) /* Enable CEATA support */ mmc_writel(host, REG_FUNS, SDXC_CEATA_ON); /* Set DMA descriptor list base address */ - mmc_writel(host, REG_DLBA, host->sg_dma); + mmc_writel(host, REG_DLBA, host->sg_dma >> host->cfg->idma_des_shift); rval = mmc_readl(host, REG_GCTRL); rval |= SDXC_INTERRUPT_ENABLE_BIT; @@ -373,8 +374,10 @@ static void sunxi_mmc_init_idma_des(struct sunxi_mmc_host *host, next_desc += sizeof(struct sunxi_idma_des); pdes[i].buf_addr_ptr1 = - cpu_to_le32(sg_dma_address(&data->sg[i])); - pdes[i].buf_addr_ptr2 = cpu_to_le32((u32)next_desc); + cpu_to_le32(sg_dma_address(&data->sg[i]) >> + host->cfg->idma_des_shift); + pdes[i].buf_addr_ptr2 = cpu_to_le32((u32)next_desc >> + host->cfg->idma_des_shift); } pdes[0].config |= cpu_to_le32(SDXC_IDMAC_DES0_FD); @@ -1178,6 +1181,23 @@ static const struct sunxi_mmc_cfg sun50i_a64_emmc_cfg = { .needs_new_timings = true, }; +static const struct sunxi_mmc_cfg sun50i_a100_cfg = { + .idma_des_size_bits = 16, + .idma_des_shift = 2, + .clk_delays = NULL, + .can_calibrate = true, + .mask_data0 = true, + .needs_new_timings = true, +}; + +static const struct sunxi_mmc_cfg sun50i_a100_emmc_cfg = { + .idma_des_size_bits = 13, + .idma_des_shift = 2, + .clk_delays = NULL, + .can_calibrate = true, + .needs_new_timings = true, +}; + static const struct of_device_id sunxi_mmc_of_match[] = { { .compatible = "allwinner,sun4i-a10-mmc", .data = &sun4i_a10_cfg }, { .compatible = "allwinner,sun5i-a13-mmc", .data = &sun5i_a13_cfg }, @@ -1186,6 +1206,8 @@ static const struct of_device_id sunxi_mmc_of_match[] = { { .compatible = "allwinner,sun9i-a80-mmc", .data = &sun9i_a80_cfg }, { .compatible = "allwinner,sun50i-a64-mmc", .data = &sun50i_a64_cfg }, { .compatible = "allwinner,sun50i-a64-emmc", .data = &sun50i_a64_emmc_cfg }, + { .compatible = "allwinner,sun50i-a100-mmc", .data = &sun50i_a100_cfg }, + { .compatible = "allwinner,sun50i-a100-emmc", .data = &sun50i_a100_emmc_cfg }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, sunxi_mmc_of_match); From patchwork Tue Nov 10 06:48:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893403 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 190D1C5517A for ; Tue, 10 Nov 2020 06:48:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8EA952065C for ; Tue, 10 Nov 2020 06:48:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YrUOl4XN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EA952065C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=BTK6CgPtWZcD8/AF0+vb0/vV9TRuqlJQ//vCHqu/KqY=; b=YrUOl4XNrCK4qTq5hIZ5lanhD rDXFqvwkYNA+QXy940vqUWW3bVzhzA+G+0zqHKVlYTpU/f9OHgq1jKlnhLXt2eS+jB0vAUhHmi84t OvQk8bNH3ZMv8a+Ab+7WyNhhocc74g9yJMfBHNYura/31OZ1DUnANDd6aYiMYv3M4FyJDRx9LfyK/ k8+HCrT2WzuczpHb1CpmEja21HqgcET4zV8DbOsT8nl1Se/Mqq9L2f+fCK/je49u51USdfKySQFoR GhW2kuqNGnt323L/57EOGhCLY3Wfm5marRZr574jwEZDvMCuOP1BKZ0IGcF81JtUChmKu+AUVxc83 T3HWbLgoQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNS7-0003YP-3I; Tue, 10 Nov 2020 06:48:27 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNS4-0003XQ-8M for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:48:25 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.07519333|-1; CH=blue; DM=|OVERLOAD|false|; DS=CONTINUE|ham_system_inform|0.360606-0.000149407-0.639244; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047208; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=8; RT=8; SR=0; TI=SMTPD_---.IuonYu5_1604990896; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IuonYu5_1604990896) by smtp.aliyun-inc.com(10.147.40.233); Tue, 10 Nov 2020 14:48:20 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 18/19] arm64: allwinner: a100: Add MMC related nodes Date: Tue, 10 Nov 2020 14:48:15 +0800 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_014824_604058_9359E366 X-CRM114-Status: UNSURE ( 8.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li The A100 has 3 MMC controllers, one of them being especially targeted to eMMC. Let's add nodes on dts. Signed-off-by: Yangtao Li Reviewed-by: Andre Przywara --- .../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi index c731bb9727c2..4adfc7d4854a 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi @@ -169,12 +169,83 @@ pio: pinctrl@300b000 { interrupt-controller; #interrupt-cells = <3>; + mmc0_pins: mmc0-pins { + pins = "PF0", "PF1", "PF2", "PF3", + "PF4", "PF5"; + function = "mmc0"; + drive-strength = <30>; + bias-pull-up; + }; + + /omit-if-no-ref/ + mmc1_pins: mmc1-pins { + pins = "PG0", "PG1", "PG2", "PG3", + "PG4", "PG5"; + function = "mmc1"; + drive-strength = <30>; + bias-pull-up; + }; + + mmc2_pins: mmc2-pins { + pins = "PC0", "PC1", "PC5", "PC6", + "PC8", "PC9", "PC10", "PC11", + "PC13", "PC14", "PC15", "PC16"; + function = "mmc2"; + drive-strength = <30>; + bias-pull-up; + }; + uart0_pb_pins: uart0-pb-pins { pins = "PB9", "PB10"; function = "uart0"; }; }; + mmc0: mmc@4020000 { + compatible = "allwinner,sun50i-a100-mmc"; + reg = <0x04020000 0x1000>; + clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>; + clock-names = "ahb", "mmc"; + resets = <&ccu RST_BUS_MMC0>; + reset-names = "ahb"; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + mmc1: mmc@4021000 { + compatible = "allwinner,sun50i-a100-mmc"; + reg = <0x04021000 0x1000>; + clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>; + clock-names = "ahb", "mmc"; + resets = <&ccu RST_BUS_MMC1>; + reset-names = "ahb"; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + mmc2: mmc@4022000 { + compatible = "allwinner,sun50i-a100-emmc"; + reg = <0x04022000 0x1000>; + clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>; + clock-names = "ahb", "mmc"; + resets = <&ccu RST_BUS_MMC2>; + reset-names = "ahb"; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_pins>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + uart0: serial@5000000 { compatible = "snps,dw-apb-uart"; reg = <0x05000000 0x400>; From patchwork Tue Nov 10 06:49:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11893407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E82BC388F7 for ; Tue, 10 Nov 2020 06:49:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E823D2065E for ; Tue, 10 Nov 2020 06:49:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pON0l9mm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E823D2065E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=6PfExpfgjSHeLnOMmf8QvtxUDDh6AG8XANr1kx/uBAk=; b=pON0l9mmzaseYejdWpA3gZrKm PEuyWoJYTjzoNxccZSKxkLBkUxJbem72JG3QKp/1iEZ+68qHeeBd7B7nXbdtH4+49MzgwQ7FzRmp3 bPeLUnB8wifxBMbBm6nr8lCvCEBiCRSzGnua2nQKaVpX1Y8uUp3faH/ggXWaTIH+lqLlOU7fP9tbu JEAXlwyS/AvAHEhhZL+Y7W9EaD/WDobQR63CcaIRLsikq8yxzT2PFXChHufk2eMyhEi2ZgiAUP4jg ki/M0VHP0OZbjNkfJiaoFmJ8Koa9bY30BxNPLtchk0t3pz7cSFMRMvARVqsXx6+HumGXOjo4zgNLV SUdDNhjlQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNT7-0003kW-Gn; Tue, 10 Nov 2020 06:49:29 +0000 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcNT4-0003jT-UH for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 06:49:27 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1432565|-1; CH=blue; DM=|OVERLOAD|false|; DS=CONTINUE|ham_system_inform|0.0379109-0.00170347-0.960386; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047203; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=8; RT=8; SR=0; TI=SMTPD_---.IuovXvx_1604990958; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.IuovXvx_1604990958) by smtp.aliyun-inc.com(10.147.44.118); Tue, 10 Nov 2020 14:49:22 +0800 From: Frank Lee To: tiny.windzz@gmail.com Subject: [RESEND PATCH 19/19] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node Date: Tue, 10 Nov 2020 14:49:16 +0800 Message-Id: <7d873f20dcf9e62d2c6368662b2a7d125149371d.1604988979.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_014927_331792_4ED65356 X-CRM114-Status: UNSURE ( 9.05 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Yangtao Li , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yangtao Li A100 perf1 hava MicroSD slot and on-board eMMC module, add support for them. Signed-off-by: Yangtao Li --- .../allwinner/sun50i-a100-allwinner-perf1.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts index ef205c9b8ff4..d102c50ff7c1 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts @@ -39,6 +39,22 @@ &ehci1 { status = "okay"; }; +&mmc0 { + vmmc-supply = <®_dcdc1>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + bus-width = <4>; + status = "okay"; +}; + +&mmc2 { + vmmc-supply = <®_dcdc1>; + vqmmc-supply = <®_aldo1>; + cap-mmc-hw-reset; + non-removable; + bus-width = <8>; + status = "okay"; +}; + &ohci0 { status = "okay"; };