From patchwork Fri Feb 15 05:09:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot via dri-devel X-Patchwork-Id: 10816319 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 897941390 for ; Sat, 16 Feb 2019 17:08:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72AF029DE8 for ; Sat, 16 Feb 2019 17:08:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 671B32B4D6; Sat, 16 Feb 2019 17:08:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 12A0E29DE8 for ; Sat, 16 Feb 2019 17:08:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 888C56E117; Sat, 16 Feb 2019 17:07:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 194696E042 for ; Fri, 15 Feb 2019 05:10:34 +0000 (UTC) Received: by mail-pf1-x444.google.com with SMTP id q17so4246419pfh.10 for ; Thu, 14 Feb 2019 21:10:34 -0800 (PST) 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:content-transfer-encoding; bh=t0ArzoJQn0oHXDNAHgLtx/X1H+X8HY2qzxjqcsB9+Oc=; b=fRHLJp0OL8WVSpYb0ZRjtZRZ2gdOB1031x47pyedbGowQnm0FWiJPblvWBafGnHEpE JJ5e8PEiG4TO5fqCKvidkEemyvMwGmgxanxhqH1Iq73Tuqw9a2Nk0LaVbvdLdSMqrMPJ QZJ1YXE6Bvr2oji0eu8zlYNjO+sdRk00DwCrYMRrLpT8WGcL2k4TtzLjiLdJjHX5zb2u efRp+mBjZpqJualKx4JKAvRUypbv57JDNfWuY5WgkUiN0YCxtpWmANomhVlWWCT9G4nI tL0Vus3MGljYw+2ZOu81pFOXerozaj1ngijCFkBbquhprbiOJHX2qhPZ0J0NSAJpN+5x YRmA== X-Gm-Message-State: AHQUAubAJHsgPFhDiYPvWKGuizYFmQQrWaS+G+38/f+VhsW3YgiAjh0G CeWj5BeNDd33AkjL4nnsCfM= X-Google-Smtp-Source: AHgI3IZrmdPthtTnu8fR7wKBTEbuCapy3IvXmNTKnoUdJV1tqd0BFYs1DHZVzzS5eZabXWheFcHZ9w== X-Received: by 2002:a63:4913:: with SMTP id w19mr3584773pga.394.1550207433708; Thu, 14 Feb 2019 21:10:33 -0800 (PST) Received: from anarsoul-thinkpad.lan (216-71-213-236.dyn.novuscom.net. [216.71.213.236]) by smtp.gmail.com with ESMTPSA id m9sm4900442pgr.7.2019.02.14.21.10.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 21:10:33 -0800 (PST) To: David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Thierry Reding , Maxime Ripard , Chen-Yu Tsai , Archit Taneja , Andrzej Hajda , Laurent Pinchart , Icenowy Zheng , Sean Paul , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com Subject: [PATCH v3 11/11] arm64: allwinner: a64: enable LCD-related hardware for Pinebook Date: Thu, 14 Feb 2019 21:09:57 -0800 Message-Id: <20190215050957.20755-12-anarsoul@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190215050957.20755-1-anarsoul@gmail.com> References: <20190215050957.20755-1-anarsoul@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 16 Feb 2019 16:58:31 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t0ArzoJQn0oHXDNAHgLtx/X1H+X8HY2qzxjqcsB9+Oc=; b=HZx+M/XfP82BRjqpcJPU2qJdp2nmvOrH6bQcUwqJxgXLXAWBklVfpVW5aSjXvnBUYr W9sGtgMCWRT8J6wAjXYk743N6fcde+93pkZh7GlKyaSIDqQ1FlbKC50Q26HaGSQ2XkRC /nJDNZFVt76MZZctvjgeDenbI3NuhZtedb2Epea5l0Fa1n6vAns61yPNj6exsGrTo6cK rWZy26H0rF4KS659h/moVr/cGpNIqNEn3ivExNOaLHoeR/uuW3uBl1+3CsoEUZwZKVJn fWN0cBTBsqJ4vQYtJq3gUk5kX5jyw3GpcA7a1zAzBK3rcFpWx3KjguTQlOYgYoVlnHUC pHeg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Vasily Khoruzhick via dri-devel From: kernel test robot via dri-devel Reply-To: Vasily Khoruzhick Cc: Vasily Khoruzhick Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Icenowy Zheng Pinebook has an ANX6345 bridge connected to the RGB666 LCD output and eDP panel input. The bridge is controlled via I2C that's connected to R_I2C bus. There're pinebooks with 3 different panels in the wild, all 3 with different timings. Add all the compatibles to panel node and hope that we can get correct timings from EDID. If reading EDID fails it's up to firmware to fixup compatible string. Enable all this hardware in device tree. Signed-off-by: Icenowy Zheng Signed-off-by: Vasily Khoruzhick --- .../dts/allwinner/sun50i-a64-pinebook.dts | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts index d22736a62481..0d9280bafc12 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts @@ -63,6 +63,19 @@ }; }; + edp_panel: edp-panel { + compatible = "boe,hb140wx1-501", "innolux,n116bge", + "neweast,wjfh116008a", "simple-panel"; + backlight = <&backlight>; + power-supply = <®_dc1sw>; + + port { + panel_in_edp: endpoint { + remote-endpoint = <&anx6345_out_panel>; + }; + }; + }; + reg_vcc3v3: vcc3v3 { compatible = "regulator-fixed"; regulator-name = "vcc3v3"; @@ -102,6 +115,10 @@ status = "okay"; }; +&de { + status = "okay"; +}; + &ehci0 { phys = <&usbphy 0>; phy-names = "usb"; @@ -112,6 +129,10 @@ status = "okay"; }; +&mixer0 { + status = "okay"; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins>; @@ -163,6 +184,46 @@ status = "okay"; }; +&r_i2c { + pinctrl-names = "default"; + pinctrl-0 = <&r_i2c_pins_a>; + status = "okay"; + + anx6345: anx6345@38 { + compatible = "analogix,anx6345"; + reg = <0x38>; + reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ + dvdd25-supply = <®_dldo2>; + dvdd12-supply = <®_fldo1>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + anx6345_in: port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + anx6345_in_tcon0: endpoint@0 { + reg = <0>; + remote-endpoint = <&tcon0_out_anx6345>; + }; + }; + + anx6345_out: port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + anx6345_out_panel: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_in_edp>; + }; + }; + }; + }; +}; + &r_rsb { status = "okay"; @@ -334,6 +395,21 @@ "MIC2", "Internal Microphone Right"; }; +&tcon0 { + pinctrl-names = "default"; + pinctrl-0 = <&lcd_rgb666_pins>; + no-strict-clock-check; + + status = "okay"; +}; + +&tcon0_out { + tcon0_out_anx6345: endpoint@0 { + reg = <0>; + remote-endpoint = <&anx6345_in_tcon0>; + }; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pb_pins>;