From patchwork Tue May 7 13:07:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 354 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CCDE43F066 for ; Tue, 7 May 2019 15:07:41 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id e128sf10181621pfc.22 for ; Tue, 07 May 2019 06:07:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1557234460; cv=pass; d=google.com; s=arc-20160816; b=PgW/nmKawkZCAVj1K3EWQ/pl9YKZbsK4DqiBHf0w7jSHe73SEyej5s4WUHd4AzJRdJ uVHAxV0P2PhmvuNEreELtsD5zR88Cu5Fk2YAYwlgyt+PmpVbboGZDnPQSNcDtpqOeCs7 W4PNwebs6+3HKrLSnDKDlKpy0P6jMDrQHB0C4V8WhQGsnOk+g/Q6iWRJor1iZ8nIlrOf 8A5pj7uyx/QsgpBBBkTy6VssobVDmFBzc1LMLsKefHBOlCPNSWeSgm1WxjUuCAGD+gUX VYa0kFSZKSUr0oMd2RmaGCIr9J907jlmG01LemcevDzBpBR016/oaiRb0YuBogX0TlBS 9ICg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=byD55n41SsK5K0SLogtKA/0kkD6YSuKWjKS0mu0E4qM=; b=bzPMyT8BWZX6WHEsHbIUTs5vOuO9rprepEo1+a786exkDm3K7OLiLZSiY5RFygFeJj imOv+asw/Il2L37tHKfDnqYK1V8gDL2wuchcnH2FKxIoS8lJZv7YPduL/O87AscZaFrL CwNe0oEzQn6bTV9Nbi5VtVkrg5sa5oHibdMQPzu9S7tk8/qcY3TYifhMDMbVgOvqwbFu OoOvfoKrOkw3BcXiwX9Z9SxgDfsgmxfO+6SEM1ycE8Wi7dZHy6i3h6u084J2r47/EVUc 2aD3oqs9/V6WCtUf9gL7GUmJoWZMPvGxLQgXoWuUATP1DM+TTMWuv/wFAXo732j+WV6T MZsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="MQeNgF/z"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=byD55n41SsK5K0SLogtKA/0kkD6YSuKWjKS0mu0E4qM=; b=e6Ras/odS6cfto5LeDGybmWdDZYrQU7IJtH/4L1Q92YOL+9LBLzsp2BGMc2yny1lv2 LP7Na57HPPAoG16/lJ/J07F8gadhcrXUSRfU+/5bYfXgQ51UD2HzWfEuE3rLD51Tg7g1 D5w3QPhYcVvD4ey7c/aUflRWXJo0WmxeokeN4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=byD55n41SsK5K0SLogtKA/0kkD6YSuKWjKS0mu0E4qM=; b=Tp5RfBwsiVhMu723T6sg4aEIwFI/ljAACfaNPfPFVND2F5kfOtCGxIMC5B7VtMRrNH GqR4tqlPcRt9KHTcN2WnXdgPQobVnkBxyVQvCdPDW2rWZ/z32RPHdf2+hx4ncfGQECVS 2hz995DoOTQIR++fwb8n+neqK7hOkumBeLI370RUbJEkVhtHRnSi+vS3hHTVATptsotW jX4euwlb2rqCtkFD0b/fI5av2rJlLjW1O+PAFN3txvddNhWj/PRf+6YOTzsCOTf/TnRf bZfGHzsZVhoiplZi5a7x06Nzlh7iSwzCI4tF5QyVY7a5FBdJSO44VyPAJ36hoIEv9ID/ J22A== X-Gm-Message-State: APjAAAWNtwHS5rkeqi3dZ7+U8oRwJDsOWWDDTDK3r5PMCVa/duotl4dL XQRcNxPHJ9mJ3XE2BRchgrcMfOTz X-Google-Smtp-Source: APXvYqw9ifnUFUzn41E0BMRfF5MuoTnBbQTidljPhg/U4zOJ1mu1hU0ufMgqnz95CsTaYm080b76cA== X-Received: by 2002:a17:902:fa2:: with SMTP id 31mr40816769plz.128.1557234460627; Tue, 07 May 2019 06:07:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:690a:: with SMTP id e10ls4474521pfc.12.gmail; Tue, 07 May 2019 06:07:40 -0700 (PDT) X-Received: by 2002:a62:ed10:: with SMTP id u16mr40654205pfh.187.1557234460231; Tue, 07 May 2019 06:07:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557234460; cv=none; d=google.com; s=arc-20160816; b=xSvyU/O9MqE1o2IROFbwJ0Fm8oSEmHIR2BkJ3sV8fqTrV9mqLtEzCBQHXkGEUFobu7 zKUxLpkzCZq3FmgKapZQ7/25sxeUB89XPdOHcQ+vJZF20h2+8geN0IvUeN04QC5oTV6k 3VIy12w5kSzfC3cZAElhUTCebFRC2WdUkkwYNQ17uNCHDQX7JRmhhvD/NHCJ8ON5tPLj w/I5Apv2ERb/aia5Q5qqAxqdR14GHRYOR/UFLMMVkLz4khvkxmgSkvWGvA2eaZOaGAHz iYPZr/sWz96hi9zbleBp9g2b1wOYPqQDtmSPmoe9RrdXRKyitQR7hIvKb06WYYnUxK9M J03g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=rmbbR+nEPRU8PAUrqs/Xp1Cybc4IWp6SjLWLlkBHpm0=; b=xLgCZb5JaYFYTrTrW6U7Q7XKmqrdiuVgJOuFGsI3II0IMG2t5tIgiCPv0kutVfkDQO o1SOikC1UyVqopyyf+50lALtdl80faFLCClPM83gQ82+krsq1G1iZEohpAbr0EFXV2UY d3oM2GvNhMzW+0AqfCPGDdWGsdrTlKgQCebmKdeFWOZYwgIymjozChcD9qbLuk/YJCON SJICikLOSI8nFDzpQWw4Yiqia/Nt6W0R1AzBdqzexGu9XNrsY1WcbUALWlWW6alJXTEi a6ErqaEZL5jl6NNIZZpk2p2tzIJwPafyorODv0QuUnQaEtFnbyzh+mWOEmTaG52abgBW Cbfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="MQeNgF/z"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id l26sor14330284pfe.63.2019.05.07.06.07.40 for (Google Transport Security); Tue, 07 May 2019 06:07:40 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:aa7:92c4:: with SMTP id k4mr42376765pfa.183.1557234459930; Tue, 07 May 2019 06:07:39 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:3682:cdb6:452:ecda:bdfa:452e]) by smtp.gmail.com with ESMTPSA id w190sm21889823pfb.101.2019.05.07.06.07.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 06:07:39 -0700 (PDT) From: Jagan Teki To: Heiko Stuebner , Rob Herring , Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Subject: [DO NOT MERGE] [PATCH v2 3/3] arm64: rockchip: rk3399: nanopc-t4: Enable FriendlyELEC HD702E eDP panel Date: Tue, 7 May 2019 18:37:08 +0530 Message-Id: <20190507130708.11255-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190507130708.11255-1-jagan@amarulasolutions.com> References: <20190507130708.11255-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="MQeNgF/z"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , FriendlyELEC HD702E is one of optional LCD panel for NanoPC T4 eDP interface. It features 800x1280 resolutions, with built in GT9271 captive touchscreen and adjustable backlight via PWM. eDP panel connections are: - VCC3V3_SYS: 3.3V panel power supply - GPIO4_C2: PWM0_BL pin - GPIO4_D5_LCD_BL_EN: Backlight enable pin - VCC12V0_SYS: 12V backlight power supply - Touchscreen connected via I2C4 - GPIO1_C4_TP_INT: touchscreen interrupt pin - GPIO1_B5_TP_RST: touchscreen reset pin Signed-off-by: Jagan Teki --- Changes for v2: - use force-hpd and delete-property for edp - use generic backlight brightness - add simple-panel fallback compatible .../boot/dts/rockchip/rk3399-nanopc-t4.dts | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts index 931c3dbf1b7d..4cacd09658dc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts @@ -46,6 +46,14 @@ }; }; + backlight: backlight { + compatible = "pwm-backlight"; + enable-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; /* GPIO4_D5_LCD_BL_EN */ + pwms = <&pwm0 0 25000 0>; + power-supply = <&vcc12v0_sys>; + status = "okay"; + }; + ir-receiver { compatible = "gpio-ir-receiver"; gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>; @@ -64,6 +72,18 @@ fan-supply = <&vcc12v0_sys>; pwms = <&pwm1 0 50000 0>; }; + + panel { + compatible ="friendlyarm,hd702e", "simple-panel"; + backlight = <&backlight>; + power-supply = <&vcc3v3_sys>; + + port { + panel_in_edp: endpoint { + remote-endpoint = <&edp_out_panel>; + }; + }; + }; }; &cpu_thermal { @@ -94,6 +114,25 @@ }; }; +&edp { + status = "okay"; + force-hpd; + /delete-property/ pinctrl-0; + + ports { + edp_out: port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + edp_out_panel: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_in_edp>; + }; + }; + }; +}; + &gpu_thermal { trips { gpu_warm: gpu_warm { @@ -130,6 +169,17 @@ }; }; +&i2c4 { + touchscreen@5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + interrupt-parent = <&gpio1>; + interrupts = ; + irq-gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>; /* GPIO1_C4_TP_INT */ + reset-gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; /* GPIO1_B5_TP_RST */ + }; +}; + &sdhci { mmc-hs400-1_8v; mmc-hs400-enhanced-strobe;