From patchwork Sun Feb 3 18:55:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 10795111 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 D007E13B5 for ; Mon, 4 Feb 2019 08:23:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2D722AFD1 for ; Mon, 4 Feb 2019 08:23:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B66EB2AFD4; Mon, 4 Feb 2019 08:23:06 +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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 5CE782AFD1 for ; Mon, 4 Feb 2019 08:23:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A2F26E3F9; Mon, 4 Feb 2019 08:22:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id 558FE6E343 for ; Sun, 3 Feb 2019 18:55:48 +0000 (UTC) Received: by mail-pg1-x543.google.com with SMTP id r11so5295041pgp.6 for ; Sun, 03 Feb 2019 10:55:48 -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=VSquxcgUN/Y3I5MYDZFPo3KJfmyDEJKVoJ4n42fBAN0=; b=uUimRZXj/vKgXqsbg3izjIEAsmF8E9f8EasDfEnetPFhtayFdyJIaZX/oRQ/oNzwIQ VJ0KJccSSAfSqx+T62qu09wCIoJ7g6QSllfFk3ifhOGI7RvDwP9tVpD5+BnTuBpgidfb 1S3W7kf1eXlLOTsN2vCfBkysNCC3GZSy9J8v61zwH2OmSLBx4v1euYS6cjWSc0kkFmm+ xOOlc0OkbnUlPij0xuATlYZwsmsaQq6vCLzY9T1vcgpGoYggETWSl/ON9abp0jixMdIU NgOlv0ePqN3FuDZI2vRUGbc/k2lzlVu/XFpPyVOUP3jq49H+zw48zFJIF6xkoD9VfDNe OQXw== X-Gm-Message-State: AJcUukfswIlIcSm8S/T4RV4hnzWJTSmEk6LEJiqkWAF/vXpZCzpvadqr Us9pqzq4iH8ylbMcowgyktw= X-Google-Smtp-Source: ALg8bN4I/Y5UgCCt6bXaQB/y1vBO0rTxQahEd2ZuoAeWd10E8AiFkEu5WJzGKwC4r8uh2ienVKdBPQ== X-Received: by 2002:a62:f247:: with SMTP id y7mr48203540pfl.25.1549220147876; Sun, 03 Feb 2019 10:55:47 -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 g28sm19524553pfd.100.2019.02.03.10.55.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Feb 2019 10:55:47 -0800 (PST) From: Vasily Khoruzhick 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 RESEND v2 12/12] arm64: allwinner: a64: enable LCD-related hardware for TERES-I Date: Sun, 3 Feb 2019 10:55:01 -0800 Message-Id: <20190203185501.8958-13-anarsoul@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190203185501.8958-1-anarsoul@gmail.com> References: <20190203185501.8958-1-anarsoul@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 04 Feb 2019 08:22:10 +0000 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: , Cc: Vasily Khoruzhick Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Icenowy Zheng TERES-I has an ANX6345 bridge connected to the RGB666 LCD output and eDP panel input. The bridge is controlled via I2C that's connected to I2C0 bus. Enable all this hardware in device tree. Signed-off-by: Icenowy Zheng Signed-off-by: Vasily Khoruzhick --- .../boot/dts/allwinner/sun50i-a64-teres-i.dts | 71 +++++++++++++++++-- 1 file changed, 67 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts index c455b24dd079..6c4090f59bed 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts @@ -56,6 +56,17 @@ }; }; + edp_panel: edp-panel { + compatible = "panel-edp", "simple-panel"; + + port { + panel_in_edp: endpoint { + remote-endpoint = <&anx6345_out_panel>; + }; + }; + }; + + reg_usb1_vbus: usb1-vbus { compatible = "regulator-fixed"; regulator-name = "usb1-vbus"; @@ -72,20 +83,58 @@ }; }; +&de { + status = "okay"; +}; + &ehci1 { status = "okay"; }; -/* The ANX6345 eDP-bridge is on i2c0. There is no linux (mainline) - * driver for this chip at the moment, the bootloader initializes it. - * However it can be accessed with the i2c-dev driver from user space. - */ &i2c0 { clock-frequency = <100000>; pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; status = "okay"; + + anx6345: anx6345@38 { + compatible = "analogix,anx6345"; + reg = <0x38>; + reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ + dvdd25-supply = <®_dldo2>; + dvdd12-supply = <®_dldo3>; + + 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>; + }; + }; + }; + }; +}; + +&mixer0 { + status = "okay"; }; &mmc0 { @@ -258,6 +307,20 @@ vcc-hdmi-supply = <®_dldo1>; }; +&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>;