From patchwork Fri Jul 16 08:17:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gene Chen X-Patchwork-Id: 12381701 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=unavailable 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 7A6D8C12002 for ; Fri, 16 Jul 2021 08:34:06 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 44E99613E3 for ; Fri, 16 Jul 2021 08:34:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44E99613E3 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V/Rc8Z+NpCF3ASFGu1Ot7rg/leh9wu7TztPu1+pgf04=; b=Kklj4uHP/y259m hn6Adm5VHAiNkFCJGmaxzwVQVGVWJ7L8h+ksDO12DRWKcQYvHLv9wCLAfWnHpNCIEU6MC/GKwFvkI tNoSFnq1AZ4GWd6FwhlprdZ9XTfjXO0MyOgdYG0v3mXvI/v9wAnWwPZtEj0e3rLkaU3PO82+7D43b 11isViOZEfZF8gdhhMaGY61DUvn+DWqkyh/74D1+baCw26RCRlfvrZcsJRIKz0yPisWhX2xeGabFy w51FwLRxS9KDy6VVUGOwZUSvQ8y2pJ519VTnemXxYRX/Ul/ylW2le17PDKB12p9NGuPFwBw5EM9+5 M8FPEUpIhGbDy9JtuxEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4JIB-003ka0-Df; Fri, 16 Jul 2021 08:33:55 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4JHo-003kT2-Uv; Fri, 16 Jul 2021 08:33:34 +0000 Received: by mail-pl1-x633.google.com with SMTP id x16so4979418plg.3; Fri, 16 Jul 2021 01:33:32 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=uzzcXIffejAkWyzdFpgb0HO7sS9re1Oy9rLKP31iBDE=; b=Xcu1DPXlfCoAuCm7OnLT3AfFtu2AQLrta3Yy/sRTCOtWA3SA4qeQrxhASveAMmInGF vqtMNT4qX2uzyRM46533buVfnkdlrMfvjJXEAc6EPPDLDV2J6gzW4Qj0UfwIgqKDAvVF FPLtVDNXDFSbWD8/L0rpZbrHlPqL55QW2nGLc2Zgp/eHBkhHt0BT9yBcIogsf7Vv0Ktn 38gHFmrtcU9qqtDzN5a2tdya5/0Fxem7MOVnmSP1zNp/0K+og7/QXPt4nrA/JljoB4JV 4gA+kbu/UUomv1h7BqjK+HushS4F/nmv9zHM7D2bnF1PGJtQNVXWaBqu0vBbBJzwlbuO QSOg== 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:mime-version:content-transfer-encoding; bh=uzzcXIffejAkWyzdFpgb0HO7sS9re1Oy9rLKP31iBDE=; b=LCLDamx2wfcFEohWCJwoeI12WFJChR0CKC3iTq9tsQ0G4Xp+qeZGU+FoaAh8LKwUsN O4daNuE4u5SxACVRHBBkA5XIT9KtwV7DyW6ALcOpp96veJUEIOwftqF+cJpFwlTcXso+ bVlOSZefH4lxd6/fyrw2bzeqixqgT4PpUOVR2+fkY7Bp5s2elveLlv3AytVE1amU5UlL w6AVjc+7UKR57uorMhF+T5daTDPwbUCUgzuPoyuvVwTcvj1lfRv7F/ljhUrPpPCfW4T6 rf9GRQHl1NtCHiraUGbsImQP75sTExUl32S+7jKNZ6IMNFGqbHPaLz9ZHfVStQvkfBey 5R6Q== X-Gm-Message-State: AOAM530xH8RFEQ9Eeja3/Fo9MSYDMUfvitgOHKN3+RPr+pHEI/1jvftd O21fW5+quQ2lutM0vaPx6ds= X-Google-Smtp-Source: ABdhPJwBy0wVbAVx489F19HdwYe64+kvhN9E4F6mlUPl4BZIbDFpkgd837cjfcesxwPG9vtN5MLyJg== X-Received: by 2002:a17:90b:4b4e:: with SMTP id mi14mr14841361pjb.109.1626424412228; Fri, 16 Jul 2021 01:33:32 -0700 (PDT) Received: from localhost.localdomain ([123.110.251.138]) by smtp.gmail.com with ESMTPSA id 21sm9425633pfp.211.2021.07.16.01.33.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jul 2021 01:33:31 -0700 (PDT) From: Gene Chen To: jacek.anaszewski@gmail.com, pavel@ucw.cz, matthias.bgg@gmail.com Cc: dmurphy@ti.com, linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, gene_chen@richtek.com, Wilma.Wu@mediatek.com, shufan_lee@richtek.com, cy_huang@richtek.com, benjamin.chao@mediatek.com, Rob Herring Subject: [PATCH v15 1/2] dt-bindings: leds: Add bindings for MT6360 LED Date: Fri, 16 Jul 2021 16:17:30 +0800 Message-Id: <20210716081731.80118-2-gene.chen.richtek@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210716081731.80118-1-gene.chen.richtek@gmail.com> References: <20210716081731.80118-1-gene.chen.richtek@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210716_013333_052415_689481CC X-CRM114-Status: GOOD ( 13.50 ) 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: 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 000000000000..235315531d3b --- /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_INDICATOR; + 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>; + }; + }; +...