All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] hw/arm: Add more devices to kudo-bmc
@ 2022-01-02 21:58 Patrick Venture
  2022-01-02 21:58 ` [PATCH 1/4] hw/arm: Add kudo i2c eeproms Patrick Venture
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Patrick Venture @ 2022-01-02 21:58 UTC (permalink / raw)
  To: peter.maydell
  Cc: qemu-arm, qemu-devel, crauer, wuhaotsh, titusr, Patrick Venture

This series of patches adds various devices that are defined in the device-tree for this board.

Chris Rauer (1):
  hw/arm: Add kudo i2c eeproms.

Patrick Venture (2):
  hw/arm: add i2c muxes to kudo-bmc
  hw/arm: kudo add lm75s on bus 13

Shengtan Mao (1):
  hw/arm: attach MMC to kudo-bmc

 hw/arm/npcm7xx_boards.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

-- 
2.34.1.448.ga2b2bfdf31-goog



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

* [PATCH 1/4] hw/arm: Add kudo i2c eeproms.
  2022-01-02 21:58 [PATCH 0/4] hw/arm: Add more devices to kudo-bmc Patrick Venture
@ 2022-01-02 21:58 ` Patrick Venture
  2022-01-02 22:08   ` Philippe Mathieu-Daudé
  2022-01-02 21:58 ` [PATCH 2/4] hw/arm: attach MMC to kudo-bmc Patrick Venture
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Patrick Venture @ 2022-01-02 21:58 UTC (permalink / raw)
  To: peter.maydell
  Cc: qemu-arm, qemu-devel, crauer, wuhaotsh, titusr, Patrick Venture

From: Chris Rauer <crauer@google.com>

Signed-off-by: Chris Rauer <crauer@google.com>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
---
 hw/arm/npcm7xx_boards.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index 0866d2f4f0..37de9fef43 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -328,6 +328,13 @@ static void quanta_gbs_i2c_init(NPCM7xxState *soc)
      */
 }
 
+static void kudo_bmc_i2c_init(NPCM7xxState *soc)
+{
+    at24c_eeprom_init(soc, 4, 0x50, 8192); /* mbfru */
+    at24c_eeprom_init(soc, 14, 0x55, 8192); /* bmcfru */
+    /* TODO: Add remaining i2c devices. */
+}
+
 static void npcm750_evb_init(MachineState *machine)
 {
     NPCM7xxState *soc;
@@ -391,6 +398,7 @@ static void kudo_bmc_init(MachineState *machine)
     npcm7xx_connect_flash(&soc->fiu[1], 0, "mx66u51235f",
                           drive_get(IF_MTD, 3, 0));
 
+    kudo_bmc_i2c_init(soc);
     npcm7xx_load_kernel(machine, soc);
 }
 
-- 
2.34.1.448.ga2b2bfdf31-goog



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

* [PATCH 2/4] hw/arm: attach MMC to kudo-bmc
  2022-01-02 21:58 [PATCH 0/4] hw/arm: Add more devices to kudo-bmc Patrick Venture
  2022-01-02 21:58 ` [PATCH 1/4] hw/arm: Add kudo i2c eeproms Patrick Venture
@ 2022-01-02 21:58 ` Patrick Venture
  2022-01-02 21:58 ` [PATCH 3/4] hw/arm: add i2c muxes " Patrick Venture
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Patrick Venture @ 2022-01-02 21:58 UTC (permalink / raw)
  To: peter.maydell
  Cc: qemu-arm, qemu-devel, crauer, wuhaotsh, titusr, Shengtan Mao

From: Shengtan Mao <stmao@google.com>

Signed-off-by: Shengtan Mao <stmao@google.com>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Chris Rauer <crauer@google.com>
---
 hw/arm/npcm7xx_boards.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index 37de9fef43..257bf638fd 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -399,6 +399,7 @@ static void kudo_bmc_init(MachineState *machine)
                           drive_get(IF_MTD, 3, 0));
 
     kudo_bmc_i2c_init(soc);
+    sdhci_attach_drive(&soc->mmc.sdhci, 0);
     npcm7xx_load_kernel(machine, soc);
 }
 
-- 
2.34.1.448.ga2b2bfdf31-goog



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

* [PATCH 3/4] hw/arm: add i2c muxes to kudo-bmc
  2022-01-02 21:58 [PATCH 0/4] hw/arm: Add more devices to kudo-bmc Patrick Venture
  2022-01-02 21:58 ` [PATCH 1/4] hw/arm: Add kudo i2c eeproms Patrick Venture
  2022-01-02 21:58 ` [PATCH 2/4] hw/arm: attach MMC to kudo-bmc Patrick Venture
@ 2022-01-02 21:58 ` Patrick Venture
  2022-01-03 19:58   ` Philippe Mathieu-Daudé
  2022-01-02 21:58 ` [PATCH 4/4] hw/arm: kudo add lm75s on bus 13 Patrick Venture
  2022-01-07 17:05 ` [PATCH 0/4] hw/arm: Add more devices to kudo-bmc Peter Maydell
  4 siblings, 1 reply; 9+ messages in thread
From: Patrick Venture @ 2022-01-02 21:58 UTC (permalink / raw)
  To: peter.maydell
  Cc: qemu-arm, qemu-devel, crauer, wuhaotsh, titusr, Patrick Venture

Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
---
 hw/arm/npcm7xx_boards.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index 257bf638fd..4cd58972c5 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -330,8 +330,17 @@ static void quanta_gbs_i2c_init(NPCM7xxState *soc)
 
 static void kudo_bmc_i2c_init(NPCM7xxState *soc)
 {
+    i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 1), TYPE_PCA9548, 0x75);
+    i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 1), TYPE_PCA9548, 0x77);
+
+    i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 4), TYPE_PCA9548, 0x77);
+
     at24c_eeprom_init(soc, 4, 0x50, 8192); /* mbfru */
+
+    i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 13), TYPE_PCA9548, 0x77);
+
     at24c_eeprom_init(soc, 14, 0x55, 8192); /* bmcfru */
+
     /* TODO: Add remaining i2c devices. */
 }
 
-- 
2.34.1.448.ga2b2bfdf31-goog



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

* [PATCH 4/4] hw/arm: kudo add lm75s on bus 13
  2022-01-02 21:58 [PATCH 0/4] hw/arm: Add more devices to kudo-bmc Patrick Venture
                   ` (2 preceding siblings ...)
  2022-01-02 21:58 ` [PATCH 3/4] hw/arm: add i2c muxes " Patrick Venture
@ 2022-01-02 21:58 ` Patrick Venture
  2022-01-02 22:09   ` Philippe Mathieu-Daudé
  2022-01-07 17:05 ` [PATCH 0/4] hw/arm: Add more devices to kudo-bmc Peter Maydell
  4 siblings, 1 reply; 9+ messages in thread
From: Patrick Venture @ 2022-01-02 21:58 UTC (permalink / raw)
  To: peter.maydell
  Cc: qemu-arm, qemu-devel, crauer, wuhaotsh, titusr, Patrick Venture

Add the four lm75s behind the mux on bus 13.

Tested by booting the firmware:
lm75 42-0048: hwmon0: sensor 'lm75'
lm75 43-0049: supply vs not found, using dummy regulator
lm75 43-0049: hwmon1: sensor 'lm75'
lm75 44-0048: supply vs not found, using dummy regulator
lm75 44-0048: hwmon2: sensor 'lm75'
lm75 45-0049: supply vs not found, using dummy regulator
lm75 45-0049: hwmon3: sensor 'lm75'

Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Titus Rwantare <titusr@google.com>
---
 hw/arm/npcm7xx_boards.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index 4cd58972c5..7d0f3148be 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -330,6 +330,8 @@ static void quanta_gbs_i2c_init(NPCM7xxState *soc)
 
 static void kudo_bmc_i2c_init(NPCM7xxState *soc)
 {
+    I2CSlave *i2c_mux;
+
     i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 1), TYPE_PCA9548, 0x75);
     i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 1), TYPE_PCA9548, 0x77);
 
@@ -337,7 +339,14 @@ static void kudo_bmc_i2c_init(NPCM7xxState *soc)
 
     at24c_eeprom_init(soc, 4, 0x50, 8192); /* mbfru */
 
-    i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 13), TYPE_PCA9548, 0x77);
+    i2c_mux = i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 13),
+                                      TYPE_PCA9548, 0x77);
+
+    /* tmp105 is compatible with the lm75 */
+    i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 2), "tmp105", 0x48);
+    i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 3), "tmp105", 0x49);
+    i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 4), "tmp105", 0x48);
+    i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 5), "tmp105", 0x49);
 
     at24c_eeprom_init(soc, 14, 0x55, 8192); /* bmcfru */
 
-- 
2.34.1.448.ga2b2bfdf31-goog



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

* Re: [PATCH 1/4] hw/arm: Add kudo i2c eeproms.
  2022-01-02 21:58 ` [PATCH 1/4] hw/arm: Add kudo i2c eeproms Patrick Venture
@ 2022-01-02 22:08   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-01-02 22:08 UTC (permalink / raw)
  To: Patrick Venture, peter.maydell
  Cc: wuhaotsh, titusr, qemu-arm, qemu-devel, crauer

On 2/1/22 22:58, Patrick Venture wrote:
> From: Chris Rauer <crauer@google.com>
> 
> Signed-off-by: Chris Rauer <crauer@google.com>
> Reviewed-by: Hao Wu <wuhaotsh@google.com>
> Reviewed-by: Patrick Venture <venture@google.com>
> ---
>   hw/arm/npcm7xx_boards.c | 8 ++++++++
>   1 file changed, 8 insertions(+)


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


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

* Re: [PATCH 4/4] hw/arm: kudo add lm75s on bus 13
  2022-01-02 21:58 ` [PATCH 4/4] hw/arm: kudo add lm75s on bus 13 Patrick Venture
@ 2022-01-02 22:09   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-01-02 22:09 UTC (permalink / raw)
  To: Patrick Venture, peter.maydell
  Cc: wuhaotsh, titusr, qemu-arm, qemu-devel, crauer

On 2/1/22 22:58, Patrick Venture wrote:
> Add the four lm75s behind the mux on bus 13.
> 
> Tested by booting the firmware:
> lm75 42-0048: hwmon0: sensor 'lm75'
> lm75 43-0049: supply vs not found, using dummy regulator
> lm75 43-0049: hwmon1: sensor 'lm75'
> lm75 44-0048: supply vs not found, using dummy regulator
> lm75 44-0048: hwmon2: sensor 'lm75'
> lm75 45-0049: supply vs not found, using dummy regulator
> lm75 45-0049: hwmon3: sensor 'lm75'
> 
> Signed-off-by: Patrick Venture <venture@google.com>
> Reviewed-by: Titus Rwantare <titusr@google.com>
> ---
>   hw/arm/npcm7xx_boards.c | 11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


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

* Re: [PATCH 3/4] hw/arm: add i2c muxes to kudo-bmc
  2022-01-02 21:58 ` [PATCH 3/4] hw/arm: add i2c muxes " Patrick Venture
@ 2022-01-03 19:58   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-01-03 19:58 UTC (permalink / raw)
  To: Patrick Venture, peter.maydell
  Cc: wuhaotsh, titusr, qemu-arm, qemu-devel, crauer

On 2/1/22 22:58, Patrick Venture wrote:
> Signed-off-by: Patrick Venture <venture@google.com>
> Reviewed-by: Hao Wu <wuhaotsh@google.com>
> ---
>   hw/arm/npcm7xx_boards.c | 9 +++++++++
>   1 file changed, 9 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


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

* Re: [PATCH 0/4] hw/arm: Add more devices to kudo-bmc
  2022-01-02 21:58 [PATCH 0/4] hw/arm: Add more devices to kudo-bmc Patrick Venture
                   ` (3 preceding siblings ...)
  2022-01-02 21:58 ` [PATCH 4/4] hw/arm: kudo add lm75s on bus 13 Patrick Venture
@ 2022-01-07 17:05 ` Peter Maydell
  4 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2022-01-07 17:05 UTC (permalink / raw)
  To: Patrick Venture; +Cc: wuhaotsh, titusr, qemu-arm, qemu-devel, crauer

On Sun, 2 Jan 2022 at 21:58, Patrick Venture <venture@google.com> wrote:
>
> This series of patches adds various devices that are defined in the device-tree for this board.
>
> Chris Rauer (1):
>   hw/arm: Add kudo i2c eeproms.
>
> Patrick Venture (2):
>   hw/arm: add i2c muxes to kudo-bmc
>   hw/arm: kudo add lm75s on bus 13
>
> Shengtan Mao (1):
>   hw/arm: attach MMC to kudo-bmc
>
>  hw/arm/npcm7xx_boards.c | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)



Applied to target-arm.next, thanks.

-- PMM


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

end of thread, other threads:[~2022-01-07 17:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-02 21:58 [PATCH 0/4] hw/arm: Add more devices to kudo-bmc Patrick Venture
2022-01-02 21:58 ` [PATCH 1/4] hw/arm: Add kudo i2c eeproms Patrick Venture
2022-01-02 22:08   ` Philippe Mathieu-Daudé
2022-01-02 21:58 ` [PATCH 2/4] hw/arm: attach MMC to kudo-bmc Patrick Venture
2022-01-02 21:58 ` [PATCH 3/4] hw/arm: add i2c muxes " Patrick Venture
2022-01-03 19:58   ` Philippe Mathieu-Daudé
2022-01-02 21:58 ` [PATCH 4/4] hw/arm: kudo add lm75s on bus 13 Patrick Venture
2022-01-02 22:09   ` Philippe Mathieu-Daudé
2022-01-07 17:05 ` [PATCH 0/4] hw/arm: Add more devices to kudo-bmc Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.