From patchwork Sun Jan 2 21:58:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Patrick Leis X-Patchwork-Id: 12702376 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 58814C433EF for ; Sun, 2 Jan 2022 22:00:32 +0000 (UTC) Received: from localhost ([::1]:42686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n48ty-0006LR-UH for qemu-devel@archiver.kernel.org; Sun, 02 Jan 2022 17:00:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3JSDSYQcKCsI3mv12zmowwotm.kwuymu2-lm3mtvwvov2.wzo@flex--venture.bounces.google.com>) id 1n48sa-0005eI-Ie for qemu-devel@nongnu.org; Sun, 02 Jan 2022 16:59:04 -0500 Received: from [2607:f8b0:4864:20::749] (port=46044 helo=mail-qk1-x749.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3JSDSYQcKCsI3mv12zmowwotm.kwuymu2-lm3mtvwvov2.wzo@flex--venture.bounces.google.com>) id 1n48sY-0003mN-Ta for qemu-devel@nongnu.org; Sun, 02 Jan 2022 16:59:04 -0500 Received: by mail-qk1-x749.google.com with SMTP id t8-20020a05620a0b0800b004764cabb1daso15977126qkg.12 for ; Sun, 02 Jan 2022 13:59:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=3f5SYfqPTo+WeLjupIzQAU64X+H8Nyvi5ICDdAzt+0M=; b=Cm7jy0ACn9gyMHVqD9szVbFfqXenyrkoYLFOrihKi6fDUGb0d+THGmLfKiq9+zj8i+ ECoq2wnNgGyc2GrgDrxSJaQAZRtu13F8DGv6KOqk/e0xMztvAc2NDhYoBx7IktuAMJAB lKwTBqiYLRRFW0EjGL20lnaGqQ+Tp6qSWO3k6+eQoGhUgRx8yVVbIy9qjzqOcZgZF9YL TjKYZiiKFtsPIpcFLf5r+gsn5pzxYlWeAW0XcmSUI3+Mq4owV6EMVqAogu5VlmNRnh06 +wi0lTdWN6vDKbPJI5WPfVCWCLRcNrb3uEbceXzRQyyPfYW8Dls/I8unZVJodDXnpsNt w2zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=3f5SYfqPTo+WeLjupIzQAU64X+H8Nyvi5ICDdAzt+0M=; b=7GVbLR2+Jv8buJ3bNzPzzqJ3yWVUHYefrQXQdILtw3nejxwLdXiGi95RrmnRFNKk8N KESssGb+bWaYv84KhttxqzWsLt8axqjJghVAjTSv42ktcW6cUjFjPjIIT1gDMBv3Jwi2 iA3zXre3EW3FBxlDzfpiK5M9eAJqOA11xyCI0EenD4j4eH1Tf2P5fF/47AjmzUxn1iyp ypaayzw1JYjFDw7mNhGrhjlAy4pha2f0V/nu2jSuSEQwFouZ22Q/UXBd4YZeABk8h+H+ 3PtxkVFvDA0AIaMY042iZ3bxbEBkLKiUH0UZNtp6ehrHL64dP4W3B4CaaxvRtNduzZQc sWKQ== X-Gm-Message-State: AOAM530XqUqfe9sW++JwpjBozIjyF+zOB8O1HyT3k5eMDSEl1oAqdGcQ It9XLIQajAhjfyCxAmxVRVYExT+Vwx51 X-Google-Smtp-Source: ABdhPJzpcIlpA7EZz3SRUdWuOxF8LCIeFtkVxVucEDjg9qMP3n9SnMlmrIK94UvnFw10jfO8ykma1+AJ/ZjA X-Received: from venture.svl.corp.google.com ([2620:15c:2a3:200:9adc:6d14:2e33:8585]) (user=venture job=sendgmr) by 2002:ac8:5acf:: with SMTP id d15mr38097777qtd.5.1641160741440; Sun, 02 Jan 2022 13:59:01 -0800 (PST) Date: Sun, 2 Jan 2022 13:58:41 -0800 In-Reply-To: <20220102215844.2888833-1-venture@google.com> Message-Id: <20220102215844.2888833-2-venture@google.com> Mime-Version: 1.0 References: <20220102215844.2888833-1-venture@google.com> X-Mailer: git-send-email 2.34.1.448.ga2b2bfdf31-goog Subject: [PATCH 1/4] hw/arm: Add kudo i2c eeproms. From: Patrick Venture To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, crauer@google.com, wuhaotsh@google.com, titusr@google.com, Patrick Venture X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::749 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::749; envelope-from=3JSDSYQcKCsI3mv12zmowwotm.kwuymu2-lm3mtvwvov2.wzo@flex--venture.bounces.google.com; helo=mail-qk1-x749.google.com X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Chris Rauer Signed-off-by: Chris Rauer Reviewed-by: Hao Wu Reviewed-by: Patrick Venture Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/npcm7xx_boards.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index 0866d2f4f0..37de9fef43 100644 --- a/hw/arm/npcm7xx_boards.c +++ b/hw/arm/npcm7xx_boards.c @@ -328,6 +328,13 @@ static void quanta_gbs_i2c_init(NPCM7xxState *soc) */ } +static void kudo_bmc_i2c_init(NPCM7xxState *soc) +{ + at24c_eeprom_init(soc, 4, 0x50, 8192); /* mbfru */ + at24c_eeprom_init(soc, 14, 0x55, 8192); /* bmcfru */ + /* TODO: Add remaining i2c devices. */ +} + static void npcm750_evb_init(MachineState *machine) { NPCM7xxState *soc; @@ -391,6 +398,7 @@ static void kudo_bmc_init(MachineState *machine) npcm7xx_connect_flash(&soc->fiu[1], 0, "mx66u51235f", drive_get(IF_MTD, 3, 0)); + kudo_bmc_i2c_init(soc); npcm7xx_load_kernel(machine, soc); } From patchwork Sun Jan 2 21:58:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Leis X-Patchwork-Id: 12702384 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 98887C433F5 for ; Sun, 2 Jan 2022 22:09:47 +0000 (UTC) Received: from localhost ([::1]:50946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n492w-000438-E9 for qemu-devel@archiver.kernel.org; Sun, 02 Jan 2022 17:09:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3QyDSYQcKCuAXGPVWTGIQQING.EQOSGOW-FGXGNPQPIPW.QTI@flex--venture.bounces.google.com>) id 1n490P-0001Z4-U3 for qemu-devel@nongnu.org; Sun, 02 Jan 2022 17:07:10 -0500 Received: from [2607:f8b0:4864:20::b4a] (port=36677 helo=mail-yb1-xb4a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3QyDSYQcKCuAXGPVWTGIQQING.EQOSGOW-FGXGNPQPIPW.QTI@flex--venture.bounces.google.com>) id 1n490N-0006DT-Lx for qemu-devel@nongnu.org; Sun, 02 Jan 2022 17:07:08 -0500 Received: by mail-yb1-xb4a.google.com with SMTP id e137-20020a25378f000000b0060c1f2f4939so38835990yba.3 for ; Sun, 02 Jan 2022 14:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=f6aHV+RQ8g72pXcMcalu5La7wzKW07c0b6pdNRtw5zg=; b=aSMQdpIdvy0/9LirwoKxgYohl131ekE0H86WEB/hmitGPJ8KHBHbXKl6WVpv4NTArj GJf1aNE/vB4nKLUC1TxqQlV1iTR+p/yHUFQl5kciA2EOontmRH5h9ovVn5AgHC065vGu BzQqSWOlZVkIvidRLXN5WIpJlb/lsh1QiDPVpF6uNanj9DvgQ40paGNqLw/0A/bNg1Y9 6kPGFgVlqxtnrwtL9W3o2YxVmQ5gmxYO82QyaKfUZdfBQrFQUHVbLSG872LYSZqascQM ZLwIMXKYUhur06rJ5DK2En+mQnA+qCe4wYWsRdORyv3+AG4W+lyX9GDVYkZxdjWR//mq GrQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=f6aHV+RQ8g72pXcMcalu5La7wzKW07c0b6pdNRtw5zg=; b=DnUkKnLG+ewkGRUvhi5ENxI76SyWjTm0ZBhC4ySsOhZgBelrqbf5ePEdPRVbOQ7Viz uJ/AbUnpxaD/+K/iTaFI+m8/7I+j9CPh6TUmaRL291tkDKAxmWpUjeXt6Guf330xLUEQ aB86GBP+H/HgfyjL/l4R3k531GJT7bXgUzLcAVe705E/fnNPhVSbLeIIosJyuEHjHNrk qbRIMB7yWpIP5xm9e48Ej26iTikKhawywnUFUSz1lDb1LP51pSE4oRdvDZiEooheOFKt eVdI1HtFVULjAWc+w3AVDpCrwAs0SQ2N3wloDFiv7jETHhGFQxb/wxFiekC44E3k6QY/ hghg== X-Gm-Message-State: AOAM531/hgUCNVmdPDzIafBB32JlhiY2N4IYZuumlDdku2FTxlXfNPWk /bOqmabU/DN6o/s6FQ99QNJ7aCPgHB66 X-Google-Smtp-Source: ABdhPJxdL7rrXfvpDTRph9BtyfBxw1vFgUQA5jq5YSQG/0RvU2X+VYmMGsblvYNHDo+oaSoCc5u+bqbkG8xl X-Received: from venture.svl.corp.google.com ([2620:15c:2a3:200:9adc:6d14:2e33:8585]) (user=venture job=sendgmr) by 2002:a25:cfcc:: with SMTP id f195mr33313870ybg.710.1641160771516; Sun, 02 Jan 2022 13:59:31 -0800 (PST) Date: Sun, 2 Jan 2022 13:58:43 -0800 In-Reply-To: <20220102215844.2888833-1-venture@google.com> Message-Id: <20220102215844.2888833-3-venture@google.com> Mime-Version: 1.0 References: <20220102215844.2888833-1-venture@google.com> X-Mailer: git-send-email 2.34.1.448.ga2b2bfdf31-goog Subject: [PATCH 2/4] hw/arm: attach MMC to kudo-bmc From: Patrick Venture To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, crauer@google.com, wuhaotsh@google.com, titusr@google.com, Shengtan Mao X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::b4a (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::b4a; envelope-from=3QyDSYQcKCuAXGPVWTGIQQING.EQOSGOW-FGXGNPQPIPW.QTI@flex--venture.bounces.google.com; helo=mail-yb1-xb4a.google.com X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer --- hw/arm/npcm7xx_boards.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index 37de9fef43..257bf638fd 100644 --- a/hw/arm/npcm7xx_boards.c +++ b/hw/arm/npcm7xx_boards.c @@ -399,6 +399,7 @@ static void kudo_bmc_init(MachineState *machine) drive_get(IF_MTD, 3, 0)); kudo_bmc_i2c_init(soc); + sdhci_attach_drive(&soc->mmc.sdhci, 0); npcm7xx_load_kernel(machine, soc); } From patchwork Sun Jan 2 21:58:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Patrick Leis X-Patchwork-Id: 12702385 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 D072FC433EF for ; Sun, 2 Jan 2022 22:14:46 +0000 (UTC) Received: from localhost ([::1]:58048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n497l-0000bF-Vd for qemu-devel@archiver.kernel.org; Sun, 02 Jan 2022 17:14:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3RSDSYQcKCuIZIRXYVIKSSKPI.GSQUIQY-HIZIPRSRKRY.SVK@flex--venture.bounces.google.com>) id 1n490o-00020w-L3 for qemu-devel@nongnu.org; Sun, 02 Jan 2022 17:07:34 -0500 Received: from [2607:f8b0:4864:20::949] (port=37723 helo=mail-ua1-x949.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3RSDSYQcKCuIZIRXYVIKSSKPI.GSQUIQY-HIZIPRSRKRY.SVK@flex--venture.bounces.google.com>) id 1n490n-0006FE-62 for qemu-devel@nongnu.org; Sun, 02 Jan 2022 17:07:34 -0500 Received: by mail-ua1-x949.google.com with SMTP id f4-20020ab01004000000b002fa01148f7aso17106927uab.4 for ; Sun, 02 Jan 2022 14:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=9lgdCE3tpUQtlY2ZV5qpqcuD6bnWF6/JTyvPjSFhlg8=; b=kawGX3uRa+Vkk7RKjbuZ7EisI6TqDrjlgq89wwY3UZiyi5U1Pdn3YYNYmwbZW12U2S KCtzCgk3fQktlckMzLMRswVUYzEnKPTMa6bcCTyuzTF6MjXVwvXYz8HHJJCVnW604psM kF3CYNSqbLXQmIm/k9ERfAq85SwUH2O/WsY1x0BUCV2cAEHLg8xbj7SXJct8+0WKzuYn uiUoyPibBCCfzNl0hisMsXvgT/NXxxwMQ/nVn1W2xb3+SUT6ovuIQZyyG6PHGK8q3v2F SXV7chkgPZ0KdgZDHnJVFz49zjsFfLNQEOXuIZ0aZHfaP+5rjIa2vZUvva50n17lVV5M Lu6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=9lgdCE3tpUQtlY2ZV5qpqcuD6bnWF6/JTyvPjSFhlg8=; b=d1iRDYKnd4Zy6bM7zQjvQDuDPiG6jQZoDamAgQiDX5qmGnUpfj6eeKbsqUVJ419Vxb kIIXQNUkbKjrILB5y1OH85LhNqbbFbW8kOGdaU45xHcaduE2uxHnfq2Se0dz5VA/Z0i0 3HI+W8WqviKVAK6UCBG6H7spgZMhvEx0HetR0HNUbJX0dJ8NAmdl3jlTvMiUnmEQ824U K5rENE22iRVCnS5znUf1/U+TyzW427tlV13FMOYV3TDuUADYGT2ZjvUkZHqwKxZ5xPnN TWwy0phIxLGIKorzb1kSdIqRgqI51sXx9x+iuUmhtwTqFjV2ACYKajd18EUeeCaxbgsL iLew== X-Gm-Message-State: AOAM533dIeOJVDLEKl79nIkry5cMqZTyvuJpOrW9zyUC5rK4s5nUHd9o 4Jwcts0aPxew03NHlRWF99mdcLKk1Y8d X-Google-Smtp-Source: ABdhPJwQ7KyzvnBsEhs6P8YjhTDYM5lRP487o6xUR4kt13R74y8+OUUPWlZFc2sCcu1t0QHiNdnMqPk3UOji X-Received: from venture.svl.corp.google.com ([2620:15c:2a3:200:9adc:6d14:2e33:8585]) (user=venture job=sendgmr) by 2002:a05:6902:1546:: with SMTP id r6mr26126026ybu.88.1641160773845; Sun, 02 Jan 2022 13:59:33 -0800 (PST) Date: Sun, 2 Jan 2022 13:58:44 -0800 In-Reply-To: <20220102215844.2888833-1-venture@google.com> Message-Id: <20220102215844.2888833-4-venture@google.com> Mime-Version: 1.0 References: <20220102215844.2888833-1-venture@google.com> X-Mailer: git-send-email 2.34.1.448.ga2b2bfdf31-goog Subject: [PATCH 3/4] hw/arm: add i2c muxes to kudo-bmc From: Patrick Venture To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, crauer@google.com, wuhaotsh@google.com, titusr@google.com, Patrick Venture X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::949 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::949; envelope-from=3RSDSYQcKCuIZIRXYVIKSSKPI.GSQUIQY-HIZIPRSRKRY.SVK@flex--venture.bounces.google.com; helo=mail-ua1-x949.google.com X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Patrick Venture Reviewed-by: Hao Wu Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/npcm7xx_boards.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index 257bf638fd..4cd58972c5 100644 --- a/hw/arm/npcm7xx_boards.c +++ b/hw/arm/npcm7xx_boards.c @@ -330,8 +330,17 @@ static void quanta_gbs_i2c_init(NPCM7xxState *soc) static void kudo_bmc_i2c_init(NPCM7xxState *soc) { + i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 1), TYPE_PCA9548, 0x75); + i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 1), TYPE_PCA9548, 0x77); + + i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 4), TYPE_PCA9548, 0x77); + at24c_eeprom_init(soc, 4, 0x50, 8192); /* mbfru */ + + i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 13), TYPE_PCA9548, 0x77); + at24c_eeprom_init(soc, 14, 0x55, 8192); /* bmcfru */ + /* TODO: Add remaining i2c devices. */ } From patchwork Sun Jan 2 21:58:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Patrick Leis X-Patchwork-Id: 12702382 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 72F98C433F5 for ; Sun, 2 Jan 2022 22:08:04 +0000 (UTC) Received: from localhost ([::1]:48264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n491G-000277-H9 for qemu-devel@archiver.kernel.org; Sun, 02 Jan 2022 17:08:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3SCDSYQcKCuUcLUabYLNVVNSL.JVTXLTb-KLcLSUVUNUb.VYN@flex--venture.bounces.google.com>) id 1n48z4-0000f9-7o for qemu-devel@nongnu.org; Sun, 02 Jan 2022 17:05:46 -0500 Received: from [2607:f8b0:4864:20::b49] (port=40625 helo=mail-yb1-xb49.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3SCDSYQcKCuUcLUabYLNVVNSL.JVTXLTb-KLcLSUVUNUb.VYN@flex--venture.bounces.google.com>) id 1n48z2-00066x-Bm for qemu-devel@nongnu.org; Sun, 02 Jan 2022 17:05:45 -0500 Received: by mail-yb1-xb49.google.com with SMTP id z188-20020a2565c5000000b0060be1f32877so40116579ybb.7 for ; Sun, 02 Jan 2022 14:05:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=LppqlFN98GVmb98Ji5/oRgfzsW3jaDcyDZcdlq1a/gA=; b=RlbpecofOmrFTeGIK9bD1bkuH3qHH1xCOBY9NKAUwe3z/NbHFvCppHzmTJquswNWm/ f9toDJciUY8pI+K0qXDVMI9gKoT2r+YPyogt6jFSBVNQLtcQp3ly6jrVZddPsXuh9aXN tvhFKaCXdHKsrkrPFHQjC8YVUOwLX+1U2n6TbdxntjMA5SieUDqjEI3U4if6aumK/n3L 0M06M1WiPjuaj2QkGOQvLirGIfZBG3qtaNtQc5sDZM66vqnDlB/U+9E9166T7Sml6/oD ZuazDL+NzFEk6w8MbXDGx2wQ9D8H7w+OJiQXMcbKMXTGDaNPHYgmmAraD4xlX2T5LVr7 ypTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=LppqlFN98GVmb98Ji5/oRgfzsW3jaDcyDZcdlq1a/gA=; b=uygN2BCIHFQ0VQdHb86U3ZJt0vG8AHiFGRsNCJki7g1oaqQHUucMb0c9AhW82W4vxV WsvlMFv/5R9NY5z+vZHzMDyMpbmtS0TXsYttGCtMJebw981pIYSGGnUWrpn+NZ69ipib yOxA2tw1VhgbG+pyFX2ljtFBk7bDXCqiT5AvVV1YdDl+RN94cY38MytRL+QukkHbT5JA VkENIKAxXLB2NTgRspSi0RX753y+KzKsaDI73OmQTO8y8wW7vRgCJ9tk+R8FFcLN8ctH QSLfTv1H49Hd4xsrJEF9Qw2B4QhRcIvXzvNr+5Gv6mUCpwSA9fpILiAYD84jqBIw+8G9 9zxw== X-Gm-Message-State: AOAM530qMB2rbflL73/EI3zZPjL9uqLSVHXlRE4w/bxU7y75+cCpBsSq OzGgzOVEqg8/OldkMqVp1o69tFn7sYvc X-Google-Smtp-Source: ABdhPJyRwSCmCExYDGQkFyQ5Gtbfe2fbVLZKR3cBR1Nm3CMIUUTnRWTQHtHQqd0/gAtJSjAAv5EGynOX3p2a X-Received: from venture.svl.corp.google.com ([2620:15c:2a3:200:9adc:6d14:2e33:8585]) (user=venture job=sendgmr) by 2002:a05:6902:1209:: with SMTP id s9mr22395167ybu.48.1641160776047; Sun, 02 Jan 2022 13:59:36 -0800 (PST) Date: Sun, 2 Jan 2022 13:58:45 -0800 In-Reply-To: <20220102215844.2888833-1-venture@google.com> Message-Id: <20220102215844.2888833-5-venture@google.com> Mime-Version: 1.0 References: <20220102215844.2888833-1-venture@google.com> X-Mailer: git-send-email 2.34.1.448.ga2b2bfdf31-goog Subject: [PATCH 4/4] hw/arm: kudo add lm75s on bus 13 From: Patrick Venture To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, crauer@google.com, wuhaotsh@google.com, titusr@google.com, Patrick Venture X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::b49 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::b49; envelope-from=3SCDSYQcKCuUcLUabYLNVVNSL.JVTXLTb-KLcLSUVUNUb.VYN@flex--venture.bounces.google.com; helo=mail-yb1-xb49.google.com X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add the four lm75s behind the mux on bus 13. Tested by booting the firmware: lm75 42-0048: hwmon0: sensor 'lm75' lm75 43-0049: supply vs not found, using dummy regulator lm75 43-0049: hwmon1: sensor 'lm75' lm75 44-0048: supply vs not found, using dummy regulator lm75 44-0048: hwmon2: sensor 'lm75' lm75 45-0049: supply vs not found, using dummy regulator lm75 45-0049: hwmon3: sensor 'lm75' Signed-off-by: Patrick Venture Reviewed-by: Titus Rwantare Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/npcm7xx_boards.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index 4cd58972c5..7d0f3148be 100644 --- a/hw/arm/npcm7xx_boards.c +++ b/hw/arm/npcm7xx_boards.c @@ -330,6 +330,8 @@ static void quanta_gbs_i2c_init(NPCM7xxState *soc) static void kudo_bmc_i2c_init(NPCM7xxState *soc) { + I2CSlave *i2c_mux; + i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 1), TYPE_PCA9548, 0x75); i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 1), TYPE_PCA9548, 0x77); @@ -337,7 +339,14 @@ static void kudo_bmc_i2c_init(NPCM7xxState *soc) at24c_eeprom_init(soc, 4, 0x50, 8192); /* mbfru */ - i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 13), TYPE_PCA9548, 0x77); + i2c_mux = i2c_slave_create_simple(npcm7xx_i2c_get_bus(soc, 13), + TYPE_PCA9548, 0x77); + + /* tmp105 is compatible with the lm75 */ + i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 2), "tmp105", 0x48); + i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 3), "tmp105", 0x49); + i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 4), "tmp105", 0x48); + i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 5), "tmp105", 0x49); at24c_eeprom_init(soc, 14, 0x55, 8192); /* bmcfru */