Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'memory-controller-drv-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v6.2

1. STM32 FMC2:
a. Correct in bindings the name of property for address
setup duration. The DTS and driver were already using proper name,
so it is only alignment of bindings with real usage.
b. Split off STM32 memory controller bus peripheral properties into
generic ones (re-usable by multiple memory controllers) and STM32 bus
peripheral. This way, the FMC2 controller properties in Micrel
KSZ8851MLL ethernet controller node can be properly validated.

2. Tegra MC: simplify with DEFINE_SHOW_ATTRIBUTE.

3. Renesas RPC IF: add suppor tfor R-Car Gen4.

4. LPDDR bindings: refactor and extend with description of DDR channels.
Add also bindings for LPDDR4 and LPDDR5.

The rationale for (4) above - LPDDR bindings changes, wrote by Julius Werner:

"We (Chromium OS) have been trying to find a way to pass LPDDR memory
chip information that is available to the firmware through the FDT
(mostly for userspace informational purposes, for now). We have been
using and expanding the existing "jedec,lpddr2" and "jedec,lpddr3"
bindings for this (e.g. [1]). The goal is to be able to identify the
memory layout of the system (how the parts look like, how they're tied
together, how much capacity there is in total) as accurately as
possible from software-probed values.

...

The problem with this is that each individual LPDDR chip has its own
set of mode registers (per rank) that only describe the density of
that particular chip (rank). The host memory controller may have
multiple channels (each of which is basically an entirely separate set
of physical LPDDR pins on the board), a single channel may be
connected to multiple LPDDR chips (e.g. if the memory controller has
an outgoing 32-bit channel, that channel could be tied to two 16-bit
LPDDR chips by tying the low 16 bits to one and the high 16 bits to
the other), and then each of those chips may offer multiple
independent ranks (which rank is being accessed at a given time is
controlled by a separate chip select pin).

So if we just have one "io-width" and one "density" field in the FDT,
there's no way to figure out how much memory there's actually
connected in total, because that only describes a single LPDDR chip.
Worse, there may be chips where different ranks have different
densities (e.g. a 6GB dual-rank chip with one 4GB and one 2GB rank),
and different channels could theoretically be connected to chips of
completely different manufacturers."

Link: https://lore.kernel.org/r/CAODwPW9E8wWwxbYKyf4_-JFb4F-JSmLR3qOF_iudjX0f9ndF0A@mail.gmail.com

* tag 'memory-controller-drv-6.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
dt-bindings: memory-controller: st,stm32: Split off MC properties
dt-bindings: memory: Add jedec,lpddrX-channel binding
dt-bindings: memory: Add jedec,lpddr4 and jedec,lpddr5 bindings
dt-bindings: memory: Add numeric LPDDR compatible string variant
dt-bindings: memory: Factor out common properties of LPDDR bindings
memory: renesas-rpc-if: Add support for R-Car Gen4
memory: renesas-rpc-if: Clear HS bit during hardware initialization
dt-bindings: memory: renesas,rpc-if: Document R-Car V4H support
memory: tegra186-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
memory: tegra210-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
memory: tegra30-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
memory: tegra20-emc: use DEFINE_SHOW_ATTRIBUTE to simplify code
dt-bindings: memory-controller: st,stm32: Fix st,fmc2_ebi-cs-write-address-setup-ns

Link: https://lore.kernel.org/r/20221026171354.51877-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+531 -271
+146
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-channel.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/memory-controllers/ddr/jedec,lpddr-channel.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: LPDDR channel with chip/rank topology description 8 + 9 + description: 10 + An LPDDR channel is a completely independent set of LPDDR pins (DQ, CA, CS, 11 + CK, etc.) that connect one or more LPDDR chips to a host system. The main 12 + purpose of this node is to overall LPDDR topology of the system, including the 13 + amount of individual LPDDR chips and the ranks per chip. 14 + 15 + maintainers: 16 + - Julius Werner <jwerner@chromium.org> 17 + 18 + properties: 19 + compatible: 20 + enum: 21 + - jedec,lpddr2-channel 22 + - jedec,lpddr3-channel 23 + - jedec,lpddr4-channel 24 + - jedec,lpddr5-channel 25 + 26 + io-width: 27 + description: 28 + The number of DQ pins in the channel. If this number is different 29 + from (a multiple of) the io-width of the LPDDR chip, that means that 30 + multiple instances of that type of chip are wired in parallel on this 31 + channel (with the channel's DQ pins split up between the different 32 + chips, and the CA, CS, etc. pins of the different chips all shorted 33 + together). This means that the total physical memory controlled by a 34 + channel is equal to the sum of the densities of each rank on the 35 + connected LPDDR chip, times the io-width of the channel divided by 36 + the io-width of the LPDDR chip. 37 + enum: 38 + - 8 39 + - 16 40 + - 32 41 + - 64 42 + - 128 43 + 44 + "#address-cells": 45 + const: 1 46 + 47 + "#size-cells": 48 + const: 0 49 + 50 + patternProperties: 51 + "^rank@[0-9]+$": 52 + type: object 53 + description: 54 + Each physical LPDDR chip may have one or more ranks. Ranks are 55 + internal but fully independent sub-units of the chip. Each LPDDR bus 56 + transaction on the channel targets exactly one rank, based on the 57 + state of the CS pins. Different ranks may have different densities and 58 + timing requirements. 59 + required: 60 + - reg 61 + 62 + allOf: 63 + - if: 64 + properties: 65 + compatible: 66 + contains: 67 + const: jedec,lpddr2-channel 68 + then: 69 + patternProperties: 70 + "^rank@[0-9]+$": 71 + $ref: /schemas/memory-controllers/ddr/jedec,lpddr2.yaml# 72 + - if: 73 + properties: 74 + compatible: 75 + contains: 76 + const: jedec,lpddr3-channel 77 + then: 78 + patternProperties: 79 + "^rank@[0-9]+$": 80 + $ref: /schemas/memory-controllers/ddr/jedec,lpddr3.yaml# 81 + - if: 82 + properties: 83 + compatible: 84 + contains: 85 + const: jedec,lpddr4-channel 86 + then: 87 + patternProperties: 88 + "^rank@[0-9]+$": 89 + $ref: /schemas/memory-controllers/ddr/jedec,lpddr4.yaml# 90 + - if: 91 + properties: 92 + compatible: 93 + contains: 94 + const: jedec,lpddr5-channel 95 + then: 96 + patternProperties: 97 + "^rank@[0-9]+$": 98 + $ref: /schemas/memory-controllers/ddr/jedec,lpddr5.yaml# 99 + 100 + required: 101 + - compatible 102 + - io-width 103 + - "#address-cells" 104 + - "#size-cells" 105 + 106 + additionalProperties: false 107 + 108 + examples: 109 + - | 110 + lpddr-channel0 { 111 + #address-cells = <1>; 112 + #size-cells = <0>; 113 + compatible = "jedec,lpddr3-channel"; 114 + io-width = <32>; 115 + 116 + rank@0 { 117 + compatible = "lpddr3-ff,0100", "jedec,lpddr3"; 118 + reg = <0>; 119 + density = <8192>; 120 + io-width = <16>; 121 + revision-id = <1 0>; 122 + }; 123 + }; 124 + 125 + lpddr-channel1 { 126 + #address-cells = <1>; 127 + #size-cells = <0>; 128 + compatible = "jedec,lpddr4-channel"; 129 + io-width = <32>; 130 + 131 + rank@0 { 132 + compatible = "lpddr4-05,0301", "jedec,lpddr4"; 133 + reg = <0>; 134 + density = <4096>; 135 + io-width = <32>; 136 + revision-id = <3 1>; 137 + }; 138 + 139 + rank@1 { 140 + compatible = "lpddr4-05,0301", "jedec,lpddr4"; 141 + reg = <1>; 142 + density = <2048>; 143 + io-width = <32>; 144 + revision-id = <3 1>; 145 + }; 146 + };
+74
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/memory-controllers/ddr/jedec,lpddr-props.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Common properties for LPDDR types 8 + 9 + description: 10 + Different LPDDR types generally use the same properties and only differ in the 11 + range of legal values for each. This file defines the common parts that can be 12 + reused for each type. Nodes using this schema should generally be nested under 13 + an LPDDR channel node. 14 + 15 + maintainers: 16 + - Krzysztof Kozlowski <krzk@kernel.org> 17 + 18 + properties: 19 + compatible: 20 + description: 21 + Compatible strings can be either explicit vendor names and part numbers 22 + (e.g. elpida,ECB240ABACN), or generated strings of the form 23 + lpddrX-YY,ZZZZ where X is the LPDDR version, YY is the manufacturer ID 24 + (from MR5) and ZZZZ is the revision ID (from MR6 and MR7). Both IDs are 25 + formatted in lower case hexadecimal representation with leading zeroes. 26 + The latter form can be useful when LPDDR nodes are created at runtime by 27 + boot firmware that doesn't have access to static part number information. 28 + 29 + reg: 30 + description: 31 + The rank number of this LPDDR rank when used as a subnode to an LPDDR 32 + channel. 33 + minimum: 0 34 + maximum: 3 35 + 36 + revision-id: 37 + $ref: /schemas/types.yaml#/definitions/uint32-array 38 + description: 39 + Revision IDs read from Mode Register 6 and 7. One byte per uint32 cell (i.e. <MR6 MR7>). 40 + maxItems: 2 41 + items: 42 + minimum: 0 43 + maximum: 255 44 + 45 + density: 46 + $ref: /schemas/types.yaml#/definitions/uint32 47 + description: 48 + Density in megabits of SDRAM chip. Decoded from Mode Register 8. 49 + enum: 50 + - 64 51 + - 128 52 + - 256 53 + - 512 54 + - 1024 55 + - 2048 56 + - 3072 57 + - 4096 58 + - 6144 59 + - 8192 60 + - 12288 61 + - 16384 62 + - 24576 63 + - 32768 64 + 65 + io-width: 66 + $ref: /schemas/types.yaml#/definitions/uint32 67 + description: 68 + IO bus width in bits of SDRAM chip. Decoded from Mode Register 8. 69 + enum: 70 + - 8 71 + - 16 72 + - 32 73 + 74 + additionalProperties: true
+9 -39
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml
··· 9 9 maintainers: 10 10 - Krzysztof Kozlowski <krzk@kernel.org> 11 11 12 + allOf: 13 + - $ref: jedec,lpddr-props.yaml# 14 + 12 15 properties: 13 16 compatible: 14 17 oneOf: ··· 20 17 - elpida,ECB240ABACN 21 18 - elpida,B8132B2PB-6D-F 22 19 - enum: 20 + - jedec,lpddr2-nvm 21 + - jedec,lpddr2-s2 23 22 - jedec,lpddr2-s4 24 23 - items: 25 - - enum: 26 - - jedec,lpddr2-s2 27 - - items: 24 + - pattern: "^lpddr2-[0-9a-f]{2},[0-9a-f]{4}$" 28 25 - enum: 29 26 - jedec,lpddr2-nvm 27 + - jedec,lpddr2-s2 28 + - jedec,lpddr2-s4 30 29 31 30 revision-id1: 32 31 $ref: /schemas/types.yaml#/definitions/uint32 ··· 45 40 Revision 2 value of SDRAM chip. Obtained from device datasheet. 46 41 Property is deprecated, use revision-id instead. 47 42 deprecated: true 48 - 49 - revision-id: 50 - $ref: /schemas/types.yaml#/definitions/uint32-array 51 - description: | 52 - Revision IDs read from Mode Register 6 and 7. One byte per uint32 cell (i.e. <MR6 MR7>). 53 - minItems: 2 54 - maxItems: 2 55 - items: 56 - minimum: 0 57 - maximum: 255 58 - 59 - density: 60 - $ref: /schemas/types.yaml#/definitions/uint32 61 - description: | 62 - Density in megabits of SDRAM chip. Obtained from device datasheet. 63 - enum: 64 - - 64 65 - - 128 66 - - 256 67 - - 512 68 - - 1024 69 - - 2048 70 - - 4096 71 - - 8192 72 - - 16384 73 - - 32768 74 - 75 - io-width: 76 - $ref: /schemas/types.yaml#/definitions/uint32 77 - description: | 78 - IO bus width in bits of SDRAM chip. Obtained from device datasheet. 79 - enum: 80 - - 32 81 - - 16 82 - - 8 83 43 84 44 tRRD-min-tck: 85 45 $ref: /schemas/types.yaml#/definitions/uint32 ··· 138 168 - density 139 169 - io-width 140 170 141 - additionalProperties: false 171 + unevaluatedProperties: false 142 172 143 173 examples: 144 174 - |
+12 -32
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml
··· 9 9 maintainers: 10 10 - Krzysztof Kozlowski <krzk@kernel.org> 11 11 12 + allOf: 13 + - $ref: jedec,lpddr-props.yaml# 14 + 12 15 properties: 13 16 compatible: 14 - items: 15 - - enum: 16 - - samsung,K3QF2F20DB 17 - - const: jedec,lpddr3 17 + oneOf: 18 + - items: 19 + - enum: 20 + - samsung,K3QF2F20DB 21 + - const: jedec,lpddr3 22 + - items: 23 + - pattern: "^lpddr3-[0-9a-f]{2},[0-9a-f]{4}$" 24 + - const: jedec,lpddr3 18 25 19 26 '#address-cells': 20 27 const: 1 21 28 deprecated: true 22 - 23 - density: 24 - $ref: /schemas/types.yaml#/definitions/uint32 25 - description: | 26 - Density in megabits of SDRAM chip. 27 - enum: 28 - - 4096 29 - - 8192 30 - - 16384 31 - - 32768 32 - 33 - io-width: 34 - $ref: /schemas/types.yaml#/definitions/uint32 35 - description: | 36 - IO bus width in bits of SDRAM chip. 37 - enum: 38 - - 32 39 - - 16 40 29 41 30 manufacturer-id: 42 31 $ref: /schemas/types.yaml#/definitions/uint32 ··· 33 44 Manufacturer ID value read from Mode Register 5. The property is 34 45 deprecated, manufacturer should be derived from the compatible. 35 46 deprecated: true 36 - 37 - revision-id: 38 - $ref: /schemas/types.yaml#/definitions/uint32-array 39 - minItems: 2 40 - maxItems: 2 41 - items: 42 - maximum: 255 43 - description: | 44 - Revision value of SDRAM chip read from Mode Registers 6 and 7. 45 47 46 48 '#size-cells': 47 49 const: 0 ··· 186 206 - density 187 207 - io-width 188 208 189 - additionalProperties: false 209 + unevaluatedProperties: false 190 210 191 211 examples: 192 212 - |
+35
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr4.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/memory-controllers/ddr/jedec,lpddr4.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: LPDDR4 SDRAM compliant to JEDEC JESD209-4 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzk@kernel.org> 11 + 12 + allOf: 13 + - $ref: jedec,lpddr-props.yaml# 14 + 15 + properties: 16 + compatible: 17 + items: 18 + - pattern: "^lpddr4-[0-9a-f]{2},[0-9a-f]{4}$" 19 + - const: jedec,lpddr4 20 + 21 + required: 22 + - compatible 23 + - density 24 + - io-width 25 + 26 + unevaluatedProperties: false 27 + 28 + examples: 29 + - | 30 + lpddr { 31 + compatible = "lpddr4-ff,0100", "jedec,lpddr4"; 32 + density = <8192>; 33 + io-width = <16>; 34 + revision-id = <1 0>; 35 + };
+46
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr5.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/memory-controllers/ddr/jedec,lpddr5.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: LPDDR5 SDRAM compliant to JEDEC JESD209-5 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzk@kernel.org> 11 + 12 + allOf: 13 + - $ref: jedec,lpddr-props.yaml# 14 + 15 + properties: 16 + compatible: 17 + items: 18 + - pattern: "^lpddr5-[0-9a-f]{2},[0-9a-f]{4}$" 19 + - const: jedec,lpddr5 20 + 21 + serial-id: 22 + $ref: /schemas/types.yaml#/definitions/uint32-array 23 + description: 24 + Serial IDs read from Mode Registers 47 through 54. One byte per uint32 25 + cell (i.e. <MR47 MR48 MR49 MR50 MR51 MR52 MR53 MR54>). 26 + maxItems: 8 27 + items: 28 + minimum: 0 29 + maximum: 255 30 + 31 + required: 32 + - compatible 33 + - density 34 + - io-width 35 + 36 + unevaluatedProperties: false 37 + 38 + examples: 39 + - | 40 + lpddr { 41 + compatible = "lpddr5-01,0200", "jedec,lpddr5"; 42 + density = <8192>; 43 + io-width = <8>; 44 + revision-id = <2 0>; 45 + serial-id = <3 1 0 0 0 0 0 0>; 46 + };
+38
Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/memory-controllers/mc-peripheral-props.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Peripheral-specific properties for a Memory Controller bus. 8 + 9 + description: 10 + Many Memory Controllers need to add properties to peripheral devices. 11 + They could be common properties like reg or they could be controller 12 + specific like delay in clock or data lines, etc. These properties need 13 + to be defined in the peripheral node because they are per-peripheral 14 + and there can be multiple peripherals attached to a controller. All 15 + those properties are listed here. The controller specific properties 16 + should go in their own separate schema that should be referenced 17 + from here. 18 + 19 + maintainers: 20 + - Marek Vasut <marex@denx.de> 21 + 22 + properties: 23 + reg: 24 + description: Bank number, base address and size of the device. 25 + 26 + bank-width: 27 + $ref: /schemas/types.yaml#/definitions/uint32 28 + description: Bank width of the device, in bytes. 29 + enum: [1, 2, 4] 30 + 31 + required: 32 + - reg 33 + 34 + # The controller specific properties go here. 35 + allOf: 36 + - $ref: st,stm32-fmc2-ebi-props.yaml# 37 + 38 + additionalProperties: true
+5
Documentation/devicetree/bindings/memory-controllers/renesas,rpc-if.yaml
··· 44 44 45 45 - items: 46 46 - enum: 47 + - renesas,r8a779g0-rpc-if # R-Car V4H 48 + - const: renesas,rcar-gen4-rpc-if # a generic R-Car gen4 device 49 + 50 + - items: 51 + - enum: 47 52 - renesas,r9a07g043-rpc-if # RZ/G2UL 48 53 - renesas,r9a07g044-rpc-if # RZ/G2{L,LC} 49 54 - renesas,r9a07g054-rpc-if # RZ/V2L
+144
Documentation/devicetree/bindings/memory-controllers/st,stm32-fmc2-ebi-props.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/memory-controllers/st,stm32-fmc2-ebi-props.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Peripheral properties for ST FMC2 Controller 8 + 9 + maintainers: 10 + - Christophe Kerello <christophe.kerello@foss.st.com> 11 + - Marek Vasut <marex@denx.de> 12 + 13 + properties: 14 + st,fmc2-ebi-cs-transaction-type: 15 + description: | 16 + Select one of the transactions type supported 17 + 0: Asynchronous mode 1 SRAM/FRAM. 18 + 1: Asynchronous mode 1 PSRAM. 19 + 2: Asynchronous mode A SRAM/FRAM. 20 + 3: Asynchronous mode A PSRAM. 21 + 4: Asynchronous mode 2 NOR. 22 + 5: Asynchronous mode B NOR. 23 + 6: Asynchronous mode C NOR. 24 + 7: Asynchronous mode D NOR. 25 + 8: Synchronous read synchronous write PSRAM. 26 + 9: Synchronous read asynchronous write PSRAM. 27 + 10: Synchronous read synchronous write NOR. 28 + 11: Synchronous read asynchronous write NOR. 29 + $ref: /schemas/types.yaml#/definitions/uint32 30 + minimum: 0 31 + maximum: 11 32 + 33 + st,fmc2-ebi-cs-cclk-enable: 34 + description: Continuous clock enable (first bank must be configured 35 + in synchronous mode). The FMC_CLK is generated continuously 36 + during asynchronous and synchronous access. By default, the 37 + FMC_CLK is only generated during synchronous access. 38 + $ref: /schemas/types.yaml#/definitions/flag 39 + 40 + st,fmc2-ebi-cs-mux-enable: 41 + description: Address/Data multiplexed on databus (valid only with 42 + NOR and PSRAM transactions type). By default, Address/Data 43 + are not multiplexed. 44 + $ref: /schemas/types.yaml#/definitions/flag 45 + 46 + st,fmc2-ebi-cs-buswidth: 47 + description: Data bus width 48 + $ref: /schemas/types.yaml#/definitions/uint32 49 + enum: [ 8, 16 ] 50 + default: 16 51 + 52 + st,fmc2-ebi-cs-waitpol-high: 53 + description: Wait signal polarity (NWAIT signal active high). 54 + By default, NWAIT is active low. 55 + $ref: /schemas/types.yaml#/definitions/flag 56 + 57 + st,fmc2-ebi-cs-waitcfg-enable: 58 + description: The NWAIT signal indicates wheither the data from the 59 + device are valid or if a wait state must be inserted when accessing 60 + the device in synchronous mode. By default, the NWAIT signal is 61 + active one data cycle before wait state. 62 + $ref: /schemas/types.yaml#/definitions/flag 63 + 64 + st,fmc2-ebi-cs-wait-enable: 65 + description: The NWAIT signal is enabled (its level is taken into 66 + account after the programmed latency period to insert wait states 67 + if asserted). By default, the NWAIT signal is disabled. 68 + $ref: /schemas/types.yaml#/definitions/flag 69 + 70 + st,fmc2-ebi-cs-asyncwait-enable: 71 + description: The NWAIT signal is taken into account during asynchronous 72 + transactions. By default, the NWAIT signal is not taken into account 73 + during asynchronous transactions. 74 + $ref: /schemas/types.yaml#/definitions/flag 75 + 76 + st,fmc2-ebi-cs-cpsize: 77 + description: CRAM page size. The controller splits the burst access 78 + when the memory page is reached. By default, no burst split when 79 + crossing page boundary. 80 + $ref: /schemas/types.yaml#/definitions/uint32 81 + enum: [ 0, 128, 256, 512, 1024 ] 82 + default: 0 83 + 84 + st,fmc2-ebi-cs-byte-lane-setup-ns: 85 + description: This property configures the byte lane setup timing 86 + defined in nanoseconds from NBLx low to Chip Select NEx low. 87 + 88 + st,fmc2-ebi-cs-address-setup-ns: 89 + description: This property defines the duration of the address setup 90 + phase in nanoseconds used for asynchronous read/write transactions. 91 + 92 + st,fmc2-ebi-cs-address-hold-ns: 93 + description: This property defines the duration of the address hold 94 + phase in nanoseconds used for asynchronous multiplexed read/write 95 + transactions. 96 + 97 + st,fmc2-ebi-cs-data-setup-ns: 98 + description: This property defines the duration of the data setup phase 99 + in nanoseconds used for asynchronous read/write transactions. 100 + 101 + st,fmc2-ebi-cs-bus-turnaround-ns: 102 + description: This property defines the delay in nanoseconds between the 103 + end of current read/write transaction and the next transaction. 104 + 105 + st,fmc2-ebi-cs-data-hold-ns: 106 + description: This property defines the duration of the data hold phase 107 + in nanoseconds used for asynchronous read/write transactions. 108 + 109 + st,fmc2-ebi-cs-clk-period-ns: 110 + description: This property defines the FMC_CLK output signal period in 111 + nanoseconds. 112 + 113 + st,fmc2-ebi-cs-data-latency-ns: 114 + description: This property defines the data latency before reading or 115 + writing the first data in nanoseconds. 116 + 117 + st,fmc2-ebi-cs-write-address-setup-ns: 118 + description: This property defines the duration of the address setup 119 + phase in nanoseconds used for asynchronous write transactions. 120 + 121 + st,fmc2-ebi-cs-write-address-hold-ns: 122 + description: This property defines the duration of the address hold 123 + phase in nanoseconds used for asynchronous multiplexed write 124 + transactions. 125 + 126 + st,fmc2-ebi-cs-write-data-setup-ns: 127 + description: This property defines the duration of the data setup 128 + phase in nanoseconds used for asynchronous write transactions. 129 + 130 + st,fmc2-ebi-cs-write-bus-turnaround-ns: 131 + description: This property defines the delay between the end of current 132 + write transaction and the next transaction in nanoseconds. 133 + 134 + st,fmc2-ebi-cs-write-data-hold-ns: 135 + description: This property defines the duration of the data hold phase 136 + in nanoseconds used for asynchronous write transactions. 137 + 138 + st,fmc2-ebi-cs-max-low-pulse-ns: 139 + description: This property defines the maximum chip select low pulse 140 + duration in nanoseconds for synchronous transactions. When this timing 141 + reaches 0, the controller splits the current access, toggles NE to 142 + allow device refresh and restarts a new access. 143 + 144 + additionalProperties: true
+1 -137
Documentation/devicetree/bindings/memory-controllers/st,stm32-fmc2-ebi.yaml
··· 48 48 patternProperties: 49 49 "^.*@[0-4],[a-f0-9]+$": 50 50 type: object 51 - 52 - properties: 53 - reg: 54 - description: Bank number, base address and size of the device. 55 - 56 - st,fmc2-ebi-cs-transaction-type: 57 - description: | 58 - Select one of the transactions type supported 59 - 0: Asynchronous mode 1 SRAM/FRAM. 60 - 1: Asynchronous mode 1 PSRAM. 61 - 2: Asynchronous mode A SRAM/FRAM. 62 - 3: Asynchronous mode A PSRAM. 63 - 4: Asynchronous mode 2 NOR. 64 - 5: Asynchronous mode B NOR. 65 - 6: Asynchronous mode C NOR. 66 - 7: Asynchronous mode D NOR. 67 - 8: Synchronous read synchronous write PSRAM. 68 - 9: Synchronous read asynchronous write PSRAM. 69 - 10: Synchronous read synchronous write NOR. 70 - 11: Synchronous read asynchronous write NOR. 71 - $ref: /schemas/types.yaml#/definitions/uint32 72 - minimum: 0 73 - maximum: 11 74 - 75 - st,fmc2-ebi-cs-cclk-enable: 76 - description: Continuous clock enable (first bank must be configured 77 - in synchronous mode). The FMC_CLK is generated continuously 78 - during asynchronous and synchronous access. By default, the 79 - FMC_CLK is only generated during synchronous access. 80 - $ref: /schemas/types.yaml#/definitions/flag 81 - 82 - st,fmc2-ebi-cs-mux-enable: 83 - description: Address/Data multiplexed on databus (valid only with 84 - NOR and PSRAM transactions type). By default, Address/Data 85 - are not multiplexed. 86 - $ref: /schemas/types.yaml#/definitions/flag 87 - 88 - st,fmc2-ebi-cs-buswidth: 89 - description: Data bus width 90 - $ref: /schemas/types.yaml#/definitions/uint32 91 - enum: [ 8, 16 ] 92 - default: 16 93 - 94 - st,fmc2-ebi-cs-waitpol-high: 95 - description: Wait signal polarity (NWAIT signal active high). 96 - By default, NWAIT is active low. 97 - $ref: /schemas/types.yaml#/definitions/flag 98 - 99 - st,fmc2-ebi-cs-waitcfg-enable: 100 - description: The NWAIT signal indicates wheither the data from the 101 - device are valid or if a wait state must be inserted when accessing 102 - the device in synchronous mode. By default, the NWAIT signal is 103 - active one data cycle before wait state. 104 - $ref: /schemas/types.yaml#/definitions/flag 105 - 106 - st,fmc2-ebi-cs-wait-enable: 107 - description: The NWAIT signal is enabled (its level is taken into 108 - account after the programmed latency period to insert wait states 109 - if asserted). By default, the NWAIT signal is disabled. 110 - $ref: /schemas/types.yaml#/definitions/flag 111 - 112 - st,fmc2-ebi-cs-asyncwait-enable: 113 - description: The NWAIT signal is taken into account during asynchronous 114 - transactions. By default, the NWAIT signal is not taken into account 115 - during asynchronous transactions. 116 - $ref: /schemas/types.yaml#/definitions/flag 117 - 118 - st,fmc2-ebi-cs-cpsize: 119 - description: CRAM page size. The controller splits the burst access 120 - when the memory page is reached. By default, no burst split when 121 - crossing page boundary. 122 - $ref: /schemas/types.yaml#/definitions/uint32 123 - enum: [ 0, 128, 256, 512, 1024 ] 124 - default: 0 125 - 126 - st,fmc2-ebi-cs-byte-lane-setup-ns: 127 - description: This property configures the byte lane setup timing 128 - defined in nanoseconds from NBLx low to Chip Select NEx low. 129 - 130 - st,fmc2-ebi-cs-address-setup-ns: 131 - description: This property defines the duration of the address setup 132 - phase in nanoseconds used for asynchronous read/write transactions. 133 - 134 - st,fmc2-ebi-cs-address-hold-ns: 135 - description: This property defines the duration of the address hold 136 - phase in nanoseconds used for asynchronous multiplexed read/write 137 - transactions. 138 - 139 - st,fmc2-ebi-cs-data-setup-ns: 140 - description: This property defines the duration of the data setup phase 141 - in nanoseconds used for asynchronous read/write transactions. 142 - 143 - st,fmc2-ebi-cs-bus-turnaround-ns: 144 - description: This property defines the delay in nanoseconds between the 145 - end of current read/write transaction and the next transaction. 146 - 147 - st,fmc2-ebi-cs-data-hold-ns: 148 - description: This property defines the duration of the data hold phase 149 - in nanoseconds used for asynchronous read/write transactions. 150 - 151 - st,fmc2-ebi-cs-clk-period-ns: 152 - description: This property defines the FMC_CLK output signal period in 153 - nanoseconds. 154 - 155 - st,fmc2-ebi-cs-data-latency-ns: 156 - description: This property defines the data latency before reading or 157 - writing the first data in nanoseconds. 158 - 159 - st,fmc2_ebi-cs-write-address-setup-ns: 160 - description: This property defines the duration of the address setup 161 - phase in nanoseconds used for asynchronous write transactions. 162 - 163 - st,fmc2-ebi-cs-write-address-hold-ns: 164 - description: This property defines the duration of the address hold 165 - phase in nanoseconds used for asynchronous multiplexed write 166 - transactions. 167 - 168 - st,fmc2-ebi-cs-write-data-setup-ns: 169 - description: This property defines the duration of the data setup 170 - phase in nanoseconds used for asynchronous write transactions. 171 - 172 - st,fmc2-ebi-cs-write-bus-turnaround-ns: 173 - description: This property defines the delay between the end of current 174 - write transaction and the next transaction in nanoseconds. 175 - 176 - st,fmc2-ebi-cs-write-data-hold-ns: 177 - description: This property defines the duration of the data hold phase 178 - in nanoseconds used for asynchronous write transactions. 179 - 180 - st,fmc2-ebi-cs-max-low-pulse-ns: 181 - description: This property defines the maximum chip select low pulse 182 - duration in nanoseconds for synchronous transactions. When this timing 183 - reaches 0, the controller splits the current access, toggles NE to 184 - allow device refresh and restarts a new access. 185 - 186 - required: 187 - - reg 51 + $ref: mc-peripheral-props.yaml# 188 52 189 53 required: 190 54 - "#address-cells"
+1
Documentation/devicetree/bindings/net/micrel,ks8851.yaml
··· 44 44 45 45 allOf: 46 46 - $ref: ethernet-controller.yaml# 47 + - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml# 47 48 - if: 48 49 properties: 49 50 compatible:
+15 -7
drivers/memory/renesas-rpc-if.c
··· 136 136 #define RPCIF_PHYCNT_DDRCAL BIT(19) 137 137 #define RPCIF_PHYCNT_HS BIT(18) 138 138 #define RPCIF_PHYCNT_CKSEL(v) (((v) & 0x3) << 16) /* valid only for RZ/G2L */ 139 - #define RPCIF_PHYCNT_STRTIM(v) (((v) & 0x7) << 15) /* valid for R-Car and RZ/G2{E,H,M,N} */ 139 + #define RPCIF_PHYCNT_STRTIM(v) (((v) & 0x7) << 15 | ((v) & 0x8) << 24) /* valid for R-Car and RZ/G2{E,H,M,N} */ 140 + 140 141 #define RPCIF_PHYCNT_WBUF2 BIT(4) 141 142 #define RPCIF_PHYCNT_WBUF BIT(2) 142 143 #define RPCIF_PHYCNT_PHYMEM(v) (((v) & 0x3) << 0) ··· 318 317 regmap_update_bits(rpc->regmap, RPCIF_PHYCNT, RPCIF_PHYCNT_PHYMEM_MASK, 319 318 RPCIF_PHYCNT_PHYMEM(hyperflash ? 3 : 0)); 320 319 320 + /* DMA Transfer is not supported */ 321 + regmap_update_bits(rpc->regmap, RPCIF_PHYCNT, RPCIF_PHYCNT_HS, 0); 322 + 321 323 if (rpc->type == RPCIF_RCAR_GEN3) 322 324 regmap_update_bits(rpc->regmap, RPCIF_PHYCNT, 323 325 RPCIF_PHYCNT_STRTIM(7), RPCIF_PHYCNT_STRTIM(7)); 326 + else if (rpc->type == RPCIF_RCAR_GEN4) 327 + regmap_update_bits(rpc->regmap, RPCIF_PHYCNT, 328 + RPCIF_PHYCNT_STRTIM(15), RPCIF_PHYCNT_STRTIM(15)); 324 329 325 330 regmap_update_bits(rpc->regmap, RPCIF_PHYOFFSET1, RPCIF_PHYOFFSET1_DDRTMG(3), 326 331 RPCIF_PHYOFFSET1_DDRTMG(3)); ··· 337 330 regmap_update_bits(rpc->regmap, RPCIF_PHYINT, 338 331 RPCIF_PHYINT_WPVAL, 0); 339 332 340 - if (rpc->type == RPCIF_RCAR_GEN3) 341 - regmap_update_bits(rpc->regmap, RPCIF_CMNCR, 342 - RPCIF_CMNCR_MOIIO(3) | RPCIF_CMNCR_BSZ(3), 343 - RPCIF_CMNCR_MOIIO(3) | 344 - RPCIF_CMNCR_BSZ(hyperflash ? 1 : 0)); 345 - else 333 + if (rpc->type == RPCIF_RZ_G2L) 346 334 regmap_update_bits(rpc->regmap, RPCIF_CMNCR, 347 335 RPCIF_CMNCR_MOIIO(3) | RPCIF_CMNCR_IOFV(3) | 348 336 RPCIF_CMNCR_BSZ(3), 349 337 RPCIF_CMNCR_MOIIO(1) | RPCIF_CMNCR_IOFV(2) | 338 + RPCIF_CMNCR_BSZ(hyperflash ? 1 : 0)); 339 + else 340 + regmap_update_bits(rpc->regmap, RPCIF_CMNCR, 341 + RPCIF_CMNCR_MOIIO(3) | RPCIF_CMNCR_BSZ(3), 342 + RPCIF_CMNCR_MOIIO(3) | 350 343 RPCIF_CMNCR_BSZ(hyperflash ? 1 : 0)); 351 344 352 345 /* Set RCF after BSZ update */ ··· 722 715 723 716 static const struct of_device_id rpcif_of_match[] = { 724 717 { .compatible = "renesas,rcar-gen3-rpc-if", .data = (void *)RPCIF_RCAR_GEN3 }, 718 + { .compatible = "renesas,rcar-gen4-rpc-if", .data = (void *)RPCIF_RCAR_GEN4 }, 725 719 { .compatible = "renesas,rzg2l-rpc-if", .data = (void *)RPCIF_RZ_G2L }, 726 720 {}, 727 721 };
+1 -14
drivers/memory/tegra/tegra186-emc.c
··· 84 84 85 85 return 0; 86 86 } 87 - 88 - static int tegra186_emc_debug_available_rates_open(struct inode *inode, 89 - struct file *file) 90 - { 91 - return single_open(file, tegra186_emc_debug_available_rates_show, 92 - inode->i_private); 93 - } 94 - 95 - static const struct file_operations tegra186_emc_debug_available_rates_fops = { 96 - .open = tegra186_emc_debug_available_rates_open, 97 - .read = seq_read, 98 - .llseek = seq_lseek, 99 - .release = single_release, 100 - }; 87 + DEFINE_SHOW_ATTRIBUTE(tegra186_emc_debug_available_rates); 101 88 102 89 static int tegra186_emc_debug_min_rate_get(void *data, u64 *rate) 103 90 {
+1 -14
drivers/memory/tegra/tegra20-emc.c
··· 841 841 842 842 return 0; 843 843 } 844 - 845 - static int tegra_emc_debug_available_rates_open(struct inode *inode, 846 - struct file *file) 847 - { 848 - return single_open(file, tegra_emc_debug_available_rates_show, 849 - inode->i_private); 850 - } 851 - 852 - static const struct file_operations tegra_emc_debug_available_rates_fops = { 853 - .open = tegra_emc_debug_available_rates_open, 854 - .read = seq_read, 855 - .llseek = seq_lseek, 856 - .release = single_release, 857 - }; 844 + DEFINE_SHOW_ATTRIBUTE(tegra_emc_debug_available_rates); 858 845 859 846 static int tegra_emc_debug_min_rate_get(void *data, u64 *rate) 860 847 {
+1 -14
drivers/memory/tegra/tegra210-emc-core.c
··· 1621 1621 1622 1622 return 0; 1623 1623 } 1624 - 1625 - static int tegra210_emc_debug_available_rates_open(struct inode *inode, 1626 - struct file *file) 1627 - { 1628 - return single_open(file, tegra210_emc_debug_available_rates_show, 1629 - inode->i_private); 1630 - } 1631 - 1632 - static const struct file_operations tegra210_emc_debug_available_rates_fops = { 1633 - .open = tegra210_emc_debug_available_rates_open, 1634 - .read = seq_read, 1635 - .llseek = seq_lseek, 1636 - .release = single_release, 1637 - }; 1624 + DEFINE_SHOW_ATTRIBUTE(tegra210_emc_debug_available_rates); 1638 1625 1639 1626 static int tegra210_emc_debug_min_rate_get(void *data, u64 *rate) 1640 1627 {
+1 -14
drivers/memory/tegra/tegra30-emc.c
··· 1359 1359 1360 1360 return 0; 1361 1361 } 1362 - 1363 - static int tegra_emc_debug_available_rates_open(struct inode *inode, 1364 - struct file *file) 1365 - { 1366 - return single_open(file, tegra_emc_debug_available_rates_show, 1367 - inode->i_private); 1368 - } 1369 - 1370 - static const struct file_operations tegra_emc_debug_available_rates_fops = { 1371 - .open = tegra_emc_debug_available_rates_open, 1372 - .read = seq_read, 1373 - .llseek = seq_lseek, 1374 - .release = single_release, 1375 - }; 1362 + DEFINE_SHOW_ATTRIBUTE(tegra_emc_debug_available_rates); 1376 1363 1377 1364 static int tegra_emc_debug_min_rate_get(void *data, u64 *rate) 1378 1365 {
+1
include/memory/renesas-rpc-if.h
··· 59 59 60 60 enum rpcif_type { 61 61 RPCIF_RCAR_GEN3, 62 + RPCIF_RCAR_GEN4, 62 63 RPCIF_RZ_G2L, 63 64 }; 64 65