Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7105261rwl; Fri, 30 Dec 2022 03:46:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXu1QKSPE0C+NzttX5CVYRRTPVpIJcAuCAcvhn0Q3isVektRFufkSgbqOM0ANwCz7ZAodF1z X-Received: by 2002:a05:6a20:bb12:b0:9d:efbe:206d with SMTP id fc18-20020a056a20bb1200b0009defbe206dmr36562900pzb.35.1672400787318; Fri, 30 Dec 2022 03:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672400787; cv=none; d=google.com; s=arc-20160816; b=iBeySUCBcFO2HQVdQA6jG5GmfO/A7sBwwHKLz+Iow5N5fVNcWtcc7fOHNQTRLaaqEX nHcvvgx8i6U6dV3QMjMlMxzBnChmf0zXcWxRdn5f7pmbPuACsL3TT/2+qjWFImKxjLlz J4mKWuDXn2OMK9GXMcbUm3X3LgszCsrM2kwp63Dt1z9MhjVzifvZ0PI+hjCEQDuHR5ZV /7cMFTO2r34OXkoZ2+mAgsaBtTvH9IsIMzImFt6kzyYM0KRkku6pzp8XsFNNlf8adSuE BQppuioT10t1uT3tritPRt+qzSR/C5xx2dei5iFj/VQ3267WkKRj08hMZ+zrjOZ/AhjM hHTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=w4EOTaScDiWLOjXXokoUDPMj1ubuks55AAvOUz+Vx7M=; b=Y2AhOPk71hwIz69nbSng9qWML78g3ysLninBv7aJGUQToqFhMniGi9k6JMc/YP4/pN bVQiIqqP3mNQoDbHn5Y35OWP6zPgW3VnQaER6Um4anjc23N0NqxPeBUWs9x0OkiWUyan l7b6HpZy0Cdcohwb7JdME8FfiUBbn+ykq8tEp8ZLD9u5tHtlpIfN+oQS/vzFbbkfwuwg Tip6x3MGGlxArukxna7l6jgJAeiNJtPaOTVF0E/dwSJLXMHTmSM2jOOvEhfmvkckAOhO 7EuWNZJHw1Hk6SSZCWMbwLGGqX88vYYYru9h/4hCsgiGJe2rRMM1pAQHPuTHjzFWyS2c yscQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="MQ/AWFJu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r29-20020a635d1d000000b004610dceef13si21032529pgb.336.2022.12.30.03.46.18; Fri, 30 Dec 2022 03:46:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="MQ/AWFJu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234933AbiL3LeL (ORCPT + 64 others); Fri, 30 Dec 2022 06:34:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235042AbiL3Ldu (ORCPT ); Fri, 30 Dec 2022 06:33:50 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08AD41ADA1 for ; Fri, 30 Dec 2022 03:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672399946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w4EOTaScDiWLOjXXokoUDPMj1ubuks55AAvOUz+Vx7M=; b=MQ/AWFJulqeiMCXqt8Rntl9/bVSZ/uDuWmjE7SDIghg25FfkEeAk411OINlHnXtaXL1npv 24sX+xJJD/PZjz0Ymadzf4UjO9JNpz8k0u6f6hAa//Q4kvBChCP0aUaonZvMQg/oFsz/AT yAzpnNNyI430CoGfUMB/CqE+fyzu+pk= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-218-iTzVXCrLPiSUpF9TIpJR6g-1; Fri, 30 Dec 2022 06:32:25 -0500 X-MC-Unique: iTzVXCrLPiSUpF9TIpJR6g-1 Received: by mail-wm1-f69.google.com with SMTP id i7-20020a05600c354700b003d62131fe46so14128053wmq.5 for ; Fri, 30 Dec 2022 03:32:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=w4EOTaScDiWLOjXXokoUDPMj1ubuks55AAvOUz+Vx7M=; b=ExPgG/QI3PPLukDzJU3MhUXPVty5ZCvIUJsCLtTfI7SER2/RyFi/AFYQOAi0c+3uOo 0tvxbiyTtevyZTmX82rlt2VHcSMTTygs31qYDJ3UoI6WFz/xPa/WI71Bwu7nkvXXQ8mS nLlJ84MkSSaBpd46FIPLisVf0a7yt2EXFZgxPqSVu0x8lVG/bGIeWMllZGjRgGp2kPRz 0vNjFWbtqSgPp121eFTmP+k6m0ffvtOHTay8S2bHxFFhl+4MDFPPp/5dgBF5tmQkxt7d BipMJPHasPk6I+j3pUIWQYITwGdctqUq1ucCUrIFhgOOSmAcJf/JQAMUtnpP49E8+Sgc EvNQ== X-Gm-Message-State: AFqh2koFPL4RFy9ezSJu2V6SqKzOsYvNXB9Vxh7pNnwZGm7HrHfLzcpe Osb+o8MAa6riE/M969jdhwsOhMSccyViuX8FelElTF9prqDTGWLWYe7zKV37j2anY2h4ugHeSX5 GuUqw16Z3YQ6VLtYoG+W5OaL3cWp/mdIm+SkvdfTHep7pwjEs0qut5e7gHCms1Wo+i5L92JSXLZ I= X-Received: by 2002:a05:600c:b4d:b0:3d3:49db:d84 with SMTP id k13-20020a05600c0b4d00b003d349db0d84mr21984106wmr.20.1672399943578; Fri, 30 Dec 2022 03:32:23 -0800 (PST) X-Received: by 2002:a05:600c:b4d:b0:3d3:49db:d84 with SMTP id k13-20020a05600c0b4d00b003d349db0d84mr21984072wmr.20.1672399943254; Fri, 30 Dec 2022 03:32:23 -0800 (PST) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id y22-20020a1c4b16000000b003d01b84e9b2sm27638432wma.27.2022.12.30.03.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Dec 2022 03:32:22 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= , Martijn Braam , Sam Ravnborg , Robert Mader , Tom Fitzhenry , Peter Robinson , Onuralp Sezer , dri-devel@lists.freedesktop.org, Ondrej Jirman , Maya Matuszczyk , Neal Gompa , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Jagan Teki , Javier Martinez Canillas , Caleb Connolly , Heiko Stuebner , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v4 4/4] arm64: dts: rk3399-pinephone-pro: Add internal display support Date: Fri, 30 Dec 2022 12:31:54 +0100 Message-Id: <20221230113155.3430142-5-javierm@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221230113155.3430142-1-javierm@redhat.com> References: <20221230113155.3430142-1-javierm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ondrej Jirman The phone's display is using Hannstar LCD panel, and Goodix based touchscreen. Support it. Signed-off-by: Ondrej Jirman Co-developed-by: Martijn Braam Signed-off-by: Martijn Braam Co-developed-by: Kamil Trzciński Signed-off-by: Kamil Trzciński Signed-off-by: Javier Martinez Canillas Tested-by: Tom Fitzhenry --- Changes in v4: - Add Tom Fitzhenry's Tested-by tag. - Keep the DTS nodes sorted alphabetically (Tom Fitzhenry). Changes in v2: - Fix regulator node names (Maya Matuszczyk). - Drop non-existent "poweroff-in-suspend" property (Maya Matuszczyk). - Remove unnecessary comments in panel node (Maya Matuszczyk). .../dts/rockchip/rk3399-pinephone-pro.dts | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts index 04403a76238b..0d48fbc5dbe4 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts @@ -25,6 +25,12 @@ aliases { mmc2 = &sdhci; }; + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm0 0 1000000 0>; + pwm-delay-us = <10000>; + }; + chosen { stdout-path = "serial2:115200n8"; }; @@ -82,6 +88,32 @@ vcc1v8_codec: vcc1v8-codec-regulator { vin-supply = <&vcc3v3_sys>; }; + /* MIPI DSI panel 1.8v supply */ + vcc1v8_lcd: vcc1v8-lcd-regulator { + compatible = "regulator-fixed"; + enable-active-high; + regulator-name = "vcc1v8_lcd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc3v3_sys>; + gpio = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&display_pwren1>; + }; + + /* MIPI DSI panel 2.8v supply */ + vcc2v8_lcd: vcc2v8-lcd-regulator { + compatible = "regulator-fixed"; + enable-active-high; + regulator-name = "vcc2v8_lcd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <&vcc3v3_sys>; + gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&display_pwren>; + }; + wifi_pwrseq: sdio-wifi-pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&rk818 1>; @@ -132,6 +164,11 @@ &emmc_phy { status = "okay"; }; +&gpu { + mali-supply = <&vdd_gpu>; + status = "okay"; +}; + &i2c0 { clock-frequency = <400000>; i2c-scl-rising-time-ns = <168>; @@ -214,6 +251,9 @@ vcc3v0_touch: LDO_REG2 { regulator-name = "vcc3v0_touch"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; + regulator-state-mem { + regulator-off-in-suspend; + }; }; vcca1v8_codec: LDO_REG3 { @@ -347,6 +387,25 @@ opp07 { }; }; +&i2c3 { + i2c-scl-rising-time-ns = <450>; + i2c-scl-falling-time-ns = <15>; + status = "okay"; + + touchscreen@14 { + compatible = "goodix,gt917s"; + reg = <0x14>; + interrupt-parent = <&gpio3>; + interrupts = ; + irq-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>; + AVDD28-supply = <&vcc3v0_touch>; + VDDIO-supply = <&vcc3v0_touch>; + touchscreen-size-x = <720>; + touchscreen-size-y = <1440>; + }; +}; + &io_domains { bt656-supply = <&vcc1v8_dvp>; audio-supply = <&vcca1v8_codec>; @@ -355,6 +414,40 @@ &io_domains { status = "okay"; }; +&mipi_dsi { + status = "okay"; + clock-master; + + ports { + mipi_out: port@1 { + #address-cells = <0>; + #size-cells = <0>; + reg = <1>; + + mipi_out_panel: endpoint { + remote-endpoint = <&mipi_in_panel>; + }; + }; + }; + + panel@0 { + compatible = "hannstar,hsd060bhw4", "himax,hx8394"; + reg = <0>; + backlight = <&backlight>; + reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>; + vcc-supply = <&vcc2v8_lcd>; + iovcc-supply = <&vcc1v8_lcd>; + pinctrl-names = "default"; + pinctrl-0 = <&display_rst_l>; + + port { + mipi_in_panel: endpoint { + remote-endpoint = <&mipi_out_panel>; + }; + }; + }; +}; + &pmu_io_domains { pmu1830-supply = <&vcc_1v8>; status = "okay"; @@ -367,6 +460,20 @@ pwrbtn_pin: pwrbtn-pin { }; }; + dsi { + display_rst_l: display-rst-l { + rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_down>; + }; + + display_pwren: display-pwren { + rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_down>; + }; + + display_pwren1: display-pwren1 { + rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; + pmic { pmic_int_l: pmic-int-l { rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; @@ -408,6 +515,10 @@ bt_reset_pin: bt-reset-pin { }; }; +&pwm0 { + status = "okay"; +}; + &sdio0 { bus-width = <4>; cap-sd-highspeed; @@ -472,3 +583,15 @@ bluetooth { &uart2 { status = "okay"; }; + +&vopb { + status = "okay"; + assigned-clocks = <&cru DCLK_VOP0_DIV>, <&cru DCLK_VOP0>, + <&cru ACLK_VOP0>, <&cru HCLK_VOP0>; + assigned-clock-rates = <0>, <0>, <400000000>, <100000000>; + assigned-clock-parents = <&cru PLL_CPLL>, <&cru DCLK_VOP0_FRAC>; +}; + +&vopb_mmu { + status = "okay"; +}; -- 2.38.1