From nobody Tue Jun 23 17:14:43 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6751CC433F5 for ; Wed, 2 Mar 2022 03:08:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239235AbiCBDIz (ORCPT ); Tue, 1 Mar 2022 22:08:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232169AbiCBDIy (ORCPT ); Tue, 1 Mar 2022 22:08:54 -0500 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01340E0D1 for ; Tue, 1 Mar 2022 19:08:11 -0800 (PST) Received: from twspam01.aspeedtech.com (localhost [127.0.0.2] (may be forged)) by twspam01.aspeedtech.com with ESMTP id 2222fMP6029341 for ; Wed, 2 Mar 2022 10:41:22 +0800 (GMT-8) (envelope-from tommy_huang@aspeedtech.com) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 2222eJgK029207; Wed, 2 Mar 2022 10:40:19 +0800 (GMT-8) (envelope-from tommy_huang@aspeedtech.com) Received: from tommy0527-VirtualBox.aspeedtech.com (192.168.2.141) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Mar 2022 10:49:40 +0800 From: Tommy Haung To: , , , , , , , , , CC: Subject: [PATCH v6 1/5] ARM: dts: aspeed: Add GFX node to AST2600 Date: Wed, 2 Mar 2022 10:49:26 +0800 Message-ID: <20220302024930.18758-2-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220302024930.18758-1-tommy_huang@aspeedtech.com> References: <20220302024930.18758-1-tommy_huang@aspeedtech.com> MIME-Version: 1.0 X-Originating-IP: [192.168.2.141] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 2222eJgK029207 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Joel Stanley The GFX device is present in the AST2600 SoC. Signed-off-by: Joel Stanley Signed-off-by: Tommy Haung Reviewed-by: Joel Stanley --- arch/arm/boot/dts/aspeed-g6.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6= .dtsi index 1b47be1704f8..e38c3742761b 100644 --- a/arch/arm/boot/dts/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed-g6.dtsi @@ -351,6 +351,17 @@ quality =3D <100>; }; =20 + gfx: display@1e6e6000 { + compatible =3D "aspeed,ast2600-gfx", "aspeed,ast2500-gfx", "syscon"; + reg =3D <0x1e6e6000 0x1000>; + reg-io-width =3D <4>; + clocks =3D <&syscon ASPEED_CLK_GATE_D1CLK>; + resets =3D <&syscon ASPEED_RESET_GRAPHICS>; + syscon =3D <&syscon>; + status =3D "disabled"; + interrupts =3D ; + }; + xdma: xdma@1e6e7000 { compatible =3D "aspeed,ast2600-xdma"; reg =3D <0x1e6e7000 0x100>; --=20 2.17.1 From nobody Tue Jun 23 17:14:43 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51043C433F5 for ; Wed, 2 Mar 2022 03:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239211AbiCBDIS (ORCPT ); Tue, 1 Mar 2022 22:08:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239199AbiCBDIO (ORCPT ); Tue, 1 Mar 2022 22:08:14 -0500 X-Greylist: delayed 1010 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 01 Mar 2022 19:07:31 PST Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23E4B1173 for ; Tue, 1 Mar 2022 19:07:30 -0800 (PST) Received: from twspam01.aspeedtech.com (localhost [127.0.0.2] (may be forged)) by twspam01.aspeedtech.com with ESMTP id 2222fLt8029337 for ; Wed, 2 Mar 2022 10:41:21 +0800 (GMT-8) (envelope-from tommy_huang@aspeedtech.com) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 2222eJrJ029208; Wed, 2 Mar 2022 10:40:19 +0800 (GMT-8) (envelope-from tommy_huang@aspeedtech.com) Received: from tommy0527-VirtualBox.aspeedtech.com (192.168.2.141) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Mar 2022 10:49:40 +0800 From: Tommy Haung To: , , , , , , , , , CC: Subject: [PATCH v6 2/5] ARM: dts: aspeed: ast2600-evb: Enable GFX device Date: Wed, 2 Mar 2022 10:49:27 +0800 Message-ID: <20220302024930.18758-3-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220302024930.18758-1-tommy_huang@aspeedtech.com> References: <20220302024930.18758-1-tommy_huang@aspeedtech.com> MIME-Version: 1.0 X-Originating-IP: [192.168.2.141] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 2222eJrJ029208 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Joel Stanley Enable the GFX device with a framebuffer memory region. Signed-off-by: Joel Stanley Signed-off-by: Tommy Haung Reviewed-by: Joel Stanley --- arch/arm/boot/dts/aspeed-ast2600-evb.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-ast2600-evb.dts b/arch/arm/boot/dts/a= speed-ast2600-evb.dts index b7eb552640cb..e223dad2abd0 100644 --- a/arch/arm/boot/dts/aspeed-ast2600-evb.dts +++ b/arch/arm/boot/dts/aspeed-ast2600-evb.dts @@ -23,6 +23,19 @@ reg =3D <0x80000000 0x80000000>; }; =20 + reserved-memory { + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges; + + gfx_memory: framebuffer { + size =3D <0x01000000>; + alignment =3D <0x01000000>; + compatible =3D "shared-dma-pool"; + reusable; + }; + }; + vcc_sdhci0: regulator-vcc-sdhci0 { compatible =3D "regulator-fixed"; regulator-name =3D "SDHCI0 Vcc"; @@ -300,3 +313,8 @@ vqmmc-supply =3D <&vccq_sdhci1>; clk-phase-sd-hs =3D <7>, <200>; }; + +&gfx { + status =3D "okay"; + memory-region =3D <&gfx_memory>; +}; --=20 2.17.1 From nobody Tue Jun 23 17:14:43 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C854C433F5 for ; Wed, 2 Mar 2022 03:07:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239228AbiCBDIX (ORCPT ); Tue, 1 Mar 2022 22:08:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239199AbiCBDIS (ORCPT ); Tue, 1 Mar 2022 22:08:18 -0500 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CB9DE03E for ; Tue, 1 Mar 2022 19:07:35 -0800 (PST) Received: from twspam01.aspeedtech.com (localhost [127.0.0.2] (may be forged)) by twspam01.aspeedtech.com with ESMTP id 2222fMMU029339 for ; Wed, 2 Mar 2022 10:41:22 +0800 (GMT-8) (envelope-from tommy_huang@aspeedtech.com) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 2222eJjA029209; Wed, 2 Mar 2022 10:40:20 +0800 (GMT-8) (envelope-from tommy_huang@aspeedtech.com) Received: from tommy0527-VirtualBox.aspeedtech.com (192.168.2.141) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Mar 2022 10:49:41 +0800 From: Tommy Haung To: , , , , , , , , , CC: Subject: [PATCH v6 3/5] drm/aspeed: Update INTR_STS handling Date: Wed, 2 Mar 2022 10:49:28 +0800 Message-ID: <20220302024930.18758-4-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220302024930.18758-1-tommy_huang@aspeedtech.com> References: <20220302024930.18758-1-tommy_huang@aspeedtech.com> MIME-Version: 1.0 X-Originating-IP: [192.168.2.141] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 2222eJjA029209 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add interrupt clear register define for further chip support. Signed-off-by: Tommy Haung Reviewed-by: Joel Stanley --- drivers/gpu/drm/aspeed/aspeed_gfx.h | 1 + drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx.h b/drivers/gpu/drm/aspeed/a= speed_gfx.h index 96501152bafa..4e6a442c3886 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx.h +++ b/drivers/gpu/drm/aspeed/aspeed_gfx.h @@ -12,6 +12,7 @@ struct aspeed_gfx { struct regmap *scu; =20 u32 dac_reg; + u32 int_clr_reg; u32 vga_scratch_reg; u32 throd_val; u32 scan_line_max; diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspe= ed/aspeed_gfx_drv.c index b53fee6f1c17..d4b56b3c7597 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -60,6 +60,7 @@ =20 struct aspeed_gfx_config { u32 dac_reg; /* DAC register in SCU */ + u32 int_clear_reg; /* Interrupt clear register */ u32 vga_scratch_reg; /* VGA scratch register in SCU */ u32 throd_val; /* Default Threshold Seting */ u32 scan_line_max; /* Max memory size of one scan line */ @@ -67,6 +68,7 @@ struct aspeed_gfx_config { =20 static const struct aspeed_gfx_config ast2400_config =3D { .dac_reg =3D 0x2c, + .int_clear_reg =3D 0x60, .vga_scratch_reg =3D 0x50, .throd_val =3D CRT_THROD_LOW(0x1e) | CRT_THROD_HIGH(0x12), .scan_line_max =3D 64, @@ -74,6 +76,7 @@ static const struct aspeed_gfx_config ast2400_config =3D { =20 static const struct aspeed_gfx_config ast2500_config =3D { .dac_reg =3D 0x2c, + .int_clear_reg =3D 0x60, .vga_scratch_reg =3D 0x50, .throd_val =3D CRT_THROD_LOW(0x24) | CRT_THROD_HIGH(0x3c), .scan_line_max =3D 128, @@ -119,7 +122,7 @@ static irqreturn_t aspeed_gfx_irq_handler(int irq, void= *data) =20 if (reg & CRT_CTRL_VERTICAL_INTR_STS) { drm_crtc_handle_vblank(&priv->pipe.crtc); - writel(reg, priv->base + CRT_CTRL1); + writel(reg, priv->base + priv->int_clr_reg); return IRQ_HANDLED; } =20 @@ -147,6 +150,7 @@ static int aspeed_gfx_load(struct drm_device *drm) config =3D match->data; =20 priv->dac_reg =3D config->dac_reg; + priv->int_clr_reg =3D config->int_clear_reg; priv->vga_scratch_reg =3D config->vga_scratch_reg; priv->throd_val =3D config->throd_val; priv->scan_line_max =3D config->scan_line_max; --=20 2.17.1 From nobody Tue Jun 23 17:14:43 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8F71C433F5 for ; Wed, 2 Mar 2022 03:07:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234714AbiCBDIe (ORCPT ); Tue, 1 Mar 2022 22:08:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239234AbiCBDIZ (ORCPT ); Tue, 1 Mar 2022 22:08:25 -0500 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 669AFE0AA for ; Tue, 1 Mar 2022 19:07:39 -0800 (PST) Received: from twspam01.aspeedtech.com (localhost [127.0.0.2] (may be forged)) by twspam01.aspeedtech.com with ESMTP id 2222fMCk029340 for ; Wed, 2 Mar 2022 10:41:22 +0800 (GMT-8) (envelope-from tommy_huang@aspeedtech.com) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 2222eKE0029210; Wed, 2 Mar 2022 10:40:20 +0800 (GMT-8) (envelope-from tommy_huang@aspeedtech.com) Received: from tommy0527-VirtualBox.aspeedtech.com (192.168.2.141) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Mar 2022 10:49:41 +0800 From: Tommy Haung To: , , , , , , , , , CC: Subject: [PATCH v6 4/5] drm/aspeed: Add AST2600 chip support Date: Wed, 2 Mar 2022 10:49:29 +0800 Message-ID: <20220302024930.18758-5-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220302024930.18758-1-tommy_huang@aspeedtech.com> References: <20220302024930.18758-1-tommy_huang@aspeedtech.com> MIME-Version: 1.0 X-Originating-IP: [192.168.2.141] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 2222eKE0029210 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add AST2600 chip support and setting. Signed-off-by: Tommy Haung Reviewed-by: Joel Stanley --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspe= ed/aspeed_gfx_drv.c index d4b56b3c7597..d10246b1d1c2 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -82,9 +82,18 @@ static const struct aspeed_gfx_config ast2500_config =3D= { .scan_line_max =3D 128, }; =20 +static const struct aspeed_gfx_config ast2600_config =3D { + .dac_reg =3D 0xc0, + .int_clear_reg =3D 0x68, + .vga_scratch_reg =3D 0x50, + .throd_val =3D CRT_THROD_LOW(0x50) | CRT_THROD_HIGH(0x70), + .scan_line_max =3D 128, +}; + static const struct of_device_id aspeed_gfx_match[] =3D { { .compatible =3D "aspeed,ast2400-gfx", .data =3D &ast2400_config }, { .compatible =3D "aspeed,ast2500-gfx", .data =3D &ast2500_config }, + { .compatible =3D "aspeed,ast2600-gfx", .data =3D &ast2600_config }, { }, }; MODULE_DEVICE_TABLE(of, aspeed_gfx_match); --=20 2.17.1 From nobody Tue Jun 23 17:14:43 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24D1DC433F5 for ; Wed, 2 Mar 2022 03:08:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239245AbiCBDJL (ORCPT ); Tue, 1 Mar 2022 22:09:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236655AbiCBDJJ (ORCPT ); Tue, 1 Mar 2022 22:09:09 -0500 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 662E9E0A1 for ; Tue, 1 Mar 2022 19:08:27 -0800 (PST) Received: from twspam01.aspeedtech.com (localhost [127.0.0.2] (may be forged)) by twspam01.aspeedtech.com with ESMTP id 2222fM1M029342 for ; Wed, 2 Mar 2022 10:41:22 +0800 (GMT-8) (envelope-from tommy_huang@aspeedtech.com) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 2222eK6t029211; Wed, 2 Mar 2022 10:40:20 +0800 (GMT-8) (envelope-from tommy_huang@aspeedtech.com) Received: from tommy0527-VirtualBox.aspeedtech.com (192.168.2.141) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Mar 2022 10:49:41 +0800 From: Tommy Haung To: , , , , , , , , , CC: Subject: [PATCH v6 5/5] ARM: dtsi: aspeed: Modified gfx reset control Date: Wed, 2 Mar 2022 10:49:30 +0800 Message-ID: <20220302024930.18758-6-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220302024930.18758-1-tommy_huang@aspeedtech.com> References: <20220302024930.18758-1-tommy_huang@aspeedtech.com> MIME-Version: 1.0 X-Originating-IP: [192.168.2.141] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 2222eK6t029211 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove the ast2500-gfx from aspeed-g6.dtsi. In the AST2600, the ASPEED_RESET_CRT1 is replaced by ASPEED_RESET_GRAPHICS. This is no differnce between these two reset behavior but reigster location is changed. The HW controller states and FW programming resgiter will be reset by CRT reset controller bit (SCU040[13]). And another part HW controller will be reset by Graphics controller bit (SCU040[26]). These two reset bit need be de-assert then the SOC display will be active. Signed-off-by: Tommy Haung Reviewed-by: Joel Stanley --- arch/arm/boot/dts/aspeed-g6.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6= .dtsi index e38c3742761b..7cc99bc68558 100644 --- a/arch/arm/boot/dts/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed-g6.dtsi @@ -352,7 +352,7 @@ }; =20 gfx: display@1e6e6000 { - compatible =3D "aspeed,ast2600-gfx", "aspeed,ast2500-gfx", "syscon"; + compatible =3D "aspeed,ast2600-gfx", "syscon"; reg =3D <0x1e6e6000 0x1000>; reg-io-width =3D <4>; clocks =3D <&syscon ASPEED_CLK_GATE_D1CLK>; --=20 2.17.1