Skip to content

Commit 9ca01e9

Browse files
committed
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.
2 parents 2c625f0 + 6a129b2 commit 9ca01e9

294 files changed

Lines changed: 5902 additions & 1234 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ Nikolay Aleksandrov <razor@blackwall.org> <nikolay@redhat.com>
589589
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@cumulusnetworks.com>
590590
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@nvidia.com>
591591
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@isovalent.com>
592+
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba> <nobuhiro1.iwamatsu@toshiba.co.jp>
592593
Odelu Kukatla <quic_okukatla@quicinc.com> <okukatla@codeaurora.org>
593594
Oleksandr Natalenko <oleksandr@natalenko.name> <oleksandr@redhat.com>
594595
Oleksij Rempel <linux@rempel-privat.de> <bug-track@fisher-privat.net>
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright (C) 2025 Amlogic, Inc. All rights reserved
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/spi/amlogic,a4-spifc.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: SPI flash controller for Amlogic ARM SoCs
9+
10+
maintainers:
11+
- Liang Yang <liang.yang@amlogic.com>
12+
- Feng Chen <feng.chen@amlogic.com>
13+
- Xianwei Zhao <xianwei.zhao@amlogic.com>
14+
15+
description:
16+
The Amlogic SPI flash controller is an extended version of the Amlogic NAND
17+
flash controller. It supports SPI Nor Flash and SPI NAND Flash(where the Host
18+
ECC HW engine could be enabled).
19+
20+
allOf:
21+
- $ref: /schemas/spi/spi-controller.yaml#
22+
23+
properties:
24+
compatible:
25+
const: amlogic,a4-spifc
26+
27+
reg:
28+
maxItems: 1
29+
30+
clocks:
31+
items:
32+
- description: clock apb gate
33+
- description: clock used for the controller
34+
35+
clock-names:
36+
items:
37+
- const: gate
38+
- const: core
39+
40+
interrupts:
41+
maxItems: 1
42+
43+
amlogic,rx-adj:
44+
description:
45+
Number of clock cycles by which sampling is delayed.
46+
$ref: /schemas/types.yaml#/definitions/uint32
47+
enum: [0, 1, 2, 3]
48+
default: 0
49+
50+
required:
51+
- compatible
52+
- reg
53+
- clocks
54+
- clock-names
55+
56+
unevaluatedProperties: false
57+
58+
examples:
59+
- |
60+
sfc0: spi@fe08d000 {
61+
compatible = "amlogic,a4-spifc";
62+
reg = <0xfe08d000 0x800>;
63+
clocks = <&clkc_periphs 31>,
64+
<&clkc_periphs 102>;
65+
clock-names = "gate", "core";
66+
67+
pinctrl-0 = <&spiflash_default>;
68+
pinctrl-names = "default";
69+
70+
#address-cells = <1>;
71+
#size-cells = <0>;
72+
73+
flash@0 {
74+
compatible = "spi-nand";
75+
reg = <0>;
76+
#address-cells = <1>;
77+
#size-cells = <1>;
78+
nand-ecc-engine = <&sfc0>;
79+
nand-ecc-strength = <8>;
80+
nand-ecc-step-size = <512>;
81+
};
82+
};

Documentation/networking/napi.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,8 @@ Threaded NAPI
433433

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

440439
It is recommended to pin each kernel thread to a single CPU, the same
441440
CPU as the CPU which services the interrupt. Note that the mapping

Documentation/sound/alsa-configuration.rst

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,8 +2253,15 @@ device_setup
22532253
Default: 0x0000
22542254
ignore_ctl_error
22552255
Ignore any USB-controller regarding mixer interface (default: no)
2256+
``ignore_ctl_error=1`` may help when you get an error at accessing
2257+
the mixer element such as URB error -22. This happens on some
2258+
buggy USB device or the controller. This workaround corresponds to
2259+
the ``quirk_flags`` bit 14, too.
22562260
autoclock
22572261
Enable auto-clock selection for UAC2 devices (default: yes)
2262+
lowlatency
2263+
Enable low latency playback mode (default: yes).
2264+
Could disable it to switch back to the old mode if face a regression.
22582265
quirk_alias
22592266
Quirk alias list, pass strings like ``0123abcd:5678beef``, which
22602267
applies the existing quirk for the device 5678:beef to a new
@@ -2284,6 +2291,11 @@ delayed_register
22842291
The driver prints a message like "Found post-registration device
22852292
assignment: 1234abcd:04" for such a device, so that user can
22862293
notice the need.
2294+
skip_validation
2295+
Skip unit descriptor validation (default: no).
2296+
The option is used to ignores the validation errors with the hexdump
2297+
of the unit descriptor instead of a driver probe error, so that we
2298+
can check its details.
22872299
quirk_flags
22882300
Contains the bit flags for various device specific workarounds.
22892301
Applied to the corresponding card index.
@@ -2307,17 +2319,26 @@ quirk_flags
23072319
* bit 16: Set up the interface at first like UAC1
23082320
* bit 17: Apply the generic implicit feedback sync mode
23092321
* bit 18: Don't apply implicit feedback sync mode
2322+
* bit 19: Don't closed interface during setting sample rate
2323+
* bit 20: Force an interface reset whenever stopping & restarting
2324+
a stream
2325+
* bit 21: Do not set PCM rate (frequency) when only one rate is
2326+
available for the given endpoint.
2327+
* bit 22: Set the fixed resolution 16 for Mic Capture Volume
2328+
* bit 23: Set the fixed resolution 384 for Mic Capture Volume
2329+
* bit 24: Set minimum volume control value as mute for devices
2330+
where the lowest playback value represents muted state instead
2331+
of minimum audible volume
23102332

23112333
This module supports multiple devices, autoprobe and hotplugging.
23122334

23132335
NB: ``nrpacks`` parameter can be modified dynamically via sysfs.
23142336
Don't put the value over 20. Changing via sysfs has no sanity
23152337
check.
23162338

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

23222343
NB: ``quirk_alias`` option is provided only for testing / development.
23232344
If you want to have a proper support, contact to upstream for

MAINTAINERS

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,6 +1318,16 @@ S: Maintained
13181318
F: Documentation/devicetree/bindings/rtc/amlogic,a4-rtc.yaml
13191319
F: drivers/rtc/rtc-amlogic-a4.c
13201320

1321+
AMLOGIC SPIFC DRIVER
1322+
M: Liang Yang <liang.yang@amlogic.com>
1323+
M: Feng Chen <feng.chen@amlogic.com>
1324+
M: Xianwei Zhao <xianwei.zhao@amlogic.com>
1325+
L: linux-amlogic@lists.infradead.org
1326+
L: linux-spi@vger.kernel.org
1327+
S: Maintained
1328+
F: Documentation/devicetree/bindings/spi/amlogic,a4-spifc.yaml
1329+
F: drivers/spi/spi-amlogic-spifc-a4.c
1330+
13211331
AMLOGIC SPISG DRIVER
13221332
M: Sunny Luo <sunny.luo@amlogic.com>
13231333
M: Xianwei Zhao <xianwei.zhao@amlogic.com>
@@ -3526,7 +3536,7 @@ F: Documentation/devicetree/bindings/arm/ti/nspire.yaml
35263536
F: arch/arm/boot/dts/nspire/
35273537

35283538
ARM/TOSHIBA VISCONTI ARCHITECTURE
3529-
M: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
3539+
M: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
35303540
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
35313541
S: Supported
35323542
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/
36673677
F: drivers/virt/coco/pkvm-guest/
36683678
F: tools/testing/selftests/arm64/
36693679
X: arch/arm64/boot/dts/
3680+
X: arch/arm64/configs/defconfig
36703681

36713682
ARROW SPEEDCHIPS XRS7000 SERIES ETHERNET SWITCH DRIVER
36723683
M: George McCollister <george.mccollister@gmail.com>
@@ -7820,7 +7831,7 @@ Q: https://patchwork.freedesktop.org/project/nouveau/
78207831
Q: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests
78217832
B: https://gitlab.freedesktop.org/drm/nouveau/-/issues
78227833
C: irc://irc.oftc.net/nouveau
7823-
T: git https://gitlab.freedesktop.org/drm/nouveau.git
7834+
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
78247835
F: drivers/gpu/drm/nouveau/
78257836
F: include/uapi/drm/nouveau_drm.h
78267837

@@ -10388,7 +10399,7 @@ S: Maintained
1038810399
F: drivers/input/touchscreen/goodix*
1038910400

1039010401
GOOGLE ETHERNET DRIVERS
10391-
M: Jeroen de Borst <jeroendb@google.com>
10402+
M: Joshua Washington <joshwash@google.com>
1039210403
M: Harshitha Ramamurthy <hramamurthy@google.com>
1039310404
L: netdev@vger.kernel.org
1039410405
S: Maintained
@@ -17850,6 +17861,7 @@ F: net/ipv6/tcp*.c
1785017861
NETWORKING [TLS]
1785117862
M: John Fastabend <john.fastabend@gmail.com>
1785217863
M: Jakub Kicinski <kuba@kernel.org>
17864+
M: Sabrina Dubroca <sd@queasysnail.net>
1785317865
L: netdev@vger.kernel.org
1785417866
S: Maintained
1785517867
F: include/net/tls.h
@@ -24252,6 +24264,12 @@ S: Maintained
2425224264
F: Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
2425324265
F: drivers/input/keyboard/sun4i-lradc-keys.c
2425424266

24267+
SUNDANCE NETWORK DRIVER
24268+
M: Denis Kirjanov <dkirjanov@suse.de>
24269+
L: netdev@vger.kernel.org
24270+
S: Maintained
24271+
F: drivers/net/ethernet/dlink/sundance.c
24272+
2425524273
SUNPLUS ETHERNET DRIVER
2425624274
M: Wells Lu <wellslutw@gmail.com>
2425724275
L: netdev@vger.kernel.org

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
VERSION = 6
33
PATCHLEVEL = 17
44
SUBLEVEL = 0
5-
EXTRAVERSION = -rc4
5+
EXTRAVERSION = -rc5
66
NAME = Baby Opossum Posse
77

88
# *DOCUMENTATION*

arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@
387387

388388
&sdmmc1 {
389389
bus-width = <4>;
390+
no-1-8-v;
391+
sdhci-caps-mask = <0x0 0x00200000>;
390392
pinctrl-names = "default";
391393
pinctrl-0 = <&pinctrl_sdmmc1_default>;
392394
status = "okay";

arch/arm/boot/dts/rockchip/rk3128-xpi-3128.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
phy-mode = "rmii";
273273
phy-handle = <&phy0>;
274274
assigned-clocks = <&cru SCLK_MAC_SRC>;
275-
assigned-clock-rates= <50000000>;
275+
assigned-clock-rates = <50000000>;
276276
pinctrl-names = "default";
277277
pinctrl-0 = <&rmii_pins>;
278278
status = "okay";

arch/arm/boot/dts/rockchip/rv1109-relfor-saib.dts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@
250250
&i2s0 {
251251
/delete-property/ pinctrl-0;
252252
rockchip,trcm-sync-rx-only;
253-
pinctrl-0 = <&i2s0m0_sclk_rx>,
254-
<&i2s0m0_lrck_rx>,
255-
<&i2s0m0_sdi0>;
253+
pinctrl-0 = <&i2s0m0_sclk_rx>,
254+
<&i2s0m0_lrck_rx>,
255+
<&i2s0m0_sdi0>;
256256
pinctrl-names = "default";
257257
status = "okay";
258258
};

arch/arm/mach-at91/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2+
config ARCH_MICROCHIP
3+
bool
4+
25
menuconfig ARCH_AT91
36
bool "AT91/Microchip SoCs"
47
depends on (CPU_LITTLE_ENDIAN && (ARCH_MULTI_V4T || ARCH_MULTI_V5)) || \
@@ -8,6 +11,7 @@ menuconfig ARCH_AT91
811
select GPIOLIB
912
select PINCTRL
1013
select SOC_BUS
14+
select ARCH_MICROCHIP
1115

1216
if ARCH_AT91
1317
config SOC_SAMV7

0 commit comments

Comments
 (0)