From patchwork Tue Sep 28 08:49:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12522163 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF9B2C433F5 for ; Tue, 28 Sep 2021 08:50:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C44626120D for ; Tue, 28 Sep 2021 08:50:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239791AbhI1IwL (ORCPT ); Tue, 28 Sep 2021 04:52:11 -0400 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:53498 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239799AbhI1Ivv (ORCPT ); Tue, 28 Sep 2021 04:51:51 -0400 Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id A285E40313 for ; Tue, 28 Sep 2021 08:50:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632819004; bh=FZeW9gTOBHOnj8RTLRGKPiUIpWhM3rlR/d03KzWXwvc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bP94mKZHo+tFUZ4Yq0cZeXck5RoigE48/zJKt29wjE794fmjVNNh3M4kIONnTWy0D Fr0e5zagOJYXravoYwddvZCw9vYdY39eH9ahqpuP3fk7JpPGqMAKH/aosdBclxSsIa Gx5VI4T3iO2eejiMMTflwOzPQkg+QtCuuqyrV26o63QRYHE0HXXFJn1VytR52BzUAr 61pt2GBQKhGEfz8uqEfBJqawTDJ14Ghh3x3U4nLHgyNT3P2B1OdTTlue7r2dsEwOGz QrusjbpGSQtRqfnFhaoqbfCYA3XuHkjAsmVmQ9QcsmxUq2nWOfzsL6x2kN+ABIz/wY yQOnCeGFogDfg== Received: by mail-lf1-f72.google.com with SMTP id 12-20020ac2484c000000b003fcb3298d00so15524533lfy.13 for ; Tue, 28 Sep 2021 01:50:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FZeW9gTOBHOnj8RTLRGKPiUIpWhM3rlR/d03KzWXwvc=; b=PZT/Gp+6ynl6tE2ZAwmI7zXfflZIMHfWuj0UEuNZDgOi8KIDN9JKjcCYQPuJzQSgZL KB/SC6l7PWOUXlYPV+Z4r2f92NBiVVi8L+fKYRmQESKvoemw4i5AyZjOUBHX2NMiLxNJ VDben2ToIGvWxd1WabB883SqPI9WcqJcxtoj1TPAVUsnSggw85qEMDTb8i+kr0HG+nmb XEeeydr7VEtFi2ZoIa+DfD7GgkQwnRoW19Lii+3lUm4UpgLuEtV4La+nhs+cpAqE0fVY N+rU4NCl/eYwMl97VHWrZWoteVpfQ9rjPsCpoA+Fl+bG2LkpAh+bJeZuMQVfnvYBOOno eVLA== X-Gm-Message-State: AOAM532dB4/dFDcjR2WaK7O6lJ6lqAcOvYWx98GkmHG9h5rI9EPw6YJo UEFHtCO6SO5cTzByALWKfONd0IEcyS3d1zVRB6VbCzmB4x6RmuUJs1MhhxIohSaUUsZTQQSE3Li IRQUnqcYXAla6a2ZfeyqhNNe8SRTIDtpx+0DEyD5HfXLhKXvN X-Received: by 2002:a05:6512:3b7:: with SMTP id v23mr4570607lfp.127.1632819003869; Tue, 28 Sep 2021 01:50:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAZzVg855bdArpHqfbAoNZDubIXgrjxMQIxDJjyZHJURp6JO7ROVEy3wgEdr5Jm3E6Q/8Njw== X-Received: by 2002:a05:6512:3b7:: with SMTP id v23mr4570578lfp.127.1632819003649; Tue, 28 Sep 2021 01:50:03 -0700 (PDT) Received: from localhost.localdomain (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id h13sm1848419lfl.205.2021.09.28.01.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 01:50:02 -0700 (PDT) From: Krzysztof Kozlowski To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Lee Jones , Liam Girdwood , Mark Brown , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , Sylwester Nawrocki Subject: [PATCH 05/12] regulator: dt-bindings: samsung,s2mpa01: convert to dtschema Date: Tue, 28 Sep 2021 10:49:42 +0200 Message-Id: <20210928084949.27939-6-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210928084949.27939-1-krzysztof.kozlowski@canonical.com> References: <20210928084949.27939-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Convert the regulators of Samsung S2MPA01 PMIC to DT schema format. Signed-off-by: Krzysztof Kozlowski --- .../bindings/regulator/samsung,s2mpa01.txt | 79 ------------------- .../bindings/regulator/samsung,s2mpa01.yaml | 69 ++++++++++++++++ 2 files changed, 69 insertions(+), 79 deletions(-) delete mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mpa01.yaml diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt deleted file mode 100644 index bae3c7f838cf..000000000000 --- a/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt +++ /dev/null @@ -1,79 +0,0 @@ -Binding for Samsung S2MPA01 regulator block -=========================================== - -This is a part of device tree bindings for S2M family multi-function devices. -More information can be found in bindings/mfd/sec-core.txt file. - -The S2MPA01 device provide buck and LDO regulators. - -To register these with regulator framework instantiate under main device node -a sub-node named "regulators" with more sub-nodes for each regulator using the -common regulator binding documented in: - - Documentation/devicetree/bindings/regulator/regulator.txt - - -Names of regulators supported by S2MPA01 device: - - LDOn - - valid values for n are 1 to 26 - - Example: LDO1, LD02, LDO26 - - BUCKn - - valid values for n are 1 to 10. - - Example: BUCK1, BUCK2, BUCK9 -Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number -as per the datasheet of device. - - -Optional properties of buck regulator nodes under "regulators" sub-node: - - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500 - (default), 25000, or 50000. May be 0 for disabling the ramp delay on - BUCK{1,2,3,4}. - - In the absence of the regulator-ramp-delay property, the default ramp - delay will be used. - - Note: Some bucks share the ramp rate setting i.e. same ramp value - will be set for a particular group of bucks so provide the same - regulator-ramp-delay value for them. - Groups sharing ramp rate: - - buck{1,6}, - - buck{2,4}, - - buck{8,9,10}. - -Example: - - s2mpa01_pmic@66 { - compatible = "samsung,s2mpa01-pmic"; - reg = <0x66>; - - regulators { - ldo1_reg: LDO1 { - regulator-name = "VDD_ALIVE"; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; - }; - - ldo2_reg: LDO2 { - regulator-name = "VDDQ_MMC2"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - regulator-always-on; - }; - - buck1_reg: BUCK1 { - regulator-name = "vdd_mif"; - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1350000>; - regulator-always-on; - regulator-boot-on; - }; - - buck2_reg: BUCK2 { - regulator-name = "vdd_arm"; - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1350000>; - regulator-always-on; - regulator-boot-on; - regulator-ramp-delay = <50000>; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.yaml b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.yaml new file mode 100644 index 000000000000..1fd33550c860 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/samsung,s2mpa01.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung S2MPA01 Power Management IC regulators + +maintainers: + - Krzysztof Kozlowski + +description: | + This is a part of device tree bindings for S2M and S5M family of Power + Management IC (PMIC). + + The S2MPA01 provide buck and LDO regulators. + + See also Documentation/devicetree/bindings/mfd/samsung,s2mpa01.yaml for + additional information and example. + +patternProperties: + # 26 LDOs + "^LDO([1-9]|1[0-9]|2[0-6])$": + type: object + $ref: regulator.yaml# + description: + Properties for single LDO regulator. + + properties: + regulator-name: true + + required: + - regulator-name + + unevaluatedProperties: false + + # 10 bucks + "^BUCK([1-9]|10)$": + type: object + $ref: regulator.yaml# + description: + Properties for single BUCK regulator. + + properties: + regulator-name: true + + regulator-ramp-delay: + enum: [0, 6250, 12500, 25000, 50000] + default: 12500 + description: | + May be 0 for disabling the ramp delay on BUCK{1,2,3,4}. + + In the absence of the regulator-ramp-delay property, the default ramp + delay will be used. + + Note: Some bucks share the ramp rate setting i.e. same ramp value + will be set for a particular group of bucks so provide the same + regulator-ramp-delay value for them. + Groups sharing ramp rate: + * buck{1,6}, + * buck{2,4}, + * buck{8,9,10}. + + required: + - regulator-name + + unevaluatedProperties: false + +additionalProperties: false