From: "Xiangzhi Tang (唐相志)" <Xiangzhi.Tang@mediatek.com>
To: "krzk@kernel.org" <krzk@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"andersson@kernel.org" <andersson@kernel.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
"mathieu.poirier@linaro.org" <mathieu.poirier@linaro.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-remoteproc@vger.kernel.org"
<linux-remoteproc@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"Hailong Fan (范海龙)" <Hailong.Fan@mediatek.com>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Jjian Zhou (周建)" <Jjian.Zhou@mediatek.com>
Subject: Re: [PATCH 1/2] dt-bindings: remoteproc: Add VCP support for mt8196
Date: Sun, 6 Apr 2025 06:46:23 +0000 [thread overview]
Message-ID: <625410299fd45188759d3b1fe205e6c42af0bbda.camel@mediatek.com> (raw)
In-Reply-To: <860ae623-f33f-4cfe-be08-6bb6524ecf94@kernel.org>
On Wed, 2025-04-02 at 13:11 +0200, Krzysztof Kozlowski wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On 02/04/2025 11:19, Xiangzhi Tang wrote:
> > +
> > +description:
> > + The MediaTek VCP enables the SoC control the MediaTek Video
> > Companion Risc-V coprocessor.
>
> Wrap at coding style.
> Thanks comment, I will fix it on v1 version.
>
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - mediatek,mt8196-vcp
> > +
> > + reg:
> > + items:
> > + - description: sram base
> > + - description: cfg group IO
> > + - description: cfg core group IO
> > + - description: cfg sec group IO
> > + - description: vcp rdy group IO
> > +
> > + reg-names:
> > + items:
> > + - const: sram
> > + - const: cfg
> > + - const: cfg_core
> > + - const: cfg_sec
> > + - const: vcp_vlp_ao_rsvd7
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + mboxes:
> > + description:
> > + Using mailbox to communicate with VCP, it should have this
> > + property and list of phandle, mailbox specifiers. See
> > + Documentation/devicetree/bindings/mailbox/mediatek,mt8196-
> > vcp-mbox.yaml
> > + for details.
>
> Drop entire description, redundant.
> Thanks comment, I will fix it on v1 version.
>
> > + $ref: /schemas/types.yaml#/definitions/phandle-array
> > +
>
> No, you do not get your own type. Instead list items or just
> maxItems.
> Thanks comment, I will fix it on v1 version.
>
>
> > + mbox-names:
> > + maxItems: 5
>
> No, you must list the items.
> Thanks comment, I will fix it on v1 version.
>
> > +
> > + power-domains:
> > + description:
> > + A phandle and PM domain specifier as defined by bindings
> > + of the power controller specified by phandle. See
> > + Documentation/devicetree/bindings/power/power-domain.yaml
> > for details.
>
> Look how other bindings do it. Do not repeat obvious stuff, do not
> develop bindings entirely different than all others.
> Thanks comment, I will update it on v1 version.
>
> > + maxItems: 1
> > +
> > + iommus:
> > + description:
> > + Using MediaTek iommu to apply larb ports for Multimedia
> > Memory
> > + Management Unit and address translation
> > + Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml
>
> Really, look at other code first.
> Yes, phandle reference iommu node
>
> > +
> > + memory-region:
> > + maxItems: 1
> > +
> > + vcp-mem-tbl:
> > + description:
> > + Manage reserved memory for VCP RTOS FW and various features.
>
> No, reserved memory is in memory-region. Drop property.
> Thanks comment, I will fix it on v1 version.
>
> > + $ref: /schemas/types.yaml#/definitions/uint32-array
> > + minItems: 2
> > + maxItems: 12
> > +
> > +patternProperties:
> > + "^vcp_[a-f0-9]+$":
>
> Follow DTS coding style.
>
> Heh, nothing here was really tested and you have obvious bugs pointed
> out by simple testing of DTS.
> I run test "make dt_binding_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/remoteproc/mediatek,m
t8196-vcp.yaml", And, I have to cherry-pick first "
https://lore.kernel.org/all/20250307032942.10447-1-guangjie.song@mediatek.com/
" and "
https://patchwork.kernel.org/project/linux-mediatek/patch/20250317110331.2776-4-jjian.zhou@mediatek.com/
"
>
> Why these children are needed in the first place? Offsets are implied
> by
> parent compatible.
> Thanks comment, I will check it dtb style again.
>
> > + type: object
> > + description:
> > + The MediaTek VCP integrated to SoC might be a multi-core
> > version.
> > + The other cores are represented as child nodes of the boot
> > core.
> > + There are some integration differences for the IP like the
> > usage of
> > + address translator for translating SoC bus addresses into
> > address
> > + space for the processor.
> > +
> > + The SRAM are shared by all cores, each VCP core only using a
> > piece
> > + SRAM memory. The power of SRAM should be enabled before
> > booting VCP cores.
> > + The size of SRAM are varied on differnt SoCs.
> > +
> > + The VCP cores has differences on different SoCs to support
> > for
> > + Hart.
> > +
> > + properties:
> > + compatible:
> > + enum:
> > + - mediatek,vcp-core
> > + - mediatek,mmup-core
> > +
> > + twohart:
>
> Missing vendor prefix, look at writing bindings and other examples.
> Thanks comment, I will check it dtb style again.
>
> > + enum: [0, 1]
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > +
> > + sram-offset:
> > + description:
> > + Allocated SRAM memory for each VCP core used.
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > +
> > + required:
> > + - compatible
> > + - twohart
> > + - sram-offset
> > +
> > + additionalProperties: false
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - reg-names
> > + - interrupts
> > + - mboxes
> > + - mbox-names
> > + - power-domains
> > + - iommus
> > + - memory-region
> > + - vcp-mem-tbl
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > + #include <dt-bindings/interrupt-controller/irq.h>
> > + #include <dt-bindings/power/mt8196-power.h>
> > +
> > + vcp: vcp@31800000 {
> > + compatible = "mediatek,mt8196-vcp";
> > + reg = <0x31800000 0x60000>,
> > + <0x31a04000 0xa000>,
> > + <0x31bd0000 0x1000>,
> > + <0x31a70020 0x100>,
> > + <0x1c00091c 0x4>;
>
> Quite different address, are you sure this is still part of this
> device? Looks like on register.
> Yes, It is necessary register for this device
>
>
> Best regards,
> Krzyszto
next prev parent reply other threads:[~2025-04-06 6:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 9:19 [PATCH 0/2] Add vcp driver Xiangzhi Tang
2025-04-02 9:19 ` [PATCH 1/2] dt-bindings: remoteproc: Add VCP support for mt8196 Xiangzhi Tang
2025-04-02 11:11 ` Krzysztof Kozlowski
2025-04-06 6:46 ` Xiangzhi Tang (唐相志) [this message]
2025-04-06 12:10 ` Krzysztof Kozlowski
2025-04-02 12:55 ` Rob Herring (Arm)
2025-04-06 8:04 ` Xiangzhi Tang (唐相志)
2025-04-02 9:19 ` [PATCH 2/2] remoterpoc: mediatek: vcp: Add vcp remoteproc driver Xiangzhi Tang
2025-04-02 11:16 ` Krzysztof Kozlowski
2025-04-06 7:29 ` Xiangzhi Tang (唐相志)
2025-04-06 12:12 ` Krzysztof Kozlowski
2025-04-02 14:19 ` Mathieu Poirier
2025-04-06 7:07 ` Xiangzhi Tang (唐相志)
2025-04-02 10:31 ` [PATCH 0/2] Add vcp driver Krzysztof Kozlowski
2025-04-06 8:05 ` Xiangzhi Tang (唐相志)
2025-04-06 12:13 ` Krzysztof Kozlowski
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=625410299fd45188759d3b1fe205e6c42af0bbda.camel@mediatek.com \
--to=xiangzhi.tang@mediatek.com \
--cc=Hailong.Fan@mediatek.com \
--cc=Jjian.Zhou@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=andersson@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=matthias.bgg@gmail.com \
--cc=robh@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).