2

I've successfully followed some instructions for access 2 SD cards via SPI on a Raspberry Pi 3: https://ralimtek.com/Raspberry_Pi_Secondary_SD_Card/

How do I configure it to access more than 2 SD cards?

DTS file from that article:

/dts-v1/;
/plugin/;

/ {
   compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";

   fragment@0 {
      target = <&spi0>;
      frag0: __overlay__ {
         status = "okay";
         sd1 {
                reg = <0>;
                status = "okay";
                compatible = "spi,mmc_spi";
                voltage-ranges = <3000 3500>;
                spi-max-frequency = <8000000>;
         };
         sd2 {
                reg = <1>;
                status = "okay";
                compatible = "spi,mmc_spi";
                voltage-ranges = <3000 3500>;
                spi-max-frequency = <8000000>;
         };

      };
   };


};
  • By configuring the chip selects, I can access the mounted SD partitions simultaneously. For instance, I could cp files from one drive to another and the OS would handle all of the channel select switching. – Adam Tegen Feb 6 '18 at 3:46
  • I don't know if this is possible to configure SD3 and SD4 via device trees alone. Even modifying a driver would be helpful. – Adam Tegen Feb 6 '18 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.