Re: [PATCH RFC] riscv: dts: spacemit: Add DMA translation buses for K1

Krzysztof Kozlowski
2025-06-17T09:35:59Z

On 17/06/2025 10:48, Vivian Wang wrote:
> Hi Krzysztof,
>
> On 6/17/25 14:21, Krzysztof Kozlowski wrote:
>> On 17/06/2025 07:21, Vivian Wang wrote:
>>> The SpacemiT K1 has various static translations of DMA accesses. Add
>>> these as simple-bus nodes. Devices actually using these translation will
>>> be added in later patches.
>>>
>>> The bus names are assigned according to consensus with SpacemiT [1].
>>
>> Read the feedback there:
>>
>> "So, as you are submitting the first node(s) under network_bus: bus@5, you
>> should have this added into your patchset, instead of sending out with
>> none."
> As mentioned in the patch extra message, this is an RFC meant for
> achieving consensus on what the bus nodes should look like, not an
> actual patch meant to be taken. I was hoping I was clear on that, but I
> guess that paragraph was buried too deep. Well...
>> Plus simple bus within MMIO node needs unit address. IOW, don't mix MMIO
>> with non-MMIO. I also suspect this does not pass checks, so the tools
>> can do our review...
>
> This DT passes "make dtbs_check" fine, with only unrelated warnings on
> sec_uart1 that was already there before:
>
>   DTC [C] arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtb
> .../arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtb: serial@f0612000
> (spacemit,k1-uart): 'clock-names' is a required property
>         from schema $id: http://devicetree.org/schemas/serial/8250.yaml#
>   DTC [C] arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dtb
> .../arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dtb: serial@f0612000
> (spacemit,k1-uart): 'clock-names' is a required property
>         from schema $id: http://devicetree.org/schemas/serial/8250.yaml#
>
> To be honest, I don't understand what "within MMIO node" means here.
> Should the buses be taken out of /soc and added as its siblings?
These looks like children of simple-bus. If that's right: children of
simple-bus are supposed to have unit addresses (see also simple-bus in
the DT schema).

Best regards,
Krzysztof