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.

AM3358: AM3358: linux gpmc nor flash

Part Number: AM3358

hi:

    I am trying to use use 335x GPMC to access nor flashprintf: physmap-flash physmap-flash.0: can't request region for resource [mem 0x10000000-0x13ffffff]。What is the error

   Thanks,

    root@am335x-evm:~# insmod physmap.ko
[ 44.858386] physmap-flash 10000000.nor: physmap platform flash device: [mem 0x10000000-0x13ffffff]
[ 44.868065] 10000000.nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x002201
[ 44.879102] Amd/Fujitsu Extended Query Table at 0x0040
[ 44.884894] Amd/Fujitsu Extended Query version 1.5.
[ 44.890551] number of CFI chips: 1
[ 44.899719] 2 fixed-partitions partitions found on MTD device 10000000.nor
[ 44.906866] Creating 2 MTD partitions on "10000000.nor":
[ 44.912217] 0x000000000000-0x0000000c0000 : "boot"
[ 44.926634] 0x0000000c0000-0x0000000e0000 : "env1"
[ 44.946516] physmap-flash physmap-flash.0: can't request region for resource [mem 0x10000000-0x13ffffff]
[ 44.956321] physmap-flash: probe of physmap-flash.0 failed with error -16

Linux Kernel Device tree:

&gpmc {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&gpmc_pins>;
ranges = <0 0 0x08000000 0x1000000>,
<1 0 0x10000000 0x4000000>; /* CS0: 16MB for NAND , CS1: NOR 64M */
nand@0,0 {
compatible = "ti,omap2-nand";
reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
interrupt-parent = <&gpmc>;
interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
<1 IRQ_TYPE_NONE>; /* termcount */
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
ti,nand-xfer-type = "prefetch-dma";
ti,nand-ecc-opt = "bch8";
ti,elm-id = <&elm>;
nand-bus-width = <8>;
gpmc,device-width = <1>;
gpmc,sync-clk-ps = <0>;
gpmc,cs-on-ns = <0>;
gpmc,cs-rd-off-ns = <44>;
gpmc,cs-wr-off-ns = <44>;
gpmc,adv-on-ns = <6>;
gpmc,adv-rd-off-ns = <34>;
gpmc,adv-wr-off-ns = <44>;
gpmc,we-on-ns = <0>;
gpmc,we-off-ns = <40>;
gpmc,oe-on-ns = <0>;
gpmc,oe-off-ns = <54>;
gpmc,access-ns = <64>;
gpmc,rd-cycle-ns = <82>;
gpmc,wr-cycle-ns = <82>;
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>;
/* MTD partition table */
/* All SPL-* partitions are sized to minimal length
* which can be independently programmable. For
* NAND flash this is equal to size of erase-block */
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "NAND.SPL";
reg = <0x00000000 0x000020000>;
};
partition@1 {
label = "NAND.SPL.backup1";
reg = <0x00020000 0x00020000>;
};
partition@2 {
label = "NAND.SPL.backup2";
reg = <0x00040000 0x00020000>;
};
partition@3 {
label = "NAND.SPL.backup3";
reg = <0x00060000 0x00020000>;
};
partition@4 {
label = "NAND.u-boot-spl-os";
reg = <0x00080000 0x00040000>;
};
partition@5 {
label = "NAND.u-boot";
reg = <0x000C0000 0x00100000>;
};
partition@6 {
label = "NAND.u-boot-env";
reg = <0x001C0000 0x00020000>;
};
partition@7 {
label = "NAND.u-boot-env.backup1";
reg = <0x001E0000 0x00020000>;
};
partition@8 {
label = "NAND.kernel";
reg = <0x00200000 0x00800000>;
};
partition@9 {
label = "NAND.file-system";
reg = <0x00A00000 0x0F600000>;
};
};

nor@1,0 {
reg = <1 0 0x04000000>;
compatible = "cfi-flash";
//linux,mtd-name = "spansion,s29gl010p11t";
bank-width = <2>;
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
//gpmc,mux-add-data = <2>;

gpmc,sync-clk-ps = <0>;
gpmc,cs-on-ns = <0>;
gpmc,cs-rd-off-ns = <160>;
gpmc,cs-wr-off-ns = <160>;
gpmc,adv-on-ns = <10>;
gpmc,adv-rd-off-ns = <30>;
gpmc,adv-wr-off-ns = <30>;
gpmc,oe-on-ns = <40>;
gpmc,oe-off-ns = <160>;
gpmc,we-on-ns = <40>;
gpmc,we-off-ns = <160>;
gpmc,rd-cycle-ns = <160>;
gpmc,wr-cycle-ns = <160>;
gpmc,access-ns = <150>;
gpmc,page-burst-access-ns = <10>;
gpmc,cycle2cycle-samecsen;
gpmc,cycle2cycle-delay-ns = <20>;
gpmc,wr-data-mux-bus-ns = <70>;
gpmc,wr-access-ns = <80>;

#address-cells = <1>;
#size-cells = <1>;

partition@0 {
label = "boot";
reg = <0x00000000 0x000c0000>; // 768KB
};

partition@1 {
label = "env1";
reg = <0x000c0000 0x00020000>; // 128KB
};
};
};

  • Hi Mingxi,

    The error message is printed from the physmap driver, which is not relevant to TI processors. This is out of the support scope on this forums. Please debug the physmap driver to understand why the error happens.