From patchwork Sun Aug 4 21:10:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dragan Simic X-Patchwork-Id: 13752723 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A91D6C3DA64 for ; Sun, 4 Aug 2024 21:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SDCpF1cJepmHy98Dab9wCQhN1s9SRfBvGZITaNJnjI0=; b=juT4aLQi0jIIPZ V90ehdpOpQbmgvO9y9cl+Ibjsq+80x34f91diSEAZXQLTSDxieD0lpUWyG+UgXCW2Bl9D16d2O9hk wfEeJx54mzDu5imR31FUE0SdB3ZBlR8cd+XZ6dRPmDK47CY5dI28JSj7bmndMDycMLa+BjKn+CTAo VyUz05KcIjPGO+j/UoBu224JalrI0BcaT8bLL/hUhX24gWP53UrF9AYGNNjQPT47bZ+mHEKiR+Abt hV7TIppw2WeWXBlI0hkmXqliRr7ALielAk0xLZCLn6D/Fgjk7LDNeuUUIPNrYmViPs8sXGDuzUoOK Oav9eX0qHkefAxnUI4Qg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1saiVO-0000000Dvvf-1mPW; Sun, 04 Aug 2024 21:11:06 +0000 Received: from mail.manjaro.org ([2a01:4f8:c0c:51f3::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1saiUq-0000000Dvqx-429T; Sun, 04 Aug 2024 21:10:35 +0000 From: Dragan Simic DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjaro.org; s=2021; t=1722805830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=SFovGr+fAr2Hx5+n3cI/uIkQLPLP3RaKmyAIKcx+Ff0=; b=lnh110nc5YV/uqJx/EM74czCz30oSKI93LK3om2Llgl/TT66Oy/9lzj1h9a8UpVeWXF6Z5 tFPC/MAup6HJDs/rZdZSdyw5n7HCoZdyb5zw6oqDTMtoEL+XnugtSKDzD57uhrQQm5YxnG eNac+SQSLrOuEgGy9wgtYcfGgfaCwcL+gOSFc+Y19QQ16mYvNehNL1bqxSuTZHjMdbY8SX AethNfr5DTkDQKm9yteHc/IHOVnOsYuI/wBH3GYkVIhbDwnxQHgxdjU5FEK8uOeOTCgY20 +pKGj0diOE7x+IdImC7ngrfLvsQpeHNwXgr4oVrpJ6Tpeq1zNfxx1FdN4ChmBA== To: linux-rockchip@lists.infradead.org Cc: heiko@sntech.de, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Nikola Radojevic Subject: [PATCH] arm64: dts: rockchip: Raise Pinebook Pro's panel backlight PWM frequency Date: Sun, 4 Aug 2024 23:10:24 +0200 Message-Id: <2a23b6cfd8c0513e5b233b4006ee3d3ed09b824f.1722805655.git.dsimic@manjaro.org> MIME-Version: 1.0 Authentication-Results: ORIGINATING; auth=pass smtp.auth=dsimic@manjaro.org smtp.mailfrom=dsimic@manjaro.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240804_141033_491151_DBEF1385 X-CRM114-Status: GOOD ( 11.28 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Increase the frequency of the PWM signal that drives the LED backlight of the Pinebook Pro's panel, from about 1.35 KHz (which equals to the PWM period of 740,740 ns), to exactly 8 kHz (which equals to the PWM period of 125,000 ns). Using a higher PWM frequency for the panel backlight, which reduces the flicker, can only be beneficial to the end users' eyes. On top of that, increasing the backlight PWM signal frequency reportedly eliminates the buzzing emitted from the Pinebook Pro's built-in speakers when certain backlight levels are set, which cause some weird interference with some of the components of the Pinebook Pro's audio chain. The old value for the backlight PWM period, i.e. 740,740 ns, is pretty much an arbitrary value that was selected during the very early bring-up of the Pinebook Pro, only because that value seemed to minimize horizontal line distortion on the display, which resulted from the old X.org drivers causing screen tearing when dragging windows around. That's no longer an issue, so there are no reasons to stick with the old PWM period value. The lower and the upper backlight PWM frequency limits for the Pinebook Pro's panel, according to its datasheet, are 200 Hz and 10 kHz, respectively. [1] These changes still leave some headroom, which may have some positive effects on the lifetime expectancy of the panel's backlight LEDs. [1] https://files.pine64.org/doc/datasheet/PinebookPro/NV140FHM-N49_Rev.P0_20160804_201710235838.pdf Fixes: 5a65505a6988 ("arm64: dts: rockchip: Add initial support for Pinebook Pro") Cc: stable@vger.kernel.org Reported-by: Nikola Radojevic Signed-off-by: Dragan Simic Tested-by: Nikola Radojević --- arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts index 294eb2de263d..b3f76cc2d6e1 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts @@ -32,7 +32,7 @@ chosen { backlight: edp-backlight { compatible = "pwm-backlight"; power-supply = <&vcc_12v>; - pwms = <&pwm0 0 740740 0>; + pwms = <&pwm0 0 125000 0>; }; bat: battery {