From patchwork Fri May 20 15:23:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 12856918 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 C7501C433F5 for ; Fri, 20 May 2022 15:25:11 +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=xaUI8K7cOGa4gf IW+hb9MmkJw9U+cdpEmvOAisx/zodIsRrLhSM4Aly6qNwhATVGH9sqDQzjxiUH9D+c8wkHD9J9tyH XeP6Q8Mf3DIdJr59AmqxTtiaMEWC5bLy+y96oUaclNYGs4WPgypJyTZYHitx7rWOxMDKmQqd6BpAl OFGFEWjoSMiUpFuzubNbgNXnKAr6CwArhV7s0U3DQ24qIllAZ1PMSrSAcnaWxYFlbryYCiTKmcnQF a8mKZezIr7GLsWBEUNzrryNEEQzF5GU/8bIWbNW+X/tWTU5VWNBalc+5bXkqTuvXFrSY4XttsDmJp hbOrPj0gWYPW+dXGw1Zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns4Tv-00DA5u-Ph; Fri, 20 May 2022 15:23:59 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns4Tg-00D9sy-6G for linux-arm-kernel@lists.infradead.org; Fri, 20 May 2022 15:23:46 +0000 Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 5F82240003; Fri, 20 May 2022 15:23:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1653060222; 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=Bx66xkKJsrHE3x+Asut7neX1E3oz8O21z9uMK8Jqsu8Kle3YkhynnVrDdHLJg6wwzuF1VB 5QHMWdTF6IRwCET6d2ibIBBWgAZ2NGv3hGWPD/o0+2rSxLbotuFhaP390ynz/pfDT4BIBA pHy5P6WBx1yTo+VqY7NxafchcWJSzz/udFzCY+gmxCo0Ot8GO5wxMWf1m9idEol0lzKgE1 XQh7CfD/3bDxj6gntbSYmPZ1U81V9dRAwr9CwFY46FlX/E2Cj9ckK4bbWqEdpHwd54gHvJ HGfQ4RIVJZTbqj6Wl0MGN/ANquqz/39rceO6H5lRX7uDTqd8QDhaFp1msnW+9A== 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, 20 May 2022 17:23:33 +0200 Message-Id: <20220520152335.352537-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220520152335.352537-1-herve.codina@bootlin.com> References: <20220520152335.352537-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-20220520_082344_700672_9390DD6B X-CRM114-Status: GOOD ( 12.24 ) 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 20 15:23:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 12856919 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 66B4EC433F5 for ; Fri, 20 May 2022 15:25:24 +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=jx1UaODBKsSgdXZb/owPNpoGvKeudusrxfL26Db4OTM=; b=J2ct2HOjtrs6tr S6RTw5Fd8yLc4s6llu+ucasYinESVrAzzQs6I+pCTLZ41bLGUpsXRfYivbiA+PU1RaMoOsSK5wuOG k44W1Ru3r+1+52iP4KmufzJcR6KJ2iI4ImYXkRQ/1Ilo1EqS48XPAJecJE7o+GobCtWPIejgrmJo5 KdWg6WfcMkB3uHiKaIhxacQB1E03+0O6O/douS8sdAxLW9iQoYnIT4dkxd1n0tKqBf4AsgYpf1HN+ 7GY2DVeaO6Q4FxSqTdS3QNNPeXN2XrLiy25GLu1HGqDFvHbI617XoA1rTi66ct1NVe6ieB2wDNBrB yi7cSbqxToZJuxN8GJAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns4UB-00DAE8-RJ; Fri, 20 May 2022 15:24:16 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns4Ti-00D9ts-4U for linux-arm-kernel@lists.infradead.org; Fri, 20 May 2022 15:23:47 +0000 Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 99CAA4000B; Fri, 20 May 2022 15:23:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1653060224; 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=kQjkmQCgQIgQ279z8QJsaWMHPcPOT+vi5D3qiH12I0o=; b=nhRJdWuYDgDXBxPwBcDUoYGXfXwutp7Xlh19Hv5bSawYJGYNrPdQjiw6j9V21dCmJN5911 povK4Rnnn/1iB4EromRqCbZ9Qm1EqUJz85FUu83Ath9GLefnMzAHh2G0ZlZQ/4QKLA207y 9HuuFCKDIX93OcosIdFMQ1Be1ANnmW19v2tSS0uM/vm/sLT72kwhGFxxuEMWb81eF+Iyv5 sdIAvMpfLxFPazk5m5bA1zXDchmV0DARrUk3hy4osZT1JgvvzTUQiLwPh9sVoEZyCzraEk Ci4xaNB8VqV5MMJ1G7vgdtrzf5YQEyrCOP39rxdPhpVoO8nf9/SvAIcook8OAg== 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 LAN9662 compatible string Date: Fri, 20 May 2022 17:23:34 +0200 Message-Id: <20220520152335.352537-3-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220520152335.352537-1-herve.codina@bootlin.com> References: <20220520152335.352537-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-20220520_082346_372990_B5895F95 X-CRM114-Status: GOOD ( 10.62 ) 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 LAN9662 SOC is the same IP as the one present in the SAMA5D3 SOC. Add the LAN9662 compatible string and set the SAMA5D3 compatible string as a fallback for the LAN9662. Signed-off-by: Herve Codina Acked-by: Krzysztof Kozlowski --- 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..12183ef47ee4 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,lan9662-udc" + For "microchip,lan9662-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 20 15:23:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 12856920 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 5DD17C433EF for ; Fri, 20 May 2022 15:25:33 +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=XMqQApG14aEgdsISYHj3tf48fvJZpVSQEsr3wshntx8=; b=TH3zYF8kFz3fPz vYrR+5KJF5RhpwwIEtKMmoBCyoHaI5hjmQ7u2AfoxF3JJpKxNapjNMEzeduvObbjnDsGWV2Zaot/G bJr0mUogJamlK5m3RG82ix1Ms+vNbpAI1ndeNLPd8qIm3Pq4xOVkGDuuwlACXjGR+HxvQ+EmCreS2 hiFtYTZk6WUT3LsY871bs0oWwmhVnMhzBGEQ97mBEY8D6BsTvvURJDnd1PgIDbth6Aj59gw1wt/Eg XIALwCnY/zmb8i9hpkBgOXfl1aUHGchW/Ym/wmvNHMUkchtoxJF8viNq7d7FTGkCZqTzpmux59dvy RGYbp2JiGh9tfwyCuCMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns4UM-00DAID-Qp; Fri, 20 May 2022 15:24:26 +0000 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns4Tl-00D9va-69 for linux-arm-kernel@lists.infradead.org; Fri, 20 May 2022 15:23:51 +0000 Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id AE52740008; Fri, 20 May 2022 15:23:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1653060227; 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=hodHHbnMphQrf6mSg4FnD5vW8CvNnZ5zwZ57s3yWBkg=; b=DC4NVEPD7dzjvGc5eD0ToMLnuYbFDF+SFzSJBWtcAerlH4ar/4yoyRKFt7s4DwFiooQfxx wPPZOYH2h2Jfjh0P4s3bKZWTiMTE7FOxM+D9fA8R52I1jP3BkXGBXjloZw3B/cmwop2HTR E0ACz1oI4L/ZGvF/jUUIUf05pEw75bDHHHcmz3Sh/QYec+0lEGgIvy/GZh9Au5mSVkyP6e XeX6iFcunk0H1XYRp+arbUp7Lh+NephRtMJ0mrbNOGFD0ZX+w4SSZ+4Ddr4Cu36iH8JYOz D4m5ArGl3dj7Fv/DEtnompRfh5PlN7rebEJPi0fXhrbudw00j+YvM704CGrX5g== 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, 20 May 2022 17:23:35 +0200 Message-Id: <20220520152335.352537-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220520152335.352537-1-herve.codina@bootlin.com> References: <20220520152335.352537-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-20220520_082349_422380_89FF38F8 X-CRM114-Status: GOOD ( 10.33 ) 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 both lan966x SOCs (LAN9662 and LAN9668) have the same UDPHS IP. This IP is also 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..8313e71ecc37 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: usb@e0808000 { + compatible = "microchip,lan9662-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>,