From patchwork Tue Sep 8 10:24:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 11763139 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82F8E138E for ; Tue, 8 Sep 2020 10:26:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5659220672 for ; Tue, 8 Sep 2020 10:26:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QJJ4VGzM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5659220672 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=F9R11tGBOqKGhNzlZc9QHY+RgAt8sD1SimAyK9MtARs=; b=QJJ4VGzMSZWYrd1PtDYigyLXao S+sko6WWqDLaY4cnWfNBB+EzXq04V20C0YkOjLQRjCjRYhisIk5UlUDq3GnQWEOD320pM9IIV8UrN FhCVjmfnRCcmf5d0HZfCbyk/37pwiL5SGBfPMWQBkY/iOuhq9QRmkopyGRyqk2ZMCc1Vwxp1HNCgi XEXCJOWGx7e9xA4Ze3ZJ+MZ6/3q/m0WHDFXq2Q84/Y3I/pX5FvNZvmpvieZb1u7qW/MaBFjWfWwvr z1rLCoLqd1WFiVBaVClJfxMYyplnSLXWxChX4hmYhYZdFH8DpP6dpsQ6sU5lQBskx5pn5eO6NMOHq 9suqjG4A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFapG-0000ll-Q5; Tue, 08 Sep 2020 10:26:10 +0000 Received: from inva021.nxp.com ([92.121.34.21]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFapC-0000k8-O2 for linux-arm-kernel@lists.infradead.org; Tue, 08 Sep 2020 10:26:07 +0000 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 960F22014ED; Tue, 8 Sep 2020 12:26:05 +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 868BA2011AF; Tue, 8 Sep 2020 12:26:05 +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 D44EE20327; Tue, 8 Sep 2020 12:26:04 +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 Subject: [PATCH v3 00/14] Add BLK_CTL support for i.MX8MP Date: Tue, 8 Sep 2020 13:24:37 +0300 Message-Id: <1599560691-3763-1-git-send-email-abel.vesa@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200908_062607_024293_19C86314 X-CRM114-Status: GOOD ( 16.12 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [92.121.34.21 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Abel Vesa , linux-clk@vger.kernel.org, NXP Linux Team , linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The BLK_CTL according to HW design is basically the wrapper of the entire function specific group of IPs and holds GPRs that usually cannot be placed into one specific IP from that group. Some of these GPRs are used to control some clocks, other some resets, others some very specific function that does not fit into clocks or resets. Since the clocks are registered using the i.MX clock subsystem API, the driver is placed into the clock subsystem, but it also registers the resets. For the other functionalities that other GPRs might have, the syscon is used. Changes since v2: * Made the naming consistent with the RM: BLK_CTL (not BLK_CTRL) * fixed the reset set procedure as discussed with Philipp Zabel * removed the patch that includes the imx8mp-reset header in dtsi as there is no user yet. * added i.MX8MP specific blk_ctl driver as suggested by Aisheng Dong Abel Vesa (14): dt-bindings: clocks: imx8mp: Rename audiomix ids clocks to audio_blk_ctl dt-bindings: reset: imx8mp: Add audio blk_ctl reset IDs dt-bindings: clock: imx8mp: Add ids for the audio shared gate dt-bindings: clock: imx8mp: Add media blk_ctl clock IDs dt-bindings: reset: imx8mp: Add media blk_ctl reset IDs dt-bindings: clock: imx8mp: Add hdmi blk_ctl clock IDs dt-bindings: reset: imx8mp: Add hdmi blk_ctl reset IDs clk: imx8mp: Add audio shared gate Documentation: bindings: clk: Add bindings for i.MX BLK_CTL clk: imx: Add generic blk-ctl driver clk: imx: Add blk-ctl driver for i.MX8MP arm64: dts: imx8mp: Add audio_blk_ctl node arm64: dts: imx8mp: Add media_blk_ctl node arm64: dts: imx8mp: Add hdmi_blk_ctl node .../devicetree/bindings/clock/fsl,imx-blk-ctl.yaml | 60 ++++ arch/arm64/boot/dts/freescale/imx8mp.dtsi | 37 +++ drivers/clk/imx/Makefile | 2 +- drivers/clk/imx/clk-blk-ctl-imx8mp.c | 313 +++++++++++++++++++++ drivers/clk/imx/clk-blk-ctl.c | 297 +++++++++++++++++++ drivers/clk/imx/clk-blk-ctl.h | 80 ++++++ drivers/clk/imx/clk-imx8mp.c | 12 +- include/dt-bindings/clock/imx8mp-clock.h | 200 +++++++++---- include/dt-bindings/reset/imx8mp-reset.h | 45 +++ 9 files changed, 983 insertions(+), 63 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/fsl,imx-blk-ctl.yaml create mode 100644 drivers/clk/imx/clk-blk-ctl-imx8mp.c create mode 100644 drivers/clk/imx/clk-blk-ctl.c create mode 100644 drivers/clk/imx/clk-blk-ctl.h