From patchwork Wed Feb 26 17:15:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245198 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=MTd7d9+E; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMsG6x9Tz9sPK for ; Thu, 27 Feb 2020 04:16:18 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7A8DE804CD; Wed, 26 Feb 2020 18:16:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="MTd7d9+E"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4852C80A03; Wed, 26 Feb 2020 18:16:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, URIBL_BLOCKED, URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11116.aruba.it (smtpcmd11116.aruba.it [62.149.156.116]) by phobos.denx.de (Postfix) with ESMTP id BCB40804CD for ; Wed, 26 Feb 2020 18:16:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG3hf; Wed, 26 Feb 2020 18:16:03 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 01/18] clk: imx: pllv3: add enable_bit Date: Wed, 26 Feb 2020 18:15:44 +0100 Message-Id: <20200226171601.31142-2-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737363; bh=UuAwG0ifQvGIlxaFplwCalRNIDhqRRoHdqD4SYQsAQM=; h=From:To:Subject:Date:MIME-Version; b=MTd7d9+EPicZssTdMMZfUU9BA0X3IFdMC2chcSXLsqmjf5Xo4E0pbqfF5ee74GyI1 38TqHjZ2tzl/5xhzSf3Ej7wH1L9FJGztQIZ7qz5qXZ48F6I4TrMECM+GHpYoYihb6V bVUrv/mzfd0BHkNluV0K9o0mBHmczo7ttAs4L8+hcXQ3ClztJGVHM1AqvxJBEHKsj5 PAKK+Txob0CqKTahP2/90ELP7v5djQxajjGG+SyuUl+hDSLMdvubkXrIBbEe99kx++ sv/hg1dREueSSdwsF5kmm6fC123RNa75uU9ZfGHxnhdWYIU4HIFBCK5a+q8a7KZArV W8TGTHndaJkpg== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean pllv3 PLLs have powerdown/up bits but enable bits too. Specifically "enable bit" enable the pll output, so when dis/enabling pll by setting/clearing power_bit we must also set/clear enable_bit. Signed-off-by: Giulio Benetti Reviewed-by: Lukasz Majewski --- drivers/clk/imx/clk-pllv3.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c index 525442debf..b4a9d587e1 100644 --- a/drivers/clk/imx/clk-pllv3.c +++ b/drivers/clk/imx/clk-pllv3.c @@ -25,6 +25,7 @@ #define PLL_DENOM_OFFSET 0x20 #define BM_PLL_POWER (0x1 << 12) +#define BM_PLL_ENABLE (0x1 << 13) #define BM_PLL_LOCK (0x1 << 31) struct clk_pllv3 { @@ -32,6 +33,7 @@ struct clk_pllv3 { void __iomem *base; u32 power_bit; bool powerup_set; + u32 enable_bit; u32 div_mask; u32 div_shift; }; @@ -83,6 +85,9 @@ static int clk_pllv3_generic_enable(struct clk *clk) val |= pll->power_bit; else val &= ~pll->power_bit; + + val |= pll->enable_bit; + writel(val, pll->base); return 0; @@ -98,6 +103,9 @@ static int clk_pllv3_generic_disable(struct clk *clk) val &= ~pll->power_bit; else val |= pll->power_bit; + + val &= ~pll->enable_bit; + writel(val, pll->base); return 0; @@ -238,6 +246,7 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, return ERR_PTR(-ENOMEM); pll->power_bit = BM_PLL_POWER; + pll->enable_bit = BM_PLL_ENABLE; switch (type) { case IMX_PLLV3_GENERIC: From patchwork Wed Feb 26 17:15:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245200 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=MtmlQj6U; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMsl4M2Lz9sP7 for ; Thu, 27 Feb 2020 04:16:43 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 02D338065D; Wed, 26 Feb 2020 18:16:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="MtmlQj6U"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4DCED80E7E; Wed, 26 Feb 2020 18:16:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, URIBL_BLOCKED, URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11116.aruba.it (smtpcmd11116.aruba.it [62.149.156.116]) by phobos.denx.de (Postfix) with ESMTP id EB0B880257 for ; Wed, 26 Feb 2020 18:16:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG3hw; Wed, 26 Feb 2020 18:16:03 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 02/18] clk: imx: imxrt1050-clk: fix typo in clock name "video:" Date: Wed, 26 Feb 2020 18:15:45 +0100 Message-Id: <20200226171601.31142-3-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737363; bh=J0/Vr9m39GZD6kvBMevwPsn2btVD6g5cprD5CM+lRAw=; h=From:To:Subject:Date:MIME-Version; b=MtmlQj6Ub2NmWaaNcVUkQJGev1TcnYO0AZBBG4/PCsdYMkmv17+tJFZYW9GcNaUbp oD2y8DtjEh4fZ+gM16AKy5/n9l29cghknjlRiTqp3UZJOOMSf5s2AesMxmtwapL7pH U66NofZ+u47Go89G1CfdzqUP78hhSlqxAdxDLKenKR/62HGrbr2i3FgSF3+dEnlHOV FXFiOMr8q+MVZrrqK9Oa5M30hW7luc7MgUsKyCLO830CRFvYxOSmc4l9jNAAM76tMK z65Xn16itX1k12lAmwfXtKw5zPN4iGN5ZKcsTK0xIGl/J4aIWSOw0Td04xvANkTDOx k49ifLi5HDFbQ== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean "video:" must be "video", ":" is a typo. Signed-off-by: Giulio Benetti Reviewed-by: Lukasz Majewski --- drivers/clk/imx/clk-imxrt1050.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imxrt1050.c b/drivers/clk/imx/clk-imxrt1050.c index 44ca52c013..e33d426363 100644 --- a/drivers/clk/imx/clk-imxrt1050.c +++ b/drivers/clk/imx/clk-imxrt1050.c @@ -90,7 +90,7 @@ static const char *const usdhc_sels[] = { "pll2_pfd2_396m", "pll2_pfd0_352m", }; static const char *const lpuart_sels[] = { "pll3_80m", "osc", }; static const char *const semc_alt_sels[] = { "pll2_pfd2_396m", "pll3_pfd1_664_62m", }; static const char *const semc_sels[] = { "periph_sel", "semc_alt_sel", }; -static const char *const lcdif_sels[] = { "pll2_sys", "pll3_pfd3_454_74m", "pll5_video:", "pll2_pfd0_352m", "pll2_pfd1_594m", "pll3_pfd1_664_62m"}; +static const char *const lcdif_sels[] = { "pll2_sys", "pll3_pfd3_454_74m", "pll5_video", "pll2_pfd0_352m", "pll2_pfd1_594m", "pll3_pfd1_664_62m"}; static int imxrt1050_clk_probe(struct udevice *dev) { From patchwork Wed Feb 26 17:15:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245203 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=gunBHH1L; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMtQ2hFsz9sP7 for ; Thu, 27 Feb 2020 04:17:18 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 59E048101A; Wed, 26 Feb 2020 18:16:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="gunBHH1L"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AD18780911; Wed, 26 Feb 2020 18:16:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, URIBL_BLOCKED, URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11116.aruba.it (smtpcmd11116.aruba.it [62.149.156.116]) by phobos.denx.de (Postfix) with ESMTP id 172DB80369 for ; Wed, 26 Feb 2020 18:16:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG3iD; Wed, 26 Feb 2020 18:16:03 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 03/18] clk: imx: clk-imxrt1050: setup PLL5 for video in non-SPL Date: Wed, 26 Feb 2020 18:15:46 +0100 Message-Id: <20200226171601.31142-4-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737363; bh=1nC52sdtUaD6SHI18iNPzKp2jlM3mScd17BexYdmFyo=; h=From:To:Subject:Date:MIME-Version; b=gunBHH1LZHsW2mXzcdMj0lolfL9k6urx9I/ihkjiQYp0KNNLKShBoBjFrwd2Kqqpz CYINjGPvLSZXE8PnLYD7a56uB/fid0tkh7Bd3NWQjjL1OGGXe4bt5Zb/eyuh1Ca7K1 gA1GIYfB5uqmx0AzRMbteWyYjrShVja5auDlE2QhYQz45XVZ3n1ywQaSEPdI2WITZ/ xqgvCie5InOeqg/1RW+tn2FUk24bmSvtCb8W/AR6yZad55Y5yjIKPzr6ZXw9bFcBXL B8NzEStd8VPHrDffgNApv+MvI83ldJ7uZ/Q/9GkWDnNacJ0dqJQ8Z329m2jXE73t0H Y6CRG9bxD5low== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean mxsfb needs PLL5 as source, so let's setup it and set it as source for mxsfb(lcdif). Signed-off-by: Giulio Benetti Reviewed-by: Lukasz Majewski --- drivers/clk/imx/clk-imxrt1050.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imxrt1050.c b/drivers/clk/imx/clk-imxrt1050.c index e33d426363..2819ffb9ac 100644 --- a/drivers/clk/imx/clk-imxrt1050.c +++ b/drivers/clk/imx/clk-imxrt1050.c @@ -238,9 +238,9 @@ static int imxrt1050_clk_probe(struct udevice *dev) clk_dm(IMXRT1050_CLK_LCDIF, imx_clk_gate2("lcdif", "lcdif_podf", base + 0x70, 28)); -#ifdef CONFIG_SPL_BUILD struct clk *clk, *clk1; +#ifdef CONFIG_SPL_BUILD /* bypass pll1 before setting its rate */ clk_get_by_id(IMXRT1050_CLK_PLL1_REF_SEL, &clk); clk_get_by_id(IMXRT1050_CLK_PLL1_BYPASS, &clk1); @@ -271,7 +271,18 @@ static int imxrt1050_clk_probe(struct udevice *dev) clk_get_by_id(IMXRT1050_CLK_PLL3_BYPASS, &clk1); clk_set_parent(clk1, clk); +#else + /* Set PLL5 for LCDIF to its default 650Mhz */ + clk_get_by_id(IMXRT1050_CLK_PLL5_VIDEO, &clk); + clk_enable(clk); + clk_set_rate(clk, 650000000UL); + + clk_get_by_id(IMXRT1050_CLK_PLL5_BYPASS, &clk1); + clk_set_parent(clk1, clk); + /* Configure PLL5 as LCDIF source */ + clk_get_by_id(IMXRT1050_CLK_LCDIF_SEL, &clk1); + clk_set_parent(clk1, clk); #endif return 0; From patchwork Wed Feb 26 17:15:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245201 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=FFv7t8HL; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMst51n5z9sPK for ; Thu, 27 Feb 2020 04:16:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 80AFF80829; Wed, 26 Feb 2020 18:16:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="FFv7t8HL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BA4E480D34; Wed, 26 Feb 2020 18:16:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, URIBL_BLOCKED, URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11116.aruba.it (smtpcmd11116.aruba.it [62.149.156.116]) by phobos.denx.de (Postfix) with ESMTP id 46FC980386 for ; Wed, 26 Feb 2020 18:16:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG3iW; Wed, 26 Feb 2020 18:16:03 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 04/18] videomodes: add helper function to convert from ctfb to display_timing Date: Wed, 26 Feb 2020 18:15:47 +0100 Message-Id: <20200226171601.31142-5-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737363; bh=Wad1K4IHpzHBiTMJi6YLRLxhGJHIW5PVMZ2S2gd+p+U=; h=From:To:Subject:Date:MIME-Version; b=FFv7t8HLuyaMiqLp0tdCJZnLOSdjcbEGsThVi0gb87UeZACP3hz+Gfyqi1V/jzXN2 2PrdKqLCf9kAYJMF/5uHNEDs9RpSLwsS7ow4D6E+0WmA3MGEFQY4VAeCG1jhRzdT/h Ku8KDZggtFbJDlPLoepko7njtF+cljimKNJFPRidUZIHJd+XIdT+4D5TwWXTdOwqQT ldYCgko1joA/Tvd2GEDnoFIRAKojSbhIg5u4KtpXlq78xruPCT00zhsvOPK8oItRfe 97qXLiDf+6yyUPMap0Qzg5M6a/i+LKgH8rfRFz/FoOPK9QD0tYLgwfv0256kE0EnSP grrTUDEa+9psQ== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This function converts from "struct ctf_res_modes" to "struct display_timing". Signed-off-by: Giulio Benetti --- drivers/video/videomodes.c | 29 +++++++++++++++++++++++++++++ drivers/video/videomodes.h | 3 +++ 2 files changed, 32 insertions(+) diff --git a/drivers/video/videomodes.c b/drivers/video/videomodes.c index ac25b45f81..89003eea72 100644 --- a/drivers/video/videomodes.c +++ b/drivers/video/videomodes.c @@ -444,3 +444,32 @@ int video_edid_dtd_to_ctfb_res_modes(struct edid_detailed_timing *t, return 0; } + +void video_ctfb_mode_to_display_timing(const struct ctfb_res_modes *mode, + struct display_timing *timing) +{ + timing->pixelclock.typ = mode->pixclock_khz * 1000; + + timing->hactive.typ = mode->xres; + timing->hfront_porch.typ = mode->right_margin; + timing->hback_porch.typ = mode->left_margin; + timing->hsync_len.typ = mode->hsync_len; + + timing->vactive.typ = mode->yres; + timing->vfront_porch.typ = mode->lower_margin; + timing->vback_porch.typ = mode->upper_margin; + timing->vsync_len.typ = mode->vsync_len; + + timing->flags = 0; + + if (mode->sync & FB_SYNC_HOR_HIGH_ACT) + timing->flags |= DISPLAY_FLAGS_HSYNC_HIGH; + else + timing->flags |= DISPLAY_FLAGS_HSYNC_LOW; + if (mode->sync & FB_SYNC_VERT_HIGH_ACT) + timing->flags |= DISPLAY_FLAGS_VSYNC_HIGH; + else + timing->flags |= DISPLAY_FLAGS_VSYNC_LOW; + if (mode->vmode == FB_VMODE_INTERLACED) + timing->flags |= DISPLAY_FLAGS_INTERLACED; +} diff --git a/drivers/video/videomodes.h b/drivers/video/videomodes.h index 29a3db4ae3..6713f96d19 100644 --- a/drivers/video/videomodes.h +++ b/drivers/video/videomodes.h @@ -92,3 +92,6 @@ int video_get_option_int(const char *options, const char *name, int def); int video_edid_dtd_to_ctfb_res_modes(struct edid_detailed_timing *t, struct ctfb_res_modes *mode); + +void video_ctfb_mode_to_display_timing(const struct ctfb_res_modes *mode, + struct display_timing *timing); From patchwork Wed Feb 26 17:15:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245202 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=gpsHr/CR; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMt83z2wz9sP7 for ; Thu, 27 Feb 2020 04:17:04 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A127B80E7E; Wed, 26 Feb 2020 18:16:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="gpsHr/CR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9026880A03; Wed, 26 Feb 2020 18:16:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, URIBL_BLOCKED, URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11116.aruba.it (smtpcmd11116.aruba.it [62.149.156.116]) by phobos.denx.de (Postfix) with ESMTP id 4097080592 for ; Wed, 26 Feb 2020 18:16:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG3im; Wed, 26 Feb 2020 18:16:04 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 05/18] sunxi: display: use common video_ctfb_mode_to_display_timing() Date: Wed, 26 Feb 2020 18:15:48 +0100 Message-Id: <20200226171601.31142-6-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737364; bh=jPZ67XyvfIfPDqTmvZrEAT32kqMwQ3j/HUgbudFCIqM=; h=From:To:Subject:Date:MIME-Version; b=gpsHr/CRi8KTUEONHBp1nDIs1QhTujN15o1LR89LmrVZp88GpJUaTmCAH5lJ6UZHa b7bDYNylnKDgsviZ536rmfVFoLgzEaZMfwdeZI41jSVtAoyxFRzwtIYjmVvgHJz8jm O1bEtgJwc4CFKoOWDEsFDJEl7r0nf+TYyFMVevI9x3A5/To06SNhdRvwtNG4iLzFV5 gjJSC/RQWhB/OfZmNXQa+S5FA+fZc4zoJKfj5iWbRECvpj1yPd5L2+DHSbZ1fVaATC X7Lk08MVcLVIb8GS8F6H7rUYyLX/rMDHHGF1NUrilk0523NYOwJx7XeDDAwsD4nQ91 YXYh1E5Rx6tGg== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Since video_ctfb_mode_to_display_timing() has been implemented by moving sunxi_ctfb_mode_to_display_timing() to video_modes.c and it's meant to be used by other video subsystem, let's use it instead of local sunxi_ctfb_mode_to_display_timing(). Signed-off-by: Giulio Benetti --- drivers/video/sunxi/sunxi_display.c | 33 ++--------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c index 31f0aa7ddc..a6a62c83ef 100644 --- a/drivers/video/sunxi/sunxi_display.c +++ b/drivers/video/sunxi/sunxi_display.c @@ -615,35 +615,6 @@ static void sunxi_lcdc_backlight_enable(void) gpio_direction_output(pin, PWM_ON); } -static void sunxi_ctfb_mode_to_display_timing(const struct ctfb_res_modes *mode, - struct display_timing *timing) -{ - timing->pixelclock.typ = mode->pixclock_khz * 1000; - - timing->hactive.typ = mode->xres; - timing->hfront_porch.typ = mode->right_margin; - timing->hback_porch.typ = mode->left_margin; - timing->hsync_len.typ = mode->hsync_len; - - timing->vactive.typ = mode->yres; - timing->vfront_porch.typ = mode->lower_margin; - timing->vback_porch.typ = mode->upper_margin; - timing->vsync_len.typ = mode->vsync_len; - - timing->flags = 0; - - if (mode->sync & FB_SYNC_HOR_HIGH_ACT) - timing->flags |= DISPLAY_FLAGS_HSYNC_HIGH; - else - timing->flags |= DISPLAY_FLAGS_HSYNC_LOW; - if (mode->sync & FB_SYNC_VERT_HIGH_ACT) - timing->flags |= DISPLAY_FLAGS_VSYNC_HIGH; - else - timing->flags |= DISPLAY_FLAGS_VSYNC_LOW; - if (mode->vmode == FB_VMODE_INTERLACED) - timing->flags |= DISPLAY_FLAGS_INTERLACED; -} - static void sunxi_lcdc_tcon0_mode_set(const struct ctfb_res_modes *mode, bool for_ext_vga_dac) { @@ -673,7 +644,7 @@ static void sunxi_lcdc_tcon0_mode_set(const struct ctfb_res_modes *mode, lcdc_pll_set(ccm, 0, mode->pixclock_khz, &clk_div, &clk_double, sunxi_is_composite()); - sunxi_ctfb_mode_to_display_timing(mode, &timing); + video_ctfb_mode_to_display_timing(mode, &timing); lcdc_tcon0_mode_set(lcdc, &timing, clk_div, for_ext_vga_dac, sunxi_display.depth, CONFIG_VIDEO_LCD_DCLK_PHASE); } @@ -689,7 +660,7 @@ static void sunxi_lcdc_tcon1_mode_set(const struct ctfb_res_modes *mode, (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; struct display_timing timing; - sunxi_ctfb_mode_to_display_timing(mode, &timing); + video_ctfb_mode_to_display_timing(mode, &timing); lcdc_tcon1_mode_set(lcdc, &timing, use_portd_hvsync, sunxi_is_composite()); From patchwork Wed Feb 26 17:15:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245204 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=DGRo9gXM; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMtg0Q2yz9sP7 for ; Thu, 27 Feb 2020 04:17:31 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2D81980561; Wed, 26 Feb 2020 18:16:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="DGRo9gXM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D3DE080D3F; Wed, 26 Feb 2020 18:16:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, URIBL_BLOCKED, URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11116.aruba.it (smtpcmd11116.aruba.it [62.149.156.116]) by phobos.denx.de (Postfix) with ESMTP id 72F2380396 for ; Wed, 26 Feb 2020 18:16:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG4iy; Wed, 26 Feb 2020 18:16:04 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 06/18] video: mxsfb: add support for DM CLK Date: Wed, 26 Feb 2020 18:15:49 +0100 Message-Id: <20200226171601.31142-7-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737364; bh=EYbr9qIvRYJ3JN5B4PG1v15Yuj77/dd9uk3IhBjOYfs=; h=From:To:Subject:Date:MIME-Version; b=DGRo9gXMUve6BS3+AYtZoLPh88AaWYKGjNoYxJymXyY0woggFVKaXXD823TwaPQRu blH27axv8OFBvdkZc2rg7/rHxR2FR8f1A+SOVqfeO63PK0mHMyYXGuG1CvJE/qdmxT NCM4MFoXtbp/RAnb366eDUYGrbWL4GY3DgvERXdt5DTFEcbtUDjqjIWhKC8dK8df6H grnvBVZRiBkttUO/gO3iUQfPIGl9YFyFLG7lrX1er2WTQ/k5dLfQv/3o6AjVNQ8i34 pDBnVzMpTcc9/QaEL+0GdxWdEE10E0jSdao8cVfyc6wyxztH5bdkhdoMB2hQa0bAXU kenBk0guCBeLQ== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Allow using DM CLK instead of mxs_set_lcdclk() so we can avoid to implement a special function to set lcd clock on i.MXRT. Signed-off-by: Giulio Benetti --- drivers/video/mxsfb.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 585af3d571..f21f8247d9 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -5,6 +5,7 @@ * Copyright (C) 2011-2013 Marek Vasut */ #include +#include #include #include #include @@ -52,14 +53,32 @@ __weak void mxsfb_system_setup(void) * le:89,ri:164,up:23,lo:10,hs:10,vs:10,sync:0,vmode:0 */ -static void mxs_lcd_init(u32 fb_addr, struct ctfb_res_modes *mode, int bpp) +static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, + struct ctfb_res_modes *mode, int bpp) { struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE; uint32_t word_len = 0, bus_width = 0; uint8_t valid_data = 0; +#if CONFIG_IS_ENABLED(CLK) + struct clk per_clk; + int ret; + + ret = clk_get_by_name(dev, "per", &per_clk); + if (ret) { + dev_err(dev, "Failed to get mxs clk: %d\n", ret); + return; + } + + ret = clk_set_rate(&per_clk, PS2KHZ(mode->pixclock) * 1000); + if (ret < 0) { + dev_err(dev, "Failed to set mxs clk: %d\n", ret); + return; + } +#else /* Kick in the LCDIF clock */ mxs_set_lcdclk(MXS_LCDIF_BASE, PS2KHZ(mode->pixclock)); +#endif /* Restart the LCDIF block */ mxs_reset_block(®s->hw_lcdif_ctrl_reg); @@ -135,10 +154,11 @@ static void mxs_lcd_init(u32 fb_addr, struct ctfb_res_modes *mode, int bpp) writel(LCDIF_CTRL_RUN, ®s->hw_lcdif_ctrl_set); } -static int mxs_probe_common(struct ctfb_res_modes *mode, int bpp, u32 fb) +static int mxs_probe_common(struct udevice *dev, struct ctfb_res_modes *mode, + int bpp, u32 fb) { /* Start framebuffer */ - mxs_lcd_init(fb, mode, bpp); + mxs_lcd_init(dev, fb, mode, bpp); #ifdef CONFIG_VIDEO_MXS_MODE_SYSTEM /* @@ -260,7 +280,7 @@ void *video_hw_init(void) printf("%s\n", panel.modeIdent); - ret = mxs_probe_common(&mode, bpp, (u32)fb); + ret = mxs_probe_common(NULL, &mode, bpp, (u32)fb); if (ret) goto dealloc_fb; @@ -337,7 +357,7 @@ static int mxs_video_probe(struct udevice *dev) mode.vsync_len = timings.vsync_len.typ; mode.pixclock = HZ2PS(timings.pixelclock.typ); - ret = mxs_probe_common(&mode, bpp, plat->base); + ret = mxs_probe_common(dev, &mode, bpp, plat->base); if (ret) return ret; From patchwork Wed Feb 26 17:15:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245206 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=g555xgz6; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMv91nsqz9sPK for ; Thu, 27 Feb 2020 04:17:57 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DF3F1811F0; Wed, 26 Feb 2020 18:16:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="g555xgz6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 04ACA80D34; Wed, 26 Feb 2020 18:16:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, URIBL_BLOCKED, URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11116.aruba.it (smtpcmd11116.aruba.it [62.149.156.116]) by phobos.denx.de (Postfix) with ESMTP id A9B588050F for ; Wed, 26 Feb 2020 18:16:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG4jC; Wed, 26 Feb 2020 18:16:04 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 07/18] video: mxsfb: add support for i.MXRT Date: Wed, 26 Feb 2020 18:15:50 +0100 Message-Id: <20200226171601.31142-8-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737364; bh=Lz/myK3l2RYpSg+84IzqkT9TXJSBEZ4VJ1IcLHcSy6U=; h=From:To:Subject:Date:MIME-Version; b=g555xgz6SKGKq3gqhllEeRnRp3wLqo2gh8a8CPofa/5onskVr8MlBSGEtAYgRUeAY rzaz5YOvooFryY8jDqi5e41gS+QA3dNyQFI1ESK3Nj8RxiZCOWcqacSmH4sR26cW7O NXMDjdqsIDRq7x0FKhfgNmbm9k/s8B8chedRlKTsVUpeQfkebsyXOCJ5j1+u70Hr83 LJ6/bx3p6uxYUBu1grsDdQL06M60nBlp16e0wtLk6RDz4qmvMPE5cVRoC8K312Bvfq DEcI1ok8CoGWnJCiYZbQUUmzilL5eNhvJRppI0Ll7JPzw8v5h9COfsIB3rKpqcMOll 3teYBbtlP6w5w== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Add support for i.MXRT by adding CONFIG_IMXRT in register structure and adding .compatible = "fsl,imxrt-lcdif". Signed-off-by: Giulio Benetti --- arch/arm/include/asm/arch-imxrt/imx-regs.h | 6 ++++++ arch/arm/include/asm/mach-imx/regs-lcdif.h | 6 +++--- drivers/video/mxsfb.c | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-imxrt/imx-regs.h b/arch/arm/include/asm/arch-imxrt/imx-regs.h index 4f1d439f6f..44c95dcd11 100644 --- a/arch/arm/include/asm/arch-imxrt/imx-regs.h +++ b/arch/arm/include/asm/arch-imxrt/imx-regs.h @@ -17,4 +17,10 @@ #define ANATOP_BASE_ADDR 0x400d8000 +#define MXS_LCDIF_BASE 0x402b8000 + +#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) +#include +#endif + #endif /* __ASM_ARCH_IMX_REGS_H__ */ diff --git a/arch/arm/include/asm/mach-imx/regs-lcdif.h b/arch/arm/include/asm/mach-imx/regs-lcdif.h index b4c430a35c..5874638796 100644 --- a/arch/arm/include/asm/mach-imx/regs-lcdif.h +++ b/arch/arm/include/asm/mach-imx/regs-lcdif.h @@ -22,7 +22,7 @@ struct mxs_lcdif_regs { defined(CONFIG_MX6SL) || defined(CONFIG_MX6SLL) || \ defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL) || \ defined(CONFIG_MX7) || defined(CONFIG_MX7ULP) || \ - defined(CONFIG_IMX8M) + defined(CONFIG_IMX8M) || defined(CONFIG_IMXRT) mxs_reg_32(hw_lcdif_ctrl2) /* 0x20 */ #endif mxs_reg_32(hw_lcdif_transfer_count) /* 0x20/0x30 */ @@ -49,7 +49,7 @@ struct mxs_lcdif_regs { mxs_reg_32(hw_lcdif_csc_coeffctrl2) /* 0x130 */ mxs_reg_32(hw_lcdif_csc_coeffctrl3) /* 0x140 */ mxs_reg_32(hw_lcdif_csc_coeffctrl4) /* 0x150 */ - mxs_reg_32(hw_lcdif_csc_offset) /* 0x160 */ + mxs_reg_32(hw_lcdif_csc_offset) /* 0x160 */ mxs_reg_32(hw_lcdif_csc_limit) /* 0x170 */ #if defined(CONFIG_MX23) @@ -61,7 +61,7 @@ struct mxs_lcdif_regs { defined(CONFIG_MX6SL) || defined(CONFIG_MX6SLL) || \ defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL) || \ defined(CONFIG_MX7) || defined(CONFIG_MX7ULP) || \ - defined(CONFIG_IMX8M) + defined(CONFIG_IMX8M) || defined(CONFIG_IMXRT) mxs_reg_32(hw_lcdif_crc_stat) /* 0x1a0 */ #endif mxs_reg_32(hw_lcdif_lcdif_stat) /* 0x1d0/0x1b0 */ diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index f21f8247d9..6826ba3d1b 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -440,6 +440,7 @@ static const struct udevice_id mxs_video_ids[] = { { .compatible = "fsl,imx23-lcdif" }, { .compatible = "fsl,imx28-lcdif" }, { .compatible = "fsl,imx7ulp-lcdif" }, + { .compatible = "fsl,imxrt-lcdif" }, { /* sentinel */ } }; From patchwork Wed Feb 26 17:15:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245209 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=OQhumFWI; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMvp5dqlz9sP7 for ; Thu, 27 Feb 2020 04:18:30 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B67468120A; Wed, 26 Feb 2020 18:16:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="OQhumFWI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 669B480E7E; Wed, 26 Feb 2020 18:16:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, URIBL_BLOCKED, URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11116.aruba.it (smtpcmd11116.aruba.it [62.149.156.116]) by phobos.denx.de (Postfix) with ESMTP id DB678804F2 for ; Wed, 26 Feb 2020 18:16:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG4jT; Wed, 26 Feb 2020 18:16:04 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 08/18] video: mxsfb: refactor for using display_timings Date: Wed, 26 Feb 2020 18:15:51 +0100 Message-Id: <20200226171601.31142-9-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737364; bh=OXVzKY96bUN+SU7ITMH+xG1rL7BSgOidx9cGMJeDn8I=; h=From:To:Subject:Date:MIME-Version; b=OQhumFWIuzAvLpvwiLB5nufDIAbZN8i17gmMuv9KboNnO4yRA3X+R6LHX1rP/zLlD SioNqGh/g3rf7U049Mi4ZkYLxjBwPqRAktbThuZkRmbZawtHE77NNXBHDxGtknuzEh 6gfgfDQCf4U/Avuk3FKcfaTr3iJsdnAx7RZBU0L/23LAowKlD+tO+PAxaI9osV+WKP pc+tXaX23UiYk1C101jM01ApPsD/IuhYg4zQ//NQ5pq43G3gLle6VrYzFBppZYrrfK At76Pbd7u7QgGEXYviGz+gmS5Bxtzw1q9xIRNlKOu6eDRUsKxpAGwIyblJeWQs4pmY W+huM3iGdnuGw== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean struct display_timings provides more informations such clock and DE polarity, so let's refactor the code to use struct display_timings instead of struct ctfb_res_modes, so we'll become able to get clock and DE polarity settings and set register according to them in the next patch. Signed-off-by: Giulio Benetti --- drivers/video/mxsfb.c | 54 ++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 6826ba3d1b..cdd6dfaced 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -54,7 +54,7 @@ __weak void mxsfb_system_setup(void) */ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, - struct ctfb_res_modes *mode, int bpp) + struct display_timing *timings, int bpp) { struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE; uint32_t word_len = 0, bus_width = 0; @@ -70,14 +70,14 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, return; } - ret = clk_set_rate(&per_clk, PS2KHZ(mode->pixclock) * 1000); + ret = clk_set_rate(&per_clk, timings->pixelclock.typ); if (ret < 0) { dev_err(dev, "Failed to set mxs clk: %d\n", ret); return; } #else /* Kick in the LCDIF clock */ - mxs_set_lcdclk(MXS_LCDIF_BASE, PS2KHZ(mode->pixclock)); + mxs_set_lcdclk(MXS_LCDIF_BASE, timings->pixelclock.typ / 1000); #endif /* Restart the LCDIF block */ @@ -115,25 +115,25 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, mxsfb_system_setup(); - writel((mode->yres << LCDIF_TRANSFER_COUNT_V_COUNT_OFFSET) | mode->xres, - ®s->hw_lcdif_transfer_count); + writel((timings->vactive.typ << LCDIF_TRANSFER_COUNT_V_COUNT_OFFSET) | + timings->hactive.typ, ®s->hw_lcdif_transfer_count); writel(LCDIF_VDCTRL0_ENABLE_PRESENT | LCDIF_VDCTRL0_ENABLE_POL | LCDIF_VDCTRL0_VSYNC_PERIOD_UNIT | LCDIF_VDCTRL0_VSYNC_PULSE_WIDTH_UNIT | - mode->vsync_len, ®s->hw_lcdif_vdctrl0); - writel(mode->upper_margin + mode->lower_margin + - mode->vsync_len + mode->yres, + timings->vsync_len.typ, ®s->hw_lcdif_vdctrl0); + writel(timings->vback_porch.typ + timings->vfront_porch.typ + + timings->vsync_len.typ + timings->vactive.typ, ®s->hw_lcdif_vdctrl1); - writel((mode->hsync_len << LCDIF_VDCTRL2_HSYNC_PULSE_WIDTH_OFFSET) | - (mode->left_margin + mode->right_margin + - mode->hsync_len + mode->xres), + writel((timings->hsync_len.typ << LCDIF_VDCTRL2_HSYNC_PULSE_WIDTH_OFFSET) | + (timings->hback_porch.typ + timings->hfront_porch.typ + + timings->hsync_len.typ + timings->hactive.typ), ®s->hw_lcdif_vdctrl2); - writel(((mode->left_margin + mode->hsync_len) << + writel(((timings->hback_porch.typ + timings->hsync_len.typ) << LCDIF_VDCTRL3_HORIZONTAL_WAIT_CNT_OFFSET) | - (mode->upper_margin + mode->vsync_len), + (timings->vback_porch.typ + timings->vsync_len.typ), ®s->hw_lcdif_vdctrl3); - writel((0 << LCDIF_VDCTRL4_DOTCLK_DLY_SEL_OFFSET) | mode->xres, + writel((0 << LCDIF_VDCTRL4_DOTCLK_DLY_SEL_OFFSET) | timings->hactive.typ, ®s->hw_lcdif_vdctrl4); writel(fb_addr, ®s->hw_lcdif_cur_buf); @@ -154,11 +154,11 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, writel(LCDIF_CTRL_RUN, ®s->hw_lcdif_ctrl_set); } -static int mxs_probe_common(struct udevice *dev, struct ctfb_res_modes *mode, +static int mxs_probe_common(struct udevice *dev, struct display_timing *timings, int bpp, u32 fb) { /* Start framebuffer */ - mxs_lcd_init(dev, fb, mode, bpp); + mxs_lcd_init(dev, fb, timings, bpp); #ifdef CONFIG_VIDEO_MXS_MODE_SYSTEM /* @@ -224,6 +224,7 @@ void *video_hw_init(void) char *penv; void *fb = NULL; struct ctfb_res_modes mode; + struct display_timing timings; puts("Video: "); @@ -280,7 +281,9 @@ void *video_hw_init(void) printf("%s\n", panel.modeIdent); - ret = mxs_probe_common(NULL, &mode, bpp, (u32)fb); + video_ctfb_mode_to_display_timing(&mode, &timings); + + ret = mxs_probe_common(NULL, &timings, bpp, (u32)fb); if (ret) goto dealloc_fb; @@ -334,7 +337,6 @@ static int mxs_video_probe(struct udevice *dev) struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); struct video_priv *uc_priv = dev_get_uclass_priv(dev); - struct ctfb_res_modes mode; struct display_timing timings; u32 bpp = 0; u32 fb_start, fb_end; @@ -347,17 +349,7 @@ static int mxs_video_probe(struct udevice *dev) if (ret) return ret; - mode.xres = timings.hactive.typ; - mode.yres = timings.vactive.typ; - mode.left_margin = timings.hback_porch.typ; - mode.right_margin = timings.hfront_porch.typ; - mode.upper_margin = timings.vback_porch.typ; - mode.lower_margin = timings.vfront_porch.typ; - mode.hsync_len = timings.hsync_len.typ; - mode.vsync_len = timings.vsync_len.typ; - mode.pixclock = HZ2PS(timings.pixelclock.typ); - - ret = mxs_probe_common(dev, &mode, bpp, plat->base); + ret = mxs_probe_common(dev, &timings, bpp, plat->base); if (ret) return ret; @@ -378,8 +370,8 @@ static int mxs_video_probe(struct udevice *dev) return -EINVAL; } - uc_priv->xsize = mode.xres; - uc_priv->ysize = mode.yres; + uc_priv->xsize = timings.hactive.typ; + uc_priv->ysize = timings.vactive.typ; /* Enable dcache for the frame buffer */ fb_start = plat->base & ~(MMU_SECTION_SIZE - 1); From patchwork Wed Feb 26 17:15:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245208 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=fWu63sT1; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMvc1MBRz9sP7 for ; Thu, 27 Feb 2020 04:18:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B8D7481205; Wed, 26 Feb 2020 18:16:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="fWu63sT1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BA24E80A03; Wed, 26 Feb 2020 18:16:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, URIBL_BLOCKED, URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11116.aruba.it (smtpcmd11116.aruba.it [62.149.156.116]) by phobos.denx.de (Postfix) with ESMTP id 1A2B78065D for ; Wed, 26 Feb 2020 18:16:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG4jp; Wed, 26 Feb 2020 18:16:04 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 09/18] video: mxsfb: enable setting HSYNC negative polarity Date: Wed, 26 Feb 2020 18:15:52 +0100 Message-Id: <20200226171601.31142-10-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737365; bh=b695v2q7Q3Bta0QAwEczWEVl9xQW2SqdI0mFy9JeknI=; h=From:To:Subject:Date:MIME-Version; b=fWu63sT1GOJPBY+R6m1ktRodThfsSBZ4yQDqtnhSZps6VWtgRmnkYqKzxJAwFonnr npIXrVMisKQdiLqZLH72zpSuMKaiijBj2mvYxldUs/L9z/2MkTPuEF3mSEdaEPPC6v QAFPcvWzMPeAHPyzDKBd0+zJ1tMcfxWWH7Fd9RcU/HMNa50ByP6YcUAo4rF2DmdeQ8 3Ys3JTEP8ryHMri8e5BGso374C9Q1pHrnRrPx33E9l/eisDhQJoduCuovBQG2YGeAK Y4pb3HikVMX4mOOKcP5esZeQ/JSYFz5sI/YL8+Hnbikn4rvygcgEQahJHXpQCC0grh /V5K3LZ9/BgYg== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean HSYNC signal can now be flipped according to display_flags bitmaks by writing its bitmask on vdctrl0 register. Signed-off-by: Giulio Benetti --- drivers/video/mxsfb.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index cdd6dfaced..9912cf3d82 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -57,8 +57,10 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, struct display_timing *timings, int bpp) { struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE; + const enum display_flags flags = timings->flags; uint32_t word_len = 0, bus_width = 0; uint8_t valid_data = 0; + uint32_t vdctrl0; #if CONFIG_IS_ENABLED(CLK) struct clk per_clk; @@ -118,10 +120,14 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, writel((timings->vactive.typ << LCDIF_TRANSFER_COUNT_V_COUNT_OFFSET) | timings->hactive.typ, ®s->hw_lcdif_transfer_count); - writel(LCDIF_VDCTRL0_ENABLE_PRESENT | LCDIF_VDCTRL0_ENABLE_POL | - LCDIF_VDCTRL0_VSYNC_PERIOD_UNIT | - LCDIF_VDCTRL0_VSYNC_PULSE_WIDTH_UNIT | - timings->vsync_len.typ, ®s->hw_lcdif_vdctrl0); + vdctrl0 = LCDIF_VDCTRL0_ENABLE_PRESENT | LCDIF_VDCTRL0_ENABLE_POL | + LCDIF_VDCTRL0_VSYNC_PERIOD_UNIT | + LCDIF_VDCTRL0_VSYNC_PULSE_WIDTH_UNIT | + timings->vsync_len.typ; + + if(flags & DISPLAY_FLAGS_HSYNC_HIGH) + vdctrl0 |= LCDIF_VDCTRL0_HSYNC_POL; + writel(vdctrl0, ®s->hw_lcdif_vdctrl0); writel(timings->vback_porch.typ + timings->vfront_porch.typ + timings->vsync_len.typ + timings->vactive.typ, ®s->hw_lcdif_vdctrl1); From patchwork Wed Feb 26 17:15:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245205 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=dFRQUUYq; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMtx0Hmqz9sPK for ; Thu, 27 Feb 2020 04:17:45 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F2DA081022; Wed, 26 Feb 2020 18:16:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="dFRQUUYq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2FA4580722; Wed, 26 Feb 2020 18:16:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, URIBL_BLOCKED, URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11116.aruba.it (smtpcmd11116.aruba.it [62.149.156.116]) by phobos.denx.de (Postfix) with ESMTP id 4CB1F80671 for ; Wed, 26 Feb 2020 18:16:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG5k7; Wed, 26 Feb 2020 18:16:05 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 10/18] video: mxsfb: enable setting VSYNC negative polarity Date: Wed, 26 Feb 2020 18:15:53 +0100 Message-Id: <20200226171601.31142-11-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737365; bh=FNAMwhtbV60ZO4lLbQeQH9QP4CfN5dZc7Dic1BicQ/Q=; h=From:To:Subject:Date:MIME-Version; b=dFRQUUYqhrLvhDhCuyjzTdbHMLRgn0//2tyBeDkBVqX2zZvavX6VsQtHHyldDWDGt ksAzLOGeVy3quIooKiDBsXrQ/v1UzgVQKDdBMT9dtVwDO3yf/eF5zi84GCYQckTJom Axwg3NMooz181KE5kN/Y63XFW8Vt8U5oI0cN9s1ekif+VDJQ598XW7g+0it5k68C2G YtkyiOuze9ssV5rPweUqmUrOBZQP9gEFpWdcwVFZLJI8UkrKsjKOezC9pyeYGbagdb lFpJGE4aj//Jw/oASbtRTCd9rUzjl/8oOllrPlDsEisQZ9ubwHMkHJ6xsyS0w0HUtR iPRQXgoLb5alw== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean VSYNC signal can now be flipped by writing its bitmask on vdctrl0 register. Signed-off-by: Giulio Benetti --- drivers/video/mxsfb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 9912cf3d82..4d33e24e1a 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -127,6 +127,8 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, if(flags & DISPLAY_FLAGS_HSYNC_HIGH) vdctrl0 |= LCDIF_VDCTRL0_HSYNC_POL; + if(flags & DISPLAY_FLAGS_VSYNC_HIGH) + vdctrl0 |= LCDIF_VDCTRL0_VSYNC_POL; writel(vdctrl0, ®s->hw_lcdif_vdctrl0); writel(timings->vback_porch.typ + timings->vfront_porch.typ + timings->vsync_len.typ + timings->vactive.typ, From patchwork Wed Feb 26 17:15:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245207 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=oNDEF0P9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMvN5Y0Fz9sPK for ; Thu, 27 Feb 2020 04:18:08 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 284B581202; Wed, 26 Feb 2020 18:16:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="oNDEF0P9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB1B580911; Wed, 26 Feb 2020 18:16:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED,URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11121.aruba.it (smtpcmd11121.aruba.it [62.149.156.121]) by phobos.denx.de (Postfix) with ESMTP id D6A6080722 for ; Wed, 26 Feb 2020 18:16:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG5kM; Wed, 26 Feb 2020 18:16:05 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 11/18] video: mxsfb: enable setting PIXDATA on negative edge Date: Wed, 26 Feb 2020 18:15:54 +0100 Message-Id: <20200226171601.31142-12-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737365; bh=POEfD0FfGwcVntIbK1CpuYnurmu9h91A7WMgGGKsWw8=; h=From:To:Subject:Date:MIME-Version; b=oNDEF0P9itwG6n/jXy21Poy7LKUR8tY3Qn8f/soGvJ2X3r3GwalIWoxwYDMloGet5 3E2Gd5Snk8mG4ZY0s0aX9gZQraDZ4D9ZDqnO3QOwwsXuH4xY+pT+VoWzpcH4kpwt7s IkyuTEoecMo/qRrPr/0mmMJdClHqbCCFC8j+GJEsaYGVj0rFSCfUrlOJz+1sSjfMU9 CFDFPdRn0+/xtI+sCEmKThA+D1YHNCNjMIHwUNaqfvpnefiUyxpkmRRSiqqGhuHU3T JET9ByjrI+Um6v8depn+LqXT2Ru3udzBGw/QWQc59S82dL4NTwJlm0moV1FvIFScuk wFDpYhyPxFoOw== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean DOTCLK signal can now be flipped by writing its bitmask on vdctrl0 register. Signed-off-by: Giulio Benetti --- drivers/video/mxsfb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 4d33e24e1a..648e1c22fe 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -129,6 +129,8 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, vdctrl0 |= LCDIF_VDCTRL0_HSYNC_POL; if(flags & DISPLAY_FLAGS_VSYNC_HIGH) vdctrl0 |= LCDIF_VDCTRL0_VSYNC_POL; + if(flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) + vdctrl0 |= LCDIF_VDCTRL0_DOTCLK_POL; writel(vdctrl0, ®s->hw_lcdif_vdctrl0); writel(timings->vback_porch.typ + timings->vfront_porch.typ + timings->vsync_len.typ + timings->vactive.typ, From patchwork Wed Feb 26 17:15:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245214 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=NMcgiL9z; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMwf3BFvz9sP7 for ; Thu, 27 Feb 2020 04:19:14 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3B51281260; Wed, 26 Feb 2020 18:17:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="NMcgiL9z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 578A28065D; Wed, 26 Feb 2020 18:16:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED,URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11121.aruba.it (smtpcmd11121.aruba.it [62.149.156.121]) by phobos.denx.de (Postfix) with ESMTP id 15AC780724 for ; Wed, 26 Feb 2020 18:16:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG5kc; Wed, 26 Feb 2020 18:16:05 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 12/18] video: mxsfb: enable setting ENABLE negative polarity Date: Wed, 26 Feb 2020 18:15:55 +0100 Message-Id: <20200226171601.31142-13-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737365; bh=2LAj8FcsqXXipeppsf1I6/7dKadHYfTNncDYx2KTMEY=; h=From:To:Subject:Date:MIME-Version; b=NMcgiL9z/IzDP5eBhlpe5zfamE+ypRVUiU4KcdE92BOJVgIFfrpGN/dCHAJd92ymQ q8Z18BfWZd6vBKRQSGuAwD1SwsMW+1Z4ffZGdAluNK96WqVbPceGSxB2pyzmOq3sVo HPoVKZmnkwHDXgZk5Ri9w3fxohJLAHMz/x2orx6OZE0MwzcVS3TteUC3Tw4K1+Gt1m YVReDHIuP1Fw+xYDnTYw3p/eVFo+F6YFs2RFvS20Cx2Uyy4vTEi9hOAHV3nVAZXyNP rsLnJxKjk/Xk2mLIsweSTuvTkQTKRvIayBCHaZRLJFuqHkOtsFIPsSujALxc/gbzgk 1sW5rijLDz0uQ== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean ENABLE signal can now be flipped by writing its bitmask on vdctrl0 register. Signed-off-by: Giulio Benetti --- drivers/video/mxsfb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 648e1c22fe..8a5a61c9fb 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -131,6 +131,9 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr, vdctrl0 |= LCDIF_VDCTRL0_VSYNC_POL; if(flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) vdctrl0 |= LCDIF_VDCTRL0_DOTCLK_POL; + if(flags & DISPLAY_FLAGS_DE_HIGH) + vdctrl0 |= LCDIF_VDCTRL0_ENABLE_POL; + writel(vdctrl0, ®s->hw_lcdif_vdctrl0); writel(timings->vback_porch.typ + timings->vfront_porch.typ + timings->vsync_len.typ + timings->vactive.typ, From patchwork Wed Feb 26 17:15:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245210 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=EL/QJMoY; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMw14T9gz9sPK for ; Thu, 27 Feb 2020 04:18:41 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5D93D81237; Wed, 26 Feb 2020 18:16:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="EL/QJMoY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5161C8065D; Wed, 26 Feb 2020 18:16:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED,URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11121.aruba.it (smtpcmd11121.aruba.it [62.149.156.121]) by phobos.denx.de (Postfix) with ESMTP id 3BFD28081D for ; Wed, 26 Feb 2020 18:16:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG5ks; Wed, 26 Feb 2020 18:16:05 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 13/18] imxrt1050_evk: add 16bpp video support if video layer enabled Date: Wed, 26 Feb 2020 18:15:56 +0100 Message-Id: <20200226171601.31142-14-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737365; bh=wdi1kdZ1Lw6TC4Kzxard3Km7XbehdHVkKyyn2L+dfLU=; h=From:To:Subject:Date:MIME-Version; b=EL/QJMoY0qrdSG5cZhtdGMvN8J2zeEDdgUv0L3Qt/Ika8LYcVX908XRChyKOtW5fq iHKPhJoJSih+1oRq05lEuLY8hQHBXx4b32UzAPTvdywW8auH9YrQ4WK5AXsB1T/OHz z2EUPtpv0BTHph9GdV0Xx/XQ6EtgtyHXNty+rLmfKqOMf64b+EPAuNDl7ZFQvIzEAZ Kt0egqwh3Lhoe0Q1yKvF4rUs52fmd8AOtv24tF8ah+quCJICzm01Gt6q01Ue4pQAY5 xiaHFyKPj/WD0jYs4c1DLd+ghe67geC262XP0EUBRKSlbtmJmacDIhZG1Jpo7Vkqkb 91zSibjsgJgpw== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean i.MXRT1050 provides mxsfb compatible lcd controller, so let's enable video mxsfb driver with 16bpp depth if CONFIG_DM_VIDEO is selected since board has 16bpp only connection. Signed-off-by: Giulio Benetti --- include/configs/imxrt1050-evk.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/configs/imxrt1050-evk.h b/include/configs/imxrt1050-evk.h index cdec657fb0..3a6b972d9a 100644 --- a/include/configs/imxrt1050-evk.h +++ b/include/configs/imxrt1050-evk.h @@ -30,6 +30,21 @@ #define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */ +#ifdef CONFIG_DM_VIDEO +#define CONFIG_VIDEO_MXS +#define CONFIG_VIDEO_LOGO +#define CONFIG_SPLASH_SCREEN +#define CONFIG_SPLASH_SCREEN_ALIGN +#define CONFIG_BMP_16BPP +#define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_VIDEO_BMP_LOGO + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial\0" \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" +#endif + /* * Configuration of the external SDRAM memory */ From patchwork Wed Feb 26 17:15:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245212 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=n2cT9NhR; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMwS0FD5z9sP7 for ; Thu, 27 Feb 2020 04:19:03 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 019658123F; Wed, 26 Feb 2020 18:16:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="n2cT9NhR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5017080722; Wed, 26 Feb 2020 18:16:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED,URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11121.aruba.it (smtpcmd11121.aruba.it [62.149.156.121]) by phobos.denx.de (Postfix) with ESMTP id 4753380829 for ; Wed, 26 Feb 2020 18:16:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG5l7; Wed, 26 Feb 2020 18:16:06 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 14/18] ARM: dts: i.mxrt1050: add lcdif node Date: Wed, 26 Feb 2020 18:15:57 +0100 Message-Id: <20200226171601.31142-15-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737366; bh=fLEEDpAToQ3sVoLR3duh5HtpfCIS2UMVl8mGsV446oc=; h=From:To:Subject:Date:MIME-Version; b=n2cT9NhRpNQPH9X586xMzbBnNdX/mGNhBIG8wBgg0Sc70OLWIRj/zCGPq6YUxNtUB ZDUWHRp9+PKu/QApcR3H8pudROEbZQjmE3GCFF11tFaTaOWhX+Bkp5Wo61BDNvKQln NrUOLj9VPtDSB3XOLwKA+X0VLQESTwhx+kuFLfKoF5k30V1tkDJQTjqGNK8GnXxey2 7x+gpeSMOnoYnm5y0bhwN3Aa0rIVOmKUBCnsLHOumK1aKp2M3PKHwzyWAEiWg9nTEE P0w+Qk5GcpqgUYdAWBKoPwEzGc4U0UXwciU6DLrGtcHbxPSsl71pS9tTVP9FJensVh G2qLNtT/fxecA== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Add lcdif node to SoC. Signed-off-by: Giulio Benetti --- arch/arm/dts/imxrt1050.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/dts/imxrt1050.dtsi b/arch/arm/dts/imxrt1050.dtsi index b1d98e6feb..0123f4788c 100644 --- a/arch/arm/dts/imxrt1050.dtsi +++ b/arch/arm/dts/imxrt1050.dtsi @@ -13,6 +13,7 @@ / { aliases { + display0 = &lcdif; gpio0 = &gpio1; gpio1 = &gpio2; gpio2 = &gpio3; @@ -142,5 +143,14 @@ interrupt-controller; #interrupt-cells = <2>; }; + + lcdif: lcdif@402b8000 { + compatible = "fsl,imxrt-lcdif"; + reg = <0x402b8000 0x10000>; + interrupts = ; + clocks = <&clks IMXRT1050_CLK_LCDIF>; + clock-names = "per"; + status = "disabled"; + }; }; }; From patchwork Wed Feb 26 17:15:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245211 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=QesBv9dP; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMwD3XjDz9sP7 for ; Thu, 27 Feb 2020 04:18:52 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A67A5810D6; Wed, 26 Feb 2020 18:16:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="QesBv9dP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 568B880829; Wed, 26 Feb 2020 18:16:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED,URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd11121.aruba.it (smtpcmd11121.aruba.it [62.149.156.121]) by phobos.denx.de (Postfix) with ESMTP id 8246580857 for ; Wed, 26 Feb 2020 18:16:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd11.ad.aruba.it with bizsmtp id 7VG12203j0DySFo01VG6lS; Wed, 26 Feb 2020 18:16:06 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 15/18] ARM: dts: imxrt1050: allow this dtsi file to be compiled in Linux Date: Wed, 26 Feb 2020 18:15:58 +0100 Message-Id: <20200226171601.31142-16-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> References: <20200226171601.31142-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737366; bh=1hAEpIlDZ555Hz/8yIBV/a6Mu+DUBjs5+WKkLfEKLGQ=; h=From:To:Subject:Date:MIME-Version; b=QesBv9dPCyTGQBHY7Ie8gX8zsA3ByhXqvvHY+IYHRHh3TF+j9eU+vDuPXQLUVheyw U6j2Hsx6yrhSF9UVc9GtDDPbxcdFgv9wq6QH1pM3lXpdMVScp9ev/mCZWsLaBY/p64 AR7vl/ooPC3ol2AJe2FodZUMXHK1lA3IqVb3ASmOBtY0vVPrja37AwW4zmFsXsi1H6 5IDGUcLF1ZiOzcOOrA33LOwDvh+weHXyb411WEDliv4VlAJ04+WhCu4dZtWf/yU1RM HtWun3R3C7ZOTAJ2x8wG0vtVXz0inqfpsQIV900lObOmqlN6gAlAoVFlZD6H/jnMiT V0JlKWSrrHunA== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Linux doesn't provide skeleton.dtsi file so let's remove its include and provide #address-cells/size-cells = <1> that were defined in skeleton.dtsi before. Signed-off-by: Giulio Benetti --- arch/arm/dts/imxrt1050.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/imxrt1050.dtsi b/arch/arm/dts/imxrt1050.dtsi index 0123f4788c..7cfe5f5c95 100644 --- a/arch/arm/dts/imxrt1050.dtsi +++ b/arch/arm/dts/imxrt1050.dtsi @@ -4,7 +4,6 @@ * Author(s): Giulio Benetti */ -#include "skeleton.dtsi" #include "armv7-m.dtsi" #include #include @@ -12,6 +11,9 @@ #include / { + #address-cells = <1>; + #size-cells = <1>; + aliases { display0 = &lcdif; gpio0 = &gpio1; From patchwork Wed Feb 26 17:16:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245218 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=Isbi1mps; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMxJ4hPCz9sP7 for ; Thu, 27 Feb 2020 04:19:48 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C59D8804F2; Wed, 26 Feb 2020 18:17:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="Isbi1mps"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2EC54811ED; Wed, 26 Feb 2020 18:16:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED,URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd13146.aruba.it (smtpcmd13146.aruba.it [62.149.156.146]) by phobos.denx.de (Postfix) with ESMTP id B8CAE80E8F for ; Wed, 26 Feb 2020 18:16:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd13.ad.aruba.it with bizsmtp id 7VGi220180DySFo01VGig4; Wed, 26 Feb 2020 18:16:43 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 16/18] arch: arm: dts: imxrt1050-evk: add lcdif node Date: Wed, 26 Feb 2020 18:16:39 +0100 Message-Id: <20200226171641.31227-1-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737403; bh=D6YWOWbHEkbkGnyF+8jIcJMIlgbJ5vyR59QQj7H3ziY=; h=From:To:Subject:Date:MIME-Version; b=Isbi1mpsUBrXqRd/n9T8P0+PxahZkjb+Culy0uiqNjZbovDQslsO/JFG/X6tWbmYa SV0MVerAAKJDbGq67WCOLqGnuLGtcyk0vXVhbQmaPma/mCfnIyp4oohn4izDcbUTNn hCEpL+HuUjsvCSisbnEvVQ3BHG1naidGE1eJPTd97rbJVFuZv9ASMbWg5zPOPiCy6k 2m1wq8hopEtlO+FsJ6LsPbeuNIwhc0//a+UXf0Biga27nGFN2l0SoqeCfyyqWOUmP8 wTSB5BB3b4sJ2WPpOgJUa1UVPpvPZ+jZVo8YiOPXQzqc06gArKZwlQcAsDmRogQaR4 HB3JwJ2blaXzQ== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Add lcdif node and its pinctrl. Signed-off-by: Giulio Benetti --- arch/arm/dts/imxrt1050-evk.dts | 57 ++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/arch/arm/dts/imxrt1050-evk.dts b/arch/arm/dts/imxrt1050-evk.dts index 56b75986e2..f3e3baa6dc 100644 --- a/arch/arm/dts/imxrt1050-evk.dts +++ b/arch/arm/dts/imxrt1050-evk.dts @@ -185,6 +185,33 @@ 0x17061 >; }; + + pinctrl_lcdif: lcdifgrp { + u-boot,dm-spl; + fsl,pins = < + MXRT1050_IOMUXC_GPIO_B0_00_LCD_CLK 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_01_LCD_ENABLE 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_02_LCD_HSYNC 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_03_LCD_VSYNC 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_04_LCD_DATA00 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_05_LCD_DATA01 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_06_LCD_DATA02 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_07_LCD_DATA03 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_08_LCD_DATA04 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_09_LCD_DATA05 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_10_LCD_DATA06 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_11_LCD_DATA07 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_12_LCD_DATA08 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_13_LCD_DATA09 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_14_LCD_DATA10 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B0_15_LCD_DATA11 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B1_01_LCD_DATA13 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B1_02_LCD_DATA14 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B1_03_LCD_DATA15 0x1b0b1 + MXRT1050_IOMUXC_GPIO_B1_15_GPIO2_IO31 0x0b069 + MXRT1050_IOMUXC_GPIO_AD_B0_02_GPIO1_IO02 0x0b069 + >; + }; }; }; @@ -198,3 +225,33 @@ cd-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; }; + +&lcdif { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcdif>; + display = <&display0>; + status = "okay"; + + display0: display0 { + bits-per-pixel = <16>; + bus-width = <16>; + + display-timings { + timing0: timing0 { + clock-frequency = <9300000>; + hactive = <480>; + vactive = <272>; + hback-porch = <4>; + hfront-porch = <8>; + vback-porch = <4>; + vfront-porch = <8>; + hsync-len = <41>; + vsync-len = <10>; + de-active = <1>; + pixelclk-active = <0>; + hsync-active = <0>; + vsync-active = <0>; + }; + }; + }; +}; From patchwork Wed Feb 26 17:16:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245217 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=hHrWgcAG; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMx402dBz9sPK for ; Thu, 27 Feb 2020 04:19:35 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2FD0181269; Wed, 26 Feb 2020 18:17:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="hHrWgcAG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0E1A4810D6; Wed, 26 Feb 2020 18:16:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED,URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd13146.aruba.it (smtpcmd13146.aruba.it [62.149.156.146]) by phobos.denx.de (Postfix) with ESMTP id EF96F811ED for ; Wed, 26 Feb 2020 18:16:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd13.ad.aruba.it with bizsmtp id 7VGi220180DySFo01VGjgg; Wed, 26 Feb 2020 18:16:43 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 17/18] configs: imxrt1050-evk: enable video support/console Date: Wed, 26 Feb 2020 18:16:40 +0100 Message-Id: <20200226171641.31227-2-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171641.31227-1-giulio.benetti@benettiengineering.com> References: <20200226171641.31227-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737403; bh=PAfV9Aw5/JFWznKHfhMHEvSbzLoRcIN5CYhrV9Js9Ko=; h=From:To:Subject:Date:MIME-Version; b=hHrWgcAGnVxYyKKnOZ7jdFWAV9p2rZxWQT3VwwfM21mJT8GYTQcMP5nR9nkPzIm2H 4kCx35ZOOOSKqmvjqsZEImlt1uB8ph9z6FmBdvOpgFTQuHmkVBdj4locSMlPV5mNOT vFBpqTWfPOuEfdAjap6JuJUONIjmXOEIMCH4oUZcBjWvcj8Mz85KtD/jUecEF/Yl04 77JzxW9GcjjuyujjRMi4CBYaArJvY5xeW3ozZ+xs4A1CL8ofWGM3eLA6VmxomUxRMm wSxomb5OypjP1Ig3rdmft89velt2V4IWL8YVbi9dlWr/TwIZjEAaQ/nhXKnR3OWmLz r9nC+dZCAtDug== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Enable DM_VIDEO subsystem and its BACKLIGHT_GPIO. Then enable SYS_WHITE_ON_BLACK to have classic black background on display. Need also to enable CONFIG_SYS_CONSOLE_ENV_OVERWRITE to retrieve stdin/stdout/stderr from CONFIG_EXTRA_ENV_SETTINGS. Signed-off-by: Giulio Benetti --- configs/imxrt1050-evk_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configs/imxrt1050-evk_defconfig b/configs/imxrt1050-evk_defconfig index 71970552c0..810f391fdc 100644 --- a/configs/imxrt1050-evk_defconfig +++ b/configs/imxrt1050-evk_defconfig @@ -17,6 +17,7 @@ CONFIG_SPL_TEXT_BASE=0x20209000 CONFIG_DISTRO_DEFAULTS=y CONFIG_SD_BOOT=y # CONFIG_USE_BOOTCOMMAND is not set +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set @@ -62,6 +63,9 @@ CONFIG_IMXRT_SDRAM=y CONFIG_FSL_LPUART=y CONFIG_TIMER=y CONFIG_SPL_TIMER=y +CONFIG_DM_VIDEO=y +CONFIG_BACKLIGHT_GPIO=y +CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_SHA1=y CONFIG_SHA256=y CONFIG_HEXDUMP=y From patchwork Wed Feb 26 17:16:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245219 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=ToCpCEBr; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SMxV3wtPz9sP7 for ; Thu, 27 Feb 2020 04:19:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3A23580D34; Wed, 26 Feb 2020 18:17:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="ToCpCEBr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5EFB78121C; Wed, 26 Feb 2020 18:16:49 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED,URIBL_RHS_DOB autolearn=no autolearn_force=no version=3.4.2 Received: from smtpcmd13146.aruba.it (smtpcmd13146.aruba.it [62.149.156.146]) by phobos.denx.de (Postfix) with ESMTP id 303DC81203 for ; Wed, 26 Feb 2020 18:16:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([212.103.203.10]) by smtpcmd13.ad.aruba.it with bizsmtp id 7VGi220180DySFo01VGjgx; Wed, 26 Feb 2020 18:16:43 +0100 From: Giulio Benetti To: u-boot@lists.denx.de Cc: Stefano Babic , Lukasz Majewski , Fabio Estevam , uboot-imx@nxp.com, Anatolij Gustschin , Simon Glass , Daniel Schwierzeck , Giulio Benetti Subject: [PATCH 18/18] configs: imxrt1050-evk: temporary disable DCACHE Date: Wed, 26 Feb 2020 18:16:41 +0100 Message-Id: <20200226171641.31227-3-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226171641.31227-1-giulio.benetti@benettiengineering.com> References: <20200226171641.31227-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582737403; bh=TId5fukfwov7SwSTskfhmlnMxmXozJvhDZQOPH8STI8=; h=From:To:Subject:Date:MIME-Version; b=ToCpCEBrJDjHVxt9Xi8lvXVajUV/d5/c3XZWGkhBPGgLM27nCLpSwPMnm1MLYhntf yKKa9X0kee6is0N09KBV+d2eMbYCbngNG3iK6mxW2YeAGt94M/wzjzjN6U79HeCz4T kKFNPf12Ex4O7fY8dRcRuL9jjjR5zlCaihUGI3dUpckP8xVgKuLjlEavoyJvbnq6Kn bQBIKXxSQCTewOZjCDmCurGD9lJrtFI2M/iVcujJePGwI6IUqN2SQYPDKaOjBU7omD A0elMH2mNpqBVumYCT1PCYrrN2vwevv71OnpcX9SoUtae0faiHBVTv84de5/GZq7PH EJAEsndXHGzAg== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean mxsfb needs a dcache function not implemented in cortex-M7, so for the moment let's keep dcache not enabled. Signed-off-by: Giulio Benetti --- configs/imxrt1050-evk_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/imxrt1050-evk_defconfig b/configs/imxrt1050-evk_defconfig index 810f391fdc..25d0ba191c 100644 --- a/configs/imxrt1050-evk_defconfig +++ b/configs/imxrt1050-evk_defconfig @@ -1,4 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_DCACHE_OFF=y +# CONFIG_SPL_SYS_DCACHE_OFF is not set CONFIG_ARCH_IMXRT=y CONFIG_SYS_TEXT_BASE=0x80002000 CONFIG_SPL_GPIO_SUPPORT=y