From patchwork Mon Dec 3 18:33:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 10710343 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 053D514BD for ; Mon, 3 Dec 2018 18:35:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBFFC2B47F for ; Mon, 3 Dec 2018 18:35:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFF672B4B2; Mon, 3 Dec 2018 18:35:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AD582B47F for ; Mon, 3 Dec 2018 18:35:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726925AbeLCSfi (ORCPT ); Mon, 3 Dec 2018 13:35:38 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:46599 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726893AbeLCSfh (ORCPT ); Mon, 3 Dec 2018 13:35:37 -0500 Received: by mail-pl1-f195.google.com with SMTP id t13so6880596ply.13 for ; Mon, 03 Dec 2018 10:35:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZyX8tNHK5VOts8os4OSbi/JxaS4IFqhRIvTt1egsXfY=; b=Dh5+uG6gTjaiKou/ckwADwGhLsaTDPo5Y0F5CVwftykKWHHOfcK5iOkHqCcG3a117s wQWCss/Tr9r6pNC6XupWCOCe7F/ouVWIkkfPljr5VISrl3M2SpkfM5uwg2BDPlMLYCgP ExZOrH0iZznFqgNVBUkVZ8IdjRS+pzx0/dbwA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZyX8tNHK5VOts8os4OSbi/JxaS4IFqhRIvTt1egsXfY=; b=Q28wopxG/mhFLvKodz4PtKEMpXs82D3YeEmMvQESzjIRp9hzPKWPJ5aLW796HNLm95 A/wJgcg8ewKPu5srZrqN82Bdhl5J9gPVvjE6QQn2avUClJY7P3IyQMwooLfGvV3NUmHP IMBKpucLJlH3ciMLjk1z7Bn6SYdxoz/zhgSmjJsvvkEg0LyZLc2MqZGktKQCSomyuC9C CYwSdmIxjJZSEGT7XOCnb652/3463TUAKgJR5qN1KNbmblX8m0tAjgD97LDtxmItmY2k qrf2AjaW1HhvtOMXSBln9gWlnCpvLpDIOJNNvaGuPIojOzh4xioCaOgJ5RTs3T4wQtto T/wQ== X-Gm-Message-State: AA+aEWa69D/nTNCAeQiV5u3IaGspbNMo9uY0JMnq0+iFx5+Mu334l0mo tU/O2kNNYewK/nGSUJ+80qYY7g== X-Google-Smtp-Source: AFSGD/WKK2DoX7M6iq46vOR/9ZL+RxxviwZPprMUnSvwxAHh5SMdgxtzJkzI1gQ8VRB0JpnFyoQkiQ== X-Received: by 2002:a17:902:33c1:: with SMTP id b59mr16825863plc.220.1543862134494; Mon, 03 Dec 2018 10:35:34 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id f6sm20180969pfg.188.2018.12.03.10.35.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 10:35:33 -0800 (PST) From: Bjorn Andersson To: Michael Turquette , Stephen Boyd Cc: Andy Gross , David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Marc Gonzalez , Amit Kucheria Subject: [PATCH v2 1/3] clk: qcom: gcc-msm8998: Drop hmss_dvm and lpass_at Date: Mon, 3 Dec 2018 10:33:28 -0800 Message-Id: <20181203183330.2073-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181203183330.2073-1-bjorn.andersson@linaro.org> References: <20181203183330.2073-1-bjorn.andersson@linaro.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Disabling gcc_hmss_dvm_bus_clk and gcc_lpass_at_clk causes the board to lock up, and by that preventing the kernel to boot without clk_ignore_unused. gcc_hmss_dvm_bus_clk is marked always-on downstream, but not referenced, and gcc_lpass_at_clk isn't mentioned. So let's remove them until they are needed by some client. Signed-off-by: Bjorn Andersson --- Changes since v1: - Drop the clocks, rather than marking them critical. drivers/clk/qcom/gcc-msm8998.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c index 9f0ae403d5f5..aed7f1f92614 100644 --- a/drivers/clk/qcom/gcc-msm8998.c +++ b/drivers/clk/qcom/gcc-msm8998.c @@ -1964,19 +1964,6 @@ static struct clk_branch gcc_hmss_at_clk = { }, }; -static struct clk_branch gcc_hmss_dvm_bus_clk = { - .halt_reg = 0x4808c, - .halt_check = BRANCH_HALT, - .clkr = { - .enable_reg = 0x4808c, - .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ - .name = "gcc_hmss_dvm_bus_clk", - .ops = &clk_branch2_ops, - }, - }, -}; - static struct clk_branch gcc_hmss_rbcpr_clk = { .halt_reg = 0x48008, .halt_check = BRANCH_HALT, @@ -2007,19 +1994,6 @@ static struct clk_branch gcc_hmss_trig_clk = { }, }; -static struct clk_branch gcc_lpass_at_clk = { - .halt_reg = 0x47020, - .halt_check = BRANCH_HALT, - .clkr = { - .enable_reg = 0x47020, - .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ - .name = "gcc_lpass_at_clk", - .ops = &clk_branch2_ops, - }, - }, -}; - static struct clk_branch gcc_lpass_trig_clk = { .halt_reg = 0x4701c, .halt_check = BRANCH_HALT, @@ -2653,10 +2627,8 @@ static struct clk_regmap *gcc_msm8998_clocks[] = { [GCC_GPU_SNOC_DVM_GFX_CLK] = &gcc_gpu_snoc_dvm_gfx_clk.clkr, [GCC_HMSS_AHB_CLK] = &gcc_hmss_ahb_clk.clkr, [GCC_HMSS_AT_CLK] = &gcc_hmss_at_clk.clkr, - [GCC_HMSS_DVM_BUS_CLK] = &gcc_hmss_dvm_bus_clk.clkr, [GCC_HMSS_RBCPR_CLK] = &gcc_hmss_rbcpr_clk.clkr, [GCC_HMSS_TRIG_CLK] = &gcc_hmss_trig_clk.clkr, - [GCC_LPASS_AT_CLK] = &gcc_lpass_at_clk.clkr, [GCC_LPASS_TRIG_CLK] = &gcc_lpass_trig_clk.clkr, [GCC_MMSS_NOC_CFG_AHB_CLK] = &gcc_mmss_noc_cfg_ahb_clk.clkr, [GCC_MMSS_QM_AHB_CLK] = &gcc_mmss_qm_ahb_clk.clkr, From patchwork Mon Dec 3 18:33:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 10710353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AFD9D17D5 for ; Mon, 3 Dec 2018 18:35:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A44D82B47F for ; Mon, 3 Dec 2018 18:35:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 985E32B4A6; Mon, 3 Dec 2018 18:35:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 435A22B47F for ; Mon, 3 Dec 2018 18:35:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726365AbeLCSfu (ORCPT ); Mon, 3 Dec 2018 13:35:50 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:39895 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726958AbeLCSfj (ORCPT ); Mon, 3 Dec 2018 13:35:39 -0500 Received: by mail-pf1-f193.google.com with SMTP id c72so6805656pfc.6 for ; Mon, 03 Dec 2018 10:35:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bxN1Bkl0sGb272jZKTW/rlZvTSKF7fLwHr1tSNNpIkc=; b=esrzBH+TR03Yy7QOusnb+0P1SrHFpIi0TVavFVtlBPKbVlyFYq4iYN7Fsg4zEEbh5W uSpfrXJdJUU9O2Ls+iBGF8JMV8lfCZp0rg+Cp9Hd+QCeaL7yFeyKIu4Fb4Kd1NXbfab4 3GhPc0Y+WLfD7Z0U/bUv7MtCcVghKhRbgSVvQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bxN1Bkl0sGb272jZKTW/rlZvTSKF7fLwHr1tSNNpIkc=; b=e4CpcSoOlcXn+YvO+Efifl3iRDh7er+6+oQ/ATfWkUFVCs9pTJxsNzgXpUXaVU6PmA RI5MYOkwEmE8wDkNeVHMKI7c1rwIkFOcIWxRjhBsTEnbDvP3LkgAlrutRtvd9lSxVwIe d0BkV/M6Okq5O3rkBhasAiW7CvpZTDMJGqpV7Irhm78+dzyMwXdCECMsO0FeYsjzOvjA RG3EcvzOtkiZvpSAzQaGzp+eQKvq1tlroTvIcTgtaul5VtwAcyDKbKvrTxSZ065xmJjB 3XWb/ZAaPHJTZwKn3lw4nUDd32QX+9nA/oApmNMcj28PNm/bttHAZ7IYUpvmj1Y+gN9N alVQ== X-Gm-Message-State: AA+aEWZ2q+rIlSxMbx2yEZCdaHMmNB0Ubs1lGTTYZRl8f4g4O5HV4uEc jphEZVx1ivkKJwOSjN0mbQr66g== X-Google-Smtp-Source: AFSGD/X0fR33u/afdE+r130QvsGiknKIxRH0fEK+aHC4oKOXL1r07JFLlffvvX3fHbPxnmD3a+rznQ== X-Received: by 2002:a63:a91a:: with SMTP id u26mr13944081pge.349.1543862135802; Mon, 03 Dec 2018 10:35:35 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id f6sm20180969pfg.188.2018.12.03.10.35.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 10:35:35 -0800 (PST) From: Bjorn Andersson To: Michael Turquette , Stephen Boyd Cc: Andy Gross , David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Marc Gonzalez , Amit Kucheria Subject: [PATCH v2 2/3] clk: qcom: gcc-msm8998: Disable halt check of UFS clocks Date: Mon, 3 Dec 2018 10:33:29 -0800 Message-Id: <20181203183330.2073-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181203183330.2073-1-bjorn.andersson@linaro.org> References: <20181203183330.2073-1-bjorn.andersson@linaro.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Drop the halt check of the UFS symbol clocks, in accordance with other platforms. This makes clk_disable_unused() happy and makes it possible to turn the clocks on again without an error. Signed-off-by: Bjorn Andersson --- Changes since v1: - None drivers/clk/qcom/gcc-msm8998.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c index aed7f1f92614..792b431f9945 100644 --- a/drivers/clk/qcom/gcc-msm8998.c +++ b/drivers/clk/qcom/gcc-msm8998.c @@ -2375,7 +2375,7 @@ static struct clk_branch gcc_ufs_phy_aux_clk = { static struct clk_branch gcc_ufs_rx_symbol_0_clk = { .halt_reg = 0x75014, - .halt_check = BRANCH_HALT, + .halt_check = BRANCH_HALT_SKIP, .clkr = { .enable_reg = 0x75014, .enable_mask = BIT(0), @@ -2388,7 +2388,7 @@ static struct clk_branch gcc_ufs_rx_symbol_0_clk = { static struct clk_branch gcc_ufs_rx_symbol_1_clk = { .halt_reg = 0x7605c, - .halt_check = BRANCH_HALT, + .halt_check = BRANCH_HALT_SKIP, .clkr = { .enable_reg = 0x7605c, .enable_mask = BIT(0), @@ -2401,7 +2401,7 @@ static struct clk_branch gcc_ufs_rx_symbol_1_clk = { static struct clk_branch gcc_ufs_tx_symbol_0_clk = { .halt_reg = 0x75010, - .halt_check = BRANCH_HALT, + .halt_check = BRANCH_HALT_SKIP, .clkr = { .enable_reg = 0x75010, .enable_mask = BIT(0), From patchwork Mon Dec 3 18:33:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 10710347 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7738417D5 for ; Mon, 3 Dec 2018 18:35:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A7ED2B47F for ; Mon, 3 Dec 2018 18:35:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CCA22B4A6; Mon, 3 Dec 2018 18:35:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E24122B47F for ; Mon, 3 Dec 2018 18:35:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726964AbeLCSfl (ORCPT ); Mon, 3 Dec 2018 13:35:41 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:34342 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726922AbeLCSfk (ORCPT ); Mon, 3 Dec 2018 13:35:40 -0500 Received: by mail-pl1-f193.google.com with SMTP id w4so6908839plz.1 for ; Mon, 03 Dec 2018 10:35:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OgjejpvvybYqYgPgu9pyioScdhfquILFMatsfrKQqTQ=; b=VMfCEGWvIxhPctLzM6oVz1mYwwer16KmoDOFl8TEGbS8BmqbIUxSlIYr2XD6fR5Tek CS4+/FZ73aC6NQNLlaOYKVhYwOpGGVKxbEBoEbplleXhRO/6fyzfVZpLpsK8XDonBEUI AP4JL09sDkcxaMNBRsis5B8l6vSrWUzMHFO0A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OgjejpvvybYqYgPgu9pyioScdhfquILFMatsfrKQqTQ=; b=AHxC1jrCATTG1F0Asvp4yoN16OdrfTdNk+1hhYqKy6439gjANarHv5hwTHaHwZG8EK PKVv37QLZpsyZvuQ9lyR8vVGJL8KaFfdBwE+eaTOUl2rIJWnv6SbAZGGgnUAKO7F/y1c mDLLAd8TMRFzH8z+LvFwmjS+LHYD8gZOLGVjDecGz3hhH4hyQQHKMsCJBabKX4hqNL8R XA/3lCmVUtKbJi/Cdq+hvs05hJjxSW/qwgkwftoT69/a2MFNr3ST7rUvO7U2M26wzdyo n4ykDS272EEmwWOGjfVSUoEtzpXH9ktS6w0QDqrIRhbKgqWn/kty6q7KrMg61thr7eNL Fsdw== X-Gm-Message-State: AA+aEWZZjPwQEIfOMCetcjDD5Fu5Byykn4BEr01Yxpf68sqdGmBtBNSR /DzqJtipPnJhUGanPCWdnbfIFQ== X-Google-Smtp-Source: AFSGD/UCl5/vwnhp9TI9FLWppXN546cKSlQ8OnLmZdfyxoTlGTV5ijoVZFiVZ/gVqX3lvTYJpfdGlw== X-Received: by 2002:a17:902:714c:: with SMTP id u12mr16802137plm.234.1543862137072; Mon, 03 Dec 2018 10:35:37 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id f6sm20180969pfg.188.2018.12.03.10.35.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 10:35:36 -0800 (PST) From: Bjorn Andersson To: Michael Turquette , Stephen Boyd Cc: Andy Gross , David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Marc Gonzalez , Amit Kucheria Subject: [PATCH v2 3/3] clk: qcom: gcc-msm8998: Add clkref clocks Date: Mon, 3 Dec 2018 10:33:30 -0800 Message-Id: <20181203183330.2073-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181203183330.2073-1-bjorn.andersson@linaro.org> References: <20181203183330.2073-1-bjorn.andersson@linaro.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add clkref clocks for usb3, hdmi, ufs, pcie, and usb2. They are all sourced off CXO_IN, so parent them off "xo" until a proper link to the rpmcc can be described in DT. Signed-off-by: Bjorn Andersson --- Changes since v1: - None drivers/clk/qcom/gcc-msm8998.c | 75 ++++++++++++++++++++ include/dt-bindings/clock/qcom,gcc-msm8998.h | 5 ++ 2 files changed, 80 insertions(+) diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c index 792b431f9945..717210f61d27 100644 --- a/drivers/clk/qcom/gcc-msm8998.c +++ b/drivers/clk/qcom/gcc-msm8998.c @@ -2515,6 +2515,76 @@ static struct clk_branch gcc_usb_phy_cfg_ahb2phy_clk = { }, }; +static struct clk_branch gcc_hdmi_clkref_clk = { + .halt_reg = 0x88000, + .clkr = { + .enable_reg = 0x88000, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gcc_hdmi_clkref_clk", + .parent_names = (const char *[]){ "xo" }, + .num_parents = 1, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_ufs_clkref_clk = { + .halt_reg = 0x88004, + .clkr = { + .enable_reg = 0x88004, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gcc_ufs_clkref_clk", + .parent_names = (const char *[]){ "xo" }, + .num_parents = 1, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_usb3_clkref_clk = { + .halt_reg = 0x88008, + .clkr = { + .enable_reg = 0x88008, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gcc_usb3_clkref_clk", + .parent_names = (const char *[]){ "xo" }, + .num_parents = 1, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_pcie_clkref_clk = { + .halt_reg = 0x8800c, + .clkr = { + .enable_reg = 0x8800c, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gcc_pcie_clkref_clk", + .parent_names = (const char *[]){ "xo" }, + .num_parents = 1, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_rx1_usb2_clkref_clk = { + .halt_reg = 0x88014, + .clkr = { + .enable_reg = 0x88014, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gcc_rx1_usb2_clkref_clk", + .parent_names = (const char *[]){ "xo" }, + .num_parents = 1, + .ops = &clk_branch2_ops, + }, + }, +}; + static struct gdsc pcie_0_gdsc = { .gdscr = 0x6b004, .gds_hw_ctrl = 0x0, @@ -2705,6 +2775,11 @@ static struct clk_regmap *gcc_msm8998_clocks[] = { [USB30_MASTER_CLK_SRC] = &usb30_master_clk_src.clkr, [USB30_MOCK_UTMI_CLK_SRC] = &usb30_mock_utmi_clk_src.clkr, [USB3_PHY_AUX_CLK_SRC] = &usb3_phy_aux_clk_src.clkr, + [GCC_HDMI_CLKREF_CLK] = &gcc_hdmi_clkref_clk.clkr, + [GCC_UFS_CLKREF_CLK] = &gcc_ufs_clkref_clk.clkr, + [GCC_USB3_CLKREF_CLK] = &gcc_usb3_clkref_clk.clkr, + [GCC_PCIE_CLKREF_CLK] = &gcc_pcie_clkref_clk.clkr, + [GCC_RX1_USB2_CLKREF_CLK] = &gcc_rx1_usb2_clkref_clk.clkr, }; static struct gdsc *gcc_msm8998_gdscs[] = { diff --git a/include/dt-bindings/clock/qcom,gcc-msm8998.h b/include/dt-bindings/clock/qcom,gcc-msm8998.h index 58a242e656b1..b3448800980a 100644 --- a/include/dt-bindings/clock/qcom,gcc-msm8998.h +++ b/include/dt-bindings/clock/qcom,gcc-msm8998.h @@ -180,6 +180,11 @@ #define USB30_MASTER_CLK_SRC 163 #define USB30_MOCK_UTMI_CLK_SRC 164 #define USB3_PHY_AUX_CLK_SRC 165 +#define GCC_USB3_CLKREF_CLK 166 +#define GCC_HDMI_CLKREF_CLK 167 +#define GCC_UFS_CLKREF_CLK 168 +#define GCC_PCIE_CLKREF_CLK 169 +#define GCC_RX1_USB2_CLKREF_CLK 170 #define PCIE_0_GDSC 0 #define UFS_GDSC 1