diff --git a/boards/nxp/s32z2xxdc2/doc/index.rst b/boards/nxp/s32z2xxdc2/doc/index.rst index f353b68194f..db6b713f47c 100644 --- a/boards/nxp/s32z2xxdc2/doc/index.rst +++ b/boards/nxp/s32z2xxdc2/doc/index.rst @@ -62,6 +62,8 @@ The boards support the following hardware features: +-----------+------------+-------------------------------------+ | eMIOS | on-chip | pwm | +-----------+------------+-------------------------------------+ +| QSPI | on-chip | flash | ++-----------+------------+-------------------------------------+ Other hardware features are not currently supported by the port. @@ -172,6 +174,12 @@ EDMA The EDMA modules feature four EDMA3 instances: Instance 0 with 32 channels, and instances 1, 4, and 5, each with 16 channels. +External Flash +============== + +The on-board S26HS512T 512M-bit HyperFlash memory is connected to the QSPI controller +port A1. This board configuration selects it as the default flash controller. + Programming and Debugging ************************* diff --git a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270.dtsi b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270.dtsi index 65f04794ce3..87befae0db2 100644 --- a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270.dtsi +++ b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270.dtsi @@ -5,6 +5,7 @@ */ #include "s32z2xxdc2_s32z270_pinctrl.dtsi" +#include &swt0 { status = "okay"; @@ -58,3 +59,69 @@ &sar_adc1 { vref-mv = <1800>; }; + +&qspi0 { + pinctrl-0 = <&qspi0_default>; + pinctrl-names = "default"; + data-rate = "DDR"; + column-space = <3>; + word-addressable; + hold-time-2x; + a-dll-freq-enable; + a-dll-ref-counter = <2>; + a-dll-resolution = <2>; + a-dll-coarse-delay = <2>; + a-dll-fine-delay = <2>; + a-dll-mode = "AUTO UPDATE"; + a-rx-clock-source = "EXTERNAL DQS"; + ahb-buffers-masters = <0 1 2 3>; + ahb-buffers-sizes = <256 256 256 256>; + ahb-buffers-all-masters; + status = "okay"; + + sfp_mdad { + compatible = "nxp,s32-qspi-sfp-mdad"; + + mdad_0: mdad_0 { + domain-id = <0>; + secure-attribute = ; + }; + }; + + sfp_frad { + compatible = "nxp,s32-qspi-sfp-frad"; + #address-cells = <1>; + #size-cells = <1>; + + frad_0: frad@0 { + reg = <0x0 DT_SIZE_M(512)>; + master-domain-acp-policy = ; + }; + }; + + s26hs512t: s26hs512t@0 { + compatible = "nxp,s32-qspi-hyperflash"; + reg = <0>; + jedec-id = [00 34 00 7b 00 1a 00 0f 00 90]; + device-id-word-addr = <0x800>; + size = ; + write-block-size = <2>; + read-latency-cycles = <16>; + max-program-buffer-size = <256>; + vcc-mv = <1800>; + drive-strength-ohm = <27>; + ppw-sectors-addr-mapping = "LOW"; + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + storage_partition: partition@0 { + label = "storage"; + reg = <0x0 0x10000>; + }; + }; + }; +}; diff --git a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_pinctrl.dtsi b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_pinctrl.dtsi index 05b92b08931..7433ba00e40 100644 --- a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_pinctrl.dtsi +++ b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_pinctrl.dtsi @@ -127,4 +127,25 @@ drive-open-drain; }; }; + + qspi0_default: qspi0_default { + group1 { + pinmux = , , + , , + , , + , , + ; + output-enable; + input-enable; + }; + group2 { + pinmux = , , + , ; + output-enable; + }; + group3 { + pinmux = ; + input-enable; + }; + }; }; diff --git a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.dts b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.dts index da6b9645614..e38e8b51792 100644 --- a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.dts +++ b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.dts @@ -16,6 +16,7 @@ zephyr,sram = &dram0; zephyr,flash = &cram0; zephyr,canbus = &canxl0; + zephyr,flash-controller = &s26hs512t; }; aliases { diff --git a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.dts b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.dts index 286fd8d094c..f8792f880f3 100644 --- a/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.dts +++ b/boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.dts @@ -16,6 +16,7 @@ zephyr,sram = &dram1; zephyr,flash = &cram1; zephyr,canbus = &flexcan0; + zephyr,flash-controller = &s26hs512t; }; aliases { diff --git a/dts/arm/nxp/nxp_s32z27x_r52.dtsi b/dts/arm/nxp/nxp_s32z27x_r52.dtsi index 1149fad3636..578dffddb77 100644 --- a/dts/arm/nxp/nxp_s32z27x_r52.dtsi +++ b/dts/arm/nxp/nxp_s32z27x_r52.dtsi @@ -1431,5 +1431,21 @@ status = "disabled"; }; }; + + qspi0: qspi@42320000 { + compatible = "nxp,s32-qspi"; + reg = <0x42320000 0x4000>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + qspi1: qspi@42340000 { + compatible = "nxp,s32-qspi"; + reg = <0x42340000 0x4000>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; }; };