Devicetree
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Ze Huang <huangze@whut.edu.cn>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>, Yixun Lan <dlan@gentoo.org>,
	 Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	 Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	 Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	linux-usb@vger.kernel.org,  devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/4] dt-bindings: soc: spacemit: Add K1 MBUS controller
Date: Tue, 27 May 2025 08:51:19 +0200	[thread overview]
Message-ID: <20250527-energetic-pink-cricket-a282fd@kuoka> (raw)
In-Reply-To: <20250526-b4-k1-dwc3-v3-v4-2-63e4e525e5cb@whut.edu.cn>

On Mon, May 26, 2025 at 10:40:18PM GMT, Ze Huang wrote:
> Some devices on the SpacemiT K1 SoC perform DMA through a memory bus
> (MBUS) that is not their immediate parent in the device tree. This bus
> uses a different address mapping than the CPU.
> 
> To express this topology properly, devices are expected to use the
> interconnects with name "dma-mem" to reference the MBUS controller.

I don't get it, sorry. Devices performing DMA through foo-bar should use
dmas property for foo-bar DMA controller. Interconnects is not for that.


> 
> Signed-off-by: Ze Huang <huangze@whut.edu.cn>
> ---
>  .../bindings/soc/spacemit/spacemit,k1-mbus.yaml    | 55 ++++++++++++++++++++++
>  1 file changed, 55 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-mbus.yaml b/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-mbus.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..533cf99dff689cf55a159118c32a676054294ffa
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-mbus.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/spacemit/spacemit,k1-mbus.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: SpacemiT Memory Bus controller
> +
> +maintainers:
> +  - Ze Huang <huangze9015@gmail.com>
> +
> +description: |
> +  On the SpacemiT K1 SoC, some devices do not perform DMA through their
> +  immediate parent node in the device tree. Instead, they access memory
> +  through a separate memory bus (MBUS) that uses a different address
> +  mapping from the CPU.
> +
> +  To correctly describe the DMA path, such devices must reference the MBUS
> +  controller through an interconnect with the reserved name "dma-mem".
> +
> +properties:
> +  compatible:
> +    const: spacemit,k1-mbus
> +
> +  reg:
> +    maxItems: 1
> +
> +  dma-ranges:
> +    maxItems: 1
> +
> +  "#address-cells": true
> +
> +  "#size-cells": true

No improvements.


> +
> +  "#interconnect-cells":
> +    const: 0

This is not a interconnect provider, but DMA controller, according to
youro description.

> +
> +required:
> +  - compatible
> +  - reg
> +  - dma-ranges
> +  - "#interconnect-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    dram-controller@0 {

Either dma-controller or memory-controller, decide what is this.

> +        compatible = "spacemit,k1-mbus";
> +        reg = <0x00000000 0x80000000>;
> +        dma-ranges = <0x00000000 0x00000000 0x80000000>;
> +        #address-cells = <1>;
> +        #size-cells = <1>;

Nothing improved.

> +        #interconnect-cells = <0>;
> +    };
> 
> -- 
> 2.49.0
> 

  reply	other threads:[~2025-05-27  6:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-26 14:40 [PATCH v4 0/4] Add SpacemiT K1 USB3.0 host controller support Ze Huang
2025-05-26 14:40 ` [PATCH v4 1/4] dt-bindings: usb: dwc3: add support for SpacemiT K1 Ze Huang
2025-05-27  6:47   ` Krzysztof Kozlowski
2025-05-27  6:53   ` Krzysztof Kozlowski
2025-05-26 14:40 ` [PATCH v4 2/4] dt-bindings: soc: spacemit: Add K1 MBUS controller Ze Huang
2025-05-27  6:51   ` Krzysztof Kozlowski [this message]
2025-05-27 11:13     ` Ze Huang
2025-05-27 16:25       ` Rob Herring
2025-05-27 16:41         ` Ze Huang
2025-05-27 17:12           ` Rob Herring
2025-05-27  6:54   ` Krzysztof Kozlowski
2025-05-27 11:15     ` Ze Huang
2025-05-26 14:40 ` [PATCH v4 3/4] usb: dwc3: add generic driver to support flattened DT Ze Huang
2025-06-03  1:20   ` Thinh Nguyen
2025-06-03  2:51     ` Ze Huang
2025-07-04  2:10       ` Frank Li
2025-07-04  2:41         ` Ze Huang
2025-06-05 13:34   ` Yixun Lan
     [not found]   ` <20250605213443.17a7aa26b@smtp.qiye.163.com>
2025-06-06 11:43     ` Ze Huang
2025-05-26 14:40 ` [PATCH v4 4/4] riscv: dts: spacemit: add usb3.0 support for K1 Ze Huang

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=20250527-energetic-pink-cricket-a282fd@kuoka \
    --to=krzk@kernel.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@gentoo.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=huangze@whut.edu.cn \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=spacemit@lists.linux.dev \
    /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