pinectrl.dtsi and dts settings for W25Q128JVPIQTR using SPI with a nrf5340

I am creating a custom board with an  W25Q128JVPIQTR external flash drive using SPI with a nrf5340. The pins are:

  • P0.08 - SD_CLK 
  • P0.09 - SD_MOSI
  • P0.10 - SD_MISO
  • P0.13 - SD_CS 
  • P0.14 - SD_WP 
  • P0.15 - SD_RST 

What do I put in the pinctrl.dtsi file and what do I put in the dts file?

I see this for the mx25r64 on the nRF5340 DK in the pinctrl.dtsi file:

	qspi_default: qspi_default {
		group1 {
			psels = <NRF_PSEL(QSPI_SCK, 0, 17)>,
				<NRF_PSEL(QSPI_IO0, 0, 13)>,
				<NRF_PSEL(QSPI_IO1, 0, 14)>,
				<NRF_PSEL(QSPI_IO2, 0, 15)>,
				<NRF_PSEL(QSPI_IO3, 0, 16)>,
				<NRF_PSEL(QSPI_CSN, 0, 18)>;
			nordic,drive-mode = <NRF_DRIVE_H0H1>;
		};
	};

	qspi_sleep: qspi_sleep {
		group1 {
			psels = <NRF_PSEL(QSPI_SCK, 0, 17)>,
				<NRF_PSEL(QSPI_IO0, 0, 13)>,
				<NRF_PSEL(QSPI_IO1, 0, 14)>,
				<NRF_PSEL(QSPI_IO2, 0, 15)>,
				<NRF_PSEL(QSPI_IO3, 0, 16)>;
			low-power-enable;
		};
		group2 {
			psels = <NRF_PSEL(QSPI_CSN, 0, 18)>;
			low-power-enable;
			bias-pull-up;
		};
	};

And this in the common.dtsi:

&qspi {
	status = "okay";
	pinctrl-0 = <&qspi_default>;
	pinctrl-1 = <&qspi_sleep>;
	pinctrl-names = "default", "sleep";
	mx25r64: mx25r6435f@0 {
		compatible = "nordic,qspi-nor";
		reg = <0>;
		/* MX25R64 supports only pp and pp4io */
		writeoc = "pp4io";
		/* MX25R64 supports all readoc options */
		readoc = "read4io";
		sck-frequency = <8000000>;
		jedec-id = [c2 28 17];
		sfdp-bfp = [
			e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
			ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
			10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
			30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
		];
		size = <67108864>;
		has-dpd;
		t-enter-dpd = <10000>;
		t-exit-dpd = <35000>;
	};
};

How do I change them for the W25Q128JVPIQTR?

Parents Reply Children
No Data
Related