[PATCH 2/3] riscv: dts: spacemit: Move UARTs under dma-bus for K1
Guodong Xu
guodong at riscstar.com
Thu Jun 26 00:58:17 PDT 2025
On Wed, Jun 25, 2025 at 11:21 AM Vivian Wang <wangruikang at iscas.ac.cn> wrote:
>
> On 6/24/25 20:21, Guodong Xu wrote:
> > On Mon, Jun 23, 2025 at 6:04 PM Vivian Wang <wangruikang at 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 at 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".
>
Ok, with that confirmed, I'd say this patch looks good to me.
Reviewed-by: Guodong Xu <guodong at riscstar.com>
Thanks.
> Vivian "dramforever" Wang
>
More information about the linux-riscv
mailing list