Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1815210rwl; Thu, 30 Mar 2023 01:44:54 -0700 (PDT) X-Google-Smtp-Source: AKy350bt4GlqYvHFu3/2mfS8lfh2rhzpkLWJXefsIW88G9FnzMiDsKSPAGHIyWBygEPDWTYFSVBb X-Received: by 2002:a17:906:74ca:b0:932:efa8:28fa with SMTP id z10-20020a17090674ca00b00932efa828famr20156145ejl.2.1680165894215; Thu, 30 Mar 2023 01:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680165894; cv=none; d=google.com; s=arc-20160816; b=RJRH3S1209hEplDTCc5ahQ03fo3h4tB3RFGGxWZB3X1KNRP5/wPuOvHXaP06/R448z 1eBmIXwQgaf3IjOOUtbRWK1kYllEMUaKTFuyq5p7dmGXwhCbZfdkKaPpEb3KuM8LatmN +NdOET70oCSUI+SRX/beDaUIAI51Sy9owLFPQWcdyjD6KgDGUjUstRb1F4MQhH5PIu4D loVf0gTvDOm56VMFbwWd8tv3f8wIfnFj1wBa3d7ilvEn0iFb8inUpOM/hcVF+5HIZmoD PmYzwbjErcLt2BpTsKD6IZnpis73VrvG7UjrxYl/kR+xyOpCrpwRHl/vhzuBerGqWhL6 Y0yQ== 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=NamAeNPplxwq6w9Jmy4Y5hQCgNKEtDIZ5CuLKlhkppg=; b=1CgS1DC2gmxJ/vc1k92tXzNJrMVQD1idZ9Hl4AHvjnxUpq3nRxFPj6XERZeSLUiPK+ nPph89KlY42Upt8clEaqdqOKSqIxPdad6dAnc8NiqeRpwWLX5Cef0UoUdbWX7j4SzrCH tRKupbw859+d7+QmVpd6eazFZnht08NlY+Ffi5eorsQE4vDUNPgrR1syRnbm73Q24ibH wqFAftKv3gFlpYzcEkFvZsXGI5dnnvUK6L8Lr8OyvPLuRRGHphDzwPtay0E5d0ysYP0p 8wqZFnLl/aalpHnXdSgNhhLsNE4WYWsAZ6kAM7EREHmCQ39rRkXV+deU25IxYWakBxR4 0OkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=gWXLTbfY; 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 qk36-20020a1709077fa400b00931bb737922si1083377ejc.222.2023.03.30.01.44.28; Thu, 30 Mar 2023 01:44:54 -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=gWXLTbfY; 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 S230019AbjC3Im2 (ORCPT + 99 others); Thu, 30 Mar 2023 04:42:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbjC3ImH (ORCPT ); Thu, 30 Mar 2023 04:42:07 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 805E57ABD; Thu, 30 Mar 2023 01:41:41 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32U6J0Kf015054; Thu, 30 Mar 2023 08:41:27 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=NamAeNPplxwq6w9Jmy4Y5hQCgNKEtDIZ5CuLKlhkppg=; b=gWXLTbfY4UaD9c4fajexqT3o1lnlACnApR4YKDmNpAWL3By9YAe6/AhGYRR/ypqNBU8u 952UcgB/7s0ZErJlW3jS9fbEWMVBIuB753x3ySjGdiKcwpFnGhNub49eJNFz3s/tzJas erOLcL2fPCBqG6Fld4G3ppI9vhVqgC3OG0AnMs2IErOP0pKkJsQ3QJfcK7S0CIwUEZ9u WeN7eDfG5C7Icr1eOMGj5BD6BjikzgGFR6jenw9I8bfkc9bSoba3v6opILageGqbiE4h VYp/vr+E/lryQtE/SK4M/sTauxQroBwdJc1AL9YwmqIrR/PHoHW5dEsHtbJGkrGHoedk wg== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pn51ygcrd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Mar 2023 08:41:27 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 32U8fQqd019947 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Mar 2023 08:41:26 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, 30 Mar 2023 01:41:20 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH v5 4/8] clk: qcom: gcc-ipq9574: Add USB related clocks Date: Thu, 30 Mar 2023 14:10:46 +0530 Message-ID: <2cbfb513f6cf3f17124b02ff10c625508c6038a0.1680162377.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: nasanex01a.na.qualcomm.com (10.52.223.231) 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: EuTGxf3GbWr629N8CQBNC98F3FnYoDxq X-Proofpoint-GUID: EuTGxf3GbWr629N8CQBNC98F3FnYoDxq 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-03-30_04,2023-03-30_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 impostorscore=0 malwarescore=0 adultscore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2303300069 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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 1bf33d5..06b724a 100644 --- a/drivers/clk/qcom/gcc-ipq9574.c +++ b/drivers/clk/qcom/gcc-ipq9574.c @@ -2041,6 +2041,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 = &(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 = &(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), @@ -4008,6 +4043,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 14543a4..97a7b19 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_SNOC_PCIE1_1LANE_S_CLK 205 #define GCC_SNOC_PCIE2_2LANE_S_CLK 206 #define GCC_SNOC_PCIE3_2LANE_S_CLK 207 +#define GCC_USB0_PIPE_CLK 208 +#define GCC_USB0_SLEEP_CLK 209 #endif -- 2.7.4