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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 92296 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3926903vqo; Wed, 10 May 2023 14:20:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6JNBsknfRsr6R9O/i4qMA3RNrIYlfvurP7kW1NG8kwSafrk/g0LPYZy9ywgpIgJX8UKvKb X-Received: by 2002:a17:903:1d0:b0:1ac:7624:51d7 with SMTP id e16-20020a17090301d000b001ac762451d7mr12143783plh.69.1683753657873; Wed, 10 May 2023 14:20:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683753657; cv=pass; d=google.com; s=arc-20160816; b=y55E7vY2+Gzw7xo6e1sj4CgqWhsHBSWTKrHVAtS8QwvBlnRO3eqDQ1+Dzpl9yeuSle /7rgI2mLlcx3zUuFzoFqWR56nCEkLI/hSeq6ChZrISuPzPJFc3RQXPu+ZDOkvMoDvfgI cjcSQoWnoUvKsAeFUZTVTAd2/8TXpYS7K6t1PAQ2Ma/xK7XIPH63ujqmqomWSlTKxsE1 lYryQUcfaGtM9h9b2BB6F3XV6DdtRsz3W13bSsXUv9F/zrnlgcXaoecxex/pl888bgCu wgLpWniOOupuugeQTcaF7fY0j55lZ/gLhO8NxDIJ5Pc1wS9G/8gfJuQuzTNiRs5dH84z vPbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wDfkaBo6LjMIW33WCTKeSvbdpXYFdxQLPDeCzZFB8fU=; b=X+jP7m8eGeYLUtOBxomtg8cVNv7mN5Z1eEgZDTgOnwHP7u8lM9LYr8HlgSUOAeX9iL rfvTfsE1ve7mitgcoHewhLKqlZCl9i8tsKqgNOvYdi8GVXqT3/wkVbX+uzvVY7r0SyO2 ilmOWIh221L8Br8zspOF8P2DSb4BijTmcoCiX8XebUaJfhct+nSpdv8VNCU1aT5cW1nP nJ0iZUHybdseiwO6x21pmD4JtGkinJdNGXpgp1jZ6OOmCPyBCPRJrJHH+uEGGqAKc7Bf kkHwWUTVsJ1KijEdVsflfaOINJAxn1CLt2HGavl5otYeQbQxNZymzOpQKNHH80vVMc7Y kT/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aSZiIWSD; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c16-20020a170903235000b001a6d9cd5560si4298014plh.541.2023.05.10.14.20.45; Wed, 10 May 2023 14:20:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=aSZiIWSD; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236662AbjEJUpV (ORCPT + 99 others); Wed, 10 May 2023 16:45:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236650AbjEJUpR (ORCPT ); Wed, 10 May 2023 16:45:17 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2122.outbound.protection.outlook.com [40.107.255.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39093198E; Wed, 10 May 2023 13:45:16 -0700 (PDT) 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 Cc: Icenowy Zheng , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org 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+NMKIpJjM7glEuL6PKqRRGmH3lVAggP2B3K9tba6YFmJ3GmdXgZfttRWJ95MEA2y4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Aq+ajHrHPjKnbC5+vOjgc0ne1UKWYcFbLY/G+AWMtuWW4PrmAyXuTBxhpVmUS5V7iDL3AJD3P9tN6wBeU X-OriginatorOrg: vivo.com X-MS-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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765543675073390026?= X-GMAIL-MSGID: =?utf-8?q?1765543675073390026?= 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"; +};