From patchwork Mon Mar 6 00:42:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChiYuan Huang X-Patchwork-Id: 64381 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1602718wrd; Sun, 5 Mar 2023 17:20:20 -0800 (PST) X-Google-Smtp-Source: AK7set/icTSfGGVm00iQ5oPt/SsmPIQXcQSWndhnEX/+uCB6nq/JWvpCEf897iGE3Zys/VaFLqea X-Received: by 2002:a17:902:6909:b0:19e:73aa:6cbe with SMTP id j9-20020a170902690900b0019e73aa6cbemr7339993plk.13.1678065620021; Sun, 05 Mar 2023 17:20:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678065620; cv=none; d=google.com; s=arc-20160816; b=mLFIld6YiQYjJkdjPiBIS4oGX3ij/4hQ2C1rpWOeHX8ULgLkBZ8SkAWE6kOr9GrWls jhFjP+2KP2F2pBh+JswYowTvwkcU+g+YG1kr5rvyqaBigJ4aPC+emE5w9YNOELyPw83I ypzz1cE5Ob1DGGQ4ZDUKOr09GNtQdA+2HGbKuSlyhw2ECOvnRefCrGkc5ntSCO0ymIM+ 1lgG8TaglN50C+1ypBfPAOAp2/EnVxBy/ZEEj85m+gxf/HA22OCz+TzUX015v2pltF5E ZXhrFoVe2PHukEtvkoHiSpIS80a6ZW7ugIuH1rLRcmD4jTm0updxKjYckDrHeFSniD8q 0SRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=feyrk8hkOkQzsrxQqOXTtw56H/yWOxamZGrFXBrIRX0=; b=lsylgGimc3g17GEZ1e+cWYJu8VWB61fGBKVuz4nbRwbSEdALopPux86PJZ61uRPyHF WYgpMmga3g3Ld4FWeY04kL6tRHK5z4JyP7sb7sFuwNzv+oL/K4ZlY8jx/tEtX6q1AISi DlwrWlvQ2L9Ml+AWOUnDiQE0UHmEa9CQKbP7BLiEXKmiGZrU9fuoUqzT1jA3CP3dUdQU fPYOWaqPQltRYFI5Hl7nYWtsWYp41vyeAhrbJ5T1NcU3SHmmhefv105ruIMiU71Cva7y nhQNpRwp48MlNyI6288blytMm/gul34JUAgLdzGa054j2VwluYet/49Ke5BnuP9b4D+Z gTqA== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a170902b58b00b0019cafd4c385si7640967pls.408.2023.03.05.17.20.06; Sun, 05 Mar 2023 17:20:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbjCFAnD (ORCPT + 99 others); Sun, 5 Mar 2023 19:43:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjCFAm7 (ORCPT ); Sun, 5 Mar 2023 19:42:59 -0500 Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 441AB199F; Sun, 5 Mar 2023 16:42:55 -0800 (PST) X-MailGates: (flag:4,DYNAMIC,BADHELO,RELAY,NOHOST:PASS)(compute_score:DE LIVER,40,3) Received: from 192.168.10.46 by mg.richtek.com with MailGates ESMTP Server V5.0(16313:0:AUTH_RELAY) (envelope-from ); Mon, 06 Mar 2023 08:42:40 +0800 (CST) Received: from ex4.rt.l (192.168.10.47) by ex3.rt.l (192.168.10.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Mon, 6 Mar 2023 08:42:39 +0800 Received: from linuxcarl2.richtek.com (192.168.10.154) by ex4.rt.l (192.168.10.45) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Mon, 6 Mar 2023 08:42:39 +0800 From: To: , , CC: , , , , Subject: [PATCH v3 1/2] dt-bindings: regulator: Add Richtek RT5739 Date: Mon, 6 Mar 2023 08:42:37 +0800 Message-ID: <1678063358-18128-1-git-send-email-cy_huang@richtek.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, 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?1759579335748790530?= X-GMAIL-MSGID: =?utf-8?q?1759579335748790530?= From: ChiYuan Huang Add the binding document for Richtek RT5739. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski --- Since v3: - Add 'Reviewed-by" tag. Since v2: - Refine dt-binding patch subject - Shorten and refine title and description without too much marketing text. - Fix the typo from 'connecton' to 'connection' in 'richtek,vsel-active-high' property description - Remove maxItems in property 'regulator-allowed-modes' - Fix the wrong min/max microvolt in binding example. Must be '300000' and '1300000', respectively. --- .../bindings/regulator/richtek,rt5739.yaml | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml new file mode 100644 index 00000000..358297d --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/richtek,rt5739.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt5739.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT5739 Step-Down Buck Converter + +maintainers: + - ChiYuan Huang + +description: | + The RT5739 is a step-down switching buck converter that can deliver the + programmable output voltage from 300mV to 1300mV with wide input voltage + supply of 2.5V to 5.5V. It can provide up to 3.5A continuous current + capability at over 80% high efficiency. + +allOf: + - $ref: regulator.yaml# + +properties: + compatible: + enum: + - richtek,rt5739 + + reg: + maxItems: 1 + + enable-gpios: + maxItems: 1 + + richtek,vsel-active-high: + description: | + If property is present, use the 'VSEL1' register group for buck control. + Else, use the 'VSEL0' register group. This depends on external hardware + 'VSEL' pin connection. + type: boolean + + regulator-allowed-modes: + description: | + buck allowed operating mode + 0: Auto PFM/PWM mode + 1: Forced PWM mode + items: + enum: [0, 1] + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + regulator@50 { + compatible = "richtek,rt5739"; + reg = <0x50>; + enable-gpios = <&gpio26 1 GPIO_ACTIVE_HIGH>; + richtek,vsel-active-high; + regulator-name = "richtek,rt5739-buck"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1300000>; + regulator-allowed-modes = <0 1>; + regulator-boot-on; + }; + };