From nobody Mon Jul 11 06:26:34 2022 X-Original-To: freebsd-arm@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 DAF921D0E8DB for ; Mon, 11 Jul 2022 06:54:19 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net [IPv6:2403:5800:5200:4700:225:90ff:fe47:39b4]) (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 ECDSA (P-384) client-digest SHA384) (Client CN "dons.net.au", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LhF3s2Jj9z493b for ; Mon, 11 Jul 2022 06:54:16 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.17.1/8.16.1) with ESMTPS id 26B6R56g034051 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Mon, 11 Jul 2022 15:57:15 +0930 (ACST) (envelope-from darius@dons.net.au) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dons.net.au; s=default; t=1657520839; bh=q4kzkDCgh7zPmJEIkEyAbgnaNP7Kti5Arye99InkLOk=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=jZ6N5gXmnH/c82wMkK+IR+gyS1obSmE7sobDjf9f4heHc7M8TkhHSVs+JFDHBZ2Bj waxf5ZB3JZllfGPASSzGhepXCGSS3I0iDbmjvA7zZenCgeeGnWfxh0OA5TlkkGGhQt +csX21c+lj4aFtDqjVpUIjT0u3ozErRWU875bt0U= Received: (from mailnull@localhost) by midget.dons.net.au (8.17.1/8.16.1/Submit) id 26B6Qisv034041 for ; Mon, 11 Jul 2022 15:56:44 +0930 (ACST) (envelope-from darius@dons.net.au) X-MIMEDefang-Relay-a1a524833438212bf543e143edafb27bc4d2c346: 2403:5800:5200:4700:d5ee:63bd:dd7f:a5c3 Received: from smtpclient.apple ([IPv6:2403:5800:5200:4700:d5ee:63bd:dd7f:a5c3] [2403:5800:5200:4700:d5ee:63bd:dd7f:a5c3]) by 2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net (envelope-sender ) (MIMEDefang) with ESMTP id 26B6Qi55034029; Mon, 11 Jul 2022 15:56:44 +0930 Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: Re: i2c bus via USB adapter From: "Daniel O'Connor" In-Reply-To: Date: Mon, 11 Jul 2022 15:56:34 +0930 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <22B46606-5269-4691-A030-2F07BF0E45BF@dons.net.au> References: To: John Kennedy X-Mailer: Apple Mail (2.3696.100.31) X-Spam-Score: 1.3 (*) No, score=1.3 required=5.0 tests=RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.5 X-Scanned-By: MIMEDefang 2.84 on 10.0.2.1 X-Rspamd-Queue-Id: 4LhF3s2Jj9z493b X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dons.net.au header.s=default header.b=jZ6N5gXm; dmarc=pass (policy=quarantine) header.from=dons.net.au; spf=pass (mx1.freebsd.org: domain of darius@dons.net.au designates 2403:5800:5200:4700:225:90ff:fe47:39b4 as permitted sender) smtp.mailfrom=darius@dons.net.au X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[dons.net.au,quarantine]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[dons.net.au:s=default]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-arm]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[dons.net.au:+]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:4764, ipnet:2403:5800::/32, country:AU]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N > On 11 Jul 2022, at 11:48, John Kennedy wrote: > Simple recursive grepping didn't get me any hits for MCP2221, and = there is > a TON of hits for Microchip, so currently assuming that FreeBSD = doesn't have > a driver yet. Total ignorance at this point, but if there was a = driver, would > the expected behavior (assuming right drivers are loaded) would be for = the > system to figure out there was an I2C bus hiding behind it and make = another > /dev/iic# available, devoted to it? I don't believe there is a FreeBSD driver for it. > A ugen driver (generic USB) seems right. The umodem driver seems > reasonable (serial device). The uhid driver seems wrong, at least in > this case, but of course most of the hits I see on the forums are mice > and such, so maybe misidentified in this case. Checking the MCP2221 data sheet shows it does present itself as UART = (since it is a UART) and HID (for I2C control) HID is common because it means you don't need a custom driver (and the = associated cost/PITA factor with signing one for Windows & OSX). Something like this should work on FreeBSD: = https://github.com/ZakKemble/libmcp2221 (Might take a bit of porting though) -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum