From patchwork Fri Dec 9 13:54:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 13069574 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B77A8C04FDE for ; Fri, 9 Dec 2022 13:54:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbiLINyM (ORCPT ); Fri, 9 Dec 2022 08:54:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbiLINyL (ORCPT ); Fri, 9 Dec 2022 08:54:11 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00C6973F63 for ; Fri, 9 Dec 2022 05:54:09 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id d14so3138666edj.11 for ; Fri, 09 Dec 2022 05:54:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=XRmBhl+xO1didxxTxIpTyo1S+nD5JTfKsPbiV9tkby0=; b=zAQqsdAGFrHDAYMPimScUijNmZ5kuuI8xgkCBHBW6E3YANtmK5YAabM+zCr3V3XDiZ uzKJEgHCrtfXjq5CklbjhLWb6DsPhSiJ3IkBuZ/IbQmNuv/jRkhLNloJnjFeMVTdTL1I afdOgrQdl46z8fpLkaQg1TR85aQUrIjROu1d1Cysk5CK6jx2KnAoLMbB87x+qjV//lws nyL+DZmhv1+edKiBrL1+5eAFywlGEdNy5fdE5ACorPPrelBF8nHW1Rv1uqL+waNzi0b+ c0nE086f5ijitn4i3reqLIVfQRUgmHoBICQ/EUTAbxHXFZLD9r1SXCuki4Mg+bPpeFkF 1/CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XRmBhl+xO1didxxTxIpTyo1S+nD5JTfKsPbiV9tkby0=; b=FURWcTORBgyo77742EubcYDjL6dhwoynWb7hg2FY3Lv6TwJGHF6cl9hm/0JZO1qZYb GNXwrEyrGdikAY0gbopgnF9mlgYUu++GqqbK5vz1uwp+VRgQmkL5dnB8FbPmQ11EKhDp GWwLQu04mhHn5PKmCM/inIlI1ugGu8J7I6vQJlW+eTcG5sq9Ud5DjosTRjQE4q7GWgia /HwYvEb/2AhW7TegNpVeDTHPgNASq5pHVhy/JQy4JgE/CTd1muWuUuzWgcN3fXs6fZai ayX9HWU9ruBhXm9B4TQo+iSP1zAnWSJBT3YvwxjVHRPUtn/rJTkIcmCfO8tFI1UjtbqK ycLQ== X-Gm-Message-State: ANoB5plcL7zW144hNOzv6d124VaxaduBGPwm42lqlQR+d7dM14m1o73y sw288tH022Dtijlr2L4zp3UQmQ== X-Google-Smtp-Source: AA0mqf4QyULBJSa7csxpJIthmlParQ3a3lsV6kGcszd2vuuNuB4S/570nzFD6QgqVtu0t3W6QttDfA== X-Received: by 2002:aa7:d5d4:0:b0:46c:c029:7afc with SMTP id d20-20020aa7d5d4000000b0046cc0297afcmr5323187eds.42.1670594048599; Fri, 09 Dec 2022 05:54:08 -0800 (PST) Received: from [172.16.240.113] (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id k19-20020aa7c393000000b0045b4b67156fsm656371edq.45.2022.12.09.05.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 05:54:08 -0800 (PST) From: Luca Weiss Date: Fri, 09 Dec 2022 14:54:06 +0100 Subject: [PATCH 1/3] dt-bindings: leds: spmi-flash-led: Add pm6150l compatible MIME-Version: 1.0 Message-Id: <20221209-fp4-pm6150l-flash-v1-1-531521eb2a72@fairphone.com> References: <20221209-fp4-pm6150l-flash-v1-0-531521eb2a72@fairphone.com> In-Reply-To: <20221209-fp4-pm6150l-flash-v1-0-531521eb2a72@fairphone.com> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Pavel Machek , Rob Herring , Krzysztof Kozlowski Cc: Fenglin Wu , linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss X-Mailer: b4 0.11.0-dev-64ef0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the compatible for the flash-led block found on pm6150l PMIC. Signed-off-by: Luca Weiss Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml index 1b273aecaaec..ffacf703d9f9 100644 --- a/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml +++ b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml @@ -22,6 +22,7 @@ properties: compatible: items: - enum: + - qcom,pm6150l-flash-led - qcom,pm8150c-flash-led - qcom,pm8150l-flash-led - qcom,pm8350c-flash-led From patchwork Fri Dec 9 13:54:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 13069576 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A927AC2D0CB for ; Fri, 9 Dec 2022 13:54:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229814AbiLINyN (ORCPT ); Fri, 9 Dec 2022 08:54:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbiLINyL (ORCPT ); Fri, 9 Dec 2022 08:54:11 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D30BD750A5 for ; Fri, 9 Dec 2022 05:54:10 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id m19so3157701edj.8 for ; Fri, 09 Dec 2022 05:54:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=f4yh5xgjEQoq90Bl89iS4Grp7fPsFxoV4M+wDWpZgpE=; b=T9AMDcmPce0wGjd2pPpDE2xhD/MhpmqUzUpvmRoOTT+76RP0S+fE/RqkE/j85/pdM4 YiBAFTw4rHHyO40snTvXwUVOXawyZ+3K5I8AqjJ5EEiW9HndRoTV/EOqZYvDvo1WJboV R41ULrSdSW/Md7gdUykVAGDJ13/VqjlrcKmO0HcAmDp74cIwgCvUjFa32w0uAj7n+hN8 BM7ZXBrnOzw12Bjpv8iYeEHmW2yGsDwdBv7mej4QneFqqtZDQnZMx6B7pDJLHHhkMJH1 BkaACbwnnFvUpT4+2tDGT7zD3ZSJ0dgDqheUbN0omCxCC4S+oOtyORuOZCcFFrXx4EQZ MPLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f4yh5xgjEQoq90Bl89iS4Grp7fPsFxoV4M+wDWpZgpE=; b=OC7tcKbqTBKmc35XhZ/m0at6AqeIw0Hf8yUuKysJD3JzGrSqeREt5c1oVBruWt8Udz LsDaAdr6D+z15d7zw63gNE93PL2UyueW3lI9H/B7VRu3fvd5EVDIBKPW6Jy0EbPg7K1B Tt17C81tBPbQAZ/l+RK8qJpz1uBQCKoZA6Wru6cIPAwDVQqPNNZPi69+ymGGbRMMS6Yt XMhMWMNwVLwVQhyF00RcKAqxyfOFXTJzGVaR+nsSWz+vAhRKcMRW41FpnWh0AKhUqfA2 UUdJb5XmxGVLBJGEBjIZ8I+RfD2MDBKPtWLtjzF0kkHVxrgtN1cWwmL9qFpYI54nYJHd 6r8Q== X-Gm-Message-State: ANoB5plpkakR7KllRbQPkrRak7fU5tUyQ2IIRilijFmcXjBy5ExjGf5r PpU1QgchzpW0B7gbMHOXOzy/Xg== X-Google-Smtp-Source: AA0mqf7X23tw1uk6uJrsTDNddrFALdnj1e042jncHPzXIju6bC/k236aIcNNV+1TT/qimYb9pExEWg== X-Received: by 2002:a05:6402:5483:b0:467:7b2e:8863 with SMTP id fg3-20020a056402548300b004677b2e8863mr3742690edb.12.1670594049274; Fri, 09 Dec 2022 05:54:09 -0800 (PST) Received: from [172.16.240.113] (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id k19-20020aa7c393000000b0045b4b67156fsm656371edq.45.2022.12.09.05.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 05:54:08 -0800 (PST) From: Luca Weiss Date: Fri, 09 Dec 2022 14:54:07 +0100 Subject: [PATCH 2/3] arm64: dts: qcom: pm6150l: add spmi-flash-led node MIME-Version: 1.0 Message-Id: <20221209-fp4-pm6150l-flash-v1-2-531521eb2a72@fairphone.com> References: <20221209-fp4-pm6150l-flash-v1-0-531521eb2a72@fairphone.com> In-Reply-To: <20221209-fp4-pm6150l-flash-v1-0-531521eb2a72@fairphone.com> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Pavel Machek , Rob Herring , Krzysztof Kozlowski Cc: Fenglin Wu , linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss X-Mailer: b4 0.11.0-dev-64ef0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a node describing the flash block found on pm6150l. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Acked-by: Pavel Machek --- arch/arm64/boot/dts/qcom/pm6150l.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm6150l.dtsi b/arch/arm64/boot/dts/qcom/pm6150l.dtsi index 90aac61ad264..86e659fcbba6 100644 --- a/arch/arm64/boot/dts/qcom/pm6150l.dtsi +++ b/arch/arm64/boot/dts/qcom/pm6150l.dtsi @@ -112,6 +112,12 @@ pm6150l_lsid5: pmic@5 { #address-cells = <1>; #size-cells = <0>; + pm6150l_flash: led-controller@d300 { + compatible = "qcom,pm6150l-flash-led", "qcom,spmi-flash-led"; + reg = <0xd300>; + status = "disabled"; + }; + pm6150l_wled: leds@d800 { compatible = "qcom,pm6150l-wled"; reg = <0xd800>, <0xd900>; From patchwork Fri Dec 9 13:54:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 13069577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84502C4332F for ; Fri, 9 Dec 2022 13:54:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229830AbiLINyP (ORCPT ); Fri, 9 Dec 2022 08:54:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbiLINyM (ORCPT ); Fri, 9 Dec 2022 08:54:12 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BB6F73F69 for ; Fri, 9 Dec 2022 05:54:11 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id l11so3175892edb.4 for ; Fri, 09 Dec 2022 05:54:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=jfZOlKGR+/P2su4394g9InmLBjuJ6p9eVWFIlDxziAA=; b=RNV2L/Sop5/PdTIx3qI63Fj5ZMWwkTZqMD0vIIGi2IKFImQX4QRFRgqentkk0GXEVp v+iCJXqEkCzdgVBpvEdMimpvrep2rdG5Se1dZ4uXrvxWMuuXrLnDEsyV/n3697O/JzhS /RQKR1ZOXxOk1ueUykpfMnYpGRDQp7TFZz9KkULrHMGk4tCUxqm9C9N8nQ4anfXPEjz/ LdpLF62dfOMJiQ+ndxoLMzvAs5FAF5vkdMrFSsSCzTy5g9bL1glKTaO0Do+RKwe1ngk9 04uB8a60Ipp9chgbWawpL7IkCRLY8D7T3FjmjOvHCt0ZEf0gO76hu745oEF6vKKPPzet 7fkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jfZOlKGR+/P2su4394g9InmLBjuJ6p9eVWFIlDxziAA=; b=zp+PfDYBJz90vm5jREihcIGJIFqVdLdf3/OB2FZU5dcN7E7deqf7evu4dAqufFmFig 4O4h9WVg2YT/WC8y5Iv6wtJG1Bbg3Vk8aj/fS8xVG/BbMwZeZDOZYzLMEku3U920fwCa 6N16GAswURy8ZZc3YgWqXfG29OQEJURvuh3DDmamfUMqrlo5HMG4U3cvTRnPP3SLiF9X sMgRixXqHRZYYD1T1QjRBfE/O6FMMoCjnWnjPfPBpsi6XgIZkega4MD8QRsaypWkaa/M CdRYv7g1zm1PHQvCGHhrkfBhQcJkqkSl2g45M6KDeOhEV3hfMjFvL3kF/PKQtyfIOPfK pKdA== X-Gm-Message-State: ANoB5plrvrnu162a6nu0KNV1QM4u6UEA7ML84LRVU2udVnfY6zC2FJuq wpqKYirQIzHQAbOszCDOsJiueQ== X-Google-Smtp-Source: AA0mqf7bfnAbNrpTqzZUS+sekqhXfLPux6Cr11cOwIbyl2ZNYjOyapiWmfPgwaAP/qK0+K/Ir7hzhQ== X-Received: by 2002:a05:6402:3897:b0:468:a5fc:8e36 with SMTP id fd23-20020a056402389700b00468a5fc8e36mr5172683edb.20.1670594050043; Fri, 09 Dec 2022 05:54:10 -0800 (PST) Received: from [172.16.240.113] (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id k19-20020aa7c393000000b0045b4b67156fsm656371edq.45.2022.12.09.05.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 05:54:09 -0800 (PST) From: Luca Weiss Date: Fri, 09 Dec 2022 14:54:08 +0100 Subject: [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: configure flash LED MIME-Version: 1.0 Message-Id: <20221209-fp4-pm6150l-flash-v1-3-531521eb2a72@fairphone.com> References: <20221209-fp4-pm6150l-flash-v1-0-531521eb2a72@fairphone.com> In-Reply-To: <20221209-fp4-pm6150l-flash-v1-0-531521eb2a72@fairphone.com> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Pavel Machek , Rob Herring , Krzysztof Kozlowski Cc: Fenglin Wu , linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss X-Mailer: b4 0.11.0-dev-64ef0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Configure the pm6150l flash node for the dual flash LEDs found on FP4. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts index c456e9594ea5..fef7d1d02925 100644 --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts @@ -7,6 +7,7 @@ #include #include +#include #include #include #include "sm7225.dtsi" @@ -367,6 +368,28 @@ &mpss { firmware-name = "qcom/sm7225/fairphone4/modem.mdt"; }; +&pm6150l_flash { + status = "okay"; + + led-0 { + function = LED_FUNCTION_FLASH; + color = ; + led-sources = <1>; + led-max-microamp = <180000>; + flash-max-microamp = <1000000>; + flash-max-timeout-us = <1280000>; + }; + + led-1 { + function = LED_FUNCTION_FLASH; + color = ; + led-sources = <2>; + led-max-microamp = <180000>; + flash-max-microamp = <1000000>; + flash-max-timeout-us = <1280000>; + }; +}; + &pm6150l_wled { status = "okay";