From patchwork Mon Oct 23 14:40:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13432933 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 4B429C001E0 for ; Mon, 23 Oct 2023 14:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=595ulVabtRF3llgdI31WX9Gdt75QPCMf8//5psjHRtY=; b=DYPnFpdYF9Yv6F7tzNO3cvsyYy Ub9XMc52jiMaZdbHGvLv3SsKABUZcBChfQ1kqXCAMA/9t7nXiKz2FlAFjmmjCK9kKLdcX9W2bAExa YpCexjWHlfCMmMfWoxhM0SQf2v9wIjY33SaJiNb3rAo6ZyMzazd4qF8SPPoS7YYDjwHbraEGRcPZv Y6BATBcxr3idCsFigPGITKdGrMFfCgYUVTCa0jmK0OfkleM1gLgiiAZRx/7T12cWaSHISHWlF+PDi WdxXHvujpFP7oF36/IgKdJU/4gsRSHei85nMsDo33BQmOBpa1DVfp8i5wfF0VhNi0VIyKoSMhbVj7 pwER7zng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1quw86-007ahk-2w; Mon, 23 Oct 2023 14:42:06 +0000 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1quw7O-007a3Y-1j for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 14:41:26 +0000 Received: by mail-qk1-x729.google.com with SMTP id af79cd13be357-777719639adso208513485a.3 for ; Mon, 23 Oct 2023 07:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1698072082; x=1698676882; 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=595ulVabtRF3llgdI31WX9Gdt75QPCMf8//5psjHRtY=; b=0aYnnmiXZyrtionYzSwqkIh3bARqvxdWMiE7ZHCcxtGYznmd4IfISlNAwekOyqCr3E RewyTAe10L/OKf5DQxplIXcIyZIt+iLA5U0hP0AZFB5cJCoWYEXBQMh6ah2yXMT5az/C k6bH1tEultgItDrbtBQecjsOQfG1RIDVfHF27WNhDugsyGBvCQQzfx5l+auORQNXw4hy ppE7FEMdunPi2LYfMQdKx0L+P193CgM+idZCYur1S59+KVC9yPSwcwINLg/y9tnLyD1O xwK/CKwSl2nRXopOpXzo6Qrtxt3UFBEMcV9L2ZNB9byqEm8ro5wh/MWEiFDe2uvhDgS9 Q04g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698072082; x=1698676882; 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=595ulVabtRF3llgdI31WX9Gdt75QPCMf8//5psjHRtY=; b=rGB4z04b1PTmxxN2HZXr5+pXnes+H6ZCF+8y0NicwN+xwV7OrkvfjLpK7SrU0AUXU+ U2phdEqIrg2HE8hKXPa6RgiwTzmLhdxmB0dPRYU5GzhNsLsJwkqym2ej7Iw/JeerVk95 gZBZnbRKF7StBQ3hrQdY9aUirw2lMK6ahddOTFDPnX12LUt1zimzkuqDYy2qk74TBV65 AOFCnfJs5xcDryoYwRoc6zgcTq7xqAZqvlWD+k+BqGwAY51BptFbJTVnA36dX9XAxZba fMkJ2sjcTl+61vKDL77ig3/rTD+pKygfvYOFq0kFyROqkGt1nU+GaoMlagGbpObmoW1R YJHQ== X-Gm-Message-State: AOJu0YxhMnd/OyKY0jGGQTQA2QOPJxjvTA3zOgOWkhcGBw9fyVOwUqDH cINFlQOUAEPHhFFzaMMounIBDg== X-Google-Smtp-Source: AGHT+IEcl8tn7kc5yak43uDO4NKC4OFhGJ1HhbnGe+skc/PMjn6o3r+j8Un5vwm66cBdZQOBlHJ8Rw== X-Received: by 2002:a05:620a:bc9:b0:76e:f62e:45cc with SMTP id s9-20020a05620a0bc900b0076ef62e45ccmr9656082qki.32.1698072081572; Mon, 23 Oct 2023 07:41:21 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id f1-20020a05620a408100b007789a3499casm2725020qko.115.2023.10.23.07.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 07:41:21 -0700 (PDT) From: Alexandre Mergnat Date: Mon, 23 Oct 2023 16:40:18 +0200 Subject: [PATCH 18/18] arm64: dts: mediatek: add display support for mt8365-evk MIME-Version: 1.0 Message-Id: <20231023-display-support-v1-18-5c860ed5c33b@baylibre.com> References: <20231023-display-support-v1-0-5c860ed5c33b@baylibre.com> In-Reply-To: <20231023-display-support-v1-0-5c860ed5c33b@baylibre.com> To: Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Jitao Shi , Xinlei Lee , CK Hu , Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Catalin Marinas , Will Deacon Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org, Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6023; i=amergnat@baylibre.com; h=from:subject:message-id; bh=pcJBtWjpwilqxNWOakxNZQwRB91WeJf0Sg90BfqV228=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBlNoXPkea0Zqy/PQcdnRsfgCu3AEXfk7wmG8tbv9W6 6/bMYLmJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZTaFzwAKCRArRkmdfjHURSDAEA CQA7Cf4KSXMTBTFLJLDn3nVGt/R5YFfqc4INXDjm6cldZkidaTUTKIifrfDCxHp1r0Ja/JaBxMYzh0 pHhJvAuYtIecogTkNQHbTaEPok1TVVQBfaC39ZpgywxOcQ5R4V5wmk3JZo7ZSibtsAgR+NsmIDQXD1 gMcHUflijw+a1lUpZ3wIGoCtZbrP/M+Gas8r4P6vb7YOIEP4kFZinEF+hPfGadJ7SAzsKKeOS2Am2q tiiB2z92LubE4muqkhtO4YRYBrSLpNkF52xFJfMkp8uweHjtZr8PCrr8AsRMr3ktLamN03DP1LKDDj 2FzODsOY5xZ9SxTdcO5ktlVOW9oyereFUcwssEjDOSm3KneJeNTPngCGOdk+cxVYvKD05XG7WmxJLx Uk6KmO2qNJkS3JSRK6PRltlbvAk3zvHerOVqe1ytnDco6jzVC8hdmhQkOKGLl9l7wUGt93yBAFYYBA 3UUUwXMvgprT3kjgAmhG1P0utomkLEv00dx3r7MhZEFIkKAo++sOZspVHKQNkmAe6HtWJ7Qe24ZjPg lqqmS2yVrDfBExc1i7WvB4nAC0RpGxnkLTV4AjGMsXk0sTh76HJXEAGlACHyNPpd5V+zTZ6z6cXVdq MPQDooC/3O8BIsyi+aQiGQNxmm8cZQnAU/HDVEjWBR0A6OWhBeZxaSBmuYrQ== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_074122_621987_EAE418C6 X-CRM114-Status: GOOD ( 11.76 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org MIPI DSI: - Add "vsys_lcm_reg" regulator support and setup the "mt6357_vsim1_reg", to power the pannel plugged to the DSI connector. - Setup the Display Parallel Interface. - Add the startek kd070fhfid015 pannel support. HDMI: - Add HDMI connector support. - Add the "ite,it66121" HDMI bridge support, driven by I2C1. - Setup the Display Parallel Interface. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 183 ++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index 50cbaefa1a99..823d7623b8b8 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -26,6 +26,18 @@ chosen { stdout-path = "serial0:921600n8"; }; + connector { + compatible = "hdmi-connector"; + label = "hdmi"; + type = "d"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&hdmi_connector_out>; + }; + }; + }; + firmware { optee { compatible = "linaro,optee-tz"; @@ -86,6 +98,57 @@ optee_reserved: optee@43200000 { reg = <0 0x43200000 0 0x00c00000>; }; }; + + vsys_lcm_reg: regulator-vsys-lcm { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&pio 129 GPIO_ACTIVE_HIGH>; + regulator-max-microvolt = <5000000>; + regulator-min-microvolt = <5000000>; + regulator-name = "vsys_lcm"; + }; +}; + +&dpi0 { + pinctrl-0 = <&dpi_default_pins>; + pinctrl-1 = <&dpi_idle_pins>; + pinctrl-names = "default", "sleep"; + status = "okay"; + + port { + dpi_out: endpoint { + remote-endpoint = <&it66121_in>; + }; + }; +}; + + +&dsi0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + panel@0 { + compatible = "startek,kd070fhfid015"; + status = "okay"; + reg = <0>; + enable-gpios = <&pio 67 GPIO_ACTIVE_HIGH>; + reset-gpios = <&pio 20 GPIO_ACTIVE_HIGH>; + iovcc-supply = <&mt6357_vsim1_reg>; + power-supply = <&vsys_lcm_reg>; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; + + port { + dsi_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; }; &cpu0 { @@ -138,6 +201,50 @@ &i2c0 { status = "okay"; }; +&i2c1 { + #address-cells = <1>; + #size-cells = <0>; + clock-div = <2>; + clock-frequency = <100000>; + pinctrl-0 = <&i2c1_pins>; + pinctrl-names = "default"; + status = "okay"; + + it66121hdmitx: it66121hdmitx@4c { + #sound-dai-cells = <0>; + compatible = "ite,it66121"; + interrupt-parent = <&pio>; + interrupts = <68 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&ite_pins>; + pinctrl-names = "default"; + reg = <0x4c>; + reset-gpios = <&pio 69 GPIO_ACTIVE_LOW>; + vcn18-supply = <&mt6357_vsim2_reg>; + vcn33-supply = <&mt6357_vibr_reg>; + vrf12-supply = <&mt6357_vrf12_reg>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + it66121_in: endpoint { + bus-width = <12>; + remote-endpoint = <&dpi_out>; + }; + }; + + port@1 { + reg = <1>; + hdmi_connector_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; + }; +}; + &mmc0 { assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>; assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>; @@ -180,7 +287,55 @@ &mt6357_pmic { #interrupt-cells = <2>; }; +&mt6357_vsim1_reg { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; +}; + &pio { + dpi_default_pins: dpi-default-pins { + pins { + pinmux = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + drive-strength = ; + }; + }; + + dpi_idle_pins: dpi-idle-pins { + pins { + pinmux = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + }; + }; + ethernet_pins: ethernet-pins { phy_reset_pins { pinmux = ; @@ -222,6 +377,34 @@ pins { }; }; + i2c1_pins: i2c1-pins { + pins { + pinmux = , + ; + bias-pull-up; + }; + }; + + ite_pins: ite-pins { + + irq_ite_pins { + pinmux = ; + input-enable; + bias-pull-up; + }; + + pwr_pins { + pinmux = , + ; + output-high; + }; + + rst_ite_pins { + pinmux = ; + output-high; + }; + }; + mmc0_default_pins: mmc0-default-pins { clk-pins { pinmux = ;