@@ -148,4 +148,15 @@
phy-mode = "rmii";
status = "disabled";
};
+
+ sdhci: sdhci@1f8ec000 {
+ compatible = "microchip,pic32mzda-sdhci";
+ reg = <0xbf8ec000 0x100>;
+ interrupts = <191 IRQ_TYPE_LEVEL_HIGH>;
+ bus-width = <4>;
+ cap-sd-highspeed;
+ clock-freq-min-max = <25000000>,<25000000>;
+ clock-irq-pins = <1>,<1>;
+ status = "disabled";
+ };
};
@@ -23,6 +23,9 @@
};
&clock {
+ microchip,refo2-frequency = <50000000>;
+ microchip,refo4-frequency = <25000000>;
+ microchip,refo5-frequency = <40000000>;
status = "okay";
u-boot,dm-pre-reloc;
};
@@ -41,3 +44,7 @@
reset-gpios = <&gpioJ 15 0>;
status = "okay";
};
+
+&sdhci {
+ status = "okay";
+};
\ No newline at end of file
@@ -29,3 +29,5 @@ CONFIG_DM_ETH=y
CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_PIC32_ETH=y
+CONFIG_DM_MMC=y
+CONFIG_PIC32_SDHCI=y
@@ -127,6 +127,33 @@
*/
#define CONFIG_OF_LIBFDT 1
+/*-----------------------------------------------------------------------
+ * SDHC Configuration
+ */
+#define CONFIG_SDHCI
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_CMD_MMC
+
+/*-----------------------------------------------------------------------
+ * File System Configuration
+ */
+/* FAT FS */
+#define CONFIG_DOS_PARTITION
+#define CONFIG_PARTITION_UUIDS
+#define CONFIG_SUPPORT_VFAT
+#define CONFIG_FS_FAT
+#define CONFIG_FAT_WRITE
+#define CONFIG_CMD_FS_GENERIC
+#define CONFIG_CMD_PART
+#define CONFIG_CMD_FAT
+
+/* EXT4 FS */
+#define CONFIG_FS_EXT4
+#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_EXT4_WRITE
+
/* -------------------------------------------------
* Environment
*/
Add SDHCI and file system (FAT, EXT2, EXT4) support to enable OS (Linux) boot from micro-SD card. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> --- arch/mips/dts/pic32mzda.dtsi | 11 +++++++++++ arch/mips/dts/pic32mzda_sk.dts | 7 +++++++ configs/pic32mzdask_defconfig | 2 ++ include/configs/pic32mzdask.h | 27 +++++++++++++++++++++++++++ 4 files changed, 47 insertions(+)