From patchwork Mon May 2 09:48:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12834078 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 D504DC433EF for ; Mon, 2 May 2022 09:50:46 +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=STZVudJP5ZjS5ctlsZLnxII3borvNjzQXcX0bx8cUYE=; b=06WnQ005vJlRJH lgZvQ2JJ1ByaRJ19ar2awy0dbkDxVR5bcCRaDQdRjrlTlhwhHorU9hH8eud9v88tPpopajYel4EnJ 1JGETnONe+eJyJQPvPV8S+Ox2H0GSIcT7gy1hvGyb8uO84iwpDzI0VeZzGTy1RdFdv0ndx44pUWtK 3k+q5KucqFPkxrQ2Ajh+vP556lbPPi9F16Oe3N1s5eHu/4VSG9NCByrGr8F72BjTRWJ2RH8z9Xzk+ YtjpMbuqC7zhIyppbnuEEy0WhRyaLbJgqV9LRk2D76QXEvWrAPVi/z3Rxy/wH4QcE2zql6q6sKJsE ElgZfD96RjiyzZ7N26RQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlSgI-000gBQ-SU; Mon, 02 May 2022 09:49:27 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlSg7-000g3x-7D for linux-arm-kernel@lists.infradead.org; Mon, 02 May 2022 09:49:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1651484955; x=1683020955; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7NOVRH5gYXnHf6z2bzLqGROkXli3gZcZvcXNGi/7KrM=; b=WbFc9AfzaoS0x9JjPC3iA4iGe7i8QvTKoZetV02tszFmetjKUz0kC/Do ZZJBanPkwNgArPZrPbsAe2GQVAu+MA5OtkczPUzA9JfPwyMqsiHNUU8s2 Dehnd65eyuqbYBGZL+6AgkVQ4rhx2fYYqSq/t8ZFPdTJtSBujWSLpCqWR LM46sol6pCsJf0VTVQLuN1ltb50BbD2ZBP0EP6FQHcC0rZ9/KeNTKPwCd XfH0rx9FazK2QPnSrKxFJrngqeMk73lOcGNZgGbm117qGElcR6x6OHfc3 DYJRwpolvqxbvkBK1ehmJgQiviRO/p7zgIjb5c5uVW1gAYYRjZd9AA3Ap g==; X-IronPort-AV: E=Sophos;i="5.91,190,1647298800"; d="scan'208";a="23608911" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 02 May 2022 11:49:07 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 02 May 2022 11:49:07 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 02 May 2022 11:49:07 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1651484947; x=1683020947; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7NOVRH5gYXnHf6z2bzLqGROkXli3gZcZvcXNGi/7KrM=; b=pm7SJXbP13YfWVUmaFS376Bu24X+XL753slUNXFtd/afgDzCYuQC3tgr HNAjuquZQlLJ8eduliJDJKwUBnRF3yiHV06wII8xfU+OoSsAS6JsOw1rf 1K5TCm2FltrBlcVHZGeYdMUx/tyXUUcqlzWlYa1uwAiQapDVA+0WJpBBa zTFiT4vNAuE6YwwJemVdPbo2qWKyqP6FuaoHy4dAlNboqpkGSPyR/eS6+ O/irDAlqcT0q728nukEQFHYtmeY7BIlODBsPLBr9gKf64Ocr5/komIvd2 A2gZ4bX6AXovMhLej7l8iKre82SeYmpCxwqT5YzVhW2q+NrizrPmqSEzq A==; X-IronPort-AV: E=Sophos;i="5.91,190,1647298800"; d="scan'208";a="23608910" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 02 May 2022 11:49:06 +0200 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 9421F280075; Mon, 2 May 2022 11:49:06 +0200 (CEST) From: Alexander Stein To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Markus Niebel , Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Alexander Stein Subject: [PATCH 1/4] arm64: dt: imx8mq: support pwm polarity inversion Date: Mon, 2 May 2022 11:48:58 +0200 Message-Id: <20220502094901.251310-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220502094901.251310-1-alexander.stein@ew.tq-group.com> References: <20220502094901.251310-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220502_024915_618911_CF2A1A41 X-CRM114-Status: GOOD ( 15.26 ) 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: Markus Niebel The i.MX8MQ has the same PWM IP as i.MX6 / i.MX7. This IP and the driver supporting pwm polarity inversion. Switch CPU device tree fragment to use 3 pwm-cells and correct board device trees. Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein --- arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 2 +- arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts | 2 +- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts index 622f3787a186..b86f188a440d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts @@ -18,7 +18,7 @@ / { backlight_dsi: backlight-dsi { compatible = "pwm-backlight"; /* 200 Hz for the PAM2841 */ - pwms = <&pwm1 0 5000000>; + pwms = <&pwm1 0 5000000 0>; brightness-levels = <0 100>; num-interpolated-steps = <100>; /* Default brightness level (index into the array defined by */ diff --git a/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts b/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts index 94a13cb500e6..8956a46788fa 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dts @@ -18,7 +18,7 @@ backlight: backlight { compatible = "pwm-backlight"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_backlight>; - pwms = <&pwm2 0 10000>; + pwms = <&pwm2 0 10000 0>; power-supply = <®_main_usb>; enable-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; brightness-levels = <0 32 64 128 160 200 255>; diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi index 1eca2b431467..49eadb081b19 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi @@ -798,7 +798,7 @@ pwm1: pwm@30660000 { clocks = <&clk IMX8MQ_CLK_PWM1_ROOT>, <&clk IMX8MQ_CLK_PWM1_ROOT>; clock-names = "ipg", "per"; - #pwm-cells = <2>; + #pwm-cells = <3>; status = "disabled"; }; @@ -809,7 +809,7 @@ pwm2: pwm@30670000 { clocks = <&clk IMX8MQ_CLK_PWM2_ROOT>, <&clk IMX8MQ_CLK_PWM2_ROOT>; clock-names = "ipg", "per"; - #pwm-cells = <2>; + #pwm-cells = <3>; status = "disabled"; }; @@ -820,7 +820,7 @@ pwm3: pwm@30680000 { clocks = <&clk IMX8MQ_CLK_PWM3_ROOT>, <&clk IMX8MQ_CLK_PWM3_ROOT>; clock-names = "ipg", "per"; - #pwm-cells = <2>; + #pwm-cells = <3>; status = "disabled"; }; @@ -831,7 +831,7 @@ pwm4: pwm@30690000 { clocks = <&clk IMX8MQ_CLK_PWM4_ROOT>, <&clk IMX8MQ_CLK_PWM4_ROOT>; clock-names = "ipg", "per"; - #pwm-cells = <2>; + #pwm-cells = <3>; status = "disabled"; };