summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorApurva Nandan <a-nandan@ti.com>2023-06-08 16:29:36 +0530
committerVignesh Raghavendra <vigneshr@ti.com>2023-06-08 20:48:52 +0530
commit192b65649f7820625897055e0ed963175d6d9c24 (patch)
tree18b97ba675fe4614c4801c17b5ed7bebddf5aafc
parent28bcb1389e0fb614d8ab87be59432b2be45edc59 (diff)
arm64: dts: ti: k3-am62x-lp-sk: Add spi-nand flash node
The AM62-LP-SK board has a 128 MB SPI NAND flash W35N01JW on the OSPI0 instance. Enable it in the device tree node. Signed-off-by: Apurva Nandan <a-nandan@ti.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
-rw-r--r--arch/arm/dts/k3-am62-lp-sk-u-boot.dtsi20
-rw-r--r--arch/arm/dts/k3-am62-lp-sk.dts75
-rw-r--r--arch/arm/dts/k3-am62-r5-lp-sk.dts5
3 files changed, 100 insertions, 0 deletions
diff --git a/arch/arm/dts/k3-am62-lp-sk-u-boot.dtsi b/arch/arm/dts/k3-am62-lp-sk-u-boot.dtsi
index 7f4915cde56..04648461da3 100644
--- a/arch/arm/dts/k3-am62-lp-sk-u-boot.dtsi
+++ b/arch/arm/dts/k3-am62-lp-sk-u-boot.dtsi
@@ -14,3 +14,23 @@
&vddshv_sdio_pins_default {
bootph-pre-ram;
};
+
+&ospi0_pins_default {
+ bootph-pre-ram;
+};
+
+&ospi0 {
+ bootph-pre-ram;
+
+ flash@0 {
+ bootph-pre-ram;
+
+ partitions {
+ bootph-pre-ram;
+
+ partition@7fc0000 {
+ bootph-pre-ram;
+ };
+ };
+ };
+};
diff --git a/arch/arm/dts/k3-am62-lp-sk.dts b/arch/arm/dts/k3-am62-lp-sk.dts
index a220392d09f..c0506a0e595 100644
--- a/arch/arm/dts/k3-am62-lp-sk.dts
+++ b/arch/arm/dts/k3-am62-lp-sk.dts
@@ -90,6 +90,22 @@
AM62X_IOPAD(0x01f4, PIN_INPUT, 0) /* (B16) EXTINTn */
>;
};
+
+ ospi0_pins_default: ospi0-pins-default {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x000, PIN_OUTPUT, 0) /* (H24) OSPI0_CLK */
+ AM62X_IOPAD(0x02c, PIN_OUTPUT, 0) /* (F23) OSPI0_CSn0 */
+ AM62X_IOPAD(0x00c, PIN_INPUT, 0) /* (E25) OSPI0_D0 */
+ AM62X_IOPAD(0x010, PIN_INPUT, 0) /* (G24) OSPI0_D1 */
+ AM62X_IOPAD(0x014, PIN_INPUT, 0) /* (F25) OSPI0_D2 */
+ AM62X_IOPAD(0x018, PIN_INPUT, 0) /* (F24) OSPI0_D3 */
+ AM62X_IOPAD(0x01c, PIN_INPUT, 0) /* (J23) OSPI0_D4 */
+ AM62X_IOPAD(0x020, PIN_INPUT, 0) /* (J25) OSPI0_D5 */
+ AM62X_IOPAD(0x024, PIN_INPUT, 0) /* (H25) OSPI0_D6 */
+ AM62X_IOPAD(0x028, PIN_INPUT, 0) /* (J22) OSPI0_D7 */
+ AM62X_IOPAD(0x008, PIN_INPUT, 0) /* (J24) OSPI0_DQS */
+ >;
+ };
};
&main_i2c1 {
@@ -230,3 +246,62 @@
DVDD-supply = <&buck2_reg>;
};
+&ospi0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&ospi0_pins_default>;
+ flash@0{
+ compatible = "spi-nand";
+ reg = <0x0>;
+ spi-tx-bus-width = <8>;
+ spi-rx-bus-width = <8>;
+ spi-max-frequency = <25000000>;
+ cdns,tshsl-ns = <60>;
+ cdns,tsd2d-ns = <60>;
+ cdns,tchsh-ns = <60>;
+ cdns,tslch-ns = <60>;
+ cdns,read-delay = <2>;
+ cdns,phy-mode;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "ospi_nand.tiboot3";
+ reg = <0x0 0x80000>;
+ };
+
+ partition@80000 {
+ label = "ospi_nand.tispl";
+ reg = <0x80000 0x200000>;
+ };
+
+ partition@280000 {
+ label = "ospi_nand.u-boot";
+ reg = <0x280000 0x400000>;
+ };
+
+ partition@680000 {
+ label = "ospi_nand.env";
+ reg = <0x680000 0x40000>;
+ };
+
+ partition@6c0000 {
+ label = "ospi_nand.env.backup";
+ reg = <0x6c0000 0x40000>;
+ };
+
+ partition@2000000 {
+ label = "ospi_nand.rootfs";
+ reg = <0x2000000 0x5fc0000>;
+ };
+
+ partition@7fc0000 {
+ label = "ospi_nand.phypattern";
+ reg = <0x7fc0000 0x40000>;
+ };
+ };
+ };
+};
diff --git a/arch/arm/dts/k3-am62-r5-lp-sk.dts b/arch/arm/dts/k3-am62-r5-lp-sk.dts
index b0061a40bea..39ba978b9b2 100644
--- a/arch/arm/dts/k3-am62-r5-lp-sk.dts
+++ b/arch/arm/dts/k3-am62-r5-lp-sk.dts
@@ -11,3 +11,8 @@
#include "k3-am62-lp-sk-u-boot.dtsi"
#include "k3-am62x-r5-sk-common.dtsi"
#include "k3-am62-lp-sk-binman.dtsi"
+
+&ospi0 {
+ reg = <0x00 0x0fc40000 0x00 0x100>,
+ <0x00 0x60000000 0x00 0x08000000>;
+};