From patchwork Fri May 13 10:58:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 12848660 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 410C2C433EF for ; Fri, 13 May 2022 11:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qsp7rPuavnqTImUjmO2AIV7MrG8d4IfulZk+SzffY6U=; b=eMnS8rnOQFseTX V9BS8YKsyLc8HwZIpkb6l7nYW3GjdAKytycZPcL/BUkn2OjQhuhQwrRvfbXPimCa863yiUETrqYfc 38H0Q5cl7OSHRzFYg4mP3R5IgqiE4o0ckRfKVqRJyUyVNzs2pEULwMMYMk/O5Ib2kLO+T5/x4yAa2 cGuelSr6j7ukbi5e2YREiMjcoGZBJ0kpvz8ryVUZVmP9ByZiwmVnV3dEhF4n/KZu2vgMP7LRkN1hv F64JGmV2sOoWHvB9HCB/+i1wh3e82NU1cbZplEoHVihhw/uoJfqDo9FTu1T9wgQpluYLbFUtJG//b tXZx8weVTHJy74pBdv+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1npT0x-00Ffmd-9U; Fri, 13 May 2022 10:59:19 +0000 Received: from relay11.mail.gandi.net ([217.70.178.231]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1npT0i-00Ffa5-DY for linux-arm-kernel@lists.infradead.org; Fri, 13 May 2022 10:59:05 +0000 Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 9EC8510000D; Fri, 13 May 2022 10:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1652439540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=phRAVilaCphqNifvq+II7qoJeSQm2Yxjtyairx0TGxE=; b=BWoReh7KEljZ6rp733n7DaxE6O3w/PkXy52Umpq4rC+LntdeIKWrdw4hyZjf1aval39utR Z12bsAvU8GqaTCkQy/bs41Z3BHiDdk36Yg2aMrpKwFcODuSgPaw+JjPe0aEoOHf+vsZkWr iBUqm+WDgKyWkweDTRCzrndjx/sjmZdS3F39fl+xNQm8c9rJbNRd+Nv6fnyoawZQtDurFr n+HxqiFHbPC9VLF8ClXjBv76ZOG11LtGH7jpXUXWpwKSiD5VG3BGWdH0I2dEHL3DsPIvkg 8BtAP5HdSHPV7dj7ZVUE1H1jJeciC2EOVEvz3Of1cWhPCtGWwsYVKBzGKo6Jmw== From: Herve Codina To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Michael Turquette , Stephen Boyd , Horatiu Vultur Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Thomas Petazzoni , Herve Codina Subject: [PATCH 1/3] clk: lan966x: Fix the lan966x clock gate register address Date: Fri, 13 May 2022 12:58:48 +0200 Message-Id: <20220513105850.310375-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220513105850.310375-1-herve.codina@bootlin.com> References: <20220513105850.310375-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220513_035904_624316_80FF22DC X-CRM114-Status: GOOD ( 12.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The register address used for the clock gate register is the base register address coming from first reg map (ie. the generic clock registers) instead of the second reg map defining the clock gate register. Use the correct clock gate register address. Fixes: 5ad5915dea00 ("clk: lan966x: Extend lan966x clock driver for clock gating support") Signed-off-by: Herve Codina --- drivers/clk/clk-lan966x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-lan966x.c b/drivers/clk/clk-lan966x.c index d1535ac13e89..81cb90955d68 100644 --- a/drivers/clk/clk-lan966x.c +++ b/drivers/clk/clk-lan966x.c @@ -213,7 +213,7 @@ static int lan966x_gate_clk_register(struct device *dev, hw_data->hws[i] = devm_clk_hw_register_gate(dev, clk_gate_desc[idx].name, - "lan966x", 0, base, + "lan966x", 0, gate_base, clk_gate_desc[idx].bit_idx, 0, &clk_gate_lock); From patchwork Fri May 13 10:58:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 12848661 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB412C433EF for ; Fri, 13 May 2022 11:00:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rV8FhJf7YB0asuGAlpJPj0o6iuMqPsr+VQ7YTSo7/Zw=; b=OLPyqBkZh+gBAJ /3TdeJD5ag47Nvp2qG+Bl3P8bZP49KRAa5VHTFGdQSr6LwAADfW0EW02L1+N/LsVKVtKdOf3ZvHM7 NTiv+8hFyoHgWiZ4SRfk1xn/I18ByzXzyY0e7XK4c5tNxTDcztVw+//TZhmSOLcmmvUtiTQKtZLXd 7puAUpsqjm+MhFaCiX/H1xIOUfMspEA1L9Afc6JXHPxDJXPPOnAOyE8aLXbAvatnIP6QdkTCSWyRI /m2MjkLhSPqidwZJokJ89MKDvc0gvXXq+9+Bh7GWnmaHSQsrovNE17lGB5YDq7voJDyjXGBZLvMKz 0jjBvUssjZ4AWvpU0w9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1npT18-00Ffsh-On; Fri, 13 May 2022 10:59:30 +0000 Received: from relay11.mail.gandi.net ([217.70.178.231]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1npT0j-00Ffcd-AW for linux-arm-kernel@lists.infradead.org; Fri, 13 May 2022 10:59:06 +0000 Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 0DCC110000A; Fri, 13 May 2022 10:59:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1652439543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4K0EFt4lhlZt0lJqIMw4KPRkrXRKLseqT+zoY/lksGw=; b=jLyLiMEsIElQkFgHtalqh8TWjWtLKTDMGWIPeoNv4rHIIvrU02RkgdRcTEXCIj4gaXJv4G NGrIWLVmNAWTKOF7e7KrZtN6qTzfJ5tMPNutUHYVq0rtc3dP1+3N9SFFzk5yTXe0b6t1M2 /bB7jIr188pfxE5lhJt/Ybo+w1g4/rKU+O4rZLlECHPdG4QimR+Molaj50t6d0MmMCefUN 1UR9q1iv0dBDVW9fE113LsG1HWdxmg0FlUBFYAEP1ph/KuK4Spp/1IKm0tC5L9SUTV1S2y oY99W5v2iDVxsqY7SbYUUTxA+i5wgcRWf1dSmEd6XOU/B9yH/f7RBmJKJ9xrvQ== From: Herve Codina To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Michael Turquette , Stephen Boyd , Horatiu Vultur Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Thomas Petazzoni , Herve Codina Subject: [PATCH 2/3] dt-bindings: usb: atmel: Add Microchip LAN966x compatible string Date: Fri, 13 May 2022 12:58:49 +0200 Message-Id: <20220513105850.310375-3-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220513105850.310375-1-herve.codina@bootlin.com> References: <20220513105850.310375-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220513_035905_540761_2461CC7E X-CRM114-Status: GOOD ( 10.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The USB device controller available in the Microchip LAN966x SOC is the same IP as the one present in the SAMA5D3 SOC. Add the LAN966x compatible string and set the SAMA5D3 compatible string as a fallback for the LAN966x. Signed-off-by: Herve Codina --- Documentation/devicetree/bindings/usb/atmel-usb.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/atmel-usb.txt b/Documentation/devicetree/bindings/usb/atmel-usb.txt index f512f0290728..a6fab7d63f37 100644 --- a/Documentation/devicetree/bindings/usb/atmel-usb.txt +++ b/Documentation/devicetree/bindings/usb/atmel-usb.txt @@ -87,6 +87,9 @@ Required properties: "atmel,at91sam9g45-udc" "atmel,sama5d3-udc" "microchip,sam9x60-udc" + "microchip,lan996x-udc" + For "microchip,lan996x-udc", the fallback "atmel,sama5d3-udc" + is required. - reg: Address and length of the register set for the device - interrupts: Should contain usba interrupt - clocks: Should reference the peripheral and host clocks From patchwork Fri May 13 10:58:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 12848662 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D4667C433EF for ; Fri, 13 May 2022 11:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0xzP1NsQilmpyRnoDd80R/9eZRlbFhbHEonWW8vtvyU=; b=PqLPtzu9FMsWPp B+wZlVEtQdJQ/ukunVVC09wKaVJkOVY4XolfmOfLNuKfDbpwFvgnTj2N0kf53mAmQDG3zIXhyYfLr AJDTx+qBbnhQXyO1yaqnz3GnvXT0CF/Hw+luYlSAWzmxJXNhJ4eKw1MEBC/0lWjOHo4PqbAEzuGkd 12OWtTCsAMwnvK0+78ieuAB2pj/4Ued0NuqYdZB5ZnFL6uopAHV2jqy5Urf3BAx/kzsIuN7qkpNc1 8wXpRHe2lgDUktcgZUsJ7k836qbdzvBstUTlJjewykOFBi5W5aOVnS0TipJRGPL38ZQjS9Vqjk5SH qMjQdXwO/wgI3aJQtqhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1npT1H-00FfvX-Nk; Fri, 13 May 2022 10:59:39 +0000 Received: from relay11.mail.gandi.net ([217.70.178.231]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1npT0m-00Ffeo-LM for linux-arm-kernel@lists.infradead.org; Fri, 13 May 2022 10:59:10 +0000 Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 778A810000C; Fri, 13 May 2022 10:59:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1652439547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yDbhCUB50i3TiYKzQUORArQ45Vtm0wzVgFF/9jjJq7k=; b=EjIfoxCZEAaI659zwbW5ETc78Lfde1yiNztIhoL9nhnZxcvo7Uy0pVD/CRVcL6DO2KC1ah 6rkxF6Ef6/E81TmwXTWa6XHWwlK25WPDuykl3SZLV6ISgrSz1q/ti0zTQnMJwowlnwLM6/ JeeSo8fRDiPBwzHmtBAUMv2iKpKEc+jpRpWzWWBPYWCbC9eFwU+Tdg/RcRC4yhtuahCoww ueFgo8QJpwtI1Def90xEqdCpVIfMZufEiBEaPASFQKPvJRW2Q/+mzCC4TOgqEgpuV+KNC9 S1YAl3AQ8xTBDEfVO063yJyffJPGhmvrMtvn9yHMYgsikmW0VPFXgBcu57VuvQ== From: Herve Codina To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Michael Turquette , Stephen Boyd , Horatiu Vultur Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Thomas Petazzoni , Herve Codina Subject: [PATCH 3/3] ARM: dts: lan966x: Add UDPHS support Date: Fri, 13 May 2022 12:58:50 +0200 Message-Id: <20220513105850.310375-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220513105850.310375-1-herve.codina@bootlin.com> References: <20220513105850.310375-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220513_035908_892755_096C74C9 X-CRM114-Status: UNSURE ( 9.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add UDPHS (the USB High Speed Device Port controller) support. The UDPHS IP present in the lan966x SOC is the same as the one present in the SAMA5D3 SOC Signed-off-by: Herve Codina --- arch/arm/boot/dts/lan966x.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/lan966x.dtsi b/arch/arm/boot/dts/lan966x.dtsi index 7d2869648050..4c09f3166d27 100644 --- a/arch/arm/boot/dts/lan966x.dtsi +++ b/arch/arm/boot/dts/lan966x.dtsi @@ -211,6 +211,17 @@ can0: can@e081c000 { status = "disabled"; }; + udc: udphs@e0808000 { + compatible = "microchip,lan996x-udc", + "atmel,sama5d3-udc"; + reg = <0x00200000 0x80000>, + <0xe0808000 0x400>; + interrupts = ; + clocks = <&clks GCK_GATE_UDPHS>, <&nic_clk>; + clock-names = "pclk", "hclk"; + status = "disabled"; + }; + gpio: pinctrl@e2004064 { compatible = "microchip,lan966x-pinctrl"; reg = <0xe2004064 0xb4>,