From owner-freebsd-arm@freebsd.org Mon Mar 18 19:57:24 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 5357B154C53B for ; Mon, 18 Mar 2019 19:57:24 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (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 934D573A2B for ; Mon, 18 Mar 2019 19:57:23 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1552939041; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=O2MxHP8ExQ9wa43W3t5bAVZjkUGV5OpfsyAL2JQusDbNi/CGoVrWREKdiFaEOXgHOC8GD5UnOQWQz Iwkv5afr2fcw2sjNcjVxNtRYa7V2NPNSBg+Tk5z0owrIeM8OXlxCDKr2FK/jPSa3Q7bidbCHVCJ7Ir 0urXTZ6HjqLs7L2fvzL3sZ1m+bJv6OFfuE38KXjpODXmlwqLu7bfdqhpM15Rxp7SB3lFUxQ6Iwjd2N R8WCUxkZZSUExv88CD9j6uHbvDMxKqUbJg5cQSUFO2k29fLCqTva+j7PRIRrT70VtZtshNiPnbEQAi J0EGGUVzKfqlZ7rbhtc8ZytlcejS0/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=Z2qUCLVZI2eGZb7F+epRRYyIzl6v7qMCuThYW3dJWG8=; b=kW7SLRO1rL7pkqh5XjBccYJhBKdOP3GszlRH+nTj4DNJOqtHOWbAdOtbUf5Me99Z4Xd+CygFlXZO6 G6M63zIhcAoSybfhGENBoVhHu5EjkFg9d1kFKcf1FD8KFAwxN4UaRY5s6WJfJYCOnKWtwKjnNqhTY9 pqM9ynuBchOU7qDIt7E+x1p/ESySTEcP+dgoYeFHmq/uaVCQd+Q9CY0+c2cA3W9icaKbaH7+wm6t7c NV10gGJcUi3p2D0rp2gXaCTj2MWk5SSXsUuuGaVhACnZw1hwH7Jl4U+JBLGH3x3Z9YxvEzzrzsgG2X DhpLa/a376i/d+JmEDlNu0w7n9BEK6g== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=Z2qUCLVZI2eGZb7F+epRRYyIzl6v7qMCuThYW3dJWG8=; b=cTqp/Qdc9eclLMtJftx+2MgTcvZemi0vIi+xMt4JaeO6D+kaGZpDPAVYDnB2zE78YbdxpEsBVm6nw mfvaQUyD5o9RzoH+hxZ+5Ds4Ssllo7fwPF9rHiBHgDaRmJCWtfOr8dO6xW6Io+DvgJJ4IU6ScB9YpT SXf8HjgLBnep8vFtumnlwi3KU68giqwXy/bz66x1PMgF66KsPSNDpirFtYs6hoJ14yUHSlIPvVLBUy UcJq2Y74hhQiDYASr680lu4tFemwU1+zBP2/5y36KWFxVsyR9oJypTPRwgNHkMLuoz5EMDqWPbaPxs edzUBoEsn3xZEYggSB16mGdBkHuFiuA== X-MHO-RoutePath: aGlwcGll X-MHO-User: 096bac3d-49b8-11e9-9bb1-1f29e4676f89 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 096bac3d-49b8-11e9-9bb1-1f29e4676f89; Mon, 18 Mar 2019 19:57:20 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x2IJvIum063085; Mon, 18 Mar 2019 13:57:18 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: Options for FBSD support with LCD device - new project From: Ian Lepore To: "Jedi Tek'Unum" Cc: freebsd-arm@freebsd.org Date: Mon, 18 Mar 2019 13:57:18 -0600 In-Reply-To: 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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 934D573A2B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US] 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:57:24 -0000 On Mon, 2019-03-18 at 14:51 -0500, Jedi Tek'Unum wrote: > My impression wasn’t that support wasn’t there - but “out of the box” > configuration wasn’t there. In comparison, I didn’t 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’t 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 “common place” (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 < > http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO2> is a step-by- > step guide for how to acquire and configure Linux for it. > > On one of my imx6 boards I have 5 SPI devices. Each device can use 3 or 4 different sets of pins for clock, data-in, and data-out. Plus, each can use literally any number of whatever gpio pins they want as chip selects. Even limiting the chipsels to a handfull, there would literally be thousands of possible combinations of devices and pin configurations, each one needing to be a separate overlay. Maybe you have experience primarily with rpi or some similarly crippled devices that only offer one or two choices? BTW, bottom-posting replies is the norm on freebsd mailing lists. -- Ian > > On Mar 18, 2019, at 2:13 PM, Ian Lepore wrote: > > > > On Mon, 2019-03-18 at 13:59 -0500, Jedi Tek'Unum wrote: > > > I’ve been lurking here for some time. Long time (commercial) unix > > > expert. Not much FBSD. > > > > > > I’m running Linux right now on NanoPi NEO (Allwinner H3) and NEO > > > 2 > > > (Allwinner H5). Not because I love Linux (I don’t) but because it > > > works out of the box including I2C. I’d really like to use FBSD > > > on > > > them. I hope that they will reach the same maturity as BB soon. > > > > > > Perhaps I’m wrong but my impression following this list and > > > searching > > > around is that I2C and SPI are not “out of the box” with FBSD on > > > these platforms. > > > > > > I’m not all that familiar with FDT. I’d 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’m 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. > > > > > > In short I can’t use FBSD yet because it doesn’t 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’d love to help, but I don’t currently. > > > > > > Perhaps I’ve 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). > > > > > > Any advice on these matters greatly appreciated. > > > > > > > > > > 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. > > > > 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. > > > > 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. > > > > 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. > > > > -- Ian > >