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: 12848656 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5A96C433EF for ; Fri, 13 May 2022 10:59:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379649AbiEMK7J (ORCPT ); Fri, 13 May 2022 06:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231683AbiEMK7D (ORCPT ); Fri, 13 May 2022 06:59:03 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CB072A1883; Fri, 13 May 2022 03:59:02 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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: 12848657 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 908E7C43219 for ; Fri, 13 May 2022 10:59:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379645AbiEMK7K (ORCPT ); Fri, 13 May 2022 06:59:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379638AbiEMK7I (ORCPT ); Fri, 13 May 2022 06:59:08 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65BBB2A28C1; Fri, 13 May 2022 03:59:05 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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: 12848658 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FD3BC433EF for ; Fri, 13 May 2022 10:59:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379656AbiEMK7L (ORCPT ); Fri, 13 May 2022 06:59:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379651AbiEMK7K (ORCPT ); Fri, 13 May 2022 06:59:10 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85E942A28F6; Fri, 13 May 2022 03:59:08 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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>,