Date: Wed, 30 Mar 2016 20:53:05 +0200 From: Emmanuel Vadot <manu@bidouilliste.com> To: Luiz Otavio O Souza <loos@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r297426 - in head/sys: arm/conf boot/fdt/dts/arm Message-ID: <20160330205305.ebea13d8492d5727910a22fc@bidouilliste.com> In-Reply-To: <201603301732.u2UHWFqO035397@repo.freebsd.org> References: <201603301732.u2UHWFqO035397@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Luiz, Why setting the pins to SPI mode here ? This should be done in your own board dts file if you need it (unless there is some spi chip on the BBB that I don't know of). This reduce the number of GPIOs available on the headers. Thanks, On Wed, 30 Mar 2016 17:32:15 +0000 (UTC) Luiz Otavio O Souza <loos@FreeBSD.org> wrote: > Author: loos > Date: Wed Mar 30 17:32:14 2016 > New Revision: 297426 > URL: https://svnweb.freebsd.org/changeset/base/297426 > > Log: > Enable SPI1 on Beaglebone Black. > > SPI1 was chosen because SPI0 shares the gpio pins with I2C1. > > Sponsored by: Rubicon Communications (Netgate) > > Modified: > head/sys/arm/conf/BEAGLEBONE > head/sys/boot/fdt/dts/arm/beaglebone-black.dts > > Modified: head/sys/arm/conf/BEAGLEBONE > ============================================================================== > --- head/sys/arm/conf/BEAGLEBONE Wed Mar 30 17:18:49 2016 (r297425) > +++ head/sys/arm/conf/BEAGLEBONE Wed Mar 30 17:32:14 2016 (r297426) > @@ -87,6 +87,10 @@ device gpio > device gpioled > device gpiobacklight > > +# SPI > +device ti_spi > +device spibus > + > # ADC support > device ti_adc > > > Modified: head/sys/boot/fdt/dts/arm/beaglebone-black.dts > ============================================================================== > --- head/sys/boot/fdt/dts/arm/beaglebone-black.dts Wed Mar 30 17:18:49 2016 (r297425) > +++ head/sys/boot/fdt/dts/arm/beaglebone-black.dts Wed Mar 30 17:32:14 2016 (r297426) > @@ -37,6 +37,16 @@ > AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_cs0.i2c1_scl */ > >; > }; > + > + spi1_pins: pinmux_spi1_pins { > + pinctrl-single,pins = < > + AM33XX_IOPAD(0x964, PIN_INPUT_PULLUP | MUX_MODE2) /* eCAP0_in_PWM0_out.spi1_cs1 */ > + AM33XX_IOPAD(0x990, PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcasp0_aclkx.spi1_sclk */ > + AM33XX_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcasp0_fsx.spi1_d0 - miso */ > + AM33XX_IOPAD(0x998, PIN_INPUT_PULLUP | MUX_MODE3) /* mcasp0_axr0.spi1_d1 - mosi */ > + AM33XX_IOPAD(0x99c, PIN_INPUT_PULLUP | MUX_MODE3) /* mcasp0_ahclkr.spi1_cs0 */ > + >; > + }; > }; > > &i2c0 { > @@ -65,6 +75,13 @@ > status = "okay"; > }; > > +&spi1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&spi1_pins>; > + > + status = "okay"; > +}; > + > &lcdc { > hdmi = <&tda998x>; > }; > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" -- Emmanuel Vadot <manu@bidouilliste.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160330205305.ebea13d8492d5727910a22fc>