This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM62X: ti-processor-sdk-linux-rt-am62xx-evm-08.03.00.19:The GPMC bus is not driven

Part Number: PROCESSOR-SDK-AM62X

Based on TI-processor-SDK-Linux-RT-AM62XX-EVM-08.03.00.19, it was found that the GPMC bus has no driver during development. Add GPMC device driver nodes by referring to the 64X bus driver. There was a problem with the GPMC device initialization.

Device Tree Modification:

diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
index 46bc1adb3f..0bf685e534 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
@@ -910,4 +909,23 @@
                        interrupt-names = "vring";
                };
        };
+
+        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 0x08000000>;
+                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>;
+        };
 };

diff --git a/arch/arm64/boot/dts/ti/k3-am62.dtsi b/arch/arm64/boot/dts/ti/k3-am62.dtsi
index 65497aaa9d..1cb57842ae 100644
--- a/arch/arm64/boot/dts/ti/k3-am62.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62.dtsi
@@ -66,11 +66,13 @@
                         <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 */
                         <0x00 0x78000000 0x00 0x78000000 0x00 0x00008000>, /* DM R5 ATCM */

diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
index e5ca3b609c..33064a4707 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
@@ -811,6 +900,58 @@
        };
 };
 
+&gpmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&gpmc0_pins_default>;
+       ranges = <0 0 0x00 0x51000000 0x01000000>; /* CS0 space. Min partition = 16MB */
+
+       gpmc_device@0,0 {
+               compatible = "cfi-flash";
+               linux,mtd-name= "intel,pf48f6000m0y1be";
+
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               status = "okay";
+
+               reg = <0 0 0x01000000>;
+
+               /* CONFIG 1 */
+               bank-width = <2>;               /* GPMC_CONFIG1_DEVICESIZE(1) 2: 16bits */
+               gpmc,mux-add-data = <2>;        /* GPMC_CONFIG1_MUXTYPE(0) 2: address-data multiplexing mode */
+
+               /* CONFIG 2 */
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <37>;
+               gpmc,cs-wr-off-ns = <37>;
+
+               /* CONFIG 3 */
+               gpmc,adv-on-ns = <3>;
+               gpmc,adv-rd-off-ns = <11>;
+               gpmc,adv-wr-off-ns = <11>;
+
+               /* CONFIG 4 */
+               gpmc,oe-on-ns = <15>;
+               gpmc,oe-off-ns = <37>;
+               gpmc,we-on-ns = <15>;
+               gpmc,we-off-ns = <33>;
+
+               /* CONFIG 5 */
+               gpmc,rd-cycle-ns = <37>;
+               gpmc,wr-cycle-ns = <37>;
+               gpmc,access-ns = <33>;
+               gpmc,page-burst-access-ns = <0>;
+
+               /* CONFIG 6 */
+               gpmc,bus-turnaround-ns = <0>;
+               gpmc,cycle2cycle-delay-ns = <0>;
+               gpmc,wr-data-mux-bus-ns = <15>;
+               gpmc,wr-access-ns = <26>;
+               gpmc,cycle2cycle-samecsen;
+               gpmc,cycle2cycle-diffcsen;
+       };
+};
+
 &mcu_m4fss {
        mboxes = <&mailbox0_cluster0 &mbox_m4_0>;
        memory-region = <&mcu_m4fss_dma_memory_region>,

Log of the startup:

root@am62xx-evm:~# dmesg | grep -rn "gpmc"
201:[    1.471150] omap-gpmc 3b000000.memory-controller: GPMC revision 6.0
202:[    1.471169] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
203:[    1.472389] physmap-flash 51000000.gpmc_device: physmap platform flash device: [mem 0x51000000-0x51ffffff]
204:[    1.472466] physmap-flash 51000000.gpmc_device: map_probe failed

Ti-processor-sdk-linux-rt-am62xx-evm-08.03.00.19, what is the reason why the GPMC bus is not driven?

I want to drive it now, but I have a problem, can you check it for me?