Add support for OSPI flash driver on EK-RA8D1 and EK-RA8M1 Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
409 lines
7.1 KiB
Text
409 lines
7.1 KiB
Text
/*
|
|
* Copyright (c) 2024 Renesas Electronics Corporation
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/dts-v1/;
|
|
|
|
#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"
|
|
|
|
/ {
|
|
model = "Renesas EK-RA8M1";
|
|
compatible = "renesas,ra8m1", "renesas,ra8";
|
|
|
|
chosen {
|
|
zephyr,sram = &sram0;
|
|
zephyr,flash-controller = &flash1;
|
|
zephyr,flash = &flash0;
|
|
zephyr,console = &uart9;
|
|
zephyr,shell-uart = &uart9;
|
|
zephyr,entropy = &trng;
|
|
zephyr,canbus = &canfd0;
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
led1: led1 {
|
|
gpios = <&ioport6 0 GPIO_ACTIVE_HIGH>;
|
|
label = "LED1";
|
|
};
|
|
led2: led2 {
|
|
gpios = <&ioport4 14 GPIO_ACTIVE_HIGH>;
|
|
label = "LED2";
|
|
};
|
|
led3: led3 {
|
|
gpios = <&ioport1 7 GPIO_ACTIVE_HIGH>;
|
|
label = "LED3";
|
|
};
|
|
};
|
|
|
|
mikrobus_header: mikrobus-connector {
|
|
compatible = "mikro-bus";
|
|
#gpio-cells = <2>;
|
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
|
gpio-map-pass-thru = <0 0x3f>;
|
|
gpio-map = <0 0 &ioport0 4 0>, /* AN */
|
|
<1 0 &ioport5 2 0>, /* RST */
|
|
<2 0 &ioport4 13 0>, /* CS */
|
|
<3 0 &ioport4 12 0>, /* SCK */
|
|
<4 0 &ioport4 10 0>, /* MISO */
|
|
<5 0 &ioport4 11 0>, /* MOSI */
|
|
/* +3.3V */
|
|
/* GND */
|
|
<6 0 &ioport9 7 0>, /* PWM */
|
|
<7 0 &ioport0 10 0>, /* INT */
|
|
<8 0 &ioport3 9 0>, /* RX */
|
|
<9 0 &ioport3 10 0>, /* TX */
|
|
<10 0 &ioport4 0 0>, /* SCL */
|
|
<11 0 &ioport4 1 0>; /* SDA */
|
|
/* +5V */
|
|
/* GND */
|
|
};
|
|
|
|
pmod1_header: pmod-connector-1 {
|
|
compatible = "digilent,pmod";
|
|
#gpio-cells = <2>;
|
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
|
gpio-map-pass-thru = <0 0x3f>;
|
|
gpio-map = <0 0 &ioport6 12 0>, /* IO1 */
|
|
<1 0 &ioport6 9 0>, /* IO2 */
|
|
<2 0 &ioport6 10 0>, /* IO3 */
|
|
<3 0 &ioport6 11 0>, /* IO4 */
|
|
<4 0 &ioport0 6 0>, /* IO5 */
|
|
<5 0 &ioporta 8 0>, /* IO6 */
|
|
<6 0 &ioport6 14 0>, /* IO7 */
|
|
<7 0 &ioport6 15 0>; /* IO8 */
|
|
};
|
|
|
|
pmod2_header: pmod-connector-2 {
|
|
compatible = "digilent,pmod";
|
|
#gpio-cells = <2>;
|
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
|
gpio-map-pass-thru = <0 0x3f>;
|
|
gpio-map = <0 0 &ioporta 5 0>, /* IO1 */
|
|
<1 0 &ioporta 3 0>, /* IO2 */
|
|
<2 0 &ioporta 2 0>, /* IO3 */
|
|
<3 0 &ioporta 4 0>, /* IO4 */
|
|
<4 0 &ioport5 8 0>, /* IO5 */
|
|
<5 0 &ioport8 9 0>, /* IO6 */
|
|
<6 0 &ioport8 10 0>, /* IO7 */
|
|
<7 0 &ioport8 11 0>; /* IO8 */
|
|
};
|
|
|
|
buttons {
|
|
compatible = "gpio-keys";
|
|
button0: s1 {
|
|
gpios = <&ioport0 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
|
label = "Push button switch 1";
|
|
zephyr,code = <INPUT_KEY_0>;
|
|
};
|
|
button1: s2 {
|
|
gpios = <&ioport0 8 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
|
label = "Push button switch 2";
|
|
zephyr,code = <INPUT_KEY_1>;
|
|
};
|
|
};
|
|
|
|
aliases {
|
|
led0 = &led1;
|
|
sw0 = &button0;
|
|
sw1 = &button1;
|
|
};
|
|
|
|
transceiver0: can-phy0 {
|
|
compatible = "nxp,tja1040t", "can-transceiver-gpio";
|
|
standby-gpios = <&ioport2 7 GPIO_ACTIVE_HIGH>;
|
|
max-bitrate = <5000000>;
|
|
#phy-cells = <0>;
|
|
};
|
|
};
|
|
|
|
&xtal {
|
|
clock-frequency = <DT_FREQ_M(20)>;
|
|
mosel = <0>;
|
|
#clock-cells = <0>;
|
|
status = "okay";
|
|
};
|
|
|
|
&subclk {
|
|
status = "okay";
|
|
};
|
|
|
|
&pll {
|
|
status = "okay";
|
|
pllp {
|
|
status = "okay";
|
|
};
|
|
|
|
pllq {
|
|
status = "okay";
|
|
};
|
|
|
|
pllr {
|
|
status = "okay";
|
|
};
|
|
};
|
|
|
|
&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>;
|
|
status = "okay";
|
|
};
|
|
|
|
&canfdclk {
|
|
clocks = <&pll>;
|
|
div = <5>;
|
|
status = "okay";
|
|
};
|
|
|
|
&octaspiclk {
|
|
clocks = <&pll2p>;
|
|
div = <2>;
|
|
status = "okay";
|
|
};
|
|
|
|
&ioport0 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ioport1 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ioport2 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ioport3 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ioport4 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ioport5 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ioport6 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ioport8 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ioport9 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ioporta {
|
|
status = "okay";
|
|
};
|
|
|
|
&sci0 {
|
|
pinctrl-0 = <&sci0_default>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
uart0: uart {
|
|
current-speed = <115200>;
|
|
status = "okay";
|
|
};
|
|
};
|
|
|
|
&sci2 {
|
|
pinctrl-0 = <&sci2_default>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
uart2: uart {
|
|
current-speed = <115200>;
|
|
status = "okay";
|
|
};
|
|
};
|
|
|
|
&sci3 {
|
|
pinctrl-0 = <&sci3_default>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
uart3: uart {
|
|
current-speed = <115200>;
|
|
status = "okay";
|
|
};
|
|
};
|
|
|
|
&sci9 {
|
|
pinctrl-0 = <&sci9_default>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
uart9: uart {
|
|
current-speed = <115200>;
|
|
status = "okay";
|
|
};
|
|
};
|
|
|
|
mikrobus_serial: &uart3 {};
|
|
|
|
&iic1 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
clock-frequency = <DT_FREQ_M(1)>;
|
|
pinctrl-0 = <&iic1_default>;
|
|
pinctrl-names = "default";
|
|
};
|
|
|
|
&adc0 {
|
|
status = "okay";
|
|
pinctrl-0 = <&adc0_default>;
|
|
pinctrl-names = "default";
|
|
average-count = <4>;
|
|
};
|
|
|
|
&trng {
|
|
status = "okay";
|
|
};
|
|
|
|
&spi1 {
|
|
pinctrl-0 = <&spi1_default>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
};
|
|
|
|
&pwm7 {
|
|
pinctrl-0 = <&pwm7_default>;
|
|
interrupts = <40 1>, <41 1>;
|
|
interrupt-names = "gtioca", "overflow";
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
};
|
|
|
|
&flash1 {
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
storage_partition: partition@0 {
|
|
label = "storage";
|
|
reg = <0X0 DT_SIZE_K(12)>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&canfd_global {
|
|
status = "okay";
|
|
canfd0 {
|
|
pinctrl-0 = <&canfd0_default>;
|
|
pinctrl-names = "default";
|
|
phys = <&transceiver0>;
|
|
rx-max-filters = <16>;
|
|
status = "okay";
|
|
};
|
|
};
|
|
|
|
pmod1_serial: &uart0 {};
|
|
pmod2_serial: &uart2 {};
|
|
|
|
pmod_serial: &pmod1_serial {};
|
|
pmod_header: &pmod1_header {};
|
|
|
|
ð {
|
|
local-mac-address = [74 90 50 B0 6D 5A];
|
|
status = "okay";
|
|
phy-handle = <&phy>;
|
|
};
|
|
|
|
&mdio {
|
|
pinctrl-0 = <ðer_default>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
|
|
phy: ethernet-phy@5 {
|
|
compatible = "ethernet-phy";
|
|
reg = <5>;
|
|
status = "okay";
|
|
};
|
|
};
|
|
|
|
&usbhs {
|
|
pinctrl-0 = <&usbhs_default>;
|
|
pinctrl-names = "default";
|
|
maximum-speed = "high-speed";
|
|
status = "okay";
|
|
zephyr_udc0: udc {
|
|
status = "okay";
|
|
};
|
|
};
|
|
|
|
&usbhs_phy {
|
|
phys-clock-src = "xtal";
|
|
};
|
|
|
|
&port_irq12 {
|
|
interrupts = <88 12>;
|
|
status = "okay";
|
|
};
|
|
|
|
&port_irq13 {
|
|
interrupts = <89 12>;
|
|
status = "okay";
|
|
};
|
|
|
|
pmod_sd_shield: &sdhc0 {};
|
|
|
|
&ospi0 {
|
|
pinctrl-0 = <&ospi0_default>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
s28hl512t: s28hl512t@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>;
|
|
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)>;
|
|
};
|
|
};
|
|
status = "okay";
|
|
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
partition@0 {
|
|
label = "nor";
|
|
reg = <0x00000000 DT_SIZE_M(64)>;
|
|
};
|
|
};
|
|
};
|
|
};
|