Add spigen(4) fdt data overlays for RPI-B, RPI-2.

By adding spigen-rpi{2,-b}.dtso to fdt_overlays= in loader.conf, the fdt data
will set up the correct pinmux and device nodes to create a spigen(4) device
for each available chipselect pin.

Submitted by:	Bob Frazier
Differential Revision:	https://reviews.freebsd.org/D15067
This commit is contained in:
ian 2018-06-22 20:45:40 +00:00
parent 10180229a6
commit e348e73fd1
3 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,29 @@
/* $FreeBSD$ */
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
};
&{/soc/spi@7e204000} {
status = "okay";
spigen0: spigen0 {
compatible = "freebsd,spigen";
reg = <0>;
status = "okay";
};
spigen1: spigen1 {
compatible = "freebsd,spigen";
reg = <1>;
status = "okay";
};
};
&{/soc/gpio@7e200000/spi0_cs_pins} {
brcm,pins = <8 7>;
brcm,function = <4>; /* ALT0 */
};

View File

@ -0,0 +1,37 @@
/* $FreeBSD$ */
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2836";
};
&{/soc/spi@7e204000} {
status = "okay";
spigen0: spigen0 {
compatible = "freebsd,spigen";
reg = <0>;
status = "okay";
};
spigen1: spigen1 {
compatible = "freebsd,spigen";
reg = <1>;
status = "okay";
};
spigen2: spigen2 {
compatible = "freebsd,spigen";
reg = <2>;
status = "okay";
};
};
&{/soc/gpio@7e200000/spi0_cs_pins} {
brcm,pins = <8 7 16>;
brcm,function = <4>; /* ALT0 */
};
&{/soc/gpio@7e200000/spi0_gpio7} {
brcm,pins = <7 8 16 9 10 11>;
};

View File

@ -2,6 +2,10 @@
# DTS files for the Raspberry Pi-B
DTS=rpi.dts rpi2.dts
DTSO= \
spigen-rpi-b.dtso \
spigen-rpi2.dtso \
LINKS= \
${DTBDIR}/rpi.dtb ${DTBDIR}/bcm2835-rpi-b.dtb \
${DTBDIR}/rpi.dtb ${DTBDIR}/bcm2835-rpi-b-rev2.dtb \