From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E90C4371CF6 for ; Wed, 4 Mar 2026 17:58:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772647085; cv=none; b=qJ421rv+ZHgTVgKSyU4OFmWVfelB2vDrZbuRR084j9YfNUAncjB7VLTZJVGn6UU+T6OCKUHYjD4HP9lPiNJ7IdqFpE+8iUk/HklZoQkCaKv28PgAA8OXO8tbJpmPuyBc5jNB/7DGSVGCtgjCdFwoAvCj2TJ5jPSN5z3tBxpa+lA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772647085; c=relaxed/simple; bh=kD2QH8t4ii2+KFV/KGuDMZq9ZU8V8+zutfjGr5AYUE8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GExaSvqxwcH+TTOgZqNBdRZhDo8yxB9Gu4AVSAHLfieKDmXF5+PPPPTnqyQ8jd/f/oLmk323re6vVoGDCRRyLv91fTQF9Ftw+5ZDv0+667m5B4XSKY1+3ScpB5krTTs6MnYzz3P2sYGqdY+hdEqifGCbDE3hyv51ItDZ0znlLG4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WJvhtmrl; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WJvhtmrl" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-483487335c2so59294335e9.2 for ; Wed, 04 Mar 2026 09:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772647082; x=1773251882; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=2rq5hYgf0faXia9cxwlRkLJL71Mpw7xbT+1o0WoNrPw=; b=WJvhtmrl5SkRmPvSF8lnvcT6UdZQQozqzpcMb5ABlNEtpyFEMxtGKq6DBrKyfL65ue Hcir2qfaeRimVuET92ab2r+1vPYm32/NaZRUtyBBnLpMpcf2n1iWZFhvXyzQYy5CB8X8 KDnqJXnQcgmfVB1eJMcFhv+kGMSV5PydYBBcuPDrO87rFJkTy9vcxK+125E+5buGSr5S Lp88uZIzp18+o8lHZdnrsXbGReDZica7zskF2FDjRuRCeBzUpCBsVIb1I0hIT2c7XCHc YdNe/bZxUV3NvNtRSy7WsmvplKO7vGFXD/kaUFzWMWXuRYbQegAnsDndi5YnN5eW0ZxU J7vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772647082; x=1773251882; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2rq5hYgf0faXia9cxwlRkLJL71Mpw7xbT+1o0WoNrPw=; b=ln3WOczq+prMkBkyOIcek/GHBRF8PozlvdnNHKyQlB9DL5TMx76u8wSqldhzTRzVZq /0lcMPv8jyoOkvZORiE44Oq3q6C9AHxBzAi+4+/rlDN/SHu9o6A/rfMRbmFy1t8dPZyw l+CfvIcf6cjw5MFGjqRt+TtAosoorRHHM41hy+EDnH0YX7VHmr8KV3YIvlic8W1RvAwM 55CY/ku2KTbjHT6XNKldcWInO6F40Uiz5iVZ4AIkb+tbtoGVMjB8GRqxj4mv1GjPeA16 8LDx5mVhKg5ShQJNJixwGiZelppTQq4tdcmcaM874dCSFjqV+lNutBz3oAu03FeIFdj5 ZGYA== X-Forwarded-Encrypted: i=1; AJvYcCUdFRX+SOFChNn4OnomypJLbY89S2w9so/3Ze52C2P2gxcQxVm7ZbmzVUYTUVxyaG/70aOHPbeD5tPDvk4=@vger.kernel.org X-Gm-Message-State: AOJu0YxN1FC8Yvy+fyOD3GETduQMNP+k3lB79IHbKQub9p45ju3KQPmu Ipp2oo0c6UYMqE8t8jGmJgDesEyha4DU27x4OfuyLGzDpZTTKE6mDIB6 X-Gm-Gg: ATEYQzx+++vz6cctNIcm8KZOPooiNSS4LE6KAno6lqqRSyt2t5u20s4SwyI2v6DNDO/ atde39ZQrVddE/ORSzmJMte8y8c2eP3pwx2IXBnFzgRt6YTWIveXW+v96lTXEw9aa9875JKBfbo iQpwnH9e/SsS8OXlT4ZKereAIcrLqsLQdvcxdJfdbRlXAFnzdE/Yk5q2Fq+4TpkOHYupg1+hNXO K9OGSZeLb7URSp5ZmSIlcDYszOK9nkE2Lq6S7KHWqDZRvlATVX4WiH3f3TCu43JFfWc0Z3HE17R sROJkmvhm2u0wOawtP4L8oMkg9LkRgpozrauasBzIMlL+DcYLYcX3YDo1IG7CQB41uzzCpijX4J dqDslD/WWcoBSxHoxikwUZbxfl7OBTuRwtoGWH0QmnSFFYX1JFYI7QUH7bw6QOKpzGbF614DQ/E wFWxSnCdoc/sYCBbWzw5J4339aAYeQXlGw6LoMBfTClWTF0tCKqIIp/CospO5Sr5NDPW90IA== X-Received: by 2002:a05:600c:c163:b0:480:4a4f:c36f with SMTP id 5b1f17b1804b1-485198749b6mr51102325e9.21.1772647082156; Wed, 04 Mar 2026 09:58:02 -0800 (PST) Received: from anton.local (bba-217-164-166-37.alshamil.net.ae. [217.164.166.37]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4851acf9c31sm13254295e9.12.2026.03.04.09.57.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2026 09:58:01 -0800 (PST) Date: Wed, 4 Mar 2026 21:57:56 +0400 From: "Anton D. Stavinskii" To: Inochi Amaoto Cc: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Jaroslav Kysela , Takashi Iwai , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , 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 Message-ID: Mail-Followup-To: Inochi Amaoto , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Jaroslav Kysela , Takashi Iwai , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-sound@vger.kernel.org, devicetree@vger.kernel.org, sophgo@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org References: <20260120-cv1800b-i2s-driver-v4-0-6ef787dc6426@gmail.com> <20260120-cv1800b-i2s-driver-v4-6-6ef787dc6426@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > > #include > > #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 >