From patchwork Wed Nov 9 12:46:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Grzeschik X-Patchwork-Id: 13037502 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 80334C4332F for ; Wed, 9 Nov 2022 12:48:21 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LwDYTOw4wkNEeIE1YoK6dnHzXKfXXOoJaywZnFTtLsc=; b=LQ17at0L+dlJeO hHZB5jgxPqdnaaqCw6CVRnxszvlWCg7UbZtHguIzQEuZoHeqUUbeLkBt+1h60bOYR7mZfJiNnYZX/ IWhGmX65lz/Ll3tW33InEj2LTHtNItl5EXiFZreJfLT1K1gEhhYX248sdeeqS/8qGQWbjI5sd9Ynd La45ZYfw0vUDuryKWU0DCHhzZFcZbcgVD0E9wy3Za8g/0oePWUSFJte3YyH2eEx8GPqBFuLF3K/r/ Y5T6citxxoDFludF6I8etZgIi+OsAafZdRmLijeeA2Q2rpKIU42I6GIPlRKVPTFMTz1JZFpqKJGSh 7E4lWmeGUWTpzTpvuiYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oskUE-00DUgJ-2L; Wed, 09 Nov 2022 12:47:22 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oskTj-00DULd-OJ for linux-arm-kernel@lists.infradead.org; Wed, 09 Nov 2022 12:46:54 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oskTg-00082x-Ph; Wed, 09 Nov 2022 13:46:48 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oskTe-003Frd-9J; Wed, 09 Nov 2022 13:46:47 +0100 Received: from mgr by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oskTe-000cKe-7j; Wed, 09 Nov 2022 13:46:46 +0100 From: Michael Grzeschik To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/3] clk: at91: rm9200: fix usb device clock id Date: Wed, 9 Nov 2022 13:46:36 +0100 Message-Id: <20221109124638.147270-2-m.grzeschik@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221109124638.147270-1-m.grzeschik@pengutronix.de> References: <20221109124638.147270-1-m.grzeschik@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mgr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221109_044651_860997_6E350D6D X-CRM114-Status: GOOD ( 14.87 ) 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: , Cc: alexandre.belloni@bootlin.com, sboyd@kernel.org, mturquette@baylibre.com, linux-clk@vger.kernel.org, ludovic.desroches@microchip.com, kernel@pengutronix.de, claudiu.beznea@microchip.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Referring to the datasheet the index 2 is the MCKUDP. When enabled, it "Enables the automatic disable of the Master Clock of the USB Device Port when a suspend condition occurs". We fix the index to the real UDP id which "Enables the 48 MHz clock of the USB Device Port". Cc: mturquette@baylibre.com Cc: sboyd@kernel.org Cc: nicolas.ferre@microchip.com Cc: alexandre.belloni@bootlin.com Cc: ludovic.desroches@microchip.com Cc: claudiu.beznea@microchip.com Cc: linux-clk@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: kernel@pengutronix.de Fixes: 02ff48e4d7f7 ("clk: at91: add at91rm9200 pmc driver") Signed-off-by: Michael Grzeschik Reviewed-by: Claudiu Beznea --- v1 -> v2: - removed ; from patch description - added fixes tag v2 -> v3: - updated the fixes tag drivers/clk/at91/at91rm9200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/at91/at91rm9200.c b/drivers/clk/at91/at91rm9200.c index b174f727a8ef8d..16870943a13e54 100644 --- a/drivers/clk/at91/at91rm9200.c +++ b/drivers/clk/at91/at91rm9200.c @@ -40,7 +40,7 @@ static const struct clk_pll_characteristics rm9200_pll_characteristics = { }; static const struct sck at91rm9200_systemck[] = { - { .n = "udpck", .p = "usbck", .id = 2 }, + { .n = "udpck", .p = "usbck", .id = 1 }, { .n = "uhpck", .p = "usbck", .id = 4 }, { .n = "pck0", .p = "prog0", .id = 8 }, { .n = "pck1", .p = "prog1", .id = 9 }, From patchwork Wed Nov 9 12:46:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Grzeschik X-Patchwork-Id: 13037500 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 E0B96C43217 for ; Wed, 9 Nov 2022 12:48:00 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dKxFtA3hDn2iIE50zIhBg47R11GB5Elk6LZ1ccVgLIE=; b=guRNFh9ZznX3uT 9rE8sJbc4Jy30gRlcZmOTI3W1Loz0njVzc3Ng7CmL4oZF+oNce0oLG1nqISXgNifgBwCH67bcUrWa PTHlxct0f06z8gnMFm3g2tr0Bo9Jxwj7fWW3ZO580MUhYPmEcHl+36ZkuTHokcK3EDO/RUAtjCYun S/bO5sJKU8YpVuCR1kBFivypo2W8XTxKhA/kSpZ6aNyXvlxcmvhIO81Ryi17zmVn7OXvmf/HX3GDw GIqB7E2EK4IWKNzauPrAsAZk3Rg67EqqUhdR+hm4CSqLtRmm4Z3jj9WNeO71T2/UpQcRsl2mOZ5DV pOwXp5yfNZGeV1BLJs2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oskTv-00DUUY-CY; Wed, 09 Nov 2022 12:47:03 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oskTj-00DULX-MP for linux-arm-kernel@lists.infradead.org; Wed, 09 Nov 2022 12:46:53 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oskTg-00082w-Ij; Wed, 09 Nov 2022 13:46:48 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oskTe-003Frb-8q; Wed, 09 Nov 2022 13:46:47 +0100 Received: from mgr by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oskTe-000cKh-8D; Wed, 09 Nov 2022 13:46:46 +0100 From: Michael Grzeschik To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 2/3] ARM: dts: at91: rm9200: fix usb device clk id Date: Wed, 9 Nov 2022 13:46:37 +0100 Message-Id: <20221109124638.147270-3-m.grzeschik@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221109124638.147270-1-m.grzeschik@pengutronix.de> References: <20221109124638.147270-1-m.grzeschik@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mgr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221109_044651_748807_A9930D59 X-CRM114-Status: GOOD ( 13.80 ) 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: , Cc: kernel@pengutronix.de, ludovic.desroches@microchip.com, alexandre.belloni@bootlin.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Referring to the datasheet the index 2 is the MCKUDP. When enabled, it "Enables the automatic disable of the Master Clock of the USB Device Port when a suspend condition occurs". We fix the index to the real UDP id which "Enables the 48 MHz clock of the USB Device Port". Cc: nicolas.ferre@microchip.com Cc: ludovic.desroches@microchip.com Cc: alexandre.belloni@bootlin.com Cc: linux-arm-kernel@lists.infradead.org Cc: kernel@pengutronix.de Fixes: 0e0e528d8260 ("ARM: dts: at91: rm9200: switch to new clock bindings") Signed-off-by: Michael Grzeschik --- v1 -> v2: - removed ; from patch description - added fixes tag v2 -> v3: - updated the fixes tag arch/arm/boot/dts/at91rm9200.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi index 7a113325abb9ed..6f9004ebf42456 100644 --- a/arch/arm/boot/dts/at91rm9200.dtsi +++ b/arch/arm/boot/dts/at91rm9200.dtsi @@ -666,7 +666,7 @@ usb1: gadget@fffb0000 { compatible = "atmel,at91rm9200-udc"; reg = <0xfffb0000 0x4000>; interrupts = <11 IRQ_TYPE_LEVEL_HIGH 2>; - clocks = <&pmc PMC_TYPE_PERIPHERAL 11>, <&pmc PMC_TYPE_SYSTEM 2>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 11>, <&pmc PMC_TYPE_SYSTEM 1>; clock-names = "pclk", "hclk"; status = "disabled"; }; From patchwork Wed Nov 9 12:46:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Grzeschik X-Patchwork-Id: 13037499 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 03599C4332F for ; Wed, 9 Nov 2022 12:47:59 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nf48USRTryqRHL8e6l4Q3vuFlRn93BT2ZelmZDHdRyw=; b=AKuSKl31hOWHGP kNjpd9MkaQE5C355JzDUVCgeA+R+imm0T/J2L31PzC9vPgOaCwEiH4VV+w57of+7RsEG/trPeWO7R pdd/UGbpJuuc1u7rm12vZ26/qIY1PGD6/KmSa36Q1DT/wEo1W5i/3P5QAQkVa5hND1BIhGEBjK2hc ICaFlULibjuLSfT65bJJqqFEvm3zbyVtono80LjPRN+Z6ULBWxVpvPZw5bBRIuiKP9tnChlaqcXyv XokY6crRJh5fK+WPKLZtWkQH9PVioUUl4HOcbXLbrvnVS+LE3KCrT+P4TDNgNi5iq3ukt7/OeS6fL 7O93xnmwYTKQhCF5F5gQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oskTm-00DUPW-IQ; Wed, 09 Nov 2022 12:46:54 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oskTj-00DUKT-Lw for linux-arm-kernel@lists.infradead.org; Wed, 09 Nov 2022 12:46:53 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oskTf-00082v-SH; Wed, 09 Nov 2022 13:46:47 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oskTe-003FrZ-7s; Wed, 09 Nov 2022 13:46:47 +0100 Received: from mgr by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oskTe-000cKk-8f; Wed, 09 Nov 2022 13:46:46 +0100 From: Michael Grzeschik To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 3/3] ARM: dts: at91: sam9g20ek: enable udc vbus gpio pinctrl Date: Wed, 9 Nov 2022 13:46:38 +0100 Message-Id: <20221109124638.147270-4-m.grzeschik@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221109124638.147270-1-m.grzeschik@pengutronix.de> References: <20221109124638.147270-1-m.grzeschik@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mgr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221109_044651_736574_3E64FBBB X-CRM114-Status: GOOD ( 12.55 ) 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: , Cc: kernel@pengutronix.de, ludovic.desroches@microchip.com, alexandre.belloni@bootlin.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We set the PIOC to GPIO mode. This way the pin becomes an input signal will be usable by the controller. Without this change the udc on the 9g20ek does not work. Cc: nicolas.ferre@microchip.com Cc: ludovic.desroches@microchip.com Cc: alexandre.belloni@bootlin.com Cc: linux-arm-kernel@lists.infradead.org Cc: kernel@pengutronix.de Fixes: 5cb4e73575e3 ("ARM: at91: add at91sam9g20ek boards dt support") Signed-off-by: Michael Grzeschik --- v1 -> v2: - aligned pinctrl-0 entry to one line - added fixes tag v2 -> v3: - updated the fixes tag arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi index 60d61291f34445..024af2db638ebe 100644 --- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi +++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi @@ -39,6 +39,13 @@ pinctrl_pck0_as_mck: pck0_as_mck { }; + usb1 { + pinctrl_usb1_vbus_gpio: usb1_vbus_gpio { + atmel,pins = + ; /* PC5 GPIO */ + }; + }; + mmc0_slot1 { pinctrl_board_mmc0_slot1: mmc0_slot1-board { atmel,pins = @@ -84,6 +91,8 @@ macb0: ethernet@fffc4000 { }; usb1: gadget@fffa4000 { + pinctrl-0 = <&pinctrl_usb1_vbus_gpio>; + pinctrl-names = "default"; atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>; status = "okay"; };