Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp472076rwd; Thu, 8 Jun 2023 03:30:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ74SyAox7Iu1/CCCrvYGC+Dq75vLvnKaSpO5+VG5aVg3xJF9h6ZVZ0Tvqow1vGhSRO8PTNP X-Received: by 2002:a92:c090:0:b0:33c:1c4:7fe with SMTP id h16-20020a92c090000000b0033c01c407femr8105500ile.3.1686220215543; Thu, 08 Jun 2023 03:30:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686220215; cv=none; d=google.com; s=arc-20160816; b=a9Ruq4rFQN95x+MBgSbO40YEyUQs1tCghq9nSXIL7EK4JJtcT53rQWQhQFkQ0Veev8 v8rpKXtVjTdEBkQshOpY4S6HNrOlUuLQnV8MqVXMs2io8ToEy3Lqj21/f3xVX50Zi1VA +akMx3DyLXky1mkpeAb3tpF0YMxAwdOTWQFnood/h2pxEMn8wdezwyYZpy7AgWJqK96A ONLVoLrf/GSmYulm7MR48qELyE0dUyqAmQlEgjeTnrZTOSww+9UQy6sT0Y/yubAslpem kJiWjfAlTyAFZYN89zDf0k3EnP75sYE2NKktFb0W1B7QZytxAlqvQMbkPSYO6/r+DFNz Suog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=9igNQMqScQzwAM38rX+zFe4504VutBol9OU+mBF+LP4=; b=igjcOd8Rm9UuwtE+7g5fbOHbUR5SwzaE2w9r/krj7xoJzMxytAF1lau/Q8KZC8CtDc TspNgBl9eCABEj+iycV3AzAU+58nN9RszbD/2j1O77FGG7VJul6FMck0hKS7tuXWamJA /Er1dOBHSrxt0+3am4Fvg9A+Irz6g+oSDFgMGjWI5Z0AzMwEImqr7JMVGgzLEPqr3O8n 1pNf5SqSkf0r+Q2DnLI5Op6tlYoMEl1A3Sar+6YgJ3p9yInTp+pssNVeZ2rvg8gBPiCk OYrQDZ1WvpNxi3T8REOlVI62Gpds6nyI1CstvMVdtXxQi1C7WARJaAfs3i5mxmPeMDNL Vg8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=bG94RuRT; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q12-20020a63750c000000b00508eeafc9ecsi830348pgc.176.2023.06.08.03.30.03; Thu, 08 Jun 2023 03:30:15 -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=qcppdkim1 header.b=bG94RuRT; 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 S235439AbjFHKE2 (ORCPT + 99 others); Thu, 8 Jun 2023 06:04:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235736AbjFHKEW (ORCPT ); Thu, 8 Jun 2023 06:04:22 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C20372D4F; Thu, 8 Jun 2023 03:04:12 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3589CMhc003707; Thu, 8 Jun 2023 10:04:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=9igNQMqScQzwAM38rX+zFe4504VutBol9OU+mBF+LP4=; b=bG94RuRTmCgEEIAiwTPk6DhUo6xN1UFGUFZzZczEGyRiUCxGNvkfYFgv5jOVoAgAfNfy aumRiqsmEm/pFu39ohEd6MyXZ5v1+mEqfIBiPBAaaQVRFZlUPu1fIeWnaKtbLNVMc8ot hGdmWwIn3kU2NAVJmsYxVTYtV9mxcDe612Cry7DC9V65jkDMldgJ0Mat98JSYLp1mUuN nw7caXk+Kb808QrGkHrQPAMVfRYccAfZ5A/iYD5bkP1E9MBgCM9s+VYrxW2dcxW4LzAQ hEzVSSXWce/no1pM47JAplyogH+TdA3UsilyYH1hRcDIkLRlvTWMtGyFG+HAOzYaCI9c jw== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3r39ku8djk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jun 2023 10:04:08 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 358A47Ga018776 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 8 Jun 2023 10:04:07 GMT Received: from varda-linux.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Thu, 8 Jun 2023 03:04:02 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH v14 2/5] clk: qcom: gcc-ipq9574: Add USB related clocks Date: Thu, 8 Jun 2023 15:33:28 +0530 Message-ID: <36637d4651c962506031fec1c84069951f77ccc2.1686217906.git.quic_varada@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: O9riWZTr67pVHgVSnYWdwqm4Ax_3_qKY X-Proofpoint-ORIG-GUID: O9riWZTr67pVHgVSnYWdwqm4Ax_3_qKY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-08_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 phishscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306080085 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Add the clocks needed for enabling USB in IPQ9574 Reviewed-by: Dmitry Baryshkov Acked-by: Stephen Boyd Signed-off-by: Varadarajan Narayanan --- Changes in v12: - Rebase qcom,ipq9574-gcc.h Changes in v10: - Add 'const' for .hw.init = &(struct clk_init_data) Changes in v2: - Fixed coding style issues --- drivers/clk/qcom/gcc-ipq9574.c | 37 ++++++++++++++++++++++++++++ include/dt-bindings/clock/qcom,ipq9574-gcc.h | 2 ++ 2 files changed, 39 insertions(+) diff --git a/drivers/clk/qcom/gcc-ipq9574.c b/drivers/clk/qcom/gcc-ipq9574.c index 7b0505f..8e1a3ff 100644 --- a/drivers/clk/qcom/gcc-ipq9574.c +++ b/drivers/clk/qcom/gcc-ipq9574.c @@ -1969,6 +1969,41 @@ static struct clk_regmap_mux usb0_pipe_clk_src = { }, }; +static struct clk_branch gcc_usb0_pipe_clk = { + .halt_reg = 0x2c054, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x2c054, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data){ + .name = "gcc_usb0_pipe_clk", + .parent_hws = (const struct clk_hw *[]) { + &usb0_pipe_clk_src.clkr.hw + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb0_sleep_clk = { + .halt_reg = 0x2c058, + .clkr = { + .enable_reg = 0x2c058, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data){ + .name = "gcc_usb0_sleep_clk", + .parent_hws = (const struct clk_hw *[]) { + &gcc_sleep_clk_src.clkr.hw + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + static const struct freq_tbl ftbl_sdcc_apps_clk_src[] = { F(144000, P_XO, 16, 12, 125), F(400000, P_XO, 12, 1, 5), @@ -3932,6 +3967,8 @@ static struct clk_regmap *gcc_ipq9574_clks[] = { [GCC_USB0_MOCK_UTMI_CLK] = &gcc_usb0_mock_utmi_clk.clkr, [USB0_PIPE_CLK_SRC] = &usb0_pipe_clk_src.clkr, [GCC_USB0_PHY_CFG_AHB_CLK] = &gcc_usb0_phy_cfg_ahb_clk.clkr, + [GCC_USB0_PIPE_CLK] = &gcc_usb0_pipe_clk.clkr, + [GCC_USB0_SLEEP_CLK] = &gcc_usb0_sleep_clk.clkr, [SDCC1_APPS_CLK_SRC] = &sdcc1_apps_clk_src.clkr, [GCC_SDCC1_APPS_CLK] = &gcc_sdcc1_apps_clk.clkr, [SDCC1_ICE_CORE_CLK_SRC] = &sdcc1_ice_core_clk_src.clkr, diff --git a/include/dt-bindings/clock/qcom,ipq9574-gcc.h b/include/dt-bindings/clock/qcom,ipq9574-gcc.h index 5a2961b..c7c914c 100644 --- a/include/dt-bindings/clock/qcom,ipq9574-gcc.h +++ b/include/dt-bindings/clock/qcom,ipq9574-gcc.h @@ -210,4 +210,6 @@ #define GCC_SNOC_PCIE1_1LANE_S_CLK 201 #define GCC_SNOC_PCIE2_2LANE_S_CLK 202 #define GCC_SNOC_PCIE3_2LANE_S_CLK 203 +#define GCC_USB0_PIPE_CLK 204 +#define GCC_USB0_SLEEP_CLK 205 #endif -- 2.7.4