Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp571058rwr; Fri, 5 May 2023 01:24:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xSfrEkfxDIl2zaHtKeuxZWMrmSszKELrS3fmPxVhZynAqkxvYMpiIVOFcH8Mdv+ryExwf X-Received: by 2002:a17:902:7d89:b0:1aa:dba7:4bce with SMTP id a9-20020a1709027d8900b001aadba74bcemr617646plm.49.1683275044569; Fri, 05 May 2023 01:24:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683275044; cv=none; d=google.com; s=arc-20160816; b=rSC0YI5augJjc2c2IuRds3/qQmsZyxxYbls+6I/+mJt4mTIJT3Uu8UzsU0h6BQ6pZo 9c+eibWCF2s99CMPTVM5gh2s/iHcKiAPpkOgSH48KMDZfhKQxkCWimzticELI35nTAqQ ae8a/ZAD2NzjywV7aYtuMeDsuHn9BkNcA9HHrng8JNRaQBKX1zh4Y6evybLZYK3r3KJA ZqEgjll2jhIPUmcyS2d4hDLU66XLiKNpXnrjfzNSmkWxvIXCdcPzYy05tM8h3M5c8TXR tzoQKgMbk17jUNWNgeeAPGqFYBruqKio5HO+HVMC3pz1XNXc/90CRhMwh9pKm3p68rCp hNsA== 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=vyHanTrb/fz5QAoFyBdo8NGYqRIsGmqYo22uks86PbA=; b=apTjcP9+nU5324qe7T6w17u7x9XTpt440ydHhIx6LaxZaP6hXIo324PqZ9HOJ+H7vk 4QJ0ql5JSCXwoeHgYZDJtMTIiK8ZVvThfRs0PS7kcU3BCGRR9OHczMIK1+zfMK5d0tOm qWQa/xXjJEP19qjIvXGl08NDO1LBDZm9FWLcEIYJfjxiah5Wsh/hxG+Dy8qCOjLmGe+m aVeoMfnfJ7mcfIgWMDkFm3PB4qzUQJvvAeh1/VpZ5bZXCXYeJXI0omb05TI1/7FRNTy/ IPczadcGkr4uzRQiQbN6genNKq4uHcF55iAxmHB8A3YEvAAfuL3G6rJ3lhKYThlEMl+y B5GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=OTzLSqmd; 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 3-20020a170902c20300b001a6a3954e0fsi1239720pll.18.2023.05.05.01.23.49; Fri, 05 May 2023 01:24:04 -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=OTzLSqmd; 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 S231310AbjEEIXB (ORCPT + 99 others); Fri, 5 May 2023 04:23:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231237AbjEEIWm (ORCPT ); Fri, 5 May 2023 04:22:42 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF8721893E; Fri, 5 May 2023 01:22:33 -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 3457OL5f009604; Fri, 5 May 2023 08:22:28 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=vyHanTrb/fz5QAoFyBdo8NGYqRIsGmqYo22uks86PbA=; b=OTzLSqmdUquUtW++xVX8V/pK6O6AIG2O8pihpEoETUm3gLBzJT9W/Wppn6vSmYJ8J08S DsVMLZZZpZHXLEGxGYLjntohFpJBMjuoRLcpf3+D94MIYtOKNJ8K6p/B1+hPJNULxyC7 THDW5GSMg4TreuERqwfy0sSmRioO7C/Olh9wD1NcowxzuUBXFTqXGSD5d1lIJcCeVeHH lIDsFLpWydcFIBcMk4+Vf9a8hXEiWmbfTMfTC02GkF6iNjzxAeWJje4cUk6R+Km3xY8p 8d3Cf5euE+85m4+Bs5S32KIS8Ecap7BRN+EdPM1gGXzmbdARyp/1jAxL50GctlQHzNbo ig== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qcmm391fm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 May 2023 08:22:28 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3458MRcO024030 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 May 2023 08:22:27 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; Fri, 5 May 2023 01:22:22 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH v10 4/9] clk: qcom: gcc-ipq9574: Add USB related clocks Date: Fri, 5 May 2023 13:05:05 +0530 Message-ID: <5125b0675a5b636a4d914b279c078f0791da7858.1683183860.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-ORIG-GUID: ARaj6W52r1TZchi4UjvHPBFkdJBtkdXg X-Proofpoint-GUID: ARaj6W52r1TZchi4UjvHPBFkdJBtkdXg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-04_15,2023-05-04_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 mlxscore=0 priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0 suspectscore=0 phishscore=0 clxscore=1015 bulkscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2305050069 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 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 a4cf750..6869e8e 100644 --- a/drivers/clk/qcom/gcc-ipq9574.c +++ b/drivers/clk/qcom/gcc-ipq9574.c @@ -2025,6 +2025,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), @@ -3985,6 +4020,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 2d7b460..2cb02f7 100644 --- a/include/dt-bindings/clock/qcom,ipq9574-gcc.h +++ b/include/dt-bindings/clock/qcom,ipq9574-gcc.h @@ -214,4 +214,6 @@ #define GCC_PCIE1_PIPE_CLK 205 #define GCC_PCIE2_PIPE_CLK 206 #define GCC_PCIE3_PIPE_CLK 207 +#define GCC_USB0_PIPE_CLK 208 +#define GCC_USB0_SLEEP_CLK 209 #endif -- 2.7.4