[PATCH 1/2] riscv: dts: spacemit: Add i2c buses on OrangePi RV2

Chukun Pan amadeus at jmu.edu.cn
Wed Dec 24 06:00:09 PST 2025


Hi,

> +	reg_dc_in: dc-in-12v {
> +		compatible = "regulator-fixed";
> +		regulator-name = "dc_in_12v";
> +		regulator-min-microvolt = <12000000>;
> +		regulator-max-microvolt = <12000000>;
> +		regulator-boot-on;
> +		regulator-always-on;
> +	};

This does not match the schematic. (vcc_5v0 instead of dc-in-12v)
https://drive.google.com/drive/folders/1pcI_U0C3VJKTCg8A1zj08CwNbohnONSR

> +
> +	reg_vcc_4v: vcc-4v {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc_4v";
> +		regulator-min-microvolt = <4000000>;
> +		regulator-max-microvolt = <4000000>;
> +		regulator-boot-on;
> +		regulator-always-on;
> +		vin-supply = <&reg_dc_in>;
> +	};

It is also missing the regulator prefix.
So it should look like this:

```
	vcc_5v0: regulator-vcc-5v0 {
		compatible = "regulator-fixed";
		regulator-name = "vcc_5v0";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
	};

	vcc4v0: regulator-vcc4v0 {
		compatible = "regulator-fixed";
		regulator-name = "vcc4v0";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <4000000>;
		regulator-max-microvolt = <4000000>;
		vin-supply = <&vcc_5v0>;
	};
```

> +&i2c2 {
> +	pinctrl-0 = <&i2c2_0_cfg>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +
> +	eeprom at 50 {
> +		compatible = "atmel,24c02";
> +		reg = <0x50>;
> +		vcc-supply = <&buck3_1v8>; /* EEPROM_VCC1V8 */

vcc-supply should be placed after size.

> +		pagesize = <16>;
> +		read-only;
> +		size = <256>;
> +
> +		nvmem-layout {
> +			compatible = "onie,tlv-layout";
> +
> +			mac-address {
> +				#nvmem-cell-cells = <1>;
> +			};
> +
> +			num-macs {
> +			};
> +
> +			serial-number {
> +			};

>From vendor uboot:

=> tlv_eeprom 
TLV: 0
[   6.991] TlvInfo Header:
[   6.992]    Id String:    TlvInfo
[   6.995]    Version:      1
[   6.997]    Total Length: 38
[   7.000] TLV Name             Code Len Value
[   7.004] -------------------- ---- --- -----
[   7.009] Base MAC Address     0x24   6 xxxxx
[   7.014] MAC Addresses        0x2A   2 2
[   7.018] Unknown              0x41   1  0x01
[   7.022] Product Name         0x21  15 x1_orangepi-rv2
[   7.027] CRC-32               0xFE   4 0x...
[   7.031] Checksum is valid.

There is no serial-number (0x23) in the EEPROM.
Does "product-name" need to be described here?

> +		};
> +	};

Thanks,
Chukun



More information about the linux-riscv mailing list