From patchwork Tue Sep 28 02:56:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12521655 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D19D6C43217 for ; Tue, 28 Sep 2021 03:35:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A724261052 for ; Tue, 28 Sep 2021 03:35:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A724261052 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=nRYHOx+NAcQSEDICwmC5Dg2in8YS2As4i4Lht707b70=; b=ftAhwtQ9qqM333 AJQkJrHOvPE0jrhitRnV5KW4ZCDgi2C4b3Z1IbG1kgmNbhmDQJXwvC/cj24NaKpfai+xiRD1c6o30 WzQyU7vTfa+CPTEONooSS/g41lyN3llAKoejTTA81DKtkjHWsw7nPzLi2xPuz2k5YAxRVrxneldm2 RK2uB1283fhCfzznR3OxL2Uzf2C1iidgYQ2ANAiFnXfc3nymX+Qn+oOrVdvqjv8BfcC4lrNNQ0K+g My2yM0HMZORbmRPBZfudtY3bOTFWFCkCseXkY0+AYYErw4yYsfImCxS1rrxX4OHIBza3qS5bMeIRr c2WhQt0V8VLzSyFe60UQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3rl-005Qf6-RJ; Tue, 28 Sep 2021 03:33:14 +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 1mV3rK-005Qdz-9g for linux-arm-kernel@bombadil.infradead.org; Tue, 28 Sep 2021 03:32:46 +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=OpqhA4D3rDR/6JLDymH+WZ1RRRK1zLWbZ+JCvbLv1vo=; b=kAQkQ8fVPnsMLSdWcdkEiqAVUF +SrCaHp5kGWKPk7EN4zpHaKvJAIxxFu/jwdzEneN2/nJACIrVdZf6WvPu4mPtplpZdPbIEJ9wqciU cEZfkDq9JyxMKZllub17gYeeOAffWnsLIXp+q82rMdQqlKsj3KDqOESyJPnWibMahKt97fvFrNm5i USdOBis9MN7kit7hf6fwWGK/b1SQLho/JGHyw/P0ySM7sBpSAmGVZzs2e0QBZzTQ70DGJL0dT2UU5 ZZTjnNXRX/zdYoMSe9v33JLkG6kxv13aKngCMoTRQH+pwa4hGeuW4g1iI37MMPqus/IeM04ngvUkz GuhE5fFg==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3Ja-006OIQ-6B for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 02:57:56 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 18S2aUxL072685; Tue, 28 Sep 2021 10:36:30 +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; Tue, 28 Sep 2021 10:57:10 +0800 From: tommy-huang To: , , , , , , , , , CC: Subject: [PATCH 1/6] ARM: dts: aspeed: Add GFX node to AST2600 Date: Tue, 28 Sep 2021 10:56:58 +0800 Message-ID: <20210928025703.10909-2-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210928025703.10909-1-tommy_huang@aspeedtech.com> References: <20210928025703.10909-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 18S2aUxL072685 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_035754_813047_F50F00C0 X-CRM114-Status: UNSURE ( 9.28 ) 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-huang --- 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 Tue Sep 28 02:56:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12521649 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E937AC433F5 for ; Tue, 28 Sep 2021 03:35:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7E7D61247 for ; Tue, 28 Sep 2021 03:35:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B7E7D61247 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=g4DKmqni20KW030HltORwgZgYwGl6UzFLERoYd9Q4Kw=; b=DPZq+p8F/LKD54 46wD7EdL5RcG2fJF6Nv14zmL5njy3f8RZCequHfqqepDEUfXybr53DgJDBP/IlmaV4NUIODSo1USd zHRjLpBKG0/BR8yA7bGOj1EOEVk0/vfnecRkmKiBnfayD7Qk2hUXPDdPrGH9iFp0/D3+IarnTJDAt 0Ja+AXoJ+lUEv/BX7tt0k7FhaB43CgsXorfTbdnSp9EJJTAZgJJnt/R+VmxQfE+I7comO2zxBQbN+ sKC5YTekP+tis+yRtJViX1ZX949hmbQz3bHn5GIK+VZBTZKVN/3L3zI80cyVn3BMJp3OqRpNMoHbv KA9mt+G5ZUcYx/oVZE4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3rw-005Qfu-El; Tue, 28 Sep 2021 03:33:24 +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 1mV3rL-005Qe5-Lr for linux-arm-kernel@bombadil.infradead.org; Tue, 28 Sep 2021 03:32:47 +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=5O3kUhsXaBPwPCoMWY+zwGzRf0sFu6yNIkfVDfO1+Vw=; b=YemkDu5c2Ncxg1NonG9WzypKEU HoZpwv0ELPkqG6BMZQ4KCDVPIkuxne13LLAu7w05tfjjBxj+ARVKh4hFKpm9IlytqY0TJshT1oCkf xEnJEEiYSB79LgqwQ+UpExNFWkwMVO/zCUAQCITafGXBbdUXRwpejJSHCosG3n1UzZVc9ihNxao35 s7EMbAjKYJFF9BQCmfycLKOel52qG5xFqRm3+p+dlA7YtpvjKlDz7rQYp+VS4sWwfujO4GwJD9eNZ mfeWOw4/G69xlao4xVxFldWwh1BSW+JyQLZl5qBWuKlHye7V2mpalzn0m9CHDDm8MWyyGvI0biBaj lLVGwB/Q==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3JR-006OGy-5T for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 02:57:48 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 18S2aUQd072686; Tue, 28 Sep 2021 10:36:30 +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; Tue, 28 Sep 2021 10:57:11 +0800 From: tommy-huang To: , , , , , , , , , CC: Subject: [PATCH 2/6] ARM: dts: aspeed: ast2600-evb: Enable GFX device Date: Tue, 28 Sep 2021 10:56:59 +0800 Message-ID: <20210928025703.10909-3-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210928025703.10909-1-tommy_huang@aspeedtech.com> References: <20210928025703.10909-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 18S2aUQd072686 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_035745_778461_DB19E691 X-CRM114-Status: UNSURE ( 9.25 ) 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-huang --- arch/arm/boot/dts/aspeed-ast2600-evb.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-ast2600-evb.dts b/arch/arm/boot/dts/aspeed-ast2600-evb.dts index b7eb552640cb..195ccd1952da 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"; From patchwork Tue Sep 28 02:57:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12521651 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CC43C433FE for ; Tue, 28 Sep 2021 03:35:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 28C956120F for ; Tue, 28 Sep 2021 03:35:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 28C956120F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=mjupHGQwVYHmAOrF1RyM1CYPy/UrycI5D9rgYE753HY=; b=uCARJ89o252LX8 N9OENwwnG26vsDN/HzAbjvO+RGQ2JPy2Y/ZBP/ajm4ivJtnzNtaIOgqPH2y7BaaRrFiOG/B9qul/6 NDy/6RYSJU2WzK98GdFrboBZUVnzi5n9aQIvbnc16lNtrmQ/b45qtP2dVY9TdU9Ui6oEcGi7kxPtd zNtpF2VcN7mzR4GQMB0Jf0ffQrJQInQCKV8ho4iLtETFkR5duzN9wesU7SFEmJnT35r/Brp91xCqM 0BG8EswR4RTfJT5xKlq0zEvh19KPq84OERw3PZZ6u4DY2uGKHbY131eUR8mazTGl/bBKucZR+BDU4 9MXR9P3YHfTw2z+Xx+eA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3rI-005Qdf-34; Tue, 28 Sep 2021 03:32:44 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3rF-005QdU-Re for linux-arm-kernel@bombadil.infradead.org; Tue, 28 Sep 2021 03:32:41 +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=AW+UDoKusiFOoTGG3avakLYiKLn1BrDuLOe/rG+liEk=; b=ky3i66Mt0sgP1ykt8SflFKCT86 vI/0biblW4e06jHtRn6ki5TQp4CTOHcTWpyQY6forUgP7ytCnFK4tfZkRoMpxPLNAFV0vtME2YOkX BXX/bXWs3CLX11qKGcjU1To6pC+xlC1KzZp+qQ+efu1NzzCo52cnbqDgDTJpVhfLFi6/xhXQdinLE yh5jIRd8GCek7+N4NJQ/WWTiQM+kVQtgbJdVZJsSu0DUeuOLlfsh5n+LjZorfQgJRdm+YVcPbE3K1 1w9WuRapFNfrdU32+QDVWRF9RRRcR61kuyEM1FyuAVFJhd+lbS8SSDw/tbbnp0XZx80GipRskQsCU d++a5Brg==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3JQ-006OGw-RW for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 02:57:48 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 18S2aURW072687; Tue, 28 Sep 2021 10:36:30 +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; Tue, 28 Sep 2021 10:57:11 +0800 From: tommy-huang To: , , , , , , , , , CC: Subject: [PATCH 3/6] drm/aspeed: Add AST2600 support Date: Tue, 28 Sep 2021 10:57:00 +0800 Message-ID: <20210928025703.10909-4-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210928025703.10909-1-tommy_huang@aspeedtech.com> References: <20210928025703.10909-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 18S2aURW072687 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_035745_467322_5E6F7ECF X-CRM114-Status: GOOD ( 10.62 ) 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 values for the threshold and scan line size come from the ASPEED SDK. The DAC register is SCUC0 in the AST2600 datasheet. It has the same layout as the previous generations. Signed-off-by: Joel Stanley Signed-off-by: tommy-huang --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index b53fee6f1c17..ea9cb0a4f16c 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -79,9 +79,16 @@ static const struct aspeed_gfx_config ast2500_config = { .scan_line_max = 128, }; +static const struct aspeed_gfx_config ast2600_config = { + .dac_reg = 0xc0, + .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 Tue Sep 28 02:57:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12521659 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C291C433EF for ; Tue, 28 Sep 2021 03:35:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB0CA6120F for ; Tue, 28 Sep 2021 03:35:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DB0CA6120F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=iI594YbEGbWBXCdtrQLZZ6cC0KtWTEnKj57g1cNPz4I=; b=seov/Wb32av43B KyDIJ7a8kNBTirXQiX5OMqmJb1r3Et6RmpJAVGELQ2pOSRjFb8Ff61Mgl2yEJpgHdYOB2mv1pCXKE bMihB9HwLTLyYaDJldruL1ONRNuDvCz89A/BDvSHa9HkvMrEcey68vt97APukM9KbaywuLLBsm7kG /j2bGLPz4EDM+NTmpfkhyvC89H3wepvwvOMyXt4crbZAw19GWFChHfVVSUz4ILvOqtn5pVIwH2yun +k/dBudmlCzA3W+VEFGMX+s2XRvKAg08mvIW+FVZapW0ei3ZQMrB5u3sbIzZU/t/waM54Ap4Dc2Bk JAgMvZWNYorlPgygag4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3sM-005Qni-3b; Tue, 28 Sep 2021 03:33:50 +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 1mV3rO-005QeI-Oe for linux-arm-kernel@bombadil.infradead.org; Tue, 28 Sep 2021 03:32:50 +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=931IsQotfAaMXZU6PYBPuJWDCm2X0ZXKyT6a1M6Pa9k=; b=p6YX249CLsVhK+K4usY3Kmi88C 8kjTl25PWDI2g7Y1zLY1s7VkQIsS8V523l0XLOLF6EpNEyf9WkmbXqXpbGhnckMXuDi8HsuZzX+Rj vaqac8kUoL+L5FlR0S5RIPHchDqMdPDX3gFCLTleaYE8aMmLr+RqLWQKwSJj6w+/o/g0c+jKVKwj8 pKQ4PYwqdwXq6UM076rpFM/00Vjwyka7j0f4skZ66s07uhMNPXI4vhJkHiOg0xNKJt8YBYqGcXHi7 qmK/EyddaUwr9Y5A7+NJACRxgxpsJ31nD0bqwl5u7wRIKWJDfDdD8jPJMyKb8wgsrugmyVbpcCTT1 qU9i+IBw==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3JR-006OGx-Bv for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 02:57:49 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 18S2aUKk072690; Tue, 28 Sep 2021 10:36:30 +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; Tue, 28 Sep 2021 10:57:11 +0800 From: tommy-huang To: , , , , , , , , , CC: Subject: [PATCH 4/6] HACK: drm/aspeed: INTR_STS hadndling Date: Tue, 28 Sep 2021 10:57:01 +0800 Message-ID: <20210928025703.10909-5-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210928025703.10909-1-tommy_huang@aspeedtech.com> References: <20210928025703.10909-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 18S2aUKk072690 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_035745_945092_1CA5CACF X-CRM114-Status: UNSURE ( 9.91 ) 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 2600 uses this register differently. THis is a TODO to come up with a method of handling that. Signed-off-by: Joel Stanley Signed-off-by: tommy-huang --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index ea9cb0a4f16c..33095477cc03 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -126,7 +126,8 @@ 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); + /* TODO */ + writel(CRT_CTRL_VERTICAL_INTR_STS, priv->base + CRT_STATUS); return IRQ_HANDLED; } From patchwork Tue Sep 28 02:57:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12521647 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52D00C433F5 for ; Tue, 28 Sep 2021 03:35:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 11F4B61052 for ; Tue, 28 Sep 2021 03:35:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 11F4B61052 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=1R6aeusXGwkppnc1PaieKr5cW/JpcrJznj6s7bxHPAA=; b=cjFX5sGq1argD+ teeZdgFQvlV+Fr58MuT732NIv2wjfXOSGUC7hK38r8Ba+Zb9ZQqBDo6Tg+cd4zb9JnIOBEX9FYS8D eodFERN/BG9OcJuMaG1sBEojPxnxyLZ2hwiv2YtpkPxkqT0D+TV1SN+GnNNf83l7xWc+fXlrM4T46 eZ4Ug0Z/CsUMZ+9LAV1QFjeYvY8L69sAw6cYsigfFAvMNt1ZJnz1Vu5Pap8S0sS3Y5KFQWXFLQ+Cg al4uMhvVIbIGQ+hLPC2V2lRxqqqs2j4SRnY5zu7v1ojpFd/beZq8keDj/dhUFDmjAnlBK04VNwSIw 8R7dPqEh5tkz9voL4BQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3rc-005Qer-0A; Tue, 28 Sep 2021 03:33:04 +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 1mV3rI-005Qdr-V4 for linux-arm-kernel@bombadil.infradead.org; Tue, 28 Sep 2021 03:32:44 +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=iD4ErqgMYxz3NvL22GK177t/dqWcu7jiZA/Ozz+2ErA=; b=qRCabVj47qfjCmu/u2VBA4fGeb kzfJ9+4rGcMk4A/DHxjpDBfZgxnW9Ez+XEFG+Z+bnstp856Z7YiZs2IoUbNwIaCj1zQHzTyPg1Iq3 XZE9Awn79osDqcJDfnGievxZ5KdC4GBcoiPSKdTjc34IKEaD9dTXTsN2UNUIXKZYM0xgedj6O+gWn NtU1EhUywEQW/uYSMrVhuHmqoEf+9Pg4uYm7m3GG/96pNC7eJe8gNoaKydtkOA7a0035bc9UGOkY0 xgJ4NJwOLAz8t64DObuCnmplCNk+ya9yeHwjkxcJ6FuT/bWlPw3lwd6gnuGMAK9IvCniJQAF7A9yn VmJ8Rdiw==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3JT-006OGz-1V for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 02:57:50 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 18S2aUKl072690; Tue, 28 Sep 2021 10:36:30 +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; Tue, 28 Sep 2021 10:57:11 +0800 From: tommy-huang To: , , , , , , , , , CC: Subject: [PATCH 5/6] HACK: drm/aspeed: Paramterise modes Date: Tue, 28 Sep 2021 10:57:02 +0800 Message-ID: <20210928025703.10909-6-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210928025703.10909-1-tommy_huang@aspeedtech.com> References: <20210928025703.10909-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 18S2aUKl072690 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_035748_504209_02DE65C4 X-CRM114-Status: GOOD ( 11.13 ) 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 AST2600 will run at 1024x868. Signed-off-by: Joel Stanley Signed-off-by: tommy-huang --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index 33095477cc03..11a44b08bd3f 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -99,7 +99,7 @@ static const struct drm_mode_config_funcs aspeed_gfx_mode_config_funcs = { .atomic_commit = drm_atomic_helper_commit, }; -static int aspeed_gfx_setup_mode_config(struct drm_device *drm) +static int aspeed_gfx_setup_mode_config(struct drm_device *drm, int width, int height) { int ret; @@ -109,8 +109,8 @@ static int aspeed_gfx_setup_mode_config(struct drm_device *drm) drm->mode_config.min_width = 0; drm->mode_config.min_height = 0; - drm->mode_config.max_width = 800; - drm->mode_config.max_height = 600; + drm->mode_config.max_width = width; + drm->mode_config.max_height = height; drm->mode_config.funcs = &aspeed_gfx_mode_config_funcs; return ret; @@ -201,7 +201,7 @@ static int aspeed_gfx_load(struct drm_device *drm) writel(0, priv->base + CRT_CTRL1); writel(0, priv->base + CRT_CTRL2); - ret = aspeed_gfx_setup_mode_config(drm); + ret = aspeed_gfx_setup_mode_config(drm, 800, 600); if (ret < 0) return ret; From patchwork Tue Sep 28 02:57:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12521653 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92A7EC4332F for ; Tue, 28 Sep 2021 03:35:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5A46061052 for ; Tue, 28 Sep 2021 03:35:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5A46061052 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=/3Pf1UaaXrwlzlVyi/oVmL8ipwYWzHgiFQmtHRPRtlc=; b=Ezx6RwI423dkqU 8UFS2x9sBwTp5gvzPa7f0oehizAvWWR4j7R78hbsPLHtRUqfjuhNd7xQhGKxwkusH6uRsdj70pklP G7C1/2vlEaq+0SPyip06S4MdlFsvFSoKszYXSjtFiCiXcqneekhVgb1hifyWh1F0SI0R4EJY7tMAF ytfwp4fnltn9bMoydrn97DmM3XCq59d5O/OJ309nQ+PXjhELTG0z8dmZDpYi7ktrJZDiKeTROohkw pQ+6V5gRktrxWgobqNWfvDPpFiiWXWzEZSEQeELRV7y3GiuAXL3FtzC/VbawCNdKIBElP4DjSBXfb uwWk5YZ+2T/BVJ2JAECg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3rS-005QeS-3l; Tue, 28 Sep 2021 03:32:54 +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 1mV3rH-005Qde-HL for linux-arm-kernel@bombadil.infradead.org; Tue, 28 Sep 2021 03:32:43 +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=WJjjXF7iYUArnuRiW/++rPKF3u5yo+k4owqPxxVpkHw=; b=JXlNZ+pDj2ZAq/6D0StUbB08tB FyfGj7iY4y/qN3Q/SLYAaUExNzHHt8GGT74P32uHaviMWjB0+KgOIFMzj0WDrRwyI40JZoETzczMC d2ccsuC8jjHvPl7iYm0r00iZovK9EFLShH5QDABW8sXBvWap215LExb9fPMoBDbshU6ZFLGyjyprB TpCQFW02S+rJPfbsMfVitQ3slIuKmrip9NDnFXBJaa1jqplfdsuVrY+StItFILwuWlc0woog+fWAX RvJ3nS7wX5DlghjP061/+k69yJ7/x43pRgGtKhZ/EkhDgvLo5UsIJAbeH7ng/n5o90YTWUrmKAMvw hCYG/2jA==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3Jf-006OIh-V2 for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 02:58:02 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 18S2aVAJ072697; Tue, 28 Sep 2021 10:36:31 +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; Tue, 28 Sep 2021 10:57:11 +0800 From: tommy-huang To: , , , , , , , , , CC: Subject: [PATCH 6/6] dt-bindings: gpu: Add ASPEED GFX bindings document Date: Tue, 28 Sep 2021 10:57:03 +0800 Message-ID: <20210928025703.10909-7-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210928025703.10909-1-tommy_huang@aspeedtech.com> References: <20210928025703.10909-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 18S2aVAJ072697 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_035800_575462_10C49742 X-CRM114-Status: UNSURE ( 8.64 ) 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-gfx description for gfx driver. Signed-off-by: tommy-huang Acked-by: Rob Herring --- Documentation/devicetree/bindings/gpu/aspeed-gfx.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/gpu/aspeed-gfx.txt b/Documentation/devicetree/bindings/gpu/aspeed-gfx.txt index 958bdf962339..29ecf119cef2 100644 --- a/Documentation/devicetree/bindings/gpu/aspeed-gfx.txt +++ b/Documentation/devicetree/bindings/gpu/aspeed-gfx.txt @@ -3,6 +3,7 @@ Device tree configuration for the GFX display device on the ASPEED SoCs Required properties: - compatible * Must be one of the following: + + aspeed,ast2600-gfx + aspeed,ast2500-gfx + aspeed,ast2400-gfx * In addition, the ASPEED pinctrl bindings require the 'syscon' property to