From nobody Wed Apr 27 21:08:11 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 160A81AB67F5 for ; Wed, 27 Apr 2022 21:08:21 +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 4KpWYw1xF0z3n2b for ; Wed, 27 Apr 2022 21:08:20 +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:Subject:From:To: 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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=I0yBHkmirjmZ9B7bZTQ2OSLW6XC8DScFL8m3Tdn3Ge4=; b=wTmNWmDv6xnY49AfuCM/v7aOYs YWl070TcJNC5hkZ9VcumkwGVs7ukj2hGHdHjo+S72L1S93zllwyPP9X13av0hzrRnk1DEwAbuJv/q BJ2zKvH9HL+jqtMPMBUN8MAyQYiwyUmJtU3snD28QBL6+7BjJwpGF/5x2oEzENgNHO23Ipvbzf1DG EwWjsjl/aZzDGvVIoDVLY8HkGKXkNYYqO6zFbYUU2RBQ9/bgpGiGRUYPs8+xQHqzH6tYPZw6N1eoH 0Xw+7cTBNCuayn8ZSI6fQTqCn6d2w+9kdh7jJ5QMtKk1WNVpJGYEFmC35omoieX+nj0kSOsKILf0/ BeOLbMRQ==; Received: from [2a05:bec0:26:5::74] (helo=imap5.lrau.net) by mailout5.lrau.net with esmtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1njotQ-0007iM-7Y for hardware@freebsd.org; Wed, 27 Apr 2022 21:08:12 +0000 Received: from Axel.Rau@Chaos1.DE by imap5.lrau.net (Archiveopteryx 3.2.0) with esmtpsa id 1651093691-77982-77189/7/9; Wed, 27 Apr 2022 21:08:11 +0000 Message-Id: <996df5c0-ffa7-f1bf-a9e2-6dd47d7b49e6@Chaos1.DE> Date: Wed, 27 Apr 2022 23:08:11 +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 Content-Language: de-DE To: hardware@freebsd.org From: Axel Rau Subject: Accessing I2C-Bus via ELV USB-I2C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4KpWYw1xF0z3n2b X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=chaos1.de header.s=email1 header.b=wTmNWmDv; 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.89 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[chaos1.de:s=email1]; NEURAL_HAM_MEDIUM(-0.99)[-0.989]; 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(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[chaos1.de:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; 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 Next journey starts: 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: ugen0.2: at usbus0, cfg=3D0 = md=3DHOST=20 spd=3DFULL (12Mbps) pwr=3DON (500mA) bLength =3D 0x0012 bDescriptorType =3D 0x0001 bcdUSB =3D 0x0110 bDeviceClass =3D 0x0000 bDeviceSubClass =3D 0x0000 bDeviceProtocol =3D 0x0000 bMaxPacketSize0 =3D 0x0040 idVendor =3D 0x10c4 idProduct =3D 0xea60 bcdDevice =3D 0x0100 iManufacturer =3D 0x0001 iProduct =3D 0x0002 iSerialNumber =3D 0x0003 bNumConfigurations =3D 0x0001 In loader.conf, I have: uslcom_load=3D"YES" iic_load=3D"YES" iicbus_loa But the i2c utility does not show a new bus. 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 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? Any help appreciated, Axel =2D-=20 PGP-Key: CDE74120 =E2=98=80 computing @ chaos claudius