From patchwork Wed Apr 13 21:33:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 12812706 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 8B130C433F5 for ; Wed, 13 Apr 2022 21:34:37 +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: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:In-Reply-To:References: List-Owner; bh=aElCzGWOJQXKdflrZp16AcbK3ljOzsEwYTD1SRAzNQ8=; b=BCd6czOLAPw5Xp fjVLoK1dhtridBMJvYTidV6O5337mlHrXCxpEG9BcMY897n53ZdUvbV2ZM4fO+QPRGqLt/3ByAYmc rKY6XmOorDI/c9dICoPz6c30vjeXh9Xc+tAE3DPjgwoD8+QilMYJH/9O4/OtaUwAzB/qPy+hRgGa9 pQ/1bfgb5JgkFGBmpMXgS7S7S0ojGtQoovh1ykm6rd0T22AMQnM3UfjBcm3PIIinPsHSlJ+ZchTPe fN2PnNzaArhlUaumzwjgUYFYXRFQ1BeS49uaibWScJxjieQ/r8ZMgAkI7AJkYdZAZtPwT54Yj5YrT c2rb5dD9CZ+1VjQq66zA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nekc7-002kGm-LD; Wed, 13 Apr 2022 21:33:23 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nekc4-002kFu-EI for linux-arm-kernel@lists.infradead.org; Wed, 13 Apr 2022 21:33:21 +0000 Received: by mail-wm1-x330.google.com with SMTP id ay36-20020a05600c1e2400b0038ebc885115so3339374wmb.1 for ; Wed, 13 Apr 2022 14:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hrRXt3ZjySM6jgUEgS/sVOHo9ohL7qyGaHBQht/wgxc=; b=ofxA5ENYuBeWsh9HN3+JXYWKOQrmwTUWaZGi+J/HtU8IYH6k/AJoFt/uFPtKhXm5CO 9ZLt3RamQNlm7SUz3pjDcLo4YT4xxFrZx0suG2JEjnzpEYvLSDCo4WsCcOM5zsH3F1zk BP3ihT0CfADW0BdxWESdHyOUjm9KAa6G7p3pU= 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:mime-version :content-transfer-encoding; bh=hrRXt3ZjySM6jgUEgS/sVOHo9ohL7qyGaHBQht/wgxc=; b=slPYLU8F9j/TEDNy3Y9470j09d5qSDaCCJEg0TTd2X+SlLAdTXhvTPiBe6fG9QTkKp 53DEKG690ZeNgtsl0A0pvFPWKlV9yUjNoOulHi8nyiPijAFyByEIZ82TvTHdQqjyJLOo 1V3RTrJZKTLmk/B42jZdJHXR7X5S4T2bIFwYCmGGHkCDxYN7ofvOeeS2INBGSZLnYlf9 lugSsldG+9j44dC/5KzDVhCjx+G8AbNyq5zNaBgrJCZcyKyh9LuCJImsIMZfVkONcKGB 7oybVSAjaL/BgRLbzLIIdhDhcM4vb0dTvxv5mxLHLbW0lzTgq0IAoVqhqMzDg5F988dk jIzw== X-Gm-Message-State: AOAM5309bkxWBtJMTOi7cPMEHJgT3rePhSeu1+pkyHDEYoH/W+qu7Y/7 L2kb/cElFXre58Bnurk2++F+BwHirpNCqg== X-Google-Smtp-Source: ABdhPJzsUmO8kaFAE2HlAxutOffK+wUwusjMwPRbY+zWnNYAOUOkfYlX4aOTNTcDbKiR/LT9pqiDrA== X-Received: by 2002:a05:600c:1e1f:b0:38e:c3eb:2d9 with SMTP id ay31-20020a05600c1e1f00b0038ec3eb02d9mr117845wmb.90.1649885598155; Wed, 13 Apr 2022 14:33:18 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-56-163.cust.vodafonedsl.it. [188.217.56.163]) by smtp.gmail.com with ESMTPSA id ay41-20020a05600c1e2900b0038e75fda4edsm3025wmb.47.2022.04.13.14.33.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Apr 2022 14:33:17 -0700 (PDT) From: Tommaso Merciai To: Cc: tommaso.merciai@amarulasolutions.com, linux-amarula@amarulasolutions.com, Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Joakim Zhang , Li Jun , Richard Zhu , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4] arm64: dts: imx8mm-evk: add pwm1/backlight support Date: Wed, 13 Apr 2022 23:33:11 +0200 Message-Id: <20220413213313.11511-1-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220413_143320_543787_0DA999EC X-CRM114-Status: GOOD ( 11.31 ) 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 pwm1/backlight support nodes for imx8mm_evk board. Align with u-boot dts References: - https://patchwork.ozlabs.org/project/uboot/patch/20220326111911.13720-9-tommaso.merciai@amarulasolutions.com/ Signed-off-by: Tommaso Merciai --- Changes since v1: - Fix commit body - Enable pwm, backlight Changes since v2: - Remove status okay from pwm1,backlight (enable as default) Changes since v3: - Remove status okay only from backlight (enable as default), pwm1 is disabled on imx8mm.dtsi, we need to enable it arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi index 6d67df7692f1..6a209395452a 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi @@ -59,6 +59,14 @@ reg_usdhc2_vmmc: regulator-usdhc2 { enable-active-high; }; + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm1 0 5000000>; + brightness-levels = <0 255>; + num-interpolated-steps = <255>; + default-brightness-level = <250>; + }; + ir-receiver { compatible = "gpio-ir-receiver"; gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; @@ -395,6 +403,12 @@ &wdog1 { status = "okay"; }; +&pwm1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_backlight>; + status = "okay"; +}; + &iomuxc { pinctrl_fec1: fec1grp { fsl,pins = < @@ -549,4 +563,10 @@ pinctrl_wdog: wdoggrp { MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x166 >; }; + + pinctrl_backlight: backlightgrp { + fsl,pins = < + MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT 0x06 + >; + }; };