Created
December 19, 2018 13:14
-
-
Save claydonkey/4f7e128404fdb1d40b833e0faa271179 to your computer and use it in GitHub Desktop.
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
/* | |
* ssd1306-overlay.dts | |
* | |
* ------------------------------------------------- | |
* | |
* ------------------------------------------------- | |
* Device---Driver-----BUS GPIO's | |
* display ssd1306 spi0.0 25 24 | |
* Based on tinylcd35-overlay.dts | |
* 5/3/2015 -- Noralf Trønnes Initial Device tree framework | |
* 10/3/2015 -- tinylcd@gmail.com added ds1307 support. | |
* 7/12/2017 -- anthony@claydonkey.com ssd1306 | |
*/ | |
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; | |
fragment@0 { | |
target = <&spi0>; | |
__overlay__ { | |
status = "okay"; | |
spidev@0{ | |
status = "disabled"; | |
}; | |
spidev@1{ | |
status = "disabled"; | |
}; | |
}; | |
}; | |
fragment@1 { | |
target = <&gpio>; | |
__overlay__ { | |
ssd1306_pins: ssd1306_pins { | |
brcm,pins = <25 24>; | |
brcm,function = <1 1>; /* out */ | |
}; | |
}; | |
};ssd1306 | |
fragment@2 { | |
target = <&spi0>; | |
__overlay__ { | |
/* needed to avoid dtc warning */ | |
#address-cells = <1>; | |
#size-cells = <0>; | |
ssd1306: ssd1306@0{ | |
compatible = "solomon,ssd1306"; | |
reg = <0>; | |
pinctrl-names = "default"; | |
pinctrl-0 = <&ssd1306_pins>; | |
spi-max-frequency = <8000000>; | |
buswidth = <8>; | |
fps = <20>; | |
reset-gpios = <&gpio 25 0>; | |
dc-gpios = <&gpio 24 0>; | |
debug = <1>; | |
}; | |
}; | |
}; | |
__overrides__ { | |
speed = <&ssd1306>,"spi-max-frequency:0"; | |
rotate = <&ssd1306>,"rotate:0"; | |
fps = <&ssd1306>,"fps:0"; | |
debug = <&ssd1306>,"debug:0"; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment