Message ID | 20221209-fp4-pm6150l-flash-v1-3-531521eb2a72@fairphone.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp794162wrr; Fri, 9 Dec 2022 06:06:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf5wNin4QPVS9TQjXQUi57XDKUy/vRl3gUU1DARu4TpQT6ILGI3SkR3+v0ALVxovkNDJLAlb X-Received: by 2002:a05:6a20:42a2:b0:a3:c099:3a7a with SMTP id o34-20020a056a2042a200b000a3c0993a7amr9470524pzj.22.1670594767614; Fri, 09 Dec 2022 06:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670594767; cv=none; d=google.com; s=arc-20160816; b=iW+y+mNhxeev8UvKAnFqTf/E3lKd/sPEg5kU50JBXdeinmheVEpMQqxrnkIthhMbwU RczhtqLA7NjZ+KM3cdp1o1KuZ7Qf6rcF0R9iyYx/F0WNeClTYO9tsE9l1xbfxZXBVfX4 QsElHDXdAKLK3jJYs8oFoI1IiejxVnjgaoNL2/sSB/62WM/ByPaUD5+OeLYWbSCFgsN9 bIYElxEaX65dxJktr44D/10IWn1xax/vOxGSJXue41REEgl39RQ8HRys8LAQVsl+krEd FNn6bk8aFYGPcZEtN4m1y5RX535c+I9n1jdPuPqHDiA0Kh4vjV292ALy1OaTDTRTtwzZ R8jQ== 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=jfZOlKGR+/P2su4394g9InmLBjuJ6p9eVWFIlDxziAA=; b=I5K9wMQtedWMSm+Vi9gysgGer2/c/mY8ztzz0V2dJyDwLM7kNurLrOTO9J9pCocZ2z 8F79o15MDkzxv6JMYtwmQsoDs/PZeCLB7FgLF1bUCW9nPP729HsQNi1MqVy7JFfuID/4 yyGQ/TbZ1ByiYodT0uv4zAl6q49X7A7jbyv8quGbzng5pUG+FHm2LSjwXNW4EZjjwbWR OZC8oduDWDGyW7bU3Qi3JXQXblbnBWxyJrXN+u43XNV4nTjhY1NTyQlp+YbsNW6vmjRY yQPh69iE/GpkHuW5lNLQJnhlubp/M4BJoWDldynWMfBPtOaYHGOdhnuK/WiP1HapXBdw nrPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b="RNV2L/So"; 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=fairphone.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w62-20020a638241000000b0047693f9d264si1464673pgd.833.2022.12.09.06.05.24; Fri, 09 Dec 2022 06:06:07 -0800 (PST) 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=@fairphone.com header.s=fair header.b="RNV2L/So"; 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=fairphone.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229913AbiLINyX (ORCPT <rfc822;sophiezhao968@gmail.com> + 99 others); Fri, 9 Dec 2022 08:54:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229854AbiLINyM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); 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 868CD750B2 for <linux-kernel@vger.kernel.org>; Fri, 9 Dec 2022 05:54:11 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id f7so3161557edc.6 for <linux-kernel@vger.kernel.org>; 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=36JFokhmvYN852VD5S8ACT6DTrIsod1FzgCKsrTnunMyaY4R3xcNpnMuXIf4gx/vax EAQjY/PS93QNBRpoSHoDgGmXU43L0gE5C0w9njJfVjJhLRQ3oJKbKrKc1FgzJbYztMRy vvah6Yd1gXr6wGK751YBEIRZ7vaePjzIiWgVcPbKJ9ywSK+ZGjAeOSx2ttbDbQGRksSP qwBBVcTCnKj4KoCPYwW2InTAgq6F2/8i3xx+PmJwSP8awDI18V2x5Kr/aScdW2abxj0O coDt8dGkG5KuBkIa5n8KcHqRVoaYdl/pp4tEucNgYnFORx6OSXMRr5ghvt5Crj8aV/FT KMmA== X-Gm-Message-State: ANoB5plIqbFVmV+93VnlFFeVz1wafLbEKQpa4lTfxNBZ0a2o7L6gG1ak +HVFH+DNQwiFAfWyS8Tuxb7vqA== 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 <luca.weiss@fairphone.com> 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> Cc: Fenglin Wu <quic_fenglinw@quicinc.com>, linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss <luca.weiss@fairphone.com> X-Mailer: b4 0.11.0-dev-64ef0 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_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751745578802377933?= X-GMAIL-MSGID: =?utf-8?q?1751745578802377933?= |
Series |
Add PM6150L flash LED to Fairphone 4
|
|
Commit Message
Luca Weiss
Dec. 9, 2022, 1:54 p.m. UTC
Configure the pm6150l flash node for the dual flash LEDs found on FP4.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
Comments
On 9.12.2022 14:54, Luca Weiss wrote: > Configure the pm6150l flash node for the dual flash LEDs found on FP4. > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > 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 <dt-bindings/gpio/gpio.h> > #include <dt-bindings/input/input.h> > +#include <dt-bindings/leds/common.h> > #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> > #include <dt-bindings/regulator/qcom,rpmh-regulator.h> > #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_COLOR_ID_YELLOW>; > + led-sources = <1>; > + led-max-microamp = <180000>; > + flash-max-microamp = <1000000>; > + flash-max-timeout-us = <1280000>; > + }; > + > + led-1 { > + function = LED_FUNCTION_FLASH; > + color = <LED_COLOR_ID_WHITE>; > + led-sources = <2>; > + led-max-microamp = <180000>; > + flash-max-microamp = <1000000>; > + flash-max-timeout-us = <1280000>; > + }; > +}; > + > &pm6150l_wled { > status = "okay"; > >
Hi! > Configure the pm6150l flash node for the dual flash LEDs found on FP4. > +&pm6150l_flash { > + status = "okay"; > + > + led-0 { > + function = LED_FUNCTION_FLASH; > + color = <LED_COLOR_ID_YELLOW>; > + led-sources = <1>; > + led-max-microamp = <180000>; > + flash-max-microamp = <1000000>; > + flash-max-timeout-us = <1280000>; > + }; I'm pretty sure the flash is not yellow. Plus, how is the node in /sys/class/leds called? Can you make an entry in Documentation/leds/well-known-leds.txt and ensure the name stays consistent across devices? Best regards, Pavel
On Sat Dec 10, 2022 at 6:16 PM CET, Pavel Machek wrote: > Hi! > > > Configure the pm6150l flash node for the dual flash LEDs found on FP4. > > > +&pm6150l_flash { > > + status = "okay"; > > + > > + led-0 { > > + function = LED_FUNCTION_FLASH; > > + color = <LED_COLOR_ID_YELLOW>; > > + led-sources = <1>; > > + led-max-microamp = <180000>; > > + flash-max-microamp = <1000000>; > > + flash-max-timeout-us = <1280000>; > > + }; Hi Pavel, > > I'm pretty sure the flash is not yellow. The marketing term is Dual LED flash or Dual-tone flash, one LED is a blue-ish white and one is a yellow-ish white, but from what I can tell, in the original code it's always referred to as white and yellow so I also followed that here. Also the LEDs are right next to each other so in practise for torch just both go on, and for camera flash I cannot really tell you but I guess it's doing something there with the camera tuning. See also this picture: https://shop.fairphone.com/media/catalog/product/cache/b752d78484639b19641a8560800d919d/p/_/p_5b_main_camera_back.jpg > > Plus, how is the node in /sys/class/leds called? Can you make an entry > in Documentation/leds/well-known-leds.txt and ensure the name stays > consistent across devices? / # ls -al /sys/class/leds/white:flash/ total 0 drwxr-xr-x 3 0 0 0 Jan 1 00:00 . drwxr-xr-x 4 0 0 0 Jan 1 00:00 .. -rw-r--r-- 1 0 0 4096 Jan 1 00:00 brightness lrwxrwxrwx 1 0 0 0 Jan 1 00:00 device -> ../../../c440000.spmi:pmic@5:led-controller@d300 -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_brightness -r--r--r-- 1 0 0 4096 Jan 1 00:00 flash_fault -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_strobe -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_timeout -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_brightness -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_flash_brightness -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_flash_timeout drwxr-xr-x 2 0 0 0 Jan 1 00:00 power lrwxrwxrwx 1 0 0 0 Jan 1 00:00 subsystem -> ../../../../../../../../../class/leds -rw-r--r-- 1 0 0 4096 Jan 1 00:00 uevent / # ls -al /sys/class/leds/yellow:flash/ total 0 drwxr-xr-x 3 0 0 0 Jan 1 00:00 . drwxr-xr-x 4 0 0 0 Jan 1 00:00 .. -rw-r--r-- 1 0 0 4096 Jan 1 00:00 brightness lrwxrwxrwx 1 0 0 0 Jan 1 00:00 device -> ../../../c440000.spmi:pmic@5:led-controller@d300 -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_brightness -r--r--r-- 1 0 0 4096 Jan 1 00:00 flash_fault -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_strobe -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_timeout -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_brightness -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_flash_brightness -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_flash_timeout drwxr-xr-x 2 0 0 0 Jan 1 00:00 power lrwxrwxrwx 1 0 0 0 Jan 1 00:00 subsystem -> ../../../../../../../../../class/leds -rw-r--r-- 1 0 0 4096 Jan 1 00:00 uevent There's also already flash LED on PinePhone and some MSM8916 devices, but I think they also have white:flash based on the dt. > > Best regards, > Pavel > -- > People of Russia, stop Putin before his war on Ukraine escalates.
On 2022/12/12 21:59, Luca Weiss wrote: > On Sat Dec 10, 2022 at 6:16 PM CET, Pavel Machek wrote: >> Hi! >> >>> Configure the pm6150l flash node for the dual flash LEDs found on FP4. >> >>> +&pm6150l_flash { >>> + status = "okay"; >>> + >>> + led-0 { >>> + function = LED_FUNCTION_FLASH; >>> + color = <LED_COLOR_ID_YELLOW>; >>> + led-sources = <1>; >>> + led-max-microamp = <180000>; >>> + flash-max-microamp = <1000000>; >>> + flash-max-timeout-us = <1280000>; >>> + }; > > Hi Pavel, > >> >> I'm pretty sure the flash is not yellow. > > The marketing term is Dual LED flash or Dual-tone flash, one LED is a > blue-ish white and one is a yellow-ish white, but from what I can tell, > in the original code it's always referred to as white and yellow so I > also followed that here. > > Also the LEDs are right next to each other so in practise for torch just > both go on, and for camera flash I cannot really tell you but I guess > it's doing something there with the camera tuning. > > See also this picture: > https://shop.fairphone.com/media/catalog/product/cache/b752d78484639b19641a8560800d919d/p/_/p_5b_main_camera_back.jpg > Hi Pavel, Luca is right. It is normally called dual CCT (Correlated Color Temperature) flash LED. It has 2 LEDs, one is with higher CCT (~6000K) so it looks like a white LED, another is with lower CCT (~2000K) and it looks like a yellow LED. I am not an expert of this but my understanding is the camera tuning process normally adjusts the brightness of the two LEDs and enables them to get different CCT for different snapshots. I was thinking to use the "white" and "yellow" to name the flash LEDs which should be much better that just using indexes, it implicitly tell that the "white" one is having higher CCT and the "yellow" one is having lower CCT. Fenglin >> >> Plus, how is the node in /sys/class/leds called? Can you make an entry >> in Documentation/leds/well-known-leds.txt and ensure the name stays >> consistent across devices? > > / # ls -al /sys/class/leds/white:flash/ > total 0 > drwxr-xr-x 3 0 0 0 Jan 1 00:00 . > drwxr-xr-x 4 0 0 0 Jan 1 00:00 .. > -rw-r--r-- 1 0 0 4096 Jan 1 00:00 brightness > lrwxrwxrwx 1 0 0 0 Jan 1 00:00 device -> ../../../c440000.spmi:pmic@5:led-controller@d300 > -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_brightness > -r--r--r-- 1 0 0 4096 Jan 1 00:00 flash_fault > -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_strobe > -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_timeout > -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_brightness > -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_flash_brightness > -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_flash_timeout > drwxr-xr-x 2 0 0 0 Jan 1 00:00 power > lrwxrwxrwx 1 0 0 0 Jan 1 00:00 subsystem -> ../../../../../../../../../class/leds > -rw-r--r-- 1 0 0 4096 Jan 1 00:00 uevent > / # ls -al /sys/class/leds/yellow:flash/ > total 0 > drwxr-xr-x 3 0 0 0 Jan 1 00:00 . > drwxr-xr-x 4 0 0 0 Jan 1 00:00 .. > -rw-r--r-- 1 0 0 4096 Jan 1 00:00 brightness > lrwxrwxrwx 1 0 0 0 Jan 1 00:00 device -> ../../../c440000.spmi:pmic@5:led-controller@d300 > -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_brightness > -r--r--r-- 1 0 0 4096 Jan 1 00:00 flash_fault > -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_strobe > -rw-r--r-- 1 0 0 4096 Jan 1 00:00 flash_timeout > -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_brightness > -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_flash_brightness > -r--r--r-- 1 0 0 4096 Jan 1 00:00 max_flash_timeout > drwxr-xr-x 2 0 0 0 Jan 1 00:00 power > lrwxrwxrwx 1 0 0 0 Jan 1 00:00 subsystem -> ../../../../../../../../../class/leds > -rw-r--r-- 1 0 0 4096 Jan 1 00:00 uevent > > There's also already flash LED on PinePhone and some MSM8916 devices, > but I think they also have white:flash based on the dt. > >> >> Best regards, >> Pavel >> -- >> People of Russia, stop Putin before his war on Ukraine escalates. >
Hi! > > > I'm pretty sure the flash is not yellow. > > > > The marketing term is Dual LED flash or Dual-tone flash, one LED is a > > blue-ish white and one is a yellow-ish white, but from what I can tell, > > in the original code it's always referred to as white and yellow so I > > also followed that here. > > > > Also the LEDs are right next to each other so in practise for torch just > > both go on, and for camera flash I cannot really tell you but I guess > > it's doing something there with the camera tuning. > > > > See also this picture: > > https://shop.fairphone.com/media/catalog/product/cache/b752d78484639b19641a8560800d919d/p/_/p_5b_main_camera_back.jpg > > > Hi Pavel, > > Luca is right. It is normally called dual CCT (Correlated Color Temperature) > flash LED. It has 2 LEDs, one is with higher CCT (~6000K) so it looks like a > white LED, another is with lower CCT (~2000K) and it looks like a yellow > LED. I am not an expert of this but my understanding is the camera tuning > process normally adjusts the brightness of the two LEDs and enables them to > get different CCT for different snapshots. I believe this is normally called "warm white" and "cool white", no? Yellow would be monochromatic light at cca 575nm, see https://en.wikipedia.org/wiki/Shades_of_yellow . If we need to add some defines for that, lets do that. BR, Pavel
Hi Pavel, On Thu Mar 23, 2023 at 8:54 PM CET, Pavel Machek wrote: > Hi! > > > > > > I'm pretty sure the flash is not yellow. > > > > > > The marketing term is Dual LED flash or Dual-tone flash, one LED is a > > > blue-ish white and one is a yellow-ish white, but from what I can tell, > > > in the original code it's always referred to as white and yellow so I > > > also followed that here. > > > > > > Also the LEDs are right next to each other so in practise for torch just > > > both go on, and for camera flash I cannot really tell you but I guess > > > it's doing something there with the camera tuning. > > > > > > See also this picture: > > > https://shop.fairphone.com/media/catalog/product/cache/b752d78484639b19641a8560800d919d/p/_/p_5b_main_camera_back.jpg > > > > > Hi Pavel, > > > > Luca is right. It is normally called dual CCT (Correlated Color Temperature) > > flash LED. It has 2 LEDs, one is with higher CCT (~6000K) so it looks like a > > white LED, another is with lower CCT (~2000K) and it looks like a yellow > > LED. I am not an expert of this but my understanding is the camera tuning > > process normally adjusts the brightness of the two LEDs and enables them to > > get different CCT for different snapshots. > > I believe this is normally called "warm white" and "cool white", no? > Yellow would be monochromatic light at cca 575nm, see > https://en.wikipedia.org/wiki/Shades_of_yellow . I don't really have any more information I can provide right now. If you feel it should be called warm white and cool white, feel free to send a patch changing it. I'm personally okay with it being called white & yellow since that seems to be the term used in (downstream) software for these kinds of leds. Regards Luca > > If we need to add some defines for that, lets do that. > > BR, > Pavel > -- > People of Russia, stop Putin before his war on Ukraine escalates.
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 <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> +#include <dt-bindings/leds/common.h> #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h> #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_COLOR_ID_YELLOW>; + led-sources = <1>; + led-max-microamp = <180000>; + flash-max-microamp = <1000000>; + flash-max-timeout-us = <1280000>; + }; + + led-1 { + function = LED_FUNCTION_FLASH; + color = <LED_COLOR_ID_WHITE>; + led-sources = <2>; + led-max-microamp = <180000>; + flash-max-microamp = <1000000>; + flash-max-timeout-us = <1280000>; + }; +}; + &pm6150l_wled { status = "okay";