All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1 17/18] board: add SDHCI support for PIC32MZDASK board.
@ 2015-12-17 17:34 Purna Chandra Mandal
  0 siblings, 0 replies; only message in thread
From: Purna Chandra Mandal @ 2015-12-17 17:34 UTC (permalink / raw)
  To: u-boot

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(+)

diff --git a/arch/mips/dts/pic32mzda.dtsi b/arch/mips/dts/pic32mzda.dtsi
index cf76825..3ae54c3 100644
--- a/arch/mips/dts/pic32mzda.dtsi
+++ b/arch/mips/dts/pic32mzda.dtsi
@@ -148,4 +148,15 @@
         phy-mode = "rmii";
         status = "disabled";
     };
+
+    sdhci: sdhci at 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";
+    };
 };
diff --git a/arch/mips/dts/pic32mzda_sk.dts b/arch/mips/dts/pic32mzda_sk.dts
index 38ef9c0..db1dde9 100644
--- a/arch/mips/dts/pic32mzda_sk.dts
+++ b/arch/mips/dts/pic32mzda_sk.dts
@@ -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
diff --git a/configs/pic32mzdask_defconfig b/configs/pic32mzdask_defconfig
index d74d169..3079387 100644
--- a/configs/pic32mzdask_defconfig
+++ b/configs/pic32mzdask_defconfig
@@ -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
diff --git a/include/configs/pic32mzdask.h b/include/configs/pic32mzdask.h
index 8e5c31b..94e73e3 100644
--- a/include/configs/pic32mzdask.h
+++ b/include/configs/pic32mzdask.h
@@ -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
  */
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-17 17:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-17 17:34 [U-Boot] [PATCH v1 17/18] board: add SDHCI support for PIC32MZDASK board Purna Chandra Mandal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.