How to add custom dts entries
Bernd Walter
ticso at cicely7.cicely.de
Sat Nov 3 21:20:38 UTC 2018
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 <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
More information about the freebsd-arm
mailing list