From: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
To: Joel Stanley <joel@jms.id.au>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Cédric Le Goater" <clg@kaod.org>,
"Titus Rwantare" <titusr@google.com>,
"Andrew Jeffery" <andrew@aj.id.au>,
"Graeme Gregory" <quic_ggregory@quicinc.com>,
"Maheswara Kurapati" <quic_mkurapat@quicinc.com>,
qemu-arm <qemu-arm@nongnu.org>,
"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH 9/9] hw/arm/aspeed: firework: add I2C MUXes for VR channels
Date: Thu, 23 Jun 2022 06:58:41 -0700 [thread overview]
Message-ID: <ff3320a3-8e9b-411b-519b-db2a3b9fb6fe@quicinc.com> (raw)
In-Reply-To: <CACPK8XdtsfsV8_L9C_XZ+AHZ0wAwdxgXmSxW5bZ3YHOr72Qvkg@mail.gmail.com>
Hello Joel,
On 6/22/2022 10:27 PM, Joel Stanley wrote:
> On Wed, 22 Jun 2022 at 17:29, Jae Hyun Yoo <quic_jaehyoo@quicinc.com> wrote:
>>
>> Add 2-level cascaded I2C MUXes for SOC VR channels into the Firework
>> machine.
>>
>> Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
>> ---
>> hw/arm/aspeed.c | 30 +++++++++++++++++++-----------
>> 1 file changed, 19 insertions(+), 11 deletions(-)
>>
>> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
>> index 526f3b651a9f..866a60cf7b4e 100644
>> --- a/hw/arm/aspeed.c
>> +++ b/hw/arm/aspeed.c
>> @@ -1038,7 +1038,7 @@ static void qcom_firework_fru_init(I2CBus *bus, uint8_t addr, uint32_t rsize)
>> static void qcom_dc_scm_firework_i2c_init(AspeedMachineState *bmc)
>> {
>> AspeedSoCState *soc = &bmc->soc;
>> - I2CSlave *mux;
>> + I2CSlave *therm_mux, *cpuvr_mux;
>>
>> /* Create the generic DC-SCM hardware */
>> qcom_dc_scm_bmc_i2c_init(bmc);
>> @@ -1048,16 +1048,24 @@ static void qcom_dc_scm_firework_i2c_init(AspeedMachineState *bmc)
>> /* I2C4 */
>> qcom_firework_fru_init(aspeed_i2c_get_bus(&soc->i2c, 4), 0x50, 128 * 1024);
>>
>> - /* I2C - 8 Thermal Diodes*/
>> - mux = i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 8), "pca9548",
>> - 0x70);
>> - i2c_slave_create_simple(pca954x_i2c_get_bus(mux, 0), TYPE_LM75, 0x4C);
>> - i2c_slave_create_simple(pca954x_i2c_get_bus(mux, 1), TYPE_LM75, 0x4C);
>> - i2c_slave_create_simple(pca954x_i2c_get_bus(mux, 2), TYPE_TMP75, 0x48);
>> - i2c_slave_create_simple(pca954x_i2c_get_bus(mux, 3), TYPE_TMP75, 0x48);
>> - i2c_slave_create_simple(pca954x_i2c_get_bus(mux, 4), TYPE_TMP75, 0x48);
>> -
>
> You only just added this. If you modify the previous patch to call the
> "mux" variable "therm_mux" then you don't need to modify it in this
> patch.
>
> or just squash them both together. I don't think there's much value in
> having two separate patches.
Okay. I'll fix the 8/9 patch to call the variable "therm_mux" instead.
Thanks,
Jae
>> - /* I2C-9 Fan Controller (MAX31785) */
>> + /* I2C7 CPUVR MUX */
>> + cpuvr_mux = i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7),
>> + "pca9546", 0x70);
>> + i2c_slave_create_simple(pca954x_i2c_get_bus(cpuvr_mux, 0), "pca9548", 0x72);
>> + i2c_slave_create_simple(pca954x_i2c_get_bus(cpuvr_mux, 1), "pca9548", 0x72);
>> + i2c_slave_create_simple(pca954x_i2c_get_bus(cpuvr_mux, 2), "pca9548", 0x72);
>> + i2c_slave_create_simple(pca954x_i2c_get_bus(cpuvr_mux, 3), "pca9548", 0x72);
>> +
>> + /* I2C8 Thermal Diodes*/
>> + therm_mux = i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 8),
>> + "pca9548", 0x70);
>> + i2c_slave_create_simple(pca954x_i2c_get_bus(therm_mux, 0), TYPE_LM75, 0x4C);
>> + i2c_slave_create_simple(pca954x_i2c_get_bus(therm_mux, 1), TYPE_LM75, 0x4C);
>> + i2c_slave_create_simple(pca954x_i2c_get_bus(therm_mux, 2), TYPE_LM75, 0x48);
>> + i2c_slave_create_simple(pca954x_i2c_get_bus(therm_mux, 3), TYPE_LM75, 0x48);
>> + i2c_slave_create_simple(pca954x_i2c_get_bus(therm_mux, 4), TYPE_LM75, 0x48);
>> +
>> + /* I2C9 Fan Controller (MAX31785) */
>> i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 9), "max31785", 0x52);
>> i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 9), "max31785", 0x54);
>> }
>> --
>> 2.25.1
>>
next prev parent reply other threads:[~2022-06-23 14:00 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 17:28 [PATCH 0/9] Add Qualcomm BMC machines Jae Hyun Yoo
2022-06-22 17:28 ` [PATCH 1/9] hw/arm/aspeed: add support for the Qualcomm EVB proto board Jae Hyun Yoo
2022-06-22 17:28 ` [PATCH 2/9] hw/arm/aspeed: add support for the Qualcomm DC-SCM v1 board Jae Hyun Yoo
2022-06-22 17:28 ` [PATCH 3/9] hw/arm/aspeed: qcom-dc-scm-v1: add block backed FRU device Jae Hyun Yoo
2022-06-23 5:28 ` Joel Stanley
2022-06-23 14:00 ` Jae Hyun Yoo
2022-06-23 15:28 ` Patrick Venture
2022-06-23 16:34 ` Jae Hyun Yoo
2022-06-23 16:50 ` Cédric Le Goater
2022-06-23 17:16 ` Cédric Le Goater
2022-06-23 17:37 ` Patrick Venture
2022-06-27 15:01 ` Jae Hyun Yoo
2022-07-01 7:52 ` Cédric Le Goater
2022-06-27 15:57 ` Cédric Le Goater
2022-06-22 17:28 ` [PATCH 4/9] hw/arm/aspeed: add Qualcomm Firework machine and " Jae Hyun Yoo
2022-06-23 6:43 ` Cédric Le Goater
2022-06-23 14:11 ` Jae Hyun Yoo
2022-06-24 7:32 ` Cédric Le Goater
2022-06-27 14:48 ` Jae Hyun Yoo
2022-06-22 17:28 ` [PATCH 5/9] hw/i2c: pmbus: Page #255 is valid page for read requests Jae Hyun Yoo
2022-06-22 20:49 ` Titus Rwantare
2022-06-22 22:04 ` Jae Hyun Yoo
2022-06-22 17:28 ` [PATCH 6/9] hw/sensor: add Maxim MAX31785 device Jae Hyun Yoo
2022-06-22 20:49 ` Titus Rwantare
2022-06-22 22:06 ` Jae Hyun Yoo
2022-06-23 5:17 ` Joel Stanley
2022-06-23 5:40 ` Cédric Le Goater
2022-06-23 14:02 ` Jae Hyun Yoo
2022-06-22 17:28 ` [PATCH 7/9] hw/arm/aspeed: firework: Add MAX31785 Fan controllers Jae Hyun Yoo
2022-06-22 17:28 ` [PATCH 8/9] hw/arm/aspeed: firework: Add Thermal Diodes Jae Hyun Yoo
2022-06-22 17:28 ` [PATCH 9/9] hw/arm/aspeed: firework: add I2C MUXes for VR channels Jae Hyun Yoo
2022-06-23 5:27 ` Joel Stanley
2022-06-23 13:58 ` Jae Hyun Yoo [this message]
2022-06-23 5:25 ` [PATCH 0/9] Add Qualcomm BMC machines Joel Stanley
2022-06-23 6:48 ` Cédric Le Goater
2022-06-23 10:24 ` Graeme Gregory
2022-06-23 14:12 ` Jae Hyun Yoo
2025-09-30 5:59 ` Cédric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff3320a3-8e9b-411b-519b-db2a3b9fb6fe@quicinc.com \
--to=quic_jaehyoo@quicinc.com \
--cc=andrew@aj.id.au \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quic_ggregory@quicinc.com \
--cc=quic_mkurapat@quicinc.com \
--cc=titusr@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).