From patchwork Wed Mar 8 14:39:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 1754170 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=0ke8ClF3; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PWw3F1qZrz1yWx for ; Thu, 9 Mar 2023 01:40:34 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EC50385CF4; Wed, 8 Mar 2023 15:40:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="0ke8ClF3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5B0E285D4E; Wed, 8 Mar 2023 15:40:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E13F085AB0 for ; Wed, 8 Mar 2023 15:40:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Claudiu.Beznea@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1678286412; x=1709822412; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fONbwDKwLvwA6NM+u4hzcwFpmrW0POZHt58xgDe84Qc=; b=0ke8ClF3r8UMwzRAgUiWLaPzXrTeGxN046ryD2cJF/PJDzgEDPw+xubB VG69sGf/Attt7Q8GnoYcEy0j+ZnOumIHHZQDXuJ2MgogPorgwRLcpoal0 2zOsOYksF56hMv+cT/7gQd8A4vByGeO1yRvYlseX8CYuauRSA3Hb5d67S pOBPqjKHN/V9+1WlEvhSwoqI10VCwjwQSWMUQ8rJq7QbWRQyNbY+7ZTqo vnfpXDq+U7wIsEFj7YAbOLAMImMl8aOwCb/eJJXGBYlDquI1WSmlP5WZo kWHZCX0kc7eMWHIzQrbOdqXJddndvTIQdVRxPmjC/m/JKKLkeUWPgRfO2 w==; X-IronPort-AV: E=Sophos;i="5.98,244,1673938800"; d="scan'208";a="140956311" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 Mar 2023 07:40:07 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 8 Mar 2023 07:40:07 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 8 Mar 2023 07:40:05 -0700 From: Claudiu Beznea To: , , , , CC: , Claudiu Beznea Subject: [PATCH v2 0/5] Support the required clocks to enable USB on SAM9X60 Date: Wed, 8 Mar 2023 16:39:49 +0200 Message-ID: <20230308143954.1580743-1-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This patch series originates from a bigger patch series: https://lists.denx.de/pipermail/u-boot/2022-December/502865.html A driver for clock operations on SAM9X60's USB clock has been added as well as its registration on CCF. In order for USB to work properly, the UPLL and USBCK need an initial frequency before probing the OHCI/EHCI driver. Furthermore enable this driver in the defconfigs. Changes in v2: - fix build error for sam9x60_curiosity_mmc1_defconfig - took over the upstream process from Sergiu Claudiu Beznea (1): clk: at91: pmc: export clock setup to pmc Sergiu Moga (4): clk: at91: Add support for sam9x60 USB clock clk: at91: sam9x60: Register the required clocks for USB clk: at91: sam9x60: Add initial setup of UPLL and USBCK rates configs: at91: sam9x60: Add required configs for the USB clock configs/sam9x60_curiosity_mmc1_defconfig | 1 + configs/sam9x60_curiosity_mmc_defconfig | 1 + configs/sam9x60ek_mmc_defconfig | 1 + configs/sam9x60ek_nandflash_defconfig | 1 + configs/sam9x60ek_qspiflash_defconfig | 1 + drivers/clk/at91/Kconfig | 7 + drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-sam9x60-usb.c | 157 +++++++++++++++++++++++ drivers/clk/at91/pmc.c | 42 ++++++ drivers/clk/at91/pmc.h | 27 ++++ drivers/clk/at91/sam9x60.c | 63 +++++++++ drivers/clk/at91/sama7g5.c | 48 +------ 12 files changed, 308 insertions(+), 42 deletions(-) create mode 100644 drivers/clk/at91/clk-sam9x60-usb.c