Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp564634rwd; Wed, 7 Jun 2023 04:07:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60d31I9l5F6Goe+kAv1TQHeYjDj/5obtiyY5ZVLgJN7xgHIiB5F8fU8BUvOAySDG2LsADI X-Received: by 2002:a17:902:d2c4:b0:1ae:622c:e745 with SMTP id n4-20020a170902d2c400b001ae622ce745mr6268329plc.1.1686136044197; Wed, 07 Jun 2023 04:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686136044; cv=none; d=google.com; s=arc-20160816; b=Y2RJp4+2f+FZUtwnzdzrkL0tPrZdMedHx2tuWCtBeBXnEIbrBFzZurxwb99MoSmUG/ rjrqvd9xtLdpV3GlsofBtvc8TFwPh8n+zTZIDAdYcB10SqHsL+FzsZMjIFIOeGPEOEEI ysrrdSlmDqzrF5NRQGp3u/aD5ZsjQpHJTF+mapoI38Ivv8gnzQ94xmVE7DpTgOABfCts Gn1iK6sYW++x5G2U2RvJSXP2G/0vdFj6u/YbgMm2O2oEQmqW0FW01rWEzJeXyhO/iN2Q vL8nP4YG1yPnHjrxpg830/eCcvobgOIbcL8ToVtHi3NZZqlo1WOfzljr1IjlzD7ulNDY MpSg== 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=UM+Hot4o78/iHbAP5+OzXNzvYsZB6jnxy+maXjSOyOg=; b=sNSYsHh9lLu3+/d+xbg287+y8L3focVSKjcS/S9nBnjSHc32UIKUGPaqaeuiL5KOmC Sr8HxHlGy9sO0mOec3Ks5ZehbdpXBdwMX8ZCd5yj8mQYQGDykSxVZ9nmhYrXo6wAaIc8 N0ICq980wjxxnrijBENS3JNBGXWBJXSfW6Tt/B8FF0aEdB1JH5D1ArHnBWrK4sbeOg5E EUzh8xt3iJFygoQ3zA9AVjLPI+nt5oVXET7VrZxCVED1ZTOqJEqAUVu8HTLyCeHHGxml X9HVmM6JWfQrZCslCc3aN5C9ppghxfJkE4+LKFwTpII9bYZPHNP5bQA04IUA6yTTaV77 +91A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Tgrmlj3X; 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 t16-20020a170902e85000b001b1be1317a1si9021986plg.219.2023.06.07.04.07.09; Wed, 07 Jun 2023 04:07:24 -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=Tgrmlj3X; 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 S240018AbjFGLAZ (ORCPT + 99 others); Wed, 7 Jun 2023 07:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240453AbjFGLAH (ORCPT ); Wed, 7 Jun 2023 07:00:07 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B9441BF7; Wed, 7 Jun 2023 03:58:44 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3575Li4h019759; Wed, 7 Jun 2023 10:57:06 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=UM+Hot4o78/iHbAP5+OzXNzvYsZB6jnxy+maXjSOyOg=; b=Tgrmlj3XU7A/VxCSNtvh2bVnJw1CvvBLTh12leoL4olMAvcaECBrbVkzgyWpw6O52Tkj ej2qbNJ2UyH/321JsNNlU426r47cDscqdiaCEtiLX0jY7rNJtCCk3Y1bSszogw1EbeBv rpseyyHfDniv2lkJduMIuMlz19VWBFa1q9zXvTwDWm/fpMEnkeLJFpwxl0Xgd4Lv1ZWZ khY6VKI4DaCOUWM234wVDBM67gDr+v5pRuYkVgk8pd+Ha07Md8RC6Vljc8q0mgsYSgl8 a9VNmxXn1yg4vFEp7vJmlcPl5NYWenRLB82mHxmLzgQqW2UucRYdCEaNoanW6nCROFcb 8w== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3r2a719mc7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Jun 2023 10:57:05 +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 357Av5Ak023479 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 7 Jun 2023 10:57:05 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; Wed, 7 Jun 2023 03:56:56 -0700 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: Varadarajan Narayanan Subject: [PATCH 4/9] clk: qcom: ipq5332: Fix USB related clock defines Date: Wed, 7 Jun 2023 16:26:08 +0530 Message-ID: <3840e5b5795ef55ecbf25d0faa8c328f09c6d976.1686126439.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: Z2TsTwjIBn2S3qlWPRVHa0LxQyJiosUC X-Proofpoint-ORIG-GUID: Z2TsTwjIBn2S3qlWPRVHa0LxQyJiosUC 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-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 mlxlogscore=999 phishscore=0 suspectscore=0 priorityscore=1501 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070089 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,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 Fix the USB related clock defines and add details referenced by them Signed-off-by: Varadarajan Narayanan --- drivers/clk/qcom/gcc-ipq5332.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/drivers/clk/qcom/gcc-ipq5332.c b/drivers/clk/qcom/gcc-ipq5332.c index a75ab88..2b58558 100644 --- a/drivers/clk/qcom/gcc-ipq5332.c +++ b/drivers/clk/qcom/gcc-ipq5332.c @@ -351,6 +351,16 @@ static const struct freq_tbl ftbl_gcc_adss_pwm_clk_src[] = { { } }; +static const struct clk_parent_data gcc_usb3phy_0_cc_pipe_clk_xo[] = { + { .fw_name = "usb3phy_0_cc_pipe_clk" }, + { .fw_name = "xo" }, +}; + +static const struct parent_map gcc_usb3phy_0_cc_pipe_clk_xo_map[] = { + { P_USB3PHY_0_PIPE, 0 }, + { P_XO, 2 }, +}; + static struct clk_rcg2 gcc_adss_pwm_clk_src = { .cmd_rcgr = 0x1c004, .mnd_width = 0, @@ -1101,16 +1111,18 @@ static struct clk_rcg2 gcc_usb0_mock_utmi_clk_src = { }, }; -static struct clk_regmap_phy_mux gcc_usb0_pipe_clk_src = { +static struct clk_regmap_mux usb0_pipe_clk_src = { .reg = 0x2c074, + .shift = 8, + .width = 2, + .parent_map = gcc_usb3phy_0_cc_pipe_clk_xo_map, .clkr = { - .hw.init = &(struct clk_init_data) { - .name = "gcc_usb0_pipe_clk_src", - .parent_data = &(const struct clk_parent_data) { - .index = DT_USB_PCIE_WRAPPER_PIPE_CLK, - }, - .num_parents = 1, - .ops = &clk_regmap_phy_mux_ops, + .hw.init = &(const struct clk_init_data){ + .name = "usb0phy_0_cc_pipe_clk_src", + .parent_data = gcc_usb3phy_0_cc_pipe_clk_xo, + .num_parents = 2, + .ops = &clk_regmap_mux_closest_ops, + .flags = CLK_SET_RATE_PARENT, }, }, }; @@ -3041,8 +3053,8 @@ static struct clk_branch gcc_usb0_pipe_clk = { .enable_mask = BIT(0), .hw.init = &(const struct clk_init_data) { .name = "gcc_usb0_pipe_clk", - .parent_hws = (const struct clk_hw*[]) { - &gcc_usb0_pipe_clk_src.clkr.hw, + .parent_names = (const char *[]){ + "usb0_pipe_clk_src" }, .num_parents = 1, .flags = CLK_SET_RATE_PARENT, @@ -3580,7 +3592,7 @@ static struct clk_regmap *gcc_ipq5332_clocks[] = { [GCC_PCIE3X2_PIPE_CLK_SRC] = &gcc_pcie3x2_pipe_clk_src.clkr, [GCC_PCIE3X1_0_PIPE_CLK_SRC] = &gcc_pcie3x1_0_pipe_clk_src.clkr, [GCC_PCIE3X1_1_PIPE_CLK_SRC] = &gcc_pcie3x1_1_pipe_clk_src.clkr, - [GCC_USB0_PIPE_CLK_SRC] = &gcc_usb0_pipe_clk_src.clkr, + [GCC_USB0_PIPE_CLK_SRC] = &usb0_pipe_clk_src.clkr, }; static const struct qcom_reset_map gcc_ipq5332_resets[] = { -- 2.7.4