Abdellatif El Khlifi | 6db33c2 | 2023-04-17 10:11:53 +0100 | [diff] [blame] | 1 | Specifying NVMXIP information for devices |
| 2 | ====================================== |
| 3 | |
| 4 | QSPI XIP flash device nodes |
| 5 | --------------------------- |
| 6 | |
| 7 | Each flash device should have its own node. |
| 8 | |
| 9 | Each node must specify the following fields: |
| 10 | |
| 11 | 1) |
| 12 | compatible = "nvmxip,qspi"; |
| 13 | |
| 14 | This allows to bind the flash device with the nvmxip_qspi driver |
| 15 | If a platform has its own driver, please provide your own compatible |
| 16 | string. |
| 17 | |
| 18 | 2) |
| 19 | reg = <0x0 0x08000000 0x0 0x00200000>; |
| 20 | |
| 21 | The start address and size of the flash device. The values give here are an |
| 22 | example (when the cell size is 2). |
| 23 | |
| 24 | When cell size is 1, the reg field looks like this: |
| 25 | |
| 26 | reg = <0x08000000 0x00200000>; |
| 27 | |
| 28 | 3) |
| 29 | |
| 30 | lba_shift = <9>; |
| 31 | |
| 32 | The number of bit shifts used to calculate the size in bytes of one block. |
| 33 | In this example the block size is 1 << 9 = 2 ^ 9 = 512 bytes |
| 34 | |
| 35 | 4) |
| 36 | |
| 37 | lba = <4096>; |
| 38 | |
| 39 | The number of blocks. |
| 40 | |
| 41 | Example of multiple flash devices |
| 42 | ---------------------------------------------------- |
| 43 | |
| 44 | nvmxip-qspi1@08000000 { |
| 45 | compatible = "nvmxip,qspi"; |
| 46 | reg = <0x0 0x08000000 0x0 0x00200000>; |
| 47 | lba_shift = <9>; |
| 48 | lba = <4096>; |
| 49 | }; |
| 50 | |
| 51 | nvmxip-qspi2@08200000 { |
| 52 | compatible = "nvmxip,qspi"; |
| 53 | reg = <0x0 0x08200000 0x0 0x00100000>; |
| 54 | lba_shift = <9>; |
| 55 | lba = <2048>; |
| 56 | }; |