From patchwork Sun Feb 3 18:44:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 10795067 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 131C113B5 for ; Mon, 4 Feb 2019 08:22:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03EAE2AFD1 for ; Mon, 4 Feb 2019 08:22:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC5462AFD4; Mon, 4 Feb 2019 08:22:33 +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 A2B5F2AFD1 for ; Mon, 4 Feb 2019 08:22:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 225FF6E392; Mon, 4 Feb 2019 08:22:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 519326E342 for ; Sun, 3 Feb 2019 18:45:09 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id g62so5696922pfd.12 for ; Sun, 03 Feb 2019 10:45:09 -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=dkqFonfgV5DLpG5lIclGrRBSXd2jDJ3XJ9LYGRSOQbHzM2LjObrD0feCL7VQ8eFvXV rr13cGgdOOulgu8n5Xynz7wsF0vCgifZf4tRWdv0e6kM+4Xvxd0ONpVBAGtW8Dtp5ngC 7xKeNT012abXrs/YKnKQVe8+awzcFy0+WmFTodVl16dIxjfA9dgW2jrAzNc1U/G+pZXl H9Rv5An7EHfAp2/z3FmQNr0pbvqIcjuQhxSAhwqqJVFE6P42zwPH6Vb1EnFE9nJaJAgq ghXuirz0W2CIC/CPN3BxzAB857rpNLpnEPlJ2RrUIqYySEpO4RzJ6UWT8fY9wSGMFSA1 iNpQ== X-Gm-Message-State: AHQUAubJQ/LzormuTfrF4FrWsJZPyGIOCVJo1kiJtLH1zHbJ2QWU+R3h 2aVJcFHJP/rYmqhT7vDYhOU= X-Google-Smtp-Source: AHgI3IZnpJ1kXg/C6hcxpdl7+noyFeFUtZkTRyrxYNZieYSDFMWQGTQS54qDh5TY8JZ6pBUojp9Lgw== X-Received: by 2002:a63:e950:: with SMTP id q16mr10285229pgj.138.1549219508933; Sun, 03 Feb 2019 10:45:08 -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 c67sm21407831pfg.170.2019.02.03.10.45.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Feb 2019 10:45:08 -0800 (PST) From: Vasily Khoruzhick To: David Airlie Daniel Vetter <"airlied@linux.iedaniel"@ffwll.ch>, 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 v2 12/12] arm64: allwinner: a64: enable LCD-related hardware for TERES-I Date: Sun, 3 Feb 2019 10:44:50 -0800 Message-Id: <20190203184450.8050-13-anarsoul@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190203184450.8050-1-anarsoul@gmail.com> References: <20190203184450.8050-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>;