Received: by 2002:ac2:5f6a:0:0:0:0:0 with SMTP id c10csp634268lfc; Thu, 21 Oct 2021 11:41:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJlJ6APn44jDhZQRCENtq/339yNQt/k82gHiYeXEe2p9oqQyVM3T5OM8kYKN+o+TZMLVkd X-Received: by 2002:a9d:17c5:: with SMTP id j63mr6402305otj.191.1634841680498; Thu, 21 Oct 2021 11:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634841680; cv=none; d=google.com; s=arc-20160816; b=o2pZLIoLFO2gfvbLLBJA1ygPP9DCGSYnh1H9X00b5JT0/8VN/0ODAyj/hKWbISw0Kv jWhvsSPQVXXA1ON6VHYbNYOR8VQ3j712bd/3HATHT5MZkdUt6A911ocMFFIamKzRiq+k CEzaS1dozXKb0oULwjze2WLxI+GbYeBw7Tx3LWq6q1WYY6VPywZYRqgpC9vhrCJtZGZ5 KQylfirpaO1+pQuUhx8XaPVXLh12TCCdy03earYQkmSFlMgPONxUOesoHEIwNT5eijQA EGFuaG0KZ1iSEBbLWtcuFsa0mOlb4iHh+K4xiqqXdk6E8Kfn3W3Jdadn9n2rWFvmNvsc Y+Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=XySEhkJlNcR3diZ58Nj8hN3phEiW/3CrFyOD9IYp7uY=; b=d0wSGD7+YyNHYd868Zuit1BidrKB2lAbCaqsa0I8gMtM1Q6b3V/n3uIPFBqbDXeKEl 4pmUZG0CQv5jY9nyzd5HzkQenZGHot305EtzKK7ZpEZKtRoXtmCYZvpA+f/zSoK1Myyz BduVGdfTXy0iTTI3M5h6wsEX4jc6F6XuwyOHEo9BElJSh3BpQdiiyMPEv5xjm/lwhohw nWMNziSjqldr2Zjo3EMsBwGYAKtOYergcY21K1+gZTdO86mKK4G1If/KF1J2ye9jq6uS DoazQC8ZYqb9puji/gJ62siBhKRHhsdrKxn9RNLwHjHIs3qr6BOcnk7/9Xnkk0P1jrFQ wbrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VlGzyzoY; 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"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k5si7453260otr.63.2021.10.21.11.41.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Oct 2021 11:41:20 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20210112 header.b=VlGzyzoY; 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"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from localhost ([::1]:51366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdd0B-0005FW-M0 for alex.bennee@linaro.org; Thu, 21 Oct 2021 14:41:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3ErRxYQgKCFMHF2v9ED219916z.x97Bz7F-vC789818F.9C1@flex--wuhaotsh.bounces.google.com>) id 1mdczI-0005D9-Bb for qemu-arm@nongnu.org; Thu, 21 Oct 2021 14:40:25 -0400 Received: from mail-pl1-x649.google.com ([2607:f8b0:4864:20::649]:49891) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3ErRxYQgKCFMHF2v9ED219916z.x97Bz7F-vC789818F.9C1@flex--wuhaotsh.bounces.google.com>) id 1mdczF-0002tw-0c for qemu-arm@nongnu.org; Thu, 21 Oct 2021 14:40:23 -0400 Received: by mail-pl1-x649.google.com with SMTP id y13-20020a1709029b8d00b0013dc7c668e2so607529plp.16 for ; Thu, 21 Oct 2021 11:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=XySEhkJlNcR3diZ58Nj8hN3phEiW/3CrFyOD9IYp7uY=; b=VlGzyzoY41XkXXDtt2c3YpLs6i/YCAgqjrjnoa2yePRrO3/ft+yqxIgTejMqCSch1c En47UgEwSJlhBld1TAGcD43AnWXyU6TPClwzwUYyZHE1+kHDcroqwkLq3CQIbsr5zYNE 13wISK7B72jLpZM6WJf/yzWK0q6054b34KSJpnm9n0ucuBFzdKeM7l1A4mXkeC1DmvCV 04FCq884+fg6hUixDrBgblG3J26XOViml0myqVFMAOVgJtNuYupzCsFKAZlG6uTQKbhj 1Sdz1cypV5tcqYuUA9U41XBss2t3n8BTeOW5CTmXq7pkmZUhl7+gG0UtrWIdrDxrWbvn EbOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=XySEhkJlNcR3diZ58Nj8hN3phEiW/3CrFyOD9IYp7uY=; b=5LaKIBKFLrR9nt5XRwkubdjrWKfRFA/k2xSgUUlATRNRaLGFBsVJ+g6xuWG2NrLnil gIsjd1061+u/GD0yQWT7O8bKAsMmURz1kxv/TQ5Jykwso+b+TjX4/nRJ3Kex8g8+Xkbv fF/D5DjLvjAJhHWZUftxNzf7m4LodCYtA8+5+eog9n4F5CzrgsHBQmmyJebkOhpcqv2v Z/YGwl4hVgJCnmIcT4sYRDVDtVnbhJsRhxr7w2zmZ8alS6oVj1bP9pehALlUchxwPV5L IcurtCAfh6NFm+25KW2RZX/hMRLO5VmNkBQM85/cBDlyoC8GyPmlXmt1hd9ENKYqnFSH o4zw== X-Gm-Message-State: AOAM530NO2VcykHDhd8xS3+DZxs5vw7jvbUstXVjefV5V+BfbDZdEpOI DlcszJU3WLNRgHPyELG1s5OlmVLp3EFkUw== X-Received: from mimik.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:4e]) (user=wuhaotsh job=sendgmr) by 2002:a05:6a00:1354:b0:44c:eb65:8570 with SMTP id k20-20020a056a00135400b0044ceb658570mr7562672pfu.34.1634841618298; Thu, 21 Oct 2021 11:40:18 -0700 (PDT) Date: Thu, 21 Oct 2021 11:39:49 -0700 Message-Id: <20211021183956.920822-1-wuhaotsh@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog Subject: [PATCH v2 0/7] Misc NPCM7XX patches From: Hao Wu To: peter.maydell@linaro.org Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, wuhaotsh@google.com, venture@google.com, Avi.Fishman@nuvoton.com, kfting@nuvoton.com, hskinnemoen@google.com Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::649; envelope-from=3ErRxYQgKCFMHF2v9ED219916z.x97Bz7F-vC789818F.9C1@flex--wuhaotsh.bounces.google.com; helo=mail-pl1-x649.google.com X-Spam_score_int: -95 X-Spam_score: -9.6 X-Spam_bar: --------- X-Spam_report: (-9.6 / 5.0 requ) BAYES_00=-1.9, 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: oTA0N9voFqgx This patch set contains a few bug fixes and I2C devices for some NPCM7XX boards. Patch 1~2 fix a problem that causes the SMBus module to behave incorrectly when it's in FIFO mode and trying to receive more than 16 bytes at a time. Patch 3 fixes a error in a register for ADC module. Patch 4 makes the ADC input to be R/W instead of write only. It allows a test system to read these via QMP and has no negative effect. Patch 5 modifies at24c_eeprom_init in NPCM7xx boards so that it can fit more use cases. Patch 6 uses the function defined in patch 5 to add the EEPROM and other I2C devices for Quanta GBS board. Patch 7 adds an ID for SMBus devices in NPCM7xx boards. This allows us to add device to these buses using "-device" parameter. -- Changes since v1: 1. Rewrote patch 5 to implement the function in NPCM7xx board file instead of the EEPROM device file. 2. Slightly modify patch 6 to adapt to the changes and QEMU comment style. 3. Squash patch 7 into patch 5 to make it compile. 4. Add a new patch 7. Hao Wu (6): hw/i2c: Clear ACK bit in NPCM7xx SMBus module hw/i2c: Read FIFO during RXF_CTL change in NPCM7XX SMBus hw/adc: Fix CONV bit in NPCM7XX ADC CON register hw/adc: Make adci[*] R/W in NPCM7XX ADC hw/nvram: Update at24c EEPROM init function in NPCM7xx boards hw/arm: Add ID for NPCM7XX SMBus Patrick Venture (1): hw/arm: quanta-gbs-bmc add i2c devices hw/adc/npcm7xx_adc.c | 4 +- hw/arm/npcm7xx.c | 1 + hw/arm/npcm7xx_boards.c | 97 +++++++++++++++++++++------------- hw/i2c/npcm7xx_smbus.c | 8 +-- tests/qtest/npcm7xx_adc-test.c | 2 +- 5 files changed, 67 insertions(+), 45 deletions(-) -- 2.33.0.1079.g6e70778dc9-goog