From patchwork Mon May 9 11:11:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 12843351 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 0D05EC433EF for ; Mon, 9 May 2022 11:14:56 +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=aLO3t9Kydo/5C2Y9U2IhhR5h1JufDJTRAnuo8aKqsyM=; b=ShgF+YAMgd1JVi /6x35dKyTtagJabEGNnu2o206Hq1owxLjq2+3GT7czw99Imankb0y40gwlhgOqbncoU/vYE4Ua9fL m4IpYVDpLg6L5lGfI7VJ0ySdi5w/UmHgXORMynfN1F6E303vwJMJ140bANfXOQLiz4gQGOUZ32pmR zuMXjs+pU9t7jjD+9dKbULjAIbxoExcg2EKjhiVy/D9nOQM85rL80cUlvPDWxsZl98CDNMl0EPYmT yibt1Hfpll8e3dw5BU18YlaFbxpenSK7Jn4hNAClEZ10uxzI5aPEPHR+PEMR+9Xud25cU5X4FFAoY Gug3UQA2i0qznvGEclLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1no1Kp-00E1br-5e; Mon, 09 May 2022 11:13:51 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1no1JD-00E0wj-Hb for linux-arm-kernel@lists.infradead.org; Mon, 09 May 2022 11:12:12 +0000 Received: by mail-ej1-x62b.google.com with SMTP id m20so26079352ejj.10 for ; Mon, 09 May 2022 04:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W/dDZTXvhevSA0CwXNeoVIZNKRdACOkTC7CvftF8ff4=; b=hXKQ4iPhqEuKSEkcznKWL5bTQuEvBLD8qMJKXAdJhjdH1Jic9CSNhB1Eg9oqprJ32/ u2sXG5GiPqCXo+JVf9HIPvgnlnW5jNThAK+2mvuoD/0hoWdwownTlRJ40GFBOGXrvlcP HxNMNQbeWLZJedRiOiPLzK5ZQGWaTiCh+OOKPvgjFjkNmS7k0H+qlevcVzjNyDRlPfXP mS/1fOkyR/y/h9Z4zZK3pLpUrFbd0x9ZLH6hzLUKDA6D2muVgTCt2UcbIfPq4+W9EpQP ubjPFJBoyTEy/o+MNaDwGJp8A9sL3waH6fhp3Nbvuvf38qRssQPnQQdMSmS0xuQKPJFK VahQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W/dDZTXvhevSA0CwXNeoVIZNKRdACOkTC7CvftF8ff4=; b=pcWjL873HHNp6WxFK3sgP5MYRWPhCiysiD/Y4Rer3EsKcWbybLanAddA5DFBBYSQW2 nzCQagfIzJIKYHwAbSw2ncCQnVczytKS/3cY2UoDIMXYKbLNCMWVMKfAezZbzCh9u2t5 +jxMkNlvpCySVqhAfHuxMJYLO2PWpjTQJrC03Hia3FBs/NuVBsd/bz024cfsmBrBCmdw KgDK2RTGdPGDjQ4Ed2PUayRfShyWsjYW65hWjLUFTDKXyjrAvLIB/zUmxmnPLhWBMOTQ qQPLacRg0KnDRyPrUpDA3i9S2LK8yABCCwcHIN7Z/VjgBP6dkeC+hLjG5wGKY9jUTb5w EENw== X-Gm-Message-State: AOAM533GXoERDX/XHtltY7IgMK8qVsFtSB7n+b0jgQYVqd55Sy/gNnie zAnxLPVjpKSU/zxHM3idQ8w= X-Google-Smtp-Source: ABdhPJyPZaWZhmEftwjIZNpESFxKpkKA8aFpNHgKO2srzDI3lGvnROkn2dDErjE2rjyHAthlHRo1AA== X-Received: by 2002:a17:906:559:b0:6f3:8ba6:39c8 with SMTP id k25-20020a170906055900b006f38ba639c8mr14168185eja.486.1652094728074; Mon, 09 May 2022 04:12:08 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id c24-20020aa7c758000000b0042617ba63b4sm6075672eds.62.2022.05.09.04.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 04:12:07 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 3/3] ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight Date: Mon, 9 May 2022 13:11:26 +0200 Message-Id: <20220509111126.7032-4-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220509111126.7032-1-max.oss.09@gmail.com> References: <20220509111126.7032-1-max.oss.09@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220509_041211_616173_EAF3C15E X-CRM114-Status: GOOD ( 14.15 ) 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 From: Max Krummenacher Set #pwm-cells to the default 3 to gain access to the parameter which allows inverting the PWM signal. This is useful to specify a backlight which has its highest brightness at 0. Also adapt the brightness steps as the backlight doesn't light up for very low duty cycles. Signed-off-by: Max Krummenacher --- arch/arm/boot/dts/imx6qdl-colibri.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi index f0908b530f86..023e76215064 100644 --- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi +++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi @@ -6,6 +6,7 @@ */ #include +#include / { model = "Toradex Colibri iMX6DL/S Module"; @@ -13,13 +14,13 @@ backlight: backlight { compatible = "pwm-backlight"; - brightness-levels = <0 127 191 223 239 247 251 255>; - default-brightness-level = <1>; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; enable-gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* Colibri BL_ON */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_bl_on>; power-supply = <®_module_3v3>; - pwms = <&pwm3 0 5000000>; + pwms = <&pwm3 0 5000000 PWM_POLARITY_INVERTED>; status = "disabled"; }; @@ -620,7 +621,6 @@ /* Colibri PWM */ &pwm3 { - #pwm-cells = <2>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm3>; status = "disabled";