From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65D60C43334 for ; Thu, 23 Jun 2022 14:00:02 +0000 (UTC) Received: from localhost ([::1]:34262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4NNJ-0007sX-B5 for qemu-devel@archiver.kernel.org; Thu, 23 Jun 2022 10:00:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4NM9-0006xb-0p; Thu, 23 Jun 2022 09:58:49 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:3351) by eggs.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1o4NM6-0002ar-Dr; Thu, 23 Jun 2022 09:58:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1655992726; x=1687528726; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=EAcnT1Jkv4o84j97GqR0oNejsbmeYAJj9nPHhPo15Ds=; b=hDL3oGAFiIc9rgbFvC5kPcKwGSyFRCd8oU12nhRfYZ+tW9Xz5871LZ9b F+aDuCEikgHqRoV/G6d0kKo5wjYYoXPLeLtAsLCLobQEZ3QaUh2amN3sc sOU4E7jp67p2miEKPri91aFjFZ15HcD+cYK0pvmbZDndSWhjY72Vtpzh2 w=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 23 Jun 2022 06:58:44 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2022 06:58:43 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 23 Jun 2022 06:58:43 -0700 Received: from [10.110.81.137] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 23 Jun 2022 06:58:42 -0700 Message-ID: Date: Thu, 23 Jun 2022 06:58:41 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 9/9] hw/arm/aspeed: firework: add I2C MUXes for VR channels Content-Language: en-US To: Joel Stanley CC: Peter Maydell , =?UTF-8?Q?C=c3=a9dric_Le_Goate?= =?UTF-8?Q?r?= , Titus Rwantare , "Andrew Jeffery" , Graeme Gregory , Maheswara Kurapati , qemu-arm , QEMU Developers References: <20220622172830.101210-1-quic_jaehyoo@quicinc.com> <20220622172830.101210-10-quic_jaehyoo@quicinc.com> From: Jae Hyun Yoo In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Received-SPF: pass client-ip=199.106.114.39; envelope-from=quic_jaehyoo@quicinc.com; helo=alexa-out-sd-02.qualcomm.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hello Joel, On 6/22/2022 10:27 PM, Joel Stanley wrote: > On Wed, 22 Jun 2022 at 17:29, Jae Hyun Yoo wrote: >> >> Add 2-level cascaded I2C MUXes for SOC VR channels into the Firework >> machine. >> >> Signed-off-by: Jae Hyun Yoo >> --- >> 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 >>