Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1551775lqt; Sat, 20 Apr 2024 22:57:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV6U+aryJ4MMXduuxp9x5ypUeSMaW+9NnqFWGkx0GVeXOZB+TswtUuIoLvzHIOsVC6XhDd6ASkoP3iEske5+6r7fJwrVRmGNeVXUGP2Mw== X-Google-Smtp-Source: AGHT+IEYQRQcI2jVqYhv/KJC8jryWpbvEyz//LSB3Ku5J8Qph1UFv0eb7MCl7KJdFG/sIEobIDp6 X-Received: by 2002:a17:902:ce8c:b0:1e7:e7ed:7787 with SMTP id f12-20020a170902ce8c00b001e7e7ed7787mr8594480plg.51.1713679050360; Sat, 20 Apr 2024 22:57:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713679050; cv=pass; d=google.com; s=arc-20160816; b=mfhW2iwnI2qHigs11QzeTpJAEqE7gSLHeXlu/t5bzPgaeNGKFWR+c3o3tHRo09CYT3 VKD9MgLIzsi+VK2Ri0DQwP3ynS+MB45gHZSp04yy9Lfuk0x3XSi3gxOhHsM/REg3iNiq FciAt0VR8QfbNk4hKGnNJ7Sz0ojJGaQ0LD9QcmbWqf6TUbN32l7md+FmmXdVIlGX0Htv Kgofqd7rIQggiKrwv6kz8FO25ewE83/XhKlFmgvhW0KHiqdDyITeEVr10JCVkDpgLCPI TPASrbu22uofzuzhjH6+FJhQPtRLczLWaYQRZhqcmINOXf4NnvEdJzd60kmhzhDj58gc gryQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:to:subject:cc:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=g2Kjmtq3Ybi5b8tattuXhRtpcAjxJmV4CBtd58iYrr0=; fh=E7UKcDvnMDDRpOMkR3U1+Al5VTzbyUzXGI+kPJNsoEw=; b=S5QdWmRsk+16mVSYeXy2TnM1Z0rRYx2hBty4bceyOhDTwbGmTRcTd+NyR3w+U2MGI+ bc3B9IS8Z2KUutTC88i+ovRQAtfKuSCFb7VJtR6o/V/mGyULNM92jejooEZAbccUnWLa sRnqCSyUne7GRHYayXibwCEayj8MNKZ/sPFhN411Lo8RMmtcj3rfdapkstI8lGPls//h WByZa7KDsjBHfKnz6e3WD7vuVSvaYEOdHeNbCgWASGHhbiLrhBKHGdR6UFKi/C+UdIWA vzdAuDR98XE/l0rjmKi5zy+Ot5XhTkimgBs6Z4aUzBw3xnunlItqpZ9oyVzZCrNDQjAS JxnA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=d4KjKCq+; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-152448-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152448-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d21-20020a170903209500b001dcd4f9fd0dsi4914034plc.455.2024.04.20.22.57.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 22:57:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152448-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=d4KjKCq+; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-152448-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152448-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D561BB20BEB for ; Sun, 21 Apr 2024 05:57:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2322CD299; Sun, 21 Apr 2024 05:57:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="d4KjKCq+" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A89F205E09; Sun, 21 Apr 2024 05:57:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713679035; cv=none; b=FS9v7Sni7BYKfze/IPiEKxVOCQbhkx7W3imqbyRg3tYCHrD/nSN9eAnyB1/M1Da5l+PXiRG8AJc+Ng2Q8V/oACnQ/DxLxyrXVHh2V/9bA1PLJ4C4zYBnWy1HkcuQdo/oTYpLsIswQdEYZ+Lg7SH5WS9g84erhxZg51TOClSimy0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713679035; c=relaxed/simple; bh=HYAdyF9w3Py4palVMx8BhCLJkMMxu/UozC/oJYUDqM8=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=dahMHs8H1y19ymHmPSveuKmvNJCb3tNS7dn1PqQFm/UyhIss6s2YINpBYPCZtt+skK/1FPruwo6o3ASCLEwlczPX9JCQORGcth0xC/8OoVwZe9sj/Pp2iBAK5iVQ51P01jMWv3IZzjWfdd9Zme9HnOOzMkxVOmCpZIxN53XoSvI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=d4KjKCq+; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 207B540003; Sun, 21 Apr 2024 05:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713679024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g2Kjmtq3Ybi5b8tattuXhRtpcAjxJmV4CBtd58iYrr0=; b=d4KjKCq+u+3vSraYnDy7e+yvNOQXi1W3H6Vimzr/Wo/QpqS53ewWw9HX5A1vo7ZoaTLkzE SDfV/p3+7skZXNlTP29vVva5sj2qg1elJ4A3L9PSdqpxM5D1GIJdLNSIIzK1HUjqnFgJsg uODQ0wUQFk2VuFI+hxhUnWP+pW3ivnvTM/ms3iGSda90JIz2HM+EFxCsGztM2RioHAdX0l AnjZCADOdeNbbP3ommWGIHZuUJ3ogJWeaWyBCjZ/S6ekhIW/sAkeK78+DQIPzXZd33fUUO 8Nf/FzFArX94aS2PaCT+aHR72EuiTrDB3EAcKLpvA8ltAppwOnqAoIWoiCmKzg== Message-ID: Date: Sun, 21 Apr 2024 07:57:01 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: michael.opdenacker@bootlin.com, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/2] riscv: dts: sophgo: add initial Milk-V Duo S board support To: Inochi Amaoto , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Paul Walmsley , Palmer Dabbelt , Albert Ou References: <20240417065311.3881023-1-michael.opdenacker@bootlin.com> <20240417065311.3881023-3-michael.opdenacker@bootlin.com> Content-Language: en-US From: Michael Opdenacker Organization: Bootlin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: michael.opdenacker@bootlin.com Hi Inochi Thanks for your advice! On 4/17/24 at 11:34, Inochi Amaoto wrote: > On Wed, Apr 17, 2024 at 08:53:11AM GMT, michael.opdenacker@bootlin.com wrote: >> From: Michael Opdenacker >> >> This adds initial support for the Milk-V Duo S board >> (https://milkv.io/duo-s), enabling the serial port, >> making it possible to boot Linux to the command line. >> >> Link: https://lore.kernel.org/linux-riscv/171266958507.1032617.9460749136730849811.robh@kernel.org/T/#t >> >> Signed-off-by: Michael Opdenacker >> --- >> arch/riscv/boot/dts/sophgo/Makefile | 1 + >> .../boot/dts/sophgo/sg2000-milkv-duos.dts | 34 +++++++++++++++++++ >> 2 files changed, 35 insertions(+) >> create mode 100644 arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts >> >> diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile >> index 57ad82a61ea6..e008acb5240f 100644 >> --- a/arch/riscv/boot/dts/sophgo/Makefile >> +++ b/arch/riscv/boot/dts/sophgo/Makefile >> @@ -1,4 +1,5 @@ >> # SPDX-License-Identifier: GPL-2.0 >> dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb >> dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb >> +dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duos.dtb >> dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb >> diff --git a/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts >> new file mode 100644 >> index 000000000000..c1ecf97d5e93 >> --- /dev/null >> +++ b/arch/riscv/boot/dts/sophgo/sg2000-milkv-duos.dts >> @@ -0,0 +1,34 @@ >> +// SPDX-License-Identifier: (GPL-2.0 OR MIT) >> +/* >> + * Copyright (C) 2024 Michael Opdenacker >> + */ >> + >> +/dts-v1/; >> + >> +#include "cv1812h.dtsi" >> + >> +/ { >> + model = "Milk-V Duo S"; >> + compatible = "milkv,duos", "sophgo,cv1812h"; >> + >> + aliases { >> + serial0 = &uart0; >> + }; >> + >> + chosen { >> + stdout-path = "serial0:115200n8"; >> + }; >> + >> + memory@80000000 { >> + device_type = "memory"; >> + reg = <0x80000000 0x20000000>; >> + }; > Add a cpu specific file, and move this to it. Now that I'm including "cv1812h.dtsi", which has the same structure, all I need is to change the reg setting to have 512 MB of RAM instead of 256MB, right? See the V6 I'm sending soon. > >> +}; >> + >> +&osc { >> + clock-frequency = <25000000>; >> +}; >> + >> +&uart0 { >> + status = "okay"; >> +}; >> -- >> 2.34.1 >> > Add necessary DT node in the cpu specific file. (clint, > plic and clk). You also need to rebase your patch based > on sophgo/for-next. Same here, cv1812h.dtsi already configures &clint, &plic and &clk, so it seems to me I don't need to make changes again here. At least the board boots fine for me as it is. Cheers Michael. -- Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com