From patchwork Sat Aug 12 00:47:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 13351624 X-Patchwork-Delegate: mail@conchuod.ie 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 E0CFAC001DB for ; Sat, 12 Aug 2023 00:47:58 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cE6s19qkBiOxRpv71wvNE6DYjs3u4aQ31jZbOgpJoAI=; b=vIInVitxPbuSYX /VRkLyv5Wo1LreCQ/tdwsYJw9MP21iCD6flFMu2z/VONaf++0/KwEC6pwn/gjpKEuLIHaaUsTcsl8 K2P2pUVbKDsvGnanxLSrXLiVqTu9sAoZaJ8gRtzs6ZzoNs9PIWiIrvLyKoJG1cdZOfoDFDktnm+io z13I+2oYGNyhTLwHksSRQtSMBVK1+GLP/AIEPAU9jlUFv+dg18NHu+4Jpa1mH+V/89XbUqgzLkg52 CI++0z64YeIwSQxU/BWupFhC+27CuPpaHAN4T5zAEHg818Rq1TY2si4YNRGKrjNZtVO0B3nw5ZCNN wd3G9hjdaKUqaWV7wUnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qUcnC-00CB6s-0C; Sat, 12 Aug 2023 00:47:46 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qUcn8-00CB42-2h for linux-riscv@lists.infradead.org; Sat, 12 Aug 2023 00:47:44 +0000 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-26b2884bec8so666514a91.0 for ; Fri, 11 Aug 2023 17:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691801258; x=1692406058; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=HmdmIvNh/weap9MCOBtwxIGhp4oicSDBRHV6ZK3T3dg=; b=QALbaU6x4orin16gFjGYFXKD8oGQjIw3f/9c1lDaQisRvcVGSdUeygN4poOY5EaTiT vIiSPPBWTXpu1GXMSz64WqbRy+39EBM4uHCRZZgFqrbl5GBBtBvKLBdPzy9yraK88DD2 AdqZZgngOWqDcDaYszrnQFV+W5Xcx85sxgp/5gHJwelLFYd3TzNm2ekSrY74aRhPpzih 0xYwwjIm4owYuFouxYnBT5OEQESo0gM7hq4Cxv6R+bHFhSQsuZTAFJpAiX7nimEOpOKC wIeV7CTAO2/cxcCFP0C6+xMvxVfKKFNXc0oNnx4ZZqkeEcPI5+9eMmsmjoD9LULyRGWr feuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691801258; x=1692406058; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HmdmIvNh/weap9MCOBtwxIGhp4oicSDBRHV6ZK3T3dg=; b=IjQew9Y/ZEeG/DmbZmNmxX5h+21Fub0fHfg0p4XD6cQWiwZBY30ZSPuoK+dr2UcdNl j5Oj8WLJeYRBnFvZ9IlWKPwa9B+uzhG+xOupxYWIeW9BqASFT/alWQBREyCV5n7wuL58 T4/JeIYdKogTHkrxhoM2hbmGUMU+KiTj/mH+zP0H7cO01aGxFmjAzy6N905RsO5AU18q 5dfCDNNdv9FYvvohddAYb9ATA1+oanRz3sMCVTU4djMzBJeHuK3SnTIGlXp7qV/XvvdM 3gAwGmZXgzlou573jWYvC5iTBkG8XXn2GahOmE5YZUiRAzsfAVD5lDgh3DlIDji6svaR sFog== X-Gm-Message-State: AOJu0YykOxN8qttG7v9c0g2a8E2ZBNP1EZK+UggSjXrUYyaIJz7W175m 3ivHlRuHHilzX2fXiNlfHPsYvw== X-Google-Smtp-Source: AGHT+IESs2XUKo+SiAONsY7RNLNHDIvsAKRSKpimxWRh15azy5U0zARIzqL0fSIXLqJ9NMuoZMuMeQ== X-Received: by 2002:a17:90b:2350:b0:262:e6d2:2d6 with SMTP id ms16-20020a17090b235000b00262e6d202d6mr3034198pjb.47.1691801258387; Fri, 11 Aug 2023 17:47:38 -0700 (PDT) Received: from [127.0.1.1] ([2601:1c2:1800:f680:5b85:b986:e090:9abc]) by smtp.gmail.com with ESMTPSA id c11-20020a170902724b00b001b246dcffb7sm4559247pll.300.2023.08.11.17.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 17:47:38 -0700 (PDT) From: Drew Fustini Date: Fri, 11 Aug 2023 17:47:16 -0700 Subject: [PATCH v3 1/2] dt-bindings: riscv: Add BeagleV Ahead board compatibles MIME-Version: 1.0 Message-Id: <20230811-ahead-dt-v3-v1-1-aef2294bed86@baylibre.com> References: <20230811-ahead-dt-v3-v1-0-aef2294bed86@baylibre.com> In-Reply-To: <20230811-ahead-dt-v3-v1-0-aef2294bed86@baylibre.com> To: Jisheng Zhang , Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Nelson , Jason Kridner , Drew Fustini , Krzysztof Kozlowski , Conor Dooley X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691801256; l=1099; i=dfustini@baylibre.com; s=20230430; h=from:subject:message-id; bh=3zE3DAtWNRR0RNhye3g4EXsbaTzQt3JjGH1aItoKzE4=; b=omtPwIJKWc6olP3mETH19n3OvHpWkCCS9zbRPPpPd2NcvHtbTP4tQ3pYM0vJeQrTFlCGyHUVI lqqqwZdSxG9DCjl2nSY1KKXRyn2CO6LwGZ3uF034IbMQi7QOJKAqaBH X-Developer-Key: i=dfustini@baylibre.com; a=ed25519; pk=p3GKE9XFmjhwAayAHG4U108yag7V8xQVd4zJLdW0g7g= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_174742_872343_C8624347 X-CRM114-Status: UNSURE ( 7.90 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Document the compatible strings for the BeagleV Ahead board which uses the T-Head TH1520 SoC. Link: https://beagleboard.org/beaglev-ahead Acked-by: Krzysztof Kozlowski Reviewed-by: Guo Ren Reviewed-by: Conor Dooley Signed-off-by: Drew Fustini --- Documentation/devicetree/bindings/riscv/thead.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/thead.yaml b/Documentation/devicetree/bindings/riscv/thead.yaml index e62f6821372e..301912dcd290 100644 --- a/Documentation/devicetree/bindings/riscv/thead.yaml +++ b/Documentation/devicetree/bindings/riscv/thead.yaml @@ -17,6 +17,10 @@ properties: const: '/' compatible: oneOf: + - description: BeagleV Ahead single board computer + items: + - const: beagle,beaglev-ahead + - const: thead,th1520 - description: Sipeed Lichee Pi 4A board for the Sipeed Lichee Module 4A items: - enum: From patchwork Sat Aug 12 00:47:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 13351622 X-Patchwork-Delegate: mail@conchuod.ie 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 3B76BC0015E for ; Sat, 12 Aug 2023 00:47:51 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CU2Is6xpZfpUrPg89JfVD6/5aRwL+kX0pEuev6bX7oo=; b=tGeBJBCgmXx6VQ lV5ELWHgOo/qOAv0D3tmFnkKFgiBMKkr8zCXKqOCsy5tkQPu6GKOs2cgGaLBkf2UtJr6RYVSNAOgf zbGZBxLcI0uDoYAy8Msbgh3fJU3neBf93MEK1xsdE8/MxQBmM7Q9w/lmtbfoMGtSiUCcW0OzUzqC4 yIGF/5iLDGjAM4AC2/HbFbCNtUOvvipWTm+s2K3NFFUbvJDunt1IRZSmWtzf3dJa4AK76l9v9+pA7 ZQ2Pto7MS+tFfPLJVpci1BXORLepyihaV4ijFDJM3nIhyls8kMBCRU29PfAqAa+s78YoWAw8WL+UP sQIJJsBiJNe5D+JgjvqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qUcnC-00CB7C-22; Sat, 12 Aug 2023 00:47:46 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qUcn8-00CB47-0w for linux-riscv@lists.infradead.org; Sat, 12 Aug 2023 00:47:44 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1bdba48eccdso8684235ad.3 for ; Fri, 11 Aug 2023 17:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691801259; x=1692406059; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=05BikiCLpUIHGHjBbtQXpjem9/6VYbL8VEjebyzDVSo=; b=Nfo84er8B87Ux9oCI5j+m3UNMamRr/ciYPhN73kyWkhw7OIsCMQvJv7TXg37w3Ybh8 4ZKe/7qjsdKUiUsNd/wAe/YQQtDHl1SatFHBhDQ0l2wahIB0rAGDPhRQhH2Ye3h0fRjp R0+afrfQ76Oiab8sNaY976b0rpV8yLs6KcP0d8vvTS7I43DBb2i/0w6OeoLitpveyjJ6 J40f1AAjoRw0r2+mv9mOMOYapXGipSTC3pVf1B/QPMCtmuqdtg/lnZnnLH4kxI0xj09F PzO1zINiaC+dG3XJZ94sPNMsiW6nLKmW4xCuQnAXhWkp9iU5fWFxlrawJNE2BScbW6HL YwJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691801259; x=1692406059; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=05BikiCLpUIHGHjBbtQXpjem9/6VYbL8VEjebyzDVSo=; b=dfHRsXltscEoC8wURQjQUCAaveJ0I4VWgDJzItblDSBtDJjqJgFtBNkCHj/Ba+zQtJ cbjldxO3DC6i0f1DPxAQNhz76AYAPNhANngRLFQbV4zkQ88x/grp7ON6h762ATgRgNug 63+Ko0E7GxpKfALxplrJb+UeHiw0LbsDg+cOvET+XooiuBT/3D6HOsbdUFZ8haLUXZUP VOwj+Xvlq7BvuEcjgn16RKQidwmFpp0bX5ihra3h1B6LdQZhfvItlfs/ZjfE0WaG4aUi Sgmb2QZwBxNthltGzaIc7+LzBHmoFEu99WNNNAJXIP86nPH6qv1jNtH1udnhDAOuws97 Vugw== X-Gm-Message-State: AOJu0YzSSV/ss45n3M7GA5CFqqgDzRxj0CjynudjGN6VJwWYR77/mMcG RCrgQEyk9ZHFSWhxq2ToAD9xaQ== X-Google-Smtp-Source: AGHT+IFdDX562eGbJtNruygyIF2dN53hOpTDe7X+mKpz434vbf5cpu8OlnawmM1dZhBGKfVOn3zixQ== X-Received: by 2002:a17:902:b591:b0:1b9:ea60:cd82 with SMTP id a17-20020a170902b59100b001b9ea60cd82mr3320103pls.5.1691801259187; Fri, 11 Aug 2023 17:47:39 -0700 (PDT) Received: from [127.0.1.1] ([2601:1c2:1800:f680:5b85:b986:e090:9abc]) by smtp.gmail.com with ESMTPSA id c11-20020a170902724b00b001b246dcffb7sm4559247pll.300.2023.08.11.17.47.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 17:47:38 -0700 (PDT) From: Drew Fustini Date: Fri, 11 Aug 2023 17:47:17 -0700 Subject: [PATCH v3 2/2] riscv: dts: thead: add BeagleV Ahead board device tree MIME-Version: 1.0 Message-Id: <20230811-ahead-dt-v3-v1-2-aef2294bed86@baylibre.com> References: <20230811-ahead-dt-v3-v1-0-aef2294bed86@baylibre.com> In-Reply-To: <20230811-ahead-dt-v3-v1-0-aef2294bed86@baylibre.com> To: Jisheng Zhang , Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Nelson , Jason Kridner , Drew Fustini , Conor Dooley X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691801256; l=2256; i=dfustini@baylibre.com; s=20230430; h=from:subject:message-id; bh=Z2atrlGM8tcTPwr3A1Vti2dKZVGQj5R9fuQgJnqj1sI=; b=oyWcZ20LG4j7WS2sLMTHpSAPtOXFSF78Rdy3L88QLepL03Vrvp9oXTy0m39sCgx5A3inTSWkA cGzxPKP4sijASypHQEOtJpEM9fUMs/KYFXZEiA84pK6GCc7iOI/rzg1 X-Developer-Key: i=dfustini@baylibre.com; a=ed25519; pk=p3GKE9XFmjhwAayAHG4U108yag7V8xQVd4zJLdW0g7g= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_174742_332301_01B07D79 X-CRM114-Status: GOOD ( 13.32 ) 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: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The BeagleV Ahead single board computer uses the T-Head TH1520 SoC. Add a minimal device tree to support basic uart/gpio/dmac drivers so that a user can boot to a basic shell. Link: https://beagleboard.org/beaglev-ahead Reviewed-by: Guo Ren Reviewed-by: Conor Dooley Signed-off-by: Drew Fustini --- arch/riscv/boot/dts/thead/Makefile | 2 +- arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 61 ++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/arch/riscv/boot/dts/thead/Makefile b/arch/riscv/boot/dts/thead/Makefile index e311fc9a5939..b55a17127c2b 100644 --- a/arch/riscv/boot/dts/thead/Makefile +++ b/arch/riscv/boot/dts/thead/Makefile @@ -1,2 +1,2 @@ # SPDX-License-Identifier: GPL-2.0 -dtb-$(CONFIG_ARCH_THEAD) += th1520-lichee-pi-4a.dtb +dtb-$(CONFIG_ARCH_THEAD) += th1520-lichee-pi-4a.dtb th1520-beaglev-ahead.dtb diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts new file mode 100644 index 000000000000..70e8042c8304 --- /dev/null +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2023 Jisheng Zhang + * Copyright (C) 2023 Drew Fustini + */ + +/dts-v1/; + +#include "th1520.dtsi" + +/ { + model = "BeagleV Ahead"; + compatible = "beagle,beaglev-ahead", "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"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x00000000 0x1 0x00000000>; + + }; +}; + +&osc { + clock-frequency = <24000000>; +}; + +&osc_32k { + clock-frequency = <32768>; +}; + +&apb_clk { + clock-frequency = <62500000>; +}; + +&uart_sclk { + clock-frequency = <100000000>; +}; + +&dmac0 { + status = "okay"; +}; + +&uart0 { + status = "okay"; +};