From owner-freebsd-arm@freebsd.org Mon Mar 18 19:52:11 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 ACC07154C29B for ; Mon, 18 Mar 2019 19:52:11 +0000 (UTC) (envelope-from jedi@jeditekunum.com) Received: from a2i644.smtp2go.com (a2i644.smtp2go.com [103.47.206.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A23373677 for ; Mon, 18 Mar 2019 19:52:10 +0000 (UTC) (envelope-from jedi@jeditekunum.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=m4fue0.a1-4.dyn; x=1552939630; h=Feedback-ID: X-Smtpcorp-Track:To:Date:Subject:Message-Id:From:Reply-To:Sender: List-Unsubscribe; bh=iGkepK9wgMns/3O6qUAXfzqrR+P/iB5Y4oRLF9Sd1Ps=; b=2gHwT1QI Anq5xFtQxQrRgpJmlzIOGClEahdmTAWC6F/Y3s4hKXOi7q+ttC4X11DZoVWK5NZXIx0/2UB7xJNsP fJ9+DQ6Tteh3kCpIDQwLwn8/zZ7CUhdInUJqKRKi5NTpvdfebsGdeWMDWglzAz3lzrhlGj58t0TNW jG9Tu7qX4VAVMl6HWecQNh+BRoKhBQlxKNGoTmgpDiJISEcOyhWCJWsbAeS/iPasypbVLy3M1AqZC 0UJYG93QPwbh4zs3ZMTIWw5KKShd9XrPg/Yu3R6RWHTvRCtUUMITS3iSG3IWJmURC9rU5w1HGLnA3 iBg0qgxlyrkJC8fOwZEYp3I06A==; Received: from [10.173.255.233] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.91) (envelope-from ) id 1h5yIl-ED4wyy-4l; Mon, 18 Mar 2019 19:52:03 +0000 Received: from [10.162.213.37] (helo=takodana.opaxus.net) by smtpcorp.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.91) (envelope-from ) id 1h5yIk-IbZvem-K2; Mon, 18 Mar 2019 19:52:02 +0000 Received: from [10.0.10.1] (174-20-17-78.mpls.qwest.net [174.20.17.78]) by takodana.opaxus.net (Postfix) with ESMTPSA id C2A332662C; Mon, 18 Mar 2019 14:52:00 -0500 (CDT) From: Jedi Tek'Unum 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: Mon, 18 Mar 2019 14:51:59 -0500 In-Reply-To: <004ddba628b94b80845d8e509ddcb648d21fd6c9.camel@freebsd.org> Cc: 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-Smtpcorp-Track: 1h5ymkmPZv-XK2.M7PM4p7fk Feedback-ID: 207158m:207158azGM_-I:207158sDWsPdZzId X-Report-Abuse: Please forward a copy of this message, including all headers, to X-Rspamd-Queue-Id: 5A23373677 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=smtpservice.net header.s=m4fue0.a1-4.dyn header.b=2gHwT1QI X-Spamd-Result: default: False [-3.59 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[smtpservice.net:s=m4fue0.a1-4.dyn]; MX_INVALID(0.50)[cached]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[jeditekunum.com]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[smtpservice.net:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_MED(-0.20)[132.206.47.103.list.dnswl.org : 127.0.3.2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; NEURAL_HAM_SHORT(-0.84)[-0.836,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; IP_SCORE(-0.76)[asn: 1299(-3.77), country: EU(-0.00)]; ASN(0.00)[asn:1299, ipnet:103.47.204.0/22, country:EU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] 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: Mon, 18 Mar 2019 19:52:11 -0000 My impression wasn=E2=80=99t that support wasn=E2=80=99t there - but = =E2=80=9Cout of the box=E2=80=9D configuration wasn=E2=80=99t there. In = comparison, I didn=E2=80=99t have to do anything to get I2C enabled in = the binary distribution of Linux that comes through the manufacturer. Its the enabling part that isn=E2=80=99t obvious to most people IMO. Documentation/wiki is great. But even better would be all the enabling = overlays already in place and the entries in loader.conf already there = and commented out. It would be so much easier to go to a =E2=80=9Ccommon = place=E2=80=9D (loader.conf), skim through the notes, find the thing = that one wants, and then just uncomment the referenced line! (Or any = other similarly easy method.) For FBSD to get a better foothold in this space it needs to be better = documented. For example, the wiki for NEO2 = is a = step-by-step guide for how to acquire and configure Linux for it. > On Mar 18, 2019, at 2:13 PM, 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. >=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