<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1695378#M12968</link>
    <description>&lt;P&gt;I am attempting to configure memory-mapped regions for the NOR Flash and FRAM devices.&lt;/P&gt;&lt;P&gt;NOR Flash - 256MB window for XSPI1_A, CS0&lt;BR /&gt;Start address: 0x000020000000h&lt;BR /&gt;End address: 0x00002FFFFFFFh&lt;/P&gt;&lt;P&gt;NOR Flash - 256MB window for XSPI1_A, CS1&lt;BR /&gt;Start address: 0x000400000000h&lt;BR /&gt;End address: 0x00040FFFFFFFh&lt;/P&gt;&lt;P&gt;FRAM - 512KB window for XSPI1_B, CS1&lt;BR /&gt;Start address: 0x000410000000h&lt;BR /&gt;End address: 0x00041FFFFFFFh&lt;/P&gt;&lt;P&gt;I have configured the DTS (Device Tree Source) "reg" property for the flash and FRAM regions. However, during the DTB (Device Tree Blob) compilation, I encounter the following error:&lt;/P&gt;&lt;P&gt;"Device tree value out of range for 32-bit array element." This error occurs due to the use of 64-bit addresses in the "reg" property.&lt;/P&gt;&lt;P&gt;Could you please advise on how to configure a 64-bit address with the "reg" property in the device tree?&lt;/P&gt;&lt;P&gt;Device Tree Configuration:&lt;/P&gt;&lt;P&gt;```device-tree&lt;BR /&gt;&amp;amp;fspi {&lt;BR /&gt;status = "okay";&lt;BR /&gt;#address-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt;#size-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;&lt;BR /&gt;/* Memory-mapped regions for the Flash and FRAM devices */&lt;BR /&gt;reg = &amp;lt;0x0 0x20000000 0x0 0x10000000&amp;gt;, /* Flash region 1: 256MB */&lt;BR /&gt;&amp;lt;0x0 0x400000000 0x0 0x10000000&amp;gt;, /* Flash region 2: 256MB */&lt;BR /&gt;&amp;lt;0x0 0x410000000 0x0 0x80000&amp;gt;; /* FRAM region: 512KB */&lt;BR /&gt;&lt;BR /&gt;flash@0 {&lt;BR /&gt;compatible = "jedec,spi-nor";&lt;BR /&gt;spi-max-frequency = &amp;lt;90000000&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0x0 0x20000000 0x0 0x10000000&amp;gt;;&lt;BR /&gt;spi-rx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;spi-tx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;flash@1 {&lt;BR /&gt;compatible = "jedec,spi-nor";&lt;BR /&gt;spi-max-frequency = &amp;lt;90000000&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0x0 0x400000000 0x0 0x10000000&amp;gt;;&lt;BR /&gt;spi-rx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;spi-tx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;fram@3 {&lt;BR /&gt;compatible = "jedec,spi-nor";&lt;BR /&gt;spi-max-frequency = &amp;lt;50000000&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0x0 0x410000000 0x0 0x80000&amp;gt;;&lt;BR /&gt;spi-rx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;spi-tx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;};&lt;BR /&gt;};&lt;BR /&gt;```&lt;/P&gt;</description>
    <pubDate>Sun, 30 Jul 2023 20:37:15 GMT</pubDate>
    <dc:creator>csr202</dc:creator>
    <dc:date>2023-07-30T20:37:15Z</dc:date>
    <item>
      <title>Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element</title>
      <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1695378#M12968</link>
      <description>&lt;P&gt;I am attempting to configure memory-mapped regions for the NOR Flash and FRAM devices.&lt;/P&gt;&lt;P&gt;NOR Flash - 256MB window for XSPI1_A, CS0&lt;BR /&gt;Start address: 0x000020000000h&lt;BR /&gt;End address: 0x00002FFFFFFFh&lt;/P&gt;&lt;P&gt;NOR Flash - 256MB window for XSPI1_A, CS1&lt;BR /&gt;Start address: 0x000400000000h&lt;BR /&gt;End address: 0x00040FFFFFFFh&lt;/P&gt;&lt;P&gt;FRAM - 512KB window for XSPI1_B, CS1&lt;BR /&gt;Start address: 0x000410000000h&lt;BR /&gt;End address: 0x00041FFFFFFFh&lt;/P&gt;&lt;P&gt;I have configured the DTS (Device Tree Source) "reg" property for the flash and FRAM regions. However, during the DTB (Device Tree Blob) compilation, I encounter the following error:&lt;/P&gt;&lt;P&gt;"Device tree value out of range for 32-bit array element." This error occurs due to the use of 64-bit addresses in the "reg" property.&lt;/P&gt;&lt;P&gt;Could you please advise on how to configure a 64-bit address with the "reg" property in the device tree?&lt;/P&gt;&lt;P&gt;Device Tree Configuration:&lt;/P&gt;&lt;P&gt;```device-tree&lt;BR /&gt;&amp;amp;fspi {&lt;BR /&gt;status = "okay";&lt;BR /&gt;#address-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt;#size-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;&lt;BR /&gt;/* Memory-mapped regions for the Flash and FRAM devices */&lt;BR /&gt;reg = &amp;lt;0x0 0x20000000 0x0 0x10000000&amp;gt;, /* Flash region 1: 256MB */&lt;BR /&gt;&amp;lt;0x0 0x400000000 0x0 0x10000000&amp;gt;, /* Flash region 2: 256MB */&lt;BR /&gt;&amp;lt;0x0 0x410000000 0x0 0x80000&amp;gt;; /* FRAM region: 512KB */&lt;BR /&gt;&lt;BR /&gt;flash@0 {&lt;BR /&gt;compatible = "jedec,spi-nor";&lt;BR /&gt;spi-max-frequency = &amp;lt;90000000&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0x0 0x20000000 0x0 0x10000000&amp;gt;;&lt;BR /&gt;spi-rx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;spi-tx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;flash@1 {&lt;BR /&gt;compatible = "jedec,spi-nor";&lt;BR /&gt;spi-max-frequency = &amp;lt;90000000&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0x0 0x400000000 0x0 0x10000000&amp;gt;;&lt;BR /&gt;spi-rx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;spi-tx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;fram@3 {&lt;BR /&gt;compatible = "jedec,spi-nor";&lt;BR /&gt;spi-max-frequency = &amp;lt;50000000&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0x0 0x410000000 0x0 0x80000&amp;gt;;&lt;BR /&gt;spi-rx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;spi-tx-bus-width = &amp;lt;4&amp;gt;;&lt;BR /&gt;};&lt;BR /&gt;};&lt;BR /&gt;```&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2023 20:37:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1695378#M12968</guid>
      <dc:creator>csr202</dc:creator>
      <dc:date>2023-07-30T20:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element</title>
      <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1696591#M12986</link>
      <description>&lt;P&gt;Please refer to&amp;nbsp;fsl-lx2160a-rdb.dts for how to define fspi devices. No need to define memory mapped region.&lt;/P&gt;
&lt;P&gt;&amp;amp;fspi {&lt;BR /&gt;status = "okay";&lt;/P&gt;
&lt;P&gt;mt35xu512aba0: flash@0 {&lt;BR /&gt;#address-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;#size-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;compatible = "spansion,m25p80";&lt;BR /&gt;m25p,fast-read;&lt;BR /&gt;spi-max-frequency = &amp;lt;50000000&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0&amp;gt;;&lt;BR /&gt;spi-rx-bus-width = &amp;lt;8&amp;gt;;&lt;BR /&gt;spi-tx-bus-width = &amp;lt;8&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;mt35xu512aba1: flash@1 {&lt;BR /&gt;#address-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;#size-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;compatible = "spansion,m25p80";&lt;BR /&gt;m25p,fast-read;&lt;BR /&gt;spi-max-frequency = &amp;lt;50000000&amp;gt;;&lt;BR /&gt;reg = &amp;lt;1&amp;gt;;&lt;BR /&gt;spi-rx-bus-width = &amp;lt;8&amp;gt;;&lt;BR /&gt;spi-tx-bus-width = &amp;lt;8&amp;gt;;&lt;BR /&gt;};&lt;BR /&gt;};&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 09:34:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1696591#M12986</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2023-08-01T09:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element</title>
      <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1696818#M12989</link>
      <description>I have successfully configured the fspi nor flash device tree node with partitions and accessed it as mtd partitions from Linux. I could also access the fram mtd partitions after adding the jedec id for fram in the spi-nor driver.&lt;BR /&gt;&lt;BR /&gt;I am interested in accessing the fram memory-mapped regions from Linux using ioremap. Could you please provide guidance on how to configure it in the device tree so that it can be accessed from the Linux system memory?</description>
      <pubDate>Tue, 01 Aug 2023 14:34:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1696818#M12989</guid>
      <dc:creator>csr202</dc:creator>
      <dc:date>2023-08-01T14:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element</title>
      <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1698090#M12995</link>
      <description>Any update on this thread?</description>
      <pubDate>Thu, 03 Aug 2023 00:38:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1698090#M12995</guid>
      <dc:creator>csr202</dc:creator>
      <dc:date>2023-08-03T00:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element</title>
      <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1698269#M12998</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;SPAN&gt;System memory map&lt;/SPAN&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;0x0000_2000_0000 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0000_2FFF_FFFF &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 256MB &amp;nbsp; FlexSPI Region #1&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;0x0004_0000_0000 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0004_0FFF_FFFF &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 256MB &amp;nbsp; SPI Hole &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Collapsed away by remapping logic to merge FlexSPI Region #1&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;0x0004_1000_0000 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0004_FFFF_FFFF &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.75GB &amp;nbsp; FlexSPI Region #2(256MB-4GB)&amp;nbsp; 3.75GB&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;SPAN&gt;CCSR Block address map&lt;/SPAN&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x20C_0000 - &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x20C_FFFF QSPI (Flex SPI)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Please refer to&amp;nbsp;fsl-lx2160a.dtsi&lt;/P&gt;
&lt;P&gt;fspi: spi@20c0000 {&lt;BR /&gt;compatible = "nxp,lx2160a-fspi";&lt;BR /&gt;#address-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;#size-cells = &amp;lt;0&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0x0 0x20c0000 0x0 0x10000&amp;gt;,&lt;BR /&gt;&amp;lt;0x0 0x20000000 0x0 0x10000000&amp;gt;;&lt;BR /&gt;reg-names = "fspi_base", "fspi_mmap";&lt;BR /&gt;interrupts = &amp;lt;GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH&amp;gt;;&lt;BR /&gt;clocks = &amp;lt;&amp;amp;clockgen 4 3&amp;gt;, &amp;lt;&amp;amp;clockgen 4 3&amp;gt;;&lt;BR /&gt;clock-names = "fspi_en", "fspi";&lt;BR /&gt;status = "disabled";&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;You could define reg device node as the following.&lt;/P&gt;
&lt;P&gt;reg = &amp;lt;0x0 0x20c0000 0x0 0x10000&amp;gt;,&lt;/P&gt;
&lt;P&gt;&amp;lt;0x4 0x10000000 0x0 0x30000000&amp;gt;;&lt;/P&gt;
&lt;P&gt;You could refer to&amp;nbsp;Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt for details.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 05:29:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1698269#M12998</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2023-08-03T05:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element</title>
      <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1699558#M13016</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411"&gt;@yipingwang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could configure reg property for&amp;nbsp;&lt;SPAN&gt;FlexSPI Region #2 in device tree as you suggested below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;reg = &amp;lt;0x00 0x20c0000 0x00 0x10000&amp;gt;,&lt;/P&gt;&lt;P&gt;&amp;lt;0x04 0x10000000 0x00 0x30000000&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;However, I don't see this&amp;nbsp;memory-mapped region listed in&amp;nbsp; /proc/iomem.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm trying to&amp;nbsp;access this memory-mapped region (physical address) and use ioremap&amp;nbsp;to map it into the kernel's virtual address space and then read from or write to it using ioread and iowrite functions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is there any additional configuration needed in device tree for this?&lt;/P&gt;&lt;P&gt;I'm using below dts configuration,&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;spi@20c0000 {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compatible = "nxp,lx2160a-fspi";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#address-cells = &amp;lt;0x01&amp;gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#size-cells = &amp;lt;0x00&amp;gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;reg = &amp;lt;0x00 0x20c0000 0x00 0x10000 0x04 0x10000000 0x00 0x30000000&amp;gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;reg-names = "fspi_base\0fspi_mmap";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;flash@0 {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compatible = "jedec,spi-nor";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;reg = &amp;lt;0x00&amp;gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;flash@1 {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compatible = "jedec,spi-nor";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;reg = &amp;lt;0x01&amp;gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;fram@3 {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;compatible = "jedec,spi-nor";&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;reg = &amp;lt;0x03&amp;gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 19:32:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1699558#M13016</guid>
      <dc:creator>csr202</dc:creator>
      <dc:date>2023-08-04T19:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element</title>
      <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1700320#M13028</link>
      <description>&lt;P&gt;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411" target="_blank"&gt;@yipingwang&lt;/A&gt;&lt;SPAN&gt; Whenever you have the opportunity, please share your thoughts on this.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 15:24:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1700320#M13028</guid>
      <dc:creator>csr202</dc:creator>
      <dc:date>2023-08-07T15:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element</title>
      <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1700702#M13031</link>
      <description>&lt;P&gt;You could refer to&amp;nbsp;nxp_fspi_read_ahb function in&amp;nbsp;drivers/spi/spi-nxp-fspi.c.&lt;/P&gt;
&lt;P&gt;static int nxp_fspi_read_ahb(struct nxp_fspi *f, const struct spi_mem_op *op)&lt;BR /&gt;{&lt;BR /&gt;u32 start = op-&amp;gt;addr.val;&lt;BR /&gt;u32 len = op-&amp;gt;data.nbytes;&lt;/P&gt;
&lt;P&gt;/* if necessary, ioremap before AHB read */&lt;BR /&gt;if ((!f-&amp;gt;ahb_addr) || start &amp;lt; f-&amp;gt;memmap_start ||&lt;BR /&gt;start + len &amp;gt; f-&amp;gt;memmap_start + f-&amp;gt;memmap_len) {&lt;BR /&gt;if (f-&amp;gt;ahb_addr)&lt;BR /&gt;iounmap(f-&amp;gt;ahb_addr);&lt;/P&gt;
&lt;P&gt;f-&amp;gt;memmap_start = start;&lt;BR /&gt;f-&amp;gt;memmap_len = len &amp;gt; NXP_FSPI_MIN_IOMAP ?&lt;BR /&gt;len : NXP_FSPI_MIN_IOMAP;&lt;/P&gt;
&lt;P&gt;f-&amp;gt;ahb_addr = ioremap_wc(f-&amp;gt;memmap_phy + f-&amp;gt;memmap_start,&lt;BR /&gt;f-&amp;gt;memmap_len);&lt;/P&gt;
&lt;P&gt;if (!f-&amp;gt;ahb_addr) {&lt;BR /&gt;dev_err(f-&amp;gt;dev, "failed to alloc memory\n");&lt;BR /&gt;return -ENOMEM;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;/* Read out the data directly from the AHB buffer. */&lt;BR /&gt;memcpy_fromio(op-&amp;gt;data.buf.in,&lt;BR /&gt;f-&amp;gt;ahb_addr + start - f-&amp;gt;memmap_start, len);&lt;/P&gt;
&lt;P&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 05:20:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1700702#M13031</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2023-08-08T05:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element</title>
      <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1805301#M13978</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411"&gt;@yipingwang&lt;/a&gt;&amp;nbsp;I tried configuring reg property for&amp;nbsp;FlexSPI Region #2 in device tree as below.&lt;/P&gt;&lt;P&gt;reg = &amp;lt;0x00 0x20c0000 0x00 0x10000&amp;gt;,&lt;/P&gt;&lt;P&gt;&amp;lt;0x04 0x10000000 0x00 0x00080000&amp;gt;; //512KB&lt;/P&gt;&lt;P&gt;I could see memory region listed in /proc/iomem after adding following code in the kenrel "drivers/spi/spi-nxp-fspi.c"&lt;/P&gt;&lt;P&gt;----------------------------------------------------&lt;/P&gt;&lt;P&gt;res = platform_get_resource_byname(pdev,&amp;nbsp;IORESOURCE_MEM, "fspi_mmap");&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+ if (!devm_request_mem_region(dev, res-&amp;gt;start, resource_size(res),res-&amp;gt;name)) {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;+ dev_err(dev, "fspi can't request region for resource %pR\n", res);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;+ ret = -EBUSY;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;+ goto err_put_ctrl;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;+ }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;----------------------------------------------------&lt;/P&gt;&lt;P&gt;$cat /proc/iomem&amp;nbsp;&lt;BR /&gt;....&lt;BR /&gt;020c0000-020cffff : 20c0000.spi fspi_base&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;410000000-41007ffff : fspi_mmap&lt;/STRONG&gt;&lt;BR /&gt;....&lt;BR /&gt;Question:&lt;/P&gt;&lt;P&gt;I could use ioremap in a custom driver to map physical memory at base address 0x410000000.&lt;/P&gt;&lt;P&gt;However, when I get the kernel panic when I try to use the virtual address (from ioremap).&lt;/P&gt;&lt;P&gt;[ 636.001611] Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Am I missing any configuration here? Does nxp-fspi driver supports memory mapped access of&amp;nbsp;FlexSPI Region #2 from below system memory map ?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;System memory map&lt;/P&gt;&lt;P&gt;0x0000_2000_0000 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0000_2FFF_FFFF &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 256MB &amp;nbsp; FlexSPI Region #1&lt;BR /&gt;0x0004_0000_0000 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0004_0FFF_FFFF &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 256MB &amp;nbsp; SPI Hole &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Collapsed away by remapping logic to merge FlexSPI Region #1&lt;BR /&gt;&lt;STRONG&gt;0x0004_1000_0000 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0004_FFFF_FFFF &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.75GB &amp;nbsp; FlexSPI Region #2(256MB-4GB)&amp;nbsp; 3.75GB&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 14:47:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1805301#M13978</guid>
      <dc:creator>csr202</dc:creator>
      <dc:date>2024-02-12T14:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element</title>
      <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1806202#M13983</link>
      <description>&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411"&gt;@yipingwang&lt;/a&gt; any update on this thread?</description>
      <pubDate>Wed, 14 Feb 2024 00:49:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1806202#M13983</guid>
      <dc:creator>csr202</dc:creator>
      <dc:date>2024-02-14T00:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Device Tree Configuration Error: Device Tree Value Out of Range for 32-Bit Array Element</title>
      <link>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1811022#M14002</link>
      <description>&lt;P&gt;&lt;SPAN&gt;any update ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 15:16:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Device-Tree-Configuration-Error-Device-Tree-Value-Out-of-Range/m-p/1811022#M14002</guid>
      <dc:creator>csr202</dc:creator>
      <dc:date>2024-02-19T15:16:40Z</dc:date>
    </item>
  </channel>
</rss>

