From patchwork Tue May 23 20:41:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 98163 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2406910vqo; Tue, 23 May 2023 13:44:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4wcPxNPYyD1awvWfUJGoLBRYmXL1wNJ23sp+BXyvYrFJ7lT6axbMMIXch3qY3ldZ3hNq+/ X-Received: by 2002:a17:90a:8a88:b0:250:6c76:fd9b with SMTP id x8-20020a17090a8a8800b002506c76fd9bmr15613989pjn.38.1684874686390; Tue, 23 May 2023 13:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684874686; cv=none; d=google.com; s=arc-20160816; b=qSTIyXcwu2bTJzZ6qlG5bZmFYIXl31vC0H+soMzHwNbLKwmGJti/7vKjsZpruhPwf5 8qCRYVa2vxFFf3NH2Ews3TGTZ4Cpj4/K9VrfyWtNHpD6HFM2iVEPmE3tp3y7EICjhh1o GRxJlxUqiPBAyf8g2mP0gtNElB8kS25mutbEMj4KKMtL/dl4SCUyhSTcMtZwOo3pivnu Jz6tjtcA9dB2YZS39VPT/N77jf7627JiFZ9dRc6jZRv2CHIK/4GMAPd4SeD9VF8UkfDx aIAMSMvl2oeglM1tYDcRyczgdkhBlyfbw44LRUKtD+g2CTyafpe5p4zP6Q5JW3o+3kpu p4IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=ohccO7+Hp8D9OG05ed2wt0tjIqUKpB1FsQC9sASGZUk=; b=rIXFDaWJZPIGUw+BkOdaU4D5itMfnL4I2/Iy0qlUm8sUqD7Bz0tbblUz9fGsY5QLaQ H8u4eLtGk0ReDDRNavo5EoqV5EJI6kbGAb548ulMDG3QAh0HBb+ZhaadAiEbFyd30oYG 57iKxzx+sqS0wXtEQZUWqbp7dhrm2sYNnBOCgBtq84NjfvKXwOVbhR4rpSNundklNoU/ NAnINQt1stVowOanYxeeQEQc/BHTUZnWNpI70Tf2Oebn4WkGB3o+d4SMamWDbbW/epTW fJOG6xivsnoFF39iPrBESICBi6Mh5jqPYdjeJxym4SRSbBem3P9xeuCyg4JOjtPkGx8S cIHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=aB8Kt7UZ; 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=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u8-20020a170902a60800b001ae488bbbd4si6656250plq.344.2023.05.23.13.44.33; Tue, 23 May 2023 13:44:46 -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=@z3ntu.xyz header.s=z3ntu header.b=aB8Kt7UZ; 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=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238591AbjEWUmk (ORCPT + 99 others); Tue, 23 May 2023 16:42:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238431AbjEWUmh (ORCPT ); Tue, 23 May 2023 16:42:37 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 197DA185; Tue, 23 May 2023 13:42:22 -0700 (PDT) Received: from [192.168.122.1] (84-115-214-73.cable.dynamic.surfer.at [84.115.214.73]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id C4414CFBBB; Tue, 23 May 2023 20:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1684874500; bh=HFBWsBkYn2DBr6AAVznAZpdgrKhwcQeGU1Uuc9j2Tyo=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=aB8Kt7UZQxO2zuc5lflRIrvIhssI9kLblxslBjA+RN7je3JmR/UiM2ESFLmFIYKgC BLrv3dXaEU4K6q35fSHwZQaOx5A+q4OcMPDttVs/wDBEFbp3jgR3DXTRBIFeDpYiFp Q55sOyBTMP7p92bDwE5yE5VRrAfJSPx674LhSiK0= From: Luca Weiss Date: Tue, 23 May 2023 22:41:28 +0200 Subject: [PATCH v3 1/3] arm64: dts: qcom: Add PMI632 PMIC MIME-Version: 1.0 Message-Id: <20230414-pmi632-v3-1-079d2cada699@z3ntu.xyz> References: <20230414-pmi632-v3-0-079d2cada699@z3ntu.xyz> In-Reply-To: <20230414-pmi632-v3-0-079d2cada699@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Pavel Machek , Lee Jones , Jonathan Cameron , Lars-Peter Clausen , Stephen Boyd , Jonathan Corbet , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-iio@vger.kernel.org, linux-doc@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4065; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=HFBWsBkYn2DBr6AAVznAZpdgrKhwcQeGU1Uuc9j2Tyo=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkbST/jPJnNPzcCOq8KElAPLGfrMhiVGRehOhpa HyCVST7TWmJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZG0k/wAKCRBy2EO4nU3X VuKyEACpa+TDToJSB3k9vfbSK0mPOS3p3K4/3lzzuNN/GV4sTKmlgw9l3FnApTzXZm0Lg8k3kPx eKqAuXb+sf44JFE/6kMRiMFo9brJspUqov02Rl6vbWrz6vfQcVoNC6c9IbmoH2/Q0A+0hGWOGFm uO6xdHOKGHaVgUXTzCpCGFcD/EJkXW0a8Vv2k2MmjCUWmoMdFAGd05mvNa6UpU9aIwCghwNLJpn VBhg50eaZB7yxxxGFnJb3RuS/78a/A5jb9ikk8B0VrBxVNIWFvmpCC9eEF7oLbh+4N5kaAWhjRV hv1UwMvya+ToF2xICEAxPVpQPWzZcr/5PRFVs+krJWfVOntEmxGXWnj1p4+q5pmR+xVtAc3w22t RcQDXcaVvsIsXhLoogPBxeDGNTdaScPySQNkkm6qx+FuUKxLauklx301AuYk/RRJIVeW+hCwrxI mHHAY+Csy+fYIWkUz6EpiJZ4Any8p63jU2nJ4jvyFYkVXwmIVkL5wNdq1qTiKM0daaQS/SwLVtf FOSbthPM9Ra2O/Ddi/Uddba8MNire+o0u2pqTI8O8V8a8IZCE1oen8ZoVwscZfQB0u+1qi7tkSZ dzTAerS9gmuQjXJn1GDpXnwrpSmiPM8rEk9uWhwD2RAEayuTkJghYQTgHdPgloNsznHREEMg0fx l5xdQP2ofIyuP/Q== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1766719159018252623?= X-GMAIL-MSGID: =?utf-8?q?1766719159018252623?= The PMI632, commonly found on SoCs with SDM632 has various standard functions like ADC, GPIOs, LPG and more. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/pmi632.dtsi | 165 +++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pmi632.dtsi b/arch/arm64/boot/dts/qcom/pmi632.dtsi new file mode 100644 index 000000000000..4eb79e0ce40a --- /dev/null +++ b/arch/arm64/boot/dts/qcom/pmi632.dtsi @@ -0,0 +1,165 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (C) 2023 Luca Weiss + */ + +#include +#include +#include + +/ { + thermal-zones { + pmi632-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + + thermal-sensors = <&pmi632_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "hot"; + }; + + trip2 { + temperature = <125000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + +&spmi_bus { + pmic@2 { + compatible = "qcom,pmi632", "qcom,spmi-pmic"; + reg = <0x2 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pmi632_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; + + pmi632_adc: adc@3100 { + compatible = "qcom,spmi-adc5"; + reg = <0x3100>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>; + + channel@0 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "ref_gnd"; + }; + + channel@1 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "vref_1p25"; + }; + + channel@6 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "die_temp"; + }; + + channel@7 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "usb_in_i_uv"; + }; + + channel@8 { + reg = ; + qcom,pre-scaling = <1 16>; + label = "usb_in_v_div_16"; + }; + + channel@9 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "chg_temp"; + }; + + channel@4b { + reg = ; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + qcom,ratiometric; + label = "bat_id"; + }; + + channel@83 { + reg = ; + qcom,pre-scaling = <1 3>; + label = "vph_pwr"; + }; + + channel@84 { + reg = ; + qcom,pre-scaling = <1 3>; + label = "vbat_sns"; + }; + }; + + pmi632_adc_tm: adc-tm@3500 { + compatible = "qcom,spmi-adc-tm5"; + reg = <0x3500>; + interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>; + #thermal-sensor-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + pmi632_sdam_7: nvram@b600 { + compatible = "qcom,spmi-sdam"; + reg = <0xb600>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0xb600 0x100>; + }; + + pmi632_gpios: gpio@c000 { + compatible = "qcom,pmi632-gpio", "qcom,spmi-gpio"; + reg = <0xc000>; + gpio-controller; + gpio-ranges = <&pmi632_gpios 0 0 8>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@3 { + compatible = "qcom,pmi632", "qcom,spmi-pmic"; + reg = <0x3 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pmi632_lpg: pwm { + compatible = "qcom,pmi632-lpg"; + + #address-cells = <1>; + #size-cells = <0>; + #pwm-cells = <2>; + + status = "disabled"; + }; + }; +}; From patchwork Tue May 23 20:41:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 98164 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2407852vqo; Tue, 23 May 2023 13:47:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4P0KZWwNHanHbdYPg5BFud8ZNnVKVtidK3xhRZ+5hXej2uJDt+trnE5sAJUSrA7UBv2u9Z X-Received: by 2002:a05:6a20:7fa1:b0:104:873:c3b5 with SMTP id d33-20020a056a207fa100b001040873c3b5mr16018452pzj.44.1684874832142; Tue, 23 May 2023 13:47:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684874832; cv=none; d=google.com; s=arc-20160816; b=p4KiRCs+FMNckamTSmvCqY563u8CIvRF4lzhMPnblJCrYczP5ZdHjjtRm/5OfcxII1 sibhABsphhSIzX0FuXdyratk/2rfEGSKtJdtXwk4owenx+vU9rxJRhPH+vjFt2pZdUUo iCuH9xNQr/znKSAgP9UmJXHnkXOpXyGvxQUc0O+mwtX1qTT58629lKlNDU0y5IJp9wC2 4he0KsplCvbRKkisF9z55zqFNcww1RW0I3WQZ48XSHPjv8erWIwRg7rrnUUudVtx+jor w21H+YLTf+/gAHMCw01pcQUa9qaPBJiL2bWYSFjJjtIhvZTQ6O0Aum0+ui5/LNVdeEDt Olcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=+2q2QWCNQ8WE+pRVTJm8BWIeQ8dlC2WvD3ouDdZ6C2U=; b=Ms8PXGOkyy/wtwm31PKo51tsDd3BxjQzNzgWcxK3FbULncgv1PSJTfloYE7MSXVLkY 2cDKkHi83XWXnz1oLiK9Hw40s9T7i9fn2+mw77lKFS2slWLGl0vOt6FkjnBCqE/C5VKN AWeG4oCXI4r9BICUiRiHdL1jN/ubbJ8N99SuwS/odEfZ43jk6P0w5b4RGpXf0LHg0Qc0 xa9XE8k4SwFw9exxg112fDQ2X2KTFBHxADo0gpgTNH4p1oUwDtZJYVD8+dv9eUB++ytp 0+lBW/7kTrSpu1WybPGDYH+UWFhdy9ZNEd+fLDmSkbLFlBdO9hQSiOnwjArGEVwbLaFu Ypzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b="R2/gMkK/"; 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=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a63b512000000b005348f910e60si7047037pge.114.2023.05.23.13.46.55; Tue, 23 May 2023 13:47:12 -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=@z3ntu.xyz header.s=z3ntu header.b="R2/gMkK/"; 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=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238553AbjEWUls (ORCPT + 99 others); Tue, 23 May 2023 16:41:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230031AbjEWUlo (ORCPT ); Tue, 23 May 2023 16:41:44 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21BFFCA; Tue, 23 May 2023 13:41:43 -0700 (PDT) Received: from [192.168.122.1] (84-115-214-73.cable.dynamic.surfer.at [84.115.214.73]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id CC7EFCFBBC; Tue, 23 May 2023 20:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1684874501; bh=TJ542YLeCftA/8fhg2JNrraJTBnWbaZkPbFnUwRol6g=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=R2/gMkK/PfFPy6GWRI1+HF3H+f1tCi0OIO/sVowniDPPouJuJwQ9Qg02BT4pFZNTQ 62RRBGYRz2pLtyJFGo+PBzLQRcF/MLppm9OenHSBXUgru6Tp7BE7Oj1xjko+vPGopx /dpPFtqNduCw67zrz2vMp1t7+yuRcQ4/hPHDjisE= From: Luca Weiss Date: Tue, 23 May 2023 22:41:29 +0200 Subject: [PATCH v3 2/3] arm64: dts: qcom: sdm632-fairphone-fp3: Add notification LED MIME-Version: 1.0 Message-Id: <20230414-pmi632-v3-2-079d2cada699@z3ntu.xyz> References: <20230414-pmi632-v3-0-079d2cada699@z3ntu.xyz> In-Reply-To: <20230414-pmi632-v3-0-079d2cada699@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Pavel Machek , Lee Jones , Jonathan Cameron , Lars-Peter Clausen , Stephen Boyd , Jonathan Corbet , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-iio@vger.kernel.org, linux-doc@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1343; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=TJ542YLeCftA/8fhg2JNrraJTBnWbaZkPbFnUwRol6g=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkbSUAAyJdMMoOpSMaz9C3Sn99T7YCw8ToXq945 4IsslXJObKJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZG0lAAAKCRBy2EO4nU3X VkJVD/9YaYeyX9jGqe7/y/4fgdOOuMfD8EwIgbX9nwu5DF5ZjmGZB+zBdyGMWhQhLbw7PBh7QYb qIUjbeCRp6yhQUDaQmx7dLIW8EkhYtFnWnpPuZoeJuathLOggZ1LelZn9yoIGSEKNurIL6ZmK9D hg5lRqs5DAmrz7j9MJNLkXad/UoBWdZcyAxUrUOWd3UX2haujPhVkgg7K23qt+hpLKD0TyoBWvU WnYHJ7QME34UHsR0CXpkmVTfIZAugH4gwBgY3joI3S4ejXy/LVU8ibpmMUGdAyG7kgymVqHYmzr gRuW0FH44DHpcNL2ZYZUwbkfnZfHgQyC3gAhPkMvrnJI0Nw8H/DO9ZpqU77uKPsQ40sbKDBgCZ1 Y5D7pO1e4kNu9e5cgfK1NoL7GP7YotlpUtWghsrBwfTA9oUedPcKieCFpC2Tktu9jWNTCCA/3z5 4bdNf6/SjiEpypd3+XcJsBuumnPgsjJRNS2qUvT6ebEO7QFiF8YoXad28bEdo1D7HbkA9MyceAr DG3hujx4NyOiqcsG29b58fvG9HIscwL2U08/E3CRUPkMwg8sDsYsc3Mit31pRYxFo+4NIo2r7QK qrdedQ6cMy9rL3rLtagFVgBf2UKuVNpAeDxhXINoG17ON54iHyAFXygKvT+bBNq5+g33ZzaoUmK wjTL3OqBuLjqB1w== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1766719311843436210?= X-GMAIL-MSGID: =?utf-8?q?1766719311843436210?= The phone features a notification LED connected to the pmi632. Configure the RGB led found on it. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts index 70e683b7e4fc..301eca9a4f31 100644 --- a/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts +++ b/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts @@ -4,8 +4,10 @@ */ /dts-v1/; +#include #include "sdm632.dtsi" #include "pm8953.dtsi" +#include "pmi632.dtsi" / { model = "Fairphone 3"; @@ -83,6 +85,33 @@ &pm8953_resin { linux,code = ; }; +&pmi632_lpg { + status = "okay"; + + multi-led { + color = ; + function = LED_FUNCTION_STATUS; + + #address-cells = <1>; + #size-cells = <0>; + + led@1 { + reg = <1>; + color = ; + }; + + led@2 { + reg = <2>; + color = ; + }; + + led@3 { + reg = <3>; + color = ; + }; + }; +}; + &sdhc_1 { status = "okay"; vmmc-supply = <&pm8953_l8>; From patchwork Tue May 23 20:41:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 98167 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2411482vqo; Tue, 23 May 2023 13:56:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6I5hd0Z1f5Wt7MA166IjzdzocejRj6vv6rBLzj8fXgiYP9Belo/3Ha1jGW9uDm4C3yRvsK X-Received: by 2002:a05:6a00:9a9:b0:648:a518:4ac6 with SMTP id u41-20020a056a0009a900b00648a5184ac6mr260530pfg.14.1684875395485; Tue, 23 May 2023 13:56:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684875395; cv=none; d=google.com; s=arc-20160816; b=RILsxpQU3dIuOlVVykmft3cgJPZnDNrDoCI169GkevtaNkyqqfl1cBTVDRqwkAaELX tihG+WicUNLcwgQlzzGsBCw5VSUne2nDwExcMjeh0il8lHtFJvr+z4sALxb50knNMBej RFAdYXksYviWCFEHpdWSKA7hnNBHFltyZwCXY+deTGAsErXC10nlIe1mzwCGsP++HqvN C7/hom6TcKElN7FhSiRSg8N83qY2ym+Nbz8+S+PjlPCqeh01Si0K7B8WQjbTctvH0vvi 2+kjFxq2VD4c9ouGrmw0tDtJTDZArhMrgUZgzAMh7/aV5Wa7iy19FUANDVW2j6QzHXCj c60g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=FeBj5PMZakm3rndQPhi60KClrhWoQ20Vor/0tUK/8Dg=; b=f9zqnTlj2sB3b7hu2tpPCY0/0iVqYnWcM1oIaxdnMNtJC/a6DDK7axviNcxCfFDwZz EqyURgzGd2p5kvn2hz8wtYicIPS7ItAZCo2joKLe4GeiVmarxUc9iHjnCibSGxAdzS4l Z6oyPZJ8y8SIDDQyU4+B9S9Po6DGlzCxsBRvBx5W48FBqH6QpGLM0/4ASn+WExDmbxfT 5Zt6Zd4UwluEThQHUxGv7Mk9/5fW5DG04/5c5K1iDW+5sxClO9dCSH/zrWuzHS6X79Nj r8WY4PNq3yKAMltQ5Ek3vpzk6f7KOuUZyZCmMhum5zVKhNQMBJguPtQikLEVlf/ZqtCl mfFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=UN9gyzpp; 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=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c190-20020a624ec7000000b00626007418c3si7124186pfb.289.2023.05.23.13.56.21; Tue, 23 May 2023 13:56:35 -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=@z3ntu.xyz header.s=z3ntu header.b=UN9gyzpp; 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=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238563AbjEWUlu (ORCPT + 99 others); Tue, 23 May 2023 16:41:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238523AbjEWUlp (ORCPT ); Tue, 23 May 2023 16:41:45 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DF22BB; Tue, 23 May 2023 13:41:44 -0700 (PDT) Received: from [192.168.122.1] (84-115-214-73.cable.dynamic.surfer.at [84.115.214.73]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id D1B0ACFBBD; Tue, 23 May 2023 20:41:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1684874502; bh=giXrBVzuUN5UXjtoXlCOzbSist2F7n3Yj2uo5JvGp+4=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=UN9gyzpp2uIHzA5h6eRrMwn7Nko9BO3Y+tD2JujsIvH/1rPzIRAp+gV1zpgWdmQTi tQeEyjD6m7QIRDQ8l+YRozY+5lprp0YSoG2PPepqnh2nG8F9dNcivStZ2CIroARg8H Av1bIY7Q9x4SREkm3qs5QPs8eQGRWqbs6q4ZSjuM= From: Luca Weiss Date: Tue, 23 May 2023 22:41:30 +0200 Subject: [PATCH v3 3/3] Documentation: leds: Add "rgb:status" path MIME-Version: 1.0 Message-Id: <20230414-pmi632-v3-3-079d2cada699@z3ntu.xyz> References: <20230414-pmi632-v3-0-079d2cada699@z3ntu.xyz> In-Reply-To: <20230414-pmi632-v3-0-079d2cada699@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Pavel Machek , Lee Jones , Jonathan Cameron , Lars-Peter Clausen , Stephen Boyd , Jonathan Corbet , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-iio@vger.kernel.org, linux-doc@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=728; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=giXrBVzuUN5UXjtoXlCOzbSist2F7n3Yj2uo5JvGp+4=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkbSUBVFFH0z26jiRmoUzAK7tvmUyNshtKdDPIi M5BNeQdU9+JAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZG0lAQAKCRBy2EO4nU3X VnrVD/9XFPcG2lQPkn6K14Fu1Wa6cjR5XeJSk33Njgomt8vMe4xTwRE2/HN2CHXn4zrGeMZDk54 F8y8GWcY2sV/oE8m6dpJNReJbS+QjW4MP+mPgr1FdaPrmzMa3GmEmfwylJAfKTlOjdG2Qd2uhUi oqG/FD57rT3U7DeAizDCJt4qiunIh4+zA+x3zdrjZ2gngRGLe1YMcOyW9vjojULNlwCGJJntoqK iwbzsn6IfVXqQ+9sDcqMNH6XJDLRsToFx+tfRWT5TYOvqnFk1dUOGUXE/HKhP1t1D6ojYkb3+kx viz0rlHPK8YThGeKaVE5EwNTvVY+vcE0bxSLeDcBmjzTxOy1PFxFoIW0EkOR/zvEIE96tN2xj96 voUuj5vkQvdEc6lIqQi5N9sRfMnCNyjdkwORBvIOj+vbIIg4l/z29wIIE6bAwBBW0WN4AYj/ZZO YlbIiqvQv5iHBrWmtDHzOKXP2KQcuW12PrS/4j2aATVmroV8Ri5YVu87ih9Rvh3fJ4Xk9JqYAi4 j0ggJVW8H9lFn2VdaKPlYIuQ5R/nzFidgkO0IvvIC5bMstQbBvvQcDQX2udJ7RQL9OW0gbX5hO7 YpuZfc22vXkoiZ/ZUdxQvxv9Sgc3+kuk/VvncDQ3tEMSn0QtozQ1obmDObIm6gTOcZgxkiBL3lv 09xCJhywpLHGr5Q== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1766719902283874674?= X-GMAIL-MSGID: =?utf-8?q?1766719902283874674?= The path /sys/class/leds/rgb:status is already widely used with the qcom-lpg driver and others. Document it. Signed-off-by: Luca Weiss --- Documentation/leds/well-known-leds.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/leds/well-known-leds.txt b/Documentation/leds/well-known-leds.txt index e9c30dc75884..bfbb5892154d 100644 --- a/Documentation/leds/well-known-leds.txt +++ b/Documentation/leds/well-known-leds.txt @@ -58,6 +58,7 @@ LEDs on notebook body, indicating that sound input / output is muted. * System notification +Good: "rgb:status" Legacy: "status-led:{red,green,blue}" (Motorola Droid 4) Legacy: "lp5523:{r,g,b}" (Nokia N900)