Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
131 changes: 126 additions & 5 deletions Documentation/devicetree/bindings/sound/adi,adsp-dai.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (c) 2026 Analog Devices, Inc.
Comment thread
sipraga marked this conversation as resolved.
Resolved
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/adi,adsp-dai.yaml#
Expand Down Expand Up @@ -38,12 +39,30 @@ properties:
reg:
maxItems: 1

'#clock-cells':
const: 1
description:
The DAI provides the clocks of its PCG units, named by their HRM
letter. Clock IDs are defined in include/dt-bindings/clock/adi,adsp-pcg.h.

clocks:
maxItems: 1
minItems: 1
maxItems: 9

clock-names:
items:
- const: sclk
description:
The clocks are in a fixed order, which depends on the SoC. sclk clocks
the register interface and is a PCG input, as are the other clocks.
sys_clkinN are the SYS_CLKIN pins. On the SC58x, DAIn is hardwired to
SYS_CLKINn, which is given as sys_clkin. fracnpllN are the outputs of
the SC84x fractional-N PLLs.

extN is an external input clock for the Nth PCG unit of this DAI, routed
from a DAI pin to PCG0_EXTCLKx_I via the SRU, where the units are A, B,
E, F on DAI0 and C, D, G, H on DAI1. Inputs which are not connected or not
used are given as <0> in the clocks property.
minItems: 1
maxItems: 9

adi,pads-syscon:
$ref: /schemas/types.yaml#/definitions/phandle
Expand All @@ -54,6 +73,7 @@ properties:
required:
- compatible
- reg
- '#clock-cells'
- clocks
- clock-names

Expand All @@ -70,14 +90,115 @@ allOf:
required:
- adi,pads-syscon

- if:
properties:
compatible:
contains:
const: adi,adsp-sc573-dai
then:
properties:
clocks:
maxItems: 5
clock-names:
minItems: 1
items:
- const: sclk
- const: sys_clkin0
- const: sys_clkin1
- const: ext0
- const: ext1

- if:
properties:
compatible:
contains:
const: adi,adsp-sc589-dai
then:
properties:
clocks:
maxItems: 4
clock-names:
minItems: 1
items:
- const: sclk
- const: sys_clkin
- const: ext0
- const: ext1

- if:
properties:
compatible:
contains:
const: adi,adsp-sc598-dai
then:
properties:
clocks:
maxItems: 7
clock-names:
minItems: 1
items:
- const: sclk
- const: sys_clkin0
- const: sys_clkin1
- const: ext0
- const: ext1
- const: ext2
- const: ext3

- if:
properties:
compatible:
contains:
const: adi,adsp-sc846-dai
then:
properties:
clock-names:
minItems: 1
items:
- const: sclk
- const: sys_clkin0
- const: sys_clkin1
- const: fracnpll0
- const: fracnpll1
- const: ext0
- const: ext1
- const: ext2
- const: ext3

additionalProperties: false

examples:
- |
/* SC598 DAI1, with an external clock for PCG unit D */
audio-controller@310ca000 {
compatible = "adi,adsp-sc598-dai";
reg = <0x310ca000 0x400>;
clocks = <&clk 42>;
clock-names = "sclk";
#clock-cells = <1>;
clocks = <&clk 42>, <&sys_clkin0>, <&sys_clkin1>, <0>, <&ext_mclk>;
clock-names = "sclk", "sys_clkin0", "sys_clkin1", "ext0", "ext1";
adi,pads-syscon = <&pads_syscon>;
};

- |
/* SC589 DAI1, which is hardwired to SYS_CLKIN1 */
audio-controller@310cb000 {
compatible = "adi,adsp-sc589-dai";
reg = <0x310cb000 0x400>;
#clock-cells = <1>;
clocks = <&clk 15>, <&sys_clkin1>;
clock-names = "sclk", "sys_clkin";
adi,pads-syscon = <&pads_syscon>;
};

- |
/* SC846 DAI0, with both fractional-N PLLs */
audio-controller@310c9000 {
compatible = "adi,adsp-sc846-dai";
reg = <0x310c9000 0x400>;
#clock-cells = <1>;
clocks = <&clk 20>, <&sys_clkin0>, <&sys_clkin1>,
<&fracnpll 0>, <&fracnpll 1>;
clock-names = "sclk", "sys_clkin0", "sys_clkin1",
"fracnpll0", "fracnpll1";
adi,pads-syscon = <&pads_syscon>;
};
3 changes: 2 additions & 1 deletion Documentation/devicetree/bindings/sound/adi,adsp-sport.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.1
# Copyright (c) 2026 Analog Devices, Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/adi,adsp-sport.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2328,6 +2328,7 @@ F: drivers/tty/serial/adi_uart4.c
F: drivers/usb/musb/adi.c
F: drivers/usb/musb/adi.h
F: drivers/watchdog/adi_wdt.c
F: include/dt-bindings/clock/adi,adsp-pcg.h
F: include/dt-bindings/clock/adi-sc5xx-clock.h
F: include/dt-bindings/pinctrl/adi,adsp-*pinctrl.h
F: include/dt-bindings/pinctrl/adi-adsp-sru.h
Expand Down
6 changes: 4 additions & 2 deletions arch/arm/boot/dts/adi/sc57x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@
clock-output-names = "sys_clkin0";
};

sys_clkin1: sys-clkin1@2 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <25000000>;
clock-output-names = "sys_clkin1";
};

Check warning on line 107 in arch/arm/boot/dts/adi/sc57x.dtsi

View workflow job for this annotation

GitHub Actions / build_gcc_arm / build

(unit_address_vs_reg): /sys-clkin1@2: node has a unit name, but no reg or ranges property

clk: clocks@3108d000 {
compatible = "adi,sc57x-clocks";
Expand Down Expand Up @@ -336,11 +336,11 @@
status = "okay";
};

sram_mmap: sram-mmap@0 { /* mmap from sram1 pool*/
compatible = "adi,sram-mmap";
adi,sram = <&sram1>;
status = "disabled";
};

Check warning on line 343 in arch/arm/boot/dts/adi/sc57x.dtsi

View workflow job for this annotation

GitHub Actions / build_gcc_arm / build

(simple_bus_reg): /scb/sram-mmap@0: missing or empty reg/ranges property

gptimer_counter: gptimer-counters@0 {
compatible = "adi,gptimer-counter";
Expand Down Expand Up @@ -627,8 +627,10 @@
dai0: audio-controller@310c9000 {
compatible = "adi,adsp-sc573-dai";
reg = <0x310c9000 0x400>;
clocks = <&clk ADSP_SC57X_CLK_CGU0_SCLK0>;
clock-names = "sclk";
#clock-cells = <1>;
clocks = <&clk ADSP_SC57X_CLK_CGU0_SCLK0>,
<&sys_clkin0>, <&sys_clkin1>;
clock-names = "sclk", "sys_clkin0", "sys_clkin1";
status = "disabled";
};

Expand Down
10 changes: 6 additions & 4 deletions arch/arm/boot/dts/adi/sc58x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -794,17 +794,19 @@
dai0: audio-controller@310c9000 {
compatible = "adi,adsp-sc589-dai";
reg = <0x310c9000 0x400>;
clocks = <&clk ADSP_SC58X_CLK_CGU0_SCLK0>;
clock-names = "sclk";
#clock-cells = <1>;
clocks = <&clk ADSP_SC58X_CLK_CGU0_SCLK0>, <&sys_clkin0>;
clock-names = "sclk", "sys_clkin";
adi,pads-syscon = <&pads_syscon>;
status = "disabled";
};

dai1: audio-controller@310cb000 {
compatible = "adi,adsp-sc589-dai";
reg = <0x310cb000 0x400>;
clocks = <&clk ADSP_SC58X_CLK_CGU0_SCLK0>;
clock-names = "sclk";
#clock-cells = <1>;
clocks = <&clk ADSP_SC58X_CLK_CGU0_SCLK0>, <&sys_clkin1>;
clock-names = "sclk", "sys_clkin";
adi,pads-syscon = <&pads_syscon>;
status = "disabled";
};
Expand Down
12 changes: 8 additions & 4 deletions arch/arm/boot/dts/adi/sc59x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -909,17 +909,21 @@
dai0: audio-controller@310c9000 {
compatible = "adi,adsp-sc594-dai", "adi,adsp-sc598-dai";
reg = <0x310c9000 0x400>;
clocks = <&clk ADSP_SC594_CLK_CGU0_SCLK0>;
clock-names = "sclk";
#clock-cells = <1>;
clocks = <&clk ADSP_SC594_CLK_CGU0_SCLK0>,
<&sys_clkin0>, <&sys_clkin1>;
clock-names = "sclk", "sys_clkin0", "sys_clkin1";
adi,pads-syscon = <&pads_syscon>;
status = "disabled";
};

dai1: audio-controller@310ca000 {
compatible = "adi,adsp-sc594-dai", "adi,adsp-sc598-dai";
reg = <0x310ca000 0x400>;
clocks = <&clk ADSP_SC594_CLK_CGU0_SCLK0>;
clock-names = "sclk";
#clock-cells = <1>;
clocks = <&clk ADSP_SC594_CLK_CGU0_SCLK0>,
<&sys_clkin0>, <&sys_clkin1>;
clock-names = "sclk", "sys_clkin0", "sys_clkin1";
adi,pads-syscon = <&pads_syscon>;
status = "disabled";
};
Expand Down
12 changes: 8 additions & 4 deletions arch/arm64/boot/dts/adi/sc59x-64.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -964,17 +964,21 @@
dai0: audio-controller@310c9000 {
compatible = "adi,adsp-sc598-dai";
reg = <0x310c9000 0x400>;
clocks = <&clk ADSP_SC598_CLK_CGU0_SCLK0>;
clock-names = "sclk";
#clock-cells = <1>;
clocks = <&clk ADSP_SC598_CLK_CGU0_SCLK0>,
<&sys_clkin0>, <&sys_clkin1>;
clock-names = "sclk", "sys_clkin0", "sys_clkin1";
adi,pads-syscon = <&pads_syscon>;
status = "disabled";
};

dai1: audio-controller@310ca000 {
compatible = "adi,adsp-sc598-dai";
reg = <0x310ca000 0x400>;
clocks = <&clk ADSP_SC598_CLK_CGU0_SCLK0>;
clock-names = "sclk";
#clock-cells = <1>;
clocks = <&clk ADSP_SC598_CLK_CGU0_SCLK0>,
<&sys_clkin0>, <&sys_clkin1>;
clock-names = "sclk", "sys_clkin0", "sys_clkin1";
adi,pads-syscon = <&pads_syscon>;
status = "disabled";
};
Expand Down
12 changes: 8 additions & 4 deletions arch/arm64/boot/dts/adi/sc846.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -928,17 +928,21 @@
dai0: audio-controller@310c9000 {
compatible = "adi,adsp-sc846-dai";
reg = <0x310c9000 0x400>;
clocks = <&clk ADSP_SC846_CLK_CGU0_SCLK0>;
clock-names = "sclk";
#clock-cells = <1>;
clocks = <&clk ADSP_SC846_CLK_CGU0_SCLK0>,
<&sys_clkin0>, <&sys_clkin1>;
clock-names = "sclk", "sys_clkin0", "sys_clkin1";
adi,pads-syscon = <&pads_syscon>;
status = "disabled";
};

dai1: audio-controller@310ca000 {
compatible = "adi,adsp-sc846-dai";
reg = <0x310ca000 0x400>;
clocks = <&clk ADSP_SC846_CLK_CGU0_SCLK0>;
clock-names = "sclk";
#clock-cells = <1>;
clocks = <&clk ADSP_SC846_CLK_CGU0_SCLK0>,
<&sys_clkin0>, <&sys_clkin1>;
clock-names = "sclk", "sys_clkin0", "sys_clkin1";
adi,pads-syscon = <&pads_syscon>;
status = "disabled";
};
Expand Down
12 changes: 12 additions & 0 deletions drivers/clk/adi/Kconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
config COMMON_CLK_ADI_PLL
bool
Expand All @@ -9,6 +9,18 @@
ADSP SoCs. The CDU selects and routes core system clocks to
various SoC specific peripherals.

config COMMON_CLK_ADI_ADSP_PCG
tristate "Analog Devices ADSP PCG driver"
depends on ADI_ADSP_DAI || COMPILE_TEST
default ADI_ADSP_DAI
select AUXILIARY_BUS
help
This enables the driver for the Precision Clock Generator (PCG) found
on Analog Devices ADSP SoCs.

The driver can also be built as a module. If so, the module will be
called clk-adsp-pcg.

config COMMON_CLK_ADI_SC57X
bool "ADI SC573 clock driver"
depends on ARCH_SC57X || COMPILE_TEST
Expand Down
1 change: 1 addition & 0 deletions drivers/clk/adi/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

obj-$(CONFIG_COMMON_CLK_ADI_ADSP_CDU) += clk-adsp-cdu.o
obj-$(CONFIG_COMMON_CLK_ADI_ADSP_PCG) += clk-adsp-pcg.o
obj-$(CONFIG_COMMON_CLK_ADI_PLL) += clk-adi-pll.o
obj-$(CONFIG_COMMON_CLK_ADI_SC846) += clk-adi-sc846.o
obj-$(CONFIG_COMMON_CLK_ADI_SC598) += clk-adi-sc598.o
Expand Down
Loading
Loading