Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5950743iog; Thu, 23 Jun 2022 08:23:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v0epOZurLUrY0DEsRbxF1Q94r1xWNnHq5uHj3LAXpiYxVbTXbKsmTZc6atkR1uO1W/CA9S X-Received: by 2002:a17:907:11c2:b0:723:21cb:bd35 with SMTP id va2-20020a17090711c200b0072321cbbd35mr5163167ejb.108.1655997821724; Thu, 23 Jun 2022 08:23:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655997821; cv=none; d=google.com; s=arc-20160816; b=xLyZ8Rv0eCFkN67I6z0T9JOL2JSBWbleAqw25UAsM/7wXOz9njvoANk/chTusxnL/3 PAiCbWCsYmO95K2gAfu0RidEbcsyf+AHfwfZehKAa+48Wo6IRvv7N1ayCKDP7dD+lYT7 4kMKX1qYIj7Pc+REiSZuzyIEocle8SoNsDEt8f4n9uasjoqMPbU7fUQHxdEaxHmpgfiF YEwyDk7kW3e+58wwZ+YXC4RmKazEacmehkujiXx8r1MF5a/kuoIWmmaVEu10ylLgnVUl suhziftifOWPLBSyhGkD2VYPPVRww0mRBDg2k79rA1MdUhXNSLrX+tdTtdQuiiSn0dXe NffA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WD6aAT4eAfkhBAGxc5usx5w9FCyTvm/RJ0Dv5y8ZHUg=; b=G2xjT5ZX8TtOuWcxLh69XuFH7hHXZbHNDph6eK/qGqy6+yJ9vjQjABLyIW5FjERZTG mJt/VLTYTmdu2FlGRG4+rh70L/bFJI92LXqHQPzN93QyPqSavBedpFbzqE52+5kZ3sou SEI3u2txZK+PZw9yHiLepiraslw76+wM2S1nNTu/iamPFuRdbo9W707F0HPswSqOw9lj SLH0c1G2MA4UMwCQ0/GhSnFVQ1dloFbW82hsiO7z0nYL5u20iQ0EDlwPLj+7FcVk4Itw /VWa5kGOxKfqoXwOLB63iXLTB1ESISmP4kXt9nS/SG53PYgonRqD5860gTJiTs1uQIJl uqEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AX8jefxI; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 9-20020a17090602c900b00722a7e9e642si13605957ejk.587.2022.06.23.08.23.16; Thu, 23 Jun 2022 08:23:41 -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=@redhat.com header.s=mimecast20190719 header.b=AX8jefxI; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231842AbiFWO3G (ORCPT + 99 others); Thu, 23 Jun 2022 10:29:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231661AbiFWO3F (ORCPT ); Thu, 23 Jun 2022 10:29:05 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D56F93669B for ; Thu, 23 Jun 2022 07:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655994543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WD6aAT4eAfkhBAGxc5usx5w9FCyTvm/RJ0Dv5y8ZHUg=; b=AX8jefxIh3rkcyL5lW4atqvY4ECnnPpWBV5erURxzfQSbe8yMfjMfQ61f6FuuEYcgzASyN SLEXj5MXZ/7uvThAeRA01z5Jr6JsIXnxaeAW2UKn+jV0yjQ/VU1cbraQw/pq6nq7dxPYO7 RoipA5B4LIS7oGdx/12RAvM1mdSOvgw= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-439-bxxKNnUkPXKcrAgIYcYEMQ-1; Thu, 23 Jun 2022 10:29:02 -0400 X-MC-Unique: bxxKNnUkPXKcrAgIYcYEMQ-1 Received: by mail-qv1-f71.google.com with SMTP id kj4-20020a056214528400b0044399a9bb4cso20499467qvb.15 for ; Thu, 23 Jun 2022 07:29:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WD6aAT4eAfkhBAGxc5usx5w9FCyTvm/RJ0Dv5y8ZHUg=; b=PFOS7WI0XZ4Hdyz1+dlE1JA3bqGsCnLcohnD5QbM6cRysNI88quV4no1WT3lcyEiDl X2etLoiheFi4FZUkNBx7iNhZI2pCloZseDEj7WkzNlmkDdvSPr/Wsf6jXgL//2vfpJgj DGBxCd9h46lXJFTCroMrL/oxdXPu6Izlm1DXkiIhPXOUr/4WoXVvqTfI8p0GPMifZDST lW90/3FrbmQEOQrNY0t1ecSw/Hg9hY0GijmE9PlF++yv33UcOE9+7wgJ89LFr9YS02s0 /Qka/t+zuhNZn5zFeW/kqhW5cxRWD31PYgqXuB8EE7juxuduv1nC73XepNttSGzb5iJd n0uQ== X-Gm-Message-State: AJIora8veomI9TcVVvoxWom8iIZBGVcixhKR9888tgn88P5lHaf/uBEb uK6su2hdyiEpJToy8uu42gAz5GlAsdFeuwmCPnNOtvsqNGGI5YqrmI49g4IyIuTCDLY8+qnJZtr ixdF5VdFchn/qKAY/XfeoJX/z X-Received: by 2002:a05:6214:b69:b0:470:4d46:a399 with SMTP id ey9-20020a0562140b6900b004704d46a399mr14931858qvb.68.1655994542067; Thu, 23 Jun 2022 07:29:02 -0700 (PDT) X-Received: by 2002:a05:6214:b69:b0:470:4d46:a399 with SMTP id ey9-20020a0562140b6900b004704d46a399mr14931452qvb.68.1655994536929; Thu, 23 Jun 2022 07:28:56 -0700 (PDT) Received: from xps13.redhat.com (c-98-239-145-235.hsd1.wv.comcast.net. [98.239.145.235]) by smtp.gmail.com with ESMTPSA id d124-20020a379b82000000b006a6ae9150fesm18412531qke.41.2022.06.23.07.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jun 2022 07:28:56 -0700 (PDT) From: Brian Masney To: bjorn.andersson@linaro.org, linux-arm-msm@vger.kernel.org Cc: agross@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, ahalaney@redhat.com, echanude@redhat.com Subject: [PATCH] clk: qcom: sc8280xp: add parent to gcc_ufs_phy_axi_clk for sa8540p Date: Thu, 23 Jun 2022 10:28:37 -0400 Message-Id: <20220623142837.3140680-1-bmasney@redhat.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 The sa8540p automotive board has the same SOC as the sc8280xp. In order to get the first UFS controller working on the sa8540p, GCC_UFS_REF_CLKREF_CLK needs to be setup as a parent to GCC_UFS_PHY_AXI_CLK. This clock name came from the DTS for the downstream MSM 5.4 kernel sources for the sa8540p. It also references GCC_UFS_CARD_CLKREF_CLK, however that wasn't needed to get the first UFS controller working. Signed-off-by: Brian Masney --- I originally added this under GCC_UFS_PHY_PHY_AUX_CLK since that's what's in the downstream DTS. I was getting errors about GCC_UFS_PHY_AXI_CLK being stuck at off so I moved it there. Also I don't have access to any documentation for this board so I'm hoping that someone with docs access can verify that this is the appropriate place to put this. drivers/clk/qcom/gcc-sc8280xp.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/clk/qcom/gcc-sc8280xp.c b/drivers/clk/qcom/gcc-sc8280xp.c index 4b894442fdf5..4639b50da418 100644 --- a/drivers/clk/qcom/gcc-sc8280xp.c +++ b/drivers/clk/qcom/gcc-sc8280xp.c @@ -5685,6 +5685,19 @@ static struct clk_branch gcc_ufs_phy_ahb_clk = { }, }; +static struct clk_branch gcc_ufs_ref_clkref_clk = { + .halt_reg = 0x8c058, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x8c058, + .enable_mask = BIT(0), + .hw.init = &(const struct clk_init_data) { + .name = "gcc_ufs_ref_clkref_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + static struct clk_branch gcc_ufs_phy_axi_clk = { .halt_reg = 0x77010, .halt_check = BRANCH_HALT_VOTED, @@ -5696,6 +5709,7 @@ static struct clk_branch gcc_ufs_phy_axi_clk = { .hw.init = &(const struct clk_init_data) { .name = "gcc_ufs_phy_axi_clk", .parent_hws = (const struct clk_hw*[]){ + &gcc_ufs_ref_clkref_clk.clkr.hw, &gcc_ufs_phy_axi_clk_src.clkr.hw, }, .num_parents = 1, @@ -5899,19 +5913,6 @@ static struct clk_branch gcc_ufs_phy_unipro_core_hw_ctl_clk = { }, }; -static struct clk_branch gcc_ufs_ref_clkref_clk = { - .halt_reg = 0x8c058, - .halt_check = BRANCH_HALT, - .clkr = { - .enable_reg = 0x8c058, - .enable_mask = BIT(0), - .hw.init = &(const struct clk_init_data) { - .name = "gcc_ufs_ref_clkref_clk", - .ops = &clk_branch2_ops, - }, - }, -}; - static struct clk_branch gcc_usb2_hs0_clkref_clk = { .halt_reg = 0x8c044, .halt_check = BRANCH_HALT, -- 2.36.1