From patchwork Wed Dec 2 10:46:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gene Chen X-Patchwork-Id: 11945677 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 ED37BC64E7C for ; Wed, 2 Dec 2020 10:47:52 +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 8448F2222A for ; Wed, 2 Dec 2020 10:47:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8448F2222A 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=fsy22DaPBPXQ02i25cL1hDcfuWDRJmrT/2l48a8k014=; b=rJAF4y1Y6qg8yIdZbhGRGc3J8C 2KOzcZkYuHaPhaKaQgxjeTkD6zAwCg6ukZeClqXLit06FAUb2QJcNd/ni6M0XDMDDD7bUuzWS4FdN INB2ijsMdkfwE6SViKXv2yfRM8ShZG99kdV51cHpWN0DDLbjDlTiIYdhPgMA/wzI3WOZlFI8nmtWi Mlj2VpvOYs7VkmJvLTnB8+6BiN5ZmvrpTfK7ah2i04Hiro/e7o34HhH7Vg4YH/A6uCKsbskJU0gG9 uDxl5kR+oaMk1aSU5IAIaxsXO3C7UcYi77eR648xQmJfid+xPzaK8k21xw0nYESpsTL5C10WpyjqK lpFTl6dg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkPfi-0006dB-K3; Wed, 02 Dec 2020 10:47:42 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkPfI-0006PX-K8; Wed, 02 Dec 2020 10:47:17 +0000 Received: by mail-pl1-x644.google.com with SMTP id l11so922142plt.1; Wed, 02 Dec 2020 02:47:15 -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=uLCNDAv0Ql7OLVZjh06E9abD1yJnDrs0beu+eilRT6A=; b=NDW2fQcrEkzIjV8f6u/i830TiaH/VPKo4RpNDoFUMj60XZpN50vsanMUgewKhDClyy SRMid+W65FeJcsQLFGUlz2lhpshe4/3RV52wKLuXc37EVld7HTp1bK2plv/Bx6jvX1fO lCoH064HyLeIBMyOI1lr89V2JSpzJ1O5Rn0Oy9hsHpoMOscrZyLFxqvyke6+Znu97s92 8vYAwzgo3GwzF965iIhy6oXGSEdaHEF+N95KCfdeyjubIn0DcPNQNe9KatqBTmC0WiFv l1W7fbbceX1WHVxsmqIFDnPZnqTbHLCmQSMesGHJreX2ce2+w0dt2quoMDh5J7xMZTr2 uNgA== 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=uLCNDAv0Ql7OLVZjh06E9abD1yJnDrs0beu+eilRT6A=; b=VB1kBjx+Tkag9c7QIK6SS2JB6AqXFzRfn3nekikK0O5hSZ075YsebetSPQpTI/SOVn r73VxUXHOecfIU3RrUWfCYsDvffd+8LnJ6O56gfexW/4vMQMZYltXtRBLEddnn+4ZP+R 13i/XxDiCMV6KJBRtkw7oSo7UHjs7IYXNq68l53rSGK9NSVmqyKqESgiyCd1r0rSIiMZ uqoBDgWCLminvMhj7PgKkQ6qdY9w8E8MO0Ersjah7G8zgCL8PZWwB0TY+ttrazmfi6BH BYoITLbi2acz9WbuCLikZX/D/Cu+ry9JEJdG7cxPOstOzRokQDSMIaEyPL/cPHaowd+U psXA== X-Gm-Message-State: AOAM532AjeV0v0TGn/2R2A0CMWX2jRBJ5qvI+KMHD4oJ9sEoQ3XyeyYd wpr2po4HJWKml18TCM5ttuU= X-Google-Smtp-Source: ABdhPJyhdaAZuX09Ggnt7f8CqvD6f18kE3Ll+FBJSx2D6IANh3+3Dx9fHG/F3zbTH83SAgfTnNGKqg== X-Received: by 2002:a17:90b:4c41:: with SMTP id np1mr1814849pjb.186.1606906034182; Wed, 02 Dec 2020 02:47:14 -0800 (PST) Received: from localhost.localdomain ([2402:7500:561:5929:abfa:5e69:aaf7:6f59]) by smtp.gmail.com with ESMTPSA id e14sm1648109pjt.17.2020.12.02.02.47.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Dec 2020 02:47:13 -0800 (PST) From: Gene Chen To: jacek.anaszewski@gmail.com, pavel@ucw.cz, robh+dt@kernel.org, matthias.bgg@gmail.com Subject: [PATCH v11 4/5] dt-bindings: leds: Add bindings for MT6360 LED Date: Wed, 2 Dec 2020 18:46:50 +0800 Message-Id: <1606906011-25633-5-git-send-email-gene.chen.richtek@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1606906011-25633-1-git-send-email-gene.chen.richtek@gmail.com> References: <1606906011-25633-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-20201202_054716_745677_E3C9BE7B X-CRM114-Status: GOOD ( 14.88 ) 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 Acked-by: Jacek Anaszewski --- .../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..73c67b1 --- /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: + "(^led@[0-5]$|led)": + 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>; + }; + }; +...