From patchwork Thu Feb 20 08:35:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 11393569 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B170213A4 for ; Thu, 20 Feb 2020 08:36:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9023C24654 for ; Thu, 20 Feb 2020 08:36:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GTuFKk9s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9023C24654 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A60BC6E1EE; Thu, 20 Feb 2020 08:36:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0358F89168 for ; Thu, 20 Feb 2020 08:36:00 +0000 (UTC) Received: by mail-pl1-x641.google.com with SMTP id j7so1284628plt.1 for ; Thu, 20 Feb 2020 00:35:59 -0800 (PST) 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=yOuik/xQdjhmgeRHVU1F9OsoH/tgDDUcKjmqkiPVOZc=; b=GTuFKk9sVnbtm+TPdAJUPyFffbMj1DJ+Rq88BP21LKKkeKiGW+wCr7hsWkdu7ER8NT NAA1NRJv6+V2QGPJSri6UdTNdQTinJbxpLTAGyZayu2rv0DsRXTpm34mpyAmGI1+mp1g SgXCqUVLwGD2J1gLOa8WBYApqlJLK6Ra2CUEdSnKCbor9k7VUmvzpTxjJpx+ooEwDZVg yltg69Q6c0t0vynFAUjlc8NIKqVFERTTP4XSE6LpDhGFLMyT0xeWtPHU32YCspuiBpCe Hj2LJJ8Ow1f8dt07GHr0P0kBMTCc9Vp96EDwrU9dwMLg6PW+PGZ9lUAaX8CdJxNxgWjj QRVQ== 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=yOuik/xQdjhmgeRHVU1F9OsoH/tgDDUcKjmqkiPVOZc=; b=l1O6SWPOjwhXO3B69YhT0st1wcchcr0QOlOg7s5zOnTviiyNcuGwXHHbASIkdGs6Mv GM4eJdS2rKKUIlE/0C/iUQDdSEX+ZpRbjsXX0sZ2RZvztuzU+ZswB7q1u5AlUupv5nc/ w7e2fahcmBe0RQHQUS6EgK19PDC2SWbrd2lEKJZdm1+P3R/G8NfqrBYsn3V9uWg2HfHa vZynSLfNqR+Q8UXHxxv9X77jV5LKKvfw9pQO5ngwBcYhEhXXkz1M8s+yOJAo+FIe8HzI Yvdgtzob3iwe6zKZWqwX9Yg4hUf8xVmVQEwc/hHstWdCg0us8NxuuU5olKZZSHLJXtGr +0Gg== X-Gm-Message-State: APjAAAW7TrbkFTpf/W7Yh0eMnxzSsee7OHEt0Odh58ZCoLEXEWD5MaKX 6RkQQbOTs8OzFMVGQXnjTXo= X-Google-Smtp-Source: APXvYqx61DAP56pqHMjI66GBxwpRYUpggqeu+U1edpVHeDuWzdLliNY2/SWqE8LcxSU8RBlwVPhkhA== X-Received: by 2002:a17:90a:e397:: with SMTP id b23mr2218837pjz.135.1582187759650; Thu, 20 Feb 2020 00:35:59 -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 l13sm2319038pjq.23.2020.02.20.00.35.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Feb 2020 00:35:59 -0800 (PST) From: Vasily Khoruzhick To: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Icenowy Zheng , Torsten Duwe , Heiko Stuebner , Linus Walleij , Stephan Gerhold , Mark Brown , Stephen Rothwell , Samuel Holland , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 6/6] arm64: allwinner: a64: enable LCD-related hardware for Pinebook Date: Thu, 20 Feb 2020 00:35:08 -0800 Message-Id: <20200220083508.792071-7-anarsoul@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200220083508.792071-1-anarsoul@gmail.com> References: <20200220083508.792071-1-anarsoul@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasily Khoruzhick Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. Enable all this hardware in device tree. Signed-off-by: Icenowy Zheng Signed-off-by: Vasily Khoruzhick Reviewed-by: Laurent Pinchart --- .../dts/allwinner/sun50i-a64-pinebook.dts | 69 ++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts index c06c540e6c08..f5633f550d8a 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts @@ -48,6 +48,18 @@ lid_switch { }; }; + panel_edp: panel-edp { + compatible = "neweast,wjfh116008a"; + backlight = <&backlight>; + power-supply = <®_dc1sw>; + + port { + panel_edp_in: endpoint { + remote-endpoint = <&anx6345_out_edp>; + }; + }; + }; + reg_vbklt: vbklt { compatible = "regulator-fixed"; regulator-name = "vbklt"; @@ -109,6 +121,10 @@ &dai { status = "okay"; }; +&de { + status = "okay"; +}; + &ehci0 { phys = <&usbphy 0>; phy-names = "usb"; @@ -119,6 +135,10 @@ &ehci1 { status = "okay"; }; +&mixer0 { + status = "okay"; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins>; @@ -177,12 +197,45 @@ &pwm { status = "okay"; }; -/* The ANX6345 eDP-bridge is on r_i2c */ &r_i2c { clock-frequency = <100000>; pinctrl-names = "default"; pinctrl-0 = <&r_i2c_pl89_pins>; status = "okay"; + + anx6345: anx6345@38 { + compatible = "analogix,anx6345"; + reg = <0x38>; + reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* 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_edp: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_edp_in>; + }; + }; + }; + }; }; &r_pio { @@ -357,6 +410,20 @@ &sound { "MIC2", "Internal Microphone Right"; }; +&tcon0 { + pinctrl-names = "default"; + pinctrl-0 = <&lcd_rgb666_pins>; + + 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>;