From owner-freebsd-arm@freebsd.org Sat Nov 3 21:20:38 2018 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 37A4510E8715 for ; Sat, 3 Nov 2018 21:20:38 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [195.149.99.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "raven.bwct.de", Issuer "raven.bwct.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B7A3C6B08B; Sat, 3 Nov 2018 21:20:37 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.15.2/8.15.2) with ESMTPS id wA3LKY66087382 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 3 Nov 2018 22:20:35 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cicely.de; s=default; t=1541280036; bh=qsygN95FhoEY5x5BWLe5Sanp6OyhRR4cAmlPrYEGEmU=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To; b=PZoO6m3BXj75dbFik2c1gq4gcVo4SnlBwWI/b+YPIaJuQ1VMjN2vVnSmInoptt64Q Z++jkJm3KfkZnE/teesMd5VMVwROo0JLfu6RaeOC06Zuzh+xcWvTsXsxid9qHnBldA ZiZVBgQabc0yxmrZyr/YJ0QmJv5YLnPKLR8Lqusk= Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id wA3LKWRd005050 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 3 Nov 2018 22:20:32 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.15.2/8.15.2) with ESMTP id wA3LKVCZ038585; Sat, 3 Nov 2018 22:20:31 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.15.2/8.15.2/Submit) id wA3LKVwm038584; Sat, 3 Nov 2018 22:20:31 +0100 (CET) (envelope-from ticso) Date: Sat, 3 Nov 2018 22:20:31 +0100 From: Bernd Walter To: Ian Lepore Cc: ticso@cicely.de, freebsd-arm@freebsd.org, Bernd Walter Subject: Re: How to add custom dts entries Message-ID: <20181103212031.GF79858@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <20181103200709.GB79858@cicely7.cicely.de> <1541277990.52306.4.camel@freebsd.org> <20181103205455.GD79858@cicely7.cicely.de> <1541279079.52306.8.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1541279079.52306.8.camel@freebsd.org> X-Operating-System: FreeBSD cicely7.cicely.de 11.0-STABLE amd64 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=4.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de 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: Sat, 03 Nov 2018 21:20:38 -0000 On Sat, Nov 03, 2018 at 03:04:39PM -0600, Ian Lepore wrote: > On Sat, 2018-11-03 at 21:54 +0100, Bernd Walter wrote: > > On Sat, Nov 03, 2018 at 02:46:30PM -0600, Ian Lepore wrote: > > > > > > We do have overlay support now. I don't know much about using it, > > > hopefully those who do will reply with details. > > That's good to know. > > Hope for an answer too ;-) > > > > > > > > There have also been updates to the SPI world. Your apa102led0 fdt > > > node > > > now requires a "spi-max-frequency" property, the value is the bus > > > speed > > > to use when communicating with that device, in Hz (different > > > devices on > > > the same bus can now have different speeds, and there is no concept > > > of > > > a default speed). Also, the chipsel number should be in a reg= > > > property, but we still support spi-chipselect= too for backwards > > > compatibility.  > > Ah, important information. > > I had been using dev.spi.0.clock to increase speed. > > Obviously dev.spi doesn't even exists anymore. > > Have to check about the CS, technically it is a dummy value anyway, > > since the APA102 LEDs don't have a chip select and are the only > > device connected to the SPI. > > > > The sysctl nodes should still exist, but now they're all read-only > values that just tell you about the current transfer (or the last one > to complete), since all those values can change on each transfer now > depending on how individual devices are configured. At least not for me. > Also, there is now a spi(8) program that lets you do spi transfers and > to some degree manipulate the transfer properties (bus polarity/phase, > speed, etc) from the command line. Saw that - very nice. I should use spigen, as my kernel driver is nothing more than a wrapper to a devicenode. However loading the spigen module won't create any /dev/spigen* nodes. spi drivers are all loaded: [60]rpi-b# kldstat -v | grep spi 43 spi/spibus 123 simplebus/bcm2835_spi 42 spi/ofw_spibus 4 1 0xd2f00000 a000 spigen.ko (/boot/kernel/spigen.ko) 129 spibus/spigen But there is no mention of any spi in dmesg and devinfo. [68]rpi-b# devinfo nexus0 ofwbus0 simplebus0 systimer0 bcm_dma0 intc0 bcmwd0 bcmrng0 mbox0 gpio0 gpiobus0 gpioc0 uart0 bcm283x_dwcotg0 usbus0 uhub0 uhub1 smsc0 miibus0 ukphy0 sdhci_bcm0 mmc0 mmcsd0 fb0 fbd0 vchiq0 pcm0 gpioled0 cryptosoft0 And I still need to setup the onewire bus. This is for a LED matrix and I really need the temperature sensors to protect the LEDs from damage. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.