From patchwork Fri Oct 14 22:10:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melody Olvera X-Patchwork-Id: 2878 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp397829wrs; Fri, 14 Oct 2022 15:13:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6obEoBXC5Muptk+MXyEfaOP8gIxDm7jlVu8gbZK1xLLH6cXqsP0Yum3uxryhsiRcb8P1tf X-Received: by 2002:a17:906:478e:b0:78e:4b5:a547 with SMTP id cw14-20020a170906478e00b0078e04b5a547mr66415ejc.81.1665785631785; Fri, 14 Oct 2022 15:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665785631; cv=none; d=google.com; s=arc-20160816; b=ba0wSnUHxGeJRzdntqyk9Rh+LQxovV1JoqkkqZ6vT3S2C+U7isA9PVpGOp3HC9cs0F ptqWjhlMw64IRlqqKwt+gkE2Xpn9dAsxQnqiAh2/YRa7kT7fCwqhwznZo2e3C/elvuL7 /biLUt2xuhnTZkCTZxTZHiPV8LCUtPFI6cidxWnhFxYETs20J9q/wmj7vunxFdpMQ7Nt TLaItJKfxxxsJyrGmmhV1RaKb5Gh04w7KEYeyj6eZiNZrteRZUy/T9K39XRCE019yxrQ 3YFNkBSsLDHPcYlGGlQVTRQ9+9ApVMqxjft3K4lQQirUggo94l2Y+rp3mOqSPIwbUdrg xFMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5uEw+FAfIDFTLWEQeabrCakWjStHt/ejpYxitVzALbU=; b=RwWoVjhoQfZv/UImbHMW5OtqY20Fbub9tkx8ydmc+Mvy2CTSuBABncxLPDE9E+bl0a lUyaS9g0R1FmH7SvqmnEo2M69RfBz1rL3SDYIpUa8RwY0wg9ASdQZE4hc/3asiZs3kNZ tbe2eoC9Oq/tuLH5MPq+WyGHp/fT/9+D7rv0yvFy4+TFUIZ5O9rj5wbJ+VrreyEUcGXT GuwLc3FftzqMAlSM/fTRycgpEad/GQiXX6q7h1I/GoehYI82vL0INZ17RzWRGmupLRJy KKIu1gHcDF+iW2dqDcpC/Zwcb83XzHFwSabpedT/8XUGHLf4qPgdyvSe148beGjR69oq 0kvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=iIgJvk79; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a50eb0b000000b0045b50cee511si2941201edp.122.2022.10.14.15.13.24; Fri, 14 Oct 2022 15:13:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=iIgJvk79; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229454AbiJNWK7 (ORCPT + 99 others); Fri, 14 Oct 2022 18:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbiJNWKo (ORCPT ); Fri, 14 Oct 2022 18:10:44 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AF21FAE67; Fri, 14 Oct 2022 15:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1665785443; x=1697321443; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5uEw+FAfIDFTLWEQeabrCakWjStHt/ejpYxitVzALbU=; b=iIgJvk79zG9G6LqEw2bv1pHmTGqQzwGXRnslHJ1Ds+2oBydBjy9xFTE2 J44/xflIiE3x+LYBaIRUfdrYIgaVDi1vJtEvglIonEUGFH1G0DG3ebbQ+ FKRrCVEIAS2k7dnrCHHgqL2RHRJTw0XOyT8Z5IM4Ho10z1rIB9ILbRvdw k=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-01.qualcomm.com with ESMTP; 14 Oct 2022 15:10:38 -0700 X-QCInternal: smtphost Received: from nasanex01b.na.qualcomm.com ([10.46.141.250]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2022 15:10:37 -0700 Received: from hu-molvera-sd.qualcomm.com (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Fri, 14 Oct 2022 15:10:24 -0700 From: Melody Olvera To: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Thomas Gleixner , Marc Zyngier CC: , , , , Melody Olvera Subject: [PATCH v2 5/6] clk: qcom: Add support for QDU1000 and QRU1000 RPMh clocks Date: Fri, 14 Oct 2022 15:10:10 -0700 Message-ID: <20221014221011.7360-6-quic_molvera@quicinc.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221014221011.7360-1-quic_molvera@quicinc.com> References: <20221014221011.7360-1-quic_molvera@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01b.na.qualcomm.com (10.46.141.250) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746702834653004478?= X-GMAIL-MSGID: =?utf-8?q?1746702834653004478?= Add support for RMPh clocks for QDU1000 and QRU1000 SoCs. Signed-off-by: Melody Olvera --- drivers/clk/qcom/clk-rpmh.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index 0471bab82464..d4f8b0d1a91a 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -644,6 +644,18 @@ static const struct clk_rpmh_desc clk_rpmh_sdx65 = { .num_clks = ARRAY_SIZE(sdx65_rpmh_clocks), }; +DEFINE_CLK_RPMH_ARC(qdu1000, bi_tcxo, bi_tcxo_ao, "xo.lvl", 0x3, 1); + +static struct clk_hw *qdu1000_rpmh_clocks[] = { + [RPMH_CXO_CLK] = &qdu1000_bi_tcxo.hw, + [RPMH_CXO_CLK_A] = &qdu1000_bi_tcxo_ao.hw, +}; + +static const struct clk_rpmh_desc clk_rpmh_qdu1000 = { + .clks = qdu1000_rpmh_clocks, + .num_clks = ARRAY_SIZE(qdu1000_rpmh_clocks), +}; + static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec, void *data) { @@ -727,6 +739,8 @@ static int clk_rpmh_probe(struct platform_device *pdev) } static const struct of_device_id clk_rpmh_match_table[] = { + { .compatible = "qcom,qdu1000-rpmh-clk", .data = &clk_rpmh_qdu1000}, + { .compatible = "qcom,qru1000-rpmh-clk", .data = &clk_rpmh_qdu1000}, { .compatible = "qcom,sc7180-rpmh-clk", .data = &clk_rpmh_sc7180}, { .compatible = "qcom,sc8180x-rpmh-clk", .data = &clk_rpmh_sc8180x}, { .compatible = "qcom,sc8280xp-rpmh-clk", .data = &clk_rpmh_sc8280xp},