All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
	netdev@vger.kernel.org, nbd@nbd.name, john@phrozen.org,
	sean.wang@mediatek.com, Mark-MC.Lee@mediatek.com,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, matthias.bgg@gmail.com,
	linux-mediatek@lists.infradead.org, Bo.Jiao@mediatek.com,
	sujuan.chen@mediatek.com, ryder.Lee@mediatek.com,
	evelyn.tsai@mediatek.com, devicetree@vger.kernel.org,
	robh+dt@kernel.org, daniel@makrotopia.org,
	krzysztof.kozlowski+dt@linaro.org
Subject: Re: [PATCH v3 net-next 2/8] dt-bindings: net: mediatek: add WED RX binding for MT7986 eth driver
Date: Tue, 8 Nov 2022 15:20:57 +0100	[thread overview]
Message-ID: <Y2plydHIPxmt6Azn@localhost.localdomain> (raw)
In-Reply-To: <62fcc16e-51cb-fee4-ca8d-3ff546552595@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 7759 bytes --]

> On 03/11/2022 19:29, Lorenzo Bianconi wrote:
> >> On 03/11/2022 13:51, Lorenzo Bianconi wrote:
> >>>>> diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7986-wo-boot.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7986-wo-boot.yaml
> >>>>> new file mode 100644
> >>>>> index 000000000000..6c3c514c48ef
> >>>>> --- /dev/null
> >>>>> +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7986-wo-boot.yaml
> > 
> > Regarding "mediatek,mt7986-wed" compatible string it has been added to
> > mt7986a.dtsi in the commit below:
> > 
> > commit 00b9903996b3e1e287c748928606d738944e45de
> > Author: Lorenzo Bianconi <lorenzo@kernel.org>
> > Date:   Tue Sep 20 12:11:13 2022 +0200
> > 
> > arm64: dts: mediatek: mt7986: add support for Wireless Ethernet Dispatch
> > 
> >>>>
> >>>> arm is only for top-level stuff. Choose appropriate subsystem, soc as
> >>>> last resort.
> >>>
> >>> these chips are used only for networking so is net folder fine?
> >>
> >> So this is some MMIO and no actual device? Then rather soc.
> > 
> > ack, I will move them there
> > 
> >>
> >>>
> >>>>
> >>>>> @@ -0,0 +1,47 @@
> >>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >>>>> +%YAML 1.2
> >>>>> +---
> >>>>> +$id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt7986-wo-boot.yaml#
> >>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>>>> +
> >>>>> +title:
> >>>>> +  MediaTek Wireless Ethernet Dispatch WO boot controller interface for MT7986
> >>>>> +
> >>>>> +maintainers:
> >>>>> +  - Lorenzo Bianconi <lorenzo@kernel.org>
> >>>>> +  - Felix Fietkau <nbd@nbd.name>
> >>>>> +
> >>>>> +description:
> >>>>> +  The mediatek wo-boot provides a configuration interface for WED WO
> >>>>> +  boot controller on MT7986 soc.
> >>>>
> >>>> And what is "WED WO boot controller?
> >>>
> >>> WED WO is a chip used for networking packet processing offloaded to the Soc
> >>> (e.g. packet reordering). WED WO boot is the memory used to store start address
> >>> of wo firmware. Anyway I will let Sujuan comment on this.
> >>
> >> A bit more should be in description.
> > 
> > I will let Sujuan adding more details (since I do not have them :))
> > 
> >>
> >>>
> >>>>
> >>>>> +
> >>>>> +properties:
> >>>>> +  compatible:
> >>>>> +    items:
> >>>>> +      - enum:
> >>>>> +          - mediatek,mt7986-wo-boot
> >>>>> +      - const: syscon
> >>>>> +
> >>>>> +  reg:
> >>>>> +    maxItems: 1
> >>>>> +
> >>>>> +  interrupts:
> >>>>> +    maxItems: 1
> >>>>> +
> >>>>> +required:
> >>>>> +  - compatible
> >>>>> +  - reg
> >>>>> +
> >>>>> +additionalProperties: false
> >>>>> +
> >>>>> +examples:
> >>>>> +  - |
> >>>>> +    soc {
> >>>>> +      #address-cells = <2>;
> >>>>> +      #size-cells = <2>;
> >>>>> +
> >>>>> +      wo_boot: syscon@15194000 {
> >>>>> +        compatible = "mediatek,mt7986-wo-boot", "syscon";
> >>>>> +        reg = <0 0x15194000 0 0x1000>;
> >>>>> +      };
> >>>>> +    };
> >>>>> diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7986-wo-ccif.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7986-wo-ccif.yaml
> >>>>> new file mode 100644
> >>>>> index 000000000000..6357a206587a
> >>>>> --- /dev/null
> >>>>> +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7986-wo-ccif.yaml
> >>>>> @@ -0,0 +1,50 @@
> >>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >>>>> +%YAML 1.2
> >>>>> +---
> >>>>> +$id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt7986-wo-ccif.yaml#
> >>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>>>> +
> >>>>> +title: MediaTek Wireless Ethernet Dispatch WO controller interface for MT7986
> >>>>> +
> >>>>> +maintainers:
> >>>>> +  - Lorenzo Bianconi <lorenzo@kernel.org>
> >>>>> +  - Felix Fietkau <nbd@nbd.name>
> >>>>> +
> >>>>> +description:
> >>>>> +  The mediatek wo-ccif provides a configuration interface for WED WO
> >>>>> +  controller on MT7986 soc.
> >>>>
> >>>> All previous comments apply.
> >>>>
> >>>>> +
> >>>>> +properties:
> >>>>> +  compatible:
> >>>>> +    items:
> >>>>> +      - enum:
> >>>>> +          - mediatek,mt7986-wo-ccif
> >>>>> +      - const: syscon
> >>>>> +
> >>>>> +  reg:
> >>>>> +    maxItems: 1
> >>>>> +
> >>>>> +  interrupts:
> >>>>> +    maxItems: 1
> >>>>> +
> >>>>> +required:
> >>>>> +  - compatible
> >>>>> +  - reg
> >>>>> +  - interrupts
> >>>>> +
> >>>>> +additionalProperties: false
> >>>>> +
> >>>>> +examples:
> >>>>> +  - |
> >>>>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> >>>>> +    #include <dt-bindings/interrupt-controller/irq.h>
> >>>>> +    soc {
> >>>>> +      #address-cells = <2>;
> >>>>> +      #size-cells = <2>;
> >>>>> +
> >>>>> +      wo_ccif0: syscon@151a5000 {
> >>>>> +        compatible = "mediatek,mt7986-wo-ccif", "syscon";
> >>>>> +        reg = <0 0x151a5000 0 0x1000>;
> >>>>> +        interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
> >>>>> +      };
> >>>>> +    };
> >>>>> diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7986-wo-dlm.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7986-wo-dlm.yaml
> >>>>> new file mode 100644
> >>>>> index 000000000000..a499956d9e07
> >>>>> --- /dev/null
> >>>>> +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7986-wo-dlm.yaml
> >>>>> @@ -0,0 +1,50 @@
> >>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >>>>> +%YAML 1.2
> >>>>> +---
> >>>>> +$id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt7986-wo-dlm.yaml#
> >>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>>>> +
> >>>>> +title: MediaTek Wireless Ethernet Dispatch WO hw rx ring interface for MT7986
> >>>>> +
> >>>>> +maintainers:
> >>>>> +  - Lorenzo Bianconi <lorenzo@kernel.org>
> >>>>> +  - Felix Fietkau <nbd@nbd.name>
> >>>>> +
> >>>>> +description:
> >>>>> +  The mediatek wo-dlm provides a configuration interface for WED WO
> >>>>> +  rx ring on MT7986 soc.
> >>>>> +
> >>>>> +properties:
> >>>>> +  compatible:
> >>>>> +    const: mediatek,mt7986-wo-dlm
> >>>>> +
> >>>>> +  reg:
> >>>>> +    maxItems: 1
> >>>>> +
> >>>>> +  resets:
> >>>>> +    maxItems: 1
> >>>>> +
> >>>>> +  reset-names:
> >>>>> +    maxItems: 1
> >>>>> +
> >>>>> +required:
> >>>>> +  - compatible
> >>>>> +  - reg
> >>>>> +  - resets
> >>>>> +  - reset-names
> >>>>> +
> >>>>> +additionalProperties: false
> >>>>> +
> >>>>> +examples:
> >>>>> +  - |
> >>>>> +    soc {
> >>>>> +      #address-cells = <2>;
> >>>>> +      #size-cells = <2>;
> >>>>> +
> >>>>> +      wo_dlm0: wo-dlm@151e8000 {
> >>>>
> >>>> Node names should be generic.
> >>>> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> >>>
> >>> DLM is a chip used to store the data rx ring of wo firmware. I do not have a
> >>> better node name (naming is always hard). Can you please suggest a better name?
> >>
> >> The problem is that you added three new devices which seem to be for the
> >> same device - WED. It looks like some hacky way of avoid proper hardware
> >> description - let's model everything as MMIO and syscons...
> > 
> > is it fine to use syscon as node name even if we do not declare it in compatible
> > string for dlm?
> > 
> 
> No, rather not. It's a shortcut and if used without actual syscon it
> would be confusing. You could still call it system-controller, though.

ack, I used a different approach in v4 since I figured out I can move dlm node
in memory-region.

Regards,
Lorenzo

> 
> Best regards,
> Krzysztof
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2022-11-08 14:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03  9:27 [PATCH v3 net-next 0/8] introduce WED RX support to MT7986 SoC Lorenzo Bianconi
2022-11-03  9:28 ` [PATCH v3 net-next 1/8] arm64: dts: mediatek: mt7986: add support for RX Wireless Ethernet Dispatch Lorenzo Bianconi
2022-11-03 14:13   ` AngeloGioacchino Del Regno
2022-11-03 17:58     ` Lorenzo Bianconi
2022-11-04  9:05     ` Lorenzo Bianconi
2022-11-04  9:10       ` AngeloGioacchino Del Regno
2022-11-03  9:28 ` [PATCH v3 net-next 2/8] dt-bindings: net: mediatek: add WED RX binding for MT7986 eth driver Lorenzo Bianconi
2022-11-03 15:08   ` Krzysztof Kozlowski
2022-11-03 17:51     ` Lorenzo Bianconi
2022-11-03 18:00       ` Krzysztof Kozlowski
2022-11-03 18:29         ` Lorenzo Bianconi
2022-11-07 10:04           ` Krzysztof Kozlowski
2022-11-08 14:20             ` Lorenzo Bianconi [this message]
2022-12-06  3:18             ` Sujuan Chen (陈素娟)
2022-11-03  9:28 ` [PATCH v3 net-next 3/8] net: ethernet: mtk_wed: introduce wed mcu support Lorenzo Bianconi
2022-11-03 14:23   ` AngeloGioacchino Del Regno
2022-11-03 17:57     ` Lorenzo Bianconi
2022-11-04  2:33   ` Daniel Golle
2022-11-04  8:30     ` Lorenzo Bianconi
2022-11-03  9:28 ` [PATCH v3 net-next 4/8] net: ethernet: mtk_wed: introduce wed wo support Lorenzo Bianconi
2022-11-03  9:28 ` [PATCH v3 net-next 5/8] net: ethernet: mtk_wed: rename tx_wdma array in rx_wdma Lorenzo Bianconi
2022-11-03  9:28 ` [PATCH v3 net-next 6/8] net: ethernet: mtk_wed: add configure wed wo support Lorenzo Bianconi
2022-11-03  9:28 ` [PATCH v3 net-next 7/8] net: ethernet: mtk_wed: add rx mib counters Lorenzo Bianconi
2022-11-03  9:28 ` [PATCH v3 net-next 8/8] MAINTAINERS: update MEDIATEK ETHERNET entry Lorenzo Bianconi

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=Y2plydHIPxmt6Azn@localhost.localdomain \
    --to=lorenzo@kernel.org \
    --cc=Bo.Jiao@mediatek.com \
    --cc=Mark-MC.Lee@mediatek.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=evelyn.tsai@mediatek.com \
    --cc=john@phrozen.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=ryder.Lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=sujuan.chen@mediatek.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.