Received: by 2002:a05:6512:15a3:0:0:0:0 with SMTP id bp35csp2512981lfb; Wed, 22 Dec 2021 01:23:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjSFFk5u9JjMiOU6+h2lOlwFukCb067bdY+GqfXDQ8jxP0JMuqYtBGv5zzww/2l/+YUUmk X-Received: by 2002:a25:ae07:: with SMTP id a7mr3034020ybj.364.1640165028821; Wed, 22 Dec 2021 01:23:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640165028; cv=none; d=google.com; s=arc-20160816; b=ThW2QpVY+KP369A1rlQZpjfEqVZpiAblrcv4JMnkOWVz0IvI3l4Fp4ZEOUuGNTFbbJ l0lQLi6AzyWbPy4V8TWPuj49t40M6jsKsxLHVaAMYG+HOi7kCg6qzOKzOwjuru6yTUbs +phXU3Wl5JvFpZEzyRWQh7P4rVMlfPcCOcfm2RcLEM4aSQeD8cu7BkpqB2z4aANeIfYa jNWKV6Fd44xFe3KcJIEMhwJnZpr7QPHxJE9oZ/Hy52U8t3reWMnlSNCfk6WSOnxJg+XC ZP5cqdTYQt1zSSCCiiMlfltOMX7pZFnBLfiN2Zv++CYVRKYMHLJ1bef/Kc99eHsxPALa Xc3Q== 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=dFmmqvMUGziBKHL2lThvf11a1Zml7nKX0fMUEPeVABg=; b=CJkJsD8QFPDw6Nd9YL9gqCn60yy5uXXRNJwptiEEO3zp3WLG9vSFymxwddidQjMBvr rVv+ZdMmFdk599gkcXwERPx3Ie/0/ic0t55IE53GQnGn+4EkIINvyl+k7lR7oRX9OC8X tWzOcu8A9WSGQb75TXXE2bBjUxae3mQTawirjZ1JrE01X6/FPdKxUlVJ1c4xbuM0k14J lh8CkPPQxzMUf828cRwGNPNA/ui34pNUF2nyTLGF2pSe2sdtFfjgk3LWaToRcKvz/R8J pd1/KEHlQbdm/Qa9jZ9GCi/a7qWHBaWP0HVovdVfC2STnxW986JWBCpl56Fe7766LEZk Ab8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-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 d72si1200292ybh.608.2021.12.22.01.23.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Dec 2021 01:23:48 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-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-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Received: from localhost ([::1]:58758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzxqe-0001Cr-9Y for alex.bennee@linaro.org; Wed, 22 Dec 2021 04:23:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzxqN-0001CQ-Cf for qemu-arm@nongnu.org; Wed, 22 Dec 2021 04:23:31 -0500 Received: from twspam01.aspeedtech.com ([211.20.114.71]:64331) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzxqK-0002Mr-3j for qemu-arm@nongnu.org; Wed, 22 Dec 2021 04:23:31 -0500 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 1BM9Ht34081427; Wed, 22 Dec 2021 17:17:55 +0800 (GMT-8) (envelope-from troy_lee@aspeedtech.com) Received: from localhost.localdomain (192.168.10.10) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Dec 2021 17:23:21 +0800 From: Troy Lee To: , Subject: [PATCH v1 2/2] hw/arm/aspeed_ast2600: create i3c instance Date: Wed, 22 Dec 2021 17:23:19 +0800 Message-ID: <20211222092319.2988568-3-troy_lee@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211222092319.2988568-1-troy_lee@aspeedtech.com> References: <20211222092319.2988568-1-troy_lee@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [192.168.10.10] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 1BM9Ht34081427 Received-SPF: pass client-ip=211.20.114.71; envelope-from=troy_lee@aspeedtech.com; helo=twspam01.aspeedtech.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Andrew Jeffery , leetroy@gmail.com, "open list:ASPEED BMCs" , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Joel Stanley Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: GdgiDf4JR4W+ This patch includes i3c instance in ast2600 soc. Signed-off-by: Troy Lee --- hw/arm/aspeed_ast2600.c | 12 ++++++++++++ include/hw/arm/aspeed_soc.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index f2fef9d706..219b025bc2 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -63,6 +63,7 @@ static const hwaddr aspeed_soc_ast2600_memmap[] = { [ASPEED_DEV_VUART] = 0x1E787000, [ASPEED_DEV_FSI1] = 0x1E79B000, [ASPEED_DEV_FSI2] = 0x1E79B100, + [ASPEED_DEV_I3C] = 0x1E7A0000, [ASPEED_DEV_SDRAM] = 0x80000000, }; @@ -112,6 +113,7 @@ static const int aspeed_soc_ast2600_irqmap[] = { [ASPEED_DEV_FSI1] = 100, [ASPEED_DEV_FSI2] = 101, [ASPEED_DEV_DP] = 62, + [ASPEED_DEV_I3C] = 102, /* 102 -> 107 */ }; static qemu_irq aspeed_soc_get_irq(AspeedSoCState *s, int ctrl) @@ -230,6 +232,8 @@ static void aspeed_soc_ast2600_init(Object *obj) object_initialize_child(obj, "pwm", &s->pwm, TYPE_ASPEED_PWM); + object_initialize_child(obj, "i3c", &s->i3c, TYPE_ASPEED_I3C); + object_initialize_child(obj, "fsi[*]", &s->fsi[0], TYPE_ASPEED_APB2OPB); } @@ -542,6 +546,14 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) sysbus_connect_irq(SYS_BUS_DEVICE(&s->pwm), 0, aspeed_soc_get_irq(s, ASPEED_DEV_PWM)); + /* I3C */ + if (!sysbus_realize(SYS_BUS_DEVICE(&s->i3c), errp)) { + return; + } + sysbus_mmio_map(SYS_BUS_DEVICE(&s->i3c), 0, sc->memmap[ASPEED_DEV_I3C]); + sysbus_connect_irq(SYS_BUS_DEVICE(&s->i3c), 0, + aspeed_soc_get_irq(s, ASPEED_DEV_I3C)); + /* FSI */ if (!sysbus_realize(SYS_BUS_DEVICE(&s->fsi[0]), errp)) { return; diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index 0db200d813..0c950fab3c 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -21,6 +21,7 @@ #include "hw/timer/aspeed_timer.h" #include "hw/rtc/aspeed_rtc.h" #include "hw/i2c/aspeed_i2c.h" +#include "hw/misc/aspeed_i3c.h" #include "hw/ssi/aspeed_smc.h" #include "hw/misc/aspeed_hace.h" #include "hw/watchdog/wdt_aspeed.h" @@ -53,6 +54,7 @@ struct AspeedSoCState { AspeedRtcState rtc; AspeedTimerCtrlState timerctrl; AspeedI2CState i2c; + AspeedI3CState i3c; AspeedSCUState scu; AspeedHACEState hace; AspeedXDMAState xdma; @@ -148,6 +150,7 @@ enum { ASPEED_DEV_FSI2, ASPEED_DEV_DPMCU, ASPEED_DEV_DP, + ASPEED_DEV_I3C, }; #endif /* ASPEED_SOC_H */ -- 2.25.1