diff mbox series

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

Message ID 20241005143356.10069-1-marex@denx.de
State Accepted
Commit 82c6ebae42e3462b8baf3e2a0e017f9ca18e81ac
Delegated to: Simon Glass
Headers show
Series sandbox: dts: Add missing sandbox, emul phandle to sandbox-pmic | expand

Commit Message

Marek Vasut Oct. 5, 2024, 2:33 p.m. UTC
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
...
"

Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Heiko Schocher <hs@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
---
 arch/sandbox/dts/sandbox_pmic.dtsi | 1 +
 1 file changed, 1 insertion(+)

Comments

Heiko Schocher Oct. 8, 2024, 4:35 a.m. UTC | #1
Hello Marek,

On 05.10.24 16:33, Marek Vasut wrote:
> 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
> ...
> "
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: Heiko Schocher <hs@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: u-boot@lists.denx.de
> ---
>   arch/sandbox/dts/sandbox_pmic.dtsi | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
Simon Glass Oct. 9, 2024, 1:52 a.m. UTC | #2
On Sat, 5 Oct 2024 at 08:34, Marek Vasut <marex@denx.de> wrote:
>
> 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
> ...
> "
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: Heiko Schocher <hs@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: u-boot@lists.denx.de
> ---
>  arch/sandbox/dts/sandbox_pmic.dtsi | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

Thanks



>
> diff --git a/arch/sandbox/dts/sandbox_pmic.dtsi b/arch/sandbox/dts/sandbox_pmic.dtsi
> index 565c382ed45..ff2cb42844c 100644
> --- a/arch/sandbox/dts/sandbox_pmic.dtsi
> +++ b/arch/sandbox/dts/sandbox_pmic.dtsi
> @@ -10,6 +10,7 @@
>
>  &sandbox_pmic {
>         compatible = "sandbox,pmic";
> +       sandbox,emul = <&emul_pmic0>;
>
>         buck1 {
>                 regulator-name = "SUPPLY_1.2V";
> --
> 2.45.2
>
Simon Glass Oct. 17, 2024, 11:11 p.m. UTC | #3
On Sat, 5 Oct 2024 at 08:34, Marek Vasut <marex@denx.de> wrote:
>
> 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
> ...
> "
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: Heiko Schocher <hs@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: u-boot@lists.denx.de
> ---
>  arch/sandbox/dts/sandbox_pmic.dtsi | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

Thanks



>
Applied to u-boot-dm, thanks!
diff mbox series

Patch

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