From patchwork Fri Jul 22 10:23:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChiaEn Wu X-Patchwork-Id: 12926286 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25ACBC433EF for ; Fri, 22 Jul 2022 10:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RtO+yg7Wi4JSj3ZmHONhdPt1sUn6ZtFJMnIAL1+O4g0=; b=a7YNwFiQbqYeRdOL724FIvtem+ SGDBsKRR5/RJ4ATzHdFQEXlR5aE01Rg3sGUUXRQYizQscSWrDR8ZYqnZg2seZfxZwzDgYVCVnAIV5 bXHoNNByuyd5oms6G7AwhLa0NjKlfJ5t99Jmle2EoIAN3LSMM0FbikCRFtjwL/W5/W7dbqRjIdoNF cOOhbV9ATgS4o6AMLyxjtU+Q5rfBdELeLqmVIIXLZRE7b6fw+W9I5l0RnfMJ9xWBJl77PdOVVyimD W9px1fdEbgLDx6jFkN/YoTJe32QH+38wF2DaPhyjBiJ8JTms3szspSI17fh7Oc9Gg0NM9RkiBV1iB vKxqkzXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEpqi-002e94-Jf; Fri, 22 Jul 2022 10:25:36 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEppk-002d7i-5n; Fri, 22 Jul 2022 10:24:38 +0000 Received: by mail-pj1-x102e.google.com with SMTP id x24-20020a17090ab01800b001f21556cf48so7756310pjq.4; Fri, 22 Jul 2022 03:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RtO+yg7Wi4JSj3ZmHONhdPt1sUn6ZtFJMnIAL1+O4g0=; b=RHIiCRckYLOdkQbFijV5TwJ9JkCT2iLtElC1/a7Ijn0EbTcs5cPyIwdyjAgQDwUTEF zFRIONO5TObNSmWVfRcOwl364worgbGGP2LTwZ2MKQ/K2vezmTmJTIQXJQrTDZbsTdhD 8SlQOs/LpenC2QSfyWJ8Z4bZThS0YcGD5tQFnxe5KapcykzqeZeEtJKdnwgTwmNy5b/i uU7w4+WQYtWu+JyARmXo02h0QzSEIOdFcgDYgJRft8HqQYpNIM0bW8yI7vLY9SEnbroJ VrIcV0Ad+1nnIjV+5dXTtufhbRHGa1qrui5JYFYPS4hIlSTg+crY6KH1lt68G0890zvT ZSyw== 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=RtO+yg7Wi4JSj3ZmHONhdPt1sUn6ZtFJMnIAL1+O4g0=; b=aY5uyqo0bz6VyEvWvkHhOi3/0WFw4j1CZWUyXJ7Ei3kCKUd1gcHwDLhsVSzMS1usSC Am504tGngdVliM5DZG+b/403fYUHGl1qkWpfmW34MTmREMOGQfm+c5WaxNDQyk2iwr4Z P+pyn1OL1hUKS+ld/ai0kWUBpOzObcT3eIMLf1J1BE+H6VN4s3aIvtZbIuxl9Gj6ZG8p Ts86iSsAJI/pRHPZSYhy9CrPWP/p03YbSdk7VyOfb/ko5vvfvZVWhcMG31axdVUZg5iS yAbRBJ9H0ZmXb6amt+vOgzBCLv2WMDp5X+V/6dNbOk2SYUFhCYF1LgyDdiKccwAhWzTo rrPQ== X-Gm-Message-State: AJIora9KGh/PMJJzkJrXeF0QIhm7roduZtaiV3VYFxm99OXrxkxZAydR ZujNQe7jLMkBLDhoJJR+XFU= X-Google-Smtp-Source: AGRyM1t4WRI52OjrKVz75hfoUjmi8lHlofyf7Gxxjhh1qpDs4lV45QYD1raCZQeuxePIUcWMfYT5qA== X-Received: by 2002:a17:90a:db0b:b0:1f2:25c3:9faf with SMTP id g11-20020a17090adb0b00b001f225c39fafmr11750553pjv.105.1658485473094; Fri, 22 Jul 2022 03:24:33 -0700 (PDT) Received: from RD-3580-24288.rt.l (42-73-82-239.emome-ip.hinet.net. [42.73.82.239]) by smtp.gmail.com with ESMTPSA id h189-20020a6283c6000000b00528d620eb58sm3614551pfe.17.2022.07.22.03.24.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 03:24:32 -0700 (PDT) From: ChiaEn Wu To: lee.jones@linaro.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, pavel@ucw.cz, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com, sre@kernel.org, chunfeng.yun@mediatek.com, gregkh@linuxfoundation.org, jic23@kernel.org, lars@metafoo.de, lgirdwood@gmail.com, broonie@kernel.org, linux@roeck-us.net, heikki.krogerus@linux.intel.com, deller@gmx.de, andy.shevchenko@gmail.com Cc: chiaen_wu@richtek.com, alice_chen@richtek.com, cy_huang@richtek.com, dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-iio@vger.kernel.org, linux-fbdev@vger.kernel.org, szunichen@gmail.com, Krzysztof Kozlowski Subject: [PATCH v6 02/13] dt-bindings: power: supply: Add MediaTek MT6370 Charger Date: Fri, 22 Jul 2022 18:23:56 +0800 Message-Id: <20220722102407.2205-3-peterwu.pub@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220722102407.2205-1-peterwu.pub@gmail.com> References: <20220722102407.2205-1-peterwu.pub@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220722_032436_248161_EE877CA5 X-CRM114-Status: GOOD ( 12.03 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: ChiaEn Wu Add MediaTek MT6370 Charger binding documentation. Signed-off-by: ChiaEn Wu Reviewed-by: Krzysztof Kozlowski --- .../power/supply/mediatek,mt6370-charger.yaml | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/mediatek,mt6370-charger.yaml diff --git a/Documentation/devicetree/bindings/power/supply/mediatek,mt6370-charger.yaml b/Documentation/devicetree/bindings/power/supply/mediatek,mt6370-charger.yaml new file mode 100644 index 0000000..bd09a0a --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/mediatek,mt6370-charger.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/mediatek,mt6370-charger.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT6370 Battery Charger + +maintainers: + - ChiaEn Wu + +description: | + This module is part of the MT6370 MFD device. + Provides Battery Charger, Boost for OTG devices and BC1.2 detection. + +properties: + compatible: + const: mediatek,mt6370-charger + + interrupts: + description: | + Specify what irqs are needed to be handled by MT6370 Charger driver. IRQ + "MT6370_IRQ_CHG_MIVR", "MT6370_IRQ_ATTACH" and "MT6370_IRQ_OVPCTRL_UVP_D" + are required. + items: + - description: BC1.2 done irq + - description: usb plug in irq + - description: mivr irq + + interrupt-names: + items: + - const: attach_i + - const: uvp_d_evt + - const: mivr + + io-channels: + description: | + Use ADC channel to read VBUS, IBUS, IBAT, etc., info. + minItems: 1 + items: + - description: | + VBUS voltage with lower accuracy (+-75mV) but higher measure + range (1~22V) + - description: | + VBUS voltage with higher accuracy (+-30mV) but lower measure + range (1~9.76V) + - description: the main system input voltage + - description: battery voltage + - description: battery temperature-sense input voltage + - description: IBUS current (required) + - description: battery current + - description: | + regulated output voltage to supply for the PWM low-side gate driver + and the bootstrap capacitor + - description: IC junction temperature + + io-channel-names: + minItems: 1 + items: + - const: vbusdiv5 + - const: vbusdiv2 + - const: vsys + - const: vbat + - const: ts_bat + - const: ibus + - const: ibat + - const: chg_vddp + - const: temp_jc + + usb-otg-vbus-regulator: + type: object + description: OTG boost regulator. + unevaluatedProperties: false + $ref: /schemas/regulator/regulator.yaml# + + properties: + enable-gpios: + maxItems: 1 + +required: + - compatible + - interrupts + - interrupt-names + - io-channels + +additionalProperties: false + +...