Date: Fri, 22 Jun 2018 20:45:40 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335564 - in head/sys: dts/arm/overlays modules/dtb/rpi Message-ID: <201806222045.w5MKjePq084915@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Fri Jun 22 20:45:40 2018 New Revision: 335564 URL: https://svnweb.freebsd.org/changeset/base/335564 Log: 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 Added: head/sys/dts/arm/overlays/spigen-rpi-b.dtso (contents, props changed) head/sys/dts/arm/overlays/spigen-rpi2.dtso (contents, props changed) Modified: head/sys/modules/dtb/rpi/Makefile Added: head/sys/dts/arm/overlays/spigen-rpi-b.dtso ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dts/arm/overlays/spigen-rpi-b.dtso Fri Jun 22 20:45:40 2018 (r335564) @@ -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 */ +}; + Added: head/sys/dts/arm/overlays/spigen-rpi2.dtso ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dts/arm/overlays/spigen-rpi2.dtso Fri Jun 22 20:45:40 2018 (r335564) @@ -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>; +}; + Modified: head/sys/modules/dtb/rpi/Makefile ============================================================================== --- head/sys/modules/dtb/rpi/Makefile Fri Jun 22 20:27:40 2018 (r335563) +++ head/sys/modules/dtb/rpi/Makefile Fri Jun 22 20:45:40 2018 (r335564) @@ -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 \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806222045.w5MKjePq084915>