Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5883719rwl; Wed, 22 Mar 2023 03:48:11 -0700 (PDT) X-Google-Smtp-Source: AK7set/LuHbAiGFinTavD+VZ35HXsteTQPvSAGMDAOidhB6m/QhtvaDmC7VviTOvz841rGxs7Ghh X-Received: by 2002:a05:6402:b8c:b0:4b6:821e:1859 with SMTP id cf12-20020a0564020b8c00b004b6821e1859mr1624671edb.7.1679482090928; Wed, 22 Mar 2023 03:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679482090; cv=none; d=google.com; s=arc-20160816; b=GubFIL7KQton83OhYLAcw/FC+Ox5vShMWlzs778X+FuG64HoV7BWrxucfihziPSjNg u6uoOBtZoWGk3QQzeIDhh/Sw0toze7m+VtLqU1qpMise0R3aA0/l6tG71OBSWXjH/8yN hFgkkE7FOtFjOyc9k0TjaVrSTE0I4WU54BaJ0LETDrSN6OLBPSrv9D20CHG0ZxAivfIn 1JGUElFYd/mHnIwUubAEPjL7i+DZlhY7wiRBYdCQIUI7ln3nARRV6LnqXmCvU3dTNL5p PPoCv5lOgpCNcEopTWSouq05sdwTXM/j6s0a5vUk4vgQLOboHE+GIEVw+tPWb+tMwxXI A7NQ== 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=UeXobhQuUxBtmxtIt+NUx9SmgW6HEJLWgDvEBE80KEQ=; b=0ZurV4eSoqCV6AJ8MBXReNBMzXAL1Cw2Pb9lgnxtT2/CABJB9CvOYLDXCyUkNwz0wv GvuOjjOu3p33G385sJ/EsfwBsSlZWlGOpiW4YugHjuU5b5eXuKKPWJgAai/d0cmnD6nw obVJfyQuUNXPVh02Q0uOY36WvIWJEQ4+xZA2IjnEpdrYkmKf5A67hldUdzK1XUPIpfUx u3iLgQQ+e9m+jtEcKGnxtzcjnveHmlyPU0kF/B1l6vWfxjvDZOvcgbrjbovdfvnlA4/f qZM9WslxxJRCFirarToLJSclWcbyo5Yff0vUhgUPyOAQLjFd4gs1NaglBMUohm3PIas/ Hzng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mM3opq8R; 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 dy20-20020a05640231f400b004fa760de417si16693570edb.122.2023.03.22.03.47.47; Wed, 22 Mar 2023 03:48:10 -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=mM3opq8R; 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 S230400AbjCVKpf (ORCPT + 99 others); Wed, 22 Mar 2023 06:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230357AbjCVKpa (ORCPT ); Wed, 22 Mar 2023 06:45:30 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23D6B61506; Wed, 22 Mar 2023 03:45:21 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32M6N8kZ012107; Wed, 22 Mar 2023 10:45:16 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=UeXobhQuUxBtmxtIt+NUx9SmgW6HEJLWgDvEBE80KEQ=; b=mM3opq8RDP3ZLzDTxKLuQnc76SzUaZ7TMnJAo/CBg4fIA/LN5ZsPtdruVtBXL9XNe/ar kSTFc+1V4o6KoURV4R6TCC26FuSVEx2SRSopKyA3Bso7sl3+RrCToZTdfdMLSHPn2j8v Zra0mV9Hy09fSAaDf/8YUlJ3y5cxvqQ34bPLeLSVZWeeeY3IDz7/axP3ExsNbH/phIUo 19p0U/n7RZaz7OOHcGwy5s25khNqyrlDiF0HcRRHlOGMUrTNMy3K8J71nIdmMAr9sbGs avWoxxe6CCWkZ4oVWJE1pshZpiWJJmEfUWC2plWYfyF4UAmwzZh58VGVuwiNtVXOukb1 mw== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pfhnv1v67-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 10:45:15 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 32MAjFte016348 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 10:45:15 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.41; Wed, 22 Mar 2023 03:45:09 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH v3 4/8] clk: qcom: gcc-ipq9574: Add USB related clocks Date: Wed, 22 Mar 2023 16:14:08 +0530 Message-ID: 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: w844ZuokQSe0QBCIaP6kk1y_1Gxa_TRh X-Proofpoint-ORIG-GUID: w844ZuokQSe0QBCIaP6kk1y_1Gxa_TRh 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-22_07,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220077 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 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