From nobody Sun Apr 12 04:21:04 2026 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 A370CC19F2B for ; Tue, 2 Aug 2022 05:32:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235761AbiHBFce (ORCPT ); Tue, 2 Aug 2022 01:32:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235717AbiHBFc3 (ORCPT ); Tue, 2 Aug 2022 01:32:29 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 871AA1E3C2; Mon, 1 Aug 2022 22:32:26 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 062B3320084E; Tue, 2 Aug 2022 01:32:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 02 Aug 2022 01:32:26 -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 :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1659418344; x=1659504744; bh=Cd xH8UECdWP/FcfgxxRpxsH2KZRjenbkyAWm1xRm+GE=; b=G4FKdF+nAkhHdDc9xU V11QudM9pIImMjuaM/1DmummhBzGUwRaxnApIpJO9PT+x8KJeUa4RFgyb8cLhSUb OdB7KHKZxTBtuMRSEc1x/eFPx21cpBReM3SJbtjPsts7kBVmKf+KeSeH6x4On0oL riHKBDio9FODZoJqxjgEeDECVSuuw/p/CtT/00y435ix+pR8oQJrA/Quyx2cs5rh yfRUGqlokjL/9oW6w60tbGRe7kUHjaLFciu13qnxPPLGlRUhFd6CAaudnNksciyX wELgA9FRSd6/af82YdqcRhffq2jfaaFsg45VI/dcChtbRo9ztElWRdyZX6TgWpWJ 0rYw== 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:in-reply-to :message-id:mime-version:references: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=1659418344; x=1659504744; bh=CdxH8UECdWP/F cfgxxRpxsH2KZRjenbkyAWm1xRm+GE=; b=bf0f5UIm+QtFpyTXIdcU8+e1WUEMp 5PN8EQ6pLBYw1Cjfqld+K7Mc4oganQYhXhavV53ZUqPtDcTr2N/2FnkmKkzkNd+6 i0IIcCHOf73WdehybnnyJfE4gEGs28O7/6gnllHQVWUqkqJlMwNyfMhJRBHM7kHL QXlE4XRp+N4zmEANOUJlY8Q0IY3aZLqucV82g2mh5uqWUn55Q0fs+h7Lm0rumr1q tXZQSWvUoOsXPw7daooIMVemBJ7mC3sgEgpSfZ4r23BlBRSROLCcJahxQQXfesRu fIB0wY1dQnsFVtBOHkIhPrx/BifYd/L6hPyTn8Xu2dZ/knJfWdnPv+sDQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddvgedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepgffhvefhgfehjeehgfekheeuffegheffjeegheeuudeufeffhffh ueeihfeufffhnecuffhomhgrihhnpeguvghvihgtvghtrhgvvgdrohhrghenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhh ohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 Aug 2022 01:32:23 -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 3/4] regulator: dt-bindings: Add Allwinner D1 LDOs Date: Tue, 2 Aug 2022 00:32:12 -0500 Message-Id: <20220802053213.3645-4-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220802053213.3645-1-samuel@sholland.org> References: <20220802053213.3645-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The Allwinner D1 SoC contains two pairs of in-package LDOs. One pair is for general purpose use. LDOA generally powers the board's 1.8 V rail. LDOB generally powers the in-package DRAM, where applicable. The other pair of LDOs powers the analog power domains inside the SoC, including the audio codec, thermal sensor, and ADCs. These LDOs require a 0.9 V bandgap voltage reference. The calibration value for the voltage reference is stored in an eFuse, accessed via an NVMEM cell. Neither LDO control register is in its own MMIO range; instead, each regulator device relies on a regmap/syscon exported by its parent. Signed-off-by: Samuel Holland --- Changes in v2: - Remove syscon property from bindings - Update binding examples to fix warnings and provide context .../allwinner,sun20i-d1-analog-ldos.yaml | 65 +++++++++++++++++++ .../allwinner,sun20i-d1-system-ldos.yaml | 57 ++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/allwinner,s= un20i-d1-analog-ldos.yaml create mode 100644 Documentation/devicetree/bindings/regulator/allwinner,s= un20i-d1-system-ldos.yaml diff --git a/Documentation/devicetree/bindings/regulator/allwinner,sun20i-d= 1-analog-ldos.yaml b/Documentation/devicetree/bindings/regulator/allwinner,= sun20i-d1-analog-ldos.yaml new file mode 100644 index 000000000000..19c984ef4e53 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-analo= g-ldos.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/allwinner,sun20i-d1-analog-ld= os.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner D1 Analog LDOs + +description: + Allwinner D1 contains a set of LDOs which are designed to supply analog = power + inside and outside the SoC. They are controlled by a register within the= audio + codec MMIO space, but which is not part of the audio codec clock/reset d= omain. + +maintainers: + - Samuel Holland + +properties: + compatible: + enum: + - allwinner,sun20i-d1-analog-ldos + + nvmem-cells: + items: + - description: NVMEM cell for the calibrated bandgap reference trim = value + + nvmem-cell-names: + items: + - const: bg_trim + +patternProperties: + "^(aldo|hpldo)$": + type: object + $ref: regulator.yaml# + +required: + - compatible + - nvmem-cells + - nvmem-cell-names + +unevaluatedProperties: false + +examples: + - | + audio-codec@2030000 { + compatible =3D "simple-mfd", "syscon"; + reg =3D <0x2030000 0x1000>; + + regulators { + compatible =3D "allwinner,sun20i-d1-analog-ldos"; + nvmem-cells =3D <&bg_trim>; + nvmem-cell-names =3D "bg_trim"; + + reg_aldo: aldo { + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + }; + + reg_hpldo: hpldo { + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/regulator/allwinner,sun20i-d= 1-system-ldos.yaml b/Documentation/devicetree/bindings/regulator/allwinner,= sun20i-d1-system-ldos.yaml new file mode 100644 index 000000000000..c95030a827d6 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-syste= m-ldos.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/allwinner,sun20i-d1-system-ld= os.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner D1 System LDOs + +description: + Allwinner D1 contains a pair of general-purpose LDOs which are designed = to + supply power inside and outside the SoC. They are controlled by a regist= er + within the system control MMIO space. + +maintainers: + - Samuel Holland + +properties: + compatible: + enum: + - allwinner,sun20i-d1-system-ldos + +patternProperties: + "^(ldoa|ldob)$": + type: object + $ref: regulator.yaml# + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + syscon@3000000 { + compatible =3D "allwinner,sun20i-d1-system-control"; + reg =3D <0x3000000 0x1000>; + ranges; + #address-cells =3D <1>; + #size-cells =3D <1>; + + regulators { + compatible =3D "allwinner,sun20i-d1-system-ldos"; + + reg_ldoa: ldoa { + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + }; + + reg_ldob: ldob { + regulator-name =3D "vcc-dram"; + regulator-min-microvolt =3D <1500000>; + regulator-max-microvolt =3D <1500000>; + }; + }; + }; + +... --=20 2.35.1