[PATCH 1/3] spi: dt-bindings: add doc for Amlogic A113L2 SFC

Xianwei Zhao via B4 Relay devnull+xianwei.zhao.amlogic.com at kernel.org
Thu Aug 7 19:00:34 PDT 2025


From: Feng Chen <feng.chen at amlogic.com>

The Flash Controller is derived by adding an SPI path to the original
raw NAND controller. This controller supports two modes: raw mode and
SPI mode. The raw mode has already been implemented in the community,
and the SPI mode is described here.

Add bindings for Amlogic A113L2 SPI Flash Controller.

Signed-off-by: Feng Chen <feng.chen at amlogic.com>
Signed-off-by: Xianwei Zhao <xianwei.zhao at amlogic.com>
---
 .../devicetree/bindings/spi/amlogic,a4-spifc.yaml  | 104 +++++++++++++++++++++
 1 file changed, 104 insertions(+)

diff --git a/Documentation/devicetree/bindings/spi/amlogic,a4-spifc.yaml b/Documentation/devicetree/bindings/spi/amlogic,a4-spifc.yaml
new file mode 100644
index 000000000000..712a17a4b117
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/amlogic,a4-spifc.yaml
@@ -0,0 +1,104 @@
+# 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 at amlogic.com>
+  - Feng Chen <feng.chen at amlogic.com>
+  - Xianwei Zhao <xianwei.zhao at 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:
+    items:
+      - description: core registers
+      - description: parent clk control registers
+
+  reg-names:
+    items:
+      - const: core
+      - const: pclk
+
+  clocks:
+    items:
+      - description: clock gate
+      - description: clock used for the controller
+      - description: clock used for the SPI bus
+
+  clock-names:
+    items:
+      - const: gate
+      - const: core
+      - const: device
+
+  interrupts:
+    maxItems: 1
+
+  amlogic,sfc-enable-random:
+    description: Enable data scrambling
+    type: boolean
+
+  amlogic,sfc-no-hwecc:
+    description: Disable ECC HW engine
+    type: boolean
+
+  amlogic,rx-adj:
+    description:
+      Adjust sample timing for RX, Sampling time
+      move later by 1 bus clock.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 1, 2, 3]
+    default: 0
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - clocks
+  - clock-names
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    sfc0: spi at fe08d000 {
+      compatible = "amlogic,a4-spifc";
+      reg = <0xfe08d000 0x800>, <0xfe08c000 0x4>;
+      reg-names = "core", "pclk";
+      clocks = <&clkc_periphs 31>,
+               <&clkc_periphs 102>,
+               <&scmi_clk 13>;
+      clock-names = "gate", "core", "device";
+
+      pinctrl-0 = <&spiflash_default>;
+      pinctrl-names = "default";
+
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      flash at 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>;
+      };
+    };

-- 
2.37.1





More information about the linux-amlogic mailing list