Message ID | 20241024092608.431581-2-karl.li@mediatek.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Add MediaTek APU Mailbox Support For MT8196 | expand |
On 24/10/2024 11:25, Karl.Li wrote: > From: Karl Li <karl.li@mediatek.com> > > Add apu-mailbox dt-binding document. We see from the diff. What we see is what is APU and this hardware? A nit, subject: drop second/last, redundant "document". The "dt-bindings" prefix is already stating that these are bindings so a document. See also: https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 > > Signed-off-by: Karl Li <karl.li@mediatek.com> > --- > .../mailbox/mediatek,apu-mailbox.yaml | 55 +++++++++++++++++++ > 1 file changed, 55 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml > > diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml > new file mode 100644 > index 000000000000..cb4530799bef > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml > @@ -0,0 +1,55 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mailbox/mediatek,apu-mailbox.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MediaTek APU mailbox What is APU? > + > +maintainers: > + - Karl Li <Karl.Li@mediatek.com> > + > +description: > + The MediaTek APU-Mailbox facilitates communication with the > + APU microcontroller. Within the MediaTek APU subsystem, a > + message passing mechanism is built on top of the mailbox system. > + The mailbox only has limited space for each message. The firmware > + expects the message header from the mailbox, while the message body > + is passed through some fixed shared memory. > + > +properties: > + compatible: > + enum: > + - mediatek,mt8188-apu-mailbox > + - mediatek,mt8196-apu-mailbox > + > + "#mbox-cells": > + const: 1 > + description: > + The cell describe which channel the device will use. > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > +required: > + - compatible > + - "#mbox-cells" > + - reg > + - interrupts > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/arm-gic.h> > + #include <dt-bindings/interrupt-controller/irq.h> > + > + apu_mailbox: mailbox@4c200000 { Drop unused label. > + compatible = "mediatek,mt8196-apu-mailbox"; > + reg = <0 0x4c200000 0 0xfffff>; > + interrupts = <GIC_SPI 638 IRQ_TYPE_LEVEL_HIGH 0>; 4 cells? No warnings on this? > + #mbox-cells = <1>; > + }; Best regards, Krzysztof
Il 24/10/24 11:25, Karl.Li ha scritto: > From: Karl Li <karl.li@mediatek.com> > > Add apu-mailbox dt-binding document. > > Signed-off-by: Karl Li <karl.li@mediatek.com> > --- > .../mailbox/mediatek,apu-mailbox.yaml | 55 +++++++++++++++++++ > 1 file changed, 55 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml > > diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml > new file mode 100644 > index 000000000000..cb4530799bef > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml > @@ -0,0 +1,55 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mailbox/mediatek,apu-mailbox.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MediaTek APU mailbox > + > +maintainers: > + - Karl Li <Karl.Li@mediatek.com> > + > +description: > + The MediaTek APU-Mailbox facilitates communication with the > + APU microcontroller. Within the MediaTek APU subsystem, a > + message passing mechanism is built on top of the mailbox system. > + The mailbox only has limited space for each message. The firmware > + expects the message header from the mailbox, while the message body > + is passed through some fixed shared memory. > + > +properties: > + compatible: > + enum: > + - mediatek,mt8188-apu-mailbox > + - mediatek,mt8196-apu-mailbox In addition to Krzysztof's review...... oneOf: - const: mediatek,mt8188-apu-mailbox - items: - enum: - mediatek,mt8195-apu-mailbox - mediatek,mt8196-apu-mailbox - const: mediatek,mt8188-apu-mailbox should be like that - I haven't checked if this gives any warnings, but anyway you got the point, I think. Regards, Angelo
On Thu, 24 Oct 2024 17:25:43 +0800, Karl.Li wrote: > From: Karl Li <karl.li@mediatek.com> > > Add apu-mailbox dt-binding document. > > Signed-off-by: Karl Li <karl.li@mediatek.com> > --- > .../mailbox/mediatek,apu-mailbox.yaml | 55 +++++++++++++++++++ > 1 file changed, 55 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.example.dtb: mailbox@4c200000: reg: [[0, 1277165568], [0, 1048575]] is too long from schema $id: http://devicetree.org/schemas/mailbox/mediatek,apu-mailbox.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20241024092608.431581-2-karl.li@mediatek.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml new file mode 100644 index 000000000000..cb4530799bef --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/mediatek,apu-mailbox.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/mediatek,apu-mailbox.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek APU mailbox + +maintainers: + - Karl Li <Karl.Li@mediatek.com> + +description: + The MediaTek APU-Mailbox facilitates communication with the + APU microcontroller. Within the MediaTek APU subsystem, a + message passing mechanism is built on top of the mailbox system. + The mailbox only has limited space for each message. The firmware + expects the message header from the mailbox, while the message body + is passed through some fixed shared memory. + +properties: + compatible: + enum: + - mediatek,mt8188-apu-mailbox + - mediatek,mt8196-apu-mailbox + + "#mbox-cells": + const: 1 + description: + The cell describe which channel the device will use. + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - "#mbox-cells" + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + + apu_mailbox: mailbox@4c200000 { + compatible = "mediatek,mt8196-apu-mailbox"; + reg = <0 0x4c200000 0 0xfffff>; + interrupts = <GIC_SPI 638 IRQ_TYPE_LEVEL_HIGH 0>; + #mbox-cells = <1>; + };