From mboxrd@z Thu Jan 1 00:00:00 1970 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 D3CE6C2BB41 for ; Tue, 16 Aug 2022 09:56:59 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=r5aUV3VhDoZ3cYCL6m7GbKKhz9Jj1w6tdlG6HMp3IUA=; b=IGdfNaqg272hX+ ESg6hOiFW8FCGs1Nj3kfN+B0p2QiJakYmz4vdFEgJWr0MpInHVMUwJwaQKYsUcvfG/e+6ntmvWxz/ 75YSys2zyiYIJwsgl0Wz5HsSoTjWEkdqG6ie490KpSjDTd9+5xWYWdxdOzA4mHPTVN4oP318W3HCO 3EeN7HdOjsmDiKgw6738cgqQk+rCW60fGwJQw1YgX6xmEao0scpCfVGEUUKb3fBFUHzhO2uJntyXV YOjsZX8YjJvkAX8rJrrsfAhc9mG1kYCvr9faWPs+r3jmsSo05qV1hwL3pBV62FeUT8jyHho+DQUP/ epJoXg+RN5wrCspFsfUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNtIh-000XP1-Fn; Tue, 16 Aug 2022 09:55:55 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNtId-000XLt-CS for linux-arm-kernel@lists.infradead.org; Tue, 16 Aug 2022 09:55:53 +0000 Received: by mail-lf1-x129.google.com with SMTP id w5so14220750lfq.5 for ; Tue, 16 Aug 2022 02:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=ouC/nNUCrt3P9AuPPNvbcQrm5hP3Vq91u5mO0hzhgiE=; b=M15UJ2gOPRlQBuniCuEzZ1DZQGIvMn6hZQugOgpxtBBpI+dVn7JouVQf2GgunA7fn2 JGCezc6VJWURz7ImxJVhUQ1Qz5aMgHzjtlZdj+33GXQ46q1BYMSGq5SkRD4fwJvMqPlP o63wR8dJ9no0B/xph6tdn/7+uc/0sl8zt6epZgRD/qN3z1cKpcLBCKbuyL8WgxuHRK5z j0FEcfQJZS9KCpo0LE3cW5Fl8nR+LfkaOKs9KNfAefMqQWnqobQJ5PH4mP4vTRQ8FGQq V4G8ZzVuA8C3UdrDZMBNP6yZWs69XBpsV8EwXxXiLt4gvD7s6uFhLcmP34FCmvno2tCF rR1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=ouC/nNUCrt3P9AuPPNvbcQrm5hP3Vq91u5mO0hzhgiE=; b=Pac63P+NT/cjD3uG5y7oPX7+auwPRLeMzjjSrSRxG/Qi00GAmso1tcr8WA/G6ylSTH NGyWHQUpsaHftdumdq/sK2p5BHlwffXAn090ZsA74udvilJCW8J2eGv/JqlabJnZM2aj pHtR6xwHlM8nfJeATuPQj3b16TiS5Z9muWLF9yKQ6HTRSmQ/8msipfjTJ88bCRuxCATv w4o7V5BXnjp7mx1npTCN6Msfzj1wE80gmPijmvRX8XIdIXJp+ta/7ePds/UJmdsswzjz /QJYKEKrO2bdD/nDxaehWERa8hTDBB4el64kRFNM1MJNk2JwT6JBrSXpGmsqXkW6PNSC YQmQ== X-Gm-Message-State: ACgBeo3J5pokRYxHxInRtJlpJU07kHnaBHa6smRZ2X3wD4z19q74V6EI XVthHnGifEHTvCv9bUCgoSQjOg== X-Google-Smtp-Source: AA6agR4ck7myM8UAKNZmScqtxz9CNJgaLd86fBns30J2pD7pFR0A3bi0Rz8iFtZoxIVrvkf43riM/w== X-Received: by 2002:a19:3856:0:b0:491:7b45:7617 with SMTP id d22-20020a193856000000b004917b457617mr4301867lfj.47.1660643749373; Tue, 16 Aug 2022 02:55:49 -0700 (PDT) Received: from ?IPV6:2001:14bb:ae:539c:1782:dd68:b0c1:c1a4? (d15l54g8c71znbtrbzt-4.rev.dnainternet.fi. [2001:14bb:ae:539c:1782:dd68:b0c1:c1a4]) by smtp.gmail.com with ESMTPSA id v5-20020a2e2f05000000b0025e4dcc48b1sm1724683ljv.19.2022.08.16.02.55.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Aug 2022 02:55:48 -0700 (PDT) Message-ID: Date: Tue, 16 Aug 2022 12:55:47 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v3 1/4] regulator: dt-bindings: Add Allwinner D1 LDOs Content-Language: en-US To: Samuel Holland , Liam Girdwood , Mark Brown , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Rob Herring Cc: Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev References: <20220815043436.20170-1-samuel@sholland.org> <20220815043436.20170-2-samuel@sholland.org> From: Krzysztof Kozlowski In-Reply-To: <20220815043436.20170-2-samuel@sholland.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220816_025551_525748_4598927E X-CRM114-Status: GOOD ( 22.91 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 15/08/2022 07:34, Samuel Holland wrote: > 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 v3: > - Add "reg" property to bindings > - Add "unevaluatedProperties: true" to regulator nodes > - Minor changes to regulator node name patterns > - Remove system-ldos example (now added in patch 3) > > Changes in v2: > - Remove syscon property from bindings > - Update binding examples to fix warnings and provide context > > .../allwinner,sun20i-d1-analog-ldos.yaml | 74 +++++++++++++++++++ > .../allwinner,sun20i-d1-system-ldos.yaml | 37 ++++++++++ > 2 files changed, 111 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..d6964b44ef21 > --- /dev/null > +++ b/Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-analog-ldos.yaml > @@ -0,0 +1,74 @@ > +# 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 Please follow the example schema. Order is: title, maintainers, description. > + > +properties: > + compatible: > + enum: > + - allwinner,sun20i-d1-analog-ldos > + > + reg: > + maxItems: 1 > + > + nvmem-cells: > + items: > + - description: NVMEM cell for the calibrated bandgap reference trim value > + > + nvmem-cell-names: > + items: > + - const: bg_trim > + > +patternProperties: > + "^(a|hp)ldo$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > +required: > + - compatible > + - reg > + - nvmem-cells > + - nvmem-cell-names > + > +unevaluatedProperties: false > + > +examples: > + - | > + audio-codec@2030000 { > + compatible = "simple-mfd", "syscon"; This cannot be on its own. Both require device specific compatible. > + reg = <0x2030000 0x1000>; > + ranges; > + #address-cells = <1>; > + #size-cells = <1>; > + > + regulators@2030348 { > + compatible = "allwinner,sun20i-d1-analog-ldos"; > + reg = <0x2030348 0x4>; > + 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..e3e2810fb3d7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-system-ldos.yaml > @@ -0,0 +1,37 @@ > +# 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. Fix order. > + > +maintainers: > + - Samuel Holland > + > +properties: > + compatible: > + enum: > + - allwinner,sun20i-d1-system-ldos > + > + reg: > + maxItems: 1 > + > +patternProperties: > + "^ldo[ab]$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > +required: > + - compatible > + - reg > + > +unevaluatedProperties: false Example please. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel