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-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to