Commit fc7f54fb authored by Lad Prabhakar's avatar Lad Prabhakar Committed by Geert Uytterhoeven
Browse files

ARM: dts: r8a7742-iwg21m: Add SPI NOR support



Add support for the SPI NOR device used to boot up the system
to the System on Module DT.

Signed-off-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: default avatarChris Paterson <Chris.Paterson2@renesas.com>
Link: https://lore.kernel.org/r/20200825085435.8744-1-prabhakar.mahadev-lad.rj@bp.renesas.com


Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
parent 7da4d2a8
Loading
Loading
Loading
Loading
+51 −0
Original line number Diff line number Diff line
@@ -35,6 +35,16 @@ &extal_clk {
	clock-frequency = <20000000>;
};

&gpio0 {
	/* GP0_18 set low to select QSPI. Doing so will disable VIN2 */
	qspi_en {
		gpio-hog;
		gpios = <18 GPIO_ACTIVE_HIGH>;
		output-low;
		line-name = "QSPI_EN";
	};
};

&i2c0 {
	pinctrl-0 = <&i2c0_pins>;
	pinctrl-names = "default";
@@ -70,4 +80,45 @@ mmc1_pins: mmc1 {
		groups = "mmc1_data4", "mmc1_ctrl";
		function = "mmc1";
	};

	qspi_pins: qspi {
		groups = "qspi_ctrl", "qspi_data2";
		function = "qspi";
	};
};

&qspi {
	pinctrl-0 = <&qspi_pins>;
	pinctrl-names = "default";

	status = "okay";

	flash: flash@0 {
		compatible = "sst,sst25vf016b", "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <50000000>;
		m25p,fast-read;
		spi-cpol;
		spi-cpha;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "bootloader";
				reg = <0x00000000 0x000c0000>;
				read-only;
			};
			partition@c0000 {
				label = "env";
				reg = <0x000c0000 0x00002000>;
			};
			partition@c2000 {
				label = "user";
				reg = <0x000c2000 0x0013e000>;
			};
		};
	};
};