boards: renesas: Add board support for SDHC driver

Add board support for SDHC driver on EK-RA8M1, EK-RA8D1 and MCK-RA8T1

Signed-off-by: Tran Van Quy <quy.tran.pz@renesas.com>
This commit is contained in:
Tran Van Quy 2024-11-18 09:40:47 +07:00 committed by Benjamin Cabé
parent ddf56f5e5e
commit 149d23d4f0
7 changed files with 93 additions and 2 deletions

View file

@ -121,8 +121,12 @@ The below features are currently supported on Zephyr OS for EK-RA8D1 board:
+--------------+------------+-----------------------------------+
| ADC | on-chip | adc |
+--------------+------------+-----------------------------------+
| SDHC | on-chip | sdhc |
+--------------+------------+-----------------------------------+
**Note:** for using Ethernet on RA8D1 board please set switch SW1 as following configuration:
**Note:**
- For using Ethernet on RA8D1 board please set switch SW1 as following configuration:
+-------------+-------------+--------------+------------+------------+------------+-------------+-----------+
| SW1-1 PMOD1 | SW1-2 TRACE | SW1-3 CAMERA | SW1-4 ETHA | SW1-5 ETHB | SW1-6 GLCD | SW1-7 SDRAM | SW1-8 I3C |
@ -130,6 +134,14 @@ The below features are currently supported on Zephyr OS for EK-RA8D1 board:
| OFF | OFF | OFF | OFF | ON | OFF | OFF | OFF |
+-------------+-------------+--------------+------------+------------+------------+-------------+-----------+
- For using SDHC channel 1 on RA8D1 board please set switch SW1 as following configuration:
+-------------+-------------+--------------+------------+------------+------------+-------------+-----------+
| SW1-1 PMOD1 | SW1-2 TRACE | SW1-3 CAMERA | SW1-4 ETHA | SW1-5 ETHB | SW1-6 GLCD | SW1-7 SDRAM | SW1-8 I3C |
+-------------+-------------+--------------+------------+------------+------------+-------------+-----------+
| OFF | OFF | OFF | OFF | OFF | OFF | OFF | OFF |
+-------------+-------------+--------------+------------+------------+------------+-------------+-----------+
**CAUTION:** Do not enable SW1-4 and SW1-5 together
Other hardware features are currently not supported by the port.

View file

@ -243,4 +243,22 @@
<RA_PSEL(RA_PSEL_GLCDC, 5, 14)>;
};
};
/* NOTE: pins conflict with ether_default */
sdhc1_default: sdhc1_default {
group1 {
psels = <RA_PSEL(RA_PSEL_SDHI, 4, 6)>, /* SDCD */
<RA_PSEL(RA_PSEL_SDHI, 4, 1)>, /* SDCMD */
<RA_PSEL(RA_PSEL_SDHI, 4, 2)>, /* SDDATA0 */
<RA_PSEL(RA_PSEL_SDHI, 4, 3)>, /* SDDATA1 */
<RA_PSEL(RA_PSEL_SDHI, 4, 4)>, /* SDDATA2 */
<RA_PSEL(RA_PSEL_SDHI, 4, 5)>, /* SDDATA3 */
<RA_PSEL(RA_PSEL_SDHI, 7, 0)>; /* SDWP */
drive-strength = "high";
};
group2 {
psels = <RA_PSEL(RA_PSEL_SDHI, 4, 0)>; /* SDCLK */
drive-strength = "highspeed-high";
};
};
};

View file

@ -118,8 +118,13 @@ The below features are currently supported on Zephyr OS for EK-RA8M1 board:
+-----------+------------+----------------------+
| ADC | on-chip | adc |
+-----------+------------+----------------------+
| SDHC | on-chip | sdhc |
+-----------+------------+----------------------+
**Note:** For using Ethernet module on EK-RA8M1, remove jumper J61 to enable Ethernet B
**Note:**
- For using Ethernet module on EK-RA8M1, remove jumper J61 to enable Ethernet B
- For using SDHC driver on EK-RA8M1, remove jumper J61 to use with channel 0
Other hardware features are currently not supported by the port.

View file

@ -121,4 +121,21 @@
drive-strength = "high";
};
};
sdhc0_default: sdhc0_default {
group1 {
psels = <RA_PSEL(RA_PSEL_SDHI, 3, 6)>, /* SDCD */
<RA_PSEL(RA_PSEL_SDHI, 3, 7)>, /* SDCMD */
<RA_PSEL(RA_PSEL_SDHI, 3, 4)>, /* SDDATA0 */
<RA_PSEL(RA_PSEL_SDHI, 3, 3)>, /* SDDATA1 */
<RA_PSEL(RA_PSEL_SDHI, 3, 2)>, /* SDDATA2 */
<RA_PSEL(RA_PSEL_SDHI, 3, 1)>, /* SDDATA3 */
<RA_PSEL(RA_PSEL_SDHI, 3, 5)>; /* SDWP */
drive-strength = "high";
};
group2 {
psels = <RA_PSEL(RA_PSEL_SDHI, 3, 8)>; /* SDCLK */
drive-strength = "highspeed-high";
};
};
};

View file

@ -114,6 +114,10 @@ The below features are currently supported on Zephyr OS for MCB-RA8T1 board:
+--------------+------------+----------------------+
| ADC | on-chip | adc |
+--------------+------------+----------------------+
| SDHC | on-chip | sdhc |
+--------------+------------+----------------------+
**Note:** For using SDHC module on EK-RA8M1, Connect microSD Card to microSD Socket (CN12)
Other hardware features are currently not supported by the port.

View file

@ -78,4 +78,21 @@
renesas,analog-enable;
};
};
sdhc0_default: sdhc0_default {
group1 {
psels = <RA_PSEL(RA_PSEL_SDHI, 3, 6)>, /* SDCD */
<RA_PSEL(RA_PSEL_SDHI, 3, 7)>, /* SDCMD */
<RA_PSEL(RA_PSEL_SDHI, 3, 4)>, /* SDDATA0 */
<RA_PSEL(RA_PSEL_SDHI, 3, 3)>, /* SDDATA1 */
<RA_PSEL(RA_PSEL_SDHI, 3, 2)>, /* SDDATA2 */
<RA_PSEL(RA_PSEL_SDHI, 3, 1)>, /* SDDATA3 */
<RA_PSEL(RA_PSEL_SDHI, 3, 5)>; /* SDWP */
drive-strength = "high";
};
group2 {
psels = <RA_PSEL(RA_PSEL_SDHI, 3, 8)>; /* SDCLK */
drive-strength = "highspeed-high";
};
};
};

View file

@ -46,6 +46,7 @@
aliases {
led0 = &led1;
sdhc0 = &sdhc0;
};
};
@ -87,6 +88,10 @@
status = "okay";
};
&ioport3 {
status = "okay";
};
&ioport6 {
status = "okay";
};
@ -178,3 +183,16 @@
pinctrl-names = "default";
average-count = <4>;
};
&sdhc0 {
compatible = "renesas,ra-sdhc";
pinctrl-0 = <&sdhc0_default>;
enable-gpios = <&ioport3 11 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
status = "okay";
sdmmc {
compatible = "zephyr,sdmmc-disk";
disk-name = "SD";
status = "okay";
};
};