PocketBeagle Disabling Default MMC Driver using a Device Tree Overlay Issue

Hi,

I have been working on the Google Summer of Code '19 Project: Click BoardSupport through Greybus, which aims to bring in support for MikroElektronika Click Boards through Greybus Simulator on the Pocketbeagle and Beaglebone Black. I was able to add support for some of the Mikroe Click Boards through the Greybus Simulator and more details about the project can be found here: https://vaishnav98.github.io/GSoC19/ . I have been trying to add support for the microSD(SPI Based) Click Board through Greybus Simulator which is failing giving out the following error:

`
[ 3621.614675] mmc1: unrecognised CSD structure version 2

`

complete error log at : https://github.com/vaishnav98/gbsim/issues/6

I went through the source code of the mmc (and mmc_spi) driver and found that the corresponding error was thrown probably from here: https://github.com/beagleboard/linux/blob/36fe81261dbfc1f751f7c1844e6ec5a36b594953/drivers/mmc/core/mmc.c#L149

I am planning to debug the issue by printing out the card CSD data and to verify if the data send is valid, for doing this I need to disable the default mmc driver being loaded on that particular mmc controller so that a new driver(with same functionality,additional printk calls) with a different name can be loaded, for this i tried disabling the driver using a Device Tree Overlay as mentioned in a previous thread for a different driver(https://groups.google.com/forum/#!topic/beagleboard/bZFcV4y9QWQ). However when I loaded the overlay (through /boot/uEnv.txt)and rebooted, the pocketbeagle stopped booting. The overlay dts file I used are:

`

/dts-v1/;
/plugin/;

/ {

 compatible = "ti,am335x-pocketbeagle", "ti,am335x-bone", "ti,am33xx";

 fragment@0 {
   target = <&mmc>;

   __overlay__ {
     status = "disabled";

   };
 };
};

`

and(separately)

`

/dts-v1/;
/plugin/;

/ {

 compatible = "ti,am335x-pocketbeagle", "ti,am335x-bone", "ti,am33xx";

 fragment@0 {
   target = <&mmc1>;

   __overlay__ {
     status = "disabled";

   };
 };
};

`

`
dtc -W no-unit_address_vs_reg -@ -I dts -O dtb -o disablemmc.dtbo disablemmc.dts

`

Can someone point out the mistake in the above DT overlay/ help me with how to disable the default mmc driver loading up when a new microSD card is instantiated through the Greybus Subsystem. It would also be really helpful if someone could point out the meaning of the “unsupported CSD structure version 2” from the mmc driver, I did some google search on the error and could not find much useful information. (I have confirmed that the card and the click board is working by loading the corresponding device tree overlay for the Click board).

Thanking You

Vaishnav M A

Hi,

Can someone please point out the mistake in this example or provide some resources on how to disable a built-in driver on the Pocketbeagle using a suitable device tree overlay?

Thanks and regards

Vaishnav