From nobody Sat Feb 7 20:16:26 2026 Received: from freeshell.de (freeshell.de [116.202.128.144]) (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 9A40820E6E7; Fri, 2 May 2025 10:38:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.202.128.144 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746182316; cv=none; b=ZYqUXaSJ8LO3vaSy7HXwY+ISekqWKB6zc5BKCyzAhpHQ7cO9X3eMJiWUIkZv5wXDSdZbjK5QZSNO9z5WRf14ocQEQhxGxUo7GPNwxYFK6l6c1Mf0tyoKQ5cUZkhSa7e8rp7mfSQdOAMH2FWhlbxzLPzy0Hssb+jK7mRco85yERw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746182316; c=relaxed/simple; bh=BIGwsvQMgicbHiWzr+m5XkPTLfafq2dMG1dLt4C4zZk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e56ZT4b7dZwElBpS4h4/rKL+hepYAOsj22OVNmvFQHVMgS0kP8BpjOJCE45tsGUi16p8Kluq4uV0L4XBOD1LtE4cZoz9kkNGqrvHxrMNkkM94me9CSSBybHwbbsn6JeeJPZgsudY7wrs1sgvGNN6YSC5vkp7OcPy3WlJlmvx9hI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=freeshell.de; spf=pass smtp.mailfrom=freeshell.de; arc=none smtp.client-ip=116.202.128.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=freeshell.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=freeshell.de Received: from hay.lan. (unknown [IPv6:2605:59c0:20f3:a400:6ecf:39ff:fe00:8375]) (Authenticated sender: e) by freeshell.de (Postfix) with ESMTPSA id 5128FB4C23F9; Fri, 2 May 2025 12:31:24 +0200 (CEST) From: E Shattow To: Conor Dooley , Emil Renner Berthing , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, E Shattow Subject: [PATCH v3 1/4] riscv: dts: starfive: jh7110-common: add CPU BUS PERH QSPI clocks to syscrg Date: Fri, 2 May 2025 03:30:41 -0700 Message-ID: <20250502103101.957016-2-e@freeshell.de> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250502103101.957016-1-e@freeshell.de> References: <20250502103101.957016-1-e@freeshell.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add syscrg clock assignments for CPU, BUS, PERH, and QSPI as required by boot loader before kernel. Signed-off-by: E Shattow Reviewed-by: Emil Renner Berthing --- arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/b= oot/dts/starfive/jh7110-common.dtsi index c2f70f5e2918..f1489e9bb83e 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi @@ -353,9 +353,17 @@ &spi0 { }; =20 &syscrg { - assigned-clocks =3D <&syscrg JH7110_SYSCLK_CPU_CORE>, + assigned-clocks =3D <&syscrg JH7110_SYSCLK_CPU_ROOT>, + <&syscrg JH7110_SYSCLK_BUS_ROOT>, + <&syscrg JH7110_SYSCLK_PERH_ROOT>, + <&syscrg JH7110_SYSCLK_QSPI_REF>, + <&syscrg JH7110_SYSCLK_CPU_CORE>, <&pllclk JH7110_PLLCLK_PLL0_OUT>; - assigned-clock-rates =3D <500000000>, <1500000000>; + assigned-clock-parents =3D <&pllclk JH7110_PLLCLK_PLL0_OUT>, + <&pllclk JH7110_PLLCLK_PLL2_OUT>, + <&pllclk JH7110_PLLCLK_PLL2_OUT>, + <&syscrg JH7110_SYSCLK_QSPI_REF_SRC>; + assigned-clock-rates =3D <0>, <0>, <0>, <0>, <500000000>, <1500000000>; }; =20 &sysgpio { --=20 2.49.0 From nobody Sat Feb 7 20:16:26 2026 Received: from freeshell.de (freeshell.de [116.202.128.144]) (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 733956EB79; Fri, 2 May 2025 10:31:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.202.128.144 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746181899; cv=none; b=NDy4Ap+BwAY1XrSYYOSjho3jk8MwOZqSaN9LhOhLtA14U9EsQJOUgTSu6kr54/G7xrnUqF6m6RD9jg3bsnpOqEi15UT5+VNHv4Jya7n0EPiwI405eTLMdrN90cS+vQW65IQ2N1Fdh29yoO7HU3BpMe8a/xkn5Pd8LuSjOnqIpXk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746181899; c=relaxed/simple; bh=4R/V+WDBlUWjaD4BRPN42KnrSEsFCMSdx2YVwe6OCjM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KRBi5cuKFXDaeutPlAGi+zWcl0y6isrs5ZlIFfSq4M5f14/91+z3/DFyobjUHlSI8Xd7Uo6Xx1zhHZPQjJTIbWKesQ2SdPDPOoN3IqhlPHF/2Xd0p5ykBdACQtCjUAq3OnizT4Ma0Wt1plIXT5/C1FwLpUCCdirvBLoBuDvloaU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=freeshell.de; spf=pass smtp.mailfrom=freeshell.de; arc=none smtp.client-ip=116.202.128.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=freeshell.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=freeshell.de Received: from hay.lan. (unknown [IPv6:2605:59c0:20f3:a400:6ecf:39ff:fe00:8375]) (Authenticated sender: e) by freeshell.de (Postfix) with ESMTPSA id 7CFCFB4C23FD; Fri, 2 May 2025 12:31:30 +0200 (CEST) From: E Shattow To: Conor Dooley , Emil Renner Berthing , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, E Shattow , Hal Feng Subject: [PATCH v3 2/4] riscv: dts: starfive: jh7110-common: qspi flash setting read-delay 2 cycles max 100MHz Date: Fri, 2 May 2025 03:30:42 -0700 Message-ID: <20250502103101.957016-3-e@freeshell.de> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250502103101.957016-1-e@freeshell.de> References: <20250502103101.957016-1-e@freeshell.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use qspi flash read-delay and spi-max-frequency settings compatible with U-Boot bootloader. Observations from testing on Pine64 Star64 hardware within U-Boot bootloader and read-delay=3D2 are spi-max-frequency less than 49.8MHz fails to write, corrupt data writes at 25MHz to 49.799999MHz, and valid data writes at 49.8MHz to 100MHz (not tested above 100MHz). No valid spi-max-frequency was found for 1 Reviewed-by: Hal Feng Acked-by: Emil Renner Berthing --- arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/b= oot/dts/starfive/jh7110-common.dtsi index f1489e9bb83e..5c525686c043 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi @@ -317,8 +317,8 @@ &qspi { nor_flash: flash@0 { compatible =3D "jedec,spi-nor"; reg =3D <0>; - cdns,read-delay =3D <5>; - spi-max-frequency =3D <12000000>; + cdns,read-delay =3D <2>; + spi-max-frequency =3D <100000000>; cdns,tshsl-ns =3D <1>; cdns,tsd2d-ns =3D <1>; cdns,tchsh-ns =3D <1>; --=20 2.49.0 From nobody Sat Feb 7 20:16:26 2026 Received: from freeshell.de (freeshell.de [116.202.128.144]) (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 20DF523C517; Fri, 2 May 2025 10:31:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.202.128.144 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746181903; cv=none; b=nl7XVX1h9VtRWB0+y5PSproMDcr2j0ECKoyGhEPaVr6MlBNRmA9kt1bDsX1eUKLwjdSj+7lqjLTm/oP5RkAH8oYTL7RvIB8fhDJ14aSEK/c+BoiLs2dz9U/qZvg2VAIzKUx4FjoHLKE9FP22AYG9m/Ccvl1eh3Ew2xBrzpY5bYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746181903; c=relaxed/simple; bh=EDqhhxPhN+xWP50M4sF6ht4pLrdMr8hdVrG25WXdqFQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TRXeSQE90JHQKTT6iyRHZp8R2cMY7612zvuqT1uyYWj7/Z4Rl8jhzcI0WC3CAmHtoS8fyiKA/UtJktf8pZM/l6WSgCTqoxD9L8TsHK2ugvZtWX5f2dZ+vmW11N0lt4MYqlqeCu/mwacld46XH76OhT6TfwAbq3y0OAMNCTkqrgk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=freeshell.de; spf=pass smtp.mailfrom=freeshell.de; arc=none smtp.client-ip=116.202.128.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=freeshell.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=freeshell.de Received: from hay.lan. (unknown [IPv6:2605:59c0:20f3:a400:6ecf:39ff:fe00:8375]) (Authenticated sender: e) by freeshell.de (Postfix) with ESMTPSA id ABF04B4C2404; Fri, 2 May 2025 12:31:36 +0200 (CEST) From: E Shattow To: Emil Renner Berthing , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, E Shattow , Hal Feng , Emil Renner Berthing Subject: [PATCH v3 3/4] riscv: dts: starfive: jh7110-common: add eeprom node to i2c5 Date: Fri, 2 May 2025 03:30:43 -0700 Message-ID: <20250502103101.957016-4-e@freeshell.de> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250502103101.957016-1-e@freeshell.de> References: <20250502103101.957016-1-e@freeshell.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" StarFive VisionFive2 and similar JH7110 boards have an eeprom compatible with Atmel 24c04. Add the node so this may be used with the at24 driver. Signed-off-by: E Shattow Reviewed-by: Hal Feng Reviewed-by: Emil Renner Berthing --- arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/b= oot/dts/starfive/jh7110-common.dtsi index 5c525686c043..f1dc45b98e1d 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi @@ -245,6 +245,12 @@ emmc_vdd: aldo4 { }; }; }; + + eeprom@50 { + compatible =3D "atmel,24c04"; + reg =3D <0x50>; + pagesize =3D <16>; + }; }; =20 &i2c6 { --=20 2.49.0 From nobody Sat Feb 7 20:16:26 2026 Received: from freeshell.de (freeshell.de [116.202.128.144]) (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 C2D3822D4C8; Fri, 2 May 2025 10:31:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.202.128.144 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746181909; cv=none; b=Ji6s+Eews+X+DZ/QR/ikT2qfIn7qTt8dF/vBsTYLzg8S/yX1iDiv5kJqbl5E8vmXIY7YRJfKF/uT/4geOSEApwKZLSNlj5ZGwokC3EwMaZm2CtbUhHu6BNA+GQUJm2TzmBTOLb+kJM7M55eWuYP1ovO+VrLqdFp7EWuD9/qcZiI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746181909; c=relaxed/simple; bh=ude+34SekGs1D0woRTY6kRCOUKBE+OC2Cp4Bvkd6jyM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZaPS3VClh94fhbxzVWIOjQr5dRyQQG+v+8XCHglQ/hQXFor4nn16VjX7XyJS6ds/0Jg1+iUAHYwzaFO1lRXZo6oHMli+hrHhKThYwG5GNL1mFnHRd+NoCkBbgKed6Q9bR8Y08VEaztUSYBsweE5FrVEChjOwpOXz2d+NtwZYyQs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=freeshell.de; spf=pass smtp.mailfrom=freeshell.de; arc=none smtp.client-ip=116.202.128.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=freeshell.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=freeshell.de Received: from hay.lan. (unknown [IPv6:2605:59c0:20f3:a400:6ecf:39ff:fe00:8375]) (Authenticated sender: e) by freeshell.de (Postfix) with ESMTPSA id 69C78B4C2409; Fri, 2 May 2025 12:31:43 +0200 (CEST) From: E Shattow To: Emil Renner Berthing , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, E Shattow Subject: [PATCH v3 4/4] riscv: dts: starfive: jh7110-common: bootph-pre-ram hinting needed by boot loader Date: Fri, 2 May 2025 03:30:44 -0700 Message-ID: <20250502103101.957016-5-e@freeshell.de> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250502103101.957016-1-e@freeshell.de> References: <20250502103101.957016-1-e@freeshell.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add bootph-pre-ram hinting to jh7110-common.dtsi: - i2c5_pins and i2c-pins subnode for connection to eeprom - eeprom node - qspi flash configuration subnode - memory node - mmc0 for eMMC - mmc1 for SD Card - uart0 for serial console With this the U-Boot SPL secondary program loader may drop such overrides. Signed-off-by: E Shattow Acked-by: Emil Renner Berthing --- arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/b= oot/dts/starfive/jh7110-common.dtsi index f1dc45b98e1d..d2cdb2f276c3 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi @@ -28,6 +28,7 @@ chosen { memory@40000000 { device_type =3D "memory"; reg =3D <0x0 0x40000000 0x1 0x0>; + bootph-pre-ram; }; =20 gpio-restart { @@ -249,6 +250,7 @@ emmc_vdd: aldo4 { eeprom@50 { compatible =3D "atmel,24c04"; reg =3D <0x50>; + bootph-pre-ram; pagesize =3D <16>; }; }; @@ -268,6 +270,7 @@ &mmc0 { assigned-clocks =3D <&syscrg JH7110_SYSCLK_SDIO0_SDCARD>; assigned-clock-rates =3D <50000000>; bus-width =3D <8>; + bootph-pre-ram; cap-mmc-highspeed; mmc-ddr-1_8v; mmc-hs200-1_8v; @@ -285,6 +288,7 @@ &mmc1 { assigned-clocks =3D <&syscrg JH7110_SYSCLK_SDIO1_SDCARD>; assigned-clock-rates =3D <50000000>; bus-width =3D <4>; + bootph-pre-ram; no-sdio; no-mmc; cd-gpios =3D <&sysgpio 41 GPIO_ACTIVE_LOW>; @@ -323,6 +327,7 @@ &qspi { nor_flash: flash@0 { compatible =3D "jedec,spi-nor"; reg =3D <0>; + bootph-pre-ram; cdns,read-delay =3D <2>; spi-max-frequency =3D <100000000>; cdns,tshsl-ns =3D <1>; @@ -402,6 +407,8 @@ GPOEN_SYS_I2C2_DATA, }; =20 i2c5_pins: i2c5-0 { + bootph-pre-ram; + i2c-pins { pinmux =3D , GPOEN_SYS_I2C5_DATA, GPI_SYS_I2C5_DATA)>; bias-disable; /* external pull-up */ + bootph-pre-ram; input-enable; input-schmitt-enable; }; @@ -638,6 +646,7 @@ GPOEN_DISABLE, }; =20 &uart0 { + bootph-pre-ram; pinctrl-names =3D "default"; pinctrl-0 =3D <&uart0_pins>; status =3D "okay"; --=20 2.49.0