mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vivian Wang <wangruikang@iscas.ac.cn>
To: Guodong Xu <guodong@riscstar.com>
Cc: Yixun Lan <dlan@gentoo.org>, Ze Huang <huangze@whut.edu.cn>,
	Alex Elder <elder@riscstar.com>,
	spacemit@lists.linux.dev, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>, Vivian Wang <uwu@dram.page>,
	devicetree@vger.kernel.org, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] riscv: dts: spacemit: Move UARTs under dma-bus for K1
Date: Wed, 25 Jun 2025 11:21:28 +0800	[thread overview]
Message-ID: <965d5dca-72b0-47da-bd9d-efeca16db826@iscas.ac.cn> (raw)
In-Reply-To: <CAH1PCMZ1YUC9SLOSEuCL3oUhYN23UOL+kLrOk8fbJ+EG-w3Umg@mail.gmail.com>

On 6/24/25 20:21, Guodong Xu wrote:
> On Mon, Jun 23, 2025 at 6:04 PM Vivian Wang <wangruikang@iscas.ac.cn> wrote:
>> UART devices in Spacemit K1 use dma-bus DMA translations. Move these
>> nodes under dma-bus to reflect this fact.
...
>>
>> -               sec_uart1: serial@f0612000 {
>> -                       compatible = "spacemit,k1-uart", "intel,xscale-uart";
>> -                       reg = <0x0 0xf0612000 0x0 0x100>;
>> -                       interrupts = <43>;
>> -                       clock-frequency = <14857000>;
>> -                       reg-shift = <2>;
>> -                       reg-io-width = <4>;
>> -                       status = "reserved"; /* for TEE usage */
>> -               };
>> -
> Are you sure sec_uart1 should be placed under the dma_bus? Please double
> check. If sec_uart1 and other peripherals supported by the secure DMA
> (base address: 0xF0600000) share the same address mapping as dma_bus, and
> if they can be accessed by the linux kernel in some cases (as saying
> 'reserved'), then that makes sense. If not, better not move them.

Hi Guodong,

I have confirmed with SpacemiT that sec_uart1 uses dram_range4, a.k.a.
dma-bus, which is same as the rest of the UARTs.

Also, sec_uart1 is usable in e.g. Linux, but only if no TEE is in use.
Using status = "reserved" is the safe choice here. Platforms that do not
run a TEE (or anything similar that would disable access to the
0xf000_0000 to 0xffff_ffff range) and wishing to enable use of sec_uart1
can change the status to "okay".

Vivian "dramforever" Wang


  parent reply	other threads:[~2025-06-25  3:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23 10:04 [PATCH 0/3] riscv: dts: spacemit: Add DMA translation buses " Vivian Wang
2025-06-23 10:04 ` [PATCH 1/3] " Vivian Wang
2025-06-26  7:54   ` Guodong Xu
2025-06-23 10:04 ` [PATCH 2/3] riscv: dts: spacemit: Move UARTs under dma-bus " Vivian Wang
2025-06-24 12:21   ` Guodong Xu
2025-06-24 12:51     ` Vivian Wang
2025-06-25  3:21     ` Vivian Wang [this message]
2025-06-26  7:58       ` Guodong Xu
2025-06-23 10:04 ` [PATCH 3/3] riscv: dts: spacemit: Move eMMC under storage-bus " Vivian Wang
2025-07-09  6:40 ` [PATCH 0/3] riscv: dts: spacemit: Add DMA translation buses " Yixun Lan
2025-07-09  7:17   ` Vivian Wang

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=965d5dca-72b0-47da-bd9d-efeca16db826@iscas.ac.cn \
    --to=wangruikang@iscas.ac.cn \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@gentoo.org \
    --cc=elder@riscstar.com \
    --cc=guodong@riscstar.com \
    --cc=huangze@whut.edu.cn \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=uwu@dram.page \
    /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

all inboxes | Powered by JetHome®