From patchwork Wed May 25 07:10: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: 576465 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 1DBBBC433FE for ; Wed, 25 May 2022 07:11:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244294AbiEYHLY (ORCPT ); Wed, 25 May 2022 03:11:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244265AbiEYHLQ (ORCPT ); Wed, 25 May 2022 03:11:16 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C07E92BF9; Wed, 25 May 2022 00:10:51 -0700 (PDT) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 4DE18100008; Wed, 25 May 2022 07:10:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1653462650; 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=bIBegiaOs2eLklNGt1ISnhEYhXPGLY1no2g9BBuk1MXfYUorSo+QXRF4d946eJIYu5AZkZ 8a9mezyXb71EQZvJY95049QCK+YsR5+VGCrj3ZeufFnD8rtHF2GL8S7ZDhw95gjGeHFz3w 5CasJXlWKq9vLOtcmPEVytZ1eXNQhvrXYrAA71sVlEKp3CZMV9mzA3WH+U6YBMFlnCEHuE AAXRkq6rG9M5jEH04jK2mGmzwuu0Y6+jX5tC/F1J7EmgdbL5VQqeyKKYQESMJnAdn0AcGN tc+ZeiO+HFiIldjkBVmBc7ARNR68HWzxO6DAVEv7Sq5faLOStcSoNeWjJbALMQ== 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 v3 1/3] clk: lan966x: Fix the lan966x clock gate register address Date: Wed, 25 May 2022 09:10:34 +0200 Message-Id: <20220525071036.223396-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220525071036.223396-1-herve.codina@bootlin.com> References: <20220525071036.223396-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 Wed May 25 07:10: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: 576221 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 D7E98C433EF for ; Wed, 25 May 2022 07:11:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244350AbiEYHL2 (ORCPT ); Wed, 25 May 2022 03:11:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244288AbiEYHLX (ORCPT ); Wed, 25 May 2022 03:11:23 -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 67184388F; Wed, 25 May 2022 00:10:56 -0700 (PDT) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 1854C100010; Wed, 25 May 2022 07:10:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1653462655; 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=WuV++LFzjWYUUnqMJX+uHOZhwZ6GkA/HQ7hNeFKIl8/qJGhdq30uurwdYlbIJvHkCQbOiL 1jDoHMhkbBZ2stM6wlpqrAYGb3fAjFo2+xVqtH/khIRToFaNBodkFjsz2ns7Sdgj6UJ9dB h2KnmlSGtUWKqkUl4M5IkBx9FFPSEp+uFWGUK+lZ1Dnxp1IhwRsQWqLiNey6Cf/fsWjyqC 1lXllMfo1vG76jmi7hDZ6ysfTquNMJRHkbqM2gPWXGgy9oZ0FAWK0xiTodNL5nFcRFoq0T g7yjLoZs9lOesTIG1GiNElPM5TzAzmHwFguTHRkfSztq/zgI1ZpxGfKjYeIG4Q== 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 v3 2/3] dt-bindings: usb: atmel: Add Microchip LAN9662 compatible string Date: Wed, 25 May 2022 09:10:35 +0200 Message-Id: <20220525071036.223396-3-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220525071036.223396-1-herve.codina@bootlin.com> References: <20220525071036.223396-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 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 Wed May 25 07:10:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 576464 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 15001C433FE for ; Wed, 25 May 2022 07:11:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239208AbiEYHLg (ORCPT ); Wed, 25 May 2022 03:11:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244305AbiEYHLZ (ORCPT ); Wed, 25 May 2022 03:11:25 -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 4678F5FBF; Wed, 25 May 2022 00:11:01 -0700 (PDT) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id A7C45100012; Wed, 25 May 2022 07:10:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1653462660; 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=+Vo9108VQlTnpt+qV7O1ggI75pFbssp26cf+E/xUTKg=; b=FjUAn8+dQt/kDdFahEAzg/CHBhBfIL/FL7rOOula+OHBO7DDDk8309LvHN8Fh5weJ5ddR5 ey2lZnuEXRRUvZ/c67ZUu3PfY5kYNoyFpkJ7QE11867+xYBoip7bE9Fk7IBdsXNhKPlGL5 C6i5rlvg2sBiy3BUjbadAkbJf7s+JpHdQ6jCAVPG/P9vyVJHhdytawukN1UzHzrN1plRof SrjFzcMSXEMSCPwLSlOzB4R3WdqQtcv9nS9Ia0+roEqXHjNa2p7v/GKf93uj12TcenZJYl klfIyY5/6HDZhMYFvJvPjzC8diWBRUMG3O4xDod7eXUOu0Vn/4LwvLddH4vwEw== 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 v3 3/3] ARM: dts: lan966x: Add UDPHS support Date: Wed, 25 May 2022 09:10:36 +0200 Message-Id: <20220525071036.223396-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220525071036.223396-1-herve.codina@bootlin.com> References: <20220525071036.223396-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 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..e086df741f99 100644 --- a/arch/arm/boot/dts/lan966x.dtsi +++ b/arch/arm/boot/dts/lan966x.dtsi @@ -196,6 +196,17 @@ watchdog: watchdog@e0090000 { 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"; + }; + can0: can@e081c000 { compatible = "bosch,m_can"; reg = <0xe081c000 0xfc>, <0x00100000 0x4000>;