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 authored and jukkar committed Dec 16, 2024
1 parent 9a11615 commit 7d684d9
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 23 deletions.
27 changes: 26 additions & 1 deletion boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,37 @@
/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>;
};
};

/omit-if-no-ref/ exmif_sleep: exmif_sleep {
group1 {
low-power-enable;
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_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)>;
};
};

/omit-if-no-ref/ can120_default: can120_default {
group1 {
psels = <NRF_PSEL(CAN_RX, 9, 4)>,
Expand Down
19 changes: 14 additions & 5 deletions boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,15 @@ ipc0: &cpuapp_cpurad_ipc {
};

&exmif {
cs-gpios = <&gpio6 3 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&exmif_default>;
pinctrl-names = "default";
pinctrl-1 = <&exmif_sleep>;
pinctrl-names = "default", "sleep";
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 +283,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
27 changes: 26 additions & 1 deletion boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,37 @@
/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>;
};
};

/omit-if-no-ref/ exmif_sleep: exmif_sleep {
group1 {
low-power-enable;
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_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)>;
};
};

/omit-if-no-ref/ can120_default: can120_default {
group1 {
psels = <NRF_PSEL(CAN_RX, 9, 4)>,
Expand Down
19 changes: 14 additions & 5 deletions boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280_cpuapp.dts
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,15 @@ ipc0: &cpuapp_cpurad_ipc {
};

&exmif {
cs-gpios = <&gpio6 3 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&exmif_default>;
pinctrl-names = "default";
pinctrl-1 = <&exmif_sleep>;
pinctrl-names = "default", "sleep";
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 @@ -274,6 +274,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 @@ -509,8 +509,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 @@ -519,7 +519,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 7d684d9

Please sign in to comment.