| 1 |
# SPDX-License-Identifier: GPL-2.0 |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/mtd/allwinner,sun4i-a10-nand.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Allwinner A10 NAND Controller |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Chen-Yu Tsai <[email protected]> |
| 11 |
- Maxime Ripard <[email protected]> |
| 12 |
|
| 13 |
properties: |
| 14 |
compatible: |
| 15 |
enum: |
| 16 |
- allwinner,sun4i-a10-nand |
| 17 |
- allwinner,sun8i-a23-nand-controller |
| 18 |
- allwinner,sun50i-h616-nand-controller |
| 19 |
|
| 20 |
reg: |
| 21 |
maxItems: 1 |
| 22 |
|
| 23 |
interrupts: |
| 24 |
maxItems: 1 |
| 25 |
|
| 26 |
clocks: |
| 27 |
minItems: 2 |
| 28 |
items: |
| 29 |
- description: Bus Clock |
| 30 |
- description: Module Clock |
| 31 |
- description: ECC Clock |
| 32 |
- description: MBus Clock |
| 33 |
|
| 34 |
clock-names: |
| 35 |
minItems: 2 |
| 36 |
items: |
| 37 |
- const: ahb |
| 38 |
- const: mod |
| 39 |
- const: ecc |
| 40 |
- const: mbus |
| 41 |
|
| 42 |
resets: |
| 43 |
maxItems: 1 |
| 44 |
|
| 45 |
reset-names: |
| 46 |
const: ahb |
| 47 |
|
| 48 |
dmas: |
| 49 |
maxItems: 1 |
| 50 |
|
| 51 |
dma-names: |
| 52 |
const: rxtx |
| 53 |
|
| 54 |
patternProperties: |
| 55 |
"^nand@[a-f0-9]$": |
| 56 |
type: object |
| 57 |
$ref: raw-nand-chip.yaml |
| 58 |
properties: |
| 59 |
reg: |
| 60 |
minimum: 0 |
| 61 |
maximum: 7 |
| 62 |
|
| 63 |
nand-ecc-algo: |
| 64 |
const: bch |
| 65 |
|
| 66 |
nand-ecc-step-size: |
| 67 |
enum: [ 512, 1024 ] |
| 68 |
|
| 69 |
nand-ecc-strength: |
| 70 |
maximum: 80 |
| 71 |
|
| 72 |
allwinner,rb: |
| 73 |
description: |
| 74 |
Contains the native Ready/Busy IDs. |
| 75 |
$ref: /schemas/types.yaml#/definitions/uint32-array |
| 76 |
minItems: 1 |
| 77 |
maxItems: 2 |
| 78 |
items: |
| 79 |
minimum: 0 |
| 80 |
maximum: 1 |
| 81 |
|
| 82 |
unevaluatedProperties: false |
| 83 |
|
| 84 |
required: |
| 85 |
- compatible |
| 86 |
- reg |
| 87 |
- interrupts |
| 88 |
- clocks |
| 89 |
- clock-names |
| 90 |
|
| 91 |
unevaluatedProperties: false |
| 92 |
|
| 93 |
allOf: |
| 94 |
- $ref: nand-controller.yaml |
| 95 |
|
| 96 |
- if: |
| 97 |
properties: |
| 98 |
compatible: |
| 99 |
contains: |
| 100 |
enum: |
| 101 |
- allwinner,sun4i-a10-nand |
| 102 |
- allwinner,sun8i-a23-nand-controller |
| 103 |
then: |
| 104 |
properties: |
| 105 |
clocks: |
| 106 |
maxItems: 2 |
| 107 |
clock-names: |
| 108 |
maxItems: 2 |
| 109 |
|
| 110 |
- if: |
| 111 |
properties: |
| 112 |
compatible: |
| 113 |
contains: |
| 114 |
enum: |
| 115 |
- allwinner,sun50i-h616-nand-controller |
| 116 |
then: |
| 117 |
properties: |
| 118 |
clocks: |
| 119 |
minItems: 4 |
| 120 |
clock-names: |
| 121 |
minItems: 4 |
| 122 |
|
| 123 |
examples: |
| 124 |
- | |
| 125 |
#include <dt-bindings/interrupt-controller/arm-gic.h> |
| 126 |
#include <dt-bindings/clock/sun6i-rtc.h> |
| 127 |
#include <dt-bindings/clock/sun8i-a23-a33-ccu.h> |
| 128 |
#include <dt-bindings/reset/sun8i-a23-a33-ccu.h> |
| 129 |
|
| 130 |
nand-controller@1c03000 { |
| 131 |
compatible = "allwinner,sun8i-a23-nand-controller"; |
| 132 |
reg = <0x01c03000 0x1000>; |
| 133 |
interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; |
| 134 |
clocks = <&ccu CLK_BUS_NAND>, <&ccu CLK_NAND>; |
| 135 |
clock-names = "ahb", "mod"; |
| 136 |
resets = <&ccu RST_BUS_NAND>; |
| 137 |
reset-names = "ahb"; |
| 138 |
dmas = <&dma 5>; |
| 139 |
dma-names = "rxtx"; |
| 140 |
pinctrl-names = "default"; |
| 141 |
pinctrl-0 = <&nand_pins &nand_cs0_pin &nand_rb0_pin>; |
| 142 |
#address-cells = <1>; |
| 143 |
#size-cells = <0>; |
| 144 |
}; |
| 145 |
|
| 146 |
... |