[PATCH 2/2] riscv: dts: spacemit: mark K1 board boot devices bootph-pre-ram

Yixun Lan dlan at kernel.org
Thu Oct 15 00:46:21 PDT 2026


Hi Hung-Chun,

Have two minor comments, see below

On 07:56 Tue 13 Oct     , Hung-Chun Tseng wrote:
> On K1 boards an SPL reads the board EEPROM (0x50 on i2c2) to identify
> the board, and before DRAM training it programs the P1 PMIC (0x41 on
> i2c8) rails buck1, buck3 and aldo1. Boards that boot from SPI NOR also
> need the flash on QSPI.
> 
> Mark these board peripherals, and the I2C buses they sit on,
> bootph-pre-ram on the boards that have them.
> 
> Assisted-by: claude-opus-5-5 dtbs_check
> Signed-off-by: Hung-Chun Tseng <alan.tseng.cs at gmail.com>
> ---
>  arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi | 7 +++++++
>  arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts   | 7 +++++++
>  arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts | 8 ++++++++
>  arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts    | 8 ++++++++
>  arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts  | 5 +++++
>  arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts  | 6 ++++++
>  6 files changed, 41 insertions(+)
> 
> diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi b/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
> index 81c40df2a..6269d2ba7 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
> @@ -64,6 +64,7 @@ &pdma {
>  };
>  
>  &i2c2 {
> +	bootph-pre-ram;
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&i2c2_0_cfg>;
>  	status = "okay";
> @@ -71,6 +72,7 @@ &i2c2 {
>  	eeprom at 50 {
>  		compatible = "atmel,24c02";
>  		reg = <0x50>;
> +		bootph-pre-ram;
>  		vcc-supply = <&buck3_1v8>;
>  		pagesize = <16>;
>  		read-only;
> @@ -93,6 +95,7 @@ serial-number {
>  };
>  
>  &i2c8 {
> +	bootph-pre-ram;
We could move this to dtsi file, since all board share
same design which use i2c8 for connecting to pmic, the
reward would be that we no longer need to carry this
property all over board dts file.. similar we could do
for "i2c2", but I noticed k1-orangepi-rv2/r2s have no
eeprom enabled..

>  	pinctrl-names = "default";
>  	pinctrl-0 = <&i2c8_cfg>;
>  	status = "okay";
> @@ -100,6 +103,7 @@ &i2c8 {
>  	pmic at 41 {
>  		compatible = "spacemit,p1";
>  		reg = <0x41>;
> +		bootph-pre-ram;
>  		interrupts = <64>;
>  		vin1-supply = <&reg_vcc_4v>;
>  		vin2-supply = <&reg_vcc_4v>;
> @@ -113,6 +117,7 @@ pmic at 41 {
>  
>  		regulators {
>  			buck1 {
> +				bootph-pre-ram;
U-Boot also carry "regulator-name" for this node, we
probably could also merge it here, but could do it in
another patch if want to limit this patch to "pre-ram"
change only

>  				regulator-min-microvolt = <500000>;
>  				regulator-max-microvolt = <1050000>;
>  				regulator-ramp-delay = <5000>;
> @@ -127,6 +132,7 @@ buck2 {
>  			};
>  
>  			buck3_1v8: buck3 {
> +				bootph-pre-ram;
>  				regulator-min-microvolt = <500000>;
>  				regulator-max-microvolt = <1800000>;
>  				regulator-ramp-delay = <5000>;
> @@ -155,6 +161,7 @@ buck6 {
>  			};
>  
>  			aldo1: aldo1 {
> +				bootph-pre-ram;
>  				regulator-min-microvolt = <500000>;
>  				regulator-max-microvolt = <3400000>;
>  				regulator-boot-on;

-- 
Yixun Lan (dlan)



More information about the linux-riscv mailing list