Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3825172pxk; Tue, 8 Sep 2020 03:37:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy89016ZlMN2zjRFJFKX7jS8pzjVFHCakusQ0AIpXskS2JNKVLBHL7igulmY4RZmsvxbZuX X-Received: by 2002:a50:8062:: with SMTP id 89mr25601692eda.241.1599561466792; Tue, 08 Sep 2020 03:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599561466; cv=none; d=google.com; s=arc-20160816; b=be9CQCnJe/swtGlgobJb71tXSMh8V3qLUHyzJ9Q9jSb9nUwdQZpMWeft1DYtZcBmSo p5uHJEZ0oK/MfgkOB+piK/SrAMyYjD4RoCHSasf+n/fQ77d44FyxoEyrbJBsaSjpLrO2 qzz9/lfJXhene7iI46TgcmP/7HzDTl4JYX8kCADSJZl0PYpOJ0rI7K+MU+ZK8T8IuXHE g8E/ehdloT9hSxUIB7d1Q1FPA0c7ui40sRNH8LK2/EYWN7OHHhad4jQMS9UO0A3BXo5A JwZYT8cnHvAnDTbIVRrtpTLQT8c4AN6Q6DV+wWIKPWS8yDuvJWPIT6q0t0lh7NZeiOAU bhEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=8GngGsuma5L4qsxmxeWRXR73HW8iKBT59RV0j9LRq4A=; b=VWQlbIjKLiNYl/Ii+RGwAl/RjD8Z5HwrFpJ7j4cErE0rwaIrZAfoanFgzgjlcyS9vJ Iz6KeK5V5o2Wi2Bdb5F8aaCkW6jLtC1sOdO9qGW2JZ7Y9CRHvTAkqduKyYIcXX+EGEGe L8FSN3aBMuSuz9Ml34Xo9VKuvVUpig3P5rK90tXTyjvZ47xmk3Qq05abppjlKVKKkA6e wVIYJucOi80NAyaPhNzTRceWCmRjcKs1S0bcjfzPZ8L+rhXumbPgWFeW3IYwn6l+P3Y5 u8UfbLU1k5P7LeW5XuN7ldbOjuKxVtEeNLxmdDhI/9Hojd+tTX8SdWXqwl/2SUQp6TCe dZIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f23si11333238edm.413.2020.09.08.03.37.24; Tue, 08 Sep 2020 03:37:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729279AbgIHKgF (ORCPT + 99 others); Tue, 8 Sep 2020 06:36:05 -0400 Received: from inva021.nxp.com ([92.121.34.21]:56356 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729538AbgIHK0i (ORCPT ); Tue, 8 Sep 2020 06:26:38 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BED472011C6; Tue, 8 Sep 2020 12:26:11 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B1DC720025C; Tue, 8 Sep 2020 12:26:11 +0200 (CEST) Received: from fsr-ub1664-175.ea.freescale.net (fsr-ub1664-175.ea.freescale.net [10.171.82.40]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 0B28120327; Tue, 8 Sep 2020 12:26:11 +0200 (CEST) From: Abel Vesa To: Mike Turquette , Stephen Boyd , Rob Herring , Shawn Guo , Sascha Hauer , Fabio Estevam , Philipp Zabel , Anson Huang , Jacky Bai , Peng Fan , Dong Aisheng , Fugang Duan , devicetree@vger.kernel.org Cc: NXP Linux Team , linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List , linux-clk@vger.kernel.org, Abel Vesa Subject: [PATCH v3 08/14] clk: imx8mp: Add audio shared gate Date: Tue, 8 Sep 2020 13:24:45 +0300 Message-Id: <1599560691-3763-9-git-send-email-abel.vesa@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599560691-3763-1-git-send-email-abel.vesa@nxp.com> References: <1599560691-3763-1-git-send-email-abel.vesa@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to the RM, the CCGR101 is shared for the following root clocks: - AUDIO_AHB_CLK_ROOT - AUDIO_AXI_CLK_ROOT - SAI2_CLK_ROOT - SAI3_CLK_ROOT - SAI5_CLK_ROOT - SAI6_CLK_ROOT - SAI7_CLK_ROOT - PDM_CLK_ROOT Signed-off-by: Abel Vesa Reviewed-by: Dong Aisheng --- drivers/clk/imx/clk-imx8mp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c index 12ce477..6812a01 100644 --- a/drivers/clk/imx/clk-imx8mp.c +++ b/drivers/clk/imx/clk-imx8mp.c @@ -17,6 +17,7 @@ static u32 share_count_nand; static u32 share_count_media; +static u32 share_count_audio; static const char * const pll_ref_sels[] = { "osc_24m", "dummy", "dummy", "dummy", }; static const char * const audio_pll1_bypass_sels[] = {"audio_pll1", "audio_pll1_ref_sel", }; @@ -725,7 +726,16 @@ static int imx8mp_clocks_probe(struct platform_device *pdev) hws[IMX8MP_CLK_HDMI_ROOT] = imx_clk_hw_gate4("hdmi_root_clk", "hdmi_axi", ccm_base + 0x45f0, 0); hws[IMX8MP_CLK_TSENSOR_ROOT] = imx_clk_hw_gate4("tsensor_root_clk", "ipg_root", ccm_base + 0x4620, 0); hws[IMX8MP_CLK_VPU_ROOT] = imx_clk_hw_gate4("vpu_root_clk", "vpu_bus", ccm_base + 0x4630, 0); - hws[IMX8MP_CLK_AUDIO_ROOT] = imx_clk_hw_gate4("audio_root_clk", "ipg_root", ccm_base + 0x4650, 0); + + hws[IMX8MP_CLK_AUDIO_AHB_ROOT] = imx_clk_hw_gate2_shared2("audio_ahb_root", "audio_ahb", ccm_base + 0x4650, 0, &share_count_audio); + hws[IMX8MP_CLK_AUDIO_AXI_ROOT] = imx_clk_hw_gate2_shared2("audio_axi_root", "audio_axi", ccm_base + 0x4650, 0, &share_count_audio); + hws[IMX8MP_CLK_SAI1_ROOT] = imx_clk_hw_gate2_shared2("sai1_root", "sai1", ccm_base + 0x4650, 0, &share_count_audio); + hws[IMX8MP_CLK_SAI2_ROOT] = imx_clk_hw_gate2_shared2("sai2_root", "sai2", ccm_base + 0x4650, 0, &share_count_audio); + hws[IMX8MP_CLK_SAI3_ROOT] = imx_clk_hw_gate2_shared2("sai3_root", "sai3", ccm_base + 0x4650, 0, &share_count_audio); + hws[IMX8MP_CLK_SAI5_ROOT] = imx_clk_hw_gate2_shared2("sai5_root", "sai5", ccm_base + 0x4650, 0, &share_count_audio); + hws[IMX8MP_CLK_SAI6_ROOT] = imx_clk_hw_gate2_shared2("sai6_root", "sai6", ccm_base + 0x4650, 0, &share_count_audio); + hws[IMX8MP_CLK_SAI7_ROOT] = imx_clk_hw_gate2_shared2("sai7_root", "sai7", ccm_base + 0x4650, 0, &share_count_audio); + hws[IMX8MP_CLK_PDM_ROOT] = imx_clk_hw_gate2_shared2("pdm_root", "pdm", ccm_base + 0x4650, 0, &share_count_audio); hws[IMX8MP_CLK_ARM] = imx_clk_hw_cpu("arm", "arm_a53_core", hws[IMX8MP_CLK_A53_CORE]->clk, -- 2.7.4