With the pca954x i2c mux available, enable it on aspeed and nuvoton BMC boards.
PATCH 3/4 hw/arm: quanta-q71l add pca954x muxes
In reply to Patrick VentureAdds the pca954x muxes expected.
Tested: Booted quanta-q71l image to userspace.
--- hw/arm/Kconfig | 1 + hw/arm/aspeed.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-)
hw/arm/Kconfig +1 -0
@@ -413,6 +413,7 @@ config ASPEED_SOC select PCA9552 select SERIAL select SMBUS_EEPROM + select PCA954X select SSI select SSI_M25P80 select TMP105
hw/arm/aspeed.c +8 -3
@@ -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 */ }
Signature · 1 line
2.31.1.751.gd2f1c929bd-goog
PATCH 1/4 hw/arm: gsj add i2c comments
In reply to Patrick VentureAdds comments to the board init to identify missing i2c devices.
--- hw/arm/npcm7xx_boards.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
hw/arm/npcm7xx_boards.c +15 -1
@@ -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)
Signature · 1 line
2.31.1.751.gd2f1c929bd-goog
PATCH 2/4 hw/arm: gsj add pca9548
In reply to Patrick VentureTested: 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
--- hw/arm/Kconfig | 1 + hw/arm/npcm7xx_boards.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-)
hw/arm/Kconfig +1 -0
@@ -377,6 +377,7 @@ config NPCM7XX select SERIAL select SSI select UNIMP + select PCA954X config FSL_IMX25 bool
hw/arm/npcm7xx_boards.c +2 -4
@@ -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)
Signature · 1 line
2.31.1.751.gd2f1c929bd-goog
cover With the pca954x i2c mux available, enable it on aspeed and nuvoton BMC boards.
Patrick Venture (4):
hw/arm: gsj add i2c comments
hw/arm: gsj add pca9548
hw/arm: quanta-q71l add pca954x muxes
aspeed: sonorapass: enable pca954x muxes
hw/arm/Kconfig | 2 ++ hw/arm/aspeed.c | 33 +++++++++++++++++++-------------- hw/arm/npcm7xx_boards.c | 14 +++++++++++++- 3 files changed, 34 insertions(+), 15 deletions(-)
Signature · 1 line
2.31.1.751.gd2f1c929bd-goog
PATCH 4/4 aspeed: sonorapass: enable pca954x muxes
Enables the pca954x muxes in the bmc board configuration.
--- hw/arm/aspeed.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
hw/arm/aspeed.c +11 -11
@@ -541,14 +541,16 @@ static void swift_bmc_i2c_init(AspeedMachineState *bmc)static void sonorapass_bmc_i2c_init (AspeedMachineState *bmc) { +I2CSlave *i2c_mux;AspeedSoCState *soc = &bmc->soc;/* bus 2 : */ i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"tmp105" ,0x48 );i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"tmp105" ,0x49 ); -/* bus 2 : pca9546 @ 0x73 */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"pca9546" ,0x73 ); -/* bus 3 : pca9548 @ 0x70 */ +/* bus 3 : */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,3 ),"pca9548" ,0x70 );/* bus 4 : */ uint8_t *eeprom4_54 =g_malloc0 (8 *1024 );
@@ -562,7 +564,7 @@ static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)/* bus 6 : */ i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"tmp105" ,0x48 );i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"tmp105" ,0x49 ); -/* bus 6 : pca9546 @ 0x73 */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"pca9546" ,0x73 );/* bus 8 : */ uint8_t *eeprom8_56 =g_malloc0 (8 *1024 );
@@ -573,14 +575,12 @@ static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)/* bus 8 : adc128d818 @ 0x1d */ /* bus 8 : adc128d818 @ 0x1f */ -/* -* bus 13 : pca9548 @ 0x71 -* - channel 3: -* - tmm421 @ 0x4c -* - tmp421 @ 0x4e -* - tmp421 @ 0x4f -*/ - +/* bus 13 : */ + i2c_mux =i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,13 ), +"pca9548" ,0x71 ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4c ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4e ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4f ); }static void witherspoon_bmc_i2c_init (AspeedMachineState *bmc)
Signature · 1 line
2.31.1.751.gd2f1c929bd-goog
Re: [PATCH 1/4] hw/arm: gsj add i2c comments
In reply to Patrick VentureQuoted 5 lines · Patrick Venture
Adds comments to the board init to identify missing i2c devices.
Signed-off-by Patrick Venture <[email protected]>Reviewed-by Hao Wu <[email protected]>
Re: [PATCH 2/4] hw/arm: gsj add pca9548
In reply to Patrick VentureQuoted 25 lines · Patrick Venture
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
Quoted 2 lines
Signed-off-by Patrick Venture <[email protected]>Reviewed-by Hao Wu <[email protected]>
Re: [PATCH 3/4] hw/arm: quanta-q71l add pca954x muxes
In reply to Patrick VentureQuoted 6 lines · Patrick Venture
Adds the pca954x muxes expected.
Tested: Booted quanta-q71l image to userspace.
Signed-off-by Patrick Venture <[email protected]>Reviewed-by Hao Wu <[email protected]>
Joel Stanley
maintainerRe: [PATCH 4/4] aspeed: sonorapass: enable pca954x muxes
In reply to Patrick VentureQuoted 5 lines · Patrick Venture
Enables the pca954x muxes in the bmc board configuration.
Signed-off-by Patrick Venture <[email protected]>Reviewed-by Hao Wu <[email protected]>
Not sure about this one, there's no device tree for it in Linux.
Quoted 60 lines
--- hw/arm/aspeed.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)hw/arm/aspeed.c +11
-12@@ -541,14 +541,16 @@ static void swift_bmc_i2c_init(AspeedMachineState *bmc)static void sonorapass_bmc_i2c_init (AspeedMachineState *bmc) { +I2CSlave *i2c_mux;AspeedSoCState *soc = &bmc->soc;/* bus 2 : */ i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"tmp105" ,0x48 );i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"tmp105" ,0x49 ); -/* bus 2 : pca9546 @ 0x73 */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"pca9546" ,0x73 ); -/* bus 3 : pca9548 @ 0x70 */ +/* bus 3 : */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,3 ),"pca9548" ,0x70 );/* bus 4 : */ uint8_t *eeprom4_54 =g_malloc0 (8 *1024 );@@ -562,7 +564,7 @@ static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)/* bus 6 : */ i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"tmp105" ,0x48 );i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"tmp105" ,0x49 ); -/* bus 6 : pca9546 @ 0x73 */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"pca9546" ,0x73 );/* bus 8 : */ uint8_t *eeprom8_56 =g_malloc0 (8 *1024 );@@ -573,14 +575,12 @@ static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)/* bus 8 : adc128d818 @ 0x1d */ /* bus 8 : adc128d818 @ 0x1f */ -/* -* bus 13 : pca9548 @ 0x71 -* - channel 3: -* - tmm421 @ 0x4c -* - tmp421 @ 0x4e -* - tmp421 @ 0x4f -*/ - +/* bus 13 : */ + i2c_mux =i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,13 ), +"pca9548" ,0x71 ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4c ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4e ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4f ); }static void witherspoon_bmc_i2c_init (AspeedMachineState *bmc) --2.31.1.751.gd2f1c929bd-goog
Re: [PATCH 4/4] aspeed: sonorapass: enable pca954x muxes
Quoted 9 lines · Joel Stanley
Quoted 5 lines · Patrick Venture
Enables the pca954x muxes in the bmc board configuration.
Signed-off-by Patrick Venture <[email protected]>Reviewed-by Hao Wu <[email protected]>Not sure about this one, there's no device tree for it in Linux.
Yeah, this was just a pick-up from grepping other BMC boards. I added these going off the comment alone. I'd be okay with dropping this in the series.
Quoted 61 lines
Quoted 61 lines
--- hw/arm/aspeed.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)hw/arm/aspeed.c +11
-12@@ -541,14 +541,16 @@ static void swift_bmc_i2c_init(AspeedMachineState *bmc)static void sonorapass_bmc_i2c_init (AspeedMachineState *bmc) { +I2CSlave *i2c_mux;AspeedSoCState *soc = &bmc->soc;/* bus 2 : */ i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"tmp105" ,0x48 );i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"tmp105" ,0x49 ); -/* bus 2 : pca9546 @ 0x73 */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"pca9546" ,0x73 ); -/* bus 3 : pca9548 @ 0x70 */ +/* bus 3 : */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,3 ),"pca9548" ,0x70 );/* bus 4 : */ uint8_t *eeprom4_54 =g_malloc0 (8 *1024 );@@ -562,7 +564,7 @@ static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)/* bus 6 : */ i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"tmp105" ,0x48 );i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"tmp105" ,0x49 ); -/* bus 6 : pca9546 @ 0x73 */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"pca9546" ,0x73 );/* bus 8 : */ uint8_t *eeprom8_56 =g_malloc0 (8 *1024 );@@ -573,14 +575,12 @@ static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)/* bus 8 : adc128d818 @ 0x1d */ /* bus 8 : adc128d818 @ 0x1f */ -/* -* bus 13 : pca9548 @ 0x71 -* - channel 3: -* - tmm421 @ 0x4c -* - tmp421 @ 0x4e -* - tmp421 @ 0x4f -*/ - +/* bus 13 : */ + i2c_mux =i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,13 ), +"pca9548" ,0x71 ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4c ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4e ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4f ); }static void witherspoon_bmc_i2c_init (AspeedMachineState *bmc) --2.31.1.751.gd2f1c929bd-goog
Re: [PATCH 4/4] aspeed: sonorapass: enable pca954x muxes
Quoted 7 lines · Patrick Venture
Quoted 5 lines · Joel Stanley
Quoted 3 lines · Patrick Venture
Enables the pca954x muxes in the bmc board configuration.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Patrick Venture <[email protected]>Reviewed-by Hao Wu <[email protected]>Not sure about this one, there's no device tree for it in Linux.
Yeah, this was just a pick-up from grepping other BMC boards. I added these going off the comment alone. I'd be okay with dropping this in the series.
In this case, the number of patches changed within a version change -- should I start a fresh series or just bump the version and drop the last patch?
Quoted 62 lines
Quoted 62 lines
Quoted 62 lines
--- hw/arm/aspeed.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)hw/arm/aspeed.c +11
-12@@ -541,14 +541,16 @@ static void swift_bmc_i2c_init(AspeedMachineState *bmc)static void sonorapass_bmc_i2c_init (AspeedMachineState *bmc) { +I2CSlave *i2c_mux;AspeedSoCState *soc = &bmc->soc;/* bus 2 : */ i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"tmp105" ,0x48 );i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"tmp105" ,0x49 ); -/* bus 2 : pca9546 @ 0x73 */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,2 ),"pca9546" ,0x73 ); -/* bus 3 : pca9548 @ 0x70 */ +/* bus 3 : */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,3 ),"pca9548" ,0x70 );/* bus 4 : */ uint8_t *eeprom4_54 =g_malloc0 (8 *1024 );@@ -562,7 +564,7 @@ static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)/* bus 6 : */ i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"tmp105" ,0x48 );i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"tmp105" ,0x49 ); -/* bus 6 : pca9546 @ 0x73 */ +i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,6 ),"pca9546" ,0x73 );/* bus 8 : */ uint8_t *eeprom8_56 =g_malloc0 (8 *1024 );@@ -573,14 +575,12 @@ static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)/* bus 8 : adc128d818 @ 0x1d */ /* bus 8 : adc128d818 @ 0x1f */ -/* -* bus 13 : pca9548 @ 0x71 -* - channel 3: -* - tmm421 @ 0x4c -* - tmp421 @ 0x4e -* - tmp421 @ 0x4f -*/ - +/* bus 13 : */ + i2c_mux =i2c_slave_create_simple (aspeed_i2c_get_bus (&soc->i2c,13 ), +"pca9548" ,0x71 ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4c ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4e ); +i2c_slave_create_simple (pca954x_i2c_get_bus (i2c_mux,3 ),"tmp421" ,0x4f ); }static void witherspoon_bmc_i2c_init (AspeedMachineState *bmc) --2.31.1.751.gd2f1c929bd-goog
Joel Stanley
maintainerRe: [PATCH 4/4] aspeed: sonorapass: enable pca954x muxes
Quoted 14 lines · Patrick Venture
Quoted 12 lines · Patrick Venture
Quoted 9 lines · Joel Stanley
Quoted 5 lines · Patrick Venture
Enables the pca954x muxes in the bmc board configuration.
Signed-off-by Patrick Venture <[email protected]>Reviewed-by Hao Wu <[email protected]>Not sure about this one, there's no device tree for it in Linux.
Quoted 7 lines
Quoted 3 lines
Yeah, this was just a pick-up from grepping other BMC boards. I added these going off the comment alone. I'd be okay with dropping this in the series.
In this case, the number of patches changed within a version change -- should I start a fresh series or just bump the version and drop the last patch?
I wasn't saying we shouldn't include this change - it's good. I just didn't have any information to say whether it was correct or not.
I see you chose to resend without this one, lets get Cedric to merge those patches.
Cheers,
Joel
Re: [PATCH 4/4] aspeed: sonorapass: enable pca954x muxes
Quoted 23 lines · Joel Stanley
Quoted 14 lines · Patrick Venture
Quoted 12 lines · Patrick Venture
Quoted 9 lines · Joel Stanley
Quoted 5 lines · Patrick Venture
Enables the pca954x muxes in the bmc board configuration.
Signed-off-by Patrick Venture <[email protected]>Reviewed-by Hao Wu <[email protected]>Not sure about this one, there's no device tree for it in Linux.
Quoted 7 lines
Quoted 3 lines
Yeah, this was just a pick-up from grepping other BMC boards. I added these going off the comment alone. I'd be okay with dropping this in the series.
In this case, the number of patches changed within a version change -- should I start a fresh series or just bump the version and drop the last patch?
Quoted 5 lines
I wasn't saying we shouldn't include this change - it's good. I just didn't have any information to say whether it was correct or not.
I see you chose to resend without this one, lets get Cedric to merge those patches.
I took these patches in the aspeed-6.1 branch :
hw/arm: add quanta-gbs-bmc machine
hw/arm: quanta-gbs-bmc add i2c comments
hw/arm: gsj add i2c comments
hw/arm: gsj add pca9548
hw/arm: quanta-q71l add pca954x muxes
aspeed: sonorapass: enable pca954x muxes
Peter,
I can include them in an aspeed PR.
Thanks,
C.