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 AD078C25B08 for ; Wed, 17 Aug 2022 08:29:15 +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=mp1hCNK+fvan+p6EbWt/F8/ZkBKz9fmaK4E9igag5hU=; b=gh8RuRKGtaMk0Z lsV8gL+Ng3Qnk82JrIx5sJQbbw+/C3bP4jH7pT6pendtvtfnEWw2b2O9Mk11hGgksmkHc30c9v+OB 5ANE30FB72cQPOsTIH4MfBhjRgTcWQwRrEbXcAzKRB3jQZDR9Oqi9FRgEbJm1rK4yBe+cMmLLl+h+ WS+bjyWtoOdRkGlbL/WQoatEzd1EvsIY0hW1605sYUVDbDtGsZgUMqIdYVHO8UYkwWsrbXqqZF/p6 fDEsLm0CYmi+/EC4VEMnWWsEno4N+pdbGyExymt+ksFmpk6yhNQDGdGKVprRtkv69o1MRpAnp69aU g0LvhFGg4SLil5au1f9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOEOu-00F3ec-MO; Wed, 17 Aug 2022 08:27:48 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOEOn-00F3LX-Ni for linux-arm-kernel@lists.infradead.org; Wed, 17 Aug 2022 08:27:39 +0000 Received: by mail-lj1-x229.google.com with SMTP id z20so12886134ljq.3 for ; Wed, 17 Aug 2022 01:27:35 -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=AUEPEQrtzko3joxTi1sNDT6jkQbhLcJuQtYh6DenYSA=; b=nvE89qoyuJ5S85vyg4UJj47vgOJ1KSuQrxyguNw90tM3rZPQahsF/3uoGZDYB53L6V tOBSMt/rNLd3mHVs7bhbXRtoxQzf9viHfNIvOU/KJ7iE8nzhskPFLF4J4+kxXwHb4908 8umXckfKAtfIzc2UNRFGJ6iI40vol9INqgR3SWmYBf6g3kPhirTObNp84j/9lfmCqtFP DuijiwVT6nMgeJkOZCc0vQAKzuE+Og0LsGyfvmYoRGz7Z3+LyQdJZNnf83NNaJt64o8D UZfjdgAhlldxoaqPaQgySeMH9Ha0u+HduSOuyUkLraniJcOjP6L5NlYG6JjipQdLcyHj tTzA== 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=AUEPEQrtzko3joxTi1sNDT6jkQbhLcJuQtYh6DenYSA=; b=krCU3kPXzzW60h2G8bT/UflMhNC8DQy/RqIuHN8Wi8QO2oEhE3iu4rw9gKfOyZ2v8B C1dbfLIkGfdfAc86buJl/DRYcdHeuyu7+Y7ltRmVjleK+QCHU/9xqvw1afVBgUZUuxVj VCoUSTk0rexOS8sv2v9xnSXjQi4PKzL4E6i9TCXdr/wBjLF50EAMA7a684Ah3tGhD0Ry PvZSmVBzTU3yLjN7NO6pA7n9e8mr1CBTAp6jGiSbVPZe1eOars5/QPlNsion2+Yv2tYv OVwj1ML9E833mB+/2FzEruoNCxpJIFA82tsXrY4Qa0LTOIqn8PazSzyAB/r99r7dqGZ9 V0vg== X-Gm-Message-State: ACgBeo2A7r+yWN9utM+5SVvdHDcd8hI8NK4c/wRlKAA+nQLFT0uSwdBB 4KgXQ9InSsBjSZxwXcZVe/+Gb3qT3T9G0eiG X-Google-Smtp-Source: AA6agR5muIWF3q3plYn12f7zASTsP+6/wcsnnjxssIfFoa3erwi9zoCQbNgiFDsB6V6VUPtXloAiZw== X-Received: by 2002:a2e:b8c2:0:b0:25f:f714:2e9f with SMTP id s2-20020a2eb8c2000000b0025ff7142e9fmr7243540ljp.95.1660724853551; Wed, 17 Aug 2022 01:27:33 -0700 (PDT) Received: from ?IPV6:2001:14bb:ae:539c:1b1c:14b7:109b:ed76? (d15l54h48cw7vbh-qr4-4.rev.dnainternet.fi. [2001:14bb:ae:539c:1b1c:14b7:109b:ed76]) by smtp.gmail.com with ESMTPSA id p16-20020a056512139000b00492a0f02758sm316489lfa.28.2022.08.17.01.27.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Aug 2022 01:27:33 -0700 (PDT) Message-ID: <29e6a293-29c4-a9ab-0767-9adfa982226b@linaro.org> Date: Wed, 17 Aug 2022 11:27:31 +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 , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Rob Herring Cc: Liam Girdwood , Mark Brown , 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> <03de0f7b-9251-a5c0-91a1-5f2b5d41d8a0@sholland.org> From: Krzysztof Kozlowski In-Reply-To: <03de0f7b-9251-a5c0-91a1-5f2b5d41d8a0@sholland.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220817_012737_884553_4BD8B3E4 X-CRM114-Status: GOOD ( 24.75 ) 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 17/08/2022 11:15, Samuel Holland wrote: >>> + >>> +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. > > Again, the device-specific compatible does not exist, because the binding for > the audio codec has not been written (and it will be quite nontrivial). > > So I can: > 1) Leave the example as-is until the audio codec binding gets written, > and fill in the specific compatible at that time. > 2) Remove the example, with the reasoning that the example really > belongs with the MFD parent (like for the other regulator). Then > there will be no example until the audio codec binding is written. > 3) Drop the analog LDOs from this series entirely, and some parts > of the SoC (like thermal monitoring) cannot be added to the DTSI > until the audio codec binding is written. > > What do you think? How about just removing the audio-codec node? The schema is about regulators, not audio-codec. OTOH, if you have parent device schema, you could put the example only there. But as I understand, you don't have, right? > > The same question applies for the D1 SoC DTSI, where I use this same construct. This is not correct and should be fixed. Either you add the schema with compatible or please drop the device node from the DTSI. > > (And technically this does validate with the current schema.) > >>> + 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. > > Rob asked me to move the example to the parent binding, so I did. The example is > added in patch 3. Yeah, I noticed it later. It's fine. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel