linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm: dts: ti: k3-am62-lp-sk: Add NAND controller and overlay
@ 2024-06-22 11:59 Roger Quadros
  2024-06-22 11:59 ` [PATCH 1/2] arm: dts: ti: k3-am62: Add GPMC and ELM nodes Roger Quadros
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Roger Quadros @ 2024-06-22 11:59 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: srk, praneeth, linux-arm-kernel, devicetree, linux-kernel,
	Roger Quadros, Nitin Yadav

Hi,

This series adds GPMC and ELM controller nodes to AM62 SoC.
It also adds NAND overlay file for AM62-LP-SK EVM.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
Nitin Yadav (1):
      arm: dts: ti: k3-am62: Add GPMC and ELM nodes

Roger Quadros (1):
      arm64: dts: ti: am62-lp-sk: Add overlay for NAND expansion card

 arch/arm64/boot/dts/ti/Makefile                |   1 +
 arch/arm64/boot/dts/ti/k3-am62-lp-sk-nand.dtso | 116 +++++++++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts       |   4 +
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi       |  29 +++++++
 arch/arm64/boot/dts/ti/k3-am62.dtsi            |   2 +
 5 files changed, 152 insertions(+)
---
base-commit: 4031a2866a9f0f5c585cfee65b3fb5ab17c95276
change-id: 20240622-am62lp-sk-nand-e6d5098f616b

Best regards,
-- 
Roger Quadros <rogerq@kernel.org>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] arm: dts: ti: k3-am62: Add GPMC and ELM nodes
  2024-06-22 11:59 [PATCH 0/2] arm: dts: ti: k3-am62-lp-sk: Add NAND controller and overlay Roger Quadros
@ 2024-06-22 11:59 ` Roger Quadros
  2024-06-22 11:59 ` [PATCH 2/2] arm64: dts: ti: am62-lp-sk: Add overlay for NAND expansion card Roger Quadros
  2024-07-03  4:41 ` [PATCH 0/2] arm: dts: ti: k3-am62-lp-sk: Add NAND controller and overlay Vignesh Raghavendra
  2 siblings, 0 replies; 4+ messages in thread
From: Roger Quadros @ 2024-06-22 11:59 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: srk, praneeth, linux-arm-kernel, devicetree, linux-kernel,
	Roger Quadros, Nitin Yadav

From: Nitin Yadav <n-yadav@ti.com>

Add GPMC and ELM device tree nodes for AM62 SoC family.

Signed-off-by: Nitin Yadav <n-yadav@ti.com>
Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 29 +++++++++++++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62.dtsi      |  2 ++
 2 files changed, 31 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
index 00776a9987c1..e7e7cdc24e3d 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
@@ -1053,4 +1053,33 @@ dphy0: phy@30110000 {
 		status = "disabled";
 	};
 
+	gpmc0: memory-controller@3b000000 {
+		compatible = "ti,am64-gpmc";
+		power-domains = <&k3_pds 80 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 80 0>;
+		clock-names = "fck";
+		reg = <0x00 0x03b000000 0x00 0x400>,
+		      <0x00 0x050000000 0x00 0x8000000>;
+		reg-names = "cfg", "data";
+		interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+		gpmc,num-cs = <3>;
+		gpmc,num-waitpins = <2>;
+		#address-cells = <2>;
+		#size-cells = <1>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		status = "disabled";
+	};
+
+	elm0: ecc@25010000 {
+		compatible = "ti,am64-elm";
+		reg = <0x00 0x25010000 0x00 0x2000>;
+		interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 54 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 54 0>;
+		clock-names = "fck";
+		status = "disabled";
+	};
 };
diff --git a/arch/arm64/boot/dts/ti/k3-am62.dtsi b/arch/arm64/boot/dts/ti/k3-am62.dtsi
index f0781f2bea29..bfb55ca11323 100644
--- a/arch/arm64/boot/dts/ti/k3-am62.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62.dtsi
@@ -68,11 +68,13 @@ cbass_main: bus@f0000 {
 			 <0x00 0x30200000 0x00 0x30200000 0x00 0x00010000>, /* DSS */
 			 <0x00 0x31000000 0x00 0x31000000 0x00 0x00050000>, /* USB0 DWC3 Core window */
 			 <0x00 0x31100000 0x00 0x31100000 0x00 0x00050000>, /* USB1 DWC3 Core window */
+			 <0x00 0x3b000000 0x00 0x3b000000 0x00 0x00000400>, /* GPMC0_CFG */
 			 <0x00 0x40900000 0x00 0x40900000 0x00 0x00030000>, /* SA3UL */
 			 <0x00 0x43600000 0x00 0x43600000 0x00 0x00010000>, /* SA3 sproxy data */
 			 <0x00 0x44043000 0x00 0x44043000 0x00 0x00000fe0>, /* TI SCI DEBUG */
 			 <0x00 0x44860000 0x00 0x44860000 0x00 0x00040000>, /* SA3 sproxy config */
 			 <0x00 0x48000000 0x00 0x48000000 0x00 0x06400000>, /* DMSS */
+			 <0x00 0x50000000 0x00 0x50000000 0x00 0x08000000>, /* GPMC0 DATA */
 			 <0x00 0x60000000 0x00 0x60000000 0x00 0x08000000>, /* FSS0 DAT1 */
 			 <0x00 0x70000000 0x00 0x70000000 0x00 0x00010000>, /* OCSRAM */
 			 <0x01 0x00000000 0x01 0x00000000 0x00 0x00310000>, /* A53 PERIPHBASE */

-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] arm64: dts: ti: am62-lp-sk: Add overlay for NAND expansion card
  2024-06-22 11:59 [PATCH 0/2] arm: dts: ti: k3-am62-lp-sk: Add NAND controller and overlay Roger Quadros
  2024-06-22 11:59 ` [PATCH 1/2] arm: dts: ti: k3-am62: Add GPMC and ELM nodes Roger Quadros
@ 2024-06-22 11:59 ` Roger Quadros
  2024-07-03  4:41 ` [PATCH 0/2] arm: dts: ti: k3-am62-lp-sk: Add NAND controller and overlay Vignesh Raghavendra
  2 siblings, 0 replies; 4+ messages in thread
From: Roger Quadros @ 2024-06-22 11:59 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: srk, praneeth, linux-arm-kernel, devicetree, linux-kernel,
	Roger Quadros

The NAND expansion card (PROC143E1) connects over the User/MCU/PRU
Expansion port on the am62-lp-sk EVM.

The following pins are shared between McASP1 and GPMC-NAND so
both cannot work simultaneously.

Pin name	McASP1 function		GPMC function
========	===============		=============
J17		MCASP1_AXR0		GPMC0_WEN
P21		MCASP1_AFSX		GPMC0_WAIT0
K17		MCASP1_ACLKX		GPMC0_BE0N_CLE
K20		MCASP1_AXR2		GPMC0_ADVN_ALE

The factory default sets the pins for McASP1 use. (i.e.
Resistor Array RA1 installed, RA4 not installed).

For NAND use, RA1 has to be removed and RA4 must be
installed.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 arch/arm64/boot/dts/ti/Makefile                |   1 +
 arch/arm64/boot/dts/ti/k3-am62-lp-sk-nand.dtso | 116 +++++++++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts       |   4 +
 3 files changed, 121 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
index 1e6fcd1ff7ba..7fcbf14ae439 100644
--- a/arch/arm64/boot/dts/ti/Makefile
+++ b/arch/arm64/boot/dts/ti/Makefile
@@ -25,6 +25,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-yavia.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am625-phyboard-lyra-1-4-ghz-opp.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am62x-phyboard-lyra-gpio-fan.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk-nand.dtbo
 
 # Boards with AM62Ax SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am62a7-sk.dtb
diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk-nand.dtso b/arch/arm64/boot/dts/ti/k3-am62-lp-sk-nand.dtso
new file mode 100644
index 000000000000..173ac60723b6
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk-nand.dtso
@@ -0,0 +1,116 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022-2024 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include "k3-pinctrl.h"
+
+&mcasp1 {
+	status = "disabled";
+};
+
+&main_pmx0 {
+	gpmc0_pins_default: gpmc0-pins-default {
+		pinctrl-single,pins = <
+			AM62X_IOPAD(0x003c, PIN_INPUT, 0) /* (K19) GPMC0_AD0 */
+			AM62X_IOPAD(0x0040, PIN_INPUT, 0) /* (L19) GPMC0_AD1 */
+			AM62X_IOPAD(0x0044, PIN_INPUT, 0) /* (L20) GPMC0_AD2 */
+			AM62X_IOPAD(0x0048, PIN_INPUT, 0) /* (L21) GPMC0_AD3 */
+			AM62X_IOPAD(0x004c, PIN_INPUT, 0) /* (M21) GPMC0_AD4 */
+			AM62X_IOPAD(0x0050, PIN_INPUT, 0) /* (L17) GPMC0_AD5 */
+			AM62X_IOPAD(0x0054, PIN_INPUT, 0) /* (L18) GPMC0_AD6 */
+			AM62X_IOPAD(0x0058, PIN_INPUT, 0) /* (M20) GPMC0_AD7 */
+			AM62X_IOPAD(0x0098, PIN_INPUT, 0) /* (P21) GPMC0_WAIT0 */
+			AM62X_IOPAD(0x00a8, PIN_OUTPUT, 0) /* (J18) GPMC0_CSn0 */
+			AM62X_IOPAD(0x0084, PIN_OUTPUT, 0) /* (K20) GPMC0_ADVn_ALE */
+			AM62X_IOPAD(0x0088, PIN_OUTPUT, 0) /* (K21) GPMC0_OEn_REn */
+			AM62X_IOPAD(0x008c, PIN_OUTPUT, 0) /* (J17) GPMC0_WEn */
+			AM62X_IOPAD(0x0090, PIN_OUTPUT, 0) /* (K17) GPMC0_BE0n_CLE */
+			AM62X_IOPAD(0x00a0, PIN_OUTPUT, 0) /* (J20) GPMC0_WPn */
+		>;
+	};
+};
+
+&elm0 {
+	status = "okay";
+};
+
+&gpmc0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&gpmc0_pins_default>;
+	#address-cells = <2>;
+	#size-cells = <1>;
+
+	nand@0,0 {
+		compatible = "ti,am64-nand";
+		reg = <0 0 64>;		/* device IO registers */
+		interrupt-parent = <&gpmc0>;
+		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
+			     <1 IRQ_TYPE_NONE>;	/* termcount */
+		rb-gpios = <&gpmc0 0 GPIO_ACTIVE_HIGH>;	/* gpmc_wait0 */
+		ti,nand-xfer-type = "prefetch-polled";
+		ti,nand-ecc-opt = "bch8";	/* BCH8: Bootrom limitation */
+		ti,elm-id = <&elm0>;
+		nand-bus-width = <8>;
+		gpmc,device-width = <1>;
+		gpmc,sync-clk-ps = <0>;
+		gpmc,cs-on-ns = <0>;
+		gpmc,cs-rd-off-ns = <40>;
+		gpmc,cs-wr-off-ns = <40>;
+		gpmc,adv-on-ns = <0>;
+		gpmc,adv-rd-off-ns = <25>;
+		gpmc,adv-wr-off-ns = <25>;
+		gpmc,we-on-ns = <0>;
+		gpmc,we-off-ns = <20>;
+		gpmc,oe-on-ns = <3>;
+		gpmc,oe-off-ns = <30>;
+		gpmc,access-ns = <30>;
+		gpmc,rd-cycle-ns = <40>;
+		gpmc,wr-cycle-ns = <40>;
+		gpmc,bus-turnaround-ns = <0>;
+		gpmc,cycle2cycle-delay-ns = <0>;
+		gpmc,clk-activation-ns = <0>;
+		gpmc,wr-access-ns = <40>;
+		gpmc,wr-data-mux-bus-ns = <0>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "NAND.tiboot3";
+				reg = <0x00000000 0x00200000>;	/* 2M */
+			};
+			partition@200000 {
+				label = "NAND.tispl";
+				reg = <0x00200000 0x00200000>;	/* 2M */
+			};
+			partition@400000 {
+				label = "NAND.tiboot3.backup";	/* 2M */
+				reg = <0x00400000 0x00200000>;	/* BootROM looks at 4M */
+			};
+			partition@600000 {
+				label = "NAND.u-boot";
+				reg = <0x00600000 0x00400000>;	/* 4M */
+			};
+			partition@a00000 {
+				label = "NAND.u-boot-env";
+				reg = <0x00a00000 0x00040000>;	/* 256K */
+			};
+			partition@a40000 {
+				label = "NAND.u-boot-env.backup";
+				reg = <0x00a40000 0x00040000>;	/* 256K */
+			};
+			partition@a80000 {
+				label = "NAND.file-system";
+				reg = <0x00a80000 0x3f580000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
index 9a17bd3e59c9..8e9fc00a6b3c 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts
@@ -228,3 +228,7 @@ ldo4_reg: ldo4 {
 &tlv320aic3106 {
 	DVDD-supply = <&buck2_reg>;
 };
+
+&gpmc0 {
+	ranges = <0 0 0x00 0x51000000 0x01000000>; /* CS0 space. Min partition = 16MB */
+};

-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] arm: dts: ti: k3-am62-lp-sk: Add NAND controller and overlay
  2024-06-22 11:59 [PATCH 0/2] arm: dts: ti: k3-am62-lp-sk: Add NAND controller and overlay Roger Quadros
  2024-06-22 11:59 ` [PATCH 1/2] arm: dts: ti: k3-am62: Add GPMC and ELM nodes Roger Quadros
  2024-06-22 11:59 ` [PATCH 2/2] arm64: dts: ti: am62-lp-sk: Add overlay for NAND expansion card Roger Quadros
@ 2024-07-03  4:41 ` Vignesh Raghavendra
  2 siblings, 0 replies; 4+ messages in thread
From: Vignesh Raghavendra @ 2024-07-03  4:41 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Roger Quadros
  Cc: Vignesh Raghavendra, srk, praneeth, linux-arm-kernel, devicetree,
	linux-kernel, Nitin Yadav

Hi Roger Quadros,

On Sat, 22 Jun 2024 14:59:55 +0300, Roger Quadros wrote:
> This series adds GPMC and ELM controller nodes to AM62 SoC.
> It also adds NAND overlay file for AM62-LP-SK EVM.
> 
> 

I have applied the following to branch ti-k3-dts-next on [1].
Thank you!

[1/2] arm: dts: ti: k3-am62: Add GPMC and ELM nodes
      commit: a0286c7bf091ac6bf542a00a305b3ae510242127
[2/2] arm64: dts: ti: am62-lp-sk: Add overlay for NAND expansion card
      commit: e569152274fec9ffdd3cf40d865d2b21ce46f75b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-03  4:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-22 11:59 [PATCH 0/2] arm: dts: ti: k3-am62-lp-sk: Add NAND controller and overlay Roger Quadros
2024-06-22 11:59 ` [PATCH 1/2] arm: dts: ti: k3-am62: Add GPMC and ELM nodes Roger Quadros
2024-06-22 11:59 ` [PATCH 2/2] arm64: dts: ti: am62-lp-sk: Add overlay for NAND expansion card Roger Quadros
2024-07-03  4:41 ` [PATCH 0/2] arm: dts: ti: k3-am62-lp-sk: Add NAND controller and overlay Vignesh Raghavendra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).