From patchwork Thu Jan 26 06:34:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13116694 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 7F975C05027 for ; Thu, 26 Jan 2023 06:35:33 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=Aaa563thVbdlhBYAoLg1mPsyRYjIHZLFvkuvB2rZqms=; b=BvYNmbv6IQyqVZ bHkaBa2GERcTU3d+cVt8rZyYnBc3C1owss5nC6mYen2YoDNf+1s+EpyPOBqZn4Lwu+rKdfzx09ryg khTBk6JW/2VctxSYYpLv+LhrLovc8RYcYd6zv73J9cpJlz+m0LMuqpHFCSZEsLi43Da8VqicWuV7D 0muer+dgDyvojH+sa3I7dSvL2czNqwJAUI7RmFE3exbFYZMT58ASosSKf6mZM6GdaUA0PPbOXkern BGl0k+8iFF3XtU7SkFwwJqVwM2Mziyff393O+KImqutx6C2qjMDZprsaTdNgntDPv6GCobyMMey4f CJa4yu/PWXsC0qSfyYbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKvq4-009kDo-MW; Thu, 26 Jan 2023 06:34:24 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKvq1-009kDK-5T; Thu, 26 Jan 2023 06:34:22 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 65C9C320092E; Thu, 26 Jan 2023 01:34:19 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 26 Jan 2023 01:34:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t=1674714859; x=1674801259; bh=pM4BStLL1Skg7XYi8QBrjhe75 9beNnudPI+N5t2B+7k=; b=fcdfsYfbNuArt6RiTqBpWcKepcfZaPq1wXfDbqwCq x8fAjOwldYSJf9R4aZJoyJOoUzewDtDjLiS8fl2AgEMT3zhco/MMZUmz3Los98rE FfoxySb8yolewD6x3dQQVo2OxWv1MbQOuoAtQik3uedkMvG4k289uYFjDA9q0in3 BQrPxq3MO7qu2HDPEvUe6kYggu5Iy55niel/LyWmaTTptMhNoVj3lE5ytOu2FkZU K1zQiSjhfXTM0qnRN+5FwKpNVEmtQI54uXeRyqEY7BL6jNB4W40RMIv/7ok59rgo 2Pr7LyOhiLNYVrK/9cUPc9CIwOr7QGNutCm8wJtiecYkQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1674714859; x=1674801259; bh=pM4BStLL1Skg7XYi8QBrjhe759beNnudPI+ N5t2B+7k=; b=Z2tV6s0/t1DitCs9Q/rJfW9tb4dNUdqfCmI3qnROFrMxY9Ch4+6 do+HlGjSdH8B7uWL6bWnIxxWA5T36WRgo7dQkewuIkb6n/m5jvup0tM5naeWzcWd cu51hnyoSqhMFT/ylZcXpjzgUX+L+thuB3Fijku8P+UDAfdlb89K0B0EAq7c2AQK E1wy0d8sqBH5X1TPWqJy+sCmVFfkLCAXrRpUxR1K2jbldwtEZbMlYr4fPQo/eEnN +dI8RmXat/s6RGq0H9p35PgRvFtD2tfgt7lRbGX1OHu0DwkOAkzg2UVwWk38U3O/ M1BBti3djo89xgGINTZgUa2/m/tAVXcG/tA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvfedgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepvddtleeugeefjeetudejvddujeetteehveelkedvgfetgedtvdeikedu hfelgeevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgrnhgu rdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Jan 2023 01:34:17 -0500 (EST) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec Cc: Rob Herring , Krzysztof Kozlowski , Samuel Holland , Andre Przywara , Conor Dooley , Heiko Stuebner , Palmer Dabbelt , Philipp Zabel , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH v2 0/3] Allwinner D1 power domain support Date: Thu, 26 Jan 2023 00:34:16 -0600 Message-Id: <20230126063419.15971-1-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230125_223421_277043_A61D3BD7 X-CRM114-Status: GOOD ( 12.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series adds support for the power controller found in D1 and other recent Allwinner SoCs. There is no first-party documentation, but there are a couple of vendor drivers for different hardware revisions[1][2], and the register definitions were easy to verify empirically. I have tested this driver on D1 with the video engine. [1]: https://github.com/mangopi-sbc/tina-linux-5.4/blob/main/drivers/soc/sunxi/gpu_domain.c [2]: https://github.com/mangopi-sbc/tina-linux-5.4/blob/main/drivers/soc/sunxi/pm_domains.c Changes in v2: - Removed quotes from "PPU" - Fixed indentation in binding example - Removed possibly misleading comment from the Kconfig description - Include a patch adding the device tree node Samuel Holland (3): dt-bindings: power: Add Allwinner D1 PPU soc: sunxi: Add Allwinner D1 PPU driver riscv: dts: allwinner: d1: Add power controller node .../power/allwinner,sun20i-d1-ppu.yaml | 54 +++++ .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 8 + drivers/soc/sunxi/Kconfig | 8 + drivers/soc/sunxi/Makefile | 1 + drivers/soc/sunxi/sun20i-ppu.c | 207 ++++++++++++++++++ .../power/allwinner,sun20i-d1-ppu.h | 10 + 6 files changed, 288 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/allwinner,sun20i-d1-ppu.yaml create mode 100644 drivers/soc/sunxi/sun20i-ppu.c create mode 100644 include/dt-bindings/power/allwinner,sun20i-d1-ppu.h