From nobody Wed Apr 27 22:47:06 2022 X-Original-To: hardware@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5891A1999CDC for ; Wed, 27 Apr 2022 22:47:09 +0000 (UTC) (envelope-from Axel.Rau@Chaos1.DE) Received: from mailout5.lrau.net (mailout5.lrau.net [IPv6:2a05:bec0:26:5::73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mailout5.lrau.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KpYlw14zTz4Tmt for ; Wed, 27 Apr 2022 22:47:08 +0000 (UTC) (envelope-from Axel.Rau@Chaos1.DE) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=chaos1.de; s=email1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:To: From:Subject:Mime-Version:Date:Message-Id:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=C5F5qGFd82x72fo/oPJ52+YUL2UEAPb+xVuvxECz1v4=; b=oBSaKuJQe83fRJK5UFwmawytCr 4cuc4InzrUxy0KI6PcbYJIEspv+ha4Zx6Nqnxv01KQkkxbdSaf690Iylk0a/60WrPc6k+gwoSzcUD 5YrtGXQwi0u8vqAinOYgA0JlaQMYk+/vanuNVIaQ6/MnLXye8dunhrwbnzrVBMlyR7stMY9MW3iR6 HfzyZCAVktGl4CgbdVUnFPniDUHHGxU2g6zfpB7Xild9kSIaPtVwi5o1K6STMMtzDl1wWUETKKgS0 qZZgxoc4F9Pi6Ry9IsQMdT/6a5PjXCR+BMiHuIgSmGW4YoT8pxcLRnAM3ywsZIa8IODoAcMRbA+tQ VLHQKadA==; Received: from [2a05:bec0:26:5::74] (helo=imap5.lrau.net) by mailout5.lrau.net with esmtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1njqR9-0005Wz-71 for hardware@freebsd.org; Wed, 27 Apr 2022 22:47:07 +0000 Received: from Axel.Rau@Chaos1.DE by imap5.lrau.net (Archiveopteryx 3.2.0) with esmtpsa id 1651099626-77821-77189/7/12; Wed, 27 Apr 2022 22:47:06 +0000 Message-Id: <0d980857-704a-6edd-07c3-aa31548ee03c@Chaos1.DE> Date: Thu, 28 Apr 2022 00:47:06 +0200 List-Id: General discussion of FreeBSD hardware List-Archive: https://lists.freebsd.org/archives/freebsd-hardware List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hardware@freebsd.org Mime-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: [RESOLVED] Re: Accessing I2C-Bus via ELV USB-I2C Content-Language: de-DE From: Axel Rau To: hardware@freebsd.org References: <996df5c0-ffa7-f1bf-a9e2-6dd47d7b49e6@Chaos1.DE> In-Reply-To: <996df5c0-ffa7-f1bf-a9e2-6dd47d7b49e6@Chaos1.DE> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4KpYlw14zTz4Tmt X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=chaos1.de header.s=email1 header.b=oBSaKuJQ; dmarc=none; spf=none (mx1.freebsd.org: domain of Axel.Rau@Chaos1.DE has no SPF policy when checking 2a05:bec0:26:5::73) smtp.mailfrom=Axel.Rau@Chaos1.DE X-Spamd-Result: default: False [-2.72 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[chaos1.de:s=email1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[chaos1.de:dkim]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[chaos1.de]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.99)[-0.985]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[chaos1.de:+]; NEURAL_HAM_SHORT(-0.83)[-0.834]; MLMMJ_DEST(0.00)[hardware]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:197071, ipnet:2a05:bec0::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[2a05:bec0:26:5::73:from] X-ThisMailContainsUnwantedMimeParts: N The application daemon speaks twi over the serial line (/dev/cuaU0) Everything works perfectly. Thanks, Axel Am 27.04.22 um 23:08 schrieb Axel Rau: > Next journey starts: >=20 > For the home2l project, I need a supported I2C interface via USB. > I got this one: > https://de.elv.com/elv-usb-ic-interface-usb-i2c-092255?fs=3D1805459039 > Unfortunately it shows up as a serial device on FreeBSD: >=20 > ugen0.2: at usbus0, cfg=3D0 = md=3DHOST=20 > spd=3DFULL (12Mbps) pwr=3DON (500mA) >=20 > =C2=A0 bLength =3D 0x0012 > =C2=A0 bDescriptorType =3D 0x0001 > =C2=A0 bcdUSB =3D 0x0110 > =C2=A0 bDeviceClass =3D 0x0000=C2=A0 > =C2=A0 bDeviceSubClass =3D 0x0000 > =C2=A0 bDeviceProtocol =3D 0x0000 > =C2=A0 bMaxPacketSize0 =3D 0x0040 > =C2=A0 idVendor =3D 0x10c4 > =C2=A0 idProduct =3D 0xea60 > =C2=A0 bcdDevice =3D 0x0100 > =C2=A0 iManufacturer =3D 0x0001=C2=A0 > =C2=A0 iProduct =3D 0x0002=C2=A0 > =C2=A0 iSerialNumber =3D 0x0003=C2=A0 > =C2=A0 bNumConfigurations =3D 0x0001 >=20 > In loader.conf, I have: > uslcom_load=3D"YES" > iic_load=3D"YES" > iicbus_loa >=20 > But the i2c utility does not show a new bus. >=20 > From dmesg: > root@axels-bsdbox:~ # dmesg | grep iic > ig4iic0: mem=20 > 0xdf230000-0xdf230fff irq 16 at device 21.0 on pci0 > ig4iic0: Using MSI > iicbus0: on ig4iic0 > iic0: on iicbus0 > ig4iic1: mem=20 > 0xdf22f000-0xdf22ffff irq 17 at device 21.1 on pci0 > ig4iic1: Using MSI > iicbus1: on ig4iic1 > iic1: on iicbus1 > root@axels-bsdbox:~ # dmesg | grep I2C > ig4iic0: mem=20 > 0xdf230000-0xdf230fff irq 16 at device 21.0 on pci0 > iicbus0: on ig4iic0 > iic0: on iicbus0 > ig4iic1: mem=20 > 0xdf22f000-0xdf22ffff irq 17 at device 21.1 on pci0 > iicbus1: on ig4iic1 > iic1: on iicbus1 > ugen0.2: at usbus0 > uslcom0: on usbus0 >=20 > They provide a (linux) driver ("Treiber") which seems to implement the=20 > I2C protocoll on top of the serial interface. > Do we have such a driver on FreeBSD, or exist other supported I2C=20 > devices to be plugged into USB? >=20 > Any help appreciated, > Axel =2D-=20 PGP-Key: CDE74120 =E2=98=80 computing @ chaos claudius