From owner-freebsd-hackers@freebsd.org Wed May 8 10:43:55 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BAD615A55E2 for ; Wed, 8 May 2019 10:43:55 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0146969C7A; Wed, 8 May 2019 10:43:53 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-pf1-f172.google.com with SMTP id n19so1743328pfa.1; Wed, 08 May 2019 03:43:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FzuJAzicH8AkMxWoymqkG6Nn0R930AB3a5vz8MtMmO4=; b=Ltzopz7WdI8FFG3Jnfy9tezFsIK825PyVmbM9e6kjp3EAmFlxQT2fFc89AtwcijLWM QkbSVliEEC2AJnHdOpyUWbX5RFbA5D6eNaLUASe74QOOuSO8oX07fRaVfWgzj4Sm9jxX EoUpsb1CQYwS/EA3+S1XUHeoT8HfXt7VE2JQnryYPGVvYVPtM1o2cpfF8didSEfG7Dpm XVu6B1580SARFDE2uzTPifnLTFZPuasLlvq9oiT0NBOhgNvvempwL54O50LzHAL/cN6e sZRX+eV1m+REmHvpJWD3gTwsDUnkSj8jca91ZlZfYvP4m/l/SWuKT07/agzRfKxf4a5x 80/g== X-Gm-Message-State: APjAAAUXbD2z4OTRRW9E5YdhPO1fGHIj5ZgzT1kJw5wym7sSTlkKHYdf DIf6sv4UiJQY1YUxfr72ZQmBxC1L3sE= X-Google-Smtp-Source: APXvYqxw2QDxFaZUzjUDOEAMp2SptKsvrVJWV+EFNopf3jRHJCoPMldD/EGcaY/reFSQaePJvgYOJA== X-Received: by 2002:a65:430a:: with SMTP id j10mr20183015pgq.133.1557305292293; Wed, 08 May 2019 01:48:12 -0700 (PDT) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com. [209.85.210.177]) by smtp.gmail.com with ESMTPSA id w190sm25008619pfb.101.2019.05.08.01.48.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 01:48:12 -0700 (PDT) Received: by mail-pf1-f177.google.com with SMTP id 13so9826493pfw.9; Wed, 08 May 2019 01:48:11 -0700 (PDT) X-Received: by 2002:a63:246:: with SMTP id 67mr14399582pgc.145.1557305291862; Wed, 08 May 2019 01:48:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Gleb Popov Date: Wed, 8 May 2019 12:47:45 +0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: FreeBSD sees only one I2C device, while Linux sees two. To: Andriy Gapon Cc: freebsd-hackers X-Rspamd-Queue-Id: 0146969C7A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.210.172 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-6.17 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; IP_SCORE(-3.19)[ip: (-9.88), ipnet: 209.85.128.0/17(-3.74), asn: 15169(-2.26), country: US(-0.06)]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[172.210.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; MIME_TRACE(0.00)[0:+,1:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 May 2019 10:43:55 -0000 On Wed, May 8, 2019 at 10:38 AM Andriy Gapon wrote: > On 07/05/2019 22:04, Gleb Popov wrote: > > However, on FreeBSD I get different picture. pciconf lists both devices: > > > > ig4iic_pci0@pci0:0:21:0: class=0x118000 card=0x15e01043 > > chip=0xa1608086 rev=0x31 hdr=0x00 > > vendor = 'Intel Corporation' > > device = '100 Series/C230 Series Chipset Family Serial IO I2C > > Controller' > > class = dasp > > > > ichsmb0@pci0:0:31:4: class=0x0c0500 card=0x15e01043 chip=0xa1238086 > > rev=0x31 hdr=0x00 > > vendor = 'Intel Corporation' > > device = '100 Series/C230 Series Chipset Family SMBus' > > class = serial bus > > subclass = SMBus > > > > But there is only one /dev/iic0 device. Relevant devinfo parts: > > > > ig4iic_pci0 > > iicbus0 > > iic0 > > iicsmb0 > > smbus1 > > > > ichsmb0 > > smbus0 > > > > Is there something missing in the kernel, or I'm just doing something > wrong? > > One is an I2C controller, the other is an SMBus controller (SMBus being a > sort > of a subset of I2C). That's why you have iicbus0 and smbus0. All > hardware is > visible. It seems that you do not have smb(4) driver and, thus, there is > no > /dev/smbX. > Right, kldloading smb created /dev/smb0 on smbus0. But on Linux i2c-detect can send commands to both devices. I need to get iic1 from smb0 somehow, I guess? > -- > Andriy Gapon >