diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2021-01-27 15:20:47 +0100 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2021-01-27 15:20:47 +0100 |
commit | e105f15292f5de776bcebac9972eaca296c236bd (patch) | |
tree | be3a7643b3c6977f5a12bec0aea5f1b17d70844f /machines/rpi3-amadeus/spi.dts | |
parent | b7c4edc5c3d154d8b488cc65e1c6eee171c0f74a (diff) | |
download | dots-e105f15292f5de776bcebac9972eaca296c236bd.tar.gz dots-e105f15292f5de776bcebac9972eaca296c236bd.zip |
Add rpi config
Diffstat (limited to 'machines/rpi3-amadeus/spi.dts')
-rw-r--r-- | machines/rpi3-amadeus/spi.dts | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/machines/rpi3-amadeus/spi.dts b/machines/rpi3-amadeus/spi.dts new file mode 100644 index 0000000..db76c4b --- /dev/null +++ b/machines/rpi3-amadeus/spi.dts @@ -0,0 +1,49 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "raspberrypi"; + fragment@0 { + target = <&spi>; + __overlay__ { + cs-gpios = <&gpio 8 1>, <&gpio 7 1>; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins &spi0_cs_pins>; + #address-cells = <1>; + #size-cells = <0>; + spidev@0 { + reg = <0>; // CE0 + spi-max-frequency = <500000>; + compatible = "spidev"; + }; + + spidev@1 { + reg = <1>; // CE1 + spi-max-frequency = <500000>; + compatible = "spidev"; + }; + }; + }; + fragment@1 { + target = <&alt0>; + __overlay__ { + // Drop GPIO 7, SPI 8-11 + brcm,pins = <4 5>; + }; + }; + + fragment@2 { + target = <&gpio>; + __overlay__ { + spi0_pins: spi0_pins { + brcm,pins = <9 10 11>; + brcm,function = <4>; // alt0 + }; + spi0_cs_pins: spi0_cs_pins { + brcm,pins = <8 7>; + brcm,function = <1>; // out + }; + }; + }; +}; |