From owner-freebsd-arm@freebsd.org Mon Mar 18 19:13:58 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 C0246154AEC9 for ; Mon, 18 Mar 2019 19:13:57 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (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 ECCDE71BEC for ; Mon, 18 Mar 2019 19:13:56 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1552936435; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=XXFfd9eDMaPgMMqvTpXNWHBB2Yqsn/ldklBnzd+o3/vpUAAR0PrfQDgstjDjks8wVRI1E1VcBQawH m39wSxwUARFi/mRMDNxuDELALGUi1siOoraTicl3BWwUISBQ1rWkiPRbdnwvto2tf/pF52lwsz45tJ 1JU/C00EM5UBWMNzQTlA/B5VL6AGCwAyIqqytmNp8ikjdAg1oQezW1JZtBr8E+ceqTaHAammAIickx 7VHmhju9zSrYmc/x0Qg74zL3NSM2J9mz9ajcrMeaaWAdaDkVEBRCCRF5SxeGmwxDfB6DYBUdbDkEh5 zPgg7IaXAZyUohfNgAs9S8x/D7btcwA== 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:to:from:subject:message-id:dkim-signature:from; bh=KDjECLaTlDr5sQnbJ0eqB6sbsblkYNHE8PivkB5poyA=; b=gxoUB02sX0vUOLllWogQZ/TjqrDNKaleABSphjr927uowuGzbb12d3tcdOYKfoDYxGvh+siiIOkWx qDvJqj1eUMyjpwhqPz5/TWO304hPZYoh34fasjPK1/erbymmBn1C437dF6RB9JAF7AKYoTj1Bh2Ncl exjCyX9b2vtKtMr65iLag5DExGO4qEForCOx6QE/sVaW4XHxAd4icwcDN34xqWHm0OU/NAM79f5a5A 9jQ9mtih9n5jUsz/YAebLEFd8yRTD4b7r+BXDDptNXo2IzwHfltdIjD2Mh0A1xLNyRqu2luhu0i0ye CAEPyqRX+/VXVooicuTIfMQQlqxI02g== ARC-Authentication-Results: i=1; outbound4.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:to:from:subject:message-id:from; bh=KDjECLaTlDr5sQnbJ0eqB6sbsblkYNHE8PivkB5poyA=; b=CY4WG70AVkf7Pd8weRC7ZWOPz+wMR1EWYzRMC3K0DaLQTeIdFm2BLBY4Z+Ls9Fgz+k2IBoUWD0SsK 6yZS0Q4K8/Np0FdTTbotEWleDWAKWUdtHFDIhcDTYfBL8m594HKa8eWj+El4cyPSVSGmUak15oZgPZ knZAPbI8IRO1XJKmLqLi8dfGJf/mYxzjKlBygD2Ga50u6DqBkshLBB1Vr6yM5+AUBwmx385J1ClFF9 ABcFbAUhORnmDRJfiCTAzLl8kM8yEtua1d38W8ydZelsJuL1pmSyNkoNJz8/oyAjTPUiDtOVE1j74k zDswQ0rV5QbtmsSsMCApKdhi9b4+hDQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: f82a7bdb-49b1-11e9-befd-af03bedce89f 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 outbound4.ore.mailhop.org (Halon) with ESMTPSA id f82a7bdb-49b1-11e9-befd-af03bedce89f; Mon, 18 Mar 2019 19:13:54 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x2IJDrph062961; Mon, 18 Mar 2019 13:13:53 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <004ddba628b94b80845d8e509ddcb648d21fd6c9.camel@freebsd.org> Subject: Re: Options for FBSD support with LCD device - new project From: Ian Lepore To: "Jedi Tek'Unum" , freebsd-arm@freebsd.org Date: Mon, 18 Mar 2019 13:13:53 -0600 In-Reply-To: <4EB5C6C1-7DB9-4DEE-BB23-CD1259581271@jeditekunum.com> References: <8df902f6-20a3-31c4-71ac-91f5d5fdf50d@optiplex-networks.com> <0ecf23e129ca7ac6a92a01bbb34c03f1ac8c6dc8.camel@freebsd.org> <89f5b8d1ab0614ac8d88b5d5f1afc63e640c3c17.camel@freebsd.org> <4EB5C6C1-7DB9-4DEE-BB23-CD1259581271@jeditekunum.com> 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: ECCDE71BEC 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_SHORT(-0.99)[-0.994,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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:13:58 -0000 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