From patchwork Fri May 13 10:26:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 572294 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DFBDC433EF for ; Fri, 13 May 2022 10:27:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379432AbiEMK1L (ORCPT ); Fri, 13 May 2022 06:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230405AbiEMK1G (ORCPT ); Fri, 13 May 2022 06:27:06 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB4A84F9D6; Fri, 13 May 2022 03:27:05 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id z19so9414995edx.9; Fri, 13 May 2022 03:27:05 -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=ZIRDh90qLBvm84n6WkVrFxDl6BpgAk2Zm5Bgq5+AFUk=; b=b7csS6dQWyR/B4w7/AfPzowZ32axPRW+xaxYY/sD//r5JAT4tOd5ghfxuid99JBOpp DRUHa+LPXtBkY7CriVzq/1UOe4uBZACFkzvzVrSV71+GrJ76MY2YezvX2tdosxB0kvWZ cuFJtBu75gCjQmA5I9ddoXOTMe6izuGBb583wvwGCclDisEHLWuBie5dWyZFemAbBqb9 SsM9kOJxYuaZZJE1Q5E2qZsN9O+7yiU/OBqbUcret3qen039LXBBOQ5Z+t9n6bEYdUQU R7VX0NUgfkuDzeiqEsX34zAw1hh56277acq8wA9zDBsZHKShJNcbIWqtvOBdDfu+D/ho wZoA== 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=ZIRDh90qLBvm84n6WkVrFxDl6BpgAk2Zm5Bgq5+AFUk=; b=7W8HzXniRFrJMawUu0Mly88lbFyc7xLw1ZPyDpMVFWkRN6qI4e7OcPUMOj4/ph3wwB WQWp9LKb5JScl8VGoXX/o+40SXHzZHAmi8O07obIGk+Za+pXwWKwkK+w5w8gy1DVD+4+ 65oUnxnU7BmY+9E/MwBqcCiUQpswjVYXjKrsfYbXpMMfMaiKZgGL/sQEAJCLWGVwihcG FMu5WO098U/Qp5trMSaQY5CL0birlqeADp1LRqEEA4k9xaxUpKrY01gfMLwfHQPBVU7m Ooy4j3SmBWh5HgN/Bzz3NVlA14wGH5Pw2SQTyBqiQUa5Dj9AP/a4Uu6hAHVtcCbCqOJ8 SM1g== X-Gm-Message-State: AOAM530e4inFtu1keEq0oWyZN1vJhrEe8d7yvPXGfZx0SYY/VZ8TK9ac VwnInHNBBBDspbXvXxQ9lSk= X-Google-Smtp-Source: ABdhPJysbC54HVn2cXqVbW7EoCSUGPzri5soUM98ZiXZrliZVoDcfVEn5+a1rJQnXP14c8VfUy9FWQ== X-Received: by 2002:a05:6402:294e:b0:425:f016:24e7 with SMTP id ed14-20020a056402294e00b00425f01624e7mr39241816edb.111.1652437624212; Fri, 13 May 2022 03:27:04 -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 3-20020a170906100300b006f3ef214e40sm609677ejm.166.2022.05.13.03.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 03:27:03 -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 v3 1/4] ARM: dts: imx6qdl-colibri: Fix capacitive touch reset polarity Date: Fri, 13 May 2022 12:26:12 +0200 Message-Id: <20220513102616.48040-2-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220513102616.48040-1-max.oss.09@gmail.com> References: <20220513102616.48040-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Max Krummenacher The commit feedaacdadfc ("Input: atmel_mxt_ts - fix up inverted RESET handler") requires the reset GPIO to have GPIO_ACTIVE_LOW. Fixes: 1524b27c94a6 ("ARM: dts: imx6dl-colibri: Move common nodes to SoM dtsi") Reviewed-by: Fabio Estevam Signed-off-by: Max Krummenacher --- (no changes since v2) Changes in v2: - Added Fabio's 'Reviewed-by' - Removed blank line in commit text arch/arm/boot/dts/imx6qdl-colibri.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi index c383e0e4110c..7df270cea292 100644 --- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi +++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi @@ -593,7 +593,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_atmel_conn>; reg = <0x4a>; - reset-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; /* SODIMM 106 */ + reset-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; /* SODIMM 106 */ status = "disabled"; }; }; From patchwork Fri May 13 10:26:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 572293 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 245E1C433EF for ; Fri, 13 May 2022 10:27:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379466AbiEMK1O (ORCPT ); Fri, 13 May 2022 06:27:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379209AbiEMK1J (ORCPT ); Fri, 13 May 2022 06:27:09 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10D3C50451; Fri, 13 May 2022 03:27:08 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id g23so9359186edy.13; Fri, 13 May 2022 03:27:07 -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=Wjttoh5pJ3Cm9OJ+7lfSQscXOm+8KL2ATcs8KqsT+HA=; b=msYuy6T0lARvYyJaJSawEOZr3dDydhikevW3BwFGVTX5wJ7cpXtdPNtbiRqTbtsGLu 0c6iVa3rEbA0+7p4SulwQ4w7vdifgtpidzsJKqqpc11+zB6GbDtJoxT/1WmQQM0W7uID g17a7NjqvSqJaMxJqN81YsBoiLAOpPibkWMt8EXsjxy5vEDRtxn39Te5jBONTlfaUor5 F8V8IgwwmbvX7rwkOfeyGr0hYUsriTB/7UhB8XxKxlZYbkgbmDjTwD7fGaEviEimyNSa 6RGreK8pnkvJ/hIBS52EuXPIiJjOlkFXuuQ6Cb+DzRpM5vUghLRUSn62bV/cAHz/SPDn NQhg== 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=Wjttoh5pJ3Cm9OJ+7lfSQscXOm+8KL2ATcs8KqsT+HA=; b=pt/7YjG4HE8Xo2SJHBTfufzlasUEGwpqrnK8B/XDQ+f4J/8ZA+HezYSOxRJj5xyb5M ttc9xygCE41TAc5qo8WD5yTdMUZqqQxt4kCYWgJGpSvRi4Sr/t3KMRNvWs7qNcmoe3ML ZyX0E23y9vs84F7pWKMem8jJySzuatu8ctPnR2MaXD9NWnThV1e52wsBAEM9jeuJddn9 Fn7822SV/bzbb/ypvcHQ8k7flhpMrovgbREUHrmzv5jtAhZKjle5dyh0ZN69W6SLVtXt 6Jy9hIzRky4f4YEtM1pkYZ/ME+aSHYNmJ9Ch255/7lRJ0DNJuwZq6thRRURoM4Z8QyQF AkNA== X-Gm-Message-State: AOAM530WFBzAA+i3mI124YdjXZ2eNxVn6eUe4JWBdIHCIJKlybBj7FPC aSExWOnc/6ZnS+Rsbp1Ysnk= X-Google-Smtp-Source: ABdhPJzfZZQ0iwoUhAxi7llnxPNl7jZQUVkZxsiuUFC6Gmb/knxfHIKdKy0GUvUJ6TNiDR9mDxE3ag== X-Received: by 2002:a05:6402:42c4:b0:426:a7a8:348f with SMTP id i4-20020a05640242c400b00426a7a8348fmr39951718edc.341.1652437626688; Fri, 13 May 2022 03:27:06 -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 3-20020a170906100300b006f3ef214e40sm609677ejm.166.2022.05.13.03.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 03:27:06 -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 v3 3/4] ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight Date: Fri, 13 May 2022 12:26:14 +0200 Message-Id: <20220513102616.48040-4-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220513102616.48040-1-max.oss.09@gmail.com> References: <20220513102616.48040-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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. With the change to use the PWM with inverted polarity the PWM signal is inverted to how it was before this patch. This changes the meaning of the values in the brightness-levels property. I.e. the duty-cycle changes from x/255 to (255-x)/255. Keeping the brightness-levels will then have a big brightness jump from 0 to 127 duty cycle, the other 6 steps will then be barely noticeable. Change the brightness-levels to provide the same brightness-levels as before. Signed-off-by: Max Krummenacher --- Changes in v3: - Add the reason why brightness-levels needs a change to commit comment as proposed by Fabio Estevam Changes in v2: - Split to two patches as proposed by Fabio Estevam 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..d91fae92c90a 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 4 8 16 32 64 128 255>; + default-brightness-level = <6>; 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"; From patchwork Fri May 13 10:26:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 572292 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 895D5C433EF for ; Fri, 13 May 2022 10:27:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379476AbiEMK1R (ORCPT ); Fri, 13 May 2022 06:27:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379399AbiEMK1K (ORCPT ); Fri, 13 May 2022 06:27:10 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8824C5045C; Fri, 13 May 2022 03:27:09 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id a21so9452729edb.1; Fri, 13 May 2022 03:27: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=VsZTr9QjspygKqEP/6Io66r11TQgQqrqyops3JYlbzk=; b=qlA92aLVsqewcDDRuuGo1+NpNYJnqGNxX3oXp4Q2KrkoNsfUgm04VVeXMU8BD3Nznx gn1aIOgb+inPUojjmRwdm7UGbMjCiZEtE9LwlqUy90SWFvnfLhf/KA0VthiJDAnCNMGH oIob9jPv9/Kxzt98OCHPydPsJWxNMBR60eK6kyk3RiIhNW2tEO1OcssDtBLgkOwpV2Lh 5dDiUgBR42Xa9GX5HTJ0QUdIHqoueQjPNjkI9TMFRMfD3MNtcCxubOv/j8xX8od7cBT4 QkPkbyFdcD7xbmBHgSt5P6QerjkWimxTGZ+eG/sv3AOivQ0MdiXVbli2IgCMctWh14x7 B/mw== 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=VsZTr9QjspygKqEP/6Io66r11TQgQqrqyops3JYlbzk=; b=wBRAZICkx5RBtWEEXCFHJ6pyzK6MpcwNZIjSVmuoZst+/j95IYVaaP/yW+GnzBnsjG 2Og98hawNeFefxTxpIQn2+lSjm1u33qRkI3UiUTZurjYez20fUKW2lyYyoas49vTmPeG SvsUohuJniZHk2P4FJOdYeJVHSMHsAVFkS+7t8oypvWxO2YB0sXIYCEfkKw+x/ziytbL 3k9Abi1mqbET61DkK+oJ+MolNnw7KO8TmIzUILvimWb6/otz+BsoEyFYf6n4GOgzeqT9 DyGqC28rYdeqwiddSw6nyXtdjAfhEtHABkAiUafdS1XWD73gzgqhaPetbBMWbMwSphGp EATg== X-Gm-Message-State: AOAM532QzC7QGToGLiHp3a33SdwsMEeb83B8LVe/5KSrk/sRy+xgZp+1 M7ddEwp5t++iittzmQ03/D4= X-Google-Smtp-Source: ABdhPJxvN5lB6DSJD2MYMERwdhdTFcjVUkbw9vp5dslvwhSUVn2GAyGWfh9eNKuuBmE5E7xd/e2GpA== X-Received: by 2002:a05:6402:1399:b0:410:9fa2:60d6 with SMTP id b25-20020a056402139900b004109fa260d6mr39972511edv.35.1652437627797; Fri, 13 May 2022 03:27:07 -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 3-20020a170906100300b006f3ef214e40sm609677ejm.166.2022.05.13.03.27.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 03:27: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 v3 4/4] ARM: dts: imx6qdl-colibri: backlight pwm: Adapt brightness steps Date: Fri, 13 May 2022 12:26:15 +0200 Message-Id: <20220513102616.48040-5-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220513102616.48040-1-max.oss.09@gmail.com> References: <20220513102616.48040-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Max Krummenacher Adapt the brightness steps as the backlight doesn't light up for very low duty cycles. Reviewed-by: Fabio Estevam Signed-off-by: Max Krummenacher --- (no changes since v2) Changes in v2: - add reviewed-by tags - Split the Backlight PWM patch into two patches, a) #pwm-cells 3, b) adapt brightness steps - Split to two patches as proposed by Fabio Estevam arch/arm/boot/dts/imx6qdl-colibri.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi index d91fae92c90a..023e76215064 100644 --- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi +++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi @@ -14,8 +14,8 @@ backlight: backlight { compatible = "pwm-backlight"; - brightness-levels = <0 4 8 16 32 64 128 255>; - default-brightness-level = <6>; + 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>;