From patchwork Tue Jan 26 14:06:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 370809 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=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham 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 344FAC433E0 for ; Tue, 26 Jan 2021 14:07:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 006DA22B51 for ; Tue, 26 Jan 2021 14:07:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405716AbhAZOHy (ORCPT ); Tue, 26 Jan 2021 09:07:54 -0500 Received: from mail-40136.protonmail.ch ([185.70.40.136]:56573 "EHLO mail-40136.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405712AbhAZOHv (ORCPT ); Tue, 26 Jan 2021 09:07:51 -0500 Date: Tue, 26 Jan 2021 14:06:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1611670025; bh=salyD/WHDIurAfXLaRdlHjy/N3gO/EgJ38mXhbWj+8A=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=q+HTsB7Uqut7TDSqzeqkeRLfypg5t9zC4sq5LSGRFXYLjJ4ngWqoirWhUky/juxGQ rN7eNCEZGezvPUctVw4/tc5Rbg+bY8AbpHw33S4jL4mdDogThy2JFU+eLWJNfBLAma fJu7BQd7ZQmcn9HjcaXfniqfIEedKnoIcXypjjEw= To: Pavel Machek , Dan Murphy , Bjorn Andersson , Andy Gross , Rob Herring From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Cc: linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Brian Masney , Luca Weiss , Russell King , Georgi Djakov , linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, lkcamp@lists.libreplanetbr.org, andrealmeid@collabora.com Reply-To: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Subject: [PATCH v2 4/4] ARM: dts: qcom: pm8941: Add nodes for QCOM SPMI Flash LEDs Message-ID: <20210126140240.1517044-5-nfraprado@protonmail.com> In-Reply-To: <20210126140240.1517044-1-nfraprado@protonmail.com> References: <20210126140240.1517044-1-nfraprado@protonmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the necessary devicetree nodes for the Qualcomm SPMI Flash LEDs present in PM8941. Signed-off-by: NĂ­colas F. R. A. Prado --- Changes in v2: - Moved from hammerhead dts to pm8941 dtsi, as it was this way downstream - Now using values from leds-qcom-spmi-flash.h arch/arm/boot/dts/qcom-pm8941.dtsi | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi index c1f2012d1c8b..89309d3c777c 100644 --- a/arch/arm/boot/dts/qcom-pm8941.dtsi +++ b/arch/arm/boot/dts/qcom-pm8941.dtsi @@ -2,6 +2,8 @@ #include #include #include +#include +#include &spmi_bus { @@ -189,5 +191,41 @@ pm8941_5vs2: 5vs2 { regulator-initial-mode = <1>; }; }; + + qcom,spmi-flash@d300 { + status = "okay"; + + compatible = "qcom,spmi-flash"; + reg = <0xd300 0x100>; + flash-boost-supply = <&pm8941_5vs1>; + torch-boost-supply = <&pm8941_5v>; + pm8941_flash0: led0 { + led-sources = <0>; + function = LED_FUNCTION_FLASH; + color = ; + led-max-microamp = <200000>; + flash-max-microamp = <1000000>; + flash-max-timeout-us = <1280000>; + default-state = "off"; + qcom,clamp-curr = <200000>; + qcom,headroom = ; + qcom,startup-dly = ; + qcom,safety-timer; + }; + + pm8941_flash1: led1 { + led-sources = <1>; + function = LED_FUNCTION_FLASH; + color = ; + led-max-microamp = <200000>; + flash-max-microamp = <1000000>; + flash-max-timeout-us = <1280000>; + default-state = "off"; + qcom,clamp-curr = <200000>; + qcom,headroom = ; + qcom,startup-dly = ; + qcom,safety-timer; + }; + }; }; };