From patchwork Wed Nov 18 10:47:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gene Chen X-Patchwork-Id: 11914775 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 35567C56202 for ; Wed, 18 Nov 2020 10:49:25 +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 B186720867 for ; Wed, 18 Nov 2020 10:49:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CMf/3APk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WXiYfa3S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B186720867 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-arm-kernel-bounces+linux-arm-kernel=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=mGNxv0ErwcqYw8fYien61Hl4n4nG5fCMgvNSCIYCTrw=; b=CMf/3APkI8qCtg1uylQRAXj7ev PyFZqFRDJ+RLcxr10bt7cqc0cU3o6Muo8Dc+z0nVVtcHxXXo/NKqlQFVjCHVIkbHDYvzTGqsPUekt 6UmLX42fmKZxqO2saPw7sUPt1jk/AQ6kH4ywhrZqhjLEJf1NGUKm7VaG5JUxNjEa3U7yYYCKiSTlp 73fKz7CLAGSOpLX9EjLg7gUtqQlbHym1al5KRhKY41+a5SPaiuwHgD+H1YPJhwOeKSn6py/1SMEsl uLdk+OyxWrI54iMjw8xt2eILqdT+SPQP7hynOv6MlJJa3G5zxpluNYVPk7gl7jl2ak3PyQZbntzy2 7HV0DHng==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfL1E-0005aQ-Pw; Wed, 18 Nov 2020 10:48:57 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfL0z-0005UB-Us; Wed, 18 Nov 2020 10:48:43 +0000 Received: by mail-pf1-x443.google.com with SMTP id q5so1174115pfk.6; Wed, 18 Nov 2020 02:48:41 -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=mIkNkxYk93iDCiAPvVn6s6TZl21dQVEhzr19RttgEmk=; b=WXiYfa3S96qPHgeBUzgDY+4DKuFxtQfzD+tE63QONdH9JXEKa03Mms6D06SSRQcZRE a3QDB3Q6FMTga5PNATbLBAhOlUdy10oAXzn6CRHwsAIAZXxrQ2uCc4u+vJw1JOTGZJWD 84SzFfVGO3rPafzYdGvsAlbKcQtiMZBWYCY3dXj4wYh/8orSFC8R6HrrkWLSwBwUwBRv opOAhLBbaHeHwNiqzfvXbGOKmnSaqStZbipZ9vO2H41sTEyOlURe1OEB8M3HePwO5Hyk htfuDbDqqmul2n3z9Av6ABfkzQHy7UzZ4jLs63+U8PE5RXCbq4ocBNH4yEOG/S3dmq+N Dalg== 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=mIkNkxYk93iDCiAPvVn6s6TZl21dQVEhzr19RttgEmk=; b=RMspWVxMmnjcVqkMjIRRDRbmzhgIUFMOGYpr2ICZjhMtWKbb/SfzUaUMntalD9pe+J Nol2NIIuwq1Mtus/ZPjDf4xMwCRuyEnUEbAsOL6sF4NDPmouMd4j7ZOXXGyrNiWKbga8 5NXqzMUCSgH7i81ht4FyKBPQpGgCCFapZC3OM4GM4/sLQKRK4ecUaWTRIJbx0aDSwdE1 tRB3pOHCwCV1qhFTMtO+dQ92jKnXcixm+xHBZzgXlpOYXNQo5LXY3hlIUTSb7Ve6E5rL G2U7EZKdzB6gpUceZDnr8mWToHKCFGa6/lIhNvtjASmzULdooi3xTx7Om0DrhKtmrwdD I1/A== X-Gm-Message-State: AOAM531SvpwY3o5hlSNnsn4XpRDBM1ZwgT49l0Pt+OU1Pth4tCMBMPmA B0F2Qt4MaltyXvnpAQlCju0= X-Google-Smtp-Source: ABdhPJwLpdNBOd+7epZBRLciV3HO+J0SQSOnWvId9MTiuA3oH0r3Fhb6j7LIiOvdU0BWajNUcRtRaA== X-Received: by 2002:a63:545:: with SMTP id 66mr7769156pgf.124.1605696519990; Wed, 18 Nov 2020 02:48:39 -0800 (PST) Received: from localhost.localdomain ([2402:7500:575:2174:b7aa:599:e762:e486]) by smtp.gmail.com with ESMTPSA id a3sm25345154pfd.58.2020.11.18.02.48.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Nov 2020 02:48:39 -0800 (PST) From: Gene Chen To: jacek.anaszewski@gmail.com, pavel@ucw.cz, robh+dt@kernel.org, matthias.bgg@gmail.com Subject: [PATCH v7 4/5] dt-bindings: leds: Add bindings for MT6360 LED Date: Wed, 18 Nov 2020 18:47:41 +0800 Message-Id: <1605696462-391-5-git-send-email-gene.chen.richtek@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1605696462-391-1-git-send-email-gene.chen.richtek@gmail.com> References: <1605696462-391-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-20201118_054842_255883_B25BE042 X-CRM114-Status: GOOD ( 14.82 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Gene Chen Add bindings document for LED support on MT6360 PMIC Signed-off-by: Gene Chen --- .../devicetree/bindings/leds/leds-mt6360.yaml | 164 +++++++++++++++++++++ 1 file changed, 164 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..9bd6cbe --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-mt6360.yaml @@ -0,0 +1,164 @@ +# 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-6]$": + type: object + $ref: common.yaml# + description: + Properties for a single LED. + + properties: + reg: + description: Index of the LED. + enum: + - 0 # LED output INDICATOR1_RED + - 1 # LED output INDICATOR1_GREEN + - 2 # LED output INDICATOR1_BLUE + - 3 # LED output INDICATOR2_ML + - 4 # LED output FLED1 + - 5 # LED output FLED2 + - 6 # LED output MULTICOLOR + +unevaluatedProperties: false + +required: + - compatible + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +examples: + - | + #include + led-controller { + compatible = "mediatek,mt6360-led"; + #address-cells = <1>; + #size-cells = <0>; + + 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@6 { + reg = <6>; + function = LED_FUNCTION_INDICATOR; + color = ; + led-max-microamp = <24000>; + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + function = LED_FUNCTION_INDICATOR; + color = ; + }; + led@1 { + reg = <1>; + function = LED_FUNCTION_INDICATOR; + color = ; + }; + led@2 { + reg = <2>; + function = LED_FUNCTION_INDICATOR; + color = ; + }; + }; + }; + + - | + + 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_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>; + }; + }; +...