From patchwork Mon Jul 4 10:28:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 12905077 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 82DCDC43334 for ; Mon, 4 Jul 2022 11:02:30 +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=vt0FRuhaYmmHRT1FZabSdbBaG/n41Ypmhzmm3yGqYsE=; b=fLnRJIAgAUJ61k n9JEvVNw1hIQe2JRqKFNRFC4dF6GuQRww3l7XEHxBTCHabDgbIncCV2MtNm4Wnj2jdA2H05TepV4O 4tmrPZyuUJV7YaNlD6xsdYP7QLxzmRMmoE6kmSwFVUY2fACJFGXjutP5AVgCT4CwtRhZHH4ldW8Gw yzfCllavODlg34Mp2qN+tlwY3rFXAZ2UCfc67qzYJztQSu4d8TgiRN5UgMkt6mObuBtDBMoq8LXCz yzcr9oLTaK7xZgBAOyzxWIJO2s7jy6NzsURSIY8KyE6SMDeRGIlq/aYu+nxhm+x2v32zY8bzIRpkK fLs7HHayvISEnGlDgPhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8JpL-007NfQ-3i; Mon, 04 Jul 2022 11:01:15 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8JK4-0070c9-AK for linux-arm-kernel@lists.infradead.org; Mon, 04 Jul 2022 10:28:58 +0000 Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 64C5A240017; Mon, 4 Jul 2022 10:28:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1656930533; 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=043xki5ybzdJf/eZrX7vsjG3WJvxmYS8FW1MP76lKiI=; b=BeZWnTvYyAe37i99UXlKoujXWWlwGRmEHwYZNUW8HTp+jaWl0AR3NYpecUc7XqnjbELFiR cnTuNkCsq9trTFnTiybmoRxSQK/X0E8iVL6KPCxfekKXUr/9V8iXkSCncUBEXX1lSCx4zI 88vw+D/i8ykGjN2tx/odqEdVqOzlUgwVIAm9uxEnJDbNe5lplXDIgb6PgPE4DtNLJfbtPz 36RFxoonegSoGQUpy/GOfl94Lr9JMPKPlZXz5qcbCDzHh8+zwEfGvuZJyEmW1KFaOS2K1W 1kUMpiE3Wr4TBh0LVGulfcWXjQUFrzWNzubKqwbpCqf1Tab+o6H4DaAorzfPpw== 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 v5 1/3] clk: lan966x: Fix the lan966x clock gate register address Date: Mon, 4 Jul 2022 12:28:43 +0200 Message-Id: <20220704102845.168438-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220704102845.168438-1-herve.codina@bootlin.com> References: <20220704102845.168438-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-20220704_032856_581411_275B25AF X-CRM114-Status: GOOD ( 13.00 ) 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 Reviewed-by: Claudiu Beznea Tested-by: Michael Walle --- 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 Mon Jul 4 10:28:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 12905078 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 EEF4BC43334 for ; Mon, 4 Jul 2022 11:03:22 +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=3iGWRp6d5ljKeaQ6/qNe4JMxsdaN+tAzXfGuBJL9X6g=; b=tiIgkkkKbfWgVl FG4fPcMXBEEA+dF1zoFGVpsehhOV8huzgM1seuKAK+b9iGEhsHPji1B47Xkt1ZlbZLUDSeN2OuEVK IqaksqjmFF5JDQ6YsgtVrTjBtiDUs5Ldi0S0iaOpwEmW3MTi8nZdiRpndYGX+Vqb9tksDue0khu1c v1ZPdOy6RKvnyMGdK2LqUJX8TWhUtrXClKRiSwCBWV/hhvWSn9CD6DXNdYLteGxwxkXSN5TmrkE5s zob7ZeAGVP3BW5ei7tz9ukElIe6Gz1wJ4iyarN6vWa0rIwMEe/W1RZXUOfHYYUkmPTnsO78LxJlmk pVDeFgLueOx86mkbDLPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8Jq9-007OJo-KG; Mon, 04 Jul 2022 11:02:06 +0000 Received: from relay10.mail.gandi.net ([2001:4b98:dc4:8::230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8JK6-0070dq-2M for linux-arm-kernel@lists.infradead.org; Mon, 04 Jul 2022 10:28:59 +0000 Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 759BE24000B; Mon, 4 Jul 2022 10:28:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1656930536; 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=bY9k2hKqsyHlaoLqP64+/s43+QLgOGGKL1kqn0fNDuQ=; b=i7nVJZbB8VxaaFclnvCzIxKQ98p0wqQrMaWfZUnEgL/mVJQPMg6gGiAm0gcyyb17GxBlxq gQkrUQ31+oUIU3+TBsnoR9PNIgBfId7N8wXP8iHXiVcjxtK+PoRR6hX+Y3Bfk63aPCYd1S NDXzVzxgbWFmvtjw6aEgrHPLHgFZyvcCALyHrGM4gjJSLPk6Ntrg8ioXmhwTHdvJRTGKJo phV395wb41erTzCxiaE6xh1jSFYV5P2mXM29eie9xhOedFsoCLTaDRx4Yc0WK+bvAC7M5u ZYQYfrH6CNhPUXkqkaymGmHJiIh78fUSbzIsSsysCFZI6RMteqorptrr5LfZ+g== 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 , Krzysztof Kozlowski Subject: [PATCH v5 2/3] dt-bindings: usb: atmel: Add Microchip LAN9662 compatible string Date: Mon, 4 Jul 2022 12:28:44 +0200 Message-Id: <20220704102845.168438-3-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220704102845.168438-1-herve.codina@bootlin.com> References: <20220704102845.168438-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-20220704_032858_326376_2FF2DB3C X-CRM114-Status: GOOD ( 10.88 ) 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 Mon Jul 4 10:28:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 12905079 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 0D7E4C43334 for ; Mon, 4 Jul 2022 11:04:08 +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=lvmO4PABd8I4pSFmepwI///4fpnQm8QB31gGv8LVXVM=; b=jJeUOfV8r4kg13 GSKVFbfjDZFnR2T/KpzTHrX0Zll+h34RzUZIYxM65mX6QecBu/phLHQwrDIo8USteSEA0mXpown5s 5O3yCPaFphS59bdr18YzZcUAlJzcD5IYwK0PDL4DMJzjPvqSoUfpecj6UgVIekNIBTJmMItcPnC+M Of2rqk8uwqLKJ5GiqaA11Q9kapqD2ytOn8X0RInMcuRhby9AANEcsM6MAGGzEITvlU6NW+BuUG57S u7quTr/fr9sQMm/gmGwS1Ig5cRTBeSqA/01wy94o+WHpkHBQkvYKAEQYHSAOfkILToQAe94e7jHp1 jX0x8zZNx84TTHvfNmtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8Jr0-007PAL-US; Mon, 04 Jul 2022 11:02:59 +0000 Received: from relay10.mail.gandi.net ([2001:4b98:dc4:8::230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8JKB-0070iQ-Se for linux-arm-kernel@lists.infradead.org; Mon, 04 Jul 2022 10:29:05 +0000 Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 6D212240008; Mon, 4 Jul 2022 10:29:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1656930542; 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=LSXnCRxUl4U9Qi112GF1nMAAGUftrLkrbGlg6cMy5Gg=; b=cBz/PcInNbBTr5htwUDKttOie/ZgPjXmHxtQhYCqfNrs2NACOTx9Dtw8V+zRJuBapjAqlR 3TyQE0Qi7DRJYNw9E8pTY2XjibFpklli0uHxIyIfeh2sOSFlbuu+6b70th4TfOgPtTKECo OTA0yPA8TDNO0BEAUFj26eMIwXJXLP0T6Mdt+2JlL3DD74ievXF326IayDluLoPWWSMPtc axmKiHjTiaNC7tVfrToH6ALAjg79Uv/f0Ex8yvQ039283WWTP/ZnLroznTshBGDrM3okYO i1AL4VFmKdCsmZJPiWcLOPH0MOnZ79e55W3rq3vUQ7j59Lv1hqWzeGNzyXItOA== 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 v5 3/3] ARM: dts: lan966x: Add UDPHS support Date: Mon, 4 Jul 2022 12:28:45 +0200 Message-Id: <20220704102845.168438-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220704102845.168438-1-herve.codina@bootlin.com> References: <20220704102845.168438-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-20220704_032904_118767_63B36F5E X-CRM114-Status: GOOD ( 10.69 ) 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 3cb02fffe716..a54fee5254a4 100644 --- a/arch/arm/boot/dts/lan966x.dtsi +++ b/arch/arm/boot/dts/lan966x.dtsi @@ -84,6 +84,17 @@ soc { #size-cells = <1>; ranges; + udc: usb@200000 { + 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"; + }; + switch: switch@e0000000 { compatible = "microchip,lan966x-switch"; reg = <0xe0000000 0x0100000>,