Skip to content

Commit ee2bfb0

Browse files
author
CKI KWF Bot
committed
Merge: Automotive: Backport SPI subsystem to v6.18-rc1
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1594 JIRA: https://issues.redhat.com/browse/RHEL-104570 Update various SPI drivers that are used by automotive boards. The list of patches to backport has been generated with: ``` $ ./subsys-commits.py spi -r 10.2 ``` Here is an annotated version I used while backporting: [patches_from_subsys_commits.txt](/uploads/5d5a81e2eea46a8a0f985ea4f1b8e951/patches_from_subsys_commits.txt) There are a bunch of `spi-cadence-quadspi` fixes missing because upstream is broken since commit b07f349. Here is the list of commits that are missing as of today: * `b07f349d1864 ("spi: spi-cadence-quadspi: Fix pm runtime unbalance")` * `04a8ff1bc351 ("spi: cadence-quadspi: fix cleanup of rx_chan on failure paths")` * `30dbc1c8d50f ("spi: cadence-qspi: defer runtime support on socfpga if reset bit is enabled")` This will be fixed upstream with: https://lore.kernel.org/all/20251009-cadence-quadspi-fix-pm-runtime-v2-1-8bdfefc43902@kernel.org/ There are also other fixes that are omitted since we only backported up to `v6.18-rc1`: Omitted-fix: f43579e ("spi: spi-nxp-fspi: limit the clock rate for different sample clock source selection") Omitted-fix: 6b6e031 ("spi: amlogic: fix spifc build error") Omitted-fix: a89103f ("spi: spi-nxp-fspi: re-config the clock rate when operation require new clock rate") Omitted-fix: ee795e8 ("spi: rockchip-sfc: Fix DMA-API usage") Signed-off-by: Mattijs Korpershoek <mkorpershoek@redhat.com> Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: John W. Linville <linville@redhat.com> Approved-by: Brian Masney <bmasney@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 0a06ab0 + d385fe1 commit ee2bfb0

File tree

194 files changed

+17695
-3717
lines changed

Some content is hidden

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

194 files changed

+17695
-3717
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
What: /sys/devices/.../intel_spi_protected
2+
Date: Feb 2025
3+
KernelVersion: 6.13
4+
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
5+
Description: This attribute allows the userspace to check if the
6+
Intel SPI flash controller is write protected from the host.
7+
8+
What: /sys/devices/.../intel_spi_locked
9+
Date: Feb 2025
10+
KernelVersion: 6.13
11+
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
12+
Description: This attribute allows the user space to check if the
13+
Intel SPI flash controller locks supported opcodes.
14+
15+
What: /sys/devices/.../intel_spi_bios_locked
16+
Date: Feb 2025
17+
KernelVersion: 6.13
18+
Contact: Alexander Usyskin <alexander.usyskin@intel.com>
19+
Description: This attribute allows the user space to check if the
20+
Intel SPI flash controller BIOS region is locked for writes.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/connector/gocontroll,moduline-module-slot.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: GOcontroll Moduline Module slot
8+
9+
maintainers:
10+
- Maud Spierings <maudspierings@gocontroll.com>
11+
12+
description:
13+
The GOcontroll Moduline module slot represents a connector that fullfills the
14+
Moduline slot specification, and can thus house any IO module that is also
15+
built to this spec.
16+
17+
properties:
18+
compatible:
19+
const: gocontroll,moduline-module-slot
20+
21+
reg:
22+
maxItems: 1
23+
24+
interrupts:
25+
description: indicates readiness, high means busy.
26+
maxItems: 1
27+
reset-gpios:
28+
description: resets the module, active low.
29+
maxItems: 1
30+
sync-gpios:
31+
description: sync line between all module slots.
32+
maxItems: 1
33+
34+
vdd-supply:
35+
description: low power 3v3 supply generally for the microcontroller.
36+
vddp-supply:
37+
description: medium power 5v0 supply for on module low power peripherals.
38+
vddhpp-supply:
39+
description: high power 6v-8v supply for on module high power peripherals.
40+
power-supply:
41+
description: high power 6v-30v supply for high power module circuits.
42+
43+
i2c-bus:
44+
description: i2c bus shared between module slots and the SoC
45+
$ref: /schemas/types.yaml#/definitions/phandle
46+
47+
slot-number:
48+
description:
49+
The number of the module slot representing the location of on the pcb.
50+
This enables access to the modules based on slot location.
51+
$ref: /schemas/types.yaml#/definitions/uint32
52+
53+
spi-max-frequency: true
54+
55+
required:
56+
- compatible
57+
- reg
58+
- reset-gpios
59+
- interrupts
60+
- sync-gpios
61+
- i2c-bus
62+
- slot-number
63+
64+
additionalProperties: false
65+
66+
examples:
67+
- |
68+
#include <dt-bindings/gpio/gpio.h>
69+
#include <dt-bindings/interrupt-controller/irq.h>
70+
71+
spi {
72+
#address-cells = <1>;
73+
#size-cells = <0>;
74+
75+
connector@0 {
76+
reg = <0>;
77+
compatible = "gocontroll,moduline-module-slot";
78+
reset-gpios = <&gpio5 10 GPIO_ACTIVE_LOW>;
79+
sync-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
80+
interrupt-parent = <&gpio4>;
81+
interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
82+
vdd-supply = <&reg_3v3_per>;
83+
vddp-supply = <&reg_5v0>;
84+
vddhpp-supply = <&reg_6v4>;
85+
i2c-bus = <&i2c2>;
86+
slot-number = <1>;
87+
};
88+
};

Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ required:
7575

7676
allOf:
7777
- $ref: /schemas/i2c/i2c-controller.yaml#
78+
- $ref: /schemas/soc/qcom/qcom,se-common-props.yaml#
7879
- if:
7980
properties:
8081
compatible:
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/misc/lwn,bk4-spi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Liebherr's BK4 external SPI controller
8+
9+
maintainers:
10+
- Lukasz Majewski <lukma@denx.de>
11+
12+
description: |
13+
Liebherr's BK4 external SPI controller is a device which handles data
14+
acquisition from compatible industrial peripherals.
15+
The SPI is used for data and management purposes in both master and
16+
slave modes.
17+
18+
allOf:
19+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
20+
21+
properties:
22+
compatible:
23+
const: lwn,bk4-spi
24+
25+
reg:
26+
maxItems: 1
27+
28+
spi-max-frequency:
29+
maximum: 30000000
30+
31+
fsl,spi-cs-sck-delay: true
32+
33+
fsl,spi-sck-cs-delay: true
34+
35+
required:
36+
- compatible
37+
- spi-max-frequency
38+
39+
additionalProperties: false
40+
41+
examples:
42+
- |
43+
spi {
44+
#address-cells = <1>;
45+
#size-cells = <0>;
46+
47+
spidev@0 {
48+
compatible = "lwn,bk4-spi";
49+
reg = <0>;
50+
spi-max-frequency = <30000000>;
51+
fsl,spi-cs-sck-delay = <200>;
52+
fsl,spi-sck-cs-delay = <400>;
53+
};
54+
};

Documentation/devicetree/bindings/misc/lwn-bk4.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

Documentation/devicetree/bindings/serial/qcom,serial-geni-qcom.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ maintainers:
1212

1313
allOf:
1414
- $ref: /schemas/serial/serial.yaml#
15+
- $ref: /schemas/soc/qcom/qcom,se-common-props.yaml#
1516

1617
properties:
1718
compatible:
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/soc/qcom/qcom,se-common-props.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: QUP Peripheral-specific properties for I2C, SPI and SERIAL bus
8+
9+
description:
10+
The Generic Interface (GENI) based Qualcomm Universal Peripheral (QUP) is
11+
a programmable module that supports a wide range of serial interfaces
12+
such as UART, SPI, I2C, I3C, etc. This defines the common properties used
13+
across QUP-supported peripherals.
14+
15+
maintainers:
16+
- Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
17+
- Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
18+
19+
properties:
20+
qcom,enable-gsi-dma:
21+
$ref: /schemas/types.yaml#/definitions/flag
22+
description:
23+
Configure the Serial Engine (SE) to transfer data in QCOM GPI DMA mode.
24+
By default, FIFO mode (PIO/CPU DMA) will be selected.
25+
26+
additionalProperties: true

Documentation/devicetree/bindings/spi/adi,axi-spi-engine.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ properties:
4141
- const: s_axi_aclk
4242
- const: spi_clk
4343

44+
trigger-sources:
45+
description:
46+
An array of trigger source phandles for offload instances. The index in
47+
the array corresponds to the offload instance number.
48+
minItems: 1
49+
maxItems: 32
50+
51+
dmas:
52+
description:
53+
DMA channels connected to the input or output stream interface of an
54+
offload instance.
55+
minItems: 1
56+
maxItems: 32
57+
58+
dma-names:
59+
items:
60+
pattern: "^offload(?:[12]?[0-9]|3[01])-[tr]x$"
61+
minItems: 1
62+
maxItems: 32
63+
4464
required:
4565
- compatible
4666
- reg
@@ -59,6 +79,10 @@ examples:
5979
clocks = <&clkc 15>, <&clkc 15>;
6080
clock-names = "s_axi_aclk", "spi_clk";
6181
82+
trigger-sources = <&trigger_clock>;
83+
dmas = <&dma 0>;
84+
dma-names = "offload0-rx";
85+
6286
#address-cells = <1>;
6387
#size-cells = <0>;
6488
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+
};

0 commit comments

Comments
 (0)