Created
March 17, 2016 20:57
-
-
Save jadonk/646339a3d6f3b60f10cb to your computer and use it in GitHub Desktop.
BrainPad FBTFT display
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License version 2 as | |
| * published by the Free Software Foundation. | |
| */ | |
| /dts-v1/; | |
| /plugin/; | |
| / { | |
| compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green"; | |
| /* identification */ | |
| part-number = "BB-SPI1"; | |
| version = "00A0"; | |
| /* state the resources this cape uses */ | |
| exclusive-use = | |
| /* the pin header uses */ | |
| /* the pin header uses */ | |
| "P9.31", /* spi1_sclk */ | |
| "P9.29", /* spi1_d0 */ | |
| "P9.30", /* spi1_d1 */ | |
| /* "P9.20", /* spi1_cs0 */ | |
| /* the hardware ip uses */ | |
| "spi1"; | |
| fragment@0 { | |
| target = <&am33xx_pinmux>; | |
| __overlay__ { | |
| /* default state has all gpios released and mode set to uart1 */ | |
| bb_spi1_pins: pinmux_bb_spi1_pins { | |
| pinctrl-single,pins = < | |
| 0x190 0x13 /* ( PIN_OUTPUT | MUX_MODE3 ) /* (A13) mcasp0_aclkx.spi1_sclk */ | |
| 0x194 0x33 /* mcasp0_fsx.spi1_d0, INPUT_PULLUP | MODE3 */ | |
| 0x198 0x13 /* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */ | |
| 0x16c 0x15 /* ( PIN_OUTPUT | MUX_MODE5 ) /* (E17) uart0_rtsn.spi1_cs0 */ | |
| >; | |
| }; | |
| }; | |
| }; | |
| fragment@1 { | |
| target = <&spi1>; | |
| __overlay__ { | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| status = "okay"; | |
| pinctrl-names = "default"; | |
| pinctrl-0 = <&bb_spi1_pins>; | |
| ti,pio-mode; /* disable dma when used as an overlay, dma gets stuck at 160 bits... */ | |
| channel@0 { | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| compatible = "spidev"; | |
| reg = <0>; | |
| spi-max-frequency = <16000000>; | |
| spi-cpha; | |
| }; | |
| channel@1 { | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| compatible = "spidev"; | |
| reg = <1>; | |
| spi-max-frequency = <16000000>; | |
| }; | |
| }; | |
| }; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| echo BB-SPIDEV1B > /sys/devices/platform/bone_capemgr/slots | |
| modprobe fbtft_device busnum=1 name=adafruit18 debug=7 verbose=3 gpios=dc:59,led:57,reset:58 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment