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 DA306C00144 for ; Mon, 1 Aug 2022 17:30:40 +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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WQvLnrxdT7oz/G2DtCWNAktoxebPru//K4p4rs92MrI=; b=TSAL+drE1lFocf mdTI5/e9AGM4+fV+lBy8b434MuD7XYSb4F4tgdKsq6ENxabSrz5rI+q6mrIurCWLP1Y6zT2oICeZH JVwGDjet8apgsVr2PPB0Q74lkRKtD5VhIR+3y38V2iN0M/o7d5f8C51fdB29JqaoTQSbZYHIpU1lq NvloNMGVQYuNMu7C+U/F0wMk4nsUMlvkcT4/eFbLHKbadOolL7StsE/lauYX2Yn4OuBeQZMZWiYFt Pv6rA8AwR8NEbPFUQ9JX/6X2OfHY9H/4bGkQZx0VlX4jI8iuRnZ7rfGbVNXhk7U5VLCUYtJ2pUEYB jIqDxJyCcloDnTCqn1uw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIZCx-008F87-HQ; Mon, 01 Aug 2022 17:27:59 +0000 Received: from mail-il1-f171.google.com ([209.85.166.171]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oIZCu-008F5S-Jb for linux-arm-kernel@lists.infradead.org; Mon, 01 Aug 2022 17:27:58 +0000 Received: by mail-il1-f171.google.com with SMTP id g18so5873200ilk.4 for ; Mon, 01 Aug 2022 10:27:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=DT2Geze8xZk20nzhJQnuaecT6m/qepz1PXwiI2wJ8mo=; b=I7QG/gCur+KnKPb0vvEqbvi7dViBbg+GlQrHh3PJnEc0rgAlzqIGQCEyoKZ3RdToFZ s9G9xNSORn86dPUMHc3tMyiWxwBLnIfB1MmNUBPY4gbJB0DXi9cWvn3aHaUJmFlyQ3dQ Ph+G1Kqj3u6LFuDIRp2Z4Qn25WM6l3pF3k7AsBZXgF1zfkdTHGMIJEEyTLtA5fmQgqso xyGlKwOuARWqUKJIPxzdPig4Zd2SxvLG5NTLDQVEeEU9n1bajPJMq7yhQi2Rvb8tkn/A Dgy7A9Y53Csxxk1xMoYoTEy1qi/rs3Hl979RHlhlunXNY5iSqypr1JMrOIhYHr0fzjWe gUOA== X-Gm-Message-State: ACgBeo1gPjK/K7xJNViFntvQwFRYQ2QkG6u+4XqjlWYhv1C4U/IuJWZk qbQpQ8hqJGEVnHEomQelo0oSYIyvIg== X-Google-Smtp-Source: AA6agR74AJrs16WLEPSZfKvH/nCWTfqHGbm7FoFlr61YvcMuA85bUtzPe+FO0BVG+LydNvaDZJ2l5A== X-Received: by 2002:a05:6e02:1546:b0:2de:2a87:b9d0 with SMTP id j6-20020a056e02154600b002de2a87b9d0mr6113732ilu.134.1659374873632; Mon, 01 Aug 2022 10:27:53 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.248]) by smtp.gmail.com with ESMTPSA id c10-20020a0566022d0a00b0067c09fd0b53sm5847043iow.21.2022.08.01.10.27.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Aug 2022 10:27:52 -0700 (PDT) Received: (nullmailer pid 1211753 invoked by uid 1000); Mon, 01 Aug 2022 17:27:50 -0000 Date: Mon, 1 Aug 2022 11:27:50 -0600 From: Rob Herring To: Samuel Holland Cc: Liam Girdwood , Mark Brown , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH 1/2] regulator: dt-bindings: Add Allwinner D1 LDOs Message-ID: <20220801172750.GA1198151-robh@kernel.org> References: <20220801044758.12679-1-samuel@sholland.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220801044758.12679-1-samuel@sholland.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220801_102756_670657_E6126C9A X-CRM114-Status: GOOD ( 26.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 Sun, Jul 31, 2022 at 11:47:57PM -0500, 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 syscon exported by some "host" device node. > Getting the register via a syscon avoids a dependency on the subsystem/ > driver for that host device (e.g. a functioning thermal sensor should > not depend on having the audio codec driver loaded). > > Signed-off-by: Samuel Holland > --- > > .../allwinner,sun20i-d1-analog-ldos.yaml | 77 +++++++++++++++++++ > .../allwinner,sun20i-d1-system-ldos.yaml | 55 +++++++++++++ > 2 files changed, 132 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..df648c56123d > --- /dev/null > +++ b/Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-analog-ldos.yaml > @@ -0,0 +1,77 @@ > +# 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, > + and so is exposed as a syscon. > + > +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 > + > + syscon: 'syscon' is not a generic property. Name it based on the block you are linking to or what the control is. Or better yet, if this is the only control interface, make this a child node of the referenced node instead. > + $ref: /schemas/types.yaml#/definitions/phandle > + description: phandle of the device containing the power register > + > +patternProperties: > + "^(aldo|hpldo)$": > + type: object > + $ref: regulator.yaml# unevaluatedProperties: false > + > +required: > + - compatible > + - nvmem-cells > + - nvmem-cell-names > + - syscon > + > +unevaluatedProperties: false > + > +examples: > + - | > + sid: efuse { > + #address-cells = <1>; > + #size-cells = <1>; > + > + bg_trim: bg-trim@28 { > + reg = <0x28 0x4>; > + bits = <16, 8>; > + }; > + }; > + > + ldos-analog { > + compatible = "allwinner,sun20i-d1-analog-ldos"; > + nvmem-cells = <&bg_trim>; > + nvmem-cell-names = "bg_trim"; > + syscon = <&codec>; > + > + 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..13b2e8c84f1d > --- /dev/null > +++ b/Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-system-ldos.yaml > @@ -0,0 +1,55 @@ > +# 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 controller MMIO space. > + > +maintainers: > + - Samuel Holland > + > +properties: > + compatible: > + enum: > + - allwinner,sun20i-d1-system-ldos > + > + syscon: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: phandle of the device containing the LDO control register > + > +patternProperties: > + "^(ldoa|ldob)$": > + type: object > + $ref: regulator.yaml# > + > +required: > + - compatible > + - syscon > + > +unevaluatedProperties: false > + > +examples: > + - | > + ldos-system { > + compatible = "allwinner,sun20i-d1-system-ldos"; > + syscon = <&syscon>; > + > + 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 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel