Documentation / devicetree / bindings / spi / amlogic,a4-spifc.yaml


Based on kernel version 6.18. Page generated on 2025-12-02 09:03 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2025 Amlogic, Inc. All rights reserved
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/amlogic,a4-spifc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: SPI flash controller for Amlogic ARM SoCs

maintainers:
  - Liang Yang <liang.yang@amlogic.com>
  - Feng Chen <feng.chen@amlogic.com>
  - Xianwei Zhao <xianwei.zhao@amlogic.com>

description:
  The Amlogic SPI flash controller is an extended version of the Amlogic NAND
  flash controller. It supports SPI Nor Flash and SPI NAND Flash(where the Host
  ECC HW engine could be enabled).

allOf:
  - $ref: /schemas/spi/spi-controller.yaml#

properties:
  compatible:
    const: amlogic,a4-spifc

  reg:
    maxItems: 1

  clocks:
    items:
      - description: clock apb gate
      - description: clock used for the controller

  clock-names:
    items:
      - const: gate
      - const: core

  interrupts:
    maxItems: 1

  amlogic,rx-adj:
    description:
      Number of clock cycles by which sampling is delayed.
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3]
    default: 0

required:
  - compatible
  - reg
  - clocks
  - clock-names

unevaluatedProperties: false

examples:
  - |
    sfc0: spi@fe08d000 {
      compatible = "amlogic,a4-spifc";
      reg = <0xfe08d000 0x800>;
      clocks = <&clkc_periphs 31>,
               <&clkc_periphs 102>;
      clock-names = "gate", "core";
 
      pinctrl-0 = <&spiflash_default>;
      pinctrl-names = "default";
 
      #address-cells = <1>;
      #size-cells = <0>;
 
      flash@0 {
          compatible = "spi-nand";
          reg = <0>;
          #address-cells = <1>;
          #size-cells = <1>;
          nand-ecc-engine = <&sfc0>;
          nand-ecc-strength = <8>;
          nand-ecc-step-size = <512>;
      };
    };