allwinner: a523: Enable I2S and SPDIF TX
Subsystems (6)
Chen-Yu Tsai
maintainercover allwinner: a523: Enable I2S and SPDIF TX
Hi folks,
This series enables the SPDIF and I2S hardware found on the Allwinner A523/A527/T527 family SoCs. These SoCs have one SPDIF interface and four I2S interfaces. All of them are capable of both playback and capture, however the SPDIF driver only supports playback.
The series is organized by subsystem, so each maintainer can find the patches they need to take.
Patch 1 adds SoC/hardware specific compatibles for the two DMA controllers in the A523 SoC.
Patch 2 adds an SoC specific compatible for the I2S interface controllers in the A523 SoC.
Patch 3 adds an SoC specific compatible for the SPDIF interface controller in the A523 SoC.
Patch 4 adds driver support for the SPDIF interface.
Patch 5 marks a clock related to the DMA controller as critical. The docs are quite vague on how this particular clock gate ties in with the other memory bus gate that the DMA controller needs.
Patch 6 tweaks the software lower limit of the audio PLL.
Patch 7 adds devices nodes for the DMA controllers.
Patch 8 adds a devices node for the SPDIF interface controller.
Patch 9 adds device nodes for the I2S interface controllers.
Patch 10 adds one set of pinmux settings for I2S2.
Patch 11 is what I used to test the changes, and serves as an example for how to use these new interfaces.
Patch 1 can go through the dmaengine tree, or I can take it through the sunxi tree.
Patches 2 through 4 should go through the ASoC tree.
The rest, except the example, will go through the sunxi tree.
Please take a look.
Thanks
ChenYu
Chen-Yu Tsai (11):
dt-bindings: dma: allwinner,sun50i-a64-dma: Add compatibles for A523
ASoC: dt-bindings: allwinner,sun4i-a10-i2s: Add compatible for A523
ASoC: dt-bindings: allwinner,sun4i-a10-spdif: Add compatible for A523
ASoC: sun4i-spdif: Support SPDIF output on A523 family
clk: sunxi-ng: sun55i-a523-r-ccu: Mark bus-r-dma as critical
clk: sunxi-ng: sun55i-a523-ccu: Lower audio0 pll minimum rate
arm64: dts: allwinner: a523: Add DMA controller device nodes
arm64: dts: allwinner: a523: Add device node for SPDIF block
arm64: dts: allwinner: a523: Add device nodes for I2S controllers
arm64: dts: allwinner: a523: Add I2S2 pins on PI pin group [EXAMPLE] arm64: dts: allwinner: a527-cubie-a5e: Enable I2S and SPDIF
output
.../dma/allwinner,sun50i-a64-dma.yaml | 5 +- .../sound/allwinner,sun4i-a10-i2s.yaml | 4 +- .../sound/allwinner,sun4i-a10-spdif.yaml | 44 +++++- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 135 ++++++++++++++++++ .../dts/allwinner/sun55i-a527-cubie-a5e.dts | 52 +++++++ drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 2 +- drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 2 +- sound/soc/sunxi/sun4i-spdif.c | 28 +++- 8 files changed, 259 insertions(+), 13 deletions(-)
Signature · 1 line
2.47.3
Chen-Yu Tsai
maintainerPATCH 1/11 dt-bindings: dma: allwinner,sun50i-a64-dma: Add compatibles for A523
From: Chen-Yu Tsai <[email protected]>
There are two DMA controllers on the A523, one in the main system area and the other for the MCU. These are the same as the one found on the A100. The only difference is the DMA endpoint (DRQ) layout.
Since the number of channels and endpoints are described with additional generic properties, just add new A523-specific compatible strings and fallback to the A100 one.
---
I could probably take this through the soc tree if Vinod gives an ack.
.../devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml +4 -1
@@ -29,7 +29,10 @@ properties: - const: allwinner,sun8i-r40-dma - const: allwinner,sun50i-a64-dma - items: - - const: allwinner,sun50i-h616-dma + - enum: + - allwinner,sun50i-h616-dma + - allwinner,sun55i-a523-dma + - allwinner,sun55i-a523-mcu-dma - const: allwinner,sun50i-a100-dma reg:
Signature · 1 line
2.47.3
Re: [PATCH 01/11] dt-bindings: dma: allwinner,sun50i-a64-dma: Add compatibles for A523
pw-bot: not-applicable
Chen-Yu Tsai
maintainerPATCH 2/11 ASoC: dt-bindings: allwinner,sun4i-a10-i2s: Add compatible for A523
In reply to Chen-Yu TsaiAs far as the author can tell, based on their respective manuals, the I2S interface controllers found in the Allwinner A523 SoC is the same as ones in the R329 SoC.
Add a SoC-specific compatible for it, with a fallback to the R329's compatible.
--- .../devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml +3 -1
@@ -33,7 +33,9 @@ properties: - const: allwinner,sun50i-h6-i2s - const: allwinner,sun50i-r329-i2s - items: - - const: allwinner,sun20i-d1-i2s + - enum: + - allwinner,sun20i-d1-i2s + - allwinner,sun55i-a523-i2s - const: allwinner,sun50i-r329-i2s reg:
Signature · 1 line
2.47.3
Re: [PATCH 02/11] ASoC: dt-bindings: allwinner,sun4i-a10-i2s: Add compatible for A523
pw-bot: not-applicable
Chen-Yu Tsai
maintainerPATCH 3/11 ASoC: dt-bindings: allwinner,sun4i-a10-spdif: Add compatible for A523
In reply to Chen-Yu TsaiThe SPDIF hardware block in the A523 SoC has the same layout as the H616 for the transmitter side. However unlike previous generations, the hardware block now takes separate module clocks for the TX and RX sides. This presumably allows the hardware to send and receive audio streams at different sample rates. The new hardware also gained RX insertion detection, and some extra information registers.
Add a new compatible for it without any fallbacks.
--- .../sound/allwinner,sun4i-a10-spdif.yaml | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml +38 -6
@@ -23,6 +23,7 @@ properties: - const: allwinner,sun8i-h3-spdif - const: allwinner,sun50i-h6-spdif - const: allwinner,sun50i-h616-spdif + - const: allwinner,sun55i-a523-spdif - items: - const: allwinner,sun8i-a83t-spdif - const: allwinner,sun8i-h3-spdif
@@ -37,14 +38,12 @@ properties: maxItems: 1 clocks: - items: - - description: Bus Clock - - description: Module Clock + minItems: 2 + maxItems: 3 clock-names: - items: - - const: apb - - const: spdif + minItems: 2 + maxItems: 3 # Even though it only applies to subschemas under the conditionals, # not listing them here will trigger a warning because of the
@@ -65,6 +64,7 @@ allOf: - allwinner,sun8i-h3-spdif - allwinner,sun50i-h6-spdif - allwinner,sun50i-h616-spdif + - allwinner,sun55i-a523-spdif then: required:
@@ -98,6 +98,38 @@ allOf: - const: rx - const: tx + - if: + properties: + compatible: + contains: + enum: + - allwinner,sun55i-a523-spdif + + then: + properties: + clocks: + items: + - description: Bus Clock + - description: TX Clock + - description: RX Clock + + clock-names: + items: + - const: apb + - const: tx + - const: rx + else: + properties: + clocks: + items: + - description: Bus Clock + - description: Module Clock + + clock-names: + items: + - const: apb + - const: spdif + required: - "#sound-dai-cells" - compatible
Signature · 1 line
2.47.3
Re: [PATCH 03/11] ASoC: dt-bindings: allwinner,sun4i-a10-spdif: Add compatible for A523
pw-bot: not-applicable
Chen-Yu Tsai
maintainerPATCH 4/11 ASoC: sun4i-spdif: Support SPDIF output on A523 family
In reply to Chen-Yu TsaiThe TX side of the SPDIF block on the A523 is almost the same the previous generations, the only difference being that it has separate module clock inputs for the TX and RX side.
Since this driver currently only supports TX, add support for a different clock name so that TX and RX clocks can be separated if RX support is ever added. Then add support for the A523.
--- sound/soc/sunxi/sun4i-spdif.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-)
sound/soc/sunxi/sun4i-spdif.c +25 -3
@@ -177,6 +177,7 @@ struct sun4i_spdif_quirks {bool has_reset;unsigned int val_fctl_ftx;unsigned int mclk_multiplier; +const char *tx_clk_name; };struct sun4i_spdif_dev {
@@ -323,6 +324,7 @@ static int sun4i_spdif_hw_params(struct snd_pcm_substream *substream, } mclk *= host->quirks->mclk_multiplier; +dev_info (&pdev->dev,"Setting SPDIF clock rate to %u\n" , mclk); ret =clk_set_rate (host->spdif_clk, mclk);if (ret <0 ) { dev_err(&pdev->dev,
@@ -542,7 +544,6 @@ static struct snd_soc_dai_driver sun4i_spdif_dai = { .formats = SUN4I_FORMATS, }, .ops = &sun4i_spdif_dai_ops, - .name = "spdif", }; static const struct sun4i_spdif_quirks sun4i_a10_spdif_quirks = {
@@ -572,6 +573,14 @@ static const struct sun4i_spdif_quirks sun50i_h6_spdif_quirks = { .mclk_multiplier = 1, }; +static const struct sun4i_spdif_quirks sun55i_a523_spdif_quirks = { + .reg_dac_txdata =SUN8I_SPDIF_TXFIFO , + .val_fctl_ftx =SUN50I_H6_SPDIF_FCTL_FTX , + .has_reset = true, + .mclk_multiplier =1 , + .tx_clk_name ="tx" , +}; +static const struct of_device_id sun4i_spdif_of_match[] = { { .compatible ="allwinner,sun4i-a10-spdif" ,
@@ -594,6 +603,15 @@ static const struct of_device_id sun4i_spdif_of_match[] = {/* Essentially the same as the H6, but without RX */ .data = &sun50i_h6_spdif_quirks, }, + { + .compatible = "allwinner,sun55i-a523-spdif", + /* + * Almost the same as H6, but has split the TX and RX clocks, + * has a separate reset bit for the RX side, and has some + * expanded features for the RX side. + */ + .data = &sun55i_a523_spdif_quirks, + }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, sun4i_spdif_of_match);
@@ -635,6 +653,7 @@ static int sun4i_spdif_probe(struct platform_device *pdev)const struct sun4i_spdif_quirks *quirks;int ret;void __iomem *base; +const char *tx_clk_name ="spdif" ;dev_dbg (&pdev->dev,"Entered %s\n" , __func__);
@@ -671,9 +690,12 @@ static int sun4i_spdif_probe(struct platform_device *pdev)return PTR_ERR (host->apb_clk); } - host->spdif_clk =devm_clk_get (&pdev->dev,"spdif" ); +if (quirks->tx_clk_name) + tx_clk_name = quirks->tx_clk_name; + host->spdif_clk =devm_clk_get (&pdev->dev, tx_clk_name);if (IS_ERR (host->spdif_clk)) { -dev_err (&pdev->dev,"failed to get a spdif clock.\n" ); +dev_err (&pdev->dev,"failed to get the \"%s\" clock.\n" , + tx_clk_name);return PTR_ERR (host->spdif_clk); }
Signature · 1 line
2.47.3
Jernej Škrabec
maintainerRe: [PATCH 04/11] ASoC: sun4i-spdif: Support SPDIF output on A523 family
Hi,
Dne ponedeljek, 20. oktober 2025 ob 19:10:50 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
Quoted 34 lines
The TX side of the SPDIF block on the A523 is almost the same the previous generations, the only difference being that it has separate module clock inputs for the TX and RX side.
Since this driver currently only supports TX, add support for a different clock name so that TX and RX clocks can be separated if RX support is ever added. Then add support for the A523.
Signed-off-by Chen-Yu Tsai <[email protected]>--- sound/soc/sunxi/sun4i-spdif.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-)sound/soc/sunxi/sun4i-spdif.c +2
-0@@ -177,6 +177,7 @@ struct sun4i_spdif_quirks {bool has_reset;unsigned int val_fctl_ftx;unsigned int mclk_multiplier; +const char *tx_clk_name; };struct sun4i_spdif_dev {@@ -323,6 +324,7 @@ static int sun4i_spdif_hw_params(struct snd_pcm_substream *substream, } mclk *= host->quirks->mclk_multiplier; +dev_info (&pdev->dev,"Setting SPDIF clock rate to %u\n" , mclk); ret =clk_set_rate (host->spdif_clk, mclk);if (ret <0 ) { dev_err(&pdev->dev,
sound/soc/sunxi/sun4i-spdif.c static struct snd_soc_dai_driver sun4i_spdif_dai = { · line 545
Quoted 4 lines
sound/soc/sunxi/sun4i-spdif.c +0
-1@@ -542,7 +544,6 @@ static struct snd_soc_dai_driver sun4i_spdif_dai = { .formats = SUN4I_FORMATS, }, .ops = &sun4i_spdif_dai_ops, - .name = "spdif",
Why this change?
Quoted 35 lines
sound/soc/sunxi/sun4i-spdif.c +17
-0};static const struct sun4i_spdif_quirks sun4i_a10_spdif_quirks = {@@ -572,6 +573,14 @@ static const struct sun4i_spdif_quirks sun50i_h6_spdif_quirks = { .mclk_multiplier = 1, }; +static const struct sun4i_spdif_quirks sun55i_a523_spdif_quirks = { + .reg_dac_txdata =SUN8I_SPDIF_TXFIFO , + .val_fctl_ftx =SUN50I_H6_SPDIF_FCTL_FTX , + .has_reset = true, + .mclk_multiplier =1 , + .tx_clk_name ="tx" , +}; +static const struct of_device_id sun4i_spdif_of_match[] = { { .compatible ="allwinner,sun4i-a10-spdif" ,@@ -594,6 +603,15 @@ static const struct of_device_id sun4i_spdif_of_match[] = {/* Essentially the same as the H6, but without RX */ .data = &sun50i_h6_spdif_quirks, }, + { + .compatible = "allwinner,sun55i-a523-spdif", + /* + * Almost the same as H6, but has split the TX and RX clocks, + * has a separate reset bit for the RX side, and has some + * expanded features for the RX side. + */ + .data = &sun55i_a523_spdif_quirks, + }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, sun4i_spdif_of_match);
sound/soc/sunxi/sun4i-spdif.c static int sun4i_spdif_probe(struct platform_device *pdev) · line 656
Quoted 4 lines
sound/soc/sunxi/sun4i-spdif.c +1
-0@@ -635,6 +653,7 @@ static int sun4i_spdif_probe(struct platform_device *pdev)const struct sun4i_spdif_quirks *quirks;int ret;void __iomem *base; +const char *tx_clk_name ="spdif" ;
Reverse tree?
Otherwise it looks good.
Best regards,
Jernej
Quoted 19 lines
sound/soc/sunxi/sun4i-spdif.c +5
-2dev_dbg (&pdev->dev,"Entered %s\n" , __func__);@@ -671,9 +690,12 @@ static int sun4i_spdif_probe(struct platform_device *pdev)return PTR_ERR (host->apb_clk); } - host->spdif_clk =devm_clk_get (&pdev->dev,"spdif" ); +if (quirks->tx_clk_name) + tx_clk_name = quirks->tx_clk_name; + host->spdif_clk =devm_clk_get (&pdev->dev, tx_clk_name);if (IS_ERR (host->spdif_clk)) { -dev_err (&pdev->dev,"failed to get a spdif clock.\n" ); +dev_err (&pdev->dev,"failed to get the \"%s\" clock.\n" , + tx_clk_name);return PTR_ERR (host->spdif_clk); }
Chen-Yu Tsai
maintainerRe: [PATCH 04/11] ASoC: sun4i-spdif: Support SPDIF output on A523 family
Quoted 33 lines · Jernej Škrabec
Hi,
Dne ponedeljek, 20. oktober 2025 ob 19:10:50 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
Quoted 29 lines
The TX side of the SPDIF block on the A523 is almost the same the previous generations, the only difference being that it has separate module clock inputs for the TX and RX side.
Since this driver currently only supports TX, add support for a different clock name so that TX and RX clocks can be separated if RX support is ever added. Then add support for the A523.
Signed-off-by Chen-Yu Tsai <[email protected]>--- sound/soc/sunxi/sun4i-spdif.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-)sound/soc/sunxi/sun4i-spdif.c +1
-0@@ -177,6 +177,7 @@ struct sun4i_spdif_quirks {bool has_reset;unsigned int val_fctl_ftx;unsigned int mclk_multiplier; +const char *tx_clk_name; };struct sun4i_spdif_dev {@@ -323,6 +324,7 @@ static int sun4i_spdif_hw_params(struct snd_pcm_substream *substream, } mclk *= host->quirks->mclk_multiplier;
Quoted 11 lines
sound/soc/sunxi/sun4i-spdif.c static struct snd_soc_dai_driver sun4i_spdif_dai = { · line 545
Quoted 9 lines
sound/soc/sunxi/sun4i-spdif.c +1
-1+dev_info (&pdev->dev,"Setting SPDIF clock rate to %u\n" , mclk); ret =clk_set_rate (host->spdif_clk, mclk);if (ret <0 ) { dev_err(&pdev->dev,@@ -542,7 +544,6 @@ static struct snd_soc_dai_driver sun4i_spdif_dai = { .formats = SUN4I_FORMATS, }, .ops = &sun4i_spdif_dai_ops, - .name = "spdif",Why this change?
Now that you mention it, this looks bogus to me as well. I'll drop it.
Quoted 33 lines
Quoted 33 lines
sound/soc/sunxi/sun4i-spdif.c +17
-0};static const struct sun4i_spdif_quirks sun4i_a10_spdif_quirks = {@@ -572,6 +573,14 @@ static const struct sun4i_spdif_quirks sun50i_h6_spdif_quirks = { .mclk_multiplier = 1, }; +static const struct sun4i_spdif_quirks sun55i_a523_spdif_quirks = { + .reg_dac_txdata =SUN8I_SPDIF_TXFIFO , + .val_fctl_ftx =SUN50I_H6_SPDIF_FCTL_FTX , + .has_reset = true, + .mclk_multiplier =1 , + .tx_clk_name ="tx" , +}; +static const struct of_device_id sun4i_spdif_of_match[] = { { .compatible ="allwinner,sun4i-a10-spdif" ,@@ -594,6 +603,15 @@ static const struct of_device_id sun4i_spdif_of_match[] = {/* Essentially the same as the H6, but without RX */ .data = &sun50i_h6_spdif_quirks, }, + { + .compatible = "allwinner,sun55i-a523-spdif", + /* + * Almost the same as H6, but has split the TX and RX clocks, + * has a separate reset bit for the RX side, and has some + * expanded features for the RX side. + */ + .data = &sun55i_a523_spdif_quirks, + }, {/* sentinel */ } };
Quoted 8 lines
sound/soc/sunxi/sun4i-spdif.c static int sun4i_spdif_probe(struct platform_device *pdev) · line 656
Quoted 6 lines
sound/soc/sunxi/sun4i-spdif.c +1
-0MODULE_DEVICE_TABLE (of, sun4i_spdif_of_match);@@ -635,6 +653,7 @@ static int sun4i_spdif_probe(struct platform_device *pdev)const struct sun4i_spdif_quirks *quirks;int ret;void __iomem *base; +const char *tx_clk_name ="spdif" ;Reverse tree?
I think that only applies to the network tree.
Quoted 1 line
Otherwise it looks good.
Thanks!
ChenYu
Quoted 26 lines
Best regards,
JernejQuoted 19 lines
sound/soc/sunxi/sun4i-spdif.c +5
-2dev_dbg (&pdev->dev,"Entered %s\n" , __func__);@@ -671,9 +690,12 @@ static int sun4i_spdif_probe(struct platform_device *pdev)return PTR_ERR (host->apb_clk); } - host->spdif_clk =devm_clk_get (&pdev->dev,"spdif" ); +if (quirks->tx_clk_name) + tx_clk_name = quirks->tx_clk_name; + host->spdif_clk =devm_clk_get (&pdev->dev, tx_clk_name);if (IS_ERR (host->spdif_clk)) { -dev_err (&pdev->dev,"failed to get a spdif clock.\n" ); +dev_err (&pdev->dev,"failed to get the \"%s\" clock.\n" , + tx_clk_name);return PTR_ERR (host->spdif_clk); }
kernel test robot
build botRe: [PATCH 04/11] ASoC: sun4i-spdif: Support SPDIF output on A523 family
In reply to Chen-Yu Tsaikernel test robot noticed the following build warnings:
Hi Chen-Yu,
kernel test robot noticed the following build warnings:
[auto build test WARNING on sunxi/sunxi/for-next]
[also build test WARNING on broonie-sound/for-next vkoul-dmaengine/next linus/master v6.18-rc2 next-20251021] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Chen-Yu-Tsai/dt-bindings-dma-allwinner-sun50i-a64-dma-Add-compatibles-for-A523/20251021-011340 base: https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/for-next patch link: https://lore.kernel.org/r/20251020171059.2786070-5-wens%40kernel.org patch subject: [PATCH 04/11] ASoC: sun4i-spdif: Support SPDIF output on A523 family config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20251021/[email protected]/config) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 754ebc6ebb9fb9fbee7aef33478c74ea74949853) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251021/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
Warning: sound/soc/sunxi/sun4i-spdif.c:180 struct member 'mclk_multiplier' not described in 'sun4i_spdif_quirks'
>> Warning: sound/soc/sunxi/sun4i-spdif.c:180 struct member 'tx_clk_name' not described in 'sun4i_spdif_quirks'
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Chen-Yu Tsai
maintainerPATCH 5/11 clk: sunxi-ng: sun55i-a523-r-ccu: Mark bus-r-dma as critical
In reply to Chen-Yu TsaiThe "bus-r-dma" clock in the A523's PRCM clock controller is also referred to as "DMA_CLKEN_SW" or "DMA ADB400 gating". It is unclear how this ties into the DMA controller MBUS clock gate; however if the clock is not enabled, the DMA controller in the MCU block will fail to access DRAM, even failing to retrieve the DMA descriptors.
Mark this clock as critical. This sort of mirrors what is done for the main DMA controller's MBUS clock, which has a separate toggle that is currently left out of the main clock controller driver.
--- drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c +1 -1
@@ -121,7 +121,7 @@ static SUNXI_CCU_GATE_HW(bus_r_ir_rx_clk, "bus-r-ir-rx", &r_apb0_clk.common.hw, 0x1cc, BIT(0), 0); static SUNXI_CCU_GATE_HW(bus_r_dma_clk, "bus-r-dma", - &r_apb0_clk.common.hw, 0x1dc, BIT(0), 0); + &r_apb0_clk.common.hw, 0x1dc, BIT(0), CLK_IS_CRITICAL); static SUNXI_CCU_GATE_HW(bus_r_rtc_clk, "bus-r-rtc", &r_apb0_clk.common.hw, 0x20c, BIT(0), 0); static SUNXI_CCU_GATE_HW(bus_r_cpucfg_clk, "bus-r-cpucfg",
Signature · 1 line
2.47.3
Re: [PATCH 05/11] clk: sunxi-ng: sun55i-a523-r-ccu: Mark bus-r-dma as critical
Dne ponedeljek, 20. oktober 2025 ob 19:10:51 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
Quoted 6 lines
The "bus-r-dma" clock in the A523's PRCM clock controller is also referred to as "
DMA_CLKEN_SW" or "DMA ADB400 gating". It is unclear how this ties into the DMA controller MBUS clock gate; however if the clock is not enabled, the DMA controller in the MCU block will fail to access DRAM, even failing to retrieve the DMA descriptors.
Quoted 6 lines
Mark this clock as critical. This sort of mirrors what is done for the main DMA controller's MBUS clock, which has a separate toggle that is currently left out of the main clock controller driver.
Fixes 8cea339cfb81 ("clk: sunxi-ng: add support for the A523/T527 PRCM CCU")Signed-off-by Chen-Yu Tsai <[email protected]>
Best regards,
Jernej
Quoted 18 lines
--- drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c +1
-1@@ -121,7 +121,7 @@ static SUNXI_CCU_GATE_HW(bus_r_ir_rx_clk, "bus-r-ir-rx", &r_apb0_clk.common.hw, 0x1cc, BIT(0), 0); static SUNXI_CCU_GATE_HW(bus_r_dma_clk, "bus-r-dma", - &r_apb0_clk.common.hw, 0x1dc, BIT(0), 0); + &r_apb0_clk.common.hw, 0x1dc, BIT(0), CLK_IS_CRITICAL); static SUNXI_CCU_GATE_HW(bus_r_rtc_clk, "bus-r-rtc", &r_apb0_clk.common.hw, 0x20c, BIT(0), 0); static SUNXI_CCU_GATE_HW(bus_r_cpucfg_clk, "bus-r-cpucfg",
Chen-Yu Tsai
maintainerPATCH 6/11 clk: sunxi-ng: sun55i-a523-ccu: Lower audio0 pll minimum rate
In reply to Chen-Yu TsaiWhile the user manual states that the PLL's rate should be between 180 MHz and 3 GHz in the register defninition section, it also says the actual operating frequency is 22.5792*4 MHz in the PLL features table.
22.5792*4 MHz is one of the actual clock rates that we want and is is available in the SDM table. Lower the minimum clock rate to 90 MHz so that both rates in the SDM table can be used.
--- drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun55i-a523.c +1 -1
@@ -300,7 +300,7 @@ static struct ccu_nm pll_audio0_4x_clk = { .m = _SUNXI_CCU_DIV(16, 6), .sdm =_SUNXI_CCU_SDM (pll_audio0_sdm_table,BIT (24 ), 0x178, BIT(31)), - .min_rate = 180000000U, + .min_rate = 90000000U, .max_rate = 3000000000U, .common = { .reg = 0x078,
Signature · 1 line
2.47.3
Re: [PATCH 06/11] clk: sunxi-ng: sun55i-a523-ccu: Lower audio0 pll minimum rate
Dne ponedeljek, 20. oktober 2025 ob 19:10:52 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
Quoted 7 lines
While the user manual states that the PLL's rate should be between 180 MHz and 3 GHz in the register defninition section, it also says the actual operating frequency is 22.5792*4 MHz in the PLL features table.
22.5792*4 MHz is one of the actual clock rates that we want and is is available in the SDM table. Lower the minimum clock rate to 90 MHz so that both rates in the SDM table can be used.
So factor of 2 could be missed somewhere?
Quoted 3 lines
Fixes 7cae1e2b5544 ("clk: sunxi-ng: Add support for the A523/T527 CCU PLLs")Signed-off-by Chen-Yu Tsai <[email protected]>
Best regards,
Jernej
Quoted 18 lines
--- drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/sunxi-ng/ccu-sun55i-a523.c +1
-1@@ -300,7 +300,7 @@ static struct ccu_nm pll_audio0_4x_clk = { .m = _SUNXI_CCU_DIV(16, 6), .sdm =_SUNXI_CCU_SDM (pll_audio0_sdm_table,BIT (24 ), 0x178, BIT(31)), - .min_rate = 180000000U, + .min_rate = 90000000U, .max_rate = 3000000000U, .common = { .reg = 0x078,
Chen-Yu Tsai
maintainerRe: [PATCH 06/11] clk: sunxi-ng: sun55i-a523-ccu: Lower audio0 pll minimum rate
Quoted 11 lines · Jernej Škrabec
Dne ponedeljek, 20. oktober 2025 ob 19:10:52 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
Quoted 7 lines
While the user manual states that the PLL's rate should be between 180 MHz and 3 GHz in the register defninition section, it also says the actual operating frequency is 22.5792*4 MHz in the PLL features table.
22.5792*4 MHz is one of the actual clock rates that we want and is is available in the SDM table. Lower the minimum clock rate to 90 MHz so that both rates in the SDM table can be used.
So factor of 2 could be missed somewhere?
Not sure what you mean? This PLL only gives *4 and *1 outputs.
Quoted 31 lines
Quoted 3 lines
Fixes 7cae1e2b5544 ("clk: sunxi-ng: Add support for the A523/T527 CCU PLLs")Signed-off-by Chen-Yu Tsai <[email protected]>Reviewed-by Jernej Skrabec <[email protected]>Best regards,
JernejQuoted 18 lines
--- drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/sunxi-ng/ccu-sun55i-a523.c +1
-1@@ -300,7 +300,7 @@ static struct ccu_nm pll_audio0_4x_clk = { .m = _SUNXI_CCU_DIV(16, 6), .sdm =_SUNXI_CCU_SDM (pll_audio0_sdm_table,BIT (24 ), 0x178, BIT(31)), - .min_rate = 180000000U, + .min_rate = 90000000U, .max_rate = 3000000000U, .common = { .reg = 0x078,
Jernej Škrabec
maintainerRe: [PATCH 06/11] clk: sunxi-ng: sun55i-a523-ccu: Lower audio0 pll minimum rate
Dne ponedeljek, 20. oktober 2025 ob 20:09:18 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
Quoted 7 lines · Jernej Škrabec
Quoted 6 lines
Dne ponedeljek, 20. oktober 2025 ob 19:10:52 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
Quoted 4 lines
While the user manual states that the PLL's rate should be between 180 MHz and 3 GHz in the register defninition section, it also says the actual operating frequency is 22.5792*4 MHz in the PLL features table.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
22.5792*4 MHz is one of the actual clock rates that we want and is is available in the SDM table. Lower the minimum clock rate to 90 MHz so that both rates in the SDM table can be used.
So factor of 2 could be missed somewhere?
Not sure what you mean? This PLL only gives *4 and *1 outputs.
Right. Nevermind then.
Best regards,
Jernej
Quoted 33 lines
Quoted 32 lines
Quoted 4 lines
Fixes 7cae1e2b5544 ("clk: sunxi-ng: Add support for the A523/T527 CCU PLLs")Signed-off-by Chen-Yu Tsai <[email protected]>Reviewed-by Jernej Skrabec <[email protected]>Best regards,
JernejQuoted 18 lines
--- drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/sunxi-ng/ccu-sun55i-a523.c +1
-1@@ -300,7 +300,7 @@ static struct ccu_nm pll_audio0_4x_clk = { .m = _SUNXI_CCU_DIV(16, 6), .sdm =_SUNXI_CCU_SDM (pll_audio0_sdm_table,BIT (24 ), 0x178, BIT(31)), - .min_rate = 180000000U, + .min_rate = 90000000U, .max_rate = 3000000000U, .common = { .reg = 0x078,
Chen-Yu Tsai
maintainerPATCH 7/11 arm64: dts: allwinner: a523: Add DMA controller device nodes
In reply to Chen-Yu TsaiFrom: Chen-Yu Tsai <[email protected]>
The A523 has two DMA controllers. Add device nodes for both. Also hook up DMA for existing devices.
--- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +56 -0
@@ -241,6 +241,8 @@ uart0: serial@2500000 { reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART0>; resets = <&ccu RST_BUS_UART0>; + dmas = <&dma 14>, <&dma 14>; + dma-names = "tx", "rx"; status = "disabled"; };
@@ -252,6 +254,8 @@ uart1: serial@2500400 { reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART1>; resets = <&ccu RST_BUS_UART1>; + dmas = <&dma 15>, <&dma 15>; + dma-names = "tx", "rx"; status = "disabled"; };
@@ -263,6 +267,8 @@ uart2: serial@2500800 { reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART2>; resets = <&ccu RST_BUS_UART2>; + dmas = <&dma 16>, <&dma 16>; + dma-names = "tx", "rx"; status = "disabled"; };
@@ -274,6 +280,8 @@ uart3: serial@2500c00 { reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART3>; resets = <&ccu RST_BUS_UART3>; + dmas = <&dma 17>, <&dma 17>; + dma-names = "tx", "rx"; status = "disabled"; };
@@ -285,6 +293,8 @@ uart4: serial@2501000 { reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART4>; resets = <&ccu RST_BUS_UART4>; + dmas = <&dma 18>, <&dma 18>; + dma-names = "tx", "rx"; status = "disabled"; };
@@ -296,6 +306,8 @@ uart5: serial@2501400 { reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART5>; resets = <&ccu RST_BUS_UART5>; + dmas = <&dma 19>, <&dma 19>; + dma-names = "tx", "rx"; status = "disabled"; };
@@ -307,6 +319,8 @@ uart6: serial@2501800 { reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART6>; resets = <&ccu RST_BUS_UART6>; + dmas = <&dma 20>, <&dma 20>; + dma-names = "tx", "rx"; status = "disabled"; };
@@ -318,6 +332,8 @@ uart7: serial@2501c00 { reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART7>; resets = <&ccu RST_BUS_UART7>; + dmas = <&dma 21>, <&dma 21>; + dma-names = "tx", "rx"; status = "disabled"; };
@@ -329,6 +345,8 @@ i2c0: i2c@2502000 { interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; clocks = <&ccu CLK_BUS_I2C0>; resets = <&ccu RST_BUS_I2C0>; + dmas = <&dma 43>, <&dma 43>; + dma-names = "rx", "tx"; status = "disabled"; #address-cells = <1>; #size-cells = <0>;
@@ -342,6 +360,8 @@ i2c1: i2c@2502400 { interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; clocks = <&ccu CLK_BUS_I2C1>; resets = <&ccu RST_BUS_I2C1>; + dmas = <&dma 44>, <&dma 44>; + dma-names = "rx", "tx"; status = "disabled"; #address-cells = <1>; #size-cells = <0>;
@@ -355,6 +375,8 @@ i2c2: i2c@2502800 { interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; clocks = <&ccu CLK_BUS_I2C2>; resets = <&ccu RST_BUS_I2C2>; + dmas = <&dma 45>, <&dma 45>; + dma-names = "rx", "tx"; status = "disabled"; #address-cells = <1>; #size-cells = <0>;
@@ -368,6 +390,8 @@ i2c3: i2c@2502c00 { interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; clocks = <&ccu CLK_BUS_I2C3>; resets = <&ccu RST_BUS_I2C3>; + dmas = <&dma 46>, <&dma 46>; + dma-names = "rx", "tx"; status = "disabled"; #address-cells = <1>; #size-cells = <0>;
@@ -381,6 +405,8 @@ i2c4: i2c@2503000 { interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; clocks = <&ccu CLK_BUS_I2C4>; resets = <&ccu RST_BUS_I2C4>; + dmas = <&dma 47>, <&dma 47>; + dma-names = "rx", "tx"; status = "disabled"; #address-cells = <1>; #size-cells = <0>;
@@ -394,6 +420,8 @@ i2c5: i2c@2503400 { interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; clocks = <&ccu CLK_BUS_I2C5>; resets = <&ccu RST_BUS_I2C5>; + dmas = <&dma 48>, <&dma 48>; + dma-names = "rx", "tx"; status = "disabled"; #address-cells = <1>; #size-cells = <0>;
@@ -408,6 +436,19 @@ syscon: syscon@3000000 { ranges; }; + dma: dma-controller@3002000 { + compatible = "allwinner,sun55i-a523-dma", + "allwinner,sun50i-a100-dma"; + reg = <0x03002000 0x1000>; + interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ccu CLK_BUS_DMA>, <&ccu CLK_MBUS_DMA>; + clock-names = "bus", "mbus"; + dma-channels = <16>; + dma-requests = <54>; + resets = <&ccu RST_BUS_DMA>; + #dma-cells = <1>; + }; + sid: efuse@3006000 { compatible = "allwinner,sun55i-a523-sid", "allwinner,sun50i-a64-sid";
@@ -729,6 +770,8 @@ r_i2c0: i2c@7081400 { reg = <0x07081400 0x400>; interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>; clocks = <&r_ccu CLK_BUS_R_I2C0>; + dmas = <&dma 49>, <&dma 49>; + dma-names = "rx", "tx"; resets = <&r_ccu RST_BUS_R_I2C0>; pinctrl-names = "default"; pinctrl-0 = <&r_i2c_pins>;
@@ -775,6 +818,19 @@ mcu_ccu: clock-controller@7102000 { #reset-cells = <1>; }; + mcu_dma: dma-controller@7121000 { + compatible = "allwinner,sun55i-a523-mcu-dma", + "allwinner,sun50i-a100-dma"; + reg = <0x07121000 0x1000>; + interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mcu_ccu CLK_BUS_MCU_DMA>, <&mcu_ccu CLK_MCU_MBUS_DMA>; + clock-names = "bus", "mbus"; + dma-channels = <16>; + dma-requests = <15>; + resets = <&mcu_ccu RST_BUS_MCU_DMA>; + #dma-cells = <1>; + }; + npu: npu@7122000 { compatible = "vivante,gc"; reg = <0x07122000 0x1000>;
Signature · 1 line
2.47.3
Re: [PATCH 07/11] arm64: dts: allwinner: a523: Add DMA controller device nodes
Dne ponedeljek, 20. oktober 2025 ob 19:10:53 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
Quoted 6 lines
From: Chen-Yu Tsai <[email protected]>
The A523 has two DMA controllers. Add device nodes for both. Also hook up DMA for existing devices.
Signed-off-by Chen-Yu Tsai <[email protected]>
Best regards,
Jernej
Chen-Yu Tsai
maintainerPATCH 8/11 arm64: dts: allwinner: a523: Add device node for SPDIF block
In reply to Chen-Yu TsaiThe A523 has a SPDIF interface that is capable of both playback and capture.
Add a node for it.
--- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +15 -0
@@ -818,6 +818,21 @@ mcu_ccu: clock-controller@7102000 { #reset-cells = <1>; }; + spdif: spdif@7116000 { + compatible = "allwinner,sun55i-a523-spdif"; + reg = <0x07116000 0x400>; + interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mcu_ccu CLK_BUS_MCU_SPDIF>, + <&mcu_ccu CLK_MCU_SPDIF_TX>, + <&mcu_ccu CLK_MCU_SPDIF_RX>; + clock-names = "apb", "tx", "rx"; + resets = <&mcu_ccu RST_BUS_MCU_SPDIF>; + dmas = <&mcu_dma 2>, <&mcu_dma 2>; + dma-names = "rx", "tx"; + #sound-dai-cells = <0>; + status = "disabled"; + }; + mcu_dma: dma-controller@7121000 { compatible = "allwinner,sun55i-a523-mcu-dma", "allwinner,sun50i-a100-dma";
Signature · 1 line
2.47.3
Re: [PATCH 08/11] arm64: dts: allwinner: a523: Add device node for SPDIF block
Dne ponedeljek, 20. oktober 2025 ob 19:10:54 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
Quoted 6 lines
The A523 has a SPDIF interface that is capable of both playback and capture.
Add a node for it.
Signed-off-by Chen-Yu Tsai <[email protected]>
Best regards,
Jernej
Chen-Yu Tsai
maintainerPATCH 9/11 arm64: dts: allwinner: a523: Add device nodes for I2S controllers
In reply to Chen-Yu TsaiThe A523 family of SoCs have four I2S controllers capable of both playback and capture. The user manual also implies that I2S2 also outputs to the eDP interface controller.
Add device nodes for all of them.
--- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +56 -0
@@ -818,6 +818,62 @@ mcu_ccu: clock-controller@7102000 { #reset-cells = <1>; }; + i2s0: i2s@7112000 { + compatible = "allwinner,sun55i-a523-i2s", + "allwinner,sun50i-r329-i2s"; + reg = <0x07112000 0x1000>; + interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mcu_ccu CLK_BUS_MCU_I2S0>, <&mcu_ccu CLK_MCU_I2S0>; + clock-names = "apb", "mod"; + resets = <&mcu_ccu RST_BUS_MCU_I2S0>; + dmas = <&mcu_dma 3>, <&mcu_dma 3>; + dma-names = "rx", "tx"; + #sound-dai-cells = <0>; + status = "disabled"; + }; + + i2s1: i2s@7113000 { + compatible = "allwinner,sun55i-a523-i2s", + "allwinner,sun50i-r329-i2s"; + reg = <0x07113000 0x1000>; + interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mcu_ccu CLK_BUS_MCU_I2S1>, <&mcu_ccu CLK_MCU_I2S1>; + clock-names = "apb", "mod"; + resets = <&mcu_ccu RST_BUS_MCU_I2S1>; + dmas = <&mcu_dma 4>, <&mcu_dma 4>; + dma-names = "rx", "tx"; + #sound-dai-cells = <0>; + status = "disabled"; + }; + + i2s2: i2s@7114000 { + compatible = "allwinner,sun55i-a523-i2s", + "allwinner,sun50i-r329-i2s"; + reg = <0x07114000 0x1000>; + interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mcu_ccu CLK_BUS_MCU_I2S2>, <&mcu_ccu CLK_MCU_I2S2>; + clock-names = "apb", "mod"; + resets = <&mcu_ccu RST_BUS_MCU_I2S2>; + dmas = <&mcu_dma 5>, <&mcu_dma 5>; + dma-names = "rx", "tx"; + #sound-dai-cells = <0>; + status = "disabled"; + }; + + i2s3: i2s@7115000 { + compatible = "allwinner,sun55i-a523-i2s", + "allwinner,sun50i-r329-i2s"; + reg = <0x07115000 0x1000>; + interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mcu_ccu CLK_BUS_MCU_I2S3>, <&mcu_ccu CLK_MCU_I2S3>; + clock-names = "apb", "mod"; + resets = <&mcu_ccu RST_BUS_MCU_I2S3>; + dmas = <&mcu_dma 6>, <&mcu_dma 6>; + dma-names = "rx", "tx"; + #sound-dai-cells = <0>; + status = "disabled"; + }; + spdif: spdif@7116000 { compatible = "allwinner,sun55i-a523-spdif"; reg = <0x07116000 0x400>;
Signature · 1 line
2.47.3
Re: [PATCH 09/11] arm64: dts: allwinner: a523: Add device nodes for I2S controllers
Dne ponedeljek, 20. oktober 2025 ob 19:10:55 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
Quoted 7 lines
The A523 family of SoCs have four I2S controllers capable of both playback and capture. The user manual also implies that I2S2 also outputs to the eDP interface controller.
Add device nodes for all of them.
Signed-off-by Chen-Yu Tsai <[email protected]>
Best regards,
Jernej
Chen-Yu Tsai
maintainerPATCH 10/11 arm64: dts: allwinner: a523: Add I2S2 pins on PI pin group
In reply to Chen-Yu TsaiThe Radxa Cubie A5E exposes I2S2 through the PI pin group on the 40-pin GPIO header.
Add a pinmux setting for it so potential users can directly reference it.
--- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +8 -0
@@ -145,6 +145,14 @@ pio: pinctrl@2000000 { interrupt-controller; #interrupt-cells = <3>; + /omit-if-no-ref/ + i2s2_pi_pins: i2s2-pi-pins { + pins = "PI2", "PI3", "PI4", "PI5"; + allwinner,pinmux = <5>; + function = "i2s2"; + bias-disable; + }; + mmc0_pins: mmc0-pins { pins = "PF0" ,"PF1", "PF2", "PF3", "PF4", "PF5"; allwinner,pinmux = <2>;
Signature · 1 line
2.47.3
Re: [PATCH 10/11] arm64: dts: allwinner: a523: Add I2S2 pins on PI pin group
Dne ponedeljek, 20. oktober 2025 ob 19:10:56 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
Quoted 7 lines
The Radxa Cubie A5E exposes I2S2 through the PI pin group on the 40-pin GPIO header.
Add a pinmux setting for it so potential users can directly reference it.
Signed-off-by Chen-Yu Tsai <[email protected]>
Best regards,
Jernej
Chen-Yu Tsai
maintainerPATCH 11/11 arm64: dts: allwinner: a527-cubie-a5e: Enable I2S and SPDIF output
In reply to Chen-Yu TsaiThis is an example change.
The Radxa Cubie A5E exposes I2S2 and SPDIF on the 40-pin header. Enable both.
In this example, I2S2 is connected to adafruit speaker bonnet, which sports a pair of MAX98357A for speaker amplication. SPDIF is connected to a SPDIF interface card for PCs, which has both coaxial and optical outputs. The output was connected via optical cable to a dumb SPDIF to analog audio converter.
--- .../dts/allwinner/sun55i-a527-cubie-a5e.dts | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts +52 -0
@@ -64,6 +64,46 @@ reg_usb_vbus: vbus { gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ enable-active-high; }; + + codec: audio-codec { + compatible = "maxim,max98360a"; + #sound-dai-cells = <0>; + }; + + sound-i2s { + compatible = "simple-audio-card"; + simple-audio-card,name = "I2S"; + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&dailink_cpu>; + simple-audio-card,frame-master = <&dailink_cpu>; + simple-audio-card,mclk-fs = <128>; + + dailink_cpu: simple-audio-card,cpu { + sound-dai = <&i2s2>; + }; + + dailink0_master: simple-audio-card,codec { + sound-dai = <&codec>; + }; + }; + + sound-spdif { + compatible = "simple-audio-card"; + simple-audio-card,name = "spdif-out"; + + simple-audio-card,cpu { + sound-dai = <&spdif>; + }; + + simple-audio-card,codec { + sound-dai = <&spdif_out>; + }; + }; + + spdif_out: spdif-out { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + }; }; &ehci0 {
@@ -101,6 +141,12 @@ &gpu { status = "okay"; }; +&i2s2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2s2_pi_pins>; + status = "okay"; +}; + &mdio0 { ext_rgmii0_phy: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22";
@@ -344,6 +390,12 @@ &r_pio { vcc-pm-supply = <®_aldo3>; }; +&spdif { + pinctrl-names = "default"; + pinctrl-0 = <&spdif_out_pi_pin>; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pb_pins>;
Signature · 1 line
2.47.3
kernel test robot
build botRe: [PATCH 11/11] [EXAMPLE] arm64: dts: allwinner: a527-cubie-a5e: Enable I2S and SPDIF output
kernel test robot noticed the following build errors:
Hi Chen-Yu,
kernel test robot noticed the following build errors:
[auto build test ERROR on sunxi/sunxi/for-next]
[also build test ERROR on broonie-sound/for-next vkoul-dmaengine/next linus/master v6.18-rc2 next-20251021] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Chen-Yu-Tsai/dt-bindings-dma-allwinner-sun50i-a64-dma-Add-compatibles-for-A523/20251021-011340 base: https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/for-next patch link: https://lore.kernel.org/r/20251020171059.2786070-12-wens%40kernel.org patch subject: [PATCH 11/11] [EXAMPLE] arm64: dts: allwinner: a527-cubie-a5e: Enable I2S and SPDIF output config: arm64-defconfig (https://download.01.org/0day-ci/archive/20251022/[email protected]/config) compiler: aarch64-linux-gcc (GCC) 15.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251022/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
also defined at arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts:393.8-397.3
>> ERROR: Input tree has errors, aborting (use -f to force output)
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Chen-Yu Tsai
maintainerRe: (subset) [PATCH 00/11] allwinner: a523: Enable I2S and SPDIF TX
In reply to Chen-Yu TsaiQuoted 9 lines · Chen-Yu Tsai
This series enables the SPDIF and I2S hardware found on the Allwinner A523/A527/T527 family SoCs. These SoCs have one SPDIF interface and four I2S interfaces. All of them are capable of both playback and capture, however the SPDIF driver only supports playback.
The series is organized by subsystem, so each maintainer can find the patches they need to take.
[...]
Applied to sunxi/clk-fixes-for-6.18 in local tree, thanks!
[05/11] clk: sunxi-ng: sun55i-a523-r-ccu: Mark bus-r-dma as critical
commit: 5888533c6011de319c5f23ae147f1f291ce81582
[06/11] clk: sunxi-ng: sun55i-a523-ccu: Lower audio0 pll minimum rate
commit: 2050280a4bb660b47f8cccf75a69293ae7cbb087Best regards,
Signature · 1 line
Chen-Yu Tsai <[email protected]>