From patchwork Thu Jul 27 08:54:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 126906 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp1012540vqo; Thu, 27 Jul 2023 04:00:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlGCiccw7R+vR7n1Wvn/zTk6qsqk3FUp6wKH0PMYklwjc40FBY4cgvWj7E66Qw2tUl+wQUl5 X-Received: by 2002:a05:6808:188c:b0:3a3:6cb2:d5bf with SMTP id bi12-20020a056808188c00b003a36cb2d5bfmr3484680oib.4.1690455633619; Thu, 27 Jul 2023 04:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690455633; cv=none; d=google.com; s=arc-20160816; b=ps+EmcFqShA135bOlfsQwjMpFueN59QHOKCGNC1FXx/t17Mu9ozsOjbt1jvICr0pft mLJtjdy+hXlhHXh+yTtejYeATSFpro3ANHrNFVriPpoy0gZqK0RTHyFYtKMWOIv0Rp8z 2p6BmQmOYNktOMi2sRNrmFNatdhZkOdq6Z83NnotfWSYNQi1pYSVyERs+rCRP7JLJctZ 6uRrussrmCzxS1wA2qSzcZ/H6S1J9libzduZOzqnoUvcwMSGFvvzbPRt/3G5T67Mn24d eEmyP6iJAO8qEM9PB72z6jnIM5Wuok3uu3HK58Oj0NybG+WtnfHZe5S9zyQL+rU8qk8q O/Og== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=4zFidkvpiaBnsj/3sbwZ3aVjcWlOMu2Or6nmeidN1j0=; fh=UiAbuW3OwfASguLUxMBWi3Zv1/JcIDNMaCwu+KJgdjc=; b=bvztbH+5JmvuegIUxLpmQ6RW3o/0g4pBn6AyqaFI2LUwP+lWY0atPvA6bEVOkqKqDc Q0E85ANzQc85bs3wBYEYuLwNkOhx86iED/h6aBLPEIQrgxDNpqq/cfZ27Zr3EbFRP1FP 3/ZmVfUi8rHDdol97b0G5NZG6AooWxjXpIVzKmFRT6nkATkOaiGmh2ni8KqS76o5kERj x/+RoW/1jGsj9vtwRNytzwBD7l7ieaGUaYX/bfw+8+/+wUbT1hp934XPaIeTJWGVk1n2 E53mZlgelTi6Rpyr3MBU2eKL3DT6Rl0GpFqKN28x4nlLrLufv/DGFdaaLX1iujv9YcA8 lI1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pPi+Y4SM; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hk12-20020a17090b224c00b002632c1fc68dsi2850219pjb.72.2023.07.27.04.00.19; Thu, 27 Jul 2023 04:00:33 -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=@linaro.org header.s=google header.b=pPi+Y4SM; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232425AbjG0JK1 (ORCPT + 99 others); Thu, 27 Jul 2023 05:10:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233421AbjG0JKL (ORCPT ); Thu, 27 Jul 2023 05:10:11 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A74210FC for ; Thu, 27 Jul 2023 01:54:43 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5221f193817so893953a12.3 for ; Thu, 27 Jul 2023 01:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690448082; x=1691052882; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4zFidkvpiaBnsj/3sbwZ3aVjcWlOMu2Or6nmeidN1j0=; b=pPi+Y4SMHAl+xf5iH2Ya1h6XD5Tmjp0NMKDioa0Jr5hSr6Tpokic8WYvuAr4jCmtZl 7DT+PS8t0TJmHZw8x2SnyBXY0SYinp62tpqzpfZs5Xe75UvFqzo8BFRylTj+g2GMdBTM l/xN0S3adnkDJLaKkyVr8KUxvdTUEyv1b/+XSZEUqclbzkIsz1PdMBDdWu+xs2dyCJ7g A6ZtvexK5CelK0jNnqMUmqKcozHJbY2xvYCCnbPfErASO/dYfjT961yyqVzgmk+t3Rn6 TEBB9QQdHHgWNwqteR8SSqSLHcewaPeCZZjBVozObOhg62w6OaPvEnu4TueBrOn0CdlU qSZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690448082; x=1691052882; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4zFidkvpiaBnsj/3sbwZ3aVjcWlOMu2Or6nmeidN1j0=; b=aZ3MiInfOHcTW/KZpXmS+s1CcpRmySaRcakhJFNNmLGr0WmPBRMsoKzLx9rbbRBFUV Sv6fQQOxcNNdttQgpEhZ8Eo+B5Ai0bG7rjtX/aFlvPi27PWv9VGX5Dgiv+YHUFQ+gSXw Zo+s7tvs9MCPpEagYaCHLPEEzhGnUfoNvrCIq2eKAO7jvZvDJGunvHt80vvmu/cSNOLj vLetvfrsRUVXkDQImJ/v5F0cOMmBTF98058OmviK3U2j7J/ELar8VywNGDv9I3a7JXHM jcrMikloTxJs76UhvTvhswZhKHZmLXEeyVAg1XuYe6tLrJfpGro0jbMcevMw8s+HlVaC 6lpw== X-Gm-Message-State: ABy/qLaFKPdysif/EXEBAHxGxBjMbOT3YDrnmu1P+wQubA2EeINmmUKh AfLh0yOw+pvT7xUVv+ZHItYZGg== X-Received: by 2002:a17:906:29a:b0:994:554b:7f27 with SMTP id 26-20020a170906029a00b00994554b7f27mr1461333ejf.2.1690448082053; Thu, 27 Jul 2023 01:54:42 -0700 (PDT) Received: from krzk-bin.. ([178.197.223.104]) by smtp.gmail.com with ESMTPSA id g24-20020a1709064e5800b0099316c56db9sm504002ejw.127.2023.07.27.01.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 01:54:41 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Eric Jeong , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v3] regulator: dt-bindings: dlg,slg51000: Convert to DT schema Date: Thu, 27 Jul 2023 10:54:34 +0200 Message-Id: <20230727085434.16596-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: INBOX X-GMAIL-THRID: 1772571206672244880 X-GMAIL-MSGID: 1772571206672244880 Convert the bindings for Dialog Semiconductor SLG51000 Voltage Regulator to DT schema. Signed-off-by: Krzysztof Kozlowski --- Changes in v3: 1. Correct typo "regulatoris". Changes in v2: 1. Mention that supplies are required, if given regulator is enabled, which matches exactly original wording of old binding. --- .../bindings/regulator/dlg,slg51000.yaml | 132 ++++++++++++++++++ .../bindings/regulator/slg51000.txt | 88 ------------ MAINTAINERS | 2 +- 3 files changed, 133 insertions(+), 89 deletions(-) create mode 100644 Documentation/devicetree/bindings/regulator/dlg,slg51000.yaml delete mode 100644 Documentation/devicetree/bindings/regulator/slg51000.txt diff --git a/Documentation/devicetree/bindings/regulator/dlg,slg51000.yaml b/Documentation/devicetree/bindings/regulator/dlg,slg51000.yaml new file mode 100644 index 000000000000..bad140418e49 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/dlg,slg51000.yaml @@ -0,0 +1,132 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/dlg,slg51000.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Dialog Semiconductor SLG51000 Voltage Regulator + +maintainers: + - Eric Jeong + - Support Opensource + +properties: + compatible: + const: dlg,slg51000 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + dlg,cs-gpios: + maxItems: 1 + description: + GPIO for chip select + + vin3-supply: + description: + Input supply for ldo3, required if regulator is enabled + + vin4-supply: + description: + Input supply for ldo4, required if regulator is enabled + + vin5-supply: + description: + Input supply for ldo5, required if regulator is enabled + + vin6-supply: + description: + Input supply for ldo6, required if regulator is enabled + + vin7-supply: + description: + Input supply for ldo7, required if regulator is enabled + + regulators: + type: object + additionalProperties: false + + patternProperties: + "^ldo[1-7]$": + type: object + $ref: /schemas/regulator/regulator.yaml# + unevaluatedProperties: false + + properties: + enable-gpios: + maxItems: 1 + + required: + - regulator-name + +required: + - compatible + - reg + - regulators + +additionalProperties: false + +examples: + - | + #include + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@75 { + compatible = "dlg,slg51000"; + reg = <0x75>; + dlg,cs-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>; + vin5-supply = <&vreg_s1f_1p2>; + vin6-supply = <&vreg_s1f_1p2>; + + regulators { + ldo1 { + regulator-name = "slg51000_b_ldo1"; + regulator-min-microvolt = <2400000>; + regulator-max-microvolt = <3300000>; + }; + + ldo2 { + regulator-name = "slg51000_b_ldo2"; + regulator-min-microvolt = <2400000>; + regulator-max-microvolt = <3300000>; + }; + + ldo3 { + regulator-name = "slg51000_b_ldo3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3750000>; + }; + + ldo4 { + regulator-name = "slg51000_b_ldo4"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3750000>; + }; + + ldo5 { + regulator-name = "slg51000_b_ldo5"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1200000>; + }; + + ldo6 { + regulator-name = "slg51000_b_ldo6"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1200000>; + }; + + ldo7 { + regulator-name = "slg51000_b_ldo7"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3750000>; + }; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/regulator/slg51000.txt b/Documentation/devicetree/bindings/regulator/slg51000.txt deleted file mode 100644 index aa0733e49b90..000000000000 --- a/Documentation/devicetree/bindings/regulator/slg51000.txt +++ /dev/null @@ -1,88 +0,0 @@ -* Dialog Semiconductor SLG51000 Voltage Regulator - -Required properties: -- compatible : Should be "dlg,slg51000" for SLG51000 -- reg : Specifies the I2C slave address. -- xxx-supply: Input voltage supply regulator for ldo3 to ldo7. - These entries are required if regulators are enabled for a device. - An absence of these properties can cause the regulator registration to fail. - If some of input supply is powered through battery or always-on supply then - also it is required to have these parameters with proper node handle of always - on power supply. - vin3-supply: Input supply for ldo3 - vin4-supply: Input supply for ldo4 - vin5-supply: Input supply for ldo5 - vin6-supply: Input supply for ldo6 - vin7-supply: Input supply for ldo7 - -Optional properties: -- interrupt-parent : Specifies the reference to the interrupt controller. -- interrupts : IRQ line information. -- dlg,cs-gpios : Specify a valid GPIO for chip select - -Sub-nodes: -- regulators : This node defines the settings for the regulators. - The content of the sub-node is defined by the standard binding - for regulators; see regulator.txt. - - The SLG51000 regulators are bound using their names listed below: - ldo1 - ldo2 - ldo3 - ldo4 - ldo5 - ldo6 - ldo7 - -Optional properties for regulators: -- enable-gpios : Specify a valid GPIO for platform control of the regulator. - -Example: - pmic: slg51000@75 { - compatible = "dlg,slg51000"; - reg = <0x75>; - - regulators { - ldo1 { - regulator-name = "ldo1"; - regulator-min-microvolt = <2400000>; - regulator-max-microvolt = <3300000>; - }; - - ldo2 { - regulator-name = "ldo2"; - regulator-min-microvolt = <2400000>; - regulator-max-microvolt = <3300000>; - }; - - ldo3 { - regulator-name = "ldo3"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3750000>; - }; - - ldo4 { - regulator-name = "ldo4"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3750000>; - }; - - ldo5 { - regulator-name = "ldo5"; - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1200000>; - }; - - ldo6 { - regulator-name = "ldo6"; - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1200000>; - }; - - ldo7 { - regulator-name = "ldo7"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3750000>; - }; - }; - }; diff --git a/MAINTAINERS b/MAINTAINERS index df54d6eee746..0efb378621eb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6038,7 +6038,7 @@ F: Documentation/devicetree/bindings/mfd/da90*.txt F: Documentation/devicetree/bindings/mfd/dlg,da90*.yaml F: Documentation/devicetree/bindings/regulator/da92*.txt F: Documentation/devicetree/bindings/regulator/dlg,da9*.yaml -F: Documentation/devicetree/bindings/regulator/slg51000.txt +F: Documentation/devicetree/bindings/regulator/dlg,slg51000.yaml F: Documentation/devicetree/bindings/sound/da[79]*.txt F: Documentation/devicetree/bindings/thermal/da90??-thermal.txt F: Documentation/devicetree/bindings/watchdog/da90??-wdt.txt