From nobody Mon Nov 01 05:35:55 2021 X-Original-To: freebsd-riscv@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 BB8E21829E4A for ; Mon, 1 Nov 2021 05:36:04 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HjMFw3wFrz3Mb7; Mon, 1 Nov 2021 05:36:04 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: philip/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 6042923C80; Mon, 1 Nov 2021 05:36:04 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailauth.nyi.internal (Postfix) with ESMTP id 21EAA27C0054; Mon, 1 Nov 2021 01:36:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 01 Nov 2021 01:36:04 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdehuddgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffokfgjfhggtgesthdtmh dtredttdenucfhrhhomheprfhhihhlihhpucfrrggvphhsuceophhhihhlihhpsehfrhgv vggsshgurdhorhhgqeenucggtffrrghtthgvrhhnpeejleeuhfejkeettefghfevfedtie dtheekuedvueevfedvgffhgeffffehjedtudenucffohhmrghinhepfhhrvggvsghsugdr ohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hphhhilhhiphdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudduieeivdei vdegkedqvdefhedukedttdekqdhphhhilhhipheppehfrhgvvggsshgurdhorhhgsehtrh houhgslhgvrdhish X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 1 Nov 2021 01:36:03 -0400 (EDT) From: Philip Paeps To: Thomas Skibo Cc: freebsd-riscv@freebsd.org Subject: Re: i2c driver for SiFive Unmatched Date: Mon, 01 Nov 2021 13:35:55 +0800 X-Mailer: MailMate (1.14r5831) Message-ID: <08F98357-4565-4791-8634-3ECFAA534B6F@freebsd.org> In-Reply-To: References: <0FE65505-39B1-42D7-B016-9122ECA098D3@freebsd.org> List-Id: FreeBSD on the RISC-V instruction set architecture List-Archive: https://lists.freebsd.org/archives/freebsd-riscv List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-riscv@freebsd.org X-BeenThere: freebsd-riscv@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-ThisMailContainsUnwantedMimeParts: N On 2021-10-30 02:24:23 (+0800), Thomas Skibo wrote: > On Thu, Oct 28, 2021 at 11:40:34AM +0800, Philip Paeps wrote: >> On 2021-10-23 05:05:47 (+0800), Thomas Skibo wrote: >>> I have the OpenCores i2c driver (dev/iicbus/iicoc.c) up and running >>> on the >>> SiFive Unmatched. It was just a matter of adding the right >>> compatibility >>> strings and implementing iicoc_iicbus_repeated_start() which, oddly, >>> was >>> stubbed out. (Seems to me it should have returned an error if not >>> implemented.) >>> >>> I can put it up on Phabricator if there is interest. >> >> Yes please! > > It's up at https://reviews.freebsd.org/D32737 Awesome! Thanks for doing this work. I've just committed your changes to main. I'll merge them to stable/13 in a couple of days. As Jess suggested in the review, I've also added the driver to GENERIC. It's a small amount of code and it measurably lowers the friction of actually getting productive with a RISC-V board on FreeBSD. We've already got the SPI drivers in there too. And thanks for fixing the repeated start. I remember noticing this when I added the FDT attachment two years ago. I never had a chance to look into it more closely. Philip -- Philip Paeps Senior Reality Engineer Alternative Enterprises