From patchwork Mon Mar 30 18:16:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11466197 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 9DB07913 for ; Mon, 30 Mar 2020 18:16:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 76933206F6 for ; Mon, 30 Mar 2020 18:16:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HB0uc9Ct"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="YggXH8/k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76933206F6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wWc8NQy2MdZpbE666XVTpL9BRm2xwhJZsL8GUtQNQtw=; b=HB0uc9CtzSMPaZ eScZCV3M4yShLsqyIbljs5bV6a2OccXlvHTdgAlekBGPrSQBjC7FWUfpfRvLGiI63b8Srvu+daQFg 5aMKsHDCPLOKTSWQZBiLbRr7D9dud/sXXw9aPIlVtWLdR9pW3P8nzpA83O/eDt2QQQ0D1ILmPikzk mJsp6+HxQ0pNCVNpzNziUrBo8pKnnkf8BEKq29woK1JSabivjnTYkrG+JkEC4LWeAfY8sus0nRz29 Icz8+fkqjbYeJTA2slx7Om2WBy9crXPai4LvukPWcTqTusxaB5TjWHaY5RXGjdYeC8rvKVir8ujLn pmuHBLoA6pYIwIgIJRUw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIyxc-0001xC-Hw; Mon, 30 Mar 2020 18:16:32 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIyxY-0001sT-Fl for linux-rockchip@lists.infradead.org; Mon, 30 Mar 2020 18:16:29 +0000 Received: by mail-pf1-x442.google.com with SMTP id c20so6440239pfi.7 for ; Mon, 30 Mar 2020 11:16:28 -0700 (PDT) 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:content-transfer-encoding; bh=wJTLWcIFZyv0JFO9cta9pHUG+lGi0mCPWEKe9LuSPG8=; b=YggXH8/kUxgVU4iGMXf0TZjGMWQczCGPkpQCbvubHYOm+D+ePdw02kRDdJaBkiRG4x XRhu1ghnlm4LVptqsJk0C7U06mUA/Pu5Eg1uMCYjJuBmxlqEOPPtEIRR7NykgwJ+xjAW MXHBGxF2ZCVmZ+0ik3b/ZxSqEm1M2CxyCOn4w= 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=wJTLWcIFZyv0JFO9cta9pHUG+lGi0mCPWEKe9LuSPG8=; b=alHtnIu+Dnfeib3EvD9k9HG9Y8LQ/dQJzkTWY9xCqZHjRSdQreOEtLJ2Sk5SrsW9KZ RC2XJXycjXLSXr/+wSEM1nAbpE3lMF15v7nZfCoDTff3/ZBhX8vC2N4ydCuSedDB715/ 4taKFpoOkO4cjni4K4OzsP4lDkWtX8UC/RDHEz48LIm6CBTc59FoF5MTPtk+YLvkxdt8 kKgzytYbtqvUhspk9u5uRbZmRR8ObIl64JXmWS/JyaS/wdO/DwwBuSxjvNpH0yAs4FG1 kzSL4hb+a+X0V5kqArh4zn88D2QUXEVfcO9UhZxdxwwCpNi6NpMTHl2DBb3K1uf4sVwL i3Hg== X-Gm-Message-State: ANhLgQ2Gh2Z+EWV1eNtfBf/n+k7wHcAnRBI60H7azNSUYONO2p2zitw9 SxE9yz3Qmd+JWotvHnkxbVtNvQ== X-Google-Smtp-Source: ADFU+vt68PFfi1d2cQppDdfNXrGTgrj1WkgBpFRWN0v/xxPWCRxZiq3kEzt8vMf05IB5YgznD2ccyQ== X-Received: by 2002:a63:2c87:: with SMTP id s129mr12932224pgs.406.1585592187786; Mon, 30 Mar 2020 11:16:27 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:b95e:3742:c972:389e]) by smtp.gmail.com with ESMTPSA id p7sm207452pjp.1.2020.03.30.11.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 11:16:27 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich , Anatolij Gustschin Subject: [PATCH v2 1/4] arm64: dts: rk3399-u-boot: Delete vop assigned-clocks/rates Date: Mon, 30 Mar 2020 23:46:10 +0530 Message-Id: <20200330181613.29462-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200330181613.29462-1-jagan@amarulasolutions.com> References: <20200330181613.29462-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200330_111628_570360_D5BEC407 X-CRM114-Status: UNSURE ( 9.32 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:442 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , sunil@amarulasolutions.com Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Linux supporting assigned-clocks for VOP on rk3399 by assuming U-Boot not initializing it on this linux commit: commit <617f4472bdd3> ("arm64: dts: rockchip: init rk3399 vop clock rates") There is no specific need to initialize these assigned clock in U-Boot as video drivers still work with default aclk and   hclk values. So, these clocks are simply not supported by rk3399 clock driver. But, during stdio probe of vidconsole, the device probe will try to check whether the assigned clocks on that video console node is initialized or not? and return error if not. So, delete these property via -u-boot dtsi as there is no specific need in U-Boot. Signed-off-by: Jagan Teki --- Changes for v2: - none arch/arm/dts/rk3399-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi index 8b857ccfc7..b846f9cde7 100644 --- a/arch/arm/dts/rk3399-u-boot.dtsi +++ b/arch/arm/dts/rk3399-u-boot.dtsi @@ -99,9 +99,13 @@ }; &vopb { + /delete-property/ assigned-clocks; + /delete-property/ assigned-clock-rates; u-boot,dm-pre-reloc; }; &vopl { + /delete-property/ assigned-clocks; + /delete-property/ assigned-clock-rates; u-boot,dm-pre-reloc; }; From patchwork Mon Mar 30 18:16:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11466201 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 6E98A14B4 for ; Mon, 30 Mar 2020 18:16:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4CBA6206F6 for ; Mon, 30 Mar 2020 18:16:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="A7iRyj9M"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="Jpdl8vLX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CBA6206F6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=egFAtdxiykDY59Owz2WGb3OGXkVl6UQjF32yRDDbev0=; b=A7iRyj9MHHECLXC4EYk9vtZnhI l09R4jbz3Va9xWpbxn4oYa/Ok8eqA0TrCe4rE/z8GT5iSEO+gU94+eyU8cFmiNrRl26OSHk7o+XO+ WLI0kjAPAkWM35kub6Oy2EcoazQWSEUtUiMJ0FHY7nNu937BJe8Nysuun2nTEQqgumtmqpVYY5vJ0 AxXuDhPFLrEF0KsH0q5QDnYrcJInI2Z9zJBhM98nm6JofDoAKLdT4K2TpSpq3jdvhY+DYk/MxL/CV VZZSnX8iIjlUPUD4J7mQdyR8pdMvXamXejL8vPixmvsPIdCZaN9xH6g+Gad99PtnmVT+rJD2cOf6T uFWj2t1A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIyxo-00028J-JZ; Mon, 30 Mar 2020 18:16:44 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIyxd-0001xS-H2 for linux-rockchip@lists.infradead.org; Mon, 30 Mar 2020 18:16:35 +0000 Received: by mail-pl1-x644.google.com with SMTP id d24so3215756pll.8 for ; Mon, 30 Mar 2020 11:16:33 -0700 (PDT) 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; bh=OoGn8QBGSdBeVcx7ww2exfrAU8/niS0AWwlQNFH0BPE=; b=Jpdl8vLXku2sulzji02Oum+5H+2gXoCQn92MnsFNLbgmE/YPvTN5xF8qhJudGtXi+s WRma9nUERdWqCqevyBr0vuuf1KppzZ/NnOZ0MuXuySK0GLeV0Pp3mkIngYXcTy53sDO3 OEyjYKnvndnvzIYnWsWnL9yx/XzUPn9enpXbA= 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; bh=OoGn8QBGSdBeVcx7ww2exfrAU8/niS0AWwlQNFH0BPE=; b=MjwSiSM2WiqM6yyzeZ8zjpQAyHJOcbbosu77zv/7eIV/QFG073l0NHSR7ZGqGP+HSi 5pIbAP7t6Xs6xK+NPZxaiG7l6GED5ukiIQkb7w1NjyVdyq35VhnqqRkZ6+kiIszxiUlB VMldyHfwZycmjwV6S3AkPsrQSVKZ3l2xt0N/zgtn+ntnU7RVkMHRHe/VljiSWaPm3LCv bX1CyzTTxpIkpZHaZUq2taIgd0iiRi+uc2GF6EAJk2DqBdOGnZagookahbTKeioK2QPB 6Ipc/N8QccQajkvITxQIwEzlGO9R/9mSIPB3Z9jK09qPolNDTVNhuOxnqPVHVKvaO26E HZLg== X-Gm-Message-State: AGi0PuaCykxQaeEMjVrnDFV8XE6vLVHGQRn8b87S6VTvZC0DzBNl7wTX wPfa/YwP4hNuSQiqKesEgUN8yA== X-Google-Smtp-Source: APiQypJKLAQVgCV8my6PcOtRg7tGPr8datyH5PpivDiTS9dCxGE/70j3LrYDr153q7p3kqn47JhVhg== X-Received: by 2002:a17:90a:faa:: with SMTP id 39mr441309pjz.190.1585592192279; Mon, 30 Mar 2020 11:16:32 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:b95e:3742:c972:389e]) by smtp.gmail.com with ESMTPSA id p7sm207452pjp.1.2020.03.30.11.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 11:16:31 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich , Anatolij Gustschin Subject: [PATCH v2 2/4] video: rockchip: Fix vop modes for rk3399 Date: Mon, 30 Mar 2020 23:46:11 +0530 Message-Id: <20200330181613.29462-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200330181613.29462-1-jagan@amarulasolutions.com> References: <20200330181613.29462-1-jagan@amarulasolutions.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200330_111633_688903_6677C1DE X-CRM114-Status: GOOD ( 12.02 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:644 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , sunil@amarulasolutions.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org VOP display endpoint pipeline configuration is differs between rk3288 vs rk3399. These VOP pipeline configuration depends on how the different display interfaces connected in sequence to IN and OUT ports like for, RK3288: vopb_out: port { #address-cells = <1>; #size-cells = <0>; vopb_out_edp: endpoint@0 { reg = <0>; remote-endpoint = <&edp_in_vopb>; }; vopb_out_hdmi: endpoint@1 { reg = <1>; remote-endpoint = <&hdmi_in_vopb>; }; vopb_out_lvds: endpoint@2 { reg = <2>; remote-endpoint = <&lvds_in_vopb>; }; vopb_out_mipi: endpoint@3 { reg = <3>; remote-endpoint = <&mipi_in_vopb>; }; }; RK3399: vopb_out: port { #address-cells = <1>; #size-cells = <0>; vopb_out_edp: endpoint@0 { reg = <0>; remote-endpoint = <&edp_in_vopb>; }; vopb_out_mipi: endpoint@1 { reg = <1>; remote-endpoint = <&mipi_in_vopb>; }; vopb_out_hdmi: endpoint@2 { reg = <2>; remote-endpoint = <&hdmi_in_vopb>; }; vopb_out_mipi1: endpoint@3 { reg = <3>; remote-endpoint = <&mipi1_in_vopb>; }; vopb_out_dp: endpoint@4 { reg = <4>; remote-endpoint = <&dp_in_vopb>; }; }; here, HDMI interface has endpoint 1 in rk3288 and 2 in rk3399. The rockchip vop driver often depends on this determined endpoint number and stored in vop_mode. So based on this vop_mode the bpp and pin polarity would configure on detected display interface. Since, the existing driver using rk3288 vop mode settings enabling the same will result wrong display interface configuration for rk3399. Add the patch for fixing these vop modes for rk3399. Signed-off-by: Jagan Teki --- Changes for v2: - none arch/arm/include/asm/arch-rockchip/vop_rk3288.h | 11 +++++++++++ drivers/video/rockchip/rk3399_vop.c | 2 -- drivers/video/rockchip/rk_vop.c | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/vop_rk3288.h b/arch/arm/include/asm/arch-rockchip/vop_rk3288.h index 8398249509..872a158b71 100644 --- a/arch/arm/include/asm/arch-rockchip/vop_rk3288.h +++ b/arch/arm/include/asm/arch-rockchip/vop_rk3288.h @@ -85,6 +85,16 @@ enum { LB_RGB_1280X8 = 0x5 }; +#if defined(CONFIG_ROCKCHIP_RK3399) +enum vop_modes { + VOP_MODE_EDP = 0, + VOP_MODE_MIPI, + VOP_MODE_HDMI, + VOP_MODE_MIPI1, + VOP_MODE_DP, + VOP_MODE_NONE, +}; +#else enum vop_modes { VOP_MODE_EDP = 0, VOP_MODE_HDMI, @@ -94,6 +104,7 @@ enum vop_modes { VOP_MODE_AUTO_DETECT, VOP_MODE_UNKNOWN, }; +#endif /* VOP_VERSION_INFO */ #define M_FPGA_VERSION (0xffff << 16) diff --git a/drivers/video/rockchip/rk3399_vop.c b/drivers/video/rockchip/rk3399_vop.c index 81c122d7a9..1d5b3931a6 100644 --- a/drivers/video/rockchip/rk3399_vop.c +++ b/drivers/video/rockchip/rk3399_vop.c @@ -45,8 +45,6 @@ static void rk3399_set_pin_polarity(struct udevice *dev, V_RK3399_DSP_MIPI_POL(polarity)); break; - case VOP_MODE_LVDS: - /* The RK3399 has neither parallel RGB nor LVDS output. */ default: debug("%s: unsupported output mode %x\n", __func__, mode); } diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c index e91d4dfa7f..e1bd656bee 100644 --- a/drivers/video/rockchip/rk_vop.c +++ b/drivers/video/rockchip/rk_vop.c @@ -118,10 +118,12 @@ static void rkvop_enable_output(struct udevice *dev, enum vop_modes mode) V_EDP_OUT_EN(1)); break; +#if defined(CONFIG_ROCKCHIP_RK3288) case VOP_MODE_LVDS: clrsetbits_le32(®s->sys_ctrl, M_ALL_OUT_EN, V_RGB_OUT_EN(1)); break; +#endif case VOP_MODE_MIPI: clrsetbits_le32(®s->sys_ctrl, M_ALL_OUT_EN, @@ -313,7 +315,9 @@ static int rk_display_init(struct udevice *dev, ulong fbbase, ofnode ep_node) /* Set bitwidth for vop display according to vop mode */ switch (vop_id) { case VOP_MODE_EDP: +#if defined(CONFIG_ROCKCHIP_RK3288) case VOP_MODE_LVDS: +#endif l2bpp = VIDEO_BPP16; break; case VOP_MODE_HDMI: From patchwork Mon Mar 30 18:16:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11466199 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 E7AE414B4 for ; Mon, 30 Mar 2020 18:16:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C38E7206F6 for ; Mon, 30 Mar 2020 18:16:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="W9xn6n54"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="fRsHvCK3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C38E7206F6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=FZPmiCGeMK3LLHM4ud9LBpZ9FjUTFqvWlKtnRn1LXyI=; b=W9xn6n54LRO4NvKXn3aGfqIV5J 2WHLWhJxLDg1Q2r0HPK/VBKlV7i3XZevSaJIwyv9bCK/3pzaFatbqzOTw3zpYN+ywfGdsRKrf7XXu aGxWgtnA3BTYxOohsB9nomy7uq8kijT+KbKtIlVoS70V7oWDviVsAyIRFends/jHoNlr3sGuJdkHK 6EyzjFI7YeSiNGCirI+mWaqu1unheDIkwK/Cu3zj/IwLJaZl1o1Xa6MQhADDSjlPv2QkwpTvRtBHQ NHQDLkXyA73PHxzlqU9CSzwsGYkrRdsRxCYfpVVQbkFl32ufMP0oRLqjQtdxKWDFfHRnko8nT1xeV iD8LPDKQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIyxn-00026a-EC; Mon, 30 Mar 2020 18:16:43 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIyxh-00021C-4d for linux-rockchip@lists.infradead.org; Mon, 30 Mar 2020 18:16:39 +0000 Received: by mail-pj1-x1043.google.com with SMTP id q16so93536pje.1 for ; Mon, 30 Mar 2020 11:16:36 -0700 (PDT) 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; bh=gvUS8A/eL7b7o1g6E1PL+fAftkvIDyBq1evUjTl0k/Q=; b=fRsHvCK3eCxwlchVxl+OqTDyU2fSMlNiT6P0Z3g2iayOCydVeHdOmOxiJ1MG5Kn2YO 5DVCgBwkzDbuKxQq/rPvKHZV0hSSWsMOtv6/UGU0/RtLUj+9qQtEZVc8USt1x+zF8l+e pDKvCXkjWIyJ8Cuidx49zgysGq9yYvkrEXANs= 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; bh=gvUS8A/eL7b7o1g6E1PL+fAftkvIDyBq1evUjTl0k/Q=; b=tRTdSJQbP7/nsOcjg0LcbZy0rfJBcSFWxHtrxjLYzke4WHzEQ8JVcoxjj5+lalkQpn aCWPz4bsH8TXuhOWz3f01NmMwR2EC3vf0k00i3P5jsnMSu0mfKhy/c1iasjtGlt56Quk 1lhU2Nxq4j3voTdkFKmL0LXrOEH43AbG7iySZQjZaXkGE7PoJEO0GFRw5WBcpQtZQPO+ REW0QZP3DcKlC3IHovaSu9XsXHDi7FrExHIUsv1OLTqLJ++5JHZ6yLJOos60lQ+aR9Ch jJGQc5VbWQbLJD5o4INesL36zLrkiAw0lx2KkUbSt17v385476gGhPT6fWq9FNI4Qd7p /6CA== X-Gm-Message-State: AGi0PubQ1jS0mpZvqTAEdtFVLlQOcKJQG3+QBV0y1IHZgC7jKZ/L8G7u teVYPgOVe2/9o4X+y8Vs5qpXog== X-Google-Smtp-Source: APiQypIbr/vUdHuVOSfoh3sDe1PUR+cXSVSIzp4Pfb3b+8NcqeoqwqX/h8P2ELoz9LJQrkt1RHRKGQ== X-Received: by 2002:a17:902:b682:: with SMTP id c2mr354882pls.36.1585592196301; Mon, 30 Mar 2020 11:16:36 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:b95e:3742:c972:389e]) by smtp.gmail.com with ESMTPSA id p7sm207452pjp.1.2020.03.30.11.16.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 11:16:35 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich , Anatolij Gustschin Subject: [PATCH v2 3/4] rockchip: Enable pre console for rk3399 Date: Mon, 30 Mar 2020 23:46:12 +0530 Message-Id: <20200330181613.29462-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200330181613.29462-1-jagan@amarulasolutions.com> References: <20200330181613.29462-1-jagan@amarulasolutions.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200330_111637_233994_B32E8DBD X-CRM114-Status: GOOD ( 10.18 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1043 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , sunil@amarulasolutions.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Enable pre console buffer for rk3399 platform. This would help to capture the console messages prior to the console being initialised. Enabling this would help to capture all the console messages on video output source like HDMI. So we can find the full console messages of U-Boot proper on HDMI display when enabled it for RK3399 platform boards. Buffer address used for pre console is 0x0f200000 which is ram base plus 240MiB. right now the Allwinner SoC is using similar computation. Signed-off-by: Jagan Teki --- Changes for v2: - none arch/arm/mach-rockchip/Kconfig | 1 + common/Kconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index ed7514ab75..0cb1f23d0f 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -229,6 +229,7 @@ config ROCKCHIP_RK3399 select DM_PMIC select DM_REGULATOR_FIXED select BOARD_LATE_INIT + imply PRE_CONSOLE_BUFFER imply ROCKCHIP_COMMON_BOARD imply ROCKCHIP_SDRAM_COMMON imply SPL_ROCKCHIP_COMMON_BOARD diff --git a/common/Kconfig b/common/Kconfig index 46e4193fc8..bd35de3056 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -568,6 +568,7 @@ config PRE_CON_BUF_ADDR default 0x2f000000 if ARCH_SUNXI && MACH_SUN9I default 0x4f000000 if ARCH_SUNXI && !MACH_SUN9I default 0x0f000000 if ROCKCHIP_RK3288 + default 0x0f200000 if ROCKCHIP_RK3399 help This sets the start address of the pre-console buffer. This must be in available memory and is accessed before relocation and From patchwork Mon Mar 30 18:16:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11466203 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 E0020913 for ; Mon, 30 Mar 2020 18:16:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BDBBE206F6 for ; Mon, 30 Mar 2020 18:16:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="J0XqvlwK"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="G5Jb1WTO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDBBE206F6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BgdIo2VAZAnVYxRgdzdl38AmATjuLHOen/c/qgp6rh4=; b=J0XqvlwKy18fkr9gpq7MYDff8g Gv7FHVt3Rnxhsd4OhmCo+bTDqKH0Dswav7xHFjVKe+N2YsBM9sBfLCGi1FmsRc5gljna4jbwQGU8C OG3LzBPvGY+Pjkv3UW9dadXmSzz3/RIjv16yQxeJtXBE/JWyClPBt8UkqOysucraZ1TQlY0wWkW5Z 2DLYWT2RnX7A0uuE4IavNbUOKjbBXyCvuLLOFLb/4Xs1oRCtDaJDXbN4KWx1EMoK3J6I081Osxyq0 dA/E8lLWcFnxVfWOz0MVjLeTg0Tt5UG/KSKWKUS7Ylxi+7V2d0V6zeym5kHbIsEEc7fv+VZunlBCN PsTqhbdw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIyxq-0002Ar-B6; Mon, 30 Mar 2020 18:16:46 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIyxl-00024M-AC for linux-rockchip@lists.infradead.org; Mon, 30 Mar 2020 18:16:43 +0000 Received: by mail-pl1-x636.google.com with SMTP id t4so1094029plq.12 for ; Mon, 30 Mar 2020 11:16:41 -0700 (PDT) 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; bh=mbP8yTk1wDXX6Om+l/BmnhYz0CyI1FvoE9vWahYLyqA=; b=G5Jb1WTO5408/JpaNLycLIGh1E153essh/4TjchItGq2cVb7l4NBl57pF5n8P+82jo t98bwiDYomK1WLUvyIg+RGe6EcfKaFGtFoQmqEDiBH7Enzd1AwVhnqxRC8ZJIMOO0veE /mu8AR/+qT4pFbbDFG8IUHiTTPcqO7y3yD8Rk= 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; bh=mbP8yTk1wDXX6Om+l/BmnhYz0CyI1FvoE9vWahYLyqA=; b=rp5GKVZ/Y4uTZTpzne+Nv6xcLv9IbqJ6uLD6jsGAZCKgrr/BPL0XZLI1Rrfv53pfhS WPzNRzU8qaumXj6pNBkt3EpFVQkxwYYLYMXJ5dRy7k6jHsrKNc30v7r76k0rbNpGx7+2 xJvTldWNnvm0uKL45k9tYcQbkbf7FPTRt5F3vfg3E2naMxjzUhPGKZTADBLVGLLu99sl FuSSnfuzwdag6sA775FM8zDQtHI8tfaMlGRZwW4Zue8bDm7eSMWOFlYDE7vkR6bsU5pg X93xYkHUWodD6a1yNDOwNCXqBdpGP2YjUZTDT4XZFpGdV69Bc2V4zjU7vtViCXJYzUAd 3DKg== X-Gm-Message-State: AGi0PubEMzZfeCZRvDHLVD+DTJaneb6gOPgHeriupXopn9pTYVP8YQPd j1q8GPa3CURvZlUtoeDdKfrB7w== X-Google-Smtp-Source: APiQypJ81e+fixgUS2bF3LlLyuQmiIKwmBf9btwAMYYqfM1J64E5ZDmAmkiEGrol/dV7WVg/Ob05tQ== X-Received: by 2002:a17:90a:c583:: with SMTP id l3mr713589pjt.84.1585592200261; Mon, 30 Mar 2020 11:16:40 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:b95e:3742:c972:389e]) by smtp.gmail.com with ESMTPSA id p7sm207452pjp.1.2020.03.30.11.16.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 11:16:39 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich , Anatolij Gustschin Subject: [PATCH v2 4/4] rockchip: Enable HDMI output on rk3399 board w/ HDMI Date: Mon, 30 Mar 2020 23:46:13 +0530 Message-Id: <20200330181613.29462-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200330181613.29462-1-jagan@amarulasolutions.com> References: <20200330181613.29462-1-jagan@amarulasolutions.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200330_111641_587699_62BCF28F X-CRM114-Status: UNSURE ( 8.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:636 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , sunil@amarulasolutions.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Enable config options and console setting to respective rk3399 board for HDMI output. Boards supported and tested on this patch are: - NanoPc T4 - NanoPi M4 - NanoPi Neo4 - ROC-RK3399-PC Signed-off-by: Jagan Teki --- Changes for v2: - use usbkbd in stdin - enable USB_KEYBOARD configs/nanopc-t4-rk3399_defconfig | 7 +++++++ configs/nanopi-m4-rk3399_defconfig | 7 +++++++ configs/nanopi-neo4-rk3399_defconfig | 7 +++++++ configs/roc-pc-rk3399_defconfig | 6 ++++++ include/configs/evb_rk3399.h | 5 +++++ 5 files changed, 32 insertions(+) diff --git a/configs/nanopc-t4-rk3399_defconfig b/configs/nanopc-t4-rk3399_defconfig index 9ea9b11574..607a00dbf7 100644 --- a/configs/nanopc-t4-rk3399_defconfig +++ b/configs/nanopc-t4-rk3399_defconfig @@ -52,5 +52,12 @@ CONFIG_USB_ETHER_ASIX88179=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_USB_KEYBOARD=y CONFIG_SPL_TINY_MEMSET=y CONFIG_ERRNO_STR=y +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_BPP16=y +CONFIG_VIDEO_BPP32=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_DISPLAY_ROCKCHIP_HDMI=y diff --git a/configs/nanopi-m4-rk3399_defconfig b/configs/nanopi-m4-rk3399_defconfig index ad0e808bf6..3fcb7ac2d7 100644 --- a/configs/nanopi-m4-rk3399_defconfig +++ b/configs/nanopi-m4-rk3399_defconfig @@ -52,5 +52,12 @@ CONFIG_USB_ETHER_ASIX88179=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_USB_KEYBOARD=y CONFIG_SPL_TINY_MEMSET=y CONFIG_ERRNO_STR=y +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_BPP16=y +CONFIG_VIDEO_BPP32=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_DISPLAY_ROCKCHIP_HDMI=y diff --git a/configs/nanopi-neo4-rk3399_defconfig b/configs/nanopi-neo4-rk3399_defconfig index d038a8cab9..b9ea535e43 100644 --- a/configs/nanopi-neo4-rk3399_defconfig +++ b/configs/nanopi-neo4-rk3399_defconfig @@ -52,5 +52,12 @@ CONFIG_USB_ETHER_ASIX88179=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_USB_KEYBOARD=y CONFIG_SPL_TINY_MEMSET=y CONFIG_ERRNO_STR=y +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_BPP16=y +CONFIG_VIDEO_BPP32=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_DISPLAY_ROCKCHIP_HDMI=y diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index d540a17aeb..be76524cef 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -59,3 +59,9 @@ CONFIG_USB_ETHER_SMSC95XX=y CONFIG_USB_KEYBOARD=y CONFIG_SPL_TINY_MEMSET=y CONFIG_ERRNO_STR=y +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_BPP16=y +CONFIG_VIDEO_BPP32=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_DISPLAY_ROCKCHIP_HDMI=y diff --git a/include/configs/evb_rk3399.h b/include/configs/evb_rk3399.h index c0b0358893..2d3db22877 100644 --- a/include/configs/evb_rk3399.h +++ b/include/configs/evb_rk3399.h @@ -6,6 +6,11 @@ #ifndef __EVB_RK3399_H #define __EVB_RK3399_H +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdin=serial,usbkbd\0" \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + #include #if defined(CONFIG_ENV_IS_IN_MMC)