Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
0b4bb76
dt-bindings: spi: phyhtium: add bindings for Phytium SPI
May 13, 2024
caf2f8f
arm64: spi: add Phytium SPI controller support
May 13, 2024
9f6b1b5
dt-bindings: spi: phytium-qspi: Document device tree binding
May 13, 2024
9f2e218
arm64: spi: Phytium-qspi: Add support for Phytium QSPI controller
May 13, 2024
25449d0
arm64: spi: Phytium: Fix controller unregister order
May 13, 2024
8daec42
arm64: spi: phytium: Extract right pointer from driver_data in PM ops
May 13, 2024
038f64d
arm64: spi: Phytium: Fix r/w sck_sel_mask 3 to 7 in SPI/QSPI driver
May 13, 2024
3674931
arm64: spi: Phytium: Adapt SPI driver to use DDMA interface
May 13, 2024
7f4fb2e
arm64: phytium: UEFI mode acpi table support for qspi/spi driver
May 13, 2024
1d7af13
mtd: phytium: Resolve some errors when '-Werror' was enabled
May 28, 2024
a8b7780
firmware: arm_scmi: Make mailbox transport poll on Phytium mailbox
hhhui-L May 16, 2024
8da93e4
hda: phytium: Add Phytium hda driver support
May 17, 2024
24e866a
hda: Implement a bit field in cmd_resend
Jul 7, 2024
eae726f
spi: phytium: fix 'Disabling IRQ #18'
Wenlp Aug 26, 2022
fc4554f
spi: Introduce dependencise for Phytium to avoid warnings
Aug 17, 2024
86858d4
add gf hdaudio 001 patch in deepin kernel 6.6
Dec 3, 2024
0dc6b70
sound: gf: adapt for v6.18
opsiff Dec 26, 2025
e857840
ALSA: hda: Add FTHD0001 match for Phytium
May 12, 2025
c6e9de2
qspi: phytium: Slove the capacity register configured error issue
newearth-ss Mar 10, 2026
eba7d1c
qspi: phytium: Fix the cmd_port register incorrectly configured issue
newearth-ss Mar 10, 2026
5073a06
qspi: phytium: Capacity register can't be configured without flash node
newearth-ss Mar 10, 2026
b4cb017
spi-v2: phytium: Add the debug log function to the driver
newearth-ss Mar 10, 2026
b127bad
spi-v2: phytium: Adapt the mcp251x device
newearth-ss Mar 10, 2026
839098a
qspi: phytium: Use the corresponding configurations for each chip
xiaqian1486 Jun 8, 2026
67bb3cf
spi: phytium-qspi: Fix uninitialized 'res' in probe
Avenger-285714 Aug 6, 2026
f61cb55
spi-v2: phytium: Restricted adaptation platform for SPI driver
Nov 10, 2025
d3d422e
spi: phytium: Use global-cs register to select chip by default
Aug 18, 2025
58df49a
spi: phytium: Restricted adaptation platform for SPI driver
Nov 18, 2025
5e49cfb
spi-v2: phytium: Add support for full-duplex transmission mode
Dec 4, 2025
e3e99fa
spi-v2: phytium: Add support ddr addr 0-45bit.
Dec 18, 2025
e299787
spi: phytium: Add ACPI FixedDMA support for DMA channels
Nov 21, 2025
d38805f
ALSA: hda: Remove the Phytium substream write from shared azx_pcm_pre…
opsiff Sep 7, 2026
3442893
spi: phytium: Fix division by zero on zero transfer speed in DMA path
opsiff Sep 7, 2026
28b307b
dt-bindings: spi: phytium-qspi: Fix unevaluatedProperties typo
opsiff Sep 7, 2026
2c28fd5
firmware: arm_scmi: Fix device_node leak in mailbox channel setup
opsiff Sep 7, 2026
53222ca
spi: phytium-qspi: Fix reg_name_array leak in probe
opsiff Sep 7, 2026
e745bb8
spi: phytium-qspi: Fix out-of-bounds flash array access in setup
opsiff Sep 7, 2026
bc13ca0
ALSA: hda: intel: Fix pci_dev leak in gf_init_pci
opsiff Sep 7, 2026
d2d8543
mtd: spi-nor: Drop unused adev variable in spi_nor_probe
opsiff Sep 7, 2026
2c53a19
ALSA: hda: Bound-check the frame buffer memcpy in gf_pre_trigger
opsiff Sep 7, 2026
0c757cd
ALSA: hda: Let RIRB IRQs run during CORB retries
opsiff Sep 7, 2026
08fc35e
ALSA: hda: phytium: Cancel pending IRQ work in azx_free
opsiff Sep 7, 2026
cbe43f5
spi: phytium-pci: Fix drvdata type confusion in PM ops
opsiff Sep 7, 2026
961ea07
mtd: partitions: Fix uninitialized compat in the ACPI parser path
opsiff Sep 7, 2026
3543907
firmware: arm_scmi: Rework the Phytium mailbox polling quirk
opsiff Sep 7, 2026
7e1cb27
mtd: acpipart: Fix uninitialized values, dead gate and %pOF misuse
opsiff Sep 7, 2026
d6eadd7
spi: phytium: Release DMA channels when IRQ request fails
opsiff Sep 7, 2026
fcba402
spi: phytium: Unregister the controller before shutting the chip down
opsiff Sep 7, 2026
8529907
spi: phytium-dma: Do not leave error pointers in the DMA channels
opsiff Sep 7, 2026
20b1548
spi: phytium-dma: Route TX-only large transfers through transfer_all
opsiff Sep 7, 2026
7f24a00
spi: phytium-qspi: Fix the dummy cycle encoding in exec_op
opsiff Sep 7, 2026
17f5452
spi: phytium-qspi: Check the reg-name allocation and ACPI resources
opsiff Sep 7, 2026
de0098a
spi: phytium-qspi: Balance runtime PM only in OF mode
opsiff Sep 7, 2026
8f1a11e
spi: phytium: Add a timeout to the polled transfer mode
opsiff Sep 7, 2026
4c7c441
spi: phytium: Guard the clock division against a zero transfer speed
opsiff Sep 7, 2026
903df88
spi: phytium-qspi: Check the direct mapping window before assigning
opsiff Sep 7, 2026
dad5f5b
spi: phytium-qspi: Mask the flash count to the CAP NUM field width
opsiff Sep 7, 2026
43a7b56
spi: phytium-qspi: Allow building without device tree
opsiff Sep 7, 2026
49fbc4e
ALSA: hda: intel: Harden the Glenfly frame buffer setup
opsiff Sep 7, 2026
e87de12
dt-bindings: spi: phytium: Fix the example and document driver proper…
opsiff Sep 7, 2026
6ea1a1d
spi: phytium-common: Capture spi_phytium_set return value in write
opsiff Sep 8, 2026
b320fa1
spi: phytium-common: Remove unconditional data[24] overwrite in xfer
opsiff Sep 8, 2026
12e0b22
spi: phytium-common: Cap DMA chunk size at SPI_TRANS_DATA_SIZE
opsiff Sep 8, 2026
cee531a
spi: phytium-plat-v2: Validate gpiod_count before using as kcalloc count
opsiff Sep 8, 2026
f306d97
spi: phytium-v2: Fix remove callback, ioremap check and timer lifecycle
opsiff Sep 8, 2026
6cde3e8
spi: phytium-common: Replace __virt_to_phys with DMA mapping API
opsiff Sep 8, 2026
6f50842
spi: phytium-qspi: Fix protocol validation, ret init, alloc ownership…
opsiff Sep 8, 2026
5476a80
spi: phytium: Change bus_num from u16 to int for dynamic numbering
opsiff Sep 8, 2026
b9699df
mtd: partitions: Propagate fwnode to partition devices and add cleanup
opsiff Sep 8, 2026
91dc92a
ALSA: hda: phytium: Fix probe failure cleanup and drop resume stream …
opsiff Sep 8, 2026
822ae63
mtd: acpipart: Remove the device-ID gate and fix slc-mode semantics
opsiff Sep 8, 2026
46a2d1d
spi: phytium-v2: Fix setup div-by-zero, completion race, ioremap leak…
opsiff Sep 8, 2026
6b541a1
ALSA: hda: Use proper MMIO access for Glenfly frame buffer writes
opsiff Sep 8, 2026
8bdaf7d
spi: phytium: Drop the architecture gate from the hidden SPI_PHYTIUM …
opsiff Sep 8, 2026
59cd367
spi: phytium-v2: Bound the command timeout and reject bufferless tran…
opsiff Sep 8, 2026
3daf3b3
spi: phytium-qspi: Cache the programmed flash capacity in dirmap mode
opsiff Sep 8, 2026
250272c
spi: phytium: Use IO accessors for the firmware shared memory mapping
opsiff Sep 8, 2026
a121744
spi: phytium-qspi: Validate clock divider before committing setup state
opsiff Sep 8, 2026
4c56250
spi: phytium-v2: Check RV2AP pending state and ack before completing
opsiff Sep 8, 2026
c5db558
spi: phytium-v2: Fail probe when firmware is unresponsive
opsiff Sep 8, 2026
5c6c375
spi: phytium-qspi: Handle unaligned leading offset in dirmap write
opsiff Sep 8, 2026
7135c1c
ALSA: hda: phytium: Fix irq_pending_work retry semantics and sleep
opsiff Sep 8, 2026
5ac80c9
ALSA: hda: phytium: Preserve platform_get_irq errors before request_irq
opsiff Sep 8, 2026
108472d
dt-bindings: phytium: Document spi-2.0 and hda compatibles
opsiff Sep 8, 2026
bfb04ba
mtd: partitions: Fix misspelled fwnode_handle forward declaration
opsiff Sep 8, 2026
a7bbdc8
spi: phytium-v2: Do not reinterpret client drvdata as spi_mem
opsiff Sep 8, 2026
2bdaabe
spi: phytium-v2: Adapt to the 6.18 SPI, GPIO and timer APIs
opsiff Sep 8, 2026
002062b
spi: phytium-v2: Return after chip erase instead of falling through
opsiff Sep 8, 2026
f4f9eb5
spi: phytium-v2: Rearm the alive timer only while monitoring is enabled
opsiff Sep 8, 2026
9c9f81a
ALSA: hda: Do not copy the whole framebuffer from the pointer callback
opsiff Sep 8, 2026
5546afb
spi: phytium-dma: Propagate controller error after DMA completion
opsiff Sep 8, 2026
0c81b36
dt-bindings: spi: phytium: Require two reg ranges for spi-2.0
opsiff Sep 8, 2026
af9f763
spi: phytium-v2: Fix the controller lifetime and unregister ordering
opsiff Sep 8, 2026
7da9774
spi: phytium: Put the controller in remove_host to fix a leak
opsiff Sep 8, 2026
c26ffac
spi: phytium: Return int from set_cmd8/16/32 and propagate failures
opsiff Sep 8, 2026
42f6b59
spi: phytium-dma: Guard the RX timeout division against a zero clock …
opsiff Sep 9, 2026
f78d5af
spi: phytium-common: Bound the flash command address buffer copies
opsiff Sep 9, 2026
c54ffda
spi: phytium-qspi: Program flash capacity when spi-nor loads late
opsiff Sep 9, 2026
4ce3de4
spi: phytium-qspi: Unregister the controller before shutting the hard…
opsiff Sep 9, 2026
b222f14
mtd: acpipart: Descend into the dedicated partitions container node
opsiff Sep 9, 2026
3a83132
ALSA: hda: phytium: Enable runtime power management
opsiff Sep 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions Documentation/devicetree/bindings/sound/phytium,hda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/phytium,hda.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Phytium HD Audio controller

maintainers:
- Chen Baozi <chenbaozi@phytium.com.cn>

properties:
compatible:
const: phytium,hda

reg:
minItems: 1
description: address and length of the HDA controller registers

interrupts:
maxItems: 1
description: HDA controller interrupt

clocks:
maxItems: 1
description: clock phandle for the HDA controller

required:
- compatible
- reg
- interrupts
- clocks

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>

hda: hda@2800d000 {
compatible = "phytium,hda";
reg = <0x0 0x2800d000 0x0 0x1000>;
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&sysclk_48mhz>;
};
70 changes: 70 additions & 0 deletions Documentation/devicetree/bindings/spi/phytium,qspi-nor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/phytium,qspi-nor.yaml#
$schema: http://devicetree.org/schemas/meta-schemas/core.yaml#

title: Phytium Quad Serial Peripheral Interface (QSPI) bindings

maintainers:
- Chen Baozi <chenbaozi@phytium.com.cn>

allOf:
- $ref: "spi-controller.yaml#"

properties:
compatible:
const: phytium,qspi-nor

reg:
items:
- description: registers
- description: memory mapping region

reg-names:
items:
- const: qspi
- const: qspi_mm

clocks:
maxItems: 1

no-direct-mapping:
$ref: /schemas/types.yaml#/definitions/flag
description:
Indicates if we can use direct mapping to access the flash

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

unevaluatedProperties: false

examples:
- |
qspi: qspi@28014000 {
compatible = "phytium,qspi-nor";
reg = <0x0 0x28014000 0x0 0x1000>,
<0x0 0x0 0x0 0x02000000>;
reg-names = "qspi", "qspi_mm";
clocks = <&sysclk_600mhz>;

#address-cells = <1>;
#size-cells = <0>;

flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-rx-bus-width = <4>;
spi-max-frequency = <600000000>;
};

flash@1 {
compatible = "jedec,spi-nor";
reg = <1>;
spi-rx-bus-width = <4>;
spi-max-frequency = <600000000>;
};
};
106 changes: 106 additions & 0 deletions Documentation/devicetree/bindings/spi/phytium,spi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/phytium,spi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Phytium SPI controller

maintainers:
- Chen Baozi <chenbaozi@phytium.com.cn>

allOf:
- $ref: spi-controller.yaml#
- if:
properties:
compatible:
contains:
const: phytium,spi-2.0
then:
properties:
reg:
minItems: 2
maxItems: 2
description:
reg[0]: register file window;
reg[1]: AP-RV shared memory window
required:
- reg
else:
properties:
reg:
minItems: 1
maxItems: 1

properties:
compatible:
oneOf:
- const: phytium,spi
- const: phytium,spi-2.0
description: Phytium SPI controller v2.0 interface
Comment on lines +38 to +40

reg:
minItems: 1
description: address and length of the spi master registers

interrupts:
maxItems: 1
description: should contain one interrupt

clocks:
maxItems: 1
description: spi clock phandle

num-cs:
$ref: /schemas/types.yaml#/definitions/uint32
description: number of chip selects used
default: 4

reg-io-width:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 4 ]
description: I/O register width in bytes
default: 4

global-cs:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 0, 1 ]
description: |
When set to 1, the controller drives all chip selects through a
single global chip-select line (GCSR mode).
default: 1

dmas:
minItems: 2
maxItems: 2
description: TX and RX DMA channel specifiers

dma-names:
items:
- const: rx
- const: tx

required:
- compatible
- "#address-cells"
- "#size-cells"
- reg
- interrupts
- clocks
- num-cs

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>

spi0: spi@2800c000 {
compatible = "phytium,spi";
#address-cells = <1>;
#size-cells = <0>;
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0x2800c000 0x0 0x1000>;
clocks = <&sysclk_48mhz>;
num-cs = <4>;
};
24 changes: 24 additions & 0 deletions drivers/firmware/arm_scmi/transports/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,30 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev,
}
}

/*
* The Phytium mailbox controller never raises the transfer-complete
* interrupt, so synchronous commands must be polled. Inspect the
* controller behind the a2p reply mailbox; a phandle that cannot be
* resolved is not fatal - just skip the quirk then.
*/
if (tx) {
struct of_phandle_args args;

/*
* mboxes is a phandle-with-args list; of_parse_phandle()
* does not account for #mbox-cells, so it can land on an
* argument cell instead of the controller node when the
* specifier has arguments. Use the full parser.
*/
if (!of_parse_phandle_with_args(cdev->of_node, "mboxes",
"#mbox-cells", a2p_rx_chan,
&args)) {
if (of_device_is_compatible(args.np, "phytium,mbox"))
cinfo->no_completion_irq = true;
of_node_put(args.np);
}
}

cinfo->transport_info = smbox;
smbox->cinfo = cinfo;
mutex_init(&smbox->chan_lock);
Expand Down
42 changes: 41 additions & 1 deletion drivers/mtd/mtdpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <linux/of_platform.h>
#include <linux/mtd/concat.h>

#include <linux/acpi.h>
#include <linux/property.h>
#include "mtdcore.h"

/*
Expand Down Expand Up @@ -90,6 +92,7 @@ static struct mtd_info *allocate_partition(struct mtd_info *parent,
child->dev.parent = IS_ENABLED(CONFIG_MTD_PARTITIONED_MASTER) || mtd_is_partition(parent) ?
&parent->dev : parent->dev.parent;
child->dev.of_node = part->of_node;
child->dev.fwnode = part->fwnode;
child->parent = parent;
child->part.offset = part->offset;
INIT_LIST_HEAD(&child->partitions);
Expand Down Expand Up @@ -525,12 +528,14 @@ EXPORT_SYMBOL_GPL(deregister_mtd_parser);
static const char * const default_mtd_part_types[] = {
"cmdlinepart",
"ofpart",
"acpipart",
NULL
};

/* Check DT only when looking for subpartitions. */
static const char * const default_subpartition_types[] = {
"ofpart",
"acpipart",
NULL
};

Expand Down Expand Up @@ -594,6 +599,39 @@ static struct mtd_part_parser *mtd_part_get_compatible_parser(const char *compat
return ret;
}

static int mtd_part_acpi_parse(struct mtd_info *master,
struct mtd_partitions *pparts)
{
struct mtd_part_parser *parser;
const char *compat = NULL;
const char *fixed = "acpi-fixed-partitions";
int ret, err = 0;
struct device *dev = &master->dev;

/*
* Only the master carries the "fixed" marker property; on
* subpartitions it is absent and no ACPI parsing is done.
*/
if (!mtd_is_partition(master))
fwnode_property_read_string(dev->fwnode, "fixed", &compat);

if (compat && !strcmp(compat, fixed)) {
parser = mtd_part_parser_get(fixed);
if (!parser && !request_module("%s", fixed))
parser = mtd_part_parser_get(fixed);
if (parser) {
ret = mtd_part_do_parse(parser, master, pparts, NULL);
if (ret > 0)
return ret;
mtd_part_parser_put(parser);
if (ret < 0 && !err)
err = ret;
}
}

return err;
}

static int mtd_part_of_parse(struct mtd_info *master,
struct mtd_partitions *pparts)
{
Expand Down Expand Up @@ -699,7 +737,9 @@ int parse_mtd_partitions(struct mtd_info *master, const char *const *types,
* should be used. It requires a bit different logic so it is
* handled in a separated function.
*/
if (!strcmp(*types, "ofpart")) {
if (!strcmp(*types, "acpipart")) {
ret = mtd_part_acpi_parse(master, &pparts);
} else if (!strcmp(*types, "ofpart")) {
ret = mtd_part_of_parse(master, &pparts);
} else {
pr_debug("%s: parsing partitions %s\n", master->name,
Expand Down
8 changes: 8 additions & 0 deletions drivers/mtd/parsers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ config MTD_OF_PARTS_LINKSYS_NS
two "firmware" partitions. Currently used firmware has to be detected
using CFE environment variable.

config MTD_ACPI_PARTS
tristate "ACPI partitioning parser"
depends on ACPI && (ARCH_PHYTIUM || COMPILE_TEST)
help
This provides an acpi partition parser, which is used to parse the
partition map described in ACPI table, as the children of the flash
memory struct.

config MTD_PARSER_IMAGETAG
tristate "Parser for BCM963XX Image Tag format partitions"
depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
Expand Down
2 changes: 2 additions & 0 deletions drivers/mtd/parsers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
ofpart-y += ofpart_core.o
ofpart-$(CONFIG_MTD_OF_PARTS_BCM4908) += ofpart_bcm4908.o
ofpart-$(CONFIG_MTD_OF_PARTS_LINKSYS_NS)+= ofpart_linksys_ns.o
obj-$(CONFIG_MTD_ACPI_PARTS) += acpipart.o
acpipart-y += acpipart_core.o
obj-$(CONFIG_MTD_PARSER_IMAGETAG) += parser_imagetag.o
obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
obj-$(CONFIG_MTD_PARSER_TPLINK_SAFELOADER) += tplink_safeloader.o
Expand Down
Loading
Loading