Skip to content

Instantly share code, notes, and snippets.

@multivac61
Created October 13, 2016 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save multivac61/3ab2cbd75667f59c58d38a4aef26b38d to your computer and use it in GitHub Desktop.
Save multivac61/3ab2cbd75667f59c58d38a4aef26b38d to your computer and use it in GitHub Desktop.
// Enable the spidev interface
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun7i-a20";
fragment@0 {
target-path = "/aliases";
__overlay__ {
/* Path to the SPI controller nodes */
spi0 = "/soc@01c00000/spi@01c68000";
spi1 = "/soc@01c00000/spi@01c69000";
};
};
fragment@1 {
target = <&spi0>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_a>, <&spi0_cs0_pins_a>;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
spidev@0 {
compatible = "spidev";
reg = <0x0>;
spi-max-frequency = <1000000>;
};
};
};
fragment@2 {
target = <&spi1>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins_a>,
<&spi1_cs0_pins_a>;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
spidev@1{
compatible = "spidev";
reg = <0>;
spi-max-frequency = <1000000>;
};
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment