Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2369912imn; Mon, 1 Aug 2022 23:28:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR7hasUjFURh4xfE4dQ4HdblVWCK6F8icxYLJBCTfK8gLQvFBaXcK3I986tARzXbLZdQAFtx X-Received: by 2002:a17:902:b786:b0:16d:a8f3:b2c2 with SMTP id e6-20020a170902b78600b0016da8f3b2c2mr20046695pls.91.1659421697077; Mon, 01 Aug 2022 23:28:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659421697; cv=none; d=google.com; s=arc-20160816; b=ItUUf4K7WUzf2EFMfpC90HV6zKZpmtvJ1BuQwq+XCSHQmj+pkvzIAP/+qL705RJ58k hTDBboP52p7CdsBMMTpHTJblUB7+tPwaDrPxZN183lrY1mTbkv1UrafhRVw+8swlwA2P FHjyRADb1psJuIJicRLQ/YQ+5wdSNEiVIZhvCZVAjginSI6EFk3CGc7pBU0nJQ4zcYh9 Gf0TLJjYw1y/VeCmgqMOHSIO8E6T5JnPkr+9KG/K94DYLWXMkhQh7248sPSjNrYrl863 Ex7S5I+k68n7T4RXNn6mlhFCPoDXuNEXze5tweexX/SjdXLYfr7rbfola7/vu07krowH Jgcw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=CdxH8UECdWP/FcfgxxRpxsH2KZRjenbkyAWm1xRm+GE=; b=z9YupwlLH/bcGeFGjnCZ3go9ozUuRN6n/U3B+rz5cn33pOe2Dc1E4Kin32FDl0/Dn0 ZsChsD9aEO6nOe6IvKGG2IjgQ6hD+cGRUTBSBaD3dMf/ZgbXJWmPYTdaJHEopge1xUse PLhnKNi9Z5cesXRsxAJfrn8mfDNnZF3Q3yCNDVWLnWCXVdIBCsbJrK1etGOg8lTOI5JE 8BEczxF3O2cGbt1ffoeSNrGwLbrawWkwcKdesR+bFERhISdrvl/qZVcr7x3xQPdBchBj pJHK2P2z5Y9tKZohknSnT+1twQACqkkeAaTzwrH2OFUw5WA/BsV7rlR2uU0wx8uYCsez 6RpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=G4FKdF+n; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=bf0f5UIm; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020a170902eb8700b0016ee6e782a4si5032031plg.560.2022.08.01.23.27.59; Mon, 01 Aug 2022 23:28:17 -0700 (PDT) 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=G4FKdF+n; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=bf0f5UIm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235754AbiHBFcd (ORCPT + 99 others); Tue, 2 Aug 2022 01:32:33 -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: 8bit 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 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,sun20i-d1-analog-ldos.yaml create mode 100644 Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-system-ldos.yaml diff --git a/Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-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-analog-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-ldos.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 domain. + +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 = "simple-mfd", "syscon"; + reg = <0x2030000 0x1000>; + + regulators { + compatible = "allwinner,sun20i-d1-analog-ldos"; + nvmem-cells = <&bg_trim>; + nvmem-cell-names = "bg_trim"; + + reg_aldo: aldo { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + reg_hpldo: hpldo { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-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-system-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-ldos.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 register + 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 = "allwinner,sun20i-d1-system-control"; + reg = <0x3000000 0x1000>; + ranges; + #address-cells = <1>; + #size-cells = <1>; + + regulators { + compatible = "allwinner,sun20i-d1-system-ldos"; + + reg_ldoa: ldoa { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + reg_ldob: ldob { + regulator-name = "vcc-dram"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + }; + }; + }; + +... -- 2.35.1