From patchwork Wed Aug 2 07:20:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elaine Zhang X-Patchwork-Id: 13337734 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B95FBC04A6A for ; Wed, 2 Aug 2023 07:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc: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=lisgZxH7DwoY6vuz8Ou8H1W7lfFookpKnfSIW9hvisU=; b=hmgIm5Ol0ptm0t 6MI+XopCFjp5shXldZafkL6OQwj+zNT+z06ldF2I6Y6UcbIucMrOFGSVnmE7s7hGFsCJgcZ1tQYoG G/McjEvq//ZTGC/D5yRzqwRrZUKeAmlmPMHZeizQhgGz/CYngV/fNH8N0IZCMT7EnGXW3dR5ZpJiB BQuHEiMKpP4p8t2lMzyBC59F0G5fWKPPDqnlrIeLDfNZHfYzxcHHeImg7AYlj26y45+p21JBnwlQP ceL/zG7Rccajh53DyDNtdBS1rjtjKc/Tp1NuI100P5hokqbrQimWAcmjJkKyDbezCx8AUT6bDur+S 2oAXhPcC9CSLM5eGNf6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qR6AN-004EGY-2I; Wed, 02 Aug 2023 07:21:07 +0000 Received: from mail-m12739.qiye.163.com ([115.236.127.39]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qR6AJ-004EET-2D for linux-rockchip@lists.infradead.org; Wed, 02 Aug 2023 07:21:06 +0000 Received: from localhost.localdomain (unknown [58.22.7.114]) by mail-m12739.qiye.163.com (Hmail) with ESMTPA id A2EFC4A01BC; Wed, 2 Aug 2023 15:20:40 +0800 (CST) From: Elaine Zhang To: mturquette@baylibre.com, sboyd@kernel.org, kever.yang@rock-chips.com, zhangqing@rock-chips.com, heiko@sntech.de Cc: linux-clk@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, huangtao@rock-chips.com Subject: [PATCH v3 0/4] rockchip: add GATE_LINK Date: Wed, 2 Aug 2023 15:20:34 +0800 Message-Id: <20230802072038.29996-1-zhangqing@rock-chips.com> X-Mailer: git-send-email 2.17.1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZGUJPGFYfSEwfSBhLThoaHxhVEwETFh oSFyQUDg9ZV1kYEgtZQVlOQ1VJSVVMVUpKT1lXWRYaDxIVHRRZQVlPS0hVSk1PSU5JVUpLS1VKQl kG X-HM-Tid: 0a89b51ec96fb212kuuua2efc4a01bc X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MCI6MRw6KD1LLCtDOToJAzAN VjIKCS1VSlVKTUJLQk1LQ09KTU1IVTMWGhIXVQETGhUcChIVHDsJFBgQVhgTEgsIVRgUFkVZV1kS C1lBWU5DVUlJVUxVSkpPWVdZCAFZQUlISUs3Bg++ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230802_002103_883002_2570CD73 X-CRM114-Status: UNSURE ( 6.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Recent Rockchip SoCs have a new hardware block called Native Interface Unit (NIU), which gates clocks to devices behind them. These effectively need two parent clocks. Use GATE_LINK to handle this. change in V3: [PATCH v3 1/4]: new, export clk_gate_endisable for PATCH2. [PATCH v3 2/4]: reuse clk_gate_endisable and clk_gate_is_enabled. add prepare and unprepare ops. [PATCH v3 3/4]: No change [PATCH v3 4/4]: reword commit message change in V2: [PATCH v2 1/3]: fix reported warnings [PATCH v2 2/3]: Bindings submit independent patches [PATCH v2 3/3]: fix reported warnings Elaine Zhang (4): clk: gate: export clk_gate_endisable clk: rockchip: add support for gate link dt-bindings: clock: rk3588: export PCLK_VO1GRF clk id clk: rockchip: rk3588: Adjust the GATE_LINK parameter drivers/clk/clk-gate.c | 3 +- drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-gate-link.c | 120 ++++++++++++++++++ drivers/clk/rockchip/clk-rk3588.c | 110 ++++++++-------- drivers/clk/rockchip/clk.c | 7 + drivers/clk/rockchip/clk.h | 22 ++++ .../dt-bindings/clock/rockchip,rk3588-cru.h | 3 +- include/linux/clk-provider.h | 1 + 8 files changed, 214 insertions(+), 53 deletions(-) create mode 100644 drivers/clk/rockchip/clk-gate-link.c