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: 4550 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp129047wrn; Wed, 25 Jan 2023 22:36:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXuMzexO4bwfwIKMo20yjecmvzdEoOjGW09C42MQGhwTc8VAS2L+bsUWqyGEvScqfknKPp3D X-Received: by 2002:a17:906:6d0b:b0:871:818e:6e9 with SMTP id m11-20020a1709066d0b00b00871818e06e9mr37706099ejr.64.1674714974421; Wed, 25 Jan 2023 22:36:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674714974; cv=none; d=google.com; s=arc-20160816; b=N9mnq6yoHjOZLTxrGFC0WcU0a8l3t9nx0mGva4ERSLTRS5YfuA3rKL8a1+JHdA+3CJ IEv4aDMPvV+/rlQ+bapdlOPwv86iH1hDOUsf8RXj/+DaHXWECzo1yUNdgfqPkXwmLH5H vzJmgy/Uilz7z2OJQYX/TFRpsirWf5Zr1yY/SYiTqMHQ2j3lQeWGH+s43ES1KYeGOpr6 HJ6uBfU0Gs1JU56YxF9yKNy3mFRAj+PVuWWf1tL5yz31nu+DyoWeRnY35D6M9gofPKn+ /S9buWnI/cVKEeduLrwL8JdhZVxTb2avLe/fQzLAMgt9eeLDvlM0OcgCDHinEG4WsdCf YCBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=pM4BStLL1Skg7XYi8QBrjhe759beNnudPI+N5t2B+7k=; b=Lw+FSiuz/K9uaPN08SQYPlpHHnPiwPqcPBstD7QnlSDrRQobIRq3vkoHVD0XVsdpTC ghvA8VXtxWj6A5pfNwgs/E0vO3QoxkzopRCvaHCQxWdWq2N7ZZJHPbyFzZfeHhXn8A5d BKWYlbXi99cpDKeLLQAi1od8FCSL5qV0cdtp0jUkiW/P92uaVZy2n444VnsIeDcwgZFp QcR4f81EjivIiTSQVSLskBwjcqf6eX68WeF3bA2tauF5Ran+1ldJlPIkc+oIcSvSjiuS t4kq1WwFLXaQFu9NEAKdOVAo5N6B3zk6oykQepHzrb6XrvgV6ZjlLPAMQag3ALFSO1qO 4WVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=fcdfsYfb; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="Z2tV6s0/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mr20-20020a170907829400b0087785e0c520si270255ejc.507.2023.01.25.22.35.50; Wed, 25 Jan 2023 22:36:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=fcdfsYfb; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="Z2tV6s0/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231124AbjAZGeY (ORCPT + 99 others); Thu, 26 Jan 2023 01:34:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjAZGeW (ORCPT ); Thu, 26 Jan 2023 01:34:22 -0500 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD4E146145; Wed, 25 Jan 2023 22:34:20 -0800 (PST) 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-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756065928859328849?= X-GMAIL-MSGID: =?utf-8?q?1756065928859328849?= 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