From 191004d586d495d2bf122ac2d6653ae640609b5c Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Wed, 30 Mar 2016 17:32:14 +0000 Subject: [PATCH] Enable SPI1 on Beaglebone Black. SPI1 was chosen because SPI0 shares the gpio pins with I2C1. Sponsored by: Rubicon Communications (Netgate) --- sys/arm/conf/BEAGLEBONE | 4 ++++ sys/boot/fdt/dts/arm/beaglebone-black.dts | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/sys/arm/conf/BEAGLEBONE b/sys/arm/conf/BEAGLEBONE index 3950e17b300..0ba1f5de700 100644 --- a/sys/arm/conf/BEAGLEBONE +++ b/sys/arm/conf/BEAGLEBONE @@ -87,6 +87,10 @@ device gpio device gpioled device gpiobacklight +# SPI +device ti_spi +device spibus + # ADC support device ti_adc diff --git a/sys/boot/fdt/dts/arm/beaglebone-black.dts b/sys/boot/fdt/dts/arm/beaglebone-black.dts index c96c41f9dcd..66055053495 100644 --- a/sys/boot/fdt/dts/arm/beaglebone-black.dts +++ b/sys/boot/fdt/dts/arm/beaglebone-black.dts @@ -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>; };