Skip to content

Commit

Permalink
[nrf fromlist] dts: nordic: Change compatible property for EXMIF node
Browse files Browse the repository at this point in the history
This is a follow-up to commit cdf45cb234077522b5cef2da084869af43d42dc1.

Adjust the DTS node for the nRF EXMIF peripheral so that it is possible
to handle the peripheral with the generic MSPI driver for DW SSI based
controllers and use all its data lines in communication.
Also adjust the related board files accordingly.

Upstream PR #: 80042

Signed-off-by: Andrzej Głąbek <[email protected]>
  • Loading branch information
anangl committed Nov 8, 2024
1 parent ef0de91 commit b1982b5
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 21 deletions.
10 changes: 9 additions & 1 deletion boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,16 @@
/omit-if-no-ref/ exmif_default: exmif_default {
group1 {
psels = <NRF_PSEL(EXMIF_CK, 6, 0)>,
<NRF_PSEL(EXMIF_CS0, 6, 3)>,
<NRF_PSEL(EXMIF_RWDS, 6, 2)>,
<NRF_PSEL(EXMIF_DQ0, 6, 7)>,
<NRF_PSEL(EXMIF_DQ1, 6, 5)>;
<NRF_PSEL(EXMIF_DQ1, 6, 5)>,
<NRF_PSEL(EXMIF_DQ2, 6, 10)>,
<NRF_PSEL(EXMIF_DQ3, 6, 9)>,
<NRF_PSEL(EXMIF_DQ4, 6, 11)>,
<NRF_PSEL(EXMIF_DQ5, 6, 8)>,
<NRF_PSEL(EXMIF_DQ6, 6, 6)>,
<NRF_PSEL(EXMIF_DQ7, 6, 4)>;
nordic,drive-mode = <NRF_DRIVE_H0H1>;
};
};
Expand Down
16 changes: 12 additions & 4 deletions boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,14 @@ ipc0: &cpuapp_cpurad_ipc {
};

&exmif {
cs-gpios = <&gpio6 3 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&exmif_default>;
pinctrl-names = "default";
status = "okay";

mx25uw63: mx25uw6345g@0 {
compatible = "jedec,spi-nor";
status = "disabled";
compatible = "jedec,mspi-nor";
status = "okay";
reg = <0>;
spi-max-frequency = <DT_FREQ_M(48)>;
jedec-id = [c2 84 37];
sfdp-bfp = [
e5 20 8a ff ff ff ff 03 00 ff 00 ff 00 ff 00 ff
Expand All @@ -283,6 +282,15 @@ ipc0: &cpuapp_cpurad_ipc {
has-dpd;
t-enter-dpd = <10000>;
t-exit-dpd = <30000>;
reset-gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;

mspi-max-frequency = <DT_FREQ_M(50)>;
mspi-io-mode = "MSPI_IO_MODE_OCTAL";
mspi-data-rate = "MSPI_DATA_RATE_SINGLE";
mspi-hardware-ce-num = <1>;
mspi-cpp-mode = "MSPI_CPP_MODE_0";
mspi-endian = "MSPI_BIG_ENDIAN";
mspi-ce-polarity = "MSPI_CE_ACTIVE_LOW";
};
};

Expand Down
13 changes: 12 additions & 1 deletion boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,19 @@
/omit-if-no-ref/ exmif_default: exmif_default {
group1 {
psels = <NRF_PSEL(EXMIF_CK, 6, 0)>,
/* These two cannot be used until nrf-regtool
* is updated.
* <NRF_PSEL(EXMIF_CS0, 6, 3)>,
* <NRF_PSEL(EXMIF_RWDS, 6, 2)>,
*/
<NRF_PSEL(EXMIF_DQ0, 6, 7)>,
<NRF_PSEL(EXMIF_DQ1, 6, 5)>;
<NRF_PSEL(EXMIF_DQ1, 6, 5)>,
<NRF_PSEL(EXMIF_DQ2, 6, 10)>,
<NRF_PSEL(EXMIF_DQ3, 6, 9)>,
<NRF_PSEL(EXMIF_DQ4, 6, 11)>,
<NRF_PSEL(EXMIF_DQ5, 6, 8)>,
<NRF_PSEL(EXMIF_DQ6, 6, 6)>,
<NRF_PSEL(EXMIF_DQ7, 6, 4)>;
nordic,drive-mode = <NRF_DRIVE_H0H1>;
};
};
Expand Down
20 changes: 16 additions & 4 deletions boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280_cpuapp.dts
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,18 @@ ipc0: &cpuapp_cpurad_ipc {
};

&exmif {
cs-gpios = <&gpio6 3 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&exmif_default>;
pinctrl-names = "default";
status = "okay";
/* Hardware control of CS0 cannot be used until nrf-regtool is updated.
* Use GPIO instead for now.
*/
ce-gpios = <&gpio6 3 GPIO_ACTIVE_LOW>;

mx25uw63: mx25uw6345g@0 {
compatible = "jedec,spi-nor";
status = "disabled";
compatible = "jedec,mspi-nor";
status = "okay";
reg = <0>;
spi-max-frequency = <DT_FREQ_M(48)>;
jedec-id = [c2 84 37];
sfdp-bfp = [
e5 20 8a ff ff ff ff 03 00 ff 00 ff 00 ff 00 ff
Expand All @@ -274,6 +277,15 @@ ipc0: &cpuapp_cpurad_ipc {
has-dpd;
t-enter-dpd = <10000>;
t-exit-dpd = <30000>;
reset-gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;

mspi-max-frequency = <DT_FREQ_M(50)>;
mspi-io-mode = "MSPI_IO_MODE_OCTAL";
mspi-data-rate = "MSPI_DATA_RATE_SINGLE";
mspi-hardware-ce-num = <1>;
mspi-cpp-mode = "MSPI_CPP_MODE_0";
mspi-endian = "MSPI_BIG_ENDIAN";
mspi-ce-polarity = "MSPI_CE_ACTIVE_LOW";
};
};

Expand Down
6 changes: 1 addition & 5 deletions dts/bindings/spi/nordic,nrf-exmif.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@ description: Nordic External Memory Interface (EXMIF)

compatible: "nordic,nrf-exmif"

include: snps,designware-spi.yaml

properties:
reg:
required: true
include: snps,designware-ssi.yaml
5 changes: 2 additions & 3 deletions dts/common/nordic/nrf54h20.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,8 @@
status = "disabled";
};

exmif: spi@95000 {
compatible = "nordic,nrf-exmif";
exmif: exmif@95000 {
compatible = "nordic,nrf-exmif", "snps,designware-ssi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x95000 0x500 0x95500 0xb00>;
Expand All @@ -515,7 +515,6 @@
power-domains = <&gpd NRF_GPD_FAST_ACTIVE0>;
clock-frequency = <DT_FREQ_M(400)>;
fifo-depth = <32>;
max-xfer-size = <16>;
status = "disabled";
};

Expand Down
5 changes: 2 additions & 3 deletions dts/common/nordic/nrf9280.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -360,16 +360,15 @@
status = "disabled";
};

exmif: spi@95000 {
compatible = "nordic,nrf-exmif";
exmif: exmif@95000 {
compatible = "nordic,nrf-exmif", "snps,designware-ssi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x95000 0x500 0x95500 0xb00>;
reg-names = "wrapper", "core";
interrupts = <149 NRF_DEFAULT_IRQ_PRIORITY>;
clock-frequency = <DT_FREQ_M(400)>;
fifo-depth = <32>;
max-xfer-size = <16>;
status = "disabled";
};

Expand Down

0 comments on commit b1982b5

Please sign in to comment.