Received: by 2002:ac2:5cd0:0:0:0:0:0 with SMTP id f16csp1573773lfq; Sun, 27 Feb 2022 23:13:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGKgmrB6kd5r5eseWAPLFsyBaZWa3164hlaG5FdYS3727NF30FBGmEx7GxBO/47iAXU0sw X-Received: by 2002:a37:a246:0:b0:49b:679a:2f2b with SMTP id l67-20020a37a246000000b0049b679a2f2bmr10200468qke.702.1646032438074; Sun, 27 Feb 2022 23:13:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646032438; cv=none; d=google.com; s=arc-20160816; b=yym9JMr4H26S8x6PKGcmV2ajUdEhgWl7s/SAhgg9EevVdsOz8e2E1NNqYjMkVXJAJW DZeHa8Js7tLyO43ZkuaaKEhFXunR3l38P9LkjH4zXjHkU5M6mRvLgu6P5dtX3kgjwcSz 7VczMLb/0UXHqocr7ltGcdIt1RiAQd2TJF2eaCYWB0tAhDK58XwQcZ4jWalyqTDM6sFV NzYccuZ8LpxYMu5xG3CqbVHQ1iRhFHUqIRxIeSDhnjB0yDd/RcSOnURvu6MaSuqYRlPE 7yQO/34RH6ovrXp3AcNWv5/4+Jm0iW3fthesBFu4llB3whA6WqsER9Z/rh/ofhoyQUPF 83GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=ECkbTN4Si9di6p0Y/ER7iYxG9350SmqjTgmXUeliLcE=; b=naW2RRnRTAVt8amlRi1bQ2tOnt6EOGhsi175Z8HloxWLQzlX0K4ddsO+lwT4R2HCGW DViZdC2uwh839tPvR/+o5pKVnRy23l4J6t58dq2WvUh1kVpsS3Wne9xfS9GqYrxWXFGH 1+a7Zj73CQRuO7uMGx+6MlfaOr8ogKaFIpMm6GUt3fB9rqA0dKeo8RcP9uUHJRpTrB5I oEGbnBDqFDYwqd1s/pEgZUMc1lcrxg1FEnasT7bWBXUe9A1V33lZ1wXE/PsN++lryY2s /lyGYgXS3cWrmfiW+U2flK3LXMxyro2amoPf4xDoiS6rupq9sqjhoUxjrSHSoSw2psgw EEwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m4-20020a375804000000b00648f7a86815si3182981qkb.349.2022.02.27.23.13.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 Feb 2022 23:13:58 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org" Received: from localhost ([::1]:60002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOaEG-0005E4-Aa for alex.bennee@linaro.org; Mon, 28 Feb 2022 02:13:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOaDW-0004KE-Or; Mon, 28 Feb 2022 02:13:10 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:39494 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOaDU-0004Hw-BF; Mon, 28 Feb 2022 02:13:10 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21S6g2q8010096; Mon, 28 Feb 2022 07:12:51 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 3egsbprkua-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Feb 2022 07:12:51 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 21S77F9S029073; Mon, 28 Feb 2022 07:12:49 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma05fra.de.ibm.com with ESMTP id 3efbu960e9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Feb 2022 07:12:48 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 21S7CkrI53084456 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Feb 2022 07:12:46 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 730D9A4060; Mon, 28 Feb 2022 07:12:46 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 29629A405B; Mon, 28 Feb 2022 07:12:46 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 28 Feb 2022 07:12:46 +0000 (GMT) Received: from yukon.ibmuc.com (unknown [9.171.85.32]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id 5F9292203EC; Mon, 28 Feb 2022 08:12:45 +0100 (CET) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PULL 3/7] aspeed: rainier: Add i2c LED devices Date: Mon, 28 Feb 2022 08:12:35 +0100 Message-Id: <20220228071239.404171-4-clg@kaod.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220228071239.404171-1-clg@kaod.org> References: <20220228071239.404171-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: DVHuKdcP2dy9EMa_YHCA51d8uYt3Nori X-Proofpoint-ORIG-GUID: DVHuKdcP2dy9EMa_YHCA51d8uYt3Nori X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-02-28_02,2022-02-26_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=772 spamscore=0 malwarescore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1034 suspectscore=0 impostorscore=0 mlxscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202280040 Received-SPF: softfail client-ip=148.163.158.5; envelope-from=clg@kaod.org; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.187, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Andrew Jeffery , Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Joel Stanley , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-devel" X-TUID: +zCAz/oVynqo From: Joel Stanley This helps quieten booting the current Rainier kernel. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Joel Stanley Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index faf7a9fd6863..7590b36bb017 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -712,6 +712,8 @@ static void rainier_bmc_i2c_init(AspeedMachineState *= bmc) =20 aspeed_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 0), 0x51, 32 * KiB)= ; =20 + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 3), "pca9552",= 0x61); + /* The rainier expects a TMP275 but a TMP105 is compatible */ i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 4), TYPE_TMP10= 5, 0x48); @@ -724,11 +726,14 @@ static void rainier_bmc_i2c_init(AspeedMachineState= *bmc) aspeed_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 0), 0x50, 64 * KiB); aspeed_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 1), 0x51, 64 * KiB); aspeed_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 2), 0x52, 64 * KiB); + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 4), "pca9552",= 0x60); =20 i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 5), TYPE_TMP10= 5, 0x48); i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 5), TYPE_TMP10= 5, 0x49); + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 5), "pca9552",= 0x60); + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 5), "pca9552",= 0x61); i2c_mux =3D i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 5)= , "pca9546", 0x70); aspeed_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 0), 0x50, 64 * KiB); @@ -747,7 +752,12 @@ static void rainier_bmc_i2c_init(AspeedMachineState = *bmc) aspeed_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 2), 0x50, 64 * KiB); aspeed_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 3), 0x51, 64 * KiB); =20 + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9552",= 0x30); + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9552",= 0x31); + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9552",= 0x32); + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9552",= 0x33); /* Bus 7: TODO max31785@52 */ + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9552",= 0x60); i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "pca9552",= 0x61); i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 7), "dps310", = 0x76); /* Bus 7: TODO si7021-a20@20 */ @@ -762,6 +772,7 @@ static void rainier_bmc_i2c_init(AspeedMachineState *= bmc) 0x4a); aspeed_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 8), 0x50, 64 * KiB)= ; aspeed_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 8), 0x51, 64 * KiB)= ; + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 8), "pca9552",= 0x60); i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 8), "pca9552",= 0x61); /* Bus 8: ucd90320@11 */ /* Bus 8: ucd90320@b */ @@ -783,13 +794,17 @@ static void rainier_bmc_i2c_init(AspeedMachineState= *bmc) "pca9546", 0x70); aspeed_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 0), 0x50, 64 * KiB); aspeed_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 1), 0x51, 64 * KiB); + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 11), "pca9552"= , 0x60); =20 =20 aspeed_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 13), 0x50, 64 * KiB= ); + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 13), "pca9552"= , 0x60); =20 aspeed_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 14), 0x50, 64 * KiB= ); + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 14), "pca9552"= , 0x60); =20 aspeed_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 15), 0x50, 64 * KiB= ); + i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 15), "pca9552"= , 0x60); } =20 static void get_pca9548_channels(I2CBus *bus, uint8_t mux_addr, --=20 2.34.1