From patchwork Thu Sep 15 01:51:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu-Chien Peter Lin X-Patchwork-Id: 1678098 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=gr9JOGyW; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=HRJeMLUs; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MSgFV4mZJz1yp0 for ; Thu, 15 Sep 2022 11:52:44 +1000 (AEST) 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: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:In-Reply-To:References: List-Owner; bh=LOWUp9zZk0xK9DvcWyx/SoZVaP25T5YPVuepyNGADbM=; b=gr9JOGyWIacRaG HaxHyUzjQsYpTP57Aeh/Zap7dFpPL4zsW3rxsU+vJfgmoq9FElc21W1UTGZtCpwoAzsV/xAXIFuWa CmmfQkLySo28u6UF6HxGXKrVLh5w36Omzbg3IPOHYOdJEBvjMAcguYc+tVIHfAv8IuOliRuFHaHe8 lbp5Q22B68nukI+Inp637ls412mZjqbZvuPDcK/om334S+SrKWF+QEydWi/Mb3VN0Z3Q1NufByim1 qwpLnL8BLGgHqdBFpUOioX5GgrSznFEDnKOxs4Z+k2+3p+96a9oYtemLV5aaTV7mfuF+g3Oxu8ipd L6vAo8iVHxNYSKWbRijw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYe3G-00Eb8I-HG; Thu, 15 Sep 2022 01:52:26 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYe3D-00Eb4q-Ix for opensbi@bombadil.infradead.org; Thu, 15 Sep 2022 01:52:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=DMsc5bnE/3KfowbPrVvZVM74yrxk9/+BXLozo32Vuq0=; b=HRJeMLUsZJUhjj89Wf0kFbI+1g 3DM/UsfFsZ7yvIC1SYQbfK/rwi6E1wGRd6KNL/ShTj+sQCO2yjdddQtAYoOGFGp02XHEPJvUAxl3S fC8LhreBy/dlQzXpx9nb3e39qs6EOWxY+uc832Jp+5NfqWvT1Kvf4AjHc71hwdIi1pg5KDzx9TsF0 X38gHtHg6/6JfRD+D3mj/I0tIwZKIe3QXrSWceYT5rI2ln60/QFHekkN5RV95kd4+1/vqA/sYz1S0 CrDeUNpiZfCKbvErHBKLVojz6DKVjomx/kvqq32vo3I/xUglhz1kq34miNii46+6aUlamP2R9lknK 0RJ64pvQ==; Received: from 60-248-80-70.hinet-ip.hinet.net ([60.248.80.70] helo=Atcsqr.andestech.com) by casper.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYe39-000g8U-NP for opensbi@lists.infradead.org; Thu, 15 Sep 2022 01:52:23 +0000 Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by Atcsqr.andestech.com with ESMTP id 28F1pRRR077016 for ; Thu, 15 Sep 2022 09:51:27 +0800 (+08) (envelope-from peterlin@andestech.com) Received: from atcfdc88.andestech.com (10.0.15.120) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Thu, 15 Sep 2022 09:51:28 +0800 From: Yu Chien Peter Lin To: CC: , , , Yu Chien Peter Lin Subject: [PATCH 00/12] Add Andes AE350 fdt driver support Date: Thu, 15 Sep 2022 09:51:09 +0800 Message-ID: <20220915015121.27596-1-peterlin@andestech.com> X-Mailer: git-send-email 2.34.1.390.g2ae0a9cb82 MIME-Version: 1.0 X-Originating-IP: [10.0.15.120] X-DNSRBL: X-MAIL: Atcsqr.andestech.com 28F1pRRR077016 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220915_025220_954986_90A92784 X-CRM114-Status: UNSURE ( 8.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.6 on casper.infradead.org summary: Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 TVD_RCVD_IP Message was received from an IP address 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 1.0 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org We move the devices used by AE350 to fdt driver framework, reuse or add serial, timer, ipi, irqchip and reset drivers. The OpenSBI domain support is also enabled. As of now, we can use Kconfig to manage these configurations that can support variants of Andes platform and SoC like Kendryte K510. Yu Chien Peter Lin (12): platform: ae350: Remove cache enabling from platform final initailzation platform: ae350: Use kconfig to set platform version and default name lib: utils/serial: Add Andes fdt serial driver support lib: utils/timer: Add Andes fdt timer support lib: utils/timer: Add PLMT mmio region to root domain lib: utils/reset: Add Andes fdt reset driver support platform: andes/ae350: Use fdt irqchip driver platform: ae350: Add fw_platform_init lib: utils/ipi: Add Andes fdt ipi driver support lib: utils/ipi: Add PLICSW mmio region to root domain platform: ae350: Add AE350 domain support docs: andes-ae350.md: Update ae350 documentation for fdt driver support docs/platform/andes-ae350.md | 191 ++++++++++++++++++++++++- include/sbi_utils/fdt/fdt_helper.h | 6 + include/sbi_utils/ipi/andes_plicsw.h | 47 ++++++ include/sbi_utils/timer/andes_plmt.h | 32 +++++ lib/utils/fdt/fdt_helper.c | 113 +++++++++++++++ lib/utils/ipi/Kconfig | 9 ++ lib/utils/ipi/andes_plicsw.c | 84 +++++++++++ lib/utils/ipi/fdt_ipi_plicsw.c | 113 +++++++++++++++ lib/utils/ipi/objects.mk | 4 + lib/utils/reset/Kconfig | 4 + lib/utils/reset/fdt_reset_atcwdt200.c | 122 ++++++++++++++++ lib/utils/reset/objects.mk | 3 + lib/utils/serial/fdt_serial_uart8250.c | 1 + lib/utils/timer/Kconfig | 9 ++ lib/utils/timer/andes_plmt.c | 54 +++++++ lib/utils/timer/fdt_timer_plmt.c | 107 ++++++++++++++ lib/utils/timer/objects.mk | 4 + platform/andes/ae350/Kconfig | 30 +++- platform/andes/ae350/objects.mk | 2 +- platform/andes/ae350/platform.c | 165 +++++++++------------ platform/andes/ae350/platform.h | 17 --- platform/andes/ae350/plicsw.c | 139 ------------------ platform/andes/ae350/plicsw.h | 44 ------ platform/andes/ae350/plmt.c | 107 -------------- platform/andes/ae350/plmt.h | 17 --- 25 files changed, 997 insertions(+), 427 deletions(-) create mode 100644 include/sbi_utils/ipi/andes_plicsw.h create mode 100644 include/sbi_utils/timer/andes_plmt.h create mode 100644 lib/utils/ipi/andes_plicsw.c create mode 100644 lib/utils/ipi/fdt_ipi_plicsw.c create mode 100644 lib/utils/reset/fdt_reset_atcwdt200.c create mode 100644 lib/utils/timer/andes_plmt.c create mode 100644 lib/utils/timer/fdt_timer_plmt.c delete mode 100644 platform/andes/ae350/plicsw.c delete mode 100644 platform/andes/ae350/plicsw.h delete mode 100644 platform/andes/ae350/plmt.c delete mode 100644 platform/andes/ae350/plmt.h