LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add support for GPMC NAND
@ 2023-10-04 11:12 Nitin Yadav
  2023-10-04 11:12 ` [PATCH v2 1/3] arm64: dts: ti: Add GPMC support for AM62x LP SK Nitin Yadav
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nitin Yadav @ 2023-10-04 11:12 UTC (permalink / raw
  To: nm, vigneshr, rogerq
  Cc: kristo, robh+dt, conor+dt, krzysztof.kozlowski+dt,
	catalin.marinas, will, linux-arm-kernel, devicetree, linux-kernel

This series adds support for GPMC NAND on AM62x LP SK
board.

v1: https://lore.kernel.org/all/20230913114711.2937844-1-n-yadav@ti.com/

Change Log:
 - Rearrange device tree properties in recommended sequence.
 - Move status property at last place in the node. 
 - Fix commit message and commit descriptions. 

Nitin Yadav (3):
  arm64: dts: ti: Add GPMC support for AM62x LP SK
  arm64: dts: ti: Add overlay for NAND daughter card
  arm64: defconfig: Enable GPMC NAND support

 arch/arm64/boot/dts/ti/Makefile               |   2 +
 .../arm64/boot/dts/ti/k3-am62-lp-sk-nand.dtso | 119 ++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi      |  29 +++++
 arch/arm64/boot/dts/ti/k3-am62.dtsi           |   2 +
 arch/arm64/configs/defconfig                  |   3 +
 5 files changed, 155 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62-lp-sk-nand.dtso

-- 
2.25.1


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

* [PATCH v2 1/3] arm64: dts: ti: Add GPMC support for AM62x LP SK
  2023-10-04 11:12 [PATCH v2 0/3] Add support for GPMC NAND Nitin Yadav
@ 2023-10-04 11:12 ` Nitin Yadav
  2023-10-04 11:27   ` Roger Quadros
  2023-10-04 12:12   ` Nishanth Menon
  2023-10-04 11:12 ` [PATCH v2 2/3] arm64: dts: ti: Add overlay for NAND daughter card Nitin Yadav
  2023-10-04 11:12 ` [PATCH v2 3/3] arm64: defconfig: Enable GPMC NAND support Nitin Yadav
  2 siblings, 2 replies; 10+ messages in thread
From: Nitin Yadav @ 2023-10-04 11:12 UTC (permalink / raw
  To: nm, vigneshr, rogerq
  Cc: kristo, robh+dt, conor+dt, krzysztof.kozlowski+dt,
	catalin.marinas, will, linux-arm-kernel, devicetree, linux-kernel

Add gpmc0 and elm0 nodes in k3-am62-main. Add GPMC0_CFG and
GPMC0_DATA entry in cbass_main node.

Signed-off-by: Nitin Yadav <n-yadav@ti.com>
---
 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 ac760d9b831d..f854369dfc27 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
@@ -965,4 +965,33 @@ mcasp2: audio-controller@2b20000 {
 		power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
 		status = "disabled";
 	};
+	gpmc0: memory-controller@3b000000 {
+		compatible = "ti,am64-gpmc";
+		reg = <0x00 0x03b000000 0x00 0x400>,
+		      <0x00 0x050000000 0x00 0x8000000>;
+		reg-names = "cfg", "data";
+		interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&k3_clks 80 0>;
+		clock-names = "fck";
+		power-domains = <&k3_pds 80 TI_SCI_PD_EXCLUSIVE>;
+		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,am3352-elm";
+		reg = <0x00 0x25010000 0x00 0x2000>;
+		interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&k3_clks 54 0>;
+		clock-names = "fck";
+		power-domains = <&k3_pds 54 TI_SCI_PD_EXCLUSIVE>;
+		status = "disabled";
+	};
 };
diff --git a/arch/arm64/boot/dts/ti/k3-am62.dtsi b/arch/arm64/boot/dts/ti/k3-am62.dtsi
index f1e15206e1ce..b9b1e522d74c 100644
--- a/arch/arm64/boot/dts/ti/k3-am62.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62.dtsi
@@ -77,6 +77,8 @@ cbass_main: bus@f0000 {
 			 <0x00 0x70000000 0x00 0x70000000 0x00 0x00010000>, /* OCSRAM */
 			 <0x01 0x00000000 0x01 0x00000000 0x00 0x00310000>, /* A53 PERIPHBASE */
 			 <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>, /* FSS0 DAT3 */
+			 <0x00 0x3b000000 0x00 0x3b000000 0x00 0x00000400>, /* GPMC0 CFG */
+			 <0x00 0x50000000 0x00 0x50000000 0x00 0x08000000>, /* GPMC0 DATA */
 
 			 /* MCU Domain Range */
 			 <0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>,
-- 
2.25.1


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

* [PATCH v2 2/3] arm64: dts: ti: Add overlay for NAND daughter card
  2023-10-04 11:12 [PATCH v2 0/3] Add support for GPMC NAND Nitin Yadav
  2023-10-04 11:12 ` [PATCH v2 1/3] arm64: dts: ti: Add GPMC support for AM62x LP SK Nitin Yadav
@ 2023-10-04 11:12 ` Nitin Yadav
  2023-10-04 11:33   ` Roger Quadros
  2023-10-04 11:12 ` [PATCH v2 3/3] arm64: defconfig: Enable GPMC NAND support Nitin Yadav
  2 siblings, 1 reply; 10+ messages in thread
From: Nitin Yadav @ 2023-10-04 11:12 UTC (permalink / raw
  To: nm, vigneshr, rogerq
  Cc: kristo, robh+dt, conor+dt, krzysztof.kozlowski+dt,
	catalin.marinas, will, linux-arm-kernel, devicetree, linux-kernel

Introduce k3-am62-lp-sk-nand.dtso overlay file to support
the X8 NAND EXPANSION BOARD card (PROC143E1) for AM62x LP SK
board. NAND has partitions for different boot components as
below:

0x000000000000-0x000000200000 : "NAND.tiboot3
0x000000200000-0x000000400000 : "NAND.tispl
0x000000400000-0x000000600000 : "NAND.tiboot3.backup
0x000000600000-0x000000a00000 : "NAND.u-boot
0x000000a00000-0x000000a40000 : "NAND.u-boot-env
0x000000a40000-0x000000a80000 : "NAND.u-boot-env.backup
0x000000a80000-0x000040000000 : "NAND.file-system

Disable mcasp1 node in DT to avoid pinmux conflict. Update
Makefile to include k3-am62-lp-sk-nand.dtso.

Signed-off-by: Nitin Yadav <n-yadav@ti.com>
---
 arch/arm64/boot/dts/ti/Makefile               |   2 +
 .../arm64/boot/dts/ti/k3-am62-lp-sk-nand.dtso | 119 ++++++++++++++++++
 2 files changed, 121 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62-lp-sk-nand.dtso

diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
index b3516419f95d..9aea8bdea44f 100644
--- a/arch/arm64/boot/dts/ti/Makefile
+++ b/arch/arm64/boot/dts/ti/Makefile
@@ -19,6 +19,8 @@ dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-dahlia.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-dev.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-yavia.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk.dtb
+k3-am62-lp-sk-nand-dtbs := k3-am62-lp-sk.dtb k3-am62-lp-sk-nand.dtbo
+dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk-nand.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-hdmi-audio.dtbo
 
 # Boards with AM62Ax SoC
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..0f4e26db534b
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am62-lp-sk-nand.dtso
@@ -0,0 +1,119 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2022-2023 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) /* (M25) GPMC0_AD0 */
+			AM62X_IOPAD(0x0040, PIN_INPUT, 0) /* (N23) GPMC0_AD1 */
+			AM62X_IOPAD(0x0044, PIN_INPUT, 0) /* (N24) GPMC0_AD2 */
+			AM62X_IOPAD(0x0048, PIN_INPUT, 0) /* (N25) GPMC0_AD3 */
+			AM62X_IOPAD(0x004c, PIN_INPUT, 0) /* (P24) GPMC0_AD4 */
+			AM62X_IOPAD(0x0050, PIN_INPUT, 0) /* (P22) GPMC0_AD5 */
+			AM62X_IOPAD(0x0054, PIN_INPUT, 0) /* (P21) GPMC0_AD6 */
+			AM62X_IOPAD(0x0058, PIN_INPUT, 0) /* (R23) GPMC0_AD7 */
+			AM62X_IOPAD(0x0084, PIN_OUTPUT, 0) /* (L23) GPMC0_ADVn_ALE */
+			AM62X_IOPAD(0x0088, PIN_OUTPUT, 0) /* (L24) GPMC0_OEn_REn */
+			AM62X_IOPAD(0x008c, PIN_OUTPUT, 0) /* (L25) GPMC0_WEn */
+			AM62X_IOPAD(0x0090, PIN_OUTPUT, 0) /* (M24) GPMC0_BE0n_CLE */
+			AM62X_IOPAD(0x00a8, PIN_OUTPUT, 0) /* (M21) GPMC0_CSn0 */
+			AM62X_IOPAD(0x0098, PIN_INPUT, 0) /* (U23) GPMC0_WAIT0 */
+		>;
+	};
+};
+
+&gpmc0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&gpmc0_pins_default>;
+	ranges = <0 0 0x00 0x51000000 0x01000000>; /* CS0 space. Min partition = 16MB */
+	#address-cells = <2>;
+	#size-cells = <1>;
+
+	nand0_0: 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>;
+			};
+		};
+	};
+};
+
+&elm0{
+	status = "okay";
+};
-- 
2.25.1


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

* [PATCH v2 3/3] arm64: defconfig: Enable GPMC NAND support
  2023-10-04 11:12 [PATCH v2 0/3] Add support for GPMC NAND Nitin Yadav
  2023-10-04 11:12 ` [PATCH v2 1/3] arm64: dts: ti: Add GPMC support for AM62x LP SK Nitin Yadav
  2023-10-04 11:12 ` [PATCH v2 2/3] arm64: dts: ti: Add overlay for NAND daughter card Nitin Yadav
@ 2023-10-04 11:12 ` Nitin Yadav
  2023-10-04 11:26   ` Roger Quadros
  2 siblings, 1 reply; 10+ messages in thread
From: Nitin Yadav @ 2023-10-04 11:12 UTC (permalink / raw
  To: nm, vigneshr, rogerq
  Cc: kristo, robh+dt, conor+dt, krzysztof.kozlowski+dt,
	catalin.marinas, will, linux-arm-kernel, devicetree, linux-kernel

Enable config required to support GPMC NAND on
AM62x LP SK and AM64x SKEVM.

Signed-off-by: Nitin Yadav <n-yadav@ti.com>
---
 arch/arm64/configs/defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 66bfbef73324..a2758ac73f87 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -270,6 +270,8 @@ CONFIG_MTD_DATAFLASH=y
 CONFIG_MTD_SST25L=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MTD_NAND_DENALI_DT=y
+CONFIG_MTD_NAND_OMAP2=m
+CONFIG_MTD_NAND_OMAP_BCH=y
 CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_NAND_BRCMNAND=m
 CONFIG_MTD_NAND_FSL_IFC=y
@@ -1357,6 +1359,7 @@ CONFIG_ARM_MEDIATEK_CCI_DEVFREQ=m
 CONFIG_EXTCON_PTN5150=m
 CONFIG_EXTCON_USB_GPIO=y
 CONFIG_EXTCON_USBC_CROS_EC=y
+CONFIG_OMAP_GPMC=m
 CONFIG_RENESAS_RPCIF=m
 CONFIG_IIO=y
 CONFIG_EXYNOS_ADC=y
-- 
2.25.1


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

* Re: [PATCH v2 3/3] arm64: defconfig: Enable GPMC NAND support
  2023-10-04 11:12 ` [PATCH v2 3/3] arm64: defconfig: Enable GPMC NAND support Nitin Yadav
@ 2023-10-04 11:26   ` Roger Quadros
  2023-10-04 12:06     ` Nishanth Menon
  0 siblings, 1 reply; 10+ messages in thread
From: Roger Quadros @ 2023-10-04 11:26 UTC (permalink / raw
  To: Nitin Yadav, nm, vigneshr
  Cc: kristo, robh+dt, conor+dt, krzysztof.kozlowski+dt,
	catalin.marinas, will, linux-arm-kernel, devicetree, linux-kernel



On 4.10.2023 14.12, Nitin Yadav wrote:
> Enable config required to support GPMC NAND on
> AM62x LP SK and AM64x SKEVM.
> 
> Signed-off-by: Nitin Yadav <n-yadav@ti.com>
> ---
>   arch/arm64/configs/defconfig | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index 66bfbef73324..a2758ac73f87 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -270,6 +270,8 @@ CONFIG_MTD_DATAFLASH=y
>   CONFIG_MTD_SST25L=y
>   CONFIG_MTD_RAW_NAND=y
>   CONFIG_MTD_NAND_DENALI_DT=y
> +CONFIG_MTD_NAND_OMAP2=m

If rootfs is required on NAND, it is better to be built-in.

> +CONFIG_MTD_NAND_OMAP_BCH=y
>   CONFIG_MTD_NAND_MARVELL=y
>   CONFIG_MTD_NAND_BRCMNAND=m
>   CONFIG_MTD_NAND_FSL_IFC=y
> @@ -1357,6 +1359,7 @@ CONFIG_ARM_MEDIATEK_CCI_DEVFREQ=m
>   CONFIG_EXTCON_PTN5150=m
>   CONFIG_EXTCON_USB_GPIO=y
>   CONFIG_EXTCON_USBC_CROS_EC=y
> +CONFIG_OMAP_GPMC=m

This is a memory controller so better to be built-in.

>   CONFIG_RENESAS_RPCIF=m
>   CONFIG_IIO=y
>   CONFIG_EXYNOS_ADC=y

-- 
cheers,
-roger

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

* Re: [PATCH v2 1/3] arm64: dts: ti: Add GPMC support for AM62x LP SK
  2023-10-04 11:12 ` [PATCH v2 1/3] arm64: dts: ti: Add GPMC support for AM62x LP SK Nitin Yadav
@ 2023-10-04 11:27   ` Roger Quadros
  2023-10-04 12:07     ` Nishanth Menon
  2023-10-04 12:12   ` Nishanth Menon
  1 sibling, 1 reply; 10+ messages in thread
From: Roger Quadros @ 2023-10-04 11:27 UTC (permalink / raw
  To: Nitin Yadav, nm, vigneshr
  Cc: kristo, robh+dt, conor+dt, krzysztof.kozlowski+dt,
	catalin.marinas, will, linux-arm-kernel, devicetree, linux-kernel



On 4.10.2023 14.12, Nitin Yadav wrote:
> Add gpmc0 and elm0 nodes in k3-am62-main. Add GPMC0_CFG and
> GPMC0_DATA entry in cbass_main node.
> 
> Signed-off-by: Nitin Yadav <n-yadav@ti.com>
> ---
>   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 ac760d9b831d..f854369dfc27 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
> @@ -965,4 +965,33 @@ mcasp2: audio-controller@2b20000 {
>   		power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
>   		status = "disabled";
>   	};

Please add blank line here.

> +	gpmc0: memory-controller@3b000000 {
> +		compatible = "ti,am64-gpmc";
> +		reg = <0x00 0x03b000000 0x00 0x400>,
> +		      <0x00 0x050000000 0x00 0x8000000>;
> +		reg-names = "cfg", "data";
> +		interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&k3_clks 80 0>;
> +		clock-names = "fck";
> +		power-domains = <&k3_pds 80 TI_SCI_PD_EXCLUSIVE>;
> +		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,am3352-elm";
> +		reg = <0x00 0x25010000 0x00 0x2000>;
> +		interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&k3_clks 54 0>;
> +		clock-names = "fck";
> +		power-domains = <&k3_pds 54 TI_SCI_PD_EXCLUSIVE>;
> +		status = "disabled";
> +	};
>   };
> diff --git a/arch/arm64/boot/dts/ti/k3-am62.dtsi b/arch/arm64/boot/dts/ti/k3-am62.dtsi
> index f1e15206e1ce..b9b1e522d74c 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62.dtsi
> @@ -77,6 +77,8 @@ cbass_main: bus@f0000 {
>   			 <0x00 0x70000000 0x00 0x70000000 0x00 0x00010000>, /* OCSRAM */
>   			 <0x01 0x00000000 0x01 0x00000000 0x00 0x00310000>, /* A53 PERIPHBASE */
>   			 <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>, /* FSS0 DAT3 */
> +			 <0x00 0x3b000000 0x00 0x3b000000 0x00 0x00000400>, /* GPMC0 CFG */
> +			 <0x00 0x50000000 0x00 0x50000000 0x00 0x08000000>, /* GPMC0 DATA */
>   
>   			 /* MCU Domain Range */
>   			 <0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>,

-- 
cheers,
-roger

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

* Re: [PATCH v2 2/3] arm64: dts: ti: Add overlay for NAND daughter card
  2023-10-04 11:12 ` [PATCH v2 2/3] arm64: dts: ti: Add overlay for NAND daughter card Nitin Yadav
@ 2023-10-04 11:33   ` Roger Quadros
  0 siblings, 0 replies; 10+ messages in thread
From: Roger Quadros @ 2023-10-04 11:33 UTC (permalink / raw
  To: Nitin Yadav, nm, vigneshr
  Cc: kristo, robh+dt, conor+dt, krzysztof.kozlowski+dt,
	catalin.marinas, will, linux-arm-kernel, devicetree, linux-kernel



On 4.10.2023 14.12, Nitin Yadav wrote:
> Introduce k3-am62-lp-sk-nand.dtso overlay file to support
> the X8 NAND EXPANSION BOARD card (PROC143E1) for AM62x LP SK
> board. NAND has partitions for different boot components as
> below:
> 
> 0x000000000000-0x000000200000 : "NAND.tiboot3
> 0x000000200000-0x000000400000 : "NAND.tispl
> 0x000000400000-0x000000600000 : "NAND.tiboot3.backup
> 0x000000600000-0x000000a00000 : "NAND.u-boot
> 0x000000a00000-0x000000a40000 : "NAND.u-boot-env
> 0x000000a40000-0x000000a80000 : "NAND.u-boot-env.backup
> 0x000000a80000-0x000040000000 : "NAND.file-system
> 
> Disable mcasp1 node in DT to avoid pinmux conflict. Update
> Makefile to include k3-am62-lp-sk-nand.dtso.
> 
> Signed-off-by: Nitin Yadav <n-yadav@ti.com>

Reviewed-by: Roger Quadros <rogerq@kernel.org>

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

* Re: [PATCH v2 3/3] arm64: defconfig: Enable GPMC NAND support
  2023-10-04 11:26   ` Roger Quadros
@ 2023-10-04 12:06     ` Nishanth Menon
  0 siblings, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2023-10-04 12:06 UTC (permalink / raw
  To: Roger Quadros
  Cc: Nitin Yadav, vigneshr, kristo, robh+dt, conor+dt,
	krzysztof.kozlowski+dt, catalin.marinas, will, linux-arm-kernel,
	devicetree, linux-kernel

On 14:26-20231004, Roger Quadros wrote:
> 
> 
> On 4.10.2023 14.12, Nitin Yadav wrote:
> > Enable config required to support GPMC NAND on
> > AM62x LP SK and AM64x SKEVM.
> > 
> > Signed-off-by: Nitin Yadav <n-yadav@ti.com>
> > ---
> >   arch/arm64/configs/defconfig | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > index 66bfbef73324..a2758ac73f87 100644
> > --- a/arch/arm64/configs/defconfig
> > +++ b/arch/arm64/configs/defconfig
> > @@ -270,6 +270,8 @@ CONFIG_MTD_DATAFLASH=y
> >   CONFIG_MTD_SST25L=y
> >   CONFIG_MTD_RAW_NAND=y
> >   CONFIG_MTD_NAND_DENALI_DT=y
> > +CONFIG_MTD_NAND_OMAP2=m
> 
> If rootfs is required on NAND, it is better to be built-in.
> 
> > +CONFIG_MTD_NAND_OMAP_BCH=y
> >   CONFIG_MTD_NAND_MARVELL=y
> >   CONFIG_MTD_NAND_BRCMNAND=m
> >   CONFIG_MTD_NAND_FSL_IFC=y
> > @@ -1357,6 +1359,7 @@ CONFIG_ARM_MEDIATEK_CCI_DEVFREQ=m
> >   CONFIG_EXTCON_PTN5150=m
> >   CONFIG_EXTCON_USB_GPIO=y
> >   CONFIG_EXTCON_USBC_CROS_EC=y
> > +CONFIG_OMAP_GPMC=m
> 
> This is a memory controller so better to be built-in.
> 
> >   CONFIG_RENESAS_RPCIF=m
> >   CONFIG_IIO=y
> >   CONFIG_EXYNOS_ADC=y

For the boards mentioned, NAND is optional and not a primary rootfs
storage media - I'd rather leave it as "m" and not impact the size of
generic Image file.

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

* Re: [PATCH v2 1/3] arm64: dts: ti: Add GPMC support for AM62x LP SK
  2023-10-04 11:27   ` Roger Quadros
@ 2023-10-04 12:07     ` Nishanth Menon
  0 siblings, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2023-10-04 12:07 UTC (permalink / raw
  To: Roger Quadros
  Cc: Nitin Yadav, vigneshr, kristo, robh+dt, conor+dt,
	krzysztof.kozlowski+dt, catalin.marinas, will, linux-arm-kernel,
	devicetree, linux-kernel

On 14:27-20231004, Roger Quadros wrote:
> 
> 
> On 4.10.2023 14.12, Nitin Yadav wrote:
> > Add gpmc0 and elm0 nodes in k3-am62-main. Add GPMC0_CFG and
> > GPMC0_DATA entry in cbass_main node.
> > 
> > Signed-off-by: Nitin Yadav <n-yadav@ti.com>
> > ---
> >   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 ac760d9b831d..f854369dfc27 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
> > +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
> > @@ -965,4 +965,33 @@ mcasp2: audio-controller@2b20000 {
> >   		power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
> >   		status = "disabled";
> >   	};
> 
> Please add blank line here.
> 
> > +	gpmc0: memory-controller@3b000000 {
> > +		compatible = "ti,am64-gpmc";
> > +		reg = <0x00 0x03b000000 0x00 0x400>,
> > +		      <0x00 0x050000000 0x00 0x8000000>;
> > +		reg-names = "cfg", "data";
> > +		interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
> > +		clocks = <&k3_clks 80 0>;
> > +		clock-names = "fck";
> > +		power-domains = <&k3_pds 80 TI_SCI_PD_EXCLUSIVE>;
> > +		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";

Document why disabled by default.

> > +	};
> > +
> > +	elm0: ecc@25010000 {
> > +		compatible = "ti,am3352-elm";
> > +		reg = <0x00 0x25010000 0x00 0x2000>;
> > +		interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
> > +		clocks = <&k3_clks 54 0>;
> > +		clock-names = "fck";
> > +		power-domains = <&k3_pds 54 TI_SCI_PD_EXCLUSIVE>;
> > +		status = "disabled";

Document why disabled by default.

> > +	};
> >   };
> > diff --git a/arch/arm64/boot/dts/ti/k3-am62.dtsi b/arch/arm64/boot/dts/ti/k3-am62.dtsi
> > index f1e15206e1ce..b9b1e522d74c 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am62.dtsi
> > +++ b/arch/arm64/boot/dts/ti/k3-am62.dtsi
> > @@ -77,6 +77,8 @@ cbass_main: bus@f0000 {
> >   			 <0x00 0x70000000 0x00 0x70000000 0x00 0x00010000>, /* OCSRAM */
> >   			 <0x01 0x00000000 0x01 0x00000000 0x00 0x00310000>, /* A53 PERIPHBASE */
> >   			 <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>, /* FSS0 DAT3 */
> > +			 <0x00 0x3b000000 0x00 0x3b000000 0x00 0x00000400>, /* GPMC0 CFG */
> > +			 <0x00 0x50000000 0x00 0x50000000 0x00 0x08000000>, /* GPMC0 DATA */
> >   			 /* MCU Domain Range */
> >   			 <0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>,
> 
> -- 
> cheers,
> -roger

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

* Re: [PATCH v2 1/3] arm64: dts: ti: Add GPMC support for AM62x LP SK
  2023-10-04 11:12 ` [PATCH v2 1/3] arm64: dts: ti: Add GPMC support for AM62x LP SK Nitin Yadav
  2023-10-04 11:27   ` Roger Quadros
@ 2023-10-04 12:12   ` Nishanth Menon
  1 sibling, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2023-10-04 12:12 UTC (permalink / raw
  To: Nitin Yadav
  Cc: vigneshr, rogerq, kristo, robh+dt, conor+dt,
	krzysztof.kozlowski+dt, catalin.marinas, will, linux-arm-kernel,
	devicetree, linux-kernel

On 16:42-20231004, Nitin Yadav wrote:
> Add gpmc0 and elm0 nodes in k3-am62-main. Add GPMC0_CFG and

s/gpmc0/GPMC and elm0/ELM
Also a oneliner as to what GPMC and ELM are will be helpful.

> GPMC0_DATA entry in cbass_main node.
> 
> Signed-off-by: Nitin Yadav <n-yadav@ti.com>
> ---
>  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 ac760d9b831d..f854369dfc27 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
> @@ -965,4 +965,33 @@ mcasp2: audio-controller@2b20000 {
>  		power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
>  		status = "disabled";
>  	};
> +	gpmc0: memory-controller@3b000000 {
> +		compatible = "ti,am64-gpmc";
> +		reg = <0x00 0x03b000000 0x00 0x400>,
> +		      <0x00 0x050000000 0x00 0x8000000>;
> +		reg-names = "cfg", "data";
> +		interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&k3_clks 80 0>;
> +		clock-names = "fck";
> +		power-domains = <&k3_pds 80 TI_SCI_PD_EXCLUSIVE>;
> +		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";

As mentioned - document why disabled by default.

> +	};
> +
> +	elm0: ecc@25010000 {
> +		compatible = "ti,am3352-elm";
> +		reg = <0x00 0x25010000 0x00 0x2000>;
> +		interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&k3_clks 54 0>;
> +		clock-names = "fck";
> +		power-domains = <&k3_pds 54 TI_SCI_PD_EXCLUSIVE>;
> +		status = "disabled";

As mentioned - document why disabled by default.
> +	};
>  };
> diff --git a/arch/arm64/boot/dts/ti/k3-am62.dtsi b/arch/arm64/boot/dts/ti/k3-am62.dtsi
> index f1e15206e1ce..b9b1e522d74c 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62.dtsi
> @@ -77,6 +77,8 @@ cbass_main: bus@f0000 {
>  			 <0x00 0x70000000 0x00 0x70000000 0x00 0x00010000>, /* OCSRAM */
>  			 <0x01 0x00000000 0x01 0x00000000 0x00 0x00310000>, /* A53 PERIPHBASE */
>  			 <0x05 0x00000000 0x05 0x00000000 0x01 0x00000000>, /* FSS0 DAT3 */
> +			 <0x00 0x3b000000 0x00 0x3b000000 0x00 0x00000400>, /* GPMC0 CFG */
> +			 <0x00 0x50000000 0x00 0x50000000 0x00 0x08000000>, /* GPMC0 DATA */

Why not keep it sorted?
>  
>  			 /* MCU Domain Range */
>  			 <0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>,
> -- 
> 2.25.1
> 

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

end of thread, other threads:[~2023-10-04 12:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-04 11:12 [PATCH v2 0/3] Add support for GPMC NAND Nitin Yadav
2023-10-04 11:12 ` [PATCH v2 1/3] arm64: dts: ti: Add GPMC support for AM62x LP SK Nitin Yadav
2023-10-04 11:27   ` Roger Quadros
2023-10-04 12:07     ` Nishanth Menon
2023-10-04 12:12   ` Nishanth Menon
2023-10-04 11:12 ` [PATCH v2 2/3] arm64: dts: ti: Add overlay for NAND daughter card Nitin Yadav
2023-10-04 11:33   ` Roger Quadros
2023-10-04 11:12 ` [PATCH v2 3/3] arm64: defconfig: Enable GPMC NAND support Nitin Yadav
2023-10-04 11:26   ` Roger Quadros
2023-10-04 12:06     ` Nishanth Menon

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 read-only IMAP folder(s) and NNTP newsgroup(s).