Skip to content

Commit 957e634

Browse files
tuna-f1shkartben
authored andcommitted
boards: atmel: samx7x add hsmci peripheral
Adds samx7x hsmci peripheral according to datasheet sections 10-1 and 14.1: https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/DataSheets/SAM-E70-S70-V70-V71-Family-Data-Sheet-DS60001527.pdf Updates sam_e70_xplained overlay to include pin mapping to the SD card connected to the hsmci and adds sdhc0 alias. Signed-off-by: John Whittington <git@jbrengineering.co.uk>
1 parent 21b20de commit 957e634

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed

boards/atmel/sam/sam_e70_xplained/sam_e70_xplained-common.dtsi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
led0 = &green_led;
1818
sw0 = &sw0_user_button;
1919
watchdog0 = &wdt;
20+
sdhc0 = &hsmci;
2021
};
2122

2223
chosen {
@@ -238,3 +239,17 @@ zephyr_udc0: &usbhs {
238239
pinctrl-names = "default";
239240
};
240241
};
242+
243+
&hsmci {
244+
status = "okay";
245+
246+
pinctrl-names = "default";
247+
pinctrl-0 = <&hsmci_default>;
248+
cd-gpios = <&pioc 16 GPIO_ACTIVE_LOW>;
249+
250+
mmc {
251+
compatible = "zephyr,sdmmc-disk";
252+
disk-name = "SD";
253+
status = "okay";
254+
};
255+
};

boards/atmel/sam/sam_e70_xplained/sam_e70_xplained-pinctrl.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,15 @@
182182
<PD17B_USART2_SCK>;
183183
};
184184
};
185+
186+
hsmci_default: hsmci_default {
187+
group1 {
188+
pinmux = <PA28C_HSMCI_MCCDA>,
189+
<PA25D_HSMCI_MCCK>,
190+
<PA30C_HSMCI_MCDA0>,
191+
<PA31C_HSMCI_MCDA1>,
192+
<PA26C_HSMCI_MCDA2>,
193+
<PA27C_HSMCI_MCDA3>;
194+
};
195+
};
185196
};

boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ supported:
1818
- i2s
1919
- pwm
2020
- netif:eth
21+
- sdhc
2122
- spi
2223
- usb_device
2324
- watchdog

boards/atmel/sam/sam_e70_xplained/sam_e70_xplained_same70q21b.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ supported:
1818
- i2s
1919
- pwm
2020
- netif:eth
21+
- sdhc
2122
- spi
2223
- usb_device
2324
- watchdog

dts/arm/atmel/samx7x.dtsi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@
4646
};
4747

4848
soc {
49+
hsmci: hsmci@40000000 {
50+
compatible = "atmel,sam-hsmci";
51+
reg = <0x40000000 0x4000>;
52+
clocks = <&pmc PMC_TYPE_PERIPHERAL 18>;
53+
status = "disabled";
54+
};
55+
4956
ssc: ssc@40004000 {
5057
compatible = "atmel,sam-ssc";
5158
reg = <0x40004000 0x4000>;

0 commit comments

Comments
 (0)