From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr2-f34.google.com (mail-wr2-f34.google.com [74.125.225.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 757754483A6 for ; Fri, 2 Oct 2026 08:22:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.98 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790929359; cv=none; b=HUfgxwfBQlJW0cpgzbNdYkSqF808hH5d+UzBGIuG6ZxEt27vHsuDaP7yAPqPBuyyCelXSDj4o8RruIjLRd4FsDUgDASZ4mcidzWYE9DJbNVVZOE6SQ9S2/NJvxqGJl+Rj+joec6IbJAMbcxCAXIddAleNXBrUYjFDTvqHkvNN3A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790929359; c=relaxed/simple; bh=uhpArYY+OICqmmGKPczNWZg6Ob6IRiHXPfmlrAbRq5w=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=mJUhSLxecO9gHfmhqJXSXaBSJfEx6QVRmQuUSbs+XMj5ZqR04IdWH7yg65NYWJGkouwiT9uzDF+ewdfdhsj3DvzxyeH4590ce8DPMphkfljUorOnbbZ4FcRsr+eoIjVjVw6qXlgy0fwMEqBeWExluOC2Uu+MF5BJsLBDs0n7zQ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=FEzE+j3P; arc=none smtp.client-ip=74.125.225.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="FEzE+j3P" Received: by mail-wr2-f34.google.com with SMTP id ffacd0b85a97d-48b01c4f4daso2085161f8f.1 for ; Fri, 02 Oct 2026 01:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1790929354; x=1791534154; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:organization :autocrypt:content-language:references:cc:to:subject:reply-to:from :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to:content-type; bh=oXhQxjCZPJkDL/0F5UFiLvNFCGp+omiCYVv4WP26NK8=; b=FEzE+j3PmddHzuUTsmIbmnkCgoQg7g1V+mHcpXZ1WAVtQeXKZ6NxoZ2MYAH85x6yuE XxRuvR30T8x8RBz9foPYXWW/zgakVxqR98gFqbGMfGo8Z9yp4WO2MEH7Zn2ibLhnAPva p3xjiPD7PDbcfo0u6Dw4cHthFU46p26ZWbqodmqemcdDiOKYCFTm6nbYnXx7AeLdYS1k f2RSu9l9Nir2g0QX2WoX89jYLmsBZRvrwa12anYFTD7a/HR0Nx2yDtx3TzmaOC3Bz40y Fop2DyG6EGYuGAflUncLlB7TuOIA/Gw4wCd2I7QM6VKvMcANSy/O8XNZvwu3u1AGTfVH 8E1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790929354; x=1791534154; h=content-transfer-encoding:content-type:in-reply-to:organization :autocrypt:content-language:references:cc:to:subject:reply-to:from :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to:content-type; bh=oXhQxjCZPJkDL/0F5UFiLvNFCGp+omiCYVv4WP26NK8=; b=PO9ortj6JBQRwywCReO9lkSzyJyWCZjMpGBWz91l7KGiKFUYVXRyHoiLRpPy6+b9Vf Wr9IHO9prVV0Fx8wDef2dTW6eNuh8cmskFNHx3LMaMoNm7OZ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a05:600c:37cd:b0:49d:1840:4fd2 with SMTP id 5b1f17b1804b1-4a0275a1d84mr37767835e9.23.1790929353841; Fri, 02 Oct 2026 01:22:33 -0700 (PDT) Received: from ?IPV6:2a01:e0a:106d:1080:2f62:6d3:721b:8c9e? ([2a01:e0a:106d:1080:2f62:6d3:721b:8c9e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a027f2a4c4sm63997895e9.2.2026.10.02.01.22.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Oct 2026 01:22:33 -0700 (PDT) Message-ID: <54da53e6-66db-4357-a00d-da27fb936117@linaro.org> Date: Fri, 2 Oct 2026 10:22:32 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: Neil Armstrong Subject: Re: [PATCH 1/2] dt-bindings: display: panel: add optional wled-supply To: Arpit Saini , Dmitry Baryshkov , Krzysztof Kozlowski Cc: Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , devicetree@vger.kernel.org, rajeevny@qti.qualcomm.com References: <20260929-wled-supply-series-v1-0-75d0a83b4b00@oss.qualcomm.com> <20260929-wled-supply-series-v1-1-75d0a83b4b00@oss.qualcomm.com> <20261001-private-wooden-chachalaca-51aa57@quoll> <997cefa0-384c-466f-b318-077939946768@kernel.org> <1cd249d8-0a26-45e4-8263-dd4a120fc89e@oss.qualcomm.com> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPek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qQDDUaCsaTf8UeDcwYOtgI8iL4oHcsGtUX oUk33HEAEQEAAcLAXwQYAQIACQUCTVkGzwIbDAAKCRAWmrexpM/4rrXiB/sGbkQ6itMrAIfn M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3 3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: <1cd249d8-0a26-45e4-8263-dd4a120fc89e@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/1/26 20:09, Arpit Saini wrote: > > > On 10/1/2026 3:25 PM, Dmitry Baryshkov wrote: >> On Thu, Oct 01, 2026 at 08:57:52AM +0200, Krzysztof Kozlowski wrote: >>> On 01/10/2026 08:55, Krzysztof Kozlowski wrote: >>>> On Tue, Sep 29, 2026 at 06:42:20PM +0530, Arpit Saini wrote: >>>>> Some boards drive the ILI7807S panel's backlight from an external >>>>> WLED driver whose enable input is wired to a GPIO, typically modeled >>>>> as a fixed regulator (e.g. vreg_wled). >>>> >>>> You describe something else. What's fixed regulator should not matter >>>> here. Which pin is it in ILI7807S? >>>> >>>> It seems you just want to represent GPIO with a regulator. This is just >>>> confusing and typical downstream workaround. >>> >>> What's more, you basically REVERT the review YOU RECEIVED in v1. Really, >>> just sneak the same stuff 3 months after like the review never happened. >>> >>> NAK >> >> After discussing this offline with Krzysztof. It's not a supply (my >> fault), it's an LCD driver. So, the best way to handle your displaycard >> seems to add a gpio-backlight, reference it from the panel and then in >> the driver check for the backlight's max_brightness level. If it's 1, >> then you have to send extra DCS commands to control PWM. If it's >> higher, use normal backlight class controls. >> > > Hi Dmitry, Krzysztof > > I have a few clarifying questions regarding the proposed approach. Please let me know if I've misunderstood anything. > > panel_backlight: backlight { > compatible = "gpio-backlight"; > gpios = <&tlmm 91 GPIO_ACTIVE_HIGH>; > default-on; > }; > > 1) Adding gpio-backlight and check for max_brightness level if its 1, > > If we model LCD_BKLT_EN using gpio-backlight, the backlight device effectively exposes only on/off control (max_brightness = 1), > we can't support the full range of brightness i.e 0 to 16383 (0x3FFF) > > 2) Adding gpio-backlight and based upon max_brightness level of 1 , are you suggesting to register another > backlight device that can actually drive DCS brightness. In that case we can actually have the MIPI DCS controlled brightness > > If so, wouldn't that result in two backlight devices associated with the same panel: > > gpio-backlight device for enable/disable > panel backlight device for DCS brightness control > > Is that the expected design? It's a great question because there's a large variety of how backlight is implemented, and some panels can drive a PWM to an actually backlight controller which uses external pwm. In this case we should model the backlight IC as backlight driver with only 1 or 0 capability and use the DCS to program the PWM. So it leads exactly to your issue. So perhaps one way would be to either: - call into the gpio-backlight from the DCS callback, we may need to fix some locking issues - add way to "link" backlight devices so the backlight value can be propagated In any case the problem remains that both backlight devices will be exposed to userspace, which we don't want. So additional changes will be needed. > > 3) I previously tried modeling LCD_BKLT_EN using pinctrl states (panel_bl_en / panel_bl_suspend) > for the enable GPIO itself. However, Dmitry suggested modeling it as a regulator instead: > > Link : https://lore.kernel.org/all/qkhgg5x67sijiialucvzac275zhpjrtt47a4udjpyzmgvilut5@dcrslq3ai7mc/ > > 4) Modeled optional regulator wled-supply: a regulator that only gates the external backlight driver chip's power/enable, > with DCS remaining the sole brightness path in this current patch , the panel-himax-hx83121a.c does exactly the same. > > Would this can be the preferred modeling for such panels? > > Please refer to this Hardware diagram I explained earlier , > Link : https://lore.kernel.org/all/bade420c-aeb8-4bdd-b0cf-3ade17b21c18@oss.qualcomm.com/ > > > Please let me know your suggestions. > > Thanks, > Arpit > > > > >