From patchwork Wed Oct 19 06:51:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Kemnade X-Patchwork-Id: 13011411 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 F17C5C433FE for ; Wed, 19 Oct 2022 06:53:51 +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:References:In-Reply-To: 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: List-Owner; bh=kn+uKgx0EW28lTLT8GarAqmswLQ6gIF+zuze0GGSwME=; b=CBOrVORoXT3O6+ OVqNgd6uPBAjivA1/3qGFJn6a+7/eeHsNxw+h/IkkvvWWkKPJFU66pJpwstwWwxA3xsD3mQQQwixw Khrrrky7bEDEqu7Hzwbtc+j15cqFejlS4yvBnB7NlggeGCggwmjRjG+fnxOhTFmPaI4TlSMP9xBsl rEeJDn1fbEQ4f9ejlN4hKxAWIhCClEwwNYF7tIe1ykc2YZXhUDqJp4+VWdT83kFCA4MOnVyYYJOCI K+rCc2HDNzaYHRUEWZJeivoH7xmUFLVI60C9yutA8A8QmQkF1IM7/qpOHgVaMZgaGjV00AEOX9h4r 7Y+Fu6srN+F7NEQ4aMsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol2wS-00Fr2S-UB; Wed, 19 Oct 2022 06:52:41 +0000 Received: from mail.andi.de1.cc ([2a01:238:4321:8900:456f:ecd6:43e:202c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol2w8-00FqKW-6W for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 06:52:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3EIE1b+W7R/DKwGmrntdlJQvmv9HO0094TJ61G0bhE8=; b=ZJTnp/sJhSqx6iyfcAfZpRaWDV VweMsaH7uG9M1dtlpgv5GrXR/C/PBpkSr8PtILADjO4W3dbpL7Q1+xmkadSCQnXMKLQcr/f2M37EX yR/CyhKwqrMeQguPG57+dbny6BEAEa1f14tfxfft2817I83CfWziIX8o4bAOS90T2YwI3dS1gOoku mYK1NGqBNW8ivISP1pVpNrbyK6F+Ge0QBXhQt1mHJrRzo5STghBDgX9pmtM8njku9dSWJ7dnIsq7U cqUOV6PRGQkpKx90OBEg5izoSY1d1NPCFFHc/PAP2A0O+rHwZkwZhDXjfy4InGNTvOrhdBg+VdJfO lGWH+OBg==; Received: from p200300ccff064b001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff06:4b00:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ol2vq-00045Z-Fm; Wed, 19 Oct 2022 08:52:02 +0200 Received: from andi by aktux with local (Exim 4.94.2) (envelope-from ) id 1ol2vq-0044Jg-0Y; Wed, 19 Oct 2022 08:52:02 +0200 From: Andreas Kemnade To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, j.neuschaefer@gmx.net Cc: Andreas Kemnade Subject: [PATCH 1/2] ARM: dts: imx6sl-tolino-shine2hd: Add backlight Date: Wed, 19 Oct 2022 08:51:58 +0200 Message-Id: <20221019065159.969852-2-andreas@kemnade.info> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221019065159.969852-1-andreas@kemnade.info> References: <20221019065159.969852-1-andreas@kemnade.info> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221018_235220_486309_9991D7A2 X-CRM114-Status: UNSURE ( 9.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add backlight for Tolino Shine2 HD. It uses the PWM of the embedded controller. Signed-off-by: Andreas Kemnade --- arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts b/arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts index 663ee9df79e6..ea0ce59aa4f1 100644 --- a/arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts +++ b/arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts @@ -18,6 +18,21 @@ / { model = "Tolino Shine 2 HD"; compatible = "kobo,tolino-shine2hd", "fsl,imx6sl"; + backlight { + compatible = "pwm-backlight"; + pwms = <&ec 0 50000>; + power-supply = <&backlight_regulator>; + }; + + backlight_regulator: regulator-backlight { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_backlight_power>; + regulator-name = "backlight"; + gpio = <&gpio2 10 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + chosen { stdout-path = &uart1; }; @@ -299,6 +314,12 @@ &iomuxc { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_hog>; + pinctrl_backlight_power: backlight-powergrp { + fsl,pins = < + MX6SL_PAD_EPDC_PWRCTRL3__GPIO2_IO10 0x10059 + >; + }; + pinctrl_gpio_keys: gpio-keysgrp { fsl,pins = < MX6SL_PAD_SD1_DAT1__GPIO5_IO08 0x17059 From patchwork Wed Oct 19 06:51:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Kemnade X-Patchwork-Id: 13011412 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 15778C43219 for ; Wed, 19 Oct 2022 06:53:53 +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:References:In-Reply-To: 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: List-Owner; bh=av9mRZbZd71iF9V7BVRp/x/dqUhuIb2MKVAeyGmaEXo=; b=CFmN94uedUzFYT 1OVECCw9fCjciEnb3h9pvzhwqef+F2muEnwFSqTi1GVK3WpkogvXdq+ako3bg7vOCbaiRu/4bHHj+ mrdoY+aR3v8vUVTFPpVmpg0yAKoceZnXgMPoTYZeKuRGelIr1UVjSFjvBvQlJdcZ0QmRz3Cmks6h0 AE15+yFJBhQW9YboaWOeH9bzbUN3W4VxVu//sfOvy9iAkhI5syx4UaBQ4EKmUSfBIq90DzcUx/g2Z E2OUJKtbka1Wu+CncYGVD0UC805Trqd9CrtaD2g9a3KqMxblCqbGahHBvNwOsNZq6sFWhe/RPA6Gg 3EXlBOcVZ2ZCXwoeB9NQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol2wK-00FqoA-7G; Wed, 19 Oct 2022 06:52:32 +0000 Received: from mail.andi.de1.cc ([2a01:238:4321:8900:456f:ecd6:43e:202c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol2w8-00FqH5-6A for linux-arm-kernel@lists.infradead.org; Wed, 19 Oct 2022 06:52:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1w6iARXkcU5udr40SXfE+pLZ56UmQ/8xdX5bxFQ1ePc=; b=Y+FB9sR7gOWgn9WpyzFoXQmUvD m6n64RUEP8cQo0gKhz0hZ4ZA+u3P5po72+Hu/KVZkGUcIxGd/qeX7GjmMl32T3+i9Ow2BVd+xySXN TEoa2f9cBgQoZaj5WYrMDf+qvjWfbX7LTfdIKv2l8BYVcuC5HN2qY7q/gsrPA+EKqpaF7OGzmvNh8 9qSu9t6goBkxLTlQM6xDZIO+xFYDjKxP97Z7adCuxCYfdqEQnNNDOVZ129pzl2trgnve7Sz4I9meY kiwWwkcjw7t32xx3oyCDkIdHeK8C8ThoNoBaLsQE2W02wjEA9bE76xQQG3v5HCSxtvv1xxljRKffE FKC8mNbQ==; Received: from p200300ccff064b001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff06:4b00:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ol2vr-00045r-0h; Wed, 19 Oct 2022 08:52:03 +0200 Received: from andi by aktux with local (Exim 4.94.2) (envelope-from ) id 1ol2vq-0044Jl-HI; Wed, 19 Oct 2022 08:52:02 +0200 From: Andreas Kemnade To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, j.neuschaefer@gmx.net Cc: Andreas Kemnade Subject: [PATCH 2/2] ARM: dts: imx6sl-tolino-shine2hd: Add backlight boost Date: Wed, 19 Oct 2022 08:51:59 +0200 Message-Id: <20221019065159.969852-3-andreas@kemnade.info> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221019065159.969852-1-andreas@kemnade.info> References: <20221019065159.969852-1-andreas@kemnade.info> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221018_235220_482098_F6E0E89D X-CRM114-Status: GOOD ( 11.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Vendor system has a separate checkbox for increasing brightness of the backlight combined with a big warning that power consumption will greatly increase. With that checkbox enabled there is a greater range in which backlight brightness can be adjusted Add a switch to achieve the same, since the backlight is actually LED, this seems to be the most appopiate place to add it. Nothing fits perfectly. Signed-off-by: Andreas Kemnade --- arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts b/arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts index ea0ce59aa4f1..da1399057634 100644 --- a/arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts +++ b/arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts @@ -80,6 +80,12 @@ led-0 { gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "timer"; }; + + led-1 { + label = "tolinoshine2hd:white:backlightboost"; + gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "off"; + }; }; memory@80000000 { @@ -404,7 +410,8 @@ MX6SL_PAD_REF_CLK_32K__I2C3_SDA 0x4001f8b1 pinctrl_led: ledgrp { fsl,pins = < - MX6SL_PAD_SD1_DAT2__GPIO5_IO13 0x17059 + MX6SL_PAD_SD1_DAT2__GPIO5_IO13 0x17059 + MX6SL_PAD_EPDC_SDCE2__GPIO1_IO29 0x17059 >; };