* [PATCH v2 1/3] hw/arm: gsj add i2c comments
2021-06-08 20:25 [PATCH v2 0/3] With the pca954x i2c mux available, enable it on aspeed and nuvoton BMC boards Patrick Venture
@ 2021-06-08 20:25 ` Patrick Venture
2021-06-08 20:25 ` [PATCH v2 2/3] hw/arm: gsj add pca9548 Patrick Venture
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Patrick Venture @ 2021-06-08 20:25 UTC (permalink / raw)
To: hskinnemoen, kfting, clg, peter.maydell, andrew, joel
Cc: qemu-arm, qemu-devel, Patrick Venture, Hao Wu
Adds comments to the board init to identify missing i2c devices.
Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
---
hw/arm/npcm7xx_boards.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index d4553e3786..9b7a7cd201 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -220,7 +220,21 @@ static void quanta_gsj_i2c_init(NPCM7xxState *soc)
at24c_eeprom_init(soc, 9, 0x55, 8192);
at24c_eeprom_init(soc, 10, 0x55, 8192);
- /* TODO: Add additional i2c devices. */
+ /*
+ * i2c-11:
+ * - power-brick@36: delta,dps800
+ * - hotswap@15: ti,lm5066i
+ */
+
+ /*
+ * i2c-12:
+ * - ucd90160@6b
+ */
+
+ /*
+ * i2c-15:
+ * - pca9548@75
+ */
}
static void quanta_gsj_fan_init(NPCM7xxMachine *machine, NPCM7xxState *soc)
--
2.32.0.rc1.229.g3e70b5a671-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] hw/arm: gsj add pca9548
2021-06-08 20:25 [PATCH v2 0/3] With the pca954x i2c mux available, enable it on aspeed and nuvoton BMC boards Patrick Venture
2021-06-08 20:25 ` [PATCH v2 1/3] hw/arm: gsj add i2c comments Patrick Venture
@ 2021-06-08 20:25 ` Patrick Venture
2021-06-08 20:25 ` [PATCH v2 3/3] hw/arm: quanta-q71l add pca954x muxes Patrick Venture
2021-06-15 14:06 ` [PATCH v2 0/3] With the pca954x i2c mux available, enable it on aspeed and nuvoton BMC boards Peter Maydell
3 siblings, 0 replies; 6+ messages in thread
From: Patrick Venture @ 2021-06-08 20:25 UTC (permalink / raw)
To: hskinnemoen, kfting, clg, peter.maydell, andrew, joel
Cc: qemu-arm, qemu-devel, Patrick Venture, Hao Wu
Tested: Quanta-gsj firmware booted.
i2c /dev entries driver
I2C init bus 1 freq 100000
I2C init bus 2 freq 100000
I2C init bus 3 freq 100000
I2C init bus 4 freq 100000
I2C init bus 8 freq 100000
I2C init bus 9 freq 100000
at24 9-0055: 8192 byte 24c64 EEPROM, writable, 1 bytes/write
I2C init bus 10 freq 100000
at24 10-0055: 8192 byte 24c64 EEPROM, writable, 1 bytes/write
I2C init bus 12 freq 100000
I2C init bus 15 freq 100000
i2c i2c-15: Added multiplexed i2c bus 16
i2c i2c-15: Added multiplexed i2c bus 17
i2c i2c-15: Added multiplexed i2c bus 18
i2c i2c-15: Added multiplexed i2c bus 19
i2c i2c-15: Added multiplexed i2c bus 20
i2c i2c-15: Added multiplexed i2c bus 21
i2c i2c-15: Added multiplexed i2c bus 22
i2c i2c-15: Added multiplexed i2c bus 23
pca954x 15-0075: registered 8 multiplexed busses for I2C switch pca9548
Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
---
hw/arm/Kconfig | 1 +
hw/arm/npcm7xx_boards.c | 6 ++----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index b887f6a5b1..9d1c2a6f7b 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -377,6 +377,7 @@ config NPCM7XX
select SERIAL
select SSI
select UNIMP
+ select PCA954X
config FSL_IMX25
bool
diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index 9b7a7cd201..f0a96564e2 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -18,6 +18,7 @@
#include "hw/arm/npcm7xx.h"
#include "hw/core/cpu.h"
+#include "hw/i2c/i2c_mux_pca954x.h"
#include "hw/i2c/smbus_eeprom.h"
#include "hw/loader.h"
#include "hw/qdev-core.h"
@@ -231,10 +232,7 @@ static void quanta_gsj_i2c_init(NPCM7xxState *soc)
* - ucd90160@6b
*/
- /*
- * i2c-15:
- * - pca9548@75
- */
+ i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 15), "pca9548", 0x75);
}
static void quanta_gsj_fan_init(NPCM7xxMachine *machine, NPCM7xxState *soc)
--
2.32.0.rc1.229.g3e70b5a671-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] hw/arm: quanta-q71l add pca954x muxes
2021-06-08 20:25 [PATCH v2 0/3] With the pca954x i2c mux available, enable it on aspeed and nuvoton BMC boards Patrick Venture
2021-06-08 20:25 ` [PATCH v2 1/3] hw/arm: gsj add i2c comments Patrick Venture
2021-06-08 20:25 ` [PATCH v2 2/3] hw/arm: gsj add pca9548 Patrick Venture
@ 2021-06-08 20:25 ` Patrick Venture
2021-06-09 4:51 ` Cédric Le Goater
2021-06-15 14:06 ` [PATCH v2 0/3] With the pca954x i2c mux available, enable it on aspeed and nuvoton BMC boards Peter Maydell
3 siblings, 1 reply; 6+ messages in thread
From: Patrick Venture @ 2021-06-08 20:25 UTC (permalink / raw)
To: hskinnemoen, kfting, clg, peter.maydell, andrew, joel
Cc: qemu-arm, qemu-devel, Patrick Venture, Hao Wu
Adds the pca954x muxes expected.
Tested: Booted quanta-q71l image to userspace.
Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
---
hw/arm/Kconfig | 1 +
hw/arm/aspeed.c | 11 ++++++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 9d1c2a6f7b..4a033e81ef 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -413,6 +413,7 @@ config ASPEED_SOC
select PCA9552
select SERIAL
select SMBUS_EEPROM
+ select PCA954X
select SSI
select SSI_M25P80
select TMP105
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 3fe6c55744..35a28b0e8b 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -14,6 +14,7 @@
#include "hw/arm/boot.h"
#include "hw/arm/aspeed.h"
#include "hw/arm/aspeed_soc.h"
+#include "hw/i2c/i2c_mux_pca954x.h"
#include "hw/i2c/smbus_eeprom.h"
#include "hw/misc/pca9552.h"
#include "hw/misc/tmp105.h"
@@ -461,14 +462,18 @@ static void quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
/* TODO: i2c-1: Add Frontpanel FRU eeprom@57 24c64 */
/* TODO: Add Memory Riser i2c mux and eeproms. */
- /* TODO: i2c-2: pca9546@74 */
- /* TODO: i2c-2: pca9548@77 */
+ i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9546", 0x74);
+ i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9548", 0x77);
+
/* TODO: i2c-3: Add BIOS FRU eeprom@56 24c64 */
- /* TODO: i2c-7: Add pca9546@70 */
+
+ /* i2c-7 */
+ i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9546", 0x70);
/* - i2c@0: pmbus@59 */
/* - i2c@1: pmbus@58 */
/* - i2c@2: pmbus@58 */
/* - i2c@3: pmbus@59 */
+
/* TODO: i2c-7: Add PDB FRU eeprom@52 */
/* TODO: i2c-8: Add BMC FRU eeprom@50 */
}
--
2.32.0.rc1.229.g3e70b5a671-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 3/3] hw/arm: quanta-q71l add pca954x muxes
2021-06-08 20:25 ` [PATCH v2 3/3] hw/arm: quanta-q71l add pca954x muxes Patrick Venture
@ 2021-06-09 4:51 ` Cédric Le Goater
0 siblings, 0 replies; 6+ messages in thread
From: Cédric Le Goater @ 2021-06-09 4:51 UTC (permalink / raw)
To: Patrick Venture, hskinnemoen, kfting, peter.maydell, andrew, joel
Cc: Hao Wu, qemu-arm, qemu-devel
On 6/8/21 10:25 PM, Patrick Venture wrote:
> Adds the pca954x muxes expected.
>
> Tested: Booted quanta-q71l image to userspace.
> Signed-off-by: Patrick Venture <venture@google.com>
> Reviewed-by: Hao Wu <wuhaotsh@google.com>
> Reviewed-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
I guess this patchset can go through the arm tree directly.
Thanks,
C.
> ---
> hw/arm/Kconfig | 1 +
> hw/arm/aspeed.c | 11 ++++++++---
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index 9d1c2a6f7b..4a033e81ef 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -413,6 +413,7 @@ config ASPEED_SOC
> select PCA9552
> select SERIAL
> select SMBUS_EEPROM
> + select PCA954X
> select SSI
> select SSI_M25P80
> select TMP105
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 3fe6c55744..35a28b0e8b 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -14,6 +14,7 @@
> #include "hw/arm/boot.h"
> #include "hw/arm/aspeed.h"
> #include "hw/arm/aspeed_soc.h"
> +#include "hw/i2c/i2c_mux_pca954x.h"
> #include "hw/i2c/smbus_eeprom.h"
> #include "hw/misc/pca9552.h"
> #include "hw/misc/tmp105.h"
> @@ -461,14 +462,18 @@ static void quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
> /* TODO: i2c-1: Add Frontpanel FRU eeprom@57 24c64 */
> /* TODO: Add Memory Riser i2c mux and eeproms. */
>
> - /* TODO: i2c-2: pca9546@74 */
> - /* TODO: i2c-2: pca9548@77 */
> + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9546", 0x74);
> + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "pca9548", 0x77);
> +
> /* TODO: i2c-3: Add BIOS FRU eeprom@56 24c64 */
> - /* TODO: i2c-7: Add pca9546@70 */
> +
> + /* i2c-7 */
> + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9546", 0x70);
> /* - i2c@0: pmbus@59 */
> /* - i2c@1: pmbus@58 */
> /* - i2c@2: pmbus@58 */
> /* - i2c@3: pmbus@59 */
> +
> /* TODO: i2c-7: Add PDB FRU eeprom@52 */
> /* TODO: i2c-8: Add BMC FRU eeprom@50 */
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/3] With the pca954x i2c mux available, enable it on aspeed and nuvoton BMC boards.
2021-06-08 20:25 [PATCH v2 0/3] With the pca954x i2c mux available, enable it on aspeed and nuvoton BMC boards Patrick Venture
` (2 preceding siblings ...)
2021-06-08 20:25 ` [PATCH v2 3/3] hw/arm: quanta-q71l add pca954x muxes Patrick Venture
@ 2021-06-15 14:06 ` Peter Maydell
3 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2021-06-15 14:06 UTC (permalink / raw)
To: Patrick Venture
Cc: Andrew Jeffery, Havard Skinnemoen, QEMU Developers, CS20 KFTing,
qemu-arm, Joel Stanley, Cédric Le Goater
On Tue, 8 Jun 2021 at 21:25, Patrick Venture <venture@google.com> wrote:
>
> v2:
> - Dropped sonorapass patch.
>
> Patrick Venture (3):
> hw/arm: gsj add i2c comments
> hw/arm: gsj add pca9548
> hw/arm: quanta-q71l add pca954x muxes
Applied to target-arm.next, thanks.
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread