Skip to contentSkip to conversation

board: add SDHCI support for PIC32MZDASK board

PATCH Superseded Purna Chandra Mandal 1 participant 1 message Jan 4, 2016 MIPS

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 9/13 board: add SDHCI support for PIC32MZDASK board

Added custom environment variables and rules to locate and load files (from uSD card) in order to boot Linux.

---

Changes in v2: None

 arch/mips/dts/pic32mzda.dtsi   | 13 +++++++++
 arch/mips/dts/pic32mzda_sk.dts |  7 +++++
 configs/pic32mzdask_defconfig  |  2 ++
 include/configs/pic32mzdask.h  | 61 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 83 insertions(+)
arch/mips/dts/pic32mzda.dtsi +13 -0
index f518ba8..bdddb93 100644
@@ -61,4 +61,17 @@
 		      <0x1f801500 0x200>; /* out */
 		status = "disabled";
 	};
+
+	sdhci: sdhci at 1f8ec000 {
+		compatible = "microchip,pic32mzda-sdhci";
+		reg = <0x1f8ec000 0x100>;
+		interrupts = <191 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&clock REF4CLK>, <&clock PB5CLK>;
+		clock-names = "base_clk", "sys_clk";
+		bus-width = <4>;
+		cap-sd-highspeed;
+		clock-freq-min-max = <25000000>,<25000000>;
+		clock-irq-pins = <1>,<1>;
+		status = "disabled";
+	};
 };
arch/mips/dts/pic32mzda_sk.dts +7 -0
index 99e7f64..f886a0f 100644
@@ -23,6 +23,9 @@
 };
 
 &clock {
+	microchip,refo2-frequency = <50000000>;
+	microchip,refo4-frequency = <25000000>;
+	microchip,refo5-frequency = <40000000>;
 	status = "okay";
 	u-boot,dm-pre-reloc;
 };
@@ -36,3 +39,7 @@
 	status = "okay";
 	u-boot,dm-pre-reloc;
 };
+
+&sdhci {
+	status = "okay";
+};
\ No newline at end of file
configs/pic32mzdask_defconfig +2 -0
index 13760e6..d11eddd 100644
@@ -19,3 +19,5 @@ CONFIG_CLK=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_FULL is not set
 CONFIG_PIC32_PINCTRL=y
+CONFIG_DM_MMC=y
+CONFIG_PIC32_SDHCI=y
\ No newline at end of file
include/configs/pic32mzdask.h +61 -0

71 lines not on this page · raw message

Signature · 1 line
1.8.3.1