From 7d684d9ae200986e3cb6428a79b7d1311e65483c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20G=C5=82=C4=85bek?= Date: Thu, 17 Oct 2024 17:43:48 +0200 Subject: [PATCH] [nrf fromlist] dts: nordic: Change compatible property for EXMIF node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../nrf54h20dk_nrf54h20-pinctrl.dtsi | 27 ++++++++++++++++++- .../nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts | 19 +++++++++---- .../nrf9280pdk_nrf9280-pinctrl.dtsi | 27 ++++++++++++++++++- .../nrf9280pdk/nrf9280pdk_nrf9280_cpuapp.dts | 19 +++++++++---- dts/bindings/spi/nordic,nrf-exmif.yaml | 6 +---- dts/common/nordic/nrf54h20.dtsi | 5 ++-- dts/common/nordic/nrf9280.dtsi | 5 ++-- 7 files changed, 85 insertions(+), 23 deletions(-) diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-pinctrl.dtsi b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-pinctrl.dtsi index 9b574a18ec5..f62df87dfe2 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-pinctrl.dtsi +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20-pinctrl.dtsi @@ -73,12 +73,37 @@ /omit-if-no-ref/ exmif_default: exmif_default { group1 { psels = , + , + , , - ; + , + , + , + , + , + , + ; nordic,drive-mode = ; }; }; + /omit-if-no-ref/ exmif_sleep: exmif_sleep { + group1 { + low-power-enable; + psels = , + , + , + , + , + , + , + , + , + , + ; + }; + }; + /omit-if-no-ref/ can120_default: can120_default { group1 { psels = , diff --git a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts index 9c3556b27c4..be44d00f480 100644 --- a/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts +++ b/boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts @@ -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 = ; jedec-id = [c2 84 37]; sfdp-bfp = [ e5 20 8a ff ff ff ff 03 00 ff 00 ff 00 ff 00 ff @@ -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 = ; + 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"; }; }; diff --git a/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-pinctrl.dtsi b/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-pinctrl.dtsi index 48067a7052c..143fd45f33e 100644 --- a/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-pinctrl.dtsi +++ b/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280-pinctrl.dtsi @@ -54,12 +54,37 @@ /omit-if-no-ref/ exmif_default: exmif_default { group1 { psels = , + , + , , - ; + , + , + , + , + , + , + ; nordic,drive-mode = ; }; }; + /omit-if-no-ref/ exmif_sleep: exmif_sleep { + group1 { + low-power-enable; + psels = , + , + , + , + , + , + , + , + , + , + ; + }; + }; + /omit-if-no-ref/ can120_default: can120_default { group1 { psels = , diff --git a/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280_cpuapp.dts b/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280_cpuapp.dts index 2ce9b912269..61bed44b905 100644 --- a/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280_cpuapp.dts +++ b/boards/nordic/nrf9280pdk/nrf9280pdk_nrf9280_cpuapp.dts @@ -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 = ; jedec-id = [c2 84 37]; sfdp-bfp = [ e5 20 8a ff ff ff ff 03 00 ff 00 ff 00 ff 00 ff @@ -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 = ; + 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"; }; }; diff --git a/dts/bindings/spi/nordic,nrf-exmif.yaml b/dts/bindings/spi/nordic,nrf-exmif.yaml index d2b8815046b..294254aa60e 100644 --- a/dts/bindings/spi/nordic,nrf-exmif.yaml +++ b/dts/bindings/spi/nordic,nrf-exmif.yaml @@ -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 diff --git a/dts/common/nordic/nrf54h20.dtsi b/dts/common/nordic/nrf54h20.dtsi index cdac7c3a6e2..6ce4fda00fa 100644 --- a/dts/common/nordic/nrf54h20.dtsi +++ b/dts/common/nordic/nrf54h20.dtsi @@ -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>; @@ -519,7 +519,6 @@ power-domains = <&gpd NRF_GPD_FAST_ACTIVE0>; clock-frequency = ; fifo-depth = <32>; - max-xfer-size = <16>; status = "disabled"; }; diff --git a/dts/common/nordic/nrf9280.dtsi b/dts/common/nordic/nrf9280.dtsi index 62b22b4fbc2..c9e1742e102 100644 --- a/dts/common/nordic/nrf9280.dtsi +++ b/dts/common/nordic/nrf9280.dtsi @@ -360,8 +360,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>; @@ -369,7 +369,6 @@ interrupts = <149 NRF_DEFAULT_IRQ_PRIORITY>; clock-frequency = ; fifo-depth = <32>; - max-xfer-size = <16>; status = "disabled"; };