From owner-freebsd-arm@freebsd.org Sat Nov 3 21:41:59 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 5E68910E91F8 for ; Sat, 3 Nov 2018 21:41:59 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 D6BB06BB35 for ; Sat, 3 Nov 2018 21:41:58 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1541280347; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=tP2FKbOzfaD7X8Q7gLCAixkFKhYa9E9Y+6A6FQeCxOwUH8mXB7ktDq1JjKqIZZJdGvQK/278y0d1F ejHXHaH7eC6ECQsRBiYFfxdRw14R1PSCJI02UfaBwL8yLH03U746s5VI80XXnNrJ99ACtUdQVsAHIL 0VWD6Chj3ikpbb8v98gbNy/TYKYtwt4D1Ue+LeSQjsRkNALpXoe14Ra9vIq0ITwHYQe9Eq8Ovb+qjc Wf2GG1sRRH0C1Dxj/f0MdLMZE1GdOAgjJ2bXXTRh1durwP93AiABOw//73SsjxGRS0sgQKwyGuY+11 sZb7BnbQ34Kq/qnQSkbPqg+3YNSPxcw== 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=AWOEOMko73breKowaTRboMLcWP2x48GEX2IhlKfFoOY=; b=INP5r1ZO8lxNCHM7a2R6Yl1MhNiAo6xZFzVALbEug+9tVBGyO3uULyuo44Ogt/Nt5tKy59MtPNEXr ecC+wwdXvBimnrEqYrjEgnLl1go0mFDRf6u2AXNH5Q5kuwmq/Xt6wlsi18yKrcY2jm6JSoRr0/6tFJ 8vPqJKA/qHPp+olFge+Pdyawti7IM3l8YF0OdMpeby77tQbxfmkjoRcSHxurFpDchdnmSukZ76rcJs RxMDINGkktk9XodXm58AApm+Y8izhaDlI6sJ0sI2KSrf3aFW5VmzNHXJgmNCVXpHjCtXPK96SoNIHL kWoa15Jkmmb7FFcQ0KPgK3q92XLzCuQ== ARC-Authentication-Results: i=1; outbound1.eu.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=AWOEOMko73breKowaTRboMLcWP2x48GEX2IhlKfFoOY=; b=ui1LCqzYjwMHcIazOUuxt0beFQ5hZq8ae1gBAyi+dHNxjkVoEoMwlLAa3pmoqrW3ph7xZ6o7H4t2/ JvEsED3ktfHDKMqor+A0jujd3KF6khby2jw1f4nTquB5VHrQBcAbC2u7qlLyHwX/Aw4tUZ/FOLShGg ew1na33HGRRKsXnuKSfiSiGD1Lh6A87Oh1vIc+mgEi8JI6zglijnJaNyTqNCphFw1wonk9iSac2sx8 Y3MZpvbMO0TBjs0fusnuAQQpDDndD25O/97aqJFTjd+f8sxwSK8ZmZFhIU3EbMh6b+3YAbroXw11Rp 686O48aCqVPMS0chBxIPiQ7oOl4BmRQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 027a5644-dfaf-11e8-9048-075f73944867 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 outbound1.eu.mailhop.org (Halon) with ESMTPSA id 027a5644-dfaf-11e8-9048-075f73944867; Sat, 03 Nov 2018 21:25:42 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id wA3LPc3T074830; Sat, 3 Nov 2018 15:25:38 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1541280338.52306.9.camel@freebsd.org> Subject: Re: How to add custom dts entries From: Ian Lepore To: ticso@cicely.de Cc: freebsd-arm@freebsd.org, Bernd Walter Date: Sat, 03 Nov 2018 15:25:38 -0600 In-Reply-To: <20181103212031.GF79858@cicely7.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> <20181103212031.GF79858@cicely7.cicely.de> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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:41:59 -0000 On Sat, 2018-11-03 at 22:20 +0100, Bernd Walter wrote: > 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. > Add a status = "okay" to the spi node in your patch/overlay. -- Ian