dt-bindings: mailbox: cix: add device tree binding documentation.
Subsystems (2)
PATCH 1/2 dt-bindings: mailbox: cix: add device tree binding documentation.
From: Guomin Chen <[email protected]>
This patch adds device tree binding for mailbox from Cixtech.
--- .../bindings/mailbox/cix-mailbox.yaml | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +74 -0
@@ -0,0 +1,74 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/cix-mailbox.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cix mailbox controller + +maintainers: + - Lihua Liu <[email protected]> + +description: + CIX mailbox controller is used to exchange message within + multiple processors, such as AP, AUDIO DSP, SensorHub MCU, + etc. It supports 10 mailbox channels with different operating + mode and every channel is unidirectional. + +properties: + compatible: + const: cix,sky1-mbox + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#mbox-cells": + description: | + <&phandle channel> + phandle : Label name of controller + channel : Channel number + + This controller supports three types of unidirectional channels, they are + 1 register based channel, 1 fifo based channel and 8 fast channels. + A total of 10 channels for each controller. Following types are + supported: + channel 0_7 - Fast channel with 32bit transmit register and IRQ support. + channel 8 - Reg based channel with 32*32bit transsmit register and + Doorbell+transmit acknowledgment IRQ support + channel 9 - Fifo based channel with 32*32bit depth fifo and IRQ support. + const: 1 + + cix,mbox-dir: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Direction of the mailbox (0:TX or 1:RX) + enum: [0, 1] + +required: + - compatible + - reg + - interrupts + - "#mbox-cells" + - cix,mbox-dir + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + soc { + #address-cells = <2>; + #size-cells = <2>; + + mbox0: mailbox@30000000 { + compatible = "cix,sky1-mbox"; + reg = <0 0x30000000 0 0x10000>; + interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH 0>; + #mbox-cells = <1>; + cix,mbox-dir = <0>; + status = "okay"; + }; + };
Signature · 1 line
2.34.1
Quoted 3 lines · Guomin Chen
From: Guomin Chen <[email protected]>
This patch adds device tree binding for mailbox from Cixtech.
Please do not use "This commit/patch/change", but imperative mood. See longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
A nit, subject: drop second/last, redundant "device tree binding documentation.". The "dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
Also, no full stop in the subject.
Quoted 6 lines
Reviewed-by Peter Chen <[email protected]>Signed-off-by Lihua Liu <[email protected]>Signed-off-by Guomin Chen <[email protected]>--- .../bindings/mailbox/cix-mailbox.yaml | 74 +++++++++++++++++++
Filename matching compatible.
Quoted 15 lines
1 file changed, 74 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/cix-mailbox.yamlDocumentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +6
-0@@ -0,0 +1,74 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/cix-mailbox.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# +
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml line 16
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +10
-0+title: Cix mailbox controller + +maintainers: + - Lihua Liu <[email protected]> + +description: + CIX mailbox controller is used to exchange message within + multiple processors, such as AP, AUDIO DSP, SensorHub MCU, + etc. It supports 10 mailbox channels with different operating + mode and every channel is unidirectional.
uni but configurable or each channel has specific direction?
Quoted 6 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +6
-0+ +properties: + compatible: + const: cix,sky1-mbox + + reg:
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml line 32
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +10
-0+ maxItems: 1 + + interrupts: + maxItems: 1 + + "#mbox-cells": + description: | + <&phandle channel> + phandle : Label name of controller + channel : Channel number
Drop above and explain what the cell argument is.
Quoted 5 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +5
-0+ + This controller supports three types of unidirectional channels, they are + 1 register based channel, 1 fifo based channel and 8 fast channels. + A total of 10 channels for each controller. Following types are + supported:
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml line 47
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +10
-0+ channel 0_7 - Fast channel with 32bit transmit register and IRQ support. + channel 8 - Reg based channel with 32*32bit transsmit register and + Doorbell+transmit acknowledgment IRQ support + channel 9 - Fifo based channel with 32*32bit depth fifo and IRQ support. + const: 1 + + cix,mbox-dir: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Direction of the mailbox (0:TX or 1:RX) + enum: [0, 1]
I don't understand why do you need it. By not sending us driver patch, you are not making it easier. Why would provider care how consumers use the mbox channel? Maybe consumer should choose the direction?
Quoted 15 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +15
-0+ +required: + - compatible + - reg + - interrupts + - "#mbox-cells" + - cix,mbox-dir + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + soc {
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml line 72
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +10
-0+ #address-cells = <2>; + #size-cells = <2>; + + mbox0: mailbox@30000000 { + compatible = "cix,sky1-mbox"; + reg = <0 0x30000000 0 0x10000>; + interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH 0>; + #mbox-cells = <1>; + cix,mbox-dir = <0>; + status = "okay";
Drop
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml line 74
Quoted 2 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +2
-0+ }; + };
Best regards,
Krzysztof
Quoted 11 lines · Krzysztof Kozlowski
EXTERNAL EMAIL
Quoted 3 lines · Guomin Chen
From: Guomin Chen <[email protected]>
This patch adds device tree binding for mailbox from Cixtech.
Please do not use "This commit/patch/change", but imperative mood. See longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
Quoted 8 lines
A nit, subject: drop second/last, redundant "device tree binding documentation.". The "dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18Also, no full stop in the subject.
hi Krzysztof
Thank you for your careful review. I will address the issues you mentioned in the next version.
Quoted 67 lines
Quoted 6 lines
Reviewed-by Peter Chen <[email protected]>Signed-off-by Lihua Liu <[email protected]>Signed-off-by Guomin Chen <[email protected]>--- .../bindings/mailbox/cix-mailbox.yaml | 74 +++++++++++++++++++Filename matching compatible.
Quoted 15 lines
1 file changed, 74 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/cix-mailbox.yamlDocumentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +6
-0@@ -0,0 +1,74 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/cix-mailbox.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# +Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml line 16
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +10
-0+title: Cix mailbox controller + +maintainers: + - Lihua Liu <[email protected]> + +description: + CIX mailbox controller is used to exchange message within + multiple processors, such as AP, AUDIO DSP, SensorHub MCU, + etc. It supports 10 mailbox channels with different operating + mode and every channel is unidirectional.uni but configurable or each channel has specific direction?
Quoted 6 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +6
-0+ +properties: + compatible: + const: cix,sky1-mbox + + reg:Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml line 32
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +10
-0+ maxItems: 1 + + interrupts: + maxItems: 1 + + "#mbox-cells": + description: | + <&phandle channel> + phandle : Label name of controller + channel : Channel numberDrop above and explain what the cell argument is.
Quoted 11 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +11
-0+ + This controller supports three types of unidirectional channels, they are + 1 register based channel, 1 fifo based channel and 8 fast channels. + A total of 10 channels for each controller. Following types are + supported: + channel 0_7 - Fast channel with 32bit transmit register and IRQ support. + channel 8 - Reg based channel with 32*32bit transsmit register and + Doorbell+transmit acknowledgment IRQ support + channel 9 - Fifo based channel with 32*32bit depth fifo and IRQ support. + const: 1 +
Quoted 9 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml line 47
Quoted 4 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +4
-0+ cix,mbox-dir: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Direction of the mailbox (0:TX or 1:RX) + enum: [0, 1]I don't understand why do you need it. By not sending us driver patch, you are not making it easier. Why would provider care how consumers use the mbox channel? Maybe consumer should choose the direction?
As for the mbox-dir property, my driver code has already been submitted. On the Cixtech Soc platform, although each mbox is unidirectional, there are multiple mboxes—some for reading and some for writing. Therefore, the mbox controller has added the mbox-dir property.
Consumers only need to reference the corresponding mbox controller node, and whether it is for reading or writing is already determined by the mbox controller, without needing to further understand the mbox-dir property.
Quoted 28 lines
Quoted 15 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +15
-0+ +required: + - compatible + - reg + - interrupts + - "#mbox-cells" + - cix,mbox-dir + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + soc {Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml line 72
Quoted 10 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +10
-0+ #address-cells = <2>; + #size-cells = <2>; + + mbox0: mailbox@30000000 { + compatible = "cix,sky1-mbox"; + reg = <0 0x30000000 0 0x10000>; + interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH 0>; + #mbox-cells = <1>; + cix,mbox-dir = <0>; + status = "okay";Drop
Quoted 6 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml line 74
Quoted 2 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +2
-0+ }; + };Best regards,
Krzysztof
Best regards
Guomin Chen
Quoted 22 lines · Guomin chen
Quoted 12 lines
Quoted 12 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +11
-0+ + This controller supports three types of unidirectional channels, they are + 1 register based channel, 1 fifo based channel and 8 fast channels. + A total of 10 channels for each controller. Following types are + supported: + channel 0_7 - Fast channel with 32bit transmit register and IRQ support. + channel 8 - Reg based channel with 32*32bit transsmit register and + Doorbell+transmit acknowledgment IRQ support + channel 9 - Fifo based channel with 32*32bit depth fifo and IRQ support. + const: 1 +Quoted 9 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml line 47
Quoted 4 lines
Documentation/devicetree/bindings/mailbox/cix-mailbox.yaml new file +4
-0+ cix,mbox-dir: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Direction of the mailbox (0:TX or 1:RX) + enum: [0, 1]I don't understand why do you need it. By not sending us driver patch, you are not making it easier. Why would provider care how consumers use the mbox channel? Maybe consumer should choose the direction?
Quoted 1 line
As for the mbox-dir property, my driver code has already been submitted.
There is no thing in this thread, so next time be sure you use standard submitting process, so your work will be threaded.
Quoted 2 lines
On the Cixtech Soc platform, although each mbox is unidirectional, there are multiple mboxes—some for reading and some for writing.
So all mboxes in a controller have the same direction or not? Do you configure it or is it defined by hardware?
Quoted 5 lines
Therefore, the mbox controller has added the mbox-dir property.
Consumers only need to reference the corresponding mbox controller node, and whether it is for reading or writing is already determined by the mbox controller, without needing to further understand the mbox-dir property.
Don't explain how DT works, I know. Why this property is needed in DT in the first place?
Best regards,
Krzysztof
Quoted 7 lines · Guomin Chen
From: Guomin Chen <[email protected]>
This patch adds device tree binding for mailbox from Cixtech.
Reviewed-by Peter Chen <[email protected]>Signed-off-by Lihua Liu <[email protected]>Signed-off-by Guomin Chen <[email protected]>
<form letter>
Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.
Tools like b4 or scripts/get_maintainer.pl provide you proper list of people, so fix your workflow. Tools might also fail if you work on some ancient tree (don't, instead use mainline) or work on fork of kernel (don't, instead use mainline). Just use b4 and everything should be fine, although remember about b4 prep --auto-to-cc if you added new patches to the patchset.
You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time.
Please kindly resend and include all necessary To/Cc entries. </form letter>
Best regards,
Krzysztof
Quoted 28 lines · Krzysztof Kozlowski
EXTERNAL EMAIL
Quoted 7 lines · Guomin Chen
From: Guomin Chen <[email protected]>
This patch adds device tree binding for mailbox from Cixtech.
Reviewed-by Peter Chen <[email protected]>Signed-off-by Lihua Liu <[email protected]>Signed-off-by Guomin Chen <[email protected]><form letter>
Please usescripts/get_maintainers.plto get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.Tools like b4 or
scripts/get_maintainer.plprovide you proper list of people, so fix your workflow. Tools might also fail if you work on some ancient tree (don't, instead use mainline) or work on fork of kernel (don't, instead use mainline). Just use b4 and everything should be fine, although remember aboutb4 prep --auto-to-ccif you added new patches to the patchset.You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time.
Quoted 5 lines
Please kindly resend and include all necessary To/Cc entries. </form letter>
Best regards,
Krzysztof
Thank you for your hint. Although I have used scripts/get_maintainer.pl to obtain the cc list, I do lack [email protected]
I will copy it in the next version. Thank you very much.
Best regards,
Guomin Chen