On 08/12/2022 07:29, Xiangsheng Hou wrote: > Split MediaTek ECC engine with rawnand controller and convert to > YAML schema. > > Signed-off-by: Xiangsheng Hou <xiangsheng.hou@xxxxxxxxxxxx> > --- > .../bindings/mtd/mediatek,mtk-nfc.yaml | 154 +++++++++++++++ > .../mtd/mediatek,nand-ecc-engine.yaml | 62 ++++++ > .../devicetree/bindings/mtd/mtk-nand.txt | 176 ------------------ > 3 files changed, 216 insertions(+), 176 deletions(-) > create mode 100644 Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml > create mode 100644 Documentation/devicetree/bindings/mtd/mediatek,nand-ecc-engine.yaml > delete mode 100644 Documentation/devicetree/bindings/mtd/mtk-nand.txt > > diff --git a/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml b/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml > new file mode 100644 > index 000000000000..eb1a44c7ae4e > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml > @@ -0,0 +1,154 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mtd/mediatek,mtk-nfc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MediaTek(MTK) SoCs raw NAND FLASH controller (NFC) > + > +maintainers: > + - Xiangsheng Hou <xiangsheng.hou@xxxxxxxxxxxx> > + > +properties: > + compatible: > + enum: > + - mediatek,mt2701-nfc > + - mediatek,mt2712-nfc > + - mediatek,mt7622-nfc > + > + reg: > + items: > + - description: Base physical address and size of NFI. > + > + interrupts: > + items: > + - description: NFI interrupt > + > + clocks: > + items: > + - description: clock used for the controller > + - description: clock used for the pad > + > + clock-names: > + items: > + - const: nfi_clk > + - const: pad_clk > + > + ecc-engine: > + description: device-tree node of the required ECC engine. > + $ref: /schemas/types.yaml#/definitions/phandle > + > +patternProperties: > + "^nand@[a-f0-9]$": > + type: object This should be instead: $ref: nand-chip.yaml# unevaluatedProperties: false and then properties below (due to current dtschema limitations) should list properties from nand-controller.yaml: nand-on-flash-bbt: true Optionally, we could create additional schema - nand-controller-chip, which would be referenced directly by nand-controller and itself would ref nand-chip. > + properties: > + reg: > + minimum: 0 no need, 0 is the minimum. > + maximum: 1 > + nand-ecc-mode: > + const: hw > + > +allOf: > + - $ref: nand-controller.yaml# > + > + - if: Best regards, Krzysztof