From patchwork Mon May 2 09:48:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12834079 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 DCDA5C433F5 for ; Mon, 2 May 2022 09:50:48 +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=uti5kZbIEoqGY8jLn+NmdfczXm0bdtyg4GYg3ZeYbRo=; b=JSzuEmySoF5afd EmVYMsyNjyHEW/zTPR9wysdBA7vYGafIMGNMMdwZgkdgjOUzOX9bRHJ9pa99wQFBRjk8QDa/9+kSP cBPgYOaAgSk3pZNyw1LUeXC7fYTUBagwyXfWGPHcjTVK7J9Lsda8dzH5axB9tEnD7InUkdGDP2Z2y uQ494GGKTfMxmhjxWIqHY9m7uQ8/n/fc0ccbGPfTDLMcZ6FM743XL1gYbC80TctKnPDVYWLgCrCeo qfAC0THRzCMB5SQYK/aOsmLMTHKaVCOTU1RwQvY0lQgjtLjoWZgxU5PEYn/rWk5avDOhgGdhE+eYt XSD6G+6LHshvbgH0aGvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlSgR-000gDv-M3; Mon, 02 May 2022 09:49:35 +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 1nlSg8-000g6v-C9 for linux-arm-kernel@lists.infradead.org; Mon, 02 May 2022 09:49:18 +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=1651484956; x=1683020956; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kNdxQM4Z358rG+nMcsZbxOxW/RpxRdESr63QyCt4bkA=; b=Iwe2DX11LfqALsNKet6ZTIhTDTzdUqDBt+qoP/kUkSOeLqJH3VD8vcQf Ntr0q/+n/ZbW5h97FvnpjVWXaIXNWIIiyU4NYpsbAExRUmjlfFGta8MXP srb/799h8YKhL/KmyPmC7wzIhi/rrjhm3rXeydVAI6DA8MZla92oOXM/T FGYH4b/QewSThGh1N5IVPf5BOKWYogGiSrvYmLZ2ujtBSDjNDE0qQMszu KvefOY8vB1nLtF9cRczBJ0Mu1Ebh29d1i9zlcaWtWifzp8poHuLqcO0hM 91atMkeMnsFAfLTKB6FK5GVw0U5QQojgc7hwi4YZXCZ62znrM5R1dTQBY g==; X-IronPort-AV: E=Sophos;i="5.91,190,1647298800"; d="scan'208";a="23608913" 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=kNdxQM4Z358rG+nMcsZbxOxW/RpxRdESr63QyCt4bkA=; b=nLhuRlOUrZ8833DCPm/AElqwpYdyUpORJgUrS6vPHlVdDLmxkAfmTml5 3gTFqNpWPJDYWu+UO7VfX20n730gxawETu9/p4b5UPRjzTTdhoeCpiTDl +gzyCBYqpm9/dOG6lNhbyoVZVQ1HisCPKO6Cyu/w4PIhpiODcy5zpVJeO WP1Ox3uKiAQqSTQO0CjPFHVChjpR44BvRBHpCAc5hZ5ZpOi+0dw1ocTNx MzoDUywPJju/LZreo5hHw4YNXKIYSO2yxErDGtI3bhtZ/oHcyKwe9N9OR j0yYwRgJJYbvpT7WOPUG9D+YDW/a3xLAo/FvNHx+IknI/pDrgYoK3tUl1 w==; X-IronPort-AV: E=Sophos;i="5.91,190,1647298800"; d="scan'208";a="23608912" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 02 May 2022 11:49:07 +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 C8C26280078; 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 2/4] arm64: dt: imx8mm: support pwm polarity inversion Date: Mon, 2 May 2022 11:48:59 +0200 Message-Id: <20220502094901.251310-3-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_024916_803113_05A2BCA7 X-CRM114-Status: GOOD ( 14.41 ) 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.MX8M Mini 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 --- .../boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts | 2 +- arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts b/arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts index 154116d01c94..fbc9cc23700a 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts +++ b/arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dts @@ -35,7 +35,7 @@ backlight: backlight { brightness-levels = <0 1 10 20 30 40 50 60 70 75 80 90 100>; default-brightness-level = <7>; enable-gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>; - pwms = <&pwm1 0 5000000>; + pwms = <&pwm1 0 5000000 0>; /* Disabled by default, unless display board plugged in. */ status = "disabled"; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi index 6a209395452a..c42b966f7a64 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi @@ -61,7 +61,7 @@ reg_usdhc2_vmmc: regulator-usdhc2 { backlight: backlight { compatible = "pwm-backlight"; - pwms = <&pwm1 0 5000000>; + pwms = <&pwm1 0 5000000 0>; brightness-levels = <0 255>; num-interpolated-steps = <255>; default-brightness-level = <250>; diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index 1ee05677c2dd..1bf070473829 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -758,7 +758,7 @@ pwm1: pwm@30660000 { clocks = <&clk IMX8MM_CLK_PWM1_ROOT>, <&clk IMX8MM_CLK_PWM1_ROOT>; clock-names = "ipg", "per"; - #pwm-cells = <2>; + #pwm-cells = <3>; status = "disabled"; }; @@ -769,7 +769,7 @@ pwm2: pwm@30670000 { clocks = <&clk IMX8MM_CLK_PWM2_ROOT>, <&clk IMX8MM_CLK_PWM2_ROOT>; clock-names = "ipg", "per"; - #pwm-cells = <2>; + #pwm-cells = <3>; status = "disabled"; }; @@ -780,7 +780,7 @@ pwm3: pwm@30680000 { clocks = <&clk IMX8MM_CLK_PWM3_ROOT>, <&clk IMX8MM_CLK_PWM3_ROOT>; clock-names = "ipg", "per"; - #pwm-cells = <2>; + #pwm-cells = <3>; status = "disabled"; }; @@ -791,7 +791,7 @@ pwm4: pwm@30690000 { clocks = <&clk IMX8MM_CLK_PWM4_ROOT>, <&clk IMX8MM_CLK_PWM4_ROOT>; clock-names = "ipg", "per"; - #pwm-cells = <2>; + #pwm-cells = <3>; status = "disabled"; };