From patchwork Wed May 10 20:44:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13237249 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 43EBFC77B7C for ; Wed, 10 May 2023 20:45:28 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F4LpUJzk9qtGVTK9u5Z38F8KPiBCDNGoDRqH55bjE/c=; b=1vbjpolWRB7Xdu Hs8Wc5CaMDzKB8VZaP8AMg2memK7oatQCjJ0oOKlJ6qvoo34trXK6EFvtKMXDGjIKAQ+B/Yb5BXA0 /4yyggLXv8QyYRE+JIDGP/jeeIXRA+H2tyjCbb7kMmUbCwGH/N3UDHtwHith6rPlxCVQClhORk9SA bLHZO3YuQFx7zAP4cQ8IQPJ3q/GBOcnLIKJSae8KNzam5X4+yrQmV7DuXWcuV1VMoAzoWOqO7qYKi 2urv1/ZQsieRskcwvueuOLJZd/Rdnu6CmV5UHRwN1bAoqmcTjg2LSSVMEuKQgZPpFAQqZ7lxAqjHk +FIEdzcUnsd+y5JXQ/bw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pwqge-006y5x-0M; Wed, 10 May 2023 20:45:24 +0000 Received: from mail-psaapc01on2070d.outbound.protection.outlook.com ([2a01:111:f400:feae::70d] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pwqgb-006y2d-0x for linux-riscv@lists.infradead.org; Wed, 10 May 2023 20:45:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fc/2JBxBEOdii6kBF2NpbstL4hCf/611r9fSo/wYzZahS2uTlU2d6Llb+l6LPdxXh8FQWz7e+10WkB7j4WhoieJ/XAaYPCufGmczQbxNfiFlI6Ve3ZIvKkR/1TLkr+l27JXhgqIiI5JzxiY55JdpeLWhWplwT4fxVRkO+c7mE8tS1dW+fbslMUsNp7YoOkrcHXWmB5rrWfCsECBZgpaGj7AV2ZGgr9Tr3qXgf0kLpsHgjtm42fVum2guAnCkIjjO4H+ydiUa+jA2vD1ReEgXl/U6vc8cf+F17NfxI9uWWzXWsS070a1zNSAB6whIZTZgJl/8cXGHjhXsonKK8PxMlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wDfkaBo6LjMIW33WCTKeSvbdpXYFdxQLPDeCzZFB8fU=; b=JXP2VtgOCh/KRxMdt3Z/YR+OH5U4rIve7bGqEutkPUz1Ok230QsJIk51A/9oUiJWd+0gL4bHgiMw3yKRNINoRouRHE3m9obe1DD9tuZ/7Sb4Ne4Nol1+gz7M9WlJkuxikSksA7SWffhRfMhSFGnFXiuKlgFjpRIkjN4fRH4sKAH4gqvxL/ELePbxCQ5OQT6ZZdFFgBPbYBRjYEZlOYM1TnE1ObMO60QROaBwTqoFCPVyk87sDlMaVRWxHz8IPLt32U2EC60Is1I0t3DVFwLpEI/oNkKVP3i3pnq4UjKclZfGwOhNI79EmmvSQk0P4fRPHhBEbz00bHvwpvNuwnwL2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wDfkaBo6LjMIW33WCTKeSvbdpXYFdxQLPDeCzZFB8fU=; b=aSZiIWSDJnYvgmJ6TzxoRN4A5mhQBGWamXlVL+Vcdwd5wLTvmKFj9qvi1SKCFNR50jRfJGjDrnD5s2g+xxV1xxQ2PndoQdITLFfQgMlkmtXKTPfkLW+yHuKWN3M3l41XHgVpHAMag4HESocEsRHsvwY4xXUVKRjnoJ6+ZGVL5rNcG+mqZ0LMJzu85qp9GbnSEZceDz6b7Po5VegR/jM0VaYLH/atfmxQF/hICr71X08w83apWuNvtHAwE566QzIFUD4lPH3O097l8PfxG+sGMdTeb50z/n3ddNX2mVj5/HUfa25q+TZuINU3/1hfIgvrhahhCdPJYp6cuitNQPHvmA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TYZPR06MB6468.apcprd06.prod.outlook.com (2603:1096:400:459::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Wed, 10 May 2023 20:45:14 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::76d6:4828:7e80:2965]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::76d6:4828:7e80:2965%3]) with mapi id 15.20.6363.033; Wed, 10 May 2023 20:45:14 +0000 From: Yangtao Li To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Wei Fu , Yangtao Li Subject: [PATCH v2 3/5] riscv: dts: thead: add sipeed Lichee Pi 4A board device tree Date: Thu, 11 May 2023 04:44:54 +0800 Message-Id: <20230510204456.57202-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230510204456.57202-1-frank.li@vivo.com> References: <20230510204456.57202-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0055.apcprd02.prod.outlook.com (2603:1096:4:1f5::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6468:EE_ X-MS-Office365-Filtering-Correlation-Id: b727f876-a141-4e82-a79c-08db519774e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qbYLZ/Hfzx5SoMfxC+rdK8j6dnqjZuT+4eB+45jc0mgu50Wq591e98me7SOCoq6XZxlasO4XI6/wjmD9S9Zw5z8dWkGyumy+b5nnuqMu1i+/QrRqYa7Swjnt5tLQBwikRvF1TrwHj6SGyAtNvJY0QqmFTAdU4NyPzjIDipp/dwU8wzx3i14Hr+vM0yzP7OZQ2WQwK7gkl5mGdJpIlttLPwJ3qxFc0jDGVToLp+/NH9K+zGWnzKmREyncMyRsre8KM1Yd/w3LijxbowirJfF4tRDcBFYTHw/czIs0V7W5wFWYTaJvAQYSwn/PTwuKaBQsGAqVuo0b9Xc6FED86f4BwnIy5gwW+VpwR/xPiu92Xe92WOXfPJaDtv+5UdatOPk62UKuVt7ZTSZVWcNhdRNhiWMoh7Pz6KtNkH+GFQqIaR8dgiz+eL8E5BtDDkJJonYybpVAP+foW4MsJksxQWD0yQLcPmrbbK81tLGxt697Il/mDWP2ihUlWY7eCuKFted4k7MKqON6KHcWrN/tufdIkHPnXwMypzmVrULyR/Iy4N5svGuzME/0u9fgwATVifHPOTY4wHPi0JTfEWrzLjhsBVHRdoW3301deSLMYlDU/CEi5Dg0L2c/dTCskqURUd+N X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(39860400002)(396003)(366004)(346002)(136003)(451199021)(7049001)(6486002)(6666004)(316002)(83380400001)(66556008)(66946007)(478600001)(52116002)(4326008)(26005)(66476007)(6506007)(6512007)(110136005)(1076003)(186003)(2906002)(38350700002)(41300700001)(36756003)(86362001)(8936002)(8676002)(7416002)(5660300002)(38100700002)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bRM0sJ5Xp71vVayi3kO2fR2WJ5eMfnIwKbvlKd9stC7GVrInn88oE6DdCEjPO84Xwl+sH+N6B8eK4Y9xcElGUhrv7dSld3O99f7cg8w70//LI0M+sB1HoNeaCGZQ24xlGPH0p9X0LWgAAsvM+Y0yJn7YepS1IF9pHnxbgW62M/xY7FD4bKxUqmNvrWBbxVIJOH/2UQe+E6Ns/bmSLQlIOGQ9jNm1QF9/PUyBMQHT21XybkSMS/6gVi6osdaMEoLpH3EKUmOIBGtDeZZLdp6ra4SbxoFfDiW6caBLVxfJx/Onum+6aneNPvCzZlDi+XfRI8Bjvow5MPxzdogcV4VY0t8sq9PxAJIG4PXl+4xjPY6AGLHShxCnjsLNrbybISJ0+/mv+NMKIpJjM7glEuL6PKqRRGmH3lVAggP2B3K9tba6YFmJ3GmdXgZfttRWJ95MEA2y4bQ+cgi/IMUIC1xLSWPbZ7gYqiHtvoue4AdnFrAwvlpmhwZAyCQjjqsM/lMu1AEh/55w8BI4RBOjxMvXb1X1oNgyGzg6c32Fgf4Bw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S-Exchange-CrossTenant-Network-Message-Id: b727f876-a141-4e82-a79c-08db519774e1 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2023 20:45:14.6807 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qK0W0rH9B1tAQCquY8fkyiKPM0txB43NvVfZi+i30kygiSR7L98dDRoKhmBb/v3Oza6nz2FVD9Ba+OvHpgd0+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6468 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230510_134521_335110_C994ADC8 X-CRM114-Status: GOOD ( 13.41 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Jisheng Zhang Sipeed's Lichee Pi 4A development board uses Lichee Module 4A core module which is powered by T-HEAD's light(a.k.a TH1520) SoC. Add minimal device tree files for the core module and the development board. Support basic uart/gpio/dmac drivers, so supports booting to a basic shell. Cc: Icenowy Zheng Cc: Wei Fu Signed-off-by: Jisheng Zhang Signed-off-by: Yangtao Li --- v2: -cleanup `light` arch/riscv/boot/dts/Makefile | 1 + arch/riscv/boot/dts/thead/Makefile | 2 + .../dts/thead/th1520-lichee-module-4a.dtsi | 39 +++++++++++++++++++ .../boot/dts/thead/th1520-lichee-pi-4a.dts | 33 ++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 arch/riscv/boot/dts/thead/Makefile create mode 100644 arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi create mode 100644 arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Makefile index f0d9f89054f8..1e884868ccba 100644 --- a/arch/riscv/boot/dts/Makefile +++ b/arch/riscv/boot/dts/Makefile @@ -2,6 +2,7 @@ subdir-y += allwinner subdir-y += sifive subdir-y += starfive +subdir-y += thead subdir-y += canaan subdir-y += microchip subdir-y += renesas diff --git a/arch/riscv/boot/dts/thead/Makefile b/arch/riscv/boot/dts/thead/Makefile new file mode 100644 index 000000000000..e311fc9a5939 --- /dev/null +++ b/arch/riscv/boot/dts/thead/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_THEAD) += th1520-lichee-pi-4a.dtb diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi new file mode 100644 index 000000000000..bc5f8677d546 --- /dev/null +++ b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2023 Jisheng Zhang + * Copyright (C) 2023 Yangtao Li + */ + +/dts-v1/; + +#include "th1520.dtsi" + +/ { + model = "Sipeed Lichee Module 4A"; + compatible = "sipeed,lichee-module-4a", "thead,th1520"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x00000000 0x2 0x00000000>; + }; +}; + +&osc { + clock-frequency = <24000000>; +}; + +&osc_32k { + clock-frequency = <32768>; +}; + +&apb_clk { + clock-frequency = <62500000>; +}; + +&uart_sclk { + clock-frequency = <100000000>; +}; + +&dmac0 { + status = "okay"; +}; diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts new file mode 100644 index 000000000000..86d677175feb --- /dev/null +++ b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2023 Jisheng Zhang + * Copyright (C) 2023 Yangtao Li + */ + +#include "th1520-lichee-module-4a.dtsi" + +/ { + model = "Sipeed Lichee Pi 4A"; + compatible = "sipeed,lichee-pi-4a", "sipeed,lichee-module-4a", "thead,th1520"; + + aliases { + gpio0 = &gpio0; + gpio1 = &gpio1; + gpio2 = &gpio2; + gpio3 = &gpio3; + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; + serial3 = &uart3; + serial4 = &uart4; + serial5 = &uart5; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&uart0 { + status = "okay"; +};