Just a little update on this subject. I am unable to make mmc-tools work, but I managed to make sdtool work:) The "trick" was to add this:
} else if ((opcode == MMC_PROGRAM_CSD && (mmc_cmd_type(cmd) == MMC_CMD_ADTC))){
rawcmd |= ((1 << 11) | (1 << 13));
}
on line 1013 of the file build_dir\target-mipsel_24kc_musl\linux-ramips_mt76x8\linux-4.14.81\drivers\mmc\host\mtk-mmc\sd.c
That makes PROGRAM_CSD command work.
As the goal was to be able to make sd card readonly, I won't bother with mmc-utils.
Hope this helps someone
Gabrijel