Unverified Commit 9ca01e92 authored by Mark Brown's avatar Mark Brown
Browse files

support for Amlogic SPI Flash Controller IP

Merge series from Xianwei Zhao <xianwei.zhao@amlogic.com>:

This 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
(drivers/mtd/nand/raw/meson_nand.c).
This submission supports the SPI mode.

Add the drivers and bindings corresponding to the SPI Flash Controller.
parents 2c625f0f 6a129b2c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -589,6 +589,7 @@ Nikolay Aleksandrov <razor@blackwall.org> <nikolay@redhat.com>
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@cumulusnetworks.com>
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@nvidia.com>
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@isovalent.com>
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba> <nobuhiro1.iwamatsu@toshiba.co.jp>
Odelu Kukatla <quic_okukatla@quicinc.com> <okukatla@codeaurora.org>
Oleksandr Natalenko <oleksandr@natalenko.name> <oleksandr@redhat.com>
Oleksij Rempel <linux@rempel-privat.de> <bug-track@fisher-privat.net>
+82 −0
Original line number Diff line number Diff line
# 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>;
      };
    };
+2 −3
Original line number Diff line number Diff line
@@ -433,9 +433,8 @@ Threaded NAPI

Threaded NAPI is an operating mode that uses dedicated kernel
threads rather than software IRQ context for NAPI processing.
The configuration is per netdevice and will affect all
NAPI instances of that device. Each NAPI instance will spawn a separate
thread (called ``napi/${ifc-name}-${napi-id}``).
Each threaded NAPI instance will spawn a separate thread
(called ``napi/${ifc-name}-${napi-id}``).

It is recommended to pin each kernel thread to a single CPU, the same
CPU as the CPU which services the interrupt. Note that the mapping
+25 −4
Original line number Diff line number Diff line
@@ -2253,8 +2253,15 @@ device_setup
    Default: 0x0000 
ignore_ctl_error
    Ignore any USB-controller regarding mixer interface (default: no)
    ``ignore_ctl_error=1`` may help when you get an error at accessing
    the mixer element such as URB error -22.  This happens on some
    buggy USB device or the controller.  This workaround corresponds to
    the ``quirk_flags`` bit 14, too.
autoclock
    Enable auto-clock selection for UAC2 devices (default: yes)
lowlatency
    Enable low latency playback mode (default: yes).
    Could disable it to switch back to the old mode if face a regression.
quirk_alias
    Quirk alias list, pass strings like ``0123abcd:5678beef``, which
    applies the existing quirk for the device 5678:beef to a new
@@ -2284,6 +2291,11 @@ delayed_register
    The driver prints a message like "Found post-registration device
    assignment: 1234abcd:04" for such a device, so that user can
    notice the need.
skip_validation
    Skip unit descriptor validation (default: no).
    The option is used to ignores the validation errors with the hexdump
    of the unit descriptor instead of a driver probe error, so that we
    can check its details.
quirk_flags
    Contains the bit flags for various device specific workarounds.
    Applied to the corresponding card index.
@@ -2307,6 +2319,16 @@ quirk_flags
        * bit 16: Set up the interface at first like UAC1
        * bit 17: Apply the generic implicit feedback sync mode
        * bit 18: Don't apply implicit feedback sync mode
        * bit 19: Don't closed interface during setting sample rate
        * bit 20: Force an interface reset whenever stopping & restarting
          a stream
        * bit 21: Do not set PCM rate (frequency) when only one rate is
          available for the given endpoint.
        * bit 22: Set the fixed resolution 16 for Mic Capture Volume
        * bit 23: Set the fixed resolution 384 for Mic Capture Volume
        * bit 24: Set minimum volume control value as mute for devices
          where the lowest playback value represents muted state instead
          of minimum audible volume

This module supports multiple devices, autoprobe and hotplugging.

@@ -2314,10 +2336,9 @@ NB: ``nrpacks`` parameter can be modified dynamically via sysfs.
Don't put the value over 20.  Changing via sysfs has no sanity
check.

NB: ``ignore_ctl_error=1`` may help when you get an error at accessing
the mixer element such as URB error -22.  This happens on some
buggy USB device or the controller.  This workaround corresponds to
the ``quirk_flags`` bit 14, too.
NB: ``ignore_ctl_error=1`` just provides a quick way to work around the
issues.  If you have a buggy device that requires these quirks, please
report it to the upstream.

NB: ``quirk_alias`` option is provided only for testing / development.
If you want to have a proper support, contact to upstream for
+21 −3
Original line number Diff line number Diff line
@@ -1318,6 +1318,16 @@ S: Maintained
F:	Documentation/devicetree/bindings/rtc/amlogic,a4-rtc.yaml
F:	drivers/rtc/rtc-amlogic-a4.c
AMLOGIC SPIFC DRIVER
M:	Liang Yang <liang.yang@amlogic.com>
M:	Feng Chen <feng.chen@amlogic.com>
M:	Xianwei Zhao <xianwei.zhao@amlogic.com>
L:	linux-amlogic@lists.infradead.org
L:	linux-spi@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/spi/amlogic,a4-spifc.yaml
F:	drivers/spi/spi-amlogic-spifc-a4.c
AMLOGIC SPISG DRIVER
M:	Sunny Luo <sunny.luo@amlogic.com>
M:	Xianwei Zhao <xianwei.zhao@amlogic.com>
@@ -3526,7 +3536,7 @@ F: Documentation/devicetree/bindings/arm/ti/nspire.yaml
F:	arch/arm/boot/dts/nspire/
ARM/TOSHIBA VISCONTI ARCHITECTURE
M:	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
M:	Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti.git
@@ -3667,6 +3677,7 @@ F: drivers/virt/coco/arm-cca-guest/
F:	drivers/virt/coco/pkvm-guest/
F:	tools/testing/selftests/arm64/
X:	arch/arm64/boot/dts/
X:	arch/arm64/configs/defconfig
ARROW SPEEDCHIPS XRS7000 SERIES ETHERNET SWITCH DRIVER
M:	George McCollister <george.mccollister@gmail.com>
@@ -7820,7 +7831,7 @@ Q: https://patchwork.freedesktop.org/project/nouveau/
Q:	https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests
B:	https://gitlab.freedesktop.org/drm/nouveau/-/issues
C:	irc://irc.oftc.net/nouveau
T:	git https://gitlab.freedesktop.org/drm/nouveau.git
T:	git https://gitlab.freedesktop.org/drm/misc/kernel.git
F:	drivers/gpu/drm/nouveau/
F:	include/uapi/drm/nouveau_drm.h
@@ -10388,7 +10399,7 @@ S: Maintained
F:	drivers/input/touchscreen/goodix*
GOOGLE ETHERNET DRIVERS
M:	Jeroen de Borst <jeroendb@google.com>
M:	Joshua Washington <joshwash@google.com>
M:	Harshitha Ramamurthy <hramamurthy@google.com>
L:	netdev@vger.kernel.org
S:	Maintained
@@ -17850,6 +17861,7 @@ F: net/ipv6/tcp*.c
NETWORKING [TLS]
M:	John Fastabend <john.fastabend@gmail.com>
M:	Jakub Kicinski <kuba@kernel.org>
M:	Sabrina Dubroca <sd@queasysnail.net>
L:	netdev@vger.kernel.org
S:	Maintained
F:	include/net/tls.h
@@ -24252,6 +24264,12 @@ S: Maintained
F:	Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
F:	drivers/input/keyboard/sun4i-lradc-keys.c
SUNDANCE NETWORK DRIVER
M:	Denis Kirjanov <dkirjanov@suse.de>
L:	netdev@vger.kernel.org
S:	Maintained
F:	drivers/net/ethernet/dlink/sundance.c
SUNPLUS ETHERNET DRIVER
M:	Wells Lu <wellslutw@gmail.com>
L:	netdev@vger.kernel.org
Loading