Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2441907rwr; Fri, 21 Apr 2023 08:58:19 -0700 (PDT) X-Google-Smtp-Source: AKy350ZUH/L06/nRRW6DQQVzxWcxu+NRFHAMExP8GA2MldZyZ15EeZ2KDgAd1SF1Ys01+lJ5EiYA X-Received: by 2002:a05:6a20:7fa5:b0:f0:714c:e76a with SMTP id d37-20020a056a207fa500b000f0714ce76amr7529466pzj.4.1682092699333; Fri, 21 Apr 2023 08:58:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682092699; cv=none; d=google.com; s=arc-20160816; b=zByLfTav4P8NFNh0N2zbz3CISVzCnpIb8jyZBd51PRlEteiG8LcFN4K/Lf49ycLYmy rQj63EKxcnvk24fr11bk65hTOdwtAaJ+oL9OA89RKqv1hHCIKw+Ea+piaID99HTH3OtF gKSfXQdtOZroyToaLk5rCd4f610qc9vre9TEhhJmuW5+4f5H8bQOErb5Jk5J6+TPmQbF EjANi6/y+eqWleJF5cX5PUbhkeyez2cxGTo5v3vS+L69ENY05qP0EuLIGMc9l7FS9gK+ UKadG1Z3qJvEUi4K7OqKtr8iCDNgoAi0B4AgFHz/0VYjUDRYfegNl5HNsAGuYcUL1wbc ymTQ== 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=CPaC23DdXocpLVNKLqfw5exhbrDxzLWE7KvOdyEvEDQ=; b=fLbKkGksA6T5s9EutB0yo2RmP++oVUqygcuhBmJydFe6QBguoZGCZzC7NVcO/hHtrZ lADCBRRkz/3HzxNbylPjAku9Ea0Dfd+kRhINmk4rl5O2gKKOlNooZF+21EJsYPSlV4v2 dtkkhASbxykbJW24QZOre01tJF1JEDd7QX9tEeD5IxDAJ/uTbjW1DmhLXcLXqCP/dxZR 42dtlzsdqSqWK40AdXR2ocWLt9m3p1gXHaEsOzbiym7MgNzi9g6+opZkpHwQ/YAE+iV0 w2hBpKqDP7L490ZCLwHyR8ucJHb74bA/XVesFdHAM4TybPFCEtqnlSaxQ3049EQ0gza+ 0raw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=H4TOGIAG; 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 t71-20020a63814a000000b0052071ea405dsi2264836pgd.32.2023.04.21.08.58.08; Fri, 21 Apr 2023 08:58:19 -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=H4TOGIAG; 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 S232883AbjDUP5m (ORCPT + 99 others); Fri, 21 Apr 2023 11:57:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232849AbjDUP5g (ORCPT ); Fri, 21 Apr 2023 11:57:36 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6045D125B2; Fri, 21 Apr 2023 08:57:26 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33LE2EUW002895; Fri, 21 Apr 2023 15:57:18 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=CPaC23DdXocpLVNKLqfw5exhbrDxzLWE7KvOdyEvEDQ=; b=H4TOGIAGocVa0VVQ7lDfHyji4BPCGC5b+2ex6YnCSe3VNL4IXIzNlbd+D9aTRaHojkBs bi1YfmkXFy9fFdwx3tcZOWdbl2dd1xKC+IKHz79Xu3Cjpw7GHudRj/3cnWlPkQwze/pM 5ppnheFgK9F4rSfECaebVakfN9xZtq3TEsg4sDKo/ZDWNNdVuZFHBK7nETP4fvkN1aSy C8/bY07McFN+5w9NTPpmQj9mkgSxqmyNbbFRraUba42ZeEqOvcz3KnN3DK4ec3dAwbdw FZaajz6yDKxMJ0tvho45ZpQkGUOzNqXUAStioQh1VdEdqD/VHLl5m6ipjn+tzVTBcUVr XA== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3q37qftujx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 15:57:18 +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 33LFvH2F022420 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 15:57:17 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, 21 Apr 2023 08:57:11 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH v9 4/8] clk: qcom: gcc-ipq9574: Add USB related clocks Date: Fri, 21 Apr 2023 21:24:46 +0530 Message-ID: <1c6fe00696f808e889ce72571b8ed8e7fa20f661.1682092324.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-GUID: BBMOwtYu0y0AqVqFFGYwfmrrng2z7nNN X-Proofpoint-ORIG-GUID: BBMOwtYu0y0AqVqFFGYwfmrrng2z7nNN 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-04-21_08,2023-04-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 spamscore=0 clxscore=1015 phishscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304210140 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 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..8d7f543 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 = &(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), @@ -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