Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1490775lqz; Mon, 1 Apr 2024 07:58:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVprJs3RA4bq71y/lD+TrwViVMw98U3NMg1QkP8+HrCgfzT157dzJIhmmo0s8uP+d/NsA9550Qotk3HIXpe638Y4lGtuGE6+AC+vNiI1Q== X-Google-Smtp-Source: AGHT+IGSy60+VgmLTtxeTRYA8JaSIcRH5Y01t7U0ushlQvPYVKGuOgTtGoG2+sc/18JkJXko70Gc X-Received: by 2002:a25:4c83:0:b0:dcc:bc92:6704 with SMTP id z125-20020a254c83000000b00dccbc926704mr7808453yba.18.1711983490427; Mon, 01 Apr 2024 07:58:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711983490; cv=pass; d=google.com; s=arc-20160816; b=s2Ar+KT8Dr2KoiTyeOLfp8mDylIklUqaH2Qcx2HT7K6bRJKMciq4Rf+iUElJUbH2YQ N2VFD9uawuRl22TLkNNpilhNROD3+HeAO8Pt9tB6FSVv+JNjEx7bEZt5aQja5xd4ss35 5tL5ben5/f4v2OaEgiQXhQoOFx+mt7aBR2OApy0VuU1ykRZ4NNxd1qFOBpYtxXuZLI9C /jk0aahNvrpexbavi8qHwNMETYOSV/nWM9cDBKMOMfttO/LSrNTFaVGEe/r90d3NDmCv J0+l2jlmeADGKBUHp/wnMa5LbcJ40GhROMsAKqPvG3mSdlhp07G6F69u1ta2U1ikj/2O SlXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Tb+J/p22HHmda+9PsXu/dUF9BBeNTs210ZQ8zgjImRY=; fh=p/29yExycAUgHJY+8KMsEkDuV88fxN+84FWO6jQbrA0=; b=ptRtH1ubkhp3XCFiI+SGbZhLcCjArTmao/zWDDMCLxOgtIo/+QuaTLyB4b6kSeOOSF 76FwbsDrvODQlaB2b6G9FJBTLO4MEt06mn6Fmp4RsI3pGTdGPeICRsj28XTu35VuRAMt cek/6fsRk0AYyMcSP7n2Tba6yWY4j0WUUOLuoFCB+T4atW/TGXPGj3+nZH1TQoC+BB4o WcKR2td6rzeAt8ILJRZsUyDefbadIpd4cBK1uIb0GIKhZGChBOpOpxUOlnxPtWoQKrsm dcKiqOogNMoHP7a8KNuKhqXAGy7eFvOkTJaAMEVS+aA0G+A0PosR91S8pqk4bVmreeNp klfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sgku0LzN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-126766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m24-20020a05620a215800b00789f812f4d4si9932821qkm.440.2024.04.01.07.58.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 07:58:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sgku0LzN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-126766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1D8461C212A8 for ; Mon, 1 Apr 2024 14:58:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1D354596D; Mon, 1 Apr 2024 14:58:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sgku0LzN" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DE99040872; Mon, 1 Apr 2024 14:58:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711983484; cv=none; b=lGd2Dx3wQmnzeywiRNGcOyUids7Kr6tKtS47RcBZFbRnBajm/ialICqf0+qJkIoTwyKDXrHkhxUSd9+JnqLsWXNcCdcjiDxGhjhdSGdtwR4XLoyIAgFanx0i0EMd9DiDhV6ZpfZqV9WRGpOZtigHKyoIUH9OVdy9PUTy5dMwd14= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711983484; c=relaxed/simple; bh=iWSrCQXopNpyy4/bhpMbaoyNqlqfJOPFVLa5+tSkyqc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=G1OvJp2eO2QrCJxwY7VIybCS3zhIk06FvyZa1dCxZnTNkxh5Cn2HB0LWB2s2VNO+M8bNvlaCw6kzvHQS2kOQk0k53YmS8GhthLEAKCRXP8WXKjsbc6IBaLNsbGqikqXxSb9TH4OBUCPlmd7rBSxSbDZQTbNcKB6v1O0Piak0fBA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sgku0LzN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDE9BC433F1; Mon, 1 Apr 2024 14:58:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711983483; bh=iWSrCQXopNpyy4/bhpMbaoyNqlqfJOPFVLa5+tSkyqc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sgku0LzNBC8durv7D8xHkaXYp4wdGd4dhls8VVLmTtkd5dKHoogKH4J1Ir3H/EZsx S8lNRaxuCy/1Oiw1B24dKVERxJ8+sd0y2DXKBtjkDvG7ntv/Mw/EjB/Pv5P2rXx9Cq OZdeZF0sbMbbKBEYlekhhvF2OwDNS96Tp0a7rXdChjJrvtcU4JEwCgEH723S5gh2VN 5gbdC+JOKycuXUtRN0FY6jVYN0CRok4lFqxgJf2QCS+xLZpopgM/VLIzozsRDbmx2R ori3cTjlfK5Lx5IvSsFj2PJkbs9clGhajS64fLcuyOHhPe5zjAy2fitEEaPRNTW5BT wcBbBJ0uyjdQg== Date: Mon, 1 Apr 2024 22:44:44 +0800 From: Jisheng Zhang To: Heinrich Schuchardt Cc: Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Emil Renner Berthing , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Conor Dooley , Aurelien Jarno Subject: Re: [PATCH v3 6/6] riscv: dts: starfive: add Milkv Mars board device tree Message-ID: References: <20240131132600.4067-1-jszhang@kernel.org> <20240131132600.4067-7-jszhang@kernel.org> <20240206-magma-deem-2c88e45a545a@spud> <43918921-0d05-41d3-a19b-f137314e868d@canonical.com> <013f6d51-7f78-4de0-945d-8902f32c850a@canonical.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <013f6d51-7f78-4de0-945d-8902f32c850a@canonical.com> On Mon, Apr 01, 2024 at 03:28:33PM +0200, Heinrich Schuchardt wrote: > On 3/29/24 03:31, Jisheng Zhang wrote: > > On Thu, Mar 28, 2024 at 10:28:28PM +0100, Heinrich Schuchardt wrote: > > > On 2/6/24 20:13, Conor Dooley wrote: > > > > On Wed, Jan 31, 2024 at 09:26:00PM +0800, Jisheng Zhang wrote: > > > > > The Milkv Mars is a development board based on the Starfive JH7110 SoC. > > > > > The board features: > > > > > > > > > > - JH7110 SoC > > > > > - 1/2/4/8 GiB LPDDR4 DRAM > > > > > - AXP15060 PMIC > > > > > - 40 pin GPIO header > > > > > - 3x USB 3.0 host port > > > > > - 1x USB 2.0 host port > > > > > - 1x M.2 E-Key > > > > > - 1x eMMC slot > > > > > - 1x MicroSD slot > > > > > - 1x QSPI Flash > > > > > - 1x 1Gbps Ethernet port > > > > > - 1x HDMI port > > > > > - 1x 2-lane DSI and 1x 4-lane DSI > > > > > - 1x 2-lane CSI > > > > > > > > > > Add the devicetree file describing the currently supported features, > > > > > namely PMIC, UART, I2C, GPIO, SD card, QSPI Flash, eMMC and Ethernet. > > > > > > > > > > Signed-off-by: Jisheng Zhang > > > > > > > > Got a dtbs_check issue in the patchwork CI: > > > > > > > > +arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dtb: gmac1-rgmii-rxin-clock: 'clock-frequency' is a required property > > > > + from schema $id: http://devicetree.org/schemas/clock/fixed-clock.yaml# > > > > +arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dtb: gmac1-rmii-refin-clock: 'clock-frequency' is a required property > > > > + from schema $id: http://devicetree.org/schemas/clock/fixed-clock.yaml# > > > > > > > > Can you fix that please? Also, I applied some patches the other day that > > > > seem to conflict quite a bit with the common board dts patch. Would you > > > > please do a rebase on top of that please? > > > > > > > > Cheers, > > > > Conor. > > > > > > > > > --- > > > > > arch/riscv/boot/dts/starfive/Makefile | 1 + > > > > > .../boot/dts/starfive/jh7110-milkv-mars.dts | 35 +++++++++++++++++++ > > > > > 2 files changed, 36 insertions(+) > > > > > create mode 100644 arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts > > > > > > > > > > diff --git a/arch/riscv/boot/dts/starfive/Makefile b/arch/riscv/boot/dts/starfive/Makefile > > > > > index 0141504c0f5c..2fa0cd7f31c3 100644 > > > > > --- a/arch/riscv/boot/dts/starfive/Makefile > > > > > +++ b/arch/riscv/boot/dts/starfive/Makefile > > > > > @@ -8,5 +8,6 @@ DTC_FLAGS_jh7110-starfive-visionfive-2-v1.3b := -@ > > > > > dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb > > > > > dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb > > > > > +dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-milkv-mars.dtb > > > > > dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.2a.dtb > > > > > dtb-$(CONFIG_ARCH_STARFIVE) += jh7110-starfive-visionfive-2-v1.3b.dtb > > > > > diff --git a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts > > > > > new file mode 100644 > > > > > index 000000000000..de600e799e7d > > > > > --- /dev/null > > > > > +++ b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts > > > > > @@ -0,0 +1,35 @@ > > > > > +// SPDX-License-Identifier: GPL-2.0 OR MIT > > > > > +/* > > > > > + * Copyright (C) 2023 Jisheng Zhang > > > > > + */ > > > > > + > > > > > +/dts-v1/; > > > > > +#include "jh7110-visionfive2-mars-common.dtsi" > > > > > + > > > > > +/ { > > > > > + model = "Milk-V Mars"; > > > > > + compatible = "milkv,mars", "starfive,jh7110"; > > > > > +}; > > > > > + > > > > > +&gmac0 { > > > > > + starfive,tx-use-rgmii-clk; > > > > > + assigned-clocks = <&aoncrg JH7110_AONCLK_GMAC0_TX>; > > > > > + assigned-clock-parents = <&aoncrg JH7110_AONCLK_GMAC0_RMII_RTX>; > > > > > +}; > > > > > + > > > > > + > > > > > +&phy0 { > > > > > + motorcomm,tx-clk-adj-enabled; > > > > > + motorcomm,tx-clk-10-inverted; > > > > > + motorcomm,tx-clk-100-inverted; > > > > > + motorcomm,tx-clk-1000-inverted; > > > > > + motorcomm,rx-clk-drv-microamp = <3970>; > > > > > + motorcomm,rx-data-drv-microamp = <2910>; > > > > > + rx-internal-delay-ps = <1500>; > > > > > + tx-internal-delay-ps = <1500>; > > > > > +}; > > > > > + > > > > > +&mmc1 { > > > > > + disable-wp; > > > > > > Due to which difference is 'disable-wp' necessary for the Mars board and not > > > necessary for the VisionFive 2 board? > > > > Mars doesn't have wp pin, but dunno vf2 case since I don't have a VF2 > > board ;) > > If the Milk-V Mars does not have a WP GPIO, we should be able to drop this > property. The VisionFive 2 does not need it either. Nope, dropping this property would result in RO sdcard on vf2. > > > > > > > > > + cd-gpios = <&sysgpio 41 GPIO_ACTIVE_LOW>; > > > > > > On my VisionFive 2 1.2B, and 1.3A boards GPIO 41 reflects if an SD-card is > > > inserted (as shown in U-Boot by gpio status -a). So shouldn't this value be > > > moved to the common include "jh7110-visionfive2-mars-common.dtsi" and > > > broken-cd removed from the VisionFive2 board? > > > > I tested the CD pin and can confirm it works on Mars, but I dunno whether > > this works on VF2 since I have no VF2 board. > > Could you please check whether it works or not on VF2? > > As mentioned in my prior mail the card detect GPIO is working on the > VisionFive 2. StarFive acknowledged my U-Boot patch: > > https://lore.kernel.org/u-boot/SHXPR01MB086314C47C281B3DDDF7BAE9E63AA@SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn/ Thanks for confirmation. > > Best regards > > Heinrich > > > > > > > > > https://doc-en.rvspace.org/VisionFive2/PDF/SCH_RV002_V1.2A_20221216.pdf > > > has a line > > > > > > GPIO41 | SD_SDIO0_CD_GPIO41 | Micro SD:J10 > > > > > > Best regards > > > > > > Heinrich > > > > > > > > +}; > > > > > -- > > > > > 2.43.0 > > > >