From: "Anton D. Stavinskii" <stavinsky@gmail.com>
To: Inochi Amaoto <inochiama@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Chen Wang <unicorn_wang@outlook.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
sophgo@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH v4 6/6] riscv: dts: sophgo: dts nodes for i2s tdm modules
Date: Wed, 4 Mar 2026 21:57:56 +0400 [thread overview]
Message-ID: <aahuz5KJLL_rAZTH@anton.local> (raw)
In-Reply-To: <aZ939evsOs6nCd5I@inochi.infowork>
On Thu, Feb 26, 2026 at 06:32:27AM +0400, Inochi Amaoto wrote:
> > +#define DMA_CPU_A53 0
> > +#define DMA_CPU_C906_0 1
> > +#define DMA_CPU_C906_1 2
> > +
> > +#endif // _SOPHGO_CV18XX_DMAMUX
> > diff --git a/arch/riscv/boot/dts/sophgo/cv180x.dtsi b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> > index 06b0ce5a2db7..ebe5e8113939 100644
> > --- a/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> > +++ b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> > @@ -8,6 +8,7 @@
> > #include <dt-bindings/gpio/gpio.h>
> > #include <dt-bindings/interrupt-controller/irq.h>
> > #include "cv18xx-reset.h"
> > +#include "cv180x-dmamux.h"
> >
> > / {
> > #address-cells = <1>;
> > @@ -448,6 +449,60 @@ usb: usb@4340000 {
> > status = "disabled";
> > };
> >
> > + i2s0: i2s@4100000 {
> > + compatible = "sophgo,cv1800b-i2s";
> > + reg = <0x04100000 0x1000>;
> > + clocks = <&clk CLK_APB_I2S0>, <&clk CLK_SDMA_AUD0>;
> > + clock-names = "i2s", "mclk";
> > + dmas = <&dmamux DMA_I2S0_RX 1>, <&dmamux DMA_I2S0_TX 1>;
> > + dma-names = "rx", "tx";
> > + status = "disabled";
> > + };
>
> This magic number 1 is bind to the RISC-V cores, I think we should add a
> macro DMA_CPU_ID into CPU file to route the CPU id to real cores.
> Or, just let the borad dts configure which dma is enabled.
Hi, Inochi. Sorry for delay, I've missed the messages somehow.
I'm not sure what is the best option TBH.
If the problem is with the magic number, there are constants for this in your
file:
#define DMA_CPU_A53 0
#define DMA_CPU_C906_0 1
#define DMA_CPU_C906_1 2
So I could use them.
If the problem with hardcoding the CPU - it is little bit more tricky.
Ths commit is in the riscv branch so we could not use ID 0 at all.
Unless you want it to be more generic.
From my understanding we could not boot from CPUID 2. (may be i'm wrong
here) If it is correct, it means the whole setup will only work on CPU
1.
In any case I will follow your suggestion. I agree, leaving this with
the magic number is not good.
Second question:
Do you want me to resubmit this change as A separate patch as the rest
of this patch was applied?
>
> Regards,
> Inochi
>
next prev parent reply other threads:[~2026-03-04 17:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 19:06 [PATCH v4 0/6] ASoC: sophgo: add CV1800 I2S controllers support Anton D. Stavinskii
2026-01-20 19:06 ` [PATCH v4 1/6] ASoC: dt-bindings: sophgo,cv1800b: add I2S/TDM controller Anton D. Stavinskii
2026-01-20 19:21 ` Krzysztof Kozlowski
2026-01-20 19:06 ` [PATCH v4 2/6] ASoC: sophgo: add CV1800B I2S/TDM controller driver Anton D. Stavinskii
2026-01-20 19:06 ` [PATCH v4 3/6] ASoC: dt-bindings: sophgo,cv1800b: add ADC/DAC codec Anton D. Stavinskii
2026-01-21 2:30 ` Rob Herring (Arm)
2026-01-20 19:06 ` [PATCH v4 4/6] ASoC: sophgo: add CV1800B internal ADC codec driver Anton D. Stavinskii
2026-01-20 19:06 ` [PATCH v4 5/6] ASoC: sophgo: add CV1800B internal DAC " Anton D. Stavinskii
2026-01-27 12:49 ` Mark Brown
2026-01-27 15:11 ` Anton D. Stavinskii
2026-01-27 15:13 ` Mark Brown
2026-01-27 15:30 ` Anton D. Stavinskii
2026-01-27 15:46 ` Mark Brown
2026-01-20 19:06 ` [PATCH v4 6/6] riscv: dts: sophgo: dts nodes for i2s tdm modules Anton D. Stavinskii
2026-02-25 22:20 ` Inochi Amaoto
2026-02-25 22:32 ` Inochi Amaoto
2026-03-04 17:57 ` Anton D. Stavinskii [this message]
2026-03-05 0:01 ` Inochi Amaoto
2026-01-27 12:50 ` [PATCH v4 0/6] ASoC: sophgo: add CV1800 I2S controllers support Mark Brown
2026-01-27 18:51 ` Anton D. Stavinskii
2026-01-28 3:02 ` (subset) " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aahuz5KJLL_rAZTH@anton.local \
--to=stavinsky@gmail.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=inochiama@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=perex@perex.cz \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=sophgo@lists.linux.dev \
--cc=tiwai@suse.com \
--cc=unicorn_wang@outlook.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox