From patchwork Mon Feb 5 17:55:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13545968 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 29EC9C48297 for ; Mon, 5 Feb 2024 17:56:20 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3wJHyrG3izgqKw7cXlfVzQmXHxr4jyXwb+No4Y1ENuQ=; b=MnfuF+1Pd8LejR gZwNAB8oGKNWjkJ1DoKdeGAut6q+lM8Ju/uBQ8hEPT7JPvb8N71r8uSta6EFIhNgiHd8MR3yZJ/IK fH0zHa83RkOTX9eSoCuTR85Mf2wVJDCTgwYbIIbxIPRGrCjPes6kqGcUnmLuLfAfke6RWSCJtywsb f/pPNtOchfUloL92rjsTE8SErPRd23CGrIDrx03CL/YsJsh/wgoYgW3HllArmSZ/8Y4l2dUkJ/noH bn1R6CybLY1vvfQC+omUBKGJRVzU/uniZzdfUySFmTVP234GfyPDUpd1LXRkyJPsHeWZQesImFBQ5 P3YVgHdQwK1EO1maSINA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rX3CY-00000004Gha-3Okr; Mon, 05 Feb 2024 17:56:14 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rX3C5-00000004GEf-1OXy for linux-amlogic@lists.infradead.org; Mon, 05 Feb 2024 17:55:47 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40fddfa471eso6276015e9.2 for ; Mon, 05 Feb 2024 09:55:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707155744; x=1707760544; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=fpZ1u2+bVNzAT3eWYSmp4vx9viRRZYpXPKY6TeLyQEI=; b=wKdMlEJsVhyLEEhAQ0OlLQSRyfOONjZ2q6JQ9JF/dpkEwPEkrD2Dodj6vWOIEqiBb1 b4akqsWKDIorTRnbqU5cyuvCnuE31msKm9bx6i7FMSnLcDeA5EJcI3d7Dx/CiDtC5PDO lxTB6xAlG1d5zFGyWKrbBhRqlWccsAmxFR0Xr7ni9HnEeMPOfuQFFkKYR+zhNDMOuIQ9 SowetR9VddQOaeAXgmqQEA2+cEdSi0FOGWrZji+nwza00uxuWQYzCKXBtYUZxKsXwtJz nYJdCqTrUpMgKQYVoBu7NWKHQX3Q509dT05SJbrIrwS9gI4gUjNGvQRAPJH63NvAKCLJ 8q9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707155744; x=1707760544; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fpZ1u2+bVNzAT3eWYSmp4vx9viRRZYpXPKY6TeLyQEI=; b=bBz4EinyPfDkhp2vbComgz5821q2BjyMvBmv3jYxlm/LaSzgVOnpzpQOwIlwJ4kO8o 75O9Xy+REzPVjwOqVphPSsXQu1ubu23Ms9rhVBEHyy11UyNzWIi+WHjk/upKPQUEkUSG bMlBhAe/F2kYgSF5evN00lYfwJqQKilRlW9AXdpegPQ5CQW3RNUto8w1dKGpWvfUR58a X0/3bAs3GkG25RqJDR77EL2URJcMsA5W2kEAz3f7ll6XVnAhJIG/vXLYasetuM/jjw4Y AxdW7vmsdl3IIMWcRvp78paJMARZHn9JBxpRh1NmLyMZcOqHz18G3wactqDlwrGDSnc2 /RGQ== X-Gm-Message-State: AOJu0Yw7zI5oqRfgYXn21ORxnaDR1HzQRhPN3XH/MfgGixoheBrR/DGZ p6bLxQ8UO51Zq/BFqFiJ1MMzQrkrXlytFwGvvuVhWUNdc6TQFbRKo61Sx39MsOA= X-Google-Smtp-Source: AGHT+IGMawpNhtBNlj/DIThK1IdOGLKErx9wrqn011RATd8Gcn5Mb2osk8v0MvYCtAnpElqyEzv96g== X-Received: by 2002:a05:600c:1e1f:b0:40e:f736:8152 with SMTP id ay31-20020a05600c1e1f00b0040ef7368152mr391015wmb.14.1707155743988; Mon, 05 Feb 2024 09:55:43 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUvlgUiiRbjZJ9ZcR725O++iGzXJoEOLZeeIR+LvnKxgwv6M+D0/hzsZmEq/xuRx+59px9XI/fCDICC3BUpD2PZ4/LecLa/3N6bxpyNKjGrvBuyTx/2l9UyYG7HNR3SzCV2GYEWlxTUGXzxpcrnGJEs0P2j0ZRgOISCfWwaJofK88vfoYVgobmurL6zm6SS4zk+GRN75/F8WvD5JGGlpsUWmxQWnYIczm4tYlkcKFZSl8Fn5Xd+EBqurx9S4/803rg8/gsJX/f9CU2dDm96J72jLpiLcDJA82/eZ1b6S3BfpDZ3DVDB3BQ1bkhDka+UdEkrZGybNa211lctY4IkbRh2D2jDYq/x1pceLihA2UmLKfFRa8Uh+YV9FN4JDtJMa8unwmAbPFVzAKNr/IOMZMm3o9Nx2V92sbt0R3Wp4SnVurff4NXHcBoyWyxbPNXgvvVv5p2Rcq64GL1OhLBnlCphub895w0mwktm4srRcbWYyHSMtr/FCKKA9m937ZkO9BgAe9QMqYzgZcYFfPgyeML7XCTNJMeyZnBk9YSHFW6zW4awi+5we8fcpYlOQhO5RyQUORy1Otn6gjpuYqF8wDE7CRI/erhbuFmcNelTSxin41hHORyoYzqbV0z7BSiMMv56XveFDnHY4OODj71L4WBm/rfHO4vCgjMWHVugY/58zAJcDBRuCe/3G6pshyWFNc66aB1Lf1F7JpsqxwqmZ82iCS2oRJWmnCThrhmOlU0/4Rf/Clkya4WA4N5rUR5uGsQ= Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id je16-20020a05600c1f9000b0040ee8765901sm517556wmb.43.2024.02.05.09.55.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 09:55:43 -0800 (PST) From: Neil Armstrong Date: Mon, 05 Feb 2024 18:55:33 +0100 Subject: [PATCH v10 6/7] arm64: meson: khadas-vim3l: add TS050 DSI panel overlay MIME-Version: 1.0 Message-Id: <20240205-amlogic-v6-4-upstream-dsi-ccf-vim3-v10-6-dc06073d5330@linaro.org> References: <20240205-amlogic-v6-4-upstream-dsi-ccf-vim3-v10-0-dc06073d5330@linaro.org> In-Reply-To: <20240205-amlogic-v6-4-upstream-dsi-ccf-vim3-v10-0-dc06073d5330@linaro.org> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Jerome Brunet , Michael Turquette , Stephen Boyd , Martin Blumenstingl , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Nicolas Belin , Jagan Teki Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Neil Armstrong X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3677; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=DPGGuaJdRW3xL473nMSjoqE2TG+EWGQ6YkhOzqtm1Do=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlwSEWDKhUeQ70VFCVlU06YKjKhY3IDBxtFeyvbTgh uLcwGWmJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZcEhFgAKCRB33NvayMhJ0dgoD/ 9ygCnRpWwsl+EqlWTo6p9gyHPg4glwK5RKRWhekTcgM8QejnAqphIh0gKKbZa7zj3aUEjtniNSLIZN ajOyAxeoSb+tmVIn1Av81VY2tvI7Vip2piimUtgXvRbgEA2rtEXyJpZNjznlP9KdUoLMPnXw8j8BLw UQx3ofKhBONPDcFp3sajaexIbvBUJ3lETFxYSPGnoDCR7OlCjL7D9NA20lzz+FUggespijK8tr86ar Ytvd6Nlr/kgzjhtNUeg3/yXsZqGf1RCWtkCCaF2s1974VbqVxZH6AXsI3uPV6raNIi0/ICf1vUKBuL rS/Bh2dsF84IborkjYFcsRoy7bvg6b+whQ7zRplT117Mdetw1MHaHLAa1vb0sKvOaZx1zLfb8S6wox E/wrhKw9HsLu8X+rhfmAcidrTr1gypATJix6J+Y6cR8rTpM2/+dVfGfblm3cNxNzdYP3RHo2EDsudS qAZr4nfhPHcaisSt51i0SlCkc0yWusS2OEvn3eY19f6ry4TI2Sv1joeyiz0nBP5qExCe1/yxu/oYUB 8zF3DVLjbSm67nKvpTlIUWr684dMAM0EhN642RqItpGIbPdaIf56fDQdJqrUUdik6QEy5ABZNUV1nn 5rDtK6pMiWaTT4hZwr9dkDWHhlbhaK5u83gY4xyUWZM4hcsL0KPlkZKR1Ecw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240205_095545_433587_ABD1BA65 X-CRM114-Status: GOOD ( 11.57 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org This add dtbo overlay to support the Khadas TS050 panel on the Khadas VIM3 & VIM3L boards. Signed-off-by: Neil Armstrong --- arch/arm64/boot/dts/amlogic/Makefile | 3 + .../boot/dts/amlogic/meson-khadas-vim3-ts050.dtso | 108 +++++++++++++++++++++ 2 files changed, 111 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index cc8b34bd583d..5e5ea0f14fe2 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -80,3 +80,6 @@ dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air-gbit.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air.dtb + +# Overlays +dtb-$(CONFIG_ARCH_MESON) += meson-khadas-vim3-ts050.dtbo diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3-ts050.dtso b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3-ts050.dtso new file mode 100644 index 000000000000..a41b4e619580 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3-ts050.dtso @@ -0,0 +1,108 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre, SAS + * Author: Neil Armstrong + */ + +#include +#include +#include +#include +#include + +/dts-v1/; +/plugin/; + +/* + * Enable Khadas TS050 DSI Panel + Touch Controller + * on Khadas VIM3 (A311D) and VIM3L (S905D3) + */ + +&{/} { + panel_backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm_AO_cd 0 25000 0>; + brightness-levels = <0 255>; + num-interpolated-steps = <255>; + default-brightness-level = <200>; + }; +}; + +&i2c3 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; + pinctrl-names = "default"; + status = "okay"; + + touch-controller@38 { + compatible = "edt,edt-ft5206"; + reg = <0x38>; + interrupt-parent = <&gpio_intc>; + interrupts = ; + reset-gpios = <&gpio_expander 6 GPIO_ACTIVE_LOW>; + touchscreen-size-x = <1080>; + touchscreen-size-y = <1920>; + status = "okay"; + }; +}; + +&mipi_dsi { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + assigned-clocks = <&clkc CLKID_GP0_PLL>, + <&clkc CLKID_MIPI_DSI_PXCLK_SEL>, + <&clkc CLKID_MIPI_DSI_PXCLK>, + <&clkc CLKID_CTS_ENCL_SEL>, + <&clkc CLKID_VCLK2_SEL>; + assigned-clock-parents = <0>, + <&clkc CLKID_GP0_PLL>, + <0>, + <&clkc CLKID_VCLK2_DIV1>, + <&clkc CLKID_GP0_PLL>; + assigned-clock-rates = <960000000>, + <0>, + <960000000>, + <0>, + <0>; + + panel@0 { + compatible = "khadas,ts050"; + reset-gpios = <&gpio_expander 0 GPIO_ACTIVE_LOW>; + enable-gpios = <&gpio_expander 1 GPIO_ACTIVE_HIGH>; + power-supply = <&vcc_3v3>; + backlight = <&panel_backlight>; + reg = <0>; + + port { + mipi_in_panel: endpoint { + remote-endpoint = <&mipi_out_panel>; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + mipi_out_panel: endpoint { + remote-endpoint = <&mipi_in_panel>; + }; + }; + }; +}; + +&mipi_analog_dphy { + status = "okay"; +}; + +&mipi_dphy { + status = "okay"; +}; + +&pwm_AO_cd { + pinctrl-0 = <&pwm_ao_c_6_pins>, <&pwm_ao_d_e_pins>; +};