]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
sandbox: Fix DT compiler address warnings in sandbox DTs
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Thu, 13 Nov 2025 11:56:29 +0000 (12:56 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 28 Nov 2025 16:20:24 +0000 (10:20 -0600)
Trivially fix the following warnings in sandbox DTs, which show up with
DTC 1.7.2. Fill in the missing address and adjust emulated I2C address
to fit the 7bit address limit:

"
arch/sandbox/dts/sandbox.dtsi:138.30-140.5: Warning (i2c_bus_reg): /i2c@0/sandbox_pmic: I2C bus unit address format error, expected "40"
arch/sandbox/dts/sandbox.dtsi:146.18-161.5: Warning (i2c_bus_reg): /i2c@0/emul: I2C bus unit address format error, expected "ff"
arch/sandbox/dts/sandbox.dtsi:148.4-17: Warning (i2c_bus_reg): /i2c@0/emul:reg: I2C address must be less than 7-bits, got "0xff". Set I2C_TEN_BIT_ADDRESS for 10 bit addresses or fix the property
"

"
arch/sandbox/dts/.test.dtb.pre.tmp:912.18-926.5: Warning (i2c_bus_reg): /i2c@0/emul: I2C bus unit address format error, expected "ff"
arch/sandbox/dts/.test.dtb.pre.tmp:913.4-17: Warning (i2c_bus_reg): /i2c@0/emul:reg: I2C address must be less than 7-bits, got "0xff". Set I2C_TEN_BIT_ADDRESS for 10 bit addresses or fix the property
arch/sandbox/dts/.test.dtb.pre.tmp:928.30-931.5: Warning (i2c_bus_reg): /i2c@0/sandbox_pmic: I2C bus unit address format error, expected "40"
"

Fix up pmic test to match.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
arch/sandbox/dts/sandbox.dtsi
arch/sandbox/dts/test.dts
test/dm/pmic.c

index 8a115c503dc51ddae9731cb95d5c935f5fa9d26b..02b03894eaf35abdbbc4a52d9a976ee6cd49651c 100644 (file)
                        sandbox,emul = <&emul0>;
                        bootph-pre-ram;
                };
-               sandbox_pmic: sandbox_pmic {
+               sandbox_pmic: sandbox_pmic@40 {
                        reg = <0x40>;
                };
 
                        reg = <0x41>;
                };
 
-               i2c_emul: emul {
+               i2c_emul: emul@7f {
                        bootph-pre-ram;
-                       reg = <0xff>;
+                       reg = <0x7f>;
                        compatible = "sandbox,i2c-emul-parent";
                        emul_eeprom: emul-eeprom {
                                compatible = "sandbox,i2c-eeprom";
index 0b3fc505e532e97556242e426f58049184d12de3..bb17a687862a89a7f45f1004e2947ac7678cb64c 100644 (file)
                        sandbox,emul = <&emul1>;
                };
 
-               i2c_emul: emul {
-                       reg = <0xff>;
+               i2c_emul: emul@7f {
+                       reg = <0x7f>;
                        compatible = "sandbox,i2c-emul-parent";
                        emul_eeprom: emul-eeprom {
                                compatible = "sandbox,i2c-eeprom";
                        };
                };
 
-               sandbox_pmic: sandbox_pmic {
+               sandbox_pmic: sandbox_pmic@40 {
                        reg = <0x40>;
                        sandbox,emul = <&emul_pmic0>;
                };
index 70dd18f5df07cdfcdbf66477fb5c9cba683519c9..b163b8e315d4480f9b56cbb64cdfab208eddfad6 100644 (file)
@@ -39,7 +39,7 @@ static inline int power_pmic_get(struct unit_test_state *uts, char *name)
 /* Test PMIC get method */
 static int dm_test_power_pmic_get(struct unit_test_state *uts)
 {
-       power_pmic_get(uts, "sandbox_pmic");
+       power_pmic_get(uts, "sandbox_pmic@40");
 
        return 0;
 }
@@ -57,7 +57,7 @@ DM_TEST(dm_test_power_pmic_mc34708_get, UTF_SCAN_FDT);
 /* Test PMIC I/O */
 static int dm_test_power_pmic_io(struct unit_test_state *uts)
 {
-       const char *name = "sandbox_pmic";
+       const char *name = "sandbox_pmic@40";
        uint8_t out_buffer, in_buffer;
        struct udevice *dev;
        int reg_count, i;