From patchwork Fri Oct 20 18:22:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anjelique Melendez X-Patchwork-Id: 156254 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp1245223vqb; Fri, 20 Oct 2023 11:23:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEg7Dv0ehE4Q9mptpAVOzyWJAt+EF8ZxioLi1tvPSNM8RYyE0n0MkaZJHGC9M/kezVQAoX7 X-Received: by 2002:a17:902:ce8d:b0:1c8:9832:8278 with SMTP id f13-20020a170902ce8d00b001c898328278mr3617985plg.48.1697826183512; Fri, 20 Oct 2023 11:23:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697826183; cv=none; d=google.com; s=arc-20160816; b=MXyKcxvojr76aGvcIoG7GawPzYRxKRICrIyaZpbniwppOVyrLCnkvNo/GnP81H+udZ +A+w4XRwp7mDe5KwEtx7KxxPTe8JTRXtrSTwDX85z+var0ALiC/8jBPjQaJgSkdhCizg +0QyC6mU5dmrxNpAaI4xCESfNq1K3mrd0DcSopnOpDiqqwvh+/YZw+y6O+oxrdWB7R/p PSQx80gANQ2P2ETXE1yH5mxenmYWPMDRtRJf4v152TT0aaj22YCJL2NoiOQ99EnOZzRp OTp56JYAYwb75ATPPZldvvvyGa3vjlB80KCdxpzA5RWGEMZPT/emvLVmOg7mFOeBsiRq p3zA== 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=HIjurGlTv0ZvYAR4Q8pB/LH3+AQ+59qEjHBWFY4T1H4=; fh=LW86hCydP2Uyk/rGZkGVwEbU1MTfo4G9BbiLErTllnw=; b=UE6fYkQlIf03WFYM0YpdWNKUFSG+alFmT1lXJi1WQPfunxgkjqtyf6gK1yd0gYiJVi mNwTD1T6HYWuw0bfLvs3nudfx4vnIqKBUm7fkC7jkK2XsEP7t7b+uay9gve9JRPzl/1n l+zAeH4qu23+gO4lO6n1JWrA0Y7bPQ38E6owlGgdcqPBMhFcPaBNNzlAvyyKnqMaGA6B Soi49/KD8sPizZLJERzZAHh+/zmGUSf5Zpa6qBQ+dcr69ecCM4nbaVgCoBCZy4zEMubd wgpBxiObl3wzFHiQseYht36OcLNDHX9tdj87W2XUhZdjqkwTSixhPp5hA9ZzlN3QLyLx Mr/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=LYpOGvyN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u17-20020a170902e81100b001c5fa6d75acsi2496629plg.494.2023.10.20.11.23.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 11:23:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=LYpOGvyN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8DFAF82F925E; Fri, 20 Oct 2023 11:23:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229660AbjJTSW4 (ORCPT + 26 others); Fri, 20 Oct 2023 14:22:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbjJTSWz (ORCPT ); Fri, 20 Oct 2023 14:22:55 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40CD7D67; Fri, 20 Oct 2023 11:22:53 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39KI6LCu031091; Fri, 20 Oct 2023 18:22:43 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=HIjurGlTv0ZvYAR4Q8pB/LH3+AQ+59qEjHBWFY4T1H4=; b=LYpOGvyNKLeBgFPA9oWUoc2ceDGrUhUu5C2k0sql++XVjYdyTLW7w9o7d48+FGPuTwbv i7XrWB5h5r0Ks+qlO1NkS1RIHXL/cQLB43ZN2a00ZCpOWuy+LUwaoSdR1oG+9u6MJfA5 ldrycjDCNMFTheydhrE2XUMU2kNuMi/kyEqrpRin7s0Q1kZ1M4SXJIEZvq+j0IpjrNsL EKnsIHvdNUt1qUpEUDo4Rhj2NQnkfAohXe5lBJolBTskIU/Mg+QaX2HZBJ4uM7RgECw3 3eEPIoMcwWPYMv+QcBs1bqG3OSvZCoDp5PJ5MW9g6+Ux7Bh5uE/p+ab2Rg1JCpfNOdvK Qg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tuxhc0167-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Oct 2023 18:22:43 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39KIMg5Z009060 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Oct 2023 18:22:42 GMT Received: from hu-amelende-lv.qualcomm.com (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Fri, 20 Oct 2023 11:22:42 -0700 From: Anjelique Melendez To: , , , , , , , CC: , , , , , , , , , , "Anjelique Melendez" , Krzysztof Kozlowski Subject: [PATCH v6 2/7] dt-bindings: leds: leds-qcom-lpg: Add support for LPG PPG Date: Fri, 20 Oct 2023 11:22:12 -0700 Message-ID: <20231020182218.22217-3-quic_amelende@quicinc.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231020182218.22217-1-quic_amelende@quicinc.com> References: <20231020182218.22217-1-quic_amelende@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: IPYh-G3K-rAJbPxmhjD-tr4DUu3fdvuY X-Proofpoint-ORIG-GUID: IPYh-G3K-rAJbPxmhjD-tr4DUu3fdvuY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-20_10,2023-10-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 phishscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 bulkscore=0 clxscore=1011 mlxlogscore=847 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310200154 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 20 Oct 2023 11:23:01 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780299788003925209 X-GMAIL-MSGID: 1780299788003925209 Update leds-qcom-lpg binding to support LPG PPG. Signed-off-by: Anjelique Melendez Reviewed-by: Krzysztof Kozlowski --- .../bindings/leds/leds-qcom-lpg.yaml | 89 ++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml index ea84ad426df1..590cd5ff9190 100644 --- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml @@ -11,7 +11,7 @@ maintainers: description: > The Qualcomm Light Pulse Generator consists of three different hardware blocks; - a ramp generator with lookup table, the light pulse generator and a three + a ramp generator with lookup table (LUT), the light pulse generator and a three channel current sink. These blocks are found in a wide range of Qualcomm PMICs. properties: @@ -63,6 +63,29 @@ properties: - description: dtest line to attach - description: flags for the attachment + nvmem: + description: > + This property is required for PMICs that supports PPG, which is when a + PMIC stores LPG per-channel data and pattern LUT in SDAM modules instead + of in a LUT peripheral. For PMICs, such as PM8350C, per-channel data + and pattern LUT is separated into 2 SDAM modules. In that case, phandles + to both SDAM modules need to be specified. + minItems: 1 + maxItems: 2 + + nvmem-names: + minItems: 1 + items: + - const: lpg_chan_sdam + - const: lut_sdam + + qcom,pbs: + $ref: /schemas/types.yaml#/definitions/phandle + description: > + Phandle of the Qualcomm Programmable Boot Sequencer node (PBS). + PBS node is used to trigger LPG pattern sequences for PMICs that support + single SDAM PPG. + multi-led: type: object $ref: leds-class-multicolor.yaml# @@ -106,6 +129,39 @@ required: additionalProperties: false +allOf: + - if: + properties: + compatible: + contains: + const: qcom,pmi632-lpg + then: + properties: + nvmem: + maxItems: 1 + nvmem-names: + maxItems: 1 + required: + - nvmem + - nvmem-names + - qcom,pbs + - if: + properties: + compatible: + contains: + enum: + - qcom,pm8350c-pwm + - qcom,pm8550-pwm + then: + properties: + nvmem: + minItems: 2 + nvmem-names: + minItems: 2 + required: + - nvmem + - nvmem-names + examples: - | #include @@ -191,4 +247,35 @@ examples: compatible = "qcom,pm8916-pwm"; #pwm-cells = <2>; }; + - | + #include + + led-controller { + compatible = "qcom,pmi632-lpg"; + #address-cells = <1>; + #size-cells = <0>; + #pwm-cells = <2>; + nvmem-names = "lpg_chan_sdam"; + nvmem = <&pmi632_sdam_7>; + qcom,pbs = <&pmi632_pbs_client3>; + + led@1 { + reg = <1>; + color = ; + label = "red"; + }; + + led@2 { + reg = <2>; + color = ; + label = "green"; + }; + + led@3 { + reg = <3>; + color = ; + label = "blue"; + }; + }; + ...