From patchwork Wed Mar 2 02:49:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12765451 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6103C433F5 for ; Wed, 2 Mar 2022 03:36:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OUZr7IT8HPdcOb5iNCZ48dXcyWKOwu5GLJb+jRKHI9E=; b=RfOMkl1KuAG3he J9Enk9wrXBvsAIj+TmZI/JdRjhBGFIaU3j6MIgG2jgBEDMsqoHTQNBPLbMd6VYc51hza7NS3nQAji OfHCwGm8e5yyVZhKd2ePUT7RQBVtCf54v3hoGBYC+qA6YcL/MX75zWItJGMdzFMnjzD/NBraTUJ/1 GVMn2+fag0Wc1T5zuDjoUGorsvAdwm1Qt8+I7jgCfdWggv52S8ULyzzKDvgQk0ogST+7bkSVqAbQg c7jObep1QN2nvH94V1cE0DSJFXE5XWnXnheeb3Lrmm46Y6+GCT09EHlqy+Ln9D6/RI/+ufS41D4yL uAm18yjec5DVPGIHZnKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPFld-001JJH-SE; Wed, 02 Mar 2022 03:35:10 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPFlL-001JGV-3m for linux-arm-kernel@bombadil.infradead.org; Wed, 02 Mar 2022 03:34:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Ugcp7e7Mq2aykseHT1hKGUC8LM6xP148RVzt/Kqye54=; b=KJk2i48WFBbvPBs0dbNIcIrU+q U8OsM0QqbVH9fXyXYMrx7i2r5hN672gKK5ZwhzIVTQUuvivexBEVUXypv34ZYmPfDD4v1u4mwq5rX 8cdOZt/cWylZFcB1DXyyVnUKpaWKirBGdLnb9m2VW6/pfnRX1yBwIX5pwlewHjy8EecIK17E8TLsR R0OFc+7gdS/xlE3+ahuxFLxq/QfnPcRhaTUBw9Os9lzs06eJvMryBwcUqW2aeouZdt0h05yu7xfOM nXx8gcmVHJaLjrSnESAx/zEWd1sMPz9TWFrRHDJDKPFDqbA2ce85plmk6ugbjh+6T6SFsylHh77NT 12glOUHA==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPF4R-00ESbq-B5 for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2022 02:50:36 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220302_025031_924928_D55B8B36 X-CRM114-Status: UNSURE ( 9.47 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Joel Stanley The GFX device is present in the AST2600 SoC. Signed-off-by: Joel Stanley Signed-off-by: Tommy Haung --- 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 = <100>; }; + gfx: display@1e6e6000 { + compatible = "aspeed,ast2600-gfx", "aspeed,ast2500-gfx", "syscon"; + reg = <0x1e6e6000 0x1000>; + reg-io-width = <4>; + clocks = <&syscon ASPEED_CLK_GATE_D1CLK>; + resets = <&syscon ASPEED_RESET_GRAPHICS>; + syscon = <&syscon>; + status = "disabled"; + interrupts = ; + }; + xdma: xdma@1e6e7000 { compatible = "aspeed,ast2600-xdma"; reg = <0x1e6e7000 0x100>; From patchwork Wed Mar 2 02:49:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12765452 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DEF65C433EF for ; Wed, 2 Mar 2022 03:36:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dxjRF81lHqjcXfewxWzA/YlvEHzhkIoY6zbQ1JyCBwk=; b=AsAWiAVxhTixhS vZZ2xf8Bqr/4lAIPhEzUXGybuAXc30rt2LglcRMTE8JBiKREDB5i5P5c1HWoDieaS9EAvqbnDq2VU N5d+V8SntTSwfJcVqz+LL/ur+09J5GM6AZYOzUEXvrJFe63rkhzMeXRnAKM03GUE8U+IK6OCVD/8G Wvgafe4RJtctvxN7eXoK5BysZf4SKDgdt1KxbrqwQx5yXhZ/7i//4vpqLi18SULDV+6j5aXJwHNdW ONtJ+11NFeVgsD73poR+/NUuDNp1Q3aYF+qdJdIgx09jftvDbSioiTZrRR3sm0AJExrTpCvJzZIqi z2JrGUr6QjcSScLFIJYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPFln-001JL6-CL; Wed, 02 Mar 2022 03:35:19 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPFlO-001JGg-B5 for linux-arm-kernel@bombadil.infradead.org; Wed, 02 Mar 2022 03:34:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=2xsB+z7xaDRhagfsEnWIqqJJn4aA0+dNJ/w9tMPG7aI=; b=JO0xckyg4R+TC15WiTjDd+JZYu aztTzahjMrqFuAfNvIICGLquRwwX8EQiqddq1Ay1+epjr0JetCkRWQJHFCKqGjFc423mC4iPWSCy0 Cf7JIqattl8u7X18VFat2+bK0+J39dGXc2rkXL8ZWodhDwHzgXHAQdg5Qs4Bep9EESzMtyxEJ8VwZ lpK2LJk+DpyaIGjWlwDoEGgVA0n3187yQpDw5T4WQgoDoAMgrDa5uWwcXe60OrO7NB79YIRdb0FmY TQVcnxEQ1zc3aKl610QHz9677jSvTcGbWzLDuIrB87Ow3LutyDHMoMlgitMATNYMmedwPweftvLGZ YSzfon2A==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPF4Q-00ESbn-Vo for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2022 02:50:33 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220302_025031_669489_E6727A01 X-CRM114-Status: UNSURE ( 8.68 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Joel Stanley Enable the GFX device with a framebuffer memory region. Signed-off-by: Joel Stanley Signed-off-by: Tommy Haung --- 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/aspeed-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 = <0x80000000 0x80000000>; }; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + gfx_memory: framebuffer { + size = <0x01000000>; + alignment = <0x01000000>; + compatible = "shared-dma-pool"; + reusable; + }; + }; + vcc_sdhci0: regulator-vcc-sdhci0 { compatible = "regulator-fixed"; regulator-name = "SDHCI0 Vcc"; @@ -300,3 +313,8 @@ vqmmc-supply = <&vccq_sdhci1>; clk-phase-sd-hs = <7>, <200>; }; + +&gfx { + status = "okay"; + memory-region = <&gfx_memory>; +}; From patchwork Wed Mar 2 02:49:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12765454 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0992C433EF for ; Wed, 2 Mar 2022 03:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LWlBXrqgx/q6R+uWbM7LHDzfQBs6lvAKhkDoMBqBBvo=; b=nj2ETCq+VDueSt EqCHxNc/XfupMBQBcb4MZIhfLT8itI1r3/25JL3SzWyd4JnFOOoAYRWKXGA3bu6Yie75GNof4UL7x 1FEYr6o39VZrxCmOa9SAQ4XbXeM4xbjxrRrJvJ1o9K0EcpXN3T8phLbcBgTpJtPRLxGsWwvvgFq8k HXvCqS9403+wNwkfrCuzzYBCFCugbSfW9qHEqEjDjvE1RIkWiKDE78HXG50P/yo3zHnIDtT6WG7L4 Z7vqLd2q+eO9gWqQdmspv5BXYvrQ12+1vumwEyfWSjk45gTpDPLv3ZfkfxM5AnTR5BajKSyuDZXFH CHeqtyb8UqyfWgCaO4tw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPFm9-001JS2-3G; Wed, 02 Mar 2022 03:35:41 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPFlR-001JHK-79 for linux-arm-kernel@bombadil.infradead.org; Wed, 02 Mar 2022 03:34:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=FWSpQplewefRQkO77dNWZ9xhCH9cPcxw+Z0MAE1r9AI=; b=UQZ3VYPDXcwoz2tYuVhAQbMySE 41kS8juea9BYQfKFEt/RW+U8KR51CXCSGCGM4YLdKaqXEyoYiBAzCFm+4bTyUXCHnzf6OMaqi9Lpl BOPVzvG1l51y2deXF5goKx17EB93at7Ikc6/0DiDD7Mk6BH6uVovBY9SR4nXJmmjk0rrVq6el2Rv8 O4gQI9asRzvcd24WoGJDoAH1sOyxH6xPyyN94pqr27HPsbBvNndO9/w5eIolMXKTGYq48FsXvogAJ 0kpXOhbu/8lNoCeZ51y3PrjuthflkSsIXVCh408HN4TMEVQwVrUME+Yku1DhqOsjzxHKUH+3OoTBg fMfBk2ag==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPF4Q-00ESbo-W4 for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2022 02:50:34 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220302_025031_686545_1F35D0B7 X-CRM114-Status: GOOD ( 12.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add interrupt clear register define for further chip support. Signed-off-by: Tommy Haung --- 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/aspeed_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; 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/aspeed/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 @@ 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 { static const struct aspeed_gfx_config ast2400_config = { .dac_reg = 0x2c, + .int_clear_reg = 0x60, .vga_scratch_reg = 0x50, .throd_val = CRT_THROD_LOW(0x1e) | CRT_THROD_HIGH(0x12), .scan_line_max = 64, @@ -74,6 +76,7 @@ static const struct aspeed_gfx_config ast2400_config = { static const struct aspeed_gfx_config ast2500_config = { .dac_reg = 0x2c, + .int_clear_reg = 0x60, .vga_scratch_reg = 0x50, .throd_val = CRT_THROD_LOW(0x24) | CRT_THROD_HIGH(0x3c), .scan_line_max = 128, @@ -119,7 +122,7 @@ static irqreturn_t aspeed_gfx_irq_handler(int irq, void *data) 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; } @@ -147,6 +150,7 @@ static int aspeed_gfx_load(struct drm_device *drm) config = match->data; priv->dac_reg = config->dac_reg; + priv->int_clr_reg = config->int_clear_reg; priv->vga_scratch_reg = config->vga_scratch_reg; priv->throd_val = config->throd_val; priv->scan_line_max = config->scan_line_max; From patchwork Wed Mar 2 02:49:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12765453 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DFEE6C433F5 for ; Wed, 2 Mar 2022 03:36:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NzwbgKxbnOsmkSugKtl2R03u+fi3YKTXG2iBttWC7q0=; b=BZKbq3WGN0FJvy z1XJNlGNxJY88K3LZeBxSDiGlLG2QCUhnxKRWfpw5W6QY5mgw/CnZJpxu7CTNItp3mK08ofWfjnl+ x/SGAxrpfRnToDREIjpof836/Z84473C3xeQgKxyckOsXSKnIKt6i81H26h6RCQfiQCAkf0jWNmrM aXcb9ZQPyKvthENN4FOZcGTnX8S2uiAxxY/ObOidscr4otwlCwa8GV2o0OAgiw4Xj05ul5c9c1DAz qvY9xVB3WEaQCRO7aYB52+CqZ+uPenBZy3q/ogaKND7pUsC3sryV+gGIzPSVYNGMg27Y76aRwmy9h ysfh1ATphBjpaE2vurGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPFlx-001JNm-H1; Wed, 02 Mar 2022 03:35:29 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPFlP-001JGq-PU for linux-arm-kernel@bombadil.infradead.org; Wed, 02 Mar 2022 03:34:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=1xUnfboqNsyKAU3qieJiWR1Uy8ZBCRePVeYLaK17s0c=; b=qiUzgCgV3ZZcdbZ5xV4SkJNiMm L8GawIUx0b1QJa/jLtigofrBnQww1AAP7LGZQkS0kSuviLpvMOXHNY3iT+1nFXiyiMwcTy0LKIBz4 thtkasZED2NvSkXvT9XwjOPCbtPiJK5D6X4dzRW1V0Bi3yYGAV+AfgR1xGN2OcayzQDme4ESl14L1 rUA6wUCejc+4H48PJUKXjL5pKzQasOv+7munQ4a9drpD14AOSSg9AYscNtudcsnPI4m8YTFDnQ0Oy op3hhr8X2cIFcq691DJD7/QJFvLFnRGIHzRSvAOYtVgN88ZIpAtPVYbdTjytisnPNu4hpQ0c7+b2n i1dGnykQ==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPF4Q-00ESbr-VX for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2022 02:50:33 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220302_025031_624372_1F763E36 X-CRM114-Status: UNSURE ( 8.98 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add AST2600 chip support and setting. Signed-off-by: Tommy Haung --- 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/aspeed/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 = { .scan_line_max = 128, }; +static const struct aspeed_gfx_config ast2600_config = { + .dac_reg = 0xc0, + .int_clear_reg = 0x68, + .vga_scratch_reg = 0x50, + .throd_val = CRT_THROD_LOW(0x50) | CRT_THROD_HIGH(0x70), + .scan_line_max = 128, +}; + static const struct of_device_id aspeed_gfx_match[] = { { .compatible = "aspeed,ast2400-gfx", .data = &ast2400_config }, { .compatible = "aspeed,ast2500-gfx", .data = &ast2500_config }, + { .compatible = "aspeed,ast2600-gfx", .data = &ast2600_config }, { }, }; MODULE_DEVICE_TABLE(of, aspeed_gfx_match); From patchwork Wed Mar 2 02:49:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12765450 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35C15C433EF for ; Wed, 2 Mar 2022 03:36:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yvga/6v/fuTHKVYwsZIXxVi8qmkaZfqeCQK6PEnZMYI=; b=ZP0izt5L0RzsUX 7vA3Kc1vBzGsn79jW1MBrEgC3LKrNYeuSpHtG0dLW+LfpDefp3whC7MX8r5YTEoUGcC6JCK8FP8/E Z0rbyWtrqBVlyYecA/4xV4PE9BTqrgspNkMGMoHAoTeqd08sED0E0/+qDF1WFFfKY8VvwMi59/kvf PLzgkxSuQlsq3IFQHqVyP2U0eK27sCx5cYffvikDotJlPEhlsOLQQcfiPLYymG9/y6GIRJOFyqCOc /ppdZGty+D9UiY24Hrl4WsUg2TOmCrVInQyAW12yZGlKJB39T7ghimkIjopYkiuy0zTEBZLJf6/6j Lu9ONEoZgxp8kLEJhEYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPFlU-001JHp-Hr; Wed, 02 Mar 2022 03:35:00 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPFlJ-001JGI-JV for linux-arm-kernel@bombadil.infradead.org; Wed, 02 Mar 2022 03:34:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=coaZ++2kw6d43MMBLkxVZMXqTQPVNAhBbqAogosDdOE=; b=Rx/V1g7tDVNELCAnPT2H9Fe8N+ TKGb8Nl2w+GY3qDLaUgydb0z5ktV5+DydFJXhIxN1cf3JnPI7lfCZCrrM1oz+27r4fyO9ZNuZUIXQ 33O4E0OEFa6AL3nwY+Wf/0DsCTle3YfiHvwcITFz6QHUyR5HlRXicR1VW8erHLE0HIZ00bhblR+VI HAVi2eMSH1XQuwkbTzrD8PnZUyPMSuYbQ67d+3mMTCG+Kf1xaLT9LxmS7vDBid/YyWgIb99Uz4CHj A6FS1OkpXE/AdZxJV9U9gPRAYT7dpFwpzsusq1igNSOl/QqyK16VsSJSVe+B7C3I+FeB876hzVdvP lqFg0BDg==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPF4R-00ESbs-Dw for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2022 02:50:36 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220302_025032_011950_3A1FB208 X-CRM114-Status: GOOD ( 10.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 @@ }; gfx: display@1e6e6000 { - compatible = "aspeed,ast2600-gfx", "aspeed,ast2500-gfx", "syscon"; + compatible = "aspeed,ast2600-gfx", "syscon"; reg = <0x1e6e6000 0x1000>; reg-io-width = <4>; clocks = <&syscon ASPEED_CLK_GATE_D1CLK>;