Last active
January 8, 2023 16:59
-
-
Save pdp7/aee5664598059c9b9a9020f107957f80 to your computer and use it in GitHub Desktop.
src/arm/BB-SPIDEV1-00A0.dts modify to add tinydrm st7735r for Adafruit 1.8" TFT LCD connected to BeagleBone Black running 4.16.0-rc2-bone3 kernel. More info: https://groups.google.com/d/msg/beagleboard/GuMQIP_XCW0/b3lxbx_8AwAJ
This file contains 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
/* | |
* Copyright (C) 2013 CircuitCo | |
* | |
* Virtual cape for SPI1 on connector pins P9.29 P9.31 P9.30 P9.28 | |
* | |
* 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. | |
*/ | |
#include <dt-bindings/pinctrl/am33xx.h> | |
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green"; | |
/* identification */ | |
part-number = "BB-SPIDEV1"; | |
version = "00A0"; | |
/* state the resources this cape uses */ | |
exclusive-use = | |
/* the pin header uses */ | |
"P9.31", /* spi1_sclk */ | |
"P9.29", /* spi1_d0 */ | |
"P9.30", /* spi1_d1 */ | |
"P9.28", /* spi1_cs0 */ | |
// "P9.42", /* spi1_cs1 */ | |
/* 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 0x33 /* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 */ | |
0x194 0x33 /* mcasp0_fsx.spi1_d0, INPUT_PULLUP | MODE3 */ | |
0x198 0x13 /* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */ | |
0x19c 0x13 /* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */ | |
// 0x164 0x12 /* eCAP0_in_PWM0_out.spi1_cs1 OUTPUT_PULLUP | MODE2 */ | |
>; | |
}; | |
}; | |
}; | |
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>; | |
};*/ | |
display@0{ | |
status = "okay"; | |
compatible = "jianda,jd-t18003-t01", "sitronix,st7735r"; | |
reg = <0>; | |
spi-max-frequency = <16000000>; | |
/* https://elinux.org/Beagleboard:Cape_Expansion_Headers */ | |
dc-gpios = <&gpio1 16 0>; /* dc:48 P9.15 GPIO1_16 */ | |
reset-gpios = <&gpio1 28 0>; /* reset:60 P9.12 GPIO1_28 */ | |
/* rotation = <270>; */ | |
}; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PWM backlight example in
BB-BONE-4D4C-01-00A1.dts
: