Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3551211pxj; Mon, 24 May 2021 09:11:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxxBXXmvj+FXDmU+K4/sEjmKRGojYLyr5jQm3xHrBL200ue8YeiUyWMYe2UL4cbXlC49jf X-Received: by 2002:a05:6e02:f10:: with SMTP id x16mr14510707ilj.65.1621872670278; Mon, 24 May 2021 09:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621872670; cv=none; d=google.com; s=arc-20160816; b=1BEsTOJ4DUMAGHE51O3jXv7GLmZljv194vE4w0AYkjlHCePWravCbhhYbHqkQmQXNw 6fSVd4gvsGx3hJzYYH0umNDByQ8QC4jPocC+nDKOG/rj/eUzO7P43BiDHGyk5xGXUgAm 2xWP8LE9PIDBQj94YY+WpE3wSIz9UcDDD/Nj8vwA6Sbd934gGqAgEHxXG5GXMV3bf69n s3R9qlQv9z+9XlKuNMBu9gvsoeUiTKLTg54Yv5V4Xwx1qLIuT559WSkuSCzZBfvtcNUs b001jdQEN6M4ZLXj1n5f0qaQtSpXOpB2pvGVrPfJBszJYecKks+UFiSWVwwTpD+eI+yO +lXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uzzcXIffejAkWyzdFpgb0HO7sS9re1Oy9rLKP31iBDE=; b=xL8bYa/IQZLk3QhN9Y+hf2+nrAY7NucO/rR+i4jct+wdaY0AAOCsdT4UPp1d5kz+cZ 220TlToVo0yeoGjA1Q/d/ACkUmuoO4VkZdg0BfvB0loBsf10jc0NEcEqfcTF7HFR0ruw v4qhCrYtr0oAiMwYUk01t+RihRqwkDnrwjC6slqcpBl3B9OE9T9EPF/xQzTgW9iww3cG ny/pJYlYq7ltdWGTLlCyKtgWMD/yGAxWItP6zVvJNLQTX/Sd7h2mnYiJPM48luNLbrbm gh7LiEjqzhfSyqZJ5dE5wVYUiD0j95AAQZdD4wqLsLrSBFa8k+395uf6oHtrN2a8G1nz pHcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MLxtYKaa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n1si6579722ilt.65.2021.05.24.09.10.57; Mon, 24 May 2021 09:11:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MLxtYKaa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236587AbhEXQLF (ORCPT + 99 others); Mon, 24 May 2021 12:11:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237722AbhEXQFf (ORCPT ); Mon, 24 May 2021 12:05:35 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8644C045A55; Mon, 24 May 2021 08:24:53 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id v13-20020a17090abb8db029015f9f7d7290so154416pjr.0; Mon, 24 May 2021 08:24:53 -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=MLxtYKaaVll8pWz5+nbVi/IfMBRtx4DyjzB8VCy8RDUkUMw+tKWP6lE/Qy9mjynuQK O3wgJcW/kIlEFNVnkXSwNPmVujBx99MMssFDcafUx8NvWKRjC0hSPXAagZ9KyVdSEPan GuH58Ty4fRkBNK6t0pGXJuzRly51HjreFOwL6wyoQirzCZqqQM7E7jTLKTMKWCWeGPCV KU5BDOhhBlVgRoQwDUaMjHYi9Wniecjyz3oIso2LBlBeJCQGWockHSY39kEWgl5gGEYW JdsXVY5R8CORXyd2TCKXaOGNz3tpbo+o2UvbDzcFHONA6DljIlfdJSeKeh7my14N6Qwv IACg== 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=sI8GjFgnQC28DYVL4TRzkGwRlBCIYaD2KUfMV2jKHahknpFArHKzH2EkpYvXAQd02p j1R+H1rz3dHa99wYnrcJmOVqEV2xb22HpQ6ok5sUlGEKS2Q6Qm00nqkX23L8QRo8cyMY lH/dTAQ2of9O5q6FoaCpDL97fGJO5PbxSe1tcujDDp6tsGEsg1xJpH4DzWtUbqukW+RH kx2nHn4nENYtLWcUknsS/h9MiwVMYa+UfguMK5joTbjP0TN23kurmhwogWVKogk2QlZ6 nFoR3JG1fOYvaIJgh/0LuyFnRtwAMWeL2ELEUE10FP81arQTLiSIUJRkkVHX4BjzyCWo AuHQ== X-Gm-Message-State: AOAM5323A6zxcM4RRyw5LvGA8BbQl2oSDinNPBKz8/gwTS3DsHjFNfwH YNWg0ppGvzhLsJMJF93h5cF+yI5YPrU= X-Received: by 2002:a17:902:bd90:b029:f2:c88c:5b2c with SMTP id q16-20020a170902bd90b02900f2c88c5b2cmr25951360pls.8.1621869893326; Mon, 24 May 2021 08:24:53 -0700 (PDT) Received: from localhost.localdomain ([2402:7500:469:b4c4:1464:a4f2:334c:afaf]) by smtp.gmail.com with ESMTPSA id a15sm10821597pff.128.2021.05.24.08.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 08:24:53 -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 v14 1/2] dt-bindings: leds: Add bindings for MT6360 LED Date: Mon, 24 May 2021 23:24:26 +0800 Message-Id: <20210524152427.123856-2-gene.chen.richtek@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210524152427.123856-1-gene.chen.richtek@gmail.com> References: <20210524152427.123856-1-gene.chen.richtek@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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>; + }; + }; +... -- 2.25.1