From patchwork Tue Oct 18 01:40:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fenglin Wu X-Patchwork-Id: 3871 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1730678wrs; Mon, 17 Oct 2022 18:50:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7/9a4xny41BUQMNdxeTQfKMGCf0dTUTjBhFKs5RvlXDW3QKy075z7WzDy2yheGEZWHcomi X-Received: by 2002:a17:907:2c5b:b0:78d:3f8a:19d0 with SMTP id hf27-20020a1709072c5b00b0078d3f8a19d0mr438286ejc.369.1666057837644; Mon, 17 Oct 2022 18:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666057837; cv=none; d=google.com; s=arc-20160816; b=QIy8kAJ9jxJMdssoNeXOxWW1KghcgE9WOmVY5d/HmMWfWkSO3h3xTJqakQe+6fqy7+ SBaLzKB9N6CyOTSV8KyX94B7LZgGG+YEydoiFgdGM7B2wT6LyJfRyiqhe3nGrf0twAqu RRELnTxWzNxm+q9Jq/kj6a9LmOCnSIqNaUoNEyQ26a1by3okaM1bjLq75bU2WQtlPTe4 K87WVVhsczWHl12hN/GqPgR7XBY21HySG8TeSb5vzfNeI6pDcqYQuSgzbBphZ0ZGGS4y c8ChRcp3XlgZyNlOZrGmDBse+YXLWuSEMTvYvrXeGkQknLYU2oCJRu8Ku5SSk+Z65VAL 4Crg== 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=kR1vPbJl6kOgRhB+Tcxs3TLjs9t0g2NsmVPhBqhNtww=; b=hGSpHmwf/BcOSMWf1mKZmrWjDudfY3jxY0Z5y+d0OBMlYKVEGUExoRC7+0FfeTHRdK /dLen8LStf4f8YEBCAQKjxSwkA+wWg/heARybWKOtGUZomtzwv319+0e+QeXfSPsKapW bPVxKU+axmX2/Fa465nLfMIJszni+dHhZerkSE3X2Co+nsDSYN3btYQmNGs1/24Rgzsg flDA/zAcjJ+glkkS/Q1noLw9ZVpIj0o8aP3jKcJWRbr8FYcIuz+ory5MyxhxQyuItWpu OH60wwBokBw674nk+v01aXxsv6pQMaVHwLwgb86Ec2MPgocPKb4BVoyhUEZskiQhRFNY u7zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=OW6MA2s6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id tb8-20020a1709078b8800b00781df71dbc1si9386220ejc.174.2022.10.17.18.50.13; Mon, 17 Oct 2022 18:50:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=OW6MA2s6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230235AbiJRBlg (ORCPT + 99 others); Mon, 17 Oct 2022 21:41:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbiJRBl1 (ORCPT ); Mon, 17 Oct 2022 21:41:27 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC1B571997; Mon, 17 Oct 2022 18:41:25 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29I1BXSw017230; Tue, 18 Oct 2022 01:41:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=kR1vPbJl6kOgRhB+Tcxs3TLjs9t0g2NsmVPhBqhNtww=; b=OW6MA2s6X0vuQ05imRTGqdolF2IMaKuGyg+KTMhKYKFYw5xhfnFKqNAoeE/6Jl7w4sjv AzxHfZ99Nhzpdw9u3PlnD06G31cKANhVY7sGc90orskfBZ3Opt3GUKhA547fSGyNxpHB llXy9vhqOd4g8E9hZ2Qq+dLuPrlMsqa22fgpQ7imAMIBUKvc6g0eGO9T9mGVzHSNtL6+ 9wqGcw6tKAtXjCnm1h8iorWXb5KlmkHsb+Db4MDPTlvOBssEZQnsWoCke+sX6J1z4vdx WixVoShfPjZccb2Lp6xs1+E+JU5UeQc9nT4fE8NqiZmq6tqI3xooiVYhRubvdjCYw6+o WQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3k9gwe887w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Oct 2022 01:41:16 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 29I1fFx5032682 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Oct 2022 01:41:15 GMT Received: from fenglinw2-gv.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 17 Oct 2022 18:41:12 -0700 From: Fenglin Wu To: , , , Andy Gross , "Bjorn Andersson" , Konrad Dybcio , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Fenglin Wu , , CC: , Subject: [PATCH v3 2/2] dt-bindings: add bindings for QCOM flash LED Date: Tue, 18 Oct 2022 09:40:24 +0800 Message-ID: <20221018014024.948731-3-quic_fenglinw@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221018014024.948731-1-quic_fenglinw@quicinc.com> References: <20221018014024.948731-1-quic_fenglinw@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: WoqUkH6-NguXAn8Zq1QMPzogbwC9Aa6Y X-Proofpoint-ORIG-GUID: WoqUkH6-NguXAn8Zq1QMPzogbwC9Aa6Y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-17_13,2022-10-17_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 phishscore=0 spamscore=0 impostorscore=0 adultscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 suspectscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210180007 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746988263416726775?= X-GMAIL-MSGID: =?utf-8?q?1746988263416726775?= Add binding document for flash LED module inside Qualcomm Technologies, Inc. PMICs. Signed-off-by: Fenglin Wu Reviewed-by: Krzysztof Kozlowski --- .../bindings/leds/qcom,spmi-flash-led.yaml | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml diff --git a/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml new file mode 100644 index 000000000000..d8efde02db72 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml @@ -0,0 +1,116 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/qcom,spmi-flash-led.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Flash LED device inside Qualcomm Technologies, Inc. PMICs + +maintainers: + - Fenglin Wu + +description: | + Flash LED controller is present inside some Qualcomm Technologies, Inc. PMICs. + The flash LED module can have different number of LED channels supported + e.g. 3 or 4. There are some different registers between them but they can + both support maximum current up to 1.5 A per channel and they can also support + ganging 2 channels together to supply maximum current up to 2 A. The current + will be split symmetrically on each channel and they will be enabled and + disabled at the same time. + +properties: + compatible: + items: + - enum: + - qcom,pm8150c-flash-led + - qcom,pm8150l-flash-led + - qcom,pm8350c-flash-led + - const: qcom,spmi-flash-led + reg: + description: address offset of the flash LED controller + maxItems: 1 + +patternProperties: + "^led-[0-3]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + description: | + Represents the physical LED components which are connected to the + flash LED channels' output. + + properties: + led-sources: + description: | + The HW indices of the flash LED channels that connect to the + physical LED + allOf: + - minItems: 1 + maxItems: 2 + items: + enum: [1, 2, 3, 4] + + led-max-microamp: + anyOf: + - minimum: 5000 + maximum: 500000 + multipleOf: 5000 + - minimum: 10000 + maximum: 1000000 + multipleOf: 10000 + + flash-max-microamp: + anyOf: + - minimum: 12500 + maximum: 1500000 + multipleOf: 12500 + - minimum: 25000 + maximum: 2000000 + multipleOf: 25000 + + flash-max-timeout-us: + minimum: 10000 + maximum: 1280000 + multipleOf: 10000 + + required: + - led-sources + - led-max-microamp + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + spmi { + #address-cells = <1>; + #size-cells = <0>; + led-controller@ee00 { + compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led"; + reg = <0xee00>; + + led-0 { + function = LED_FUNCTION_FLASH; + color = ; + led-sources = <1>, <4>; + led-max-microamp = <300000>; + flash-max-microamp = <2000000>; + flash-max-timeout-us = <1280000>; + function-enumerator = <0>; + }; + + led-1 { + function = LED_FUNCTION_FLASH; + color = ; + led-sources = <2>, <3>; + led-max-microamp = <300000>; + flash-max-microamp = <2000000>; + flash-max-timeout-us = <1280000>; + function-enumerator = <1>; + }; + }; + };