Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2223467rwb; Mon, 15 Aug 2022 00:54:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR4gKtKgYkL9nsW4JOladtp3Ark2pmVBC/1SO6ssaqnaHdadkMK8ju59AmVt4Ql18ryb9Ern X-Received: by 2002:a17:90b:180b:b0:1f5:50fd:15ac with SMTP id lw11-20020a17090b180b00b001f550fd15acmr17284252pjb.25.1660550074553; Mon, 15 Aug 2022 00:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660550074; cv=none; d=google.com; s=arc-20160816; b=tJR5sEkreZAZdjOxPmhP4zj9f2Bq6vT41YoXE5T6qj8JdP5paFAphNhSLnHNeI9Mwh /AT7w0HMvmuCRuZlMoC7zkKw8U+xW2I9fmVBtyCec4r64dfhZ/FpAEiloTRR6QVoJ6r9 rzeknjlwHtBpnieTD/7EVZK49sYd5Bg5WVpX2mynq+pQZibOZH/Yl0pfSl2CAoaoiP8y mE2kGCV9DUe62pb0QQf5SAeBddURX+ZZzA57nYLExHhkutriQDdyJXPe0s12RRXKRCfG q3nuPagMKrmXHYIY1qzSDm2msykmzDobPfOOzo0Gm0jwjceqSrQ5HGzIJ5gdom4vlbDd iGgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=up++5EREYL75SQc53yDph90kSCluwcs4sUEUFyLB5DY=; b=EVKMWse5g0RK4e+n8lD7SL/JvnV1GgemYcpSuJKKi1qajk0iTor05QPH1LulK7RP6/ 9blHoNcoOozpFnjFOGO2gu54pV/jUwETxveUcEvTyTrAkxnMZTORALRm8Dpzj2rVCMw2 8DhGKqJWhwbVC3+v4WF8iIVvPmwRDk9FXong0Hbyjin73MUEVpGDtLWU0CyP3zfzpI1W MVk7jJLuq70Ady0+FCB4xjHaZ7YLyR6CWWjouN6BwDl13DySD3olh8Z3hjXxTPInORGY U88EV3TMn2QBjWPBssTFEk5cfPy2mXvnuD59bagZnPC+27k6xw9ehpNpr+YcDRgSaEtl Jf2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gZH7c2f1; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020a056a00085600b0052e366a65a4si9310990pfk.43.2022.08.15.00.54.23; Mon, 15 Aug 2022 00:54:34 -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=@gmail.com header.s=20210112 header.b=gZH7c2f1; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241110AbiHOHe1 (ORCPT + 99 others); Mon, 15 Aug 2022 03:34:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241021AbiHOHeY (ORCPT ); Mon, 15 Aug 2022 03:34:24 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2D8F183AD; Mon, 15 Aug 2022 00:34:23 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id p125so6052049pfp.2; Mon, 15 Aug 2022 00:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=up++5EREYL75SQc53yDph90kSCluwcs4sUEUFyLB5DY=; b=gZH7c2f1bPRfAynZ6wdxSOg7T8PRgU8LR1G7ucYyNw4x+vV6NpYdcpME5BDnrwfQNn +okUQTIo24cahw90COH98uPiMfr9bKd4VzNePSxQemRQS9Nbb4XHiz2HFOAvRiiU9/V9 dItwuf5dBk9FkSh4nLjZX+3rC6/I/RNptfE9w+XBXYbxqVzbPr/HoE5lTPOw366TseFf jhYxJUe6fcXXccQB2t7CZI+E8wTnZ+fEjd3jL1YBLobFHzzUnUnumV8mzmSiasLk+21X n+laqZLV+KoRC9SuCr770ko+68zrzGmfmVz0KriboANEQQqy2tYjU/Mtd2DxNwUOV6wT v5/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=up++5EREYL75SQc53yDph90kSCluwcs4sUEUFyLB5DY=; b=db2AHmKoPkfVnhKk43ZOsEowfOLyyw4uKZ33gdrCzQGFfPeLWGTtnb61J7pS3PVQMD IDqvFbZ47bil8BkkUydpiqaUtGUIRN8EQSPnHeki8euAAGWeUp4fkx7VtW3j7UiFOIU3 XHCC1ff2Lky1DilTymnstG7qza2xdGYZLcB19S77GklprmlKRK2wI+zjRfaXYzUJ1hXd XBpcuhUKeoOY28x/myb4w7QkFvq7jxh0rvlyqV+dSvyYrDNZV/y0w49B5WNJpXMiSMZl Sx8AMlhTtS4BfvT0RQyVWWnad8NQOf0Me8O6ELAJRNUEEA5ZyNudVdH/D4nEIcR/Ktku xeSw== X-Gm-Message-State: ACgBeo3JnuObAp6/+6yINCJ7/XTFDlsrYjlfRMzDHTmfsNBXOSQzOytM Z70rgyR7skq1oDjLGxTZ7+U= X-Received: by 2002:a05:6a00:4304:b0:532:3c0f:3597 with SMTP id cb4-20020a056a00430400b005323c0f3597mr15231159pfb.44.1660548863296; Mon, 15 Aug 2022 00:34:23 -0700 (PDT) Received: from localhost.localdomain ([2402:7500:46b:2a3e:f57e:22d4:1ae1:ffd3]) by smtp.gmail.com with ESMTPSA id r1-20020aa79ec1000000b0053249b67215sm6088503pfq.131.2022.08.15.00.34.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Aug 2022 00:34:22 -0700 (PDT) From: cy_huang To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, sre@kernel.org Cc: alina_yu@richtek.com, cy_huang@richtek.com, alinayu829@gmail.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: power: supply: Add Richtek RT9471 battery charger Date: Mon, 15 Aug 2022 15:34:11 +0800 Message-Id: <1660548852-6222-2-git-send-email-u0084500@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1660548852-6222-1-git-send-email-u0084500@gmail.com> References: <1660548852-6222-1-git-send-email-u0084500@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 From: ChiYuan Huang Add bindings for the Richtek RT9471 I2C controlled battery charger. Co-developed-by: Alina Yu Signed-off-by: Alina Yu Signed-off-by: ChiYuan Huang --- Since v2 - Remove the properties for interrupt controller things in the binding documentation. - Fix dtc error for typo, it's 'regulator-name', not 'regulator-compatible'. - Add regulator min/max microamp to allow otg vbus current adjustable in example. - Specify the active-level for charge-enable-gpios in binding example. --- .../bindings/power/supply/richtek,rt9471.yaml | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/richtek,rt9471.yaml diff --git a/Documentation/devicetree/bindings/power/supply/richtek,rt9471.yaml b/Documentation/devicetree/bindings/power/supply/richtek,rt9471.yaml new file mode 100644 index 00000000..9286b82 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/richtek,rt9471.yaml @@ -0,0 +1,73 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/richtek,rt9471.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT9471 3A Single Cell Switching Battery charger + +maintainers: + - Alina Yu + - ChiYuan Huang + +description: | + RT9471 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for + portable applications. It supports USB BC1.2 port detection, current and + voltage regulations in both charging and boost mode. + + Datasheet is available at + https://www.richtek.com/assets/product_file/RT9471=RT9471D/DS9471D-02.pdf + +properties: + compatible: + const: richtek,rt9471 + + reg: + maxItems: 1 + + charge-enable-gpios: + description: GPIO used to turn on and off charging. + maxItems: 1 + + wakeup-source: true + + interrupts: + maxItems: 1 + + usb-otg-vbus-regulator: + type: object + unevaluatedProperties: false + $ref: /schemas/regulator/regulator.yaml# + +required: + - compatible + - reg + - wakeup-source + - interrupts + +additionalProperties: false + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + charger@53 { + compatible = "richtek,rt9471"; + reg = <0x53>; + charge-enable-gpios = <&gpio26 1 GPIO_ACTIVE_LOW>; + wakeup-source; + interrupts-extended = <&gpio_intc 32 IRQ_TYPE_EDGE_FALLING>; + + usb-otg-vbus-regulator { + regulator-name = "usb-otg-vbus"; + regulator-min-microvolt = <4850000>; + regulator-max-microvolt = <5300000>; + regulator-min-microamp = <500000>; + regulator-max-microamp = <1200000>; + }; + }; + }; -- 2.7.4