public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/2] sandbox: Fix DT compiler address warnings in sandbox DTs
@ 2025-11-13 11:56 Marek Vasut
  2025-11-13 11:56 ` [PATCH 2/2] sandbox: Fix DT compiler pin " Marek Vasut
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Marek Vasut @ 2025-11-13 11:56 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Vasut, Christian Marangi, Dinesh Maniyam,
	Guillaume La Roque, Heiko Schocher, Mattijs Korpershoek,
	Simon Glass, Svyatoslav Ryhel, Tom Rini

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>
---
Cc: Christian Marangi <ansuelsmth@gmail.com>
Cc: Dinesh Maniyam <dinesh.maniyam@altera.com>
Cc: Guillaume La Roque <glaroque@baylibre.com>
Cc: Heiko Schocher <hs@nabladev.com>
Cc: Mattijs Korpershoek <mkorpershoek@kernel.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
---
 arch/sandbox/dts/sandbox.dtsi | 6 +++---
 arch/sandbox/dts/test.dts     | 6 +++---
 test/dm/pmic.c                | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi
index 8a115c503dc..02b03894eaf 100644
--- a/arch/sandbox/dts/sandbox.dtsi
+++ b/arch/sandbox/dts/sandbox.dtsi
@@ -135,7 +135,7 @@
 			sandbox,emul = <&emul0>;
 			bootph-pre-ram;
 		};
-		sandbox_pmic: sandbox_pmic {
+		sandbox_pmic: sandbox_pmic@40 {
 			reg = <0x40>;
 		};
 
@@ -143,9 +143,9 @@
 			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";
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index a2c739a2044..86db3939cfd 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -909,8 +909,8 @@
 			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";
@@ -925,7 +925,7 @@
 			};
 		};
 
-		sandbox_pmic: sandbox_pmic {
+		sandbox_pmic: sandbox_pmic@40 {
 			reg = <0x40>;
 			sandbox,emul = <&emul_pmic0>;
 		};
diff --git a/test/dm/pmic.c b/test/dm/pmic.c
index 70dd18f5df0..b163b8e315d 100644
--- a/test/dm/pmic.c
+++ b/test/dm/pmic.c
@@ -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;
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-11-28 17:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-13 11:56 [PATCH 1/2] sandbox: Fix DT compiler address warnings in sandbox DTs Marek Vasut
2025-11-13 11:56 ` [PATCH 2/2] sandbox: Fix DT compiler pin " Marek Vasut
2025-11-13 12:54   ` Heiko Schocher
2025-11-21 10:57   ` Mattijs Korpershoek
2025-11-13 12:52 ` [PATCH 1/2] sandbox: Fix DT compiler address " Heiko Schocher
2025-11-21 10:56 ` Mattijs Korpershoek
2025-11-28 17:41 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox