Skip to content

Instantly share code, notes, and snippets.

@TheCrazyT
Created April 28, 2023 15:13
Show Gist options
  • Save TheCrazyT/6b67342fde1762c05d8b7938a7b0b282 to your computer and use it in GitHub Desktop.
Save TheCrazyT/6b67342fde1762c05d8b7938a7b0b282 to your computer and use it in GitHub Desktop.
/*
compiled it with:
dtc -@ -I dts -O dtb -o mmc_spi.dtbo mmc_spi.dts
load with:
sudo dtoverlay -d . mmc_spi
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
target = <&spidev0>;
__overlay__ {
status = "disabled";
};
};
fragment@1 {
target = <&spi0>;
__overlay__ {
// needed to avoid dtc warning
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
sd1: sd1@0 {
reg = <0>;
status = "okay";
compatible = "mmc-spi-slot";
voltage-ranges = <3000 3500>;
spi-max-frequency = <8000000>;
};
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment