From patchwork Fri Apr 21 15:43:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13220263 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 DCC86C77B71 for ; Fri, 21 Apr 2023 15:44:30 +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=nfZVHFQI6ycWQSFNl04F5ju3EXPnJkbSHMM89c3ZiqY=; b=N7hLYf/N5Gshep qeUzKMCL87OBvxCzv0eP0n/E4FPmNpwF2flHJPO5+xUssJr91HPiXEEbapktQG71NWskDga3ueCvx hR+GcewIiwa6rhs5ai1LULS5OCBRkhZHxVlkt4Ta0IGrrah89y5jwfoBKfdC+T9GWI+5kKuLB2170 ilwQEQOk0EcS5T0tj9R/GyczRsGVXNkzHoKeNQFt3heIThHekTdueM1WgFBryojIy5gTnODdFaeK9 tFASY5E8dh93GOw06lIscmxl51O3CTMWQ+9F4s0nP88DDclikMlmxO7ZwOkVYyprOCoCbzRtzKDhB arhPV/yNzDhrvfyfxbbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ppsvE-00BJ3y-2y; Fri, 21 Apr 2023 15:43:40 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ppsvC-00BJ2C-1E for linux-arm-kernel@lists.infradead.org; Fri, 21 Apr 2023 15:43:39 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-2fbb99cb297so1735789f8f.1 for ; Fri, 21 Apr 2023 08:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1682091813; x=1684683813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3EQLBHp8LKtmE2FtHSzAOWDxYQlcAD1HNJT4CQStpTw=; b=QyS8B1MQx3WHIiGc51EdtnvmOAJSgkuEoS0xI/q/o/U5BsNuiaqIirBP94D/fjtDW8 xZKJHoSR9cv5sDB/2IFPRHLG09GhqCZuXxUpDUnC+N+8ud2p/WZxU941vnXbPuwpCFGW 1Mgz1plJS834q+5y+z7G9TNzqprdzulOTIhN0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682091813; x=1684683813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3EQLBHp8LKtmE2FtHSzAOWDxYQlcAD1HNJT4CQStpTw=; b=R8aLIXgDGEirKF0N7UWkO4+0LqKZfBTauQa4RYMMng0iX4MxG3yJp9ceEHDto7PQRQ J3qw/s3Niq68ds3mipAFyKjf1L1mIJxkHmw9PNU1h4PbwG0E8K4zFG2hh5ChfXO/PULW s5TmFZutINHcmeAwYROxAT4aUiK43s3vpWNMJOHKOpLcPAwP20B5twq+qcN0PMaJ1Ma4 oIezT38FBLP+7hxsmSYy14qWddKdUZMSDpIayyl78wjWuv/7kE0ijwZLPDBqoQjBBm/t zHHTDdAS9V1I2GRxfrfsEm/9dSBRlfyCSXxNtYVVi5WOm29x91mLeGrnbQW4XG+pXtH9 70cg== X-Gm-Message-State: AAQBX9eluMb2NsNRx7URq79OI227leDaTmJXYA9ndiJSd0WY0QyvU2Bm H7SPSNXbTW0RHzV9+78xF2tadw== X-Google-Smtp-Source: AKy350bg/RElVqSuIFOseVBmnJUL2mcF1i0dWRrsVh0lzCYUF4TRlXcR/glRrOLnSU0syZXYt/bK7w== X-Received: by 2002:a5d:4e04:0:b0:2f4:30ee:310b with SMTP id p4-20020a5d4e04000000b002f430ee310bmr4090705wrt.26.1682091813106; Fri, 21 Apr 2023 08:43:33 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([37.159.127.129]) by smtp.gmail.com with ESMTPSA id g18-20020a5d5552000000b002e51195a3e2sm4651609wrw.79.2023.04.21.08.43.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 08:43:32 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Dario Binacchi , 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 Subject: [PATCH 3/7] arm64: dts: imx8mn-bsh-smm-s2/pro: add display setup Date: Fri, 21 Apr 2023 17:43:04 +0200 Message-Id: <20230421154308.527128-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230421154308.527128-1-dario.binacchi@amarulasolutions.com> References: <20230421154308.527128-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230421_084338_417362_91D96639 X-CRM114-Status: GOOD ( 15.83 ) 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: Michael Trimarchi Add the display and nodes required for its operation. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- .../freescale/imx8mn-bsh-smm-s2-common.dtsi | 1 + .../freescale/imx8mn-bsh-smm-s2-display.dtsi | 111 ++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-display.dtsi diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi index c11895d9d582..5f9c0df0ec7d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi @@ -7,6 +7,7 @@ /dts-v1/; #include "imx8mn.dtsi" +#include "imx8mn-bsh-smm-s2-display.dtsi" / { chosen { diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-display.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-display.dtsi new file mode 100644 index 000000000000..bac987d76f1e --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-display.dtsi @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2021 BSH + */ + +/ { + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm1 0 700000 0>; /* 700000 ns = 1337Hz */ + brightness-levels = <0 100>; + num-interpolated-steps = <100>; + default-brightness-level = <50>; + status = "okay"; + }; + + reg_3v3_dvdd: regulator-3v3-O3 { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_dvdd>; + regulator-name = "3v3-dvdd-supply"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio1 7 GPIO_ACTIVE_LOW>; + }; + + reg_v3v3_avdd: regulator-3v3-O2 { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_avdd>; + regulator-name = "3v3-avdd-supply"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio1 5 GPIO_ACTIVE_LOW>; + }; +}; + +&pwm1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_bl>; +}; + +&lcdif { + status = "okay"; +}; + +&dsi { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + panel@0 { + compatible = "sharp,ls068b3sx02", "synaptics,r63353"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_panel>; + reg = <0>; + + backlight = <&backlight>; + dvdd-supply = <®_3v3_dvdd>; + avdd-supply = <®_v3v3_avdd>; + reset-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; + + port { + panel_in: endpoint { + remote-endpoint = <&mipi_dsi_out>; + }; + }; + + }; + + ports { + port@1 { + reg = <1>; + mipi_dsi_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; +}; + +&gpu { + status = "okay"; +}; + +&iomuxc { + + /* This is for both PWM and voltage regulators for display */ + pinctrl_bl: pwm1grp { + fsl,pins = < + MX8MN_IOMUXC_GPIO1_IO01_PWM1_OUT 0x16 + >; + }; + + pinctrl_panel: panelgrp { + fsl,pins = < + MX8MN_IOMUXC_SAI3_RXC_GPIO4_IO29 0x16 /* panel reset */ + >; + }; + + pinctrl_dvdd: dvddgrp { + fsl,pins = < + MX8MN_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x16 /* VDD 3V3_VO3 */ + >; + }; + + pinctrl_avdd: avddgrp { + fsl,pins = < + MX8MN_IOMUXC_GPIO1_IO05_GPIO1_IO5 0x16 /* VDD 3V3_VO2 */ + >; + }; +};