Add a yaml binding document for the Samsung OneNAND controller. It is found in several older Samsung SoC, notably the S5PV210. Signed-off-by: Jonathan Bakker <xc-racer2@xxxxxxx> --- .../bindings/mtd/samsung,onenand.yaml | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/samsung,onenand.yaml diff --git a/Documentation/devicetree/bindings/mtd/samsung,onenand.yaml b/Documentation/devicetree/bindings/mtd/samsung,onenand.yaml new file mode 100644 index 000000000000..25012248add6 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/samsung,onenand.yaml @@ -0,0 +1,89 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/samsung,onenand.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung OneNAND controller + +maintainers: + - Jonathan Bakker <xc-racer2@xxxxxxx> + +properties: + compatible: + enum: + - samsung,s3c6400-onenand + - samsung,s3c6410-onenand + - samsung,s5pv210-onenand + + reg: + maxItems: 3 + + interrupts: + maxItems: 1 + + clock-names: + items: + - const: bus + - const: onenand + + clocks: + minItems: 2 + maxItems: 2 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +allOf: + - $ref: nand-controller.yaml + + - if: + properties: + compatible: + contains: + enum: + - samsung,s5pv210-onenand + then: + required: + - interrupts + - clock-names + - clocks + +patternProperties: + "^nand@[a-f0-9]+$": + type: object + properties: + reg: + minimum: 0 + maximum: 1 + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/s5pv210.h> + onenand: nand-controller@b0600000 { + compatible = "samsung,s5pv210-onenand"; + reg = <0xb0600000 0x2000>, + <0xb0000000 0x20000>, + <0xb0040000 0x20000>; + interrupt-parent = <&vic1>; + interrupts = <31>; + clocks = <&clocks CLK_NANDXL>, <&clocks DOUT_FLASH>; + clock-names = "bus", "onenand"; + #address-cells = <1>; + #size-cells = <0>; + + nand@0 { + reg = <0>; + }; + }; -- 2.30.2