boards: renesas: Add boards support for OSPI flash driver on RA8

Add support for OSPI flash driver on EK-RA8D1 and EK-RA8M1

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
This commit is contained in:
Quy Tran 2024-11-28 17:49:30 +07:00 committed by Benjamin Cabé
commit c442fa11d5
4 changed files with 167 additions and 0 deletions

View file

@ -270,4 +270,23 @@
psels = <RA_PSEL(RA_PSEL_ACMPHS_VCOUT, 2, 8)>;
};
};
ospi0_default: ospi0_default {
group1 {
/* sclk dqs sio0-7 */
psels = <RA_PSEL(RA_PSEL_OSPI, 8, 8)>, <RA_PSEL(RA_PSEL_OSPI, 8, 1)>,
<RA_PSEL(RA_PSEL_OSPI, 1, 0)>, <RA_PSEL(RA_PSEL_OSPI, 8, 3)>,
<RA_PSEL(RA_PSEL_OSPI, 1, 3)>, <RA_PSEL(RA_PSEL_OSPI, 1, 1)>,
<RA_PSEL(RA_PSEL_OSPI, 1, 2)>, <RA_PSEL(RA_PSEL_OSPI, 8, 0)>,
<RA_PSEL(RA_PSEL_OSPI, 8, 2)>, <RA_PSEL(RA_PSEL_OSPI, 8, 4)>;
drive-strength = "highspeed-high";
};
group2 {
/* cs1 rst ecsint1 */
psels = <RA_PSEL(RA_PSEL_OSPI, 1, 4)>, <RA_PSEL(RA_PSEL_OSPI, 1, 6)>,
<RA_PSEL(RA_PSEL_OSPI, 1, 5)>;
drive-strength = "high";
};
};
};

View file

@ -6,6 +6,7 @@
/dts-v1/;
#include <renesas/ra/ra8/r7fa8d1bhecbd.dtsi>
#include <zephyr/dt-bindings/flash_controller/xspi.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
@ -114,6 +115,19 @@
};
};
&pll2 {
status = "okay";
clocks = <&xtal>;
div = <2>;
mul = <80 0>;
pll2p {
status = "okay";
freq = <DT_FREQ_M(400)>;
div = <2>;
};
};
&sciclk {
clocks = <&pllp>;
div = <4>;
@ -132,6 +146,12 @@
status = "okay";
};
&octaspiclk {
clocks = <&pll2p>;
div = <2>;
status = "okay";
};
&uclk {
clocks = <&pllq>;
div = <5>;
@ -342,3 +362,48 @@ pmod_sd_shield: &sdhc1 {};
status = "okay";
};
};
&ospi0 {
pinctrl-0 = <&ospi0_default>;
pinctrl-names = "default";
status = "okay";
s28hl512t: ospi-nor-flash@90000000 {
compatible = "renesas,ra-ospi-b-nor";
protocol-mode = <XSPI_OCTO_MODE>;
data-rate = <XSPI_DTR_TRANSFER>;
ospi-max-frequency = <DT_FREQ_M(200)>;
reg = <0x90000000 DT_SIZE_M(64)>;
write-block-size = <1>;
status = "okay";
pages_layout: pages_layout {
pages_layout_4k: pages_layout_4k {
pages-count = <32>;
pages-size = <DT_SIZE_K(4)>;
};
pages_layout_128k: pages_layout_128k {
pages-count = <1>;
pages-size = <DT_SIZE_K(128)>;
};
pages_layout_256k: pages_layout_256k {
pages-count = <255>;
pages-size = <DT_SIZE_K(256)>;
};
};
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "nor";
reg = <0x00000000 DT_SIZE_M(64)>;
};
};
};
};

View file

@ -212,4 +212,23 @@
psels = <RA_PSEL(RA_PSEL_ACMPHS_VCOUT, 2, 8)>;
};
};
ospi0_default: ospi0_default {
group1 {
/* sclk dqs sio0-7 */
psels = <RA_PSEL(RA_PSEL_OSPI, 8, 8)>, <RA_PSEL(RA_PSEL_OSPI, 8, 1)>,
<RA_PSEL(RA_PSEL_OSPI, 1, 0)>, <RA_PSEL(RA_PSEL_OSPI, 8, 3)>,
<RA_PSEL(RA_PSEL_OSPI, 1, 3)>, <RA_PSEL(RA_PSEL_OSPI, 1, 1)>,
<RA_PSEL(RA_PSEL_OSPI, 1, 2)>, <RA_PSEL(RA_PSEL_OSPI, 8, 0)>,
<RA_PSEL(RA_PSEL_OSPI, 8, 2)>, <RA_PSEL(RA_PSEL_OSPI, 8, 4)>;
drive-strength = "highspeed-high";
};
group2 {
/* cs1 rst ecsint1 */
psels = <RA_PSEL(RA_PSEL_OSPI, 1, 4)>, <RA_PSEL(RA_PSEL_OSPI, 1, 6)>,
<RA_PSEL(RA_PSEL_OSPI, 1, 5)>;
drive-strength = "high";
};
};
};

View file

@ -7,6 +7,7 @@
#include <renesas/ra/ra8/r7fa8m1ahecbd.dtsi>
#include <dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/flash_controller/xspi.h>
#include <zephyr/dt-bindings/adc/adc.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include "ek_ra8m1-pinctrl.dtsi"
@ -151,6 +152,18 @@
};
};
&pll2 {
status = "okay";
clocks = <&xtal>;
div = <2>;
mul = <80 0>;
pll2p {
status = "okay";
freq = <DT_FREQ_M(400)>;
div = <2>;
};
};
&sciclk {
clocks = <&pllp>;
@ -170,6 +183,12 @@
status = "okay";
};
&octaspiclk {
clocks = <&pll2p>;
div = <2>;
status = "okay";
};
&ioport0 {
status = "okay";
};
@ -401,3 +420,48 @@ pmod_sd_shield: &sdhc0 {};
status = "okay";
};
};
&ospi0 {
pinctrl-0 = <&ospi0_default>;
pinctrl-names = "default";
status = "okay";
s28hl512t: ospi-nor-flash@90000000 {
compatible = "renesas,ra-ospi-b-nor";
protocol-mode = <XSPI_OCTO_MODE>;
data-rate = <XSPI_DTR_TRANSFER>;
ospi-max-frequency = <DT_FREQ_M(200)>;
reg = <0x90000000 DT_SIZE_M(64)>;
write-block-size = <1>;
status = "okay";
pages_layout: pages_layout {
pages_layout_4k: pages_layout_4k {
pages-count = <32>;
pages-size = <DT_SIZE_K(4)>;
};
pages_layout_128k: pages_layout_128k {
pages-count = <1>;
pages-size = <DT_SIZE_K(128)>;
};
pages_layout_256k: pages_layout_256k {
pages-count = <255>;
pages-size = <DT_SIZE_K(256)>;
};
};
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "nor";
reg = <0x00000000 DT_SIZE_M(64)>;
};
};
};
};