From patchwork Mon May 6 10:26:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Day X-Patchwork-Id: 1931886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=samcday.com header.i=@samcday.com header.a=rsa-sha256 header.s=protonmail2 header.b=UCHls3gz; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VXyJS0j0Xz1ydW for ; Mon, 6 May 2024 20:27:04 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D720488025; Mon, 6 May 2024 12:27:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=samcday.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; secure) header.d=samcday.com header.i=@samcday.com header.b="UCHls3gz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0B8AA881F1; Mon, 6 May 2024 12:27:00 +0200 (CEST) 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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7B69B88052 for ; Mon, 6 May 2024 12:26:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=samcday.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=me@samcday.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samcday.com; s=protonmail2; t=1714991216; x=1715250416; bh=umXfqnqnS3kzIMg+mM5CkZFqWeQQjtP2tzfdYMNSbfc=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=UCHls3gzrwddocsKHIKnfLlA9aNhiBDo3AWQUvpMQ9I8IaZbFz9L5kH827zdAF8d8 9IoLrFddIPkJ01IB0M9g89ZT14IIXyKzceEJGBY14FON7+v0sm0rVFLIm1LqYmqzAD As7UENoC2Lk2vMUx/s/OQKoCtSjAjjKAMp2OPybiZIyCvCCaYvifa4F27BSmOnEU9K Gk5MLnTObgvR/0xW0Q9ISnkBoJDyeFreJ7qxebC5M9m2IZmG5my06oQNu+HRgOAXZc pPupfOzAHU26juSFByYyzk3U2SF27UZsEGEzIyd6ZaYR+SlHvQOEq5My60HVqywNm4 +kGPm98dJ7wRw== Date: Mon, 06 May 2024 10:26:51 +0000 To: Lukasz Majewski , Sean Anderson , Neil Armstrong , Sumit Garg , Tom Rini , Marek Vasut From: Sam Day Cc: Caleb Connolly , u-boot-qcom@groups.io, u-boot@lists.denx.de, Sam Day Subject: [PATCH v2 0/2] qcom: ehci: enable core + iface clocks Message-ID: <20240506-msm8916-hs-usb-clocks-v2-0-34f741b3a2ec@samcday.com> Feedback-ID: 25366008:user:proton X-Pm-Message-ID: 5d18b8f13c0c2383e3379057c7b20ffefb242723 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 These clocks are mandatory, as can be seen in msm_hsusb driver in the Linux kernel. The appropriate HS_USB AHB/SYSTEM clocks were added to gcc_apq8016. Technically there's other adjacent SoC families that can use the msm_hsusb driver with different clocks, but only msm8916/apq8016 are currently making use of it so I think this change shouldn't break anything elsewhere. Signed-off-by: Sam Day --- Changes in v2: - Remove nonsensical/unnecessary reference to pending qcom debug dump from commit message. - Collapse ftbl_gcc_usb_hs_system_clk into apq8016_clk_set_rate, since it's only 1 entry. - Add bounds check on clock id in apq8016_clk_enable - Add warn if a rate other than 80mhz is requested for GCC_USB_HS_SYSTEM_CLK - Caleb: I opted to keep the non-bulk clock enablement code as-is in ehci_msm, since that more closely resembles the existing Linux kernel code. - Link to v1: https://lore.kernel.org/r/20240502-msm8916-hs-usb-clocks-v1-0-eeccf483b68d@samcday.com --- Sam Day (2): clk/qcom: apq8016: add support for USB_HS clocks ehci: msm: bring up iface + core clocks drivers/clk/qcom/clock-apq8016.c | 32 ++++++++++++++++++++++++++++++++ drivers/usb/host/ehci-msm.c | 37 +++++++++++++++++++++++++++++++++++-- 2 files changed, 67 insertions(+), 2 deletions(-) --- base-commit: 2f1e76bcfee75b9f99ade63002c05ffaaec86afb change-id: 20240502-msm8916-hs-usb-clocks-34bc22b03f3d Best regards,