From patchwork Tue Aug 2 05:32:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 594999 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 024C1C00140 for ; Tue, 2 Aug 2022 05:32:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235447AbiHBFcW (ORCPT ); Tue, 2 Aug 2022 01:32:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233023AbiHBFcV (ORCPT ); Tue, 2 Aug 2022 01:32:21 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 982671E3C2; Mon, 1 Aug 2022 22:32:20 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 8B42832002FB; Tue, 2 Aug 2022 01:32:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 02 Aug 2022 01:32:17 -0400 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=1659418336; x=1659504736; bh=Ge7j60aibO5Z3y1t3igfL1XiH vVASWRdGw8tdLd4ALc=; b=DqN9XOld1FRNUaNogihvjIjp+3hRdExCCEr20meH/ y7xjWi2mTic18LDU6jJ+rO3hx1t9RxJkAjK9aRQvIYeTlT66yKaiZPoCnbBH1bI0 4syLc+ds5zNTBSc2b6VjO3ohqD2/g6ZG2+kzuF/R2hdh+Z4JpXlIh9BPhSM7muwt Vh/N1H9xYI9QtRTLu00JwzPbJ6bqCmKtKTlbPb+dsoZA0V5flhwkV5gy+4DQ9WSU XIDcJEgyZyG/sKFxLbc83cw4nbCYiNnhT88gFu5dmEilNpW65iE1zEiLG85d+h8f PyfdNd5MUtQPHErnUbE2tWrtZNsYH+q/xtiPEq0y7FKHQ== 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= 1659418336; x=1659504736; bh=Ge7j60aibO5Z3y1t3igfL1XiHvVASWRdGw8 tdLd4ALc=; b=CWo9eJtmJMI7y7XwTQWQvRbspJcOEdc63kMzDpevPy7yUT0Ituo cKWrTlu25+72m7F/59cmbsGZYvFYufYuNTZFh07oWvIyNerRv3w/GCp8iBQo0JEk eKX142ikBnyhlHJgzmU+MpB1o1mFrNIs6iKsRHXYdPLdDRHvxRBxRbttFqAZ8DBb zaFEAZcLCvq8FqtFTUO94HEExPw3zp3Y9KCWnDrqwJjED2/ZOa65t06z207QUPcv zoSjuohrRd4BjCHJ3STA3RFQuturO4DpPJnjouTRhhmIDhgSP51x8yBZSg+zUSM5 F192WXpctQd2hP4WCO0KLFdgOh7CudUuM/w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddvgedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepkeevlefhjeeuleeltedvjedvfeefteegleehueejffehgffffeekhefh hfekkeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 Aug 2022 01:32:15 -0400 (EDT) From: Samuel Holland To: Liam Girdwood , Mark Brown , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Rob Herring Cc: Samuel Holland , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH v2 0/4] regulator: Add support for Allwinner D1 LDOs Date: Tue, 2 Aug 2022 00:32:09 -0500 Message-Id: <20220802053213.3645-1-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This series adds bindings and a driver for the two pairs of LDOs inside the Allwinner D1 SoC. A preparatory binding and driver change is required for the SRAM controller, so the regulators device can be its child node. Changes in v2: - Remove syscon property from bindings - Update binding examples to fix warnings and provide context - Use decimal numbers for .n_voltages instead of field widths - Get the regmap from the parent device instead of a property/phandle Samuel Holland (4): dt-bindings: sram: sunxi-sram: Add optional regulators child soc: sunxi: sram: Only iterate over SRAM children regulator: dt-bindings: Add Allwinner D1 LDOs regulator: sun20i: Add support for Allwinner D1 LDOs .../allwinner,sun20i-d1-analog-ldos.yaml | 65 +++++ .../allwinner,sun20i-d1-system-ldos.yaml | 57 +++++ .../allwinner,sun4i-a10-system-control.yaml | 3 + drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/sun20i-regulator.c | 232 ++++++++++++++++++ drivers/soc/sunxi/sunxi_sram.c | 3 + 7 files changed, 369 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-analog-ldos.yaml create mode 100644 Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-system-ldos.yaml create mode 100644 drivers/regulator/sun20i-regulator.c