Last active
November 5, 2015 17:38
-
-
Save gnitnaw/385bc60244cf1091d8c8 to your computer and use it in GitHub Desktop.
Device tree overlay for mcp3008
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
| /dts-v1/; | |
| /plugin/; | |
| / { | |
| compatible = "brcm,bcm2835", "brcm,bcm2708"; | |
| /* disable spi-dev for spi0.0 */ | |
| fragment@0 { | |
| target = <&spi0>; | |
| __overlay__ { | |
| status = "okay"; | |
| spidev@0{ | |
| status = "disabled"; | |
| }; | |
| }; | |
| }; | |
| fragment@1 { | |
| target = <&spi0>; | |
| __overlay__ { | |
| /* needed to avoid dtc warning */ | |
| #address-cells = <1>; | |
| #size-cells = <0>; | |
| mcp3x0x@0 { | |
| compatible = "mcp3008"; | |
| reg = <0>; | |
| spi-max-frequency = <1000000>; | |
| }; | |
| }; | |
| }; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would you please explain why you set mcp3008 with the dtoverlay command in config.txt?
I am trying to adapt this dt to an mcp3004. I set compatible="mcp3004". Doesn't that set the actual device type?
Thanks,
Terry