Skip to contentSkip to conversation

sandbox: dts: Add missing sandbox, emul phandle to sandbox-pmic

PATCH In review Marek Vasut 3 participants 4 messages Oct 5, 2024 – Oct 17, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sandbox: dts: Add missing sandbox, emul phandle to sandbox-pmic

This phandle was missing in the sandbox DT, add it, otherwise sandbox-i2c driver cannot look up the emulator via i2c_emul_find(). This fixes the following i2c_emul_find() error:

"

$ ./u-boot -Dc ""
...
       i2c_emul_find() No emulators for device 'sandbox_pmic'
  sandbox_pmic_write() write error to device: 0000000018c568d0 register: 0x0!
       out_set_value() PMIC write failed: -5
       i2c_emul_find() No emulators for device 'sandbox_pmic'
  sandbox_pmic_write() write error to device: 0000000018c568d0 register: 0x0!
       out_set_value() PMIC write failed: -5
...
"

---
Cc: Heiko Schocher <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]

---
 arch/sandbox/dts/sandbox_pmic.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/sandbox/dts/sandbox_pmic.dtsi +1 -0
index 565c382ed45..ff2cb42844c 100644
@@ -10,6 +10,7 @@
 
 &sandbox_pmic {
 	compatible = "sandbox,pmic";
+	sandbox,emul = <&emul_pmic0>;
 
 	buck1 {
 		regulator-name = "SUPPLY_1.2V";
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw

Re: [PATCH] sandbox: dts: Add missing sandbox,emul phandle to sandbox-pmic

Hello Marek,

Quoted 17 lines · Marek Vasut

This phandle was missing in the sandbox DT, add it, otherwise sandbox-i2c driver cannot look up the emulator via i2c_emul_find(). This fixes the following i2c_emul_find() error:

"

$ ./u-boot -Dc ""
...
        i2c_emul_find() No emulators for device 'sandbox_pmic'
   sandbox_pmic_write() write error to device: 0000000018c568d0 register: 0x0!
        out_set_value() PMIC write failed: -5
        i2c_emul_find() No emulators for device 'sandbox_pmic'
   sandbox_pmic_write() write error to device: 0000000018c568d0 register: 0x0!
        out_set_value() PMIC write failed: -5
...
"
Quoted 8 lines

---
Cc: Heiko Schocher <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]

---
  arch/sandbox/dts/sandbox_pmic.dtsi | 1 +
  1 file changed, 1 insertion(+)

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: [email protected]
Reviewed-by on v1 1/1
#2 lore raw
In reply to Marek Vasut
Quoted 18 lines · Marek Vasut

This phandle was missing in the sandbox DT, add it, otherwise sandbox-i2c driver cannot look up the emulator via i2c_emul_find(). This fixes the following i2c_emul_find() error:

"

$ ./u-boot -Dc ""
...
       i2c_emul_find() No emulators for device 'sandbox_pmic'
  sandbox_pmic_write() write error to device: 0000000018c568d0 register: 0x0!
       out_set_value() PMIC write failed: -5
       i2c_emul_find() No emulators for device 'sandbox_pmic'
  sandbox_pmic_write() write error to device: 0000000018c568d0 register: 0x0!
       out_set_value() PMIC write failed: -5
...
"
Quoted 8 lines

---
Cc: Heiko Schocher <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]

---
 arch/sandbox/dts/sandbox_pmic.dtsi | 1 +
 1 file changed, 1 insertion(+)

Thanks

Quoted 16 lines
arch/sandbox/dts/sandbox_pmic.dtsi +1 -1
index 565c382ed45..ff2cb42844c 100644
@@ -10,6 +10,7 @@
 
 &sandbox_pmic {
        compatible = "sandbox,pmic";
+       sandbox,emul = <&emul_pmic0>;
 
        buck1 {
                regulator-name = "SUPPLY_1.2V";
--

2.45.2

Reviewed-by
#3 lore raw
Quoted 18 lines · Marek Vasut

This phandle was missing in the sandbox DT, add it, otherwise sandbox-i2c driver cannot look up the emulator via i2c_emul_find(). This fixes the following i2c_emul_find() error:

"

$ ./u-boot -Dc ""
...
       i2c_emul_find() No emulators for device 'sandbox_pmic'
  sandbox_pmic_write() write error to device: 0000000018c568d0 register: 0x0!
       out_set_value() PMIC write failed: -5
       i2c_emul_find() No emulators for device 'sandbox_pmic'
  sandbox_pmic_write() write error to device: 0000000018c568d0 register: 0x0!
       out_set_value() PMIC write failed: -5
...
"
Quoted 8 lines

---
Cc: Heiko Schocher <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]

---
 arch/sandbox/dts/sandbox_pmic.dtsi | 1 +
 1 file changed, 1 insertion(+)

Thanks

Quoted 1 line

Applied to u-boot-dm, thanks!