Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp480627ybz; Wed, 15 Apr 2020 12:25:11 -0700 (PDT) X-Google-Smtp-Source: APiQypJUwf9nAwDLvLO0yRaGJQsu7gp8MI4mpXuij5FmhNbwlnTB2gCpoh03VVIHJ0EV5pRarVzR X-Received: by 2002:a05:6402:204b:: with SMTP id bc11mr10954633edb.114.1586978711141; Wed, 15 Apr 2020 12:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586978711; cv=none; d=google.com; s=arc-20160816; b=LP3W/RLXY7f078p1O4fpdf/ybauKBvdBegAlKAjThIM6zujyJoCMqIL/pJrzyfCNxL VJoK7FHgpftwQcdiTQGZ/oWoNXBMtxUfJLFve8u+JfX2tqSK6hwgrktboW9ALQx0/7/G x+x2Ky3vBP7d74qivYVfdL78UvjJVK6Fn9WF3SjyT/Kjy5JEgdnWvOPT2ajccNaz57Up ZqXdfdHQEwLOuSsHsrkMzl9tRS6h4Qvg0LwZvI6CJ2D+iBDPxYtaArrM6UZOrc5aqjUp ZVJsEx6Nd5p+62QvPnJY5vkCbVeJO3nGFXajEDCYV7Lc45Nk3d4EZpQ/M7fdU8E5tCca s84A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=AnzEbaiawgiTNRJTWxHofIpyYFKlhFEfJasJPAH6/PI=; b=q2fYNmpYzXpDdTnq3dU4b75z/2LUMHIVSdiGFbvLAqeWypZrgDp2XRaVFj1NhpSYJU RIGJ/2o5FhrWAkveyWIcp0ZJija8BWJoTk7lJTAxqli55a+nzgqK3ed9Jy23X1WLxwjv QKtEiqix89Rjpet8TstlvOPJsv0w5FZ/TX8ZInvzGW7dH2qK5hHMy0NhWcdWm5HNngiA 86CAMSvRFH/8UzqeEFb8OcyF1Ce8rW9tcZRU08qEVVAziKijDAPKDunzYuq/Q+DehOYi uztPQ/4ElVLGLJgTwdNN7zI3bDq/UCWojJ6cH8A6UOMcPgdawxfaDBPfngL820/0bn0k QjoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm2si9988515edb.22.2020.04.15.12.24.47; Wed, 15 Apr 2020 12:25:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406779AbgDNHmE (ORCPT + 99 others); Tue, 14 Apr 2020 03:42:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:52926 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729368AbgDNHmB (ORCPT ); Tue, 14 Apr 2020 03:42:01 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 62554AE17; Tue, 14 Apr 2020 07:41:59 +0000 (UTC) Date: Tue, 14 Apr 2020 09:41:58 +0200 From: Jean Delvare To: Sebastian Reichel Cc: , , Adam Honse Subject: Re: [PATCH] i2c: piix4: Add second SMBus for X370/X470/X570 Message-ID: <20200414094158.089dd5ea@endymion> In-Reply-To: <20200413150634.474842-1-sebastian.reichel@collabora.com> References: <20200413150634.474842-1-sebastian.reichel@collabora.com> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, On Mon, 13 Apr 2020 17:06:34 +0200, Sebastian Reichel wrote: > The second interface can be found on X370, X470 and X570 according > to the bugzilla entry. I only tested with X570 on an ASRock X570 > Taichi: > > $ lspci -nnv -d 1022:790b > 00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 61) > Subsystem: ASRock Incorporation FCH SMBus Controller [1849:ffff] > Flags: 66MHz, medium devsel > Kernel driver in use: piix4_smbus > Kernel modules: i2c_piix4, sp5100_tco > > Before the patch: > > $ i2cdetect -l | grep PIIX4 > i2c-1 unknown SMBus PIIX4 adapter port 2 at 0b00 N/A > i2c-0 unknown SMBus PIIX4 adapter port 0 at 0b00 N/A > > After the patch: > > $ i2cdetect -l | grep PIIX4 > i2c-1 unknown SMBus PIIX4 adapter port 2 at 0b00 N/A > i2c-2 unknown SMBus PIIX4 adapter port 1 at 0b20 N/A > i2c-0 unknown SMBus PIIX4 adapter port 0 at 0b00 N/A > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202587 > Reported-by: Adam Honse > Signed-off-by: Sebastian Reichel > --- > Hi, > > The Bugzilla entry contains a second change, which reduces the timeouts > for quicker operation. I did not include that change, since I do not know > if this is a good idea for all devices supported by this driver. In any > case it should be a separate patch. Let's get the interface working for > now. > > -- Sebastian > --- > drivers/i2c/busses/i2c-piix4.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c > index 30ded6422e7b..3e89143a0ecf 100644 > --- a/drivers/i2c/busses/i2c-piix4.c > +++ b/drivers/i2c/busses/i2c-piix4.c > @@ -976,9 +976,11 @@ static int piix4_probe(struct pci_dev *dev, const struct pci_device_id *id) > } > } > > - if (dev->vendor == PCI_VENDOR_ID_AMD && > - dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS) { > - retval = piix4_setup_sb800(dev, id, 1); > + if (dev->vendor == PCI_VENDOR_ID_AMD) { > + if (dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS || > + dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS) { > + retval = piix4_setup_sb800(dev, id, 1); > + } > } > > if (retval > 0) { Adam just sent pretty much the same patch: https://patchwork.ozlabs.org/project/linux-i2c/patch/20200410204843.3856-1-calcprogrammer1@gmail.com/ Reviewed-by: Jean Delvare I'll leave it to Wolfram which one he wants to apply. -- Jean Delvare SUSE L3 Support