From patchwork Thu Dec 10 06:00:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gene Chen X-Patchwork-Id: 11963347 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B38ADC4361B for ; Thu, 10 Dec 2020 06:02:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F17F23D50 for ; Thu, 10 Dec 2020 06:02:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F17F23D50 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=q6JGvMfYWnTJITqWYs6agbufP3S1Jo1cjACBvibopC4=; b=wabhMAyDZadEWWDCRo2LDKBoPH B+UzuJcsuihT5UXeUQZ3WEWqY0d7gqNt3vUXXLK99NnwZt2F5tnWtVRG5XDrejBlWF8D9XvpCAVoq mh6nEuTjNtfmUcECrzXDkfSdRyC+Zn2+Ecdb4xlWT8unieO8B7u/O/ysqL0vVS7wFjF7xglQNyFnG CZBwhy3tGwAdaTcv61cMIrT4lXaOjm+aHVxna5+X3svO9sbGlX16DMKAg27EuMINkOKx7xJWWwvp0 rBsYcqhTLkGjigL1o9hu/9/jJ1ebR2QhBkyq9hp3H1euqRz2OIXNOemtwBXGyatLJB7s6DHfP1d91 5lCl7iKw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knF1k-0007JF-PW; Thu, 10 Dec 2020 06:02:08 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1knF1d-0007Fl-2E; Thu, 10 Dec 2020 06:02:02 +0000 Received: by mail-pl1-x641.google.com with SMTP id t18so2244424plo.0; Wed, 09 Dec 2020 22:02:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OsAt27GJx/yfIuSismvAOUoH5ALaVjBNeqL7IyNT1i8=; b=tvVLvrNy3ad7bqs2d/NtQuKs/U6j37CWI639yg/aU33vGTcEYC/2J9A50oByK3sx3M T0TQ85B1pAEv91bJiqzeqw6rAZp1mqPgoN3zD+gErT7GxYpfLiTBk+End1tOdUtI3/oy jWPxkpVexn6+qR3bW2+u1YyshdAKVh5V2VuSg9RP5KUH8BDo68O48DEd0FxodlXp9D2v 1WqKapyDS6jc8ChHv3qldSRozpirhHf8zuntY+YHV/vQtNEaN7uwRtT1EmkVnb9qDTz1 dLV0qgfDOKodGww4wVXkEUv4BVMZ3ZOqikuYjPSD4AFNZ+u4wafZ6os1v18KOY1z2Fy5 TCdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OsAt27GJx/yfIuSismvAOUoH5ALaVjBNeqL7IyNT1i8=; b=PsuerpNRCyEm/VFbNgYpsRkdwaS8JcPEJwSCv8d+7Ou7dHD1gD4q1N66slzhKxsXoW Bl/IqJYvVUtrBcNXezdDhORAap19MVJ3TcflR8dw8Y6g/D4qDBJ+3Hzvpw0dmKXBhklY SiQBoTXYh7HrkqjdYm1Kr1pQz0KgYEHK55XeksenWSHbXAVsekcvjpkPyyykW0Tew10m tJ5W8IsoMuaP7lotnPpk827CJ4H6VwnRBABDmx8yDDTnLPVzPP0BSlWvf+Um0ILNljlk bwKTytXPPqo8NQnFbXwvo+pJSGo+AOn7ae5iZPSIlA5cEJbmJSy7dCE9hmPAM9AFHi5h aelw== X-Gm-Message-State: AOAM533gTissTjJsA0sXNqGoOvYS5U9yYwLqFzvqMoZbM3/fHxYjRQuX gLGgKqYmLQWZmhzBW9RA5E4rYyocbwsCKA== X-Google-Smtp-Source: ABdhPJx7bDM1TUZWjqvmAGdFk9Y1r8aozHgW1VTC8bWlfhPgav/dJSwyZTvjD4ZnI/6aUY/151a2lA== X-Received: by 2002:a17:902:9f8b:b029:da:726d:3f17 with SMTP id g11-20020a1709029f8bb02900da726d3f17mr5058904plq.35.1607580119035; Wed, 09 Dec 2020 22:01:59 -0800 (PST) Received: from localhost.localdomain ([2402:7500:568:b3ad:229b:9ee7:b946:7876]) by smtp.gmail.com with ESMTPSA id j19sm4355377pff.74.2020.12.09.22.01.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Dec 2020 22:01:58 -0800 (PST) From: Gene Chen To: jacek.anaszewski@gmail.com, pavel@ucw.cz, robh+dt@kernel.org, matthias.bgg@gmail.com Subject: [PATCH v12 4/5] dt-bindings: leds: Add bindings for MT6360 LED Date: Thu, 10 Dec 2020 14:00:56 +0800 Message-Id: <1607580057-4408-5-git-send-email-gene.chen.richtek@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1607580057-4408-1-git-send-email-gene.chen.richtek@gmail.com> References: <1607580057-4408-1-git-send-email-gene.chen.richtek@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201210_010201_250557_B4ECF139 X-CRM114-Status: GOOD ( 14.11 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gene_chen@richtek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, cy_huang@richtek.com, benjamin.chao@mediatek.com, linux-mediatek@lists.infradead.org, dmurphy@ti.com, linux-leds@vger.kernel.org, Wilma.Wu@mediatek.com, linux-arm-kernel@lists.infradead.org, shufan_lee@richtek.com MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Gene Chen Add bindings document for LED support on MT6360 PMIC Signed-off-by: Gene Chen Reviewed-by: Rob Herring --- .../devicetree/bindings/leds/leds-mt6360.yaml | 159 +++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-mt6360.yaml diff --git a/Documentation/devicetree/bindings/leds/leds-mt6360.yaml b/Documentation/devicetree/bindings/leds/leds-mt6360.yaml new file mode 100644 index 0000000..cb1f4b7 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-mt6360.yaml @@ -0,0 +1,159 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/leds-mt6360.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LED driver for MT6360 PMIC from MediaTek Integrated. + +maintainers: + - Gene Chen + +description: | + This module is part of the MT6360 MFD device. + see Documentation/devicetree/bindings/mfd/mt6360.yaml + Add MT6360 LED driver include 2-channel Flash LED with torch/strobe mode, + and 4-channel RGB LED support Register/Flash/Breath Mode + +properties: + compatible: + const: mediatek,mt6360-led + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^(multi-)?led@[0-5]$": + type: object + $ref: common.yaml# + description: + Properties for a single LED. + + properties: + reg: + description: Index of the LED. + enum: + - 0 # LED output ISINK1 + - 1 # LED output ISINK2 + - 2 # LED output ISINK3 + - 3 # LED output ISINKML + - 4 # LED output FLASH1 + - 5 # LED output FLASH2 + +unevaluatedProperties: false + +required: + - compatible + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + #include + led-controller { + compatible = "mediatek,mt6360-led"; + #address-cells = <1>; + #size-cells = <0>; + + multi-led@0 { + reg = <0>; + function = LED_FUNCTION_INDICATOR; + color = ; + led-max-microamp = <24000>; + #address-cells = <1>; + #size-cells = <0>; + led@0 { + reg = <0>; + color = ; + }; + led@1 { + reg = <1>; + color = ; + }; + led@2 { + reg = <2>; + color = ; + }; + }; + led@3 { + reg = <3>; + function = LED_FUNCTION_MOONLIGHT; + color = ; + led-max-microamp = <150000>; + }; + led@4 { + reg = <4>; + function = LED_FUNCTION_FLASH; + color = ; + function-enumerator = <1>; + led-max-microamp = <200000>; + flash-max-microamp = <500000>; + flash-max-timeout-us = <1024000>; + }; + led@5 { + reg = <5>; + function = LED_FUNCTION_FLASH; + color = ; + function-enumerator = <2>; + led-max-microamp = <200000>; + flash-max-microamp = <500000>; + flash-max-timeout-us = <1024000>; + }; + }; + + - | + + led-controller { + compatible = "mediatek,mt6360-led"; + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + function = LED_FUNCTION_INDICATOR; + color = ; + led-max-microamp = <24000>; + }; + led@1 { + reg = <1>; + function = LED_FUNCTION_INDICATOR; + color = ; + led-max-microamp = <24000>; + }; + led@2 { + reg = <2>; + function = LED_FUNCTION_INDICATOR; + color = ; + led-max-microamp = <24000>; + }; + led@3 { + reg = <3>; + function = LED_FUNCTION_MOONLIGHT; + color = ; + led-max-microamp = <150000>; + }; + led@4 { + reg = <4>; + function = LED_FUNCTION_FLASH; + color = ; + function-enumerator = <1>; + led-max-microamp = <200000>; + flash-max-microamp = <500000>; + flash-max-timeout-us = <1024000>; + }; + led@5 { + reg = <5>; + function = LED_FUNCTION_FLASH; + color = ; + function-enumerator = <2>; + led-max-microamp = <200000>; + flash-max-microamp = <500000>; + flash-max-timeout-us = <1024000>; + }; + }; +...