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

ARM: dts: at91: sama7g5: Add NAND support

Add NAND support. The sama7g5's SMC IP is the same as sama5d2's with
a slightly change: it provides a synchronous clock output (SMC clock)
that is dedicated to FPGA usage. Since this doesn't interfere with the SMC
NAND configuration, thus code will not be added in the current nand driver
to address the FPGA usage, use the sama5d2's compatible and choose not to
introduce dedicated compatibles for sama7g5.
Tested with Micron MT29F4G08ABAEAWP NAND flash.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
[nicolas.ferre@microchip.com: add the definition of PMC_MCK1 in
include/dt-bindings/clock/at91.h from another patch]
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220111130556.905978-1-tudor.ambarus@microchip.com

authored by

Tudor Ambarus and committed by
Nicolas Ferre
92499dec 003e17e7

+56
+55
arch/arm/boot/dts/sama7g5.dtsi
··· 113 113 #size-cells = <1>; 114 114 ranges; 115 115 116 + nfc_sram: sram@600000 { 117 + compatible = "mmio-sram"; 118 + no-memory-wc; 119 + reg = <0x00600000 0x2400>; 120 + #address-cells = <1>; 121 + #size-cells = <1>; 122 + ranges = <0 0x00600000 0x2400>; 123 + }; 124 + 125 + nfc_io: nfc-io@10000000 { 126 + compatible = "atmel,sama5d3-nfc-io", "syscon"; 127 + reg = <0x10000000 0x8000000>; 128 + }; 129 + 130 + ebi: ebi@40000000 { 131 + compatible = "atmel,sama5d3-ebi"; 132 + #address-cells = <2>; 133 + #size-cells = <1>; 134 + atmel,smc = <&hsmc>; 135 + reg = <0x40000000 0x20000000>; 136 + ranges = <0x0 0x0 0x40000000 0x8000000 137 + 0x1 0x0 0x48000000 0x8000000 138 + 0x2 0x0 0x50000000 0x8000000 139 + 0x3 0x0 0x58000000 0x8000000>; 140 + clocks = <&pmc PMC_TYPE_CORE PMC_MCK1>; 141 + status = "disabled"; 142 + 143 + nand_controller: nand-controller { 144 + compatible = "atmel,sama5d3-nand-controller"; 145 + atmel,nfc-sram = <&nfc_sram>; 146 + atmel,nfc-io = <&nfc_io>; 147 + ecc-engine = <&pmecc>; 148 + #address-cells = <2>; 149 + #size-cells = <1>; 150 + ranges; 151 + status = "disabled"; 152 + }; 153 + }; 154 + 116 155 securam: securam@e0000000 { 117 156 compatible = "microchip,sama7g5-securam", "atmel,sama5d2-securam", "mmio-sram"; 118 157 reg = <0xe0000000 0x4000>; ··· 255 216 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; 256 217 clocks = <&pmc PMC_TYPE_PERIPHERAL 91>, <&pmc PMC_TYPE_PERIPHERAL 92>, <&pmc PMC_TYPE_PERIPHERAL 93>, <&clk32k 1>; 257 218 clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk"; 219 + }; 220 + 221 + hsmc: hsmc@e0808000 { 222 + compatible = "atmel,sama5d2-smc", "syscon", "simple-mfd"; 223 + reg = <0xe0808000 0x1000>; 224 + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; 225 + clocks = <&pmc PMC_TYPE_PERIPHERAL 21>; 226 + #address-cells = <1>; 227 + #size-cells = <1>; 228 + ranges; 229 + 230 + pmecc: ecc-engine@e0808070 { 231 + compatible = "atmel,sama5d2-pmecc"; 232 + reg = <0xe0808070 0x490>, 233 + <0xe0808500 0x200>; 234 + }; 258 235 }; 259 236 260 237 qspi0: spi@e080c000 {
+1
include/dt-bindings/clock/at91.h
··· 35 35 #define PMC_AUDIOIOPLL (PMC_MAIN + 7) 36 36 #define PMC_ETHPLL (PMC_MAIN + 8) 37 37 #define PMC_CPU (PMC_MAIN + 9) 38 + #define PMC_MCK1 (PMC_MAIN + 10) 38 39 39 40 #ifndef AT91_PMC_MOSCS 40 41 #define AT91_PMC_MOSCS 0 /* MOSCS Flag */