From patchwork Fri Nov 25 04:01:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 25801 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3755284wrr; Thu, 24 Nov 2022 20:04:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf4nwArr6ot2hhCJ7MpujKd0P1608fml1nsfIQ+ZBiTlM1fi/SIJVNQflfYUT8ObUlewKAu7 X-Received: by 2002:a05:6402:2074:b0:46a:bb9e:40d1 with SMTP id bd20-20020a056402207400b0046abb9e40d1mr642434edb.242.1669349071534; Thu, 24 Nov 2022 20:04:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669349071; cv=none; d=google.com; s=arc-20160816; b=DuUeIPy4Rl9C6DEhUBOcLUBmb6he0dNiBky+of0Xu9ZnSfEzAt9kDW+g74393x1qJn 1QYKG23Zely/jArJcFpJ6XzjTpkeoSDDkD+gemAeTKgnNKNPNt9J9QKPiTHUtr7WuzK4 IrKWdzjNXdyekJRj7P6IoEnwzyv+PTjCoe//WhB01TdwKDIDkfUcKJXCu1zju3+p8jMv OpUOnAO1cSctoG0cz+GjkiOU4nV5XHSXHzbeEr/UvaKSoAI3JucFUPO6S2SYzDRH2aLS 8Dh9nMeQJznYQ7SkGX6n+s3VbfOlPJuOoO2O7ZbQdvrpL9Hjd1sEJ5eoPiS1++ZjnbeQ aRJg== 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=JCuy5R1bmezvRsKKC80yVJZVXQr04HtEota8U0NbJjg=; b=rbo8jxC2tc++ZljOJfWaxjoRT1kxtmDp9Z2Q/CGbgEgWNJeSGoGdTMmBXvnTFxP5Nn Kq6hUacE7TBcI2j16zy5GUxtHSWLBSczMzLVxgdKgB9NhqYWUkEiauy9Hg87BcFHjiaT IM8HER3oZ/KYbmy/g0ApDVO84UOL21JC+pmjNt0K6xh48L4Ak7lGnnlCFjElXK5i8pmp quMhZ8nFa3hWcPhoa5fE+HtkJMLVMc3dZPhI7u2+ndtDNuZUwAWx23QaXuzVbPPhjHl0 H+9BpPB0PuJCDEDYIkPW1BaAEbbSBAY0EGReEQu2xkxmy9oJDEJjfidIrkaMJXtYGit5 JpNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=pV3mAWbO; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=XMZoSQxW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a50c34d000000b004622c1b8597si1630505edb.407.2022.11.24.20.04.06; Thu, 24 Nov 2022 20:04:31 -0800 (PST) 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=fm2 header.b=pV3mAWbO; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=XMZoSQxW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229686AbiKYEB5 (ORCPT + 99 others); Thu, 24 Nov 2022 23:01:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbiKYEBT (ORCPT ); Thu, 24 Nov 2022 23:01:19 -0500 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35137275DA; Thu, 24 Nov 2022 20:01:17 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A063B5C007D; Thu, 24 Nov 2022 23:01:16 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 24 Nov 2022 23:01:16 -0500 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=fm2; t=1669348876; x=1669435276; bh=JC uy5R1bmezvRsKKC80yVJZVXQr04HtEota8U0NbJjg=; b=pV3mAWbOCg93trlgZx /1h3cuCuOMY9zXfkAP4NGNzAxC+255BVmIcwlVSvREpiPvEqicLzMLR74ZYaqVqX QwvlCr0t9pUMdbo+HFwjKA7kzlsQR+XykVknon45ePQpaqYeUZXILTAqDlOM9kKW 4Nl6BvrsENNMOH8ysAV2s68uUx39BWvWruxBeB+3hR4tomoyeapeXdFVHhjv/xKy 3Y8lQDWTHG+Q1WnX2EL4EzAoM5SufLJAU9FKBkuHgkT/sGIKusx0Cd6YcYgwnD1l IaS/QsTXBBziCUWnfBuFRKMKkBr64MQsadxAADjBCBUQqRr1jEf0pZGSpj1yu+RF 7Zhg== 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=fm1; t=1669348876; x=1669435276; bh=JCuy5R1bmezvR sKKC80yVJZVXQr04HtEota8U0NbJjg=; b=XMZoSQxWq82mXpjImbElp9zPLsjuK KyS9+K0U1PY0yWlzK1O0jaantcgGnImgv7neH5k+TObfowod4EtTUrYhVtjZcuVW IieU87B05wzlMeAHHXJdtamOPcOEvl66VJ03sYUZB7rx05W4w8n0m4yRa+ibqDUz kvjjIP3xKF11wnPyufWBz8T3TOYNV5BtD+vyf2lV64C2Xr/hgkAYhKPByMezTmUi fKZdiTq1tuSX59HTudt7/TPGi248TZ+32sYnm6cZTbAEMuyh5W6hyeAq7sz9PXfq qxGZFpz4cyTgQe0fZuHeBfeF9ybU75SHJVv52DzuWyuX9r7Gv/80OiDAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieeggdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpefghfevhffgheejhefgkeehueffgeehffejgeehueduueeffffhhfeu iefhueffhfenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhho lhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Nov 2022 23:01:15 -0500 (EST) From: Samuel Holland To: Liam Girdwood , Mark Brown , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Rob Herring Cc: Samuel Holland , Andrew Lunn , Heiko Stuebner , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH v4 1/4] regulator: dt-bindings: Add Allwinner D1 system LDOs Date: Thu, 24 Nov 2022 22:01:09 -0600 Message-Id: <20221125040112.18160-2-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221125040112.18160-1-samuel@sholland.org> References: <20221125040112.18160-1-samuel@sholland.org> MIME-Version: 1.0 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750439371861547918?= X-GMAIL-MSGID: =?utf-8?q?1750439371861547918?= The Allwinner D1 SoC contains two pairs of in-package LDOs. The pair of "system" LDOs is for general purpose use. LDOA generally powers the board's 1.8 V rail. LDOB powers the in-package DRAM, where applicable. Signed-off-by: Samuel Holland Reviewed-by: Krzysztof Kozlowski --- Changes in v4: - Fix the order of the maintainer/description sections - Replace unevaluatedProperties with "additionalProperties: false" - Drop the analog LDOs until the codec binding is ready 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 the parent binding) Changes in v2: - Remove syscon property from bindings - Update binding examples to fix warnings and provide context .../allwinner,sun20i-d1-system-ldos.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/allwinner,sun20i-d1-system-ldos.yaml 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..ec6695c8d2e3 --- /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 + +maintainers: + - Samuel Holland + +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. + +properties: + compatible: + enum: + - allwinner,sun20i-d1-system-ldos + + reg: + maxItems: 1 + +patternProperties: + "^ldo[ab]$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +... From patchwork Fri Nov 25 04:01:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 25802 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3755296wrr; Thu, 24 Nov 2022 20:04:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf5XU3meF4LX+hs0rrogfS8d6Vbfwey+qnJ4Z/+u+rwyuTomLoJpI50tXUwfLOqBGvWJFGWi X-Received: by 2002:a17:907:d40c:b0:7bb:c496:ca45 with SMTP id vi12-20020a170907d40c00b007bbc496ca45mr3523990ejc.464.1669349074043; Thu, 24 Nov 2022 20:04:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669349074; cv=none; d=google.com; s=arc-20160816; b=DUzxDxBlmOYFEkZM7HvlGUQwOqmQsqcnG32iS+bPLLQxjPeC0jdefIc6HJX2PdtdT7 MF2aDs2sjc+H8R7+7EJeBb6hABZMmOcnwW+uKvu9yFKcqEwTDGIWa86sjsWLFOnguU2e OP7NhKvx9S6D+XCR6upskAcDs5VR96ED+xePClx7MwApCJilnknfGkadEB7uKN8MZM8I xs8eY7q+rrFq+mNcuzx5onpt/NnfVDt2YeNueVoeH8U3b+jq1jvMy/0EXLkSv8VgS0wh IkKeg8JIUYqh658ANtgNThYbV4tm+m2x9J2ryTxFhHCfks+Nxw7/vIRrovkBAsWDjVyj DUhA== 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=wnaTOhFhwVFvlLpXmB27jPEeXmF21EO1MoGqYkoBTaw=; b=0GvanFxzP1lhNV2Nx3Qz6zYNSD3c7nB07Ge/mXbT2RUdLejfO+cvBOG9/io8J05GKS aIsaEimGfBkIlHuXPqK5f3RVs3pJTwElS46vNyuaSM1rE8Y+eZTktZNR043ifCiEBdW4 dhxm9CzmVqBHGj1J4+OzusZMlxywLrMf5OlxrI7/js4OO/jqPjZZs5teOnb9a9n3PyTd DI9scA1bh4q5GBchWWBdsqTjbLxJQQjsNQ6o3ERBH+eC1+LSQCBamWjGJ2vPSKoJPoqk GwQt8o603ORq+M87eKvfaejOA3gIAuY8B0IC9KkmOmzQox08fPwloMC+MWxOx+6fIXEH /2PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b="TZfMg6/y"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=ZHigOORO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cy15-20020a0564021c8f00b004627741e339si2369054edb.113.2022.11.24.20.04.10; Thu, 24 Nov 2022 20:04:34 -0800 (PST) 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=fm2 header.b="TZfMg6/y"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=ZHigOORO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229553AbiKYECI (ORCPT + 99 others); Thu, 24 Nov 2022 23:02:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbiKYEBT (ORCPT ); Thu, 24 Nov 2022 23:01:19 -0500 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E3C72C664; Thu, 24 Nov 2022 20:01:18 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B71815C010A; Thu, 24 Nov 2022 23:01:17 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 24 Nov 2022 23:01:17 -0500 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=fm2; t=1669348877; x=1669435277; bh=wn aTOhFhwVFvlLpXmB27jPEeXmF21EO1MoGqYkoBTaw=; b=TZfMg6/yUwRvU5p741 /Dsrj7GUOt94UcPsYzMqd+V35FJ+lY/DAKApAIFa9Yb4w7r1bIkvZBFotRk34TSJ MrhNHK3BI9zmxS/wOOs30/UZrC2uaEJ2+gF4udvizjqq0Bhd2pO+MY3Dzm9oOVr4 WLzCe3vrYUPn9Gj7qoLU50zJGUNScFRDs+4OFOZN/wpo2dJZOk4G6Qz1HCIDRC0e PqenNDZtvvhJiaf9Rfn3geI8SBN6BiYiuHzKk67r/Qrz+3Mq8MRZDHudaScH+5Ld VaPGiIm+bTrYlYUEBdtKJ3/vZfRfgPOcziZqWhN8A5zY/C9hLyruf5mKNMXhFSX3 /XuA== 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=fm1; t=1669348877; x=1669435277; bh=wnaTOhFhwVFvl LpXmB27jPEeXmF21EO1MoGqYkoBTaw=; b=ZHigOORO/7OxKiPrmpWl3uDaF+u9V CS5Cq+kJ1UpOKOXXCgST5gboftEWUJOV9r93RIGby4tktSGWxJm3O/UeRFUpLWK5 fXIBa+sjAA/BT5glTSpVgFJ8rps5GTum4j7JvFj2REU48d2P8g/tbEKt7YoMCcJE O7jadvp1BQD1Qp+4s/t/9DVDH/p5IabVQBtuk9MBxbDjlVxp/nmsBSawQE3HOLqK 8FuBgL6fRQk7rO1DNfSCvTWtU19V65sw5UtSRbX5vhUqTabhnv0xag07ZjwNUKZD 3l/qjvoTDPeC6yBFHaN7wARPnHXyIaqYrEjboYjKd6YJBmpYM4GUZvi9w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieeggdeigecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpedukeetueduhedtleetvefguddvvdejhfefudelgfduveeggeehgfdu feeitdevteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Nov 2022 23:01:16 -0500 (EST) From: Samuel Holland To: Liam Girdwood , Mark Brown , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Rob Herring Cc: Samuel Holland , Andrew Lunn , Heiko Stuebner , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH v4 2/4] regulator: sun20i: Add Allwinner D1 LDOs driver Date: Thu, 24 Nov 2022 22:01:10 -0600 Message-Id: <20221125040112.18160-3-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221125040112.18160-1-samuel@sholland.org> References: <20221125040112.18160-1-samuel@sholland.org> MIME-Version: 1.0 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750439375015109757?= X-GMAIL-MSGID: =?utf-8?q?1750439375015109757?= D1 contains two pairs of LDOs, "analog" LDOs and "system" LDOs. They are similar and can share a driver, but only the system LDOs have a DT binding defined so far. The system LDOs have a single linear range. The voltage step is not an integer, so a custom .list_voltage is needed to get the rounding right. Signed-off-by: Samuel Holland --- Changes in v4: - Drop the analog LDOs until the codec binding is ready Changes in v3: - Adjust control flow in sun20i_regulator_get_regmap() for clarity Changes in v2: - Use decimal numbers for .n_voltages instead of field widths - Get the regmap from the parent device instead of a property/phandle drivers/regulator/Kconfig | 8 ++ drivers/regulator/Makefile | 1 + drivers/regulator/sun20i-regulator.c | 150 +++++++++++++++++++++++++++ 3 files changed, 159 insertions(+) create mode 100644 drivers/regulator/sun20i-regulator.c diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 070e4403c6c2..8480532114c1 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -1280,6 +1280,14 @@ config REGULATOR_STW481X_VMMC This driver supports the internal VMMC regulator in the STw481x PMIC chips. +config REGULATOR_SUN20I + tristate "Allwinner D1 internal LDOs" + depends on ARCH_SUNXI || COMPILE_TEST + select MFD_SYSCON + default ARCH_SUNXI + help + This driver supports the internal LDOs in the Allwinner D1 SoC. + config REGULATOR_SY7636A tristate "Silergy SY7636A voltage regulator" depends on MFD_SY7636A diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index 5962307e1130..8e9b5a21123d 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -150,6 +150,7 @@ obj-$(CONFIG_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o obj-$(CONFIG_REGULATOR_STM32_PWR) += stm32-pwr.o obj-$(CONFIG_REGULATOR_STPMIC1) += stpmic1_regulator.o obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o +obj-$(CONFIG_REGULATOR_SUN20I) += sun20i-regulator.o obj-$(CONFIG_REGULATOR_SY7636A) += sy7636a-regulator.o obj-$(CONFIG_REGULATOR_SY8106A) += sy8106a-regulator.o obj-$(CONFIG_REGULATOR_SY8824X) += sy8824x.o diff --git a/drivers/regulator/sun20i-regulator.c b/drivers/regulator/sun20i-regulator.c new file mode 100644 index 000000000000..031bcc3dee50 --- /dev/null +++ b/drivers/regulator/sun20i-regulator.c @@ -0,0 +1,150 @@ +// SPDX-License-Identifier: GPL-2.0-only +// +// Copyright (c) 2021-2022 Samuel Holland +// + +#include +#include +#include +#include +#include +#include + +#define SUN20I_SYS_LDO_CTRL_REG 0x150 + +struct sun20i_regulator_data { + const struct regulator_desc *descs; + unsigned int ndescs; +}; + +/* regulator_list_voltage_linear() modified for the non-integral uV_step. */ +static int sun20i_d1_system_ldo_list_voltage(struct regulator_dev *rdev, + unsigned int selector) +{ + const struct regulator_desc *desc = rdev->desc; + unsigned int uV; + + if (selector >= desc->n_voltages) + return -EINVAL; + + uV = desc->min_uV + (desc->uV_step * selector); + + /* Produce correctly-rounded absolute voltages. */ + return uV + ((selector + 1 + (desc->min_uV % 4)) / 3); +} + +static const struct regulator_ops sun20i_d1_system_ldo_ops = { + .list_voltage = sun20i_d1_system_ldo_list_voltage, + .map_voltage = regulator_map_voltage_ascend, + .set_voltage_sel = regulator_set_voltage_sel_regmap, + .get_voltage_sel = regulator_get_voltage_sel_regmap, +}; + +static const struct regulator_desc sun20i_d1_system_ldo_descs[] = { + { + .name = "ldoa", + .supply_name = "ldo-in", + .of_match = "ldoa", + .ops = &sun20i_d1_system_ldo_ops, + .type = REGULATOR_VOLTAGE, + .owner = THIS_MODULE, + .n_voltages = 32, + .min_uV = 1600000, + .uV_step = 13333, /* repeating */ + .vsel_reg = SUN20I_SYS_LDO_CTRL_REG, + .vsel_mask = GENMASK(7, 0), + }, + { + .name = "ldob", + .supply_name = "ldo-in", + .of_match = "ldob", + .ops = &sun20i_d1_system_ldo_ops, + .type = REGULATOR_VOLTAGE, + .owner = THIS_MODULE, + .n_voltages = 64, + .min_uV = 1166666, + .uV_step = 13333, /* repeating */ + .vsel_reg = SUN20I_SYS_LDO_CTRL_REG, + .vsel_mask = GENMASK(15, 8), + }, +}; + +static const struct sun20i_regulator_data sun20i_d1_system_ldos = { + .descs = sun20i_d1_system_ldo_descs, + .ndescs = ARRAY_SIZE(sun20i_d1_system_ldo_descs), +}; + +static struct regmap *sun20i_regulator_get_regmap(struct device *dev) +{ + struct regmap *regmap; + + /* + * First try the syscon interface. The system control device is not + * compatible with "syscon", so fall back to getting the regmap from + * its platform device. This is ugly, but required for devicetree + * backward compatibility. + */ + regmap = syscon_node_to_regmap(dev->parent->of_node); + if (!IS_ERR(regmap)) + return regmap; + + regmap = dev_get_regmap(dev->parent, NULL); + if (regmap) + return regmap; + + return ERR_PTR(-EPROBE_DEFER); +} + +static int sun20i_regulator_probe(struct platform_device *pdev) +{ + const struct sun20i_regulator_data *data; + struct device *dev = &pdev->dev; + struct regulator_config config; + struct regmap *regmap; + + data = of_device_get_match_data(dev); + if (!data) + return -EINVAL; + + regmap = sun20i_regulator_get_regmap(dev); + if (IS_ERR(regmap)) + return dev_err_probe(dev, PTR_ERR(regmap), "Failed to get regmap\n"); + + config = (struct regulator_config) { + .dev = dev, + .regmap = regmap, + }; + + for (unsigned int i = 0; i < data->ndescs; ++i) { + const struct regulator_desc *desc = &data->descs[i]; + struct regulator_dev *rdev; + + rdev = devm_regulator_register(dev, desc, &config); + if (IS_ERR(rdev)) + return PTR_ERR(rdev); + } + + return 0; +} + +static const struct of_device_id sun20i_regulator_of_match[] = { + { + .compatible = "allwinner,sun20i-d1-system-ldos", + .data = &sun20i_d1_system_ldos, + }, + { }, +}; +MODULE_DEVICE_TABLE(of, sun20i_regulator_of_match); + +static struct platform_driver sun20i_regulator_driver = { + .probe = sun20i_regulator_probe, + .driver = { + .name = "sun20i-regulator", + .of_match_table = sun20i_regulator_of_match, + }, +}; +module_platform_driver(sun20i_regulator_driver); + +MODULE_AUTHOR("Samuel Holland "); +MODULE_DESCRIPTION("Allwinner D1 internal LDO driver"); +MODULE_LICENSE("GPL"); From patchwork Fri Nov 25 04:01:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 25803 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3755386wrr; Thu, 24 Nov 2022 20:04:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf7+i7mt8I/Dps/2NShecRNLkWRHCHHe5wgvKXG5j+0oTDE6auXfJ4DSK1QLqcwVCD7ojO9z X-Received: by 2002:aa7:d891:0:b0:469:a44:ac95 with SMTP id u17-20020aa7d891000000b004690a44ac95mr30257258edq.38.1669349090974; Thu, 24 Nov 2022 20:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669349090; cv=none; d=google.com; s=arc-20160816; b=gk57tRHP/O9PyPWhEL2Xb+vBEXhrBbL38iCJmrHtBDBmL8yF2LB4aU4h6inQ0ZW4vC ZJIgLvdpzFXWQmfHPDCkboqCe7xBVQ32+c5D8Kiz4TjMu6eN2UUkammHCocKuBzG6Tti GmuneotfejJtkeKVmGGYpZQDaqi/zDm+k6Nn4RMpXQH7tPdPOeQrxpw1QVqavhjjtCwy eN1MqcZ8ci6VCRV8MRuV0hDq0NNs2gTLOmJwyMfdZgQbtfW83EsyZ/Al/vJlZY/q+Ky4 8A9P1yw0+G7UQGRYaJiKED1WTEH9ydPQ7CLcr75vQQ8/k0XspR3IfH0I/cu/yWkTsi0p 7NAQ== 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=mj3Gov5wKiQnQuD89ZZReDiiaf0nPdNccfQhMNfEqG8=; b=O9HnDkquHEacsgiFQkJLUWNmzJkDV1uYyXolhQhhteus7a4s3C+RbO91r6Ww2ClUMs KSm3nrIv+OCNJEdcXEszR5O8IotZnBbXCkem/yqWZ8ichKVYhaan64sxmjPrW3m4Rord gC6/+2hgcXsQYsk7aTNj8w7LOc42y8CNeZUfvq5o4wt5x7Ai/3T4z7oAnXOuzaUW9XIs EZ1eAPjcbPtWlM5+wE2tfdbANO5k12pwF4HzGmyvrE/ceM6qzZtIUEm1YdoTwP977enR XBgYPiO+Qfcesn5J6XVDpRh9NSIhHaGggr66h+M04ak9wvCvH8jH3DPSzXQS7xUuXT93 alGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=ItEin8pq; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=GLUc3Zmc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f4-20020a05640214c400b004618cd22f7bsi1533059edx.142.2022.11.24.20.04.27; Thu, 24 Nov 2022 20:04:50 -0800 (PST) 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=fm2 header.b=ItEin8pq; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=GLUc3Zmc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229799AbiKYECP (ORCPT + 99 others); Thu, 24 Nov 2022 23:02:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbiKYEBU (ORCPT ); Thu, 24 Nov 2022 23:01:20 -0500 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 910E52C649; Thu, 24 Nov 2022 20:01:19 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 081C15C0118; Thu, 24 Nov 2022 23:01:19 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 24 Nov 2022 23:01:19 -0500 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=fm2; t=1669348879; x=1669435279; bh=mj 3Gov5wKiQnQuD89ZZReDiiaf0nPdNccfQhMNfEqG8=; b=ItEin8pqsM13pA2zZh W4wIeOd4FOuJf6cBV4DkjLtegSyIFfBFapj1mM0geaoAznlISlXX9zkrRJpJGGhY akRCZ6NrGFnQSdLZ9Ihnf7HvTeE57Mr0Y0BQgSQxn20o536J1QwSdUkJG2ZWBGEI 06vx/nxbA2r6otro8b9whbxyK7gcquTVtpg1+Lz2+NZ2uL9OO63q6xNph0iW28XX HC3su8FOfLYjybwllQ6nyCGtwYHFYzVz+ptKCYps2x451CY+CASdD7RcsiwBkp/P id0M1cZc6vH31KnSlRqGsfRf4Q4rYXVPpru5/Av07PRXpKhkrYAAUajipRBqXgKs zkWQ== 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=fm1; t=1669348879; x=1669435279; bh=mj3Gov5wKiQnQ uD89ZZReDiiaf0nPdNccfQhMNfEqG8=; b=GLUc3ZmcAe6E9lb10iXixwo7/q7Nj RHbdF8WbUaI6nrtCUYFNXSVrn+0i9xB8408XQoq/ury1ecNxMPR0MwN9/v6PskDF vPMwH9y6M23LcQUGlcthbg9IZQ+1TqHKodAjGWJbMXRHZY3s0SPByNzdrVMlh9bK 0Fupv3SBUTLR79dywlI0bKPUyrTTTrFiknP6bdqeDAZAkAbyeDZKq2wE4geU2K8Q a0XyiUWFoTJl+M5rZuPhb3LY4/qnmuhsNY5GCuBKYd3BORX+Q9DQrUeftzl0RprY vEL7vFQAY5x8Wmio/SyA0S6/YUtEs4k8MHfUs6dw+hw0+XFlkOPz2dlDQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieeggdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpedukeetueduhedtleetvefguddvvdejhfefudelgfduveeggeehgfdu feeitdevteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Nov 2022 23:01:18 -0500 (EST) From: Samuel Holland To: Liam Girdwood , Mark Brown , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Rob Herring Cc: Samuel Holland , Andrew Lunn , Heiko Stuebner , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH v4 3/4] dt-bindings: sram: sunxi-sram: Add regulators child Date: Thu, 24 Nov 2022 22:01:11 -0600 Message-Id: <20221125040112.18160-4-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221125040112.18160-1-samuel@sholland.org> References: <20221125040112.18160-1-samuel@sholland.org> MIME-Version: 1.0 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750439392415818684?= X-GMAIL-MSGID: =?utf-8?q?1750439392415818684?= Some sunxi SoCs have in-package regulators controlled by a register in the system control MMIO block. Allow a child node for this regulator device in addition to SRAM child nodes. Signed-off-by: Samuel Holland Reviewed-by: Krzysztof Kozlowski --- Changes in v4: - Remove unevaluatedProperties from regulators schema reference Changes in v3: - Require the regulators node to have a unit address - Reference the regulator schema from the SRAM controller schema - Move the system LDOs example to the SRAM controller schema - Reorder the patches so the example passes validation Changes in v2: - New patch for v2 .../allwinner,sun4i-a10-system-control.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml index 98a7dc7f467d..c487ac9521e9 100644 --- a/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml +++ b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml @@ -56,6 +56,9 @@ properties: ranges: true patternProperties: + "^regulators@[0-9a-f]+$": + $ref: /schemas/regulator/allwinner,sun20i-d1-system-ldos.yaml# + "^sram@[a-z0-9]+": type: object @@ -130,3 +133,28 @@ examples: }; }; }; + + - | + syscon@3000000 { + compatible = "allwinner,sun20i-d1-system-control"; + reg = <0x3000000 0x1000>; + ranges; + #address-cells = <1>; + #size-cells = <1>; + + regulators@3000150 { + compatible = "allwinner,sun20i-d1-system-ldos"; + reg = <0x3000150 0x4>; + + 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>; + }; + }; + }; From patchwork Fri Nov 25 04:01:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 25804 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3755716wrr; Thu, 24 Nov 2022 20:05:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf5UuyIAeBH5Ik1MwTdFXJfoQQOXldw6T3wHYnkvBf+yJIWqr7XU2X0xJtKSKJLs2Ulvj4+S X-Received: by 2002:a17:906:99d3:b0:78d:c7fd:f755 with SMTP id s19-20020a17090699d300b0078dc7fdf755mr14449603ejn.702.1669349143367; Thu, 24 Nov 2022 20:05:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669349143; cv=none; d=google.com; s=arc-20160816; b=fYZ45Lxp0SIxWGpy6r41TTw0N254cvYoNhnFX41E/ry+UkvJ17Gcdvr+VYaxsa8HOD ayZsg1n4g2Di4uXJYQUJwIwnCyfvJJbAFLFHlIMWd3c6b8bbJ9qIFuObX0Hcl1urmlcy iwC881CquqsnpiIj8ZtJ2uysOUdAYY92AAMLGH8ZkyaK504EiS7+kD+5e++6EyI/qXaY JMZ0YUsTc01+t1L7vL2Bu6EHWCt7Qcf4waFnkCVC6bWUZbxdDQR1Iwz58h/tb2x2LHTr AI6/XW/7xyFuwNtKY3KJCyDmGSwMZeztTXckxgR3UHHXlJH7LHfCsQpYn++rJVb5a7TV pmJA== 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=yxoCW18sGnAleTXERaxCCwFBmN8B1EyztOvLbqS0bd8=; b=DxACNouA6E2b5wYBPDA9wh6jbYrpOzOMSvuEmHIb02ezpboPXE+o0NK3dV9KKIsnHP 11n2xL7/yiW6npX4IHYb3nFAsz9GKKMyETiyEKIgZJqMdbb8YpD5DxzfEIYCI1Uue5QX u5PdpovrEsNxsjB0PTG/qVLKAoD904XHerh/a1jVZEbx7SBd2exbwKAPvo1XGdl4z5LI K3rayekZ/bKIGZrfqRXiMxpMsX5dvUPcyE0Be1nhhIqCssOVMy5Bnc3yTIi1fRRex0XY SpYx3u/T3I42WNCB21JklW4ecaNFWHex1kRE1Uv1u5FBNay/Vl3VwJsUGF8f27n11y1M b6Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=BjnxwE6T; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=ZvZ2j6XN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs30-20020a1709072d1e00b0078db3f08a6bsi1634515ejc.720.2022.11.24.20.05.20; Thu, 24 Nov 2022 20:05:43 -0800 (PST) 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=fm2 header.b=BjnxwE6T; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=ZvZ2j6XN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229803AbiKYECV (ORCPT + 99 others); Thu, 24 Nov 2022 23:02:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229672AbiKYEBV (ORCPT ); Thu, 24 Nov 2022 23:01:21 -0500 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBA502C650; Thu, 24 Nov 2022 20:01:20 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4067F5C0152; Thu, 24 Nov 2022 23:01:20 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 24 Nov 2022 23:01:20 -0500 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=fm2; t=1669348880; x=1669435280; bh=yx oCW18sGnAleTXERaxCCwFBmN8B1EyztOvLbqS0bd8=; b=BjnxwE6TKebpPzT2U8 ROz+fz0anYyp9MpM1hl0SiD+aM1rKcvoBV+SzkrngMqiJuq0FwxjgqzFvKAGJo2K oqwEufzs2OKZ9MeeBZsJbDDdFGiTjfFVBqhzGxdouEWkrSjrwEMHkLMbgkkAQppu Pu/WQpsa7ytc2K0mL7vhPMK5WQTFQIAdnRcnSRZqXBi/Uf3gplaAiklmtfwYjVDj gcOdEdFghPTER+/T2TiOK4Rvi4IIviMzEM/R+kWGHbJKBIA7C77S9+LeglFvIGKR eWO1k+JZp5mfOPhtaH8YL0mFyYaHSNNGmRc9memSpuCmdwYIvd/MwrDYt/Y2gmH0 A6jw== 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=fm1; t=1669348880; x=1669435280; bh=yxoCW18sGnAle TXERaxCCwFBmN8B1EyztOvLbqS0bd8=; b=ZvZ2j6XNr8ko82Io47/lvF38cYZYk o/LbBIP5K+GSONo1f0/hdPoFDsm1ttQsyPBx1iQ04xwFgranF0GabO38jcCH2LCp Iys4jSVhIPlUB3iucSiKKZZfeBMkWiI/CiOO71D9Cvlo7RnOSDfPHKwLGjAKJIBp N8gbTw//Eg5V+UDFUbmn/XcHzJDTHbLRcmSKk/7BDqbvZiT8vQwep4dMlctuMUXM f0IgaYohVWKBdmPh6sDq3VuhP+siFScaxk3rKSNdd5yUn17/oUr5mVS2yGREkixB CggwHf67+jwWUZ7ZgIq9/uzKWN7EpalGcECihw8kqtmC/7Q1Wa7dg2+mQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieeggdeigecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpedukeetueduhedtleetvefguddvvdejhfefudelgfduveeggeehgfdu feeitdevteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Nov 2022 23:01:19 -0500 (EST) From: Samuel Holland To: Liam Girdwood , Mark Brown , Chen-Yu Tsai , Jernej Skrabec , Krzysztof Kozlowski , Rob Herring Cc: Samuel Holland , Andrew Lunn , Heiko Stuebner , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH v4 4/4] soc: sunxi: sram: Only iterate over SRAM children Date: Thu, 24 Nov 2022 22:01:12 -0600 Message-Id: <20221125040112.18160-5-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221125040112.18160-1-samuel@sholland.org> References: <20221125040112.18160-1-samuel@sholland.org> MIME-Version: 1.0 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750439447177941420?= X-GMAIL-MSGID: =?utf-8?q?1750439447177941420?= Now that a regulators child is accepted by the controller binding, the debugfs show routine must be explicitly limited to mmio-sram children. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec --- Changes in v4: - Check the compatible string instead of the node name Changes in v2: - New patch for v2 drivers/soc/sunxi/sunxi_sram.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c index 92f9186c1c42..f09918c59042 100644 --- a/drivers/soc/sunxi/sunxi_sram.c +++ b/drivers/soc/sunxi/sunxi_sram.c @@ -120,6 +120,9 @@ static int sunxi_sram_show(struct seq_file *s, void *data) seq_puts(s, "--------------------\n\n"); for_each_child_of_node(sram_dev->of_node, sram_node) { + if (!of_device_is_compatible(sram_node, "mmio-sram")) + continue; + sram_addr_p = of_get_address(sram_node, 0, NULL, NULL); seq_printf(s, "sram@%08x\n",