From owner-freebsd-arm@freebsd.org Tue Mar 19 06:28:45 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6F9E15435ED for ; Tue, 19 Mar 2019 06:28:44 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4B136E69B; Tue, 19 Mar 2019 06:28:34 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.huji.ac.il; s=57791128; h=References:To:Cc:In-Reply-To:Date:Subject:Mime-Version:Content-Type:Message-Id:From; bh=aqbzxiFGr4s8ugPN5JPAguosYUkrlRI4s/KojvvrgXQ=; b=llfbroalIZhokUHuIZPnOLR8uOSnMJaj2kY5adG2zJjh6zIDjlSTBdun/i297RmeLAsmObEVFWkFMb/4sDCWZ4VAyotdMrYQtcTPygfLa3GQLA3LFhUhXhPB37PuBGFgXEl5BTc94hO77TjlQYq9pzlIFu9XQ6dmz/GI+bKOqU3QiU/JtjkyOmjGj4hvTh7o+t+4uOcvZ4X2JjKD3b2S4EC8/y65Pwvt1DSglXS/z0yzAALEj/2nc/SBrmN8iqXPhN5vcK76pbxzsCOvq14nU15sEJAkQ+SZFX1p6xC5/Zhm24tgt0G3TidjQ6JXHcbHKA5tD6PE9/+sXfU8Y21J+g==; Received: from bach.cs.huji.ac.il ([132.65.80.20]) by kabab.cs.huji.ac.il with esmtp id 1h68Eb-000INN-75; Tue, 19 Mar 2019 08:28:25 +0200 From: Daniel Braniss Message-Id: Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Options for FBSD support with LCD device - new project Date: Tue, 19 Mar 2019 08:28:24 +0200 In-Reply-To: <004ddba628b94b80845d8e509ddcb648d21fd6c9.camel@freebsd.org> Cc: Jedi Tek'Unum , freebsd-arm@freebsd.org To: Ian Lepore References: <8df902f6-20a3-31c4-71ac-91f5d5fdf50d@optiplex-networks.com> <0ecf23e129ca7ac6a92a01bbb34c03f1ac8c6dc8.camel@freebsd.org> <89f5b8d1ab0614ac8d88b5d5f1afc63e640c3c17.camel@freebsd.org> <4EB5C6C1-7DB9-4DEE-BB23-CD1259581271@jeditekunum.com> <004ddba628b94b80845d8e509ddcb648d21fd6c9.camel@freebsd.org> X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: A4B136E69B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.huji.ac.il header.s=57791128 header.b=llfbroal X-Spamd-Result: default: False [-2.30 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.987,0]; R_DKIM_ALLOW(-0.20)[cs.huji.ac.il:s=57791128]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[huji.ac.il]; TO_DN_SOME(0.00)[]; URI_COUNT_ODD(1.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cs.huji.ac.il:+]; MX_GOOD(-0.01)[kabab.cs.huji.ac.il,post.cs.huji.ac.il]; RCVD_IN_DNSWL_NONE(0.00)[210.116.65.132.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_SHORT(-0.70)[-0.703,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:378, ipnet:132.64.0.0/13, country:EU]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.80)[ipnet: 132.64.0.0/13(-2.23), asn: 378(-1.78), country: EU(-0.00)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Mar 2019 06:28:45 -0000 > On 18 Mar 2019, at 21:13, Ian Lepore wrote: >=20 > On Mon, 2019-03-18 at 13:59 -0500, Jedi Tek'Unum wrote: >> I=E2=80=99ve been lurking here for some time. Long time (commercial) = unix >> expert. Not much FBSD. >>=20 >> I=E2=80=99m running Linux right now on NanoPi NEO (Allwinner H3) and = NEO 2 >> (Allwinner H5). Not because I love Linux (I don=E2=80=99t) but = because it >> works out of the box including I2C. I=E2=80=99d really like to use = FBSD on >> them. I hope that they will reach the same maturity as BB soon. >>=20 >> Perhaps I=E2=80=99m wrong but my impression following this list and = searching >> around is that I2C and SPI are not =E2=80=9Cout of the box=E2=80=9D = with FBSD on >> these platforms. >>=20 >> I=E2=80=99m not all that familiar with FDT. I=E2=80=99d like to learn = how to master >> it. If I understood it better I could probably bring anything I >> needed to life. BUT, that is back burner to actually completing the >> projects I=E2=80=99m trying to complete (where I just need I2C access = from >> user land). I really need those things to just work out of the box >> for now - or have clear instructions on how to enable. >>=20 >> In short I can=E2=80=99t use FBSD yet because it doesn=E2=80=99t = appear ready for >> these kinds of apps on these devices. I greatly appreciate all the >> effort that has and is going on to get there. If I had the knowledge >> I=E2=80=99d love to help, but I don=E2=80=99t currently. >>=20 >> Perhaps I=E2=80=99ve just not searched and read enough to find the = jewel >> document that explains all the FDT magic in sufficient detail. By >> that I mean *current* FDT magic (which is another confusing aspect as >> things seem to be in flux). >>=20 >> Any advice on these matters greatly appreciated. >>=20 >>=20 >=20 > I'm not sure what would give you that impression about i2c and spi. I > belive they're well-supported on virtually every arm SOC we have any > support for at all (except maybe amlogic/odroid and exynos, both of > which are rapidly bitrootting from neglect). We have command-line > tools to read and write data to i2c and spi devices from userland, as > well as programmatic interfaces using ioctl() for higher-performance > needs like a rasterized spi display. >=20 > I'm the person who does most of the i2c and spi driver work for all of > freebsd (not just arm), and it's something we use heavily in our > products at $work, so I tend to stay on top of it. I have several allwinner SoC, mainly from FriendlyArm, and neither i2c = or SPI work. I have a hacked i2c that mostly works, but hangs sometimes :-), mainly timing issues of which I have no idea how to fix. I=E2=80=99m willing to help here but my knowledge of the twsi tends to = zero. hint hint =E2=80=A6 cheers, danny >=20 > To enable i2c or spi on any given platform, you usually do have to > touch some FDT code along the way. That's because almost always, the > pins used by i2c or spi can be used for other things as well, so the > default config (which we get by importing fdt source code from linux) > usually isn't set up to enable those devices. >=20 > To enable them you typically have to write and compile a small dts > overlay and set a variable in /boot/loader.conf to have that overlay > loaded at boot time. None of that is hard, but there is quite a bit = to > explain, more than I can do right here in this email in the middle of = a > $work day. I guess maybe I should write a wiki page for it. >=20 > -- Ian >=20 > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm = > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org = "