From nobody Mon Jul 11 14:08:02 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 58D261D0B7A7 for ; Mon, 11 Jul 2022 14:10:46 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (phouka1.phouka.net [107.170.196.116]) (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 "phouka.net", Issuer "Go Daddy Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LhQlT2LR8z3xfn for ; Mon, 11 Jul 2022 14:10:45 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (localhost [127.0.0.1]) by phouka1.phouka.net (8.16.1/8.16.1) with ESMTPS id 26BE8204079736 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 11 Jul 2022 07:08:02 -0700 (PDT) (envelope-from warlock@phouka1.phouka.net) Received: (from warlock@localhost) by phouka1.phouka.net (8.16.1/8.16.1/Submit) id 26BE82VE079735; Mon, 11 Jul 2022 07:08:02 -0700 (PDT) (envelope-from warlock) Date: Mon, 11 Jul 2022 07:08:02 -0700 From: John Kennedy To: "Daniel O'Connor" Cc: freebsd-arm@freebsd.org Subject: Re: i2c bus via USB adapter Message-ID: References: <22B46606-5269-4691-A030-2F07BF0E45BF@dons.net.au> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22B46606-5269-4691-A030-2F07BF0E45BF@dons.net.au> X-Rspamd-Queue-Id: 4LhQlT2LR8z3xfn X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of warlock@phouka1.phouka.net has no SPF policy when checking 107.170.196.116) smtp.mailfrom=warlock@phouka1.phouka.net X-Spamd-Result: default: False [-1.79 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.99)[-0.989]; FORGED_SENDER(0.30)[warlock@phouka.net,warlock@phouka1.phouka.net]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm]; R_SPF_NA(0.00)[no SPF record]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:14061, ipnet:107.170.192.0/18, country:US]; R_DKIM_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[phouka.net]; FROM_NEQ_ENVFROM(0.00)[warlock@phouka.net,warlock@phouka1.phouka.net] X-ThisMailContainsUnwantedMimeParts: N On Mon, Jul 11, 2022 at 03:56:34PM +0930, Daniel O'Connor wrote: > 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). Hmm. I think you're getting my brain on the right track. Yeah, this is totally intended for people to plug into any old desktop and interface with i2c devices in an OS-agnostic way. > Something like this should work on FreeBSD: https://github.com/ZakKemble/libmcp2221 > (Might take a bit of porting though) I know Adafruit generally makes their code available, although I think they're more GPL (and aimed towards arduino). I was initially trying to keep my brain license-clean if I was going to mess with kernel code.