ASPEED: Add mailbox driver for AST2700 series
Subsystems (3)
v2 cover ASPEED: Add mailbox driver for AST2700 series
Add mailbox controller driver for AST27XX SoCs, which provides independent tx/rx mailbox between different processors. There are 4 channels for each tx/rx mailbox and each channel has an 32-byte FIFO.
v2 changes:
- Update document
Jammy Huang (2):
dt-bindings: mailbox: Add ASPEED AST2700 series SoC
mailbox: aspeed: add mailbox driver for AST27XX series SoC
.../mailbox/aspeed,ast2700-mailbox.yaml | 57 +++++ drivers/mailbox/Kconfig | 8 + drivers/mailbox/Makefile | 2 + drivers/mailbox/ast2700-mailbox.c | 226 ++++++++++++++++++ 4 files changed, 293 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml create mode 100644 drivers/mailbox/ast2700-mailbox.c
base-commit: 546b1c9e93c2bb8cf5ed24e0be1c86bb089b3253
Signature · 1 line
2.25.1
PATCH v2 1/2 dt-bindings: mailbox: Add ASPEED AST2700 series SoC
Introduce the mailbox module for AST27XX series SoC, which is responsible for interchanging messages between asymmetric processors.
--- .../mailbox/aspeed,ast2700-mailbox.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml
Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml new file +57 -0
@@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/aspeed,ast2700-mailbox.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ASPEED AST2700 mailbox controller + +maintainers: + - Jammy Huang <[email protected]> + +description: + ASPEED AST2700 has multiple processors that need to communicate with each + other. The mailbox controller provides a way for these processors to send + messages to each other. It is a hardware-based inter-processor communication + mechanism that allows processors to send and receive messages through + dedicated channels. + The mailbox's tx/rx are independent, meaning that one processor can send a + message while another processor is receiving a message simultaneously. + There are 4 channels available for both tx and rx operations. Each channel + has a FIFO buffer that can hold messages of a fixed size (32 bytes in this + case). + The mailbox controller also supports interrupt generation, allowing + processors to notify each other when a message is available or when an event + occurs. + +properties: + compatible: + const: aspeed,ast2700-mailbox + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#mbox-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + - "#mbox-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + mailbox@12c1c200 { + compatible = "aspeed,ast2700-mailbox"; + reg = <0x0 0x12c1c200 0x0 0x200>; + interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; + #mbox-cells = <1>; + };
Signature · 1 line
2.25.1
Re: [PATCH v2 1/2] dt-bindings: mailbox: Add ASPEED AST2700 series SoC
Quoted 4 lines · Jammy Huang
Introduce the mailbox module for AST27XX series SoC, which is responsible for interchanging messages between asymmetric processors.
Signed-off-by Jammy Huang <[email protected]>
Best regards,
Krzysztof
Rob Herring (Arm)
maintainerRe: [PATCH v2 1/2] dt-bindings: mailbox: Add ASPEED AST2700 series SoC
In reply to Jammy HuangQuoted 9 lines · Jammy Huang
Introduce the mailbox module for AST27XX series SoC, which is responsible for interchanging messages between asymmetric processors.
Signed-off-by Jammy Huang <[email protected]>--- .../mailbox/aspeed,ast2700-mailbox.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/aspeed,ast2700-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/aspeed,ast2700-mailbox.example.dtb: mailbox@12c1c200 (aspeed,ast2700-mailbox): reg: [[0, 314688000], [0, 512]] is too long
from schema $id: http://devicetree.org/schemas/mailbox/aspeed,ast2700-mailbox.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
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.
Re: [PATCH v2 1/2] dt-bindings: mailbox: Add ASPEED AST2700 series SoC
In reply to Jammy HuangDocumentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml line 54
Quoted 8 lines · Jammy Huang
Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml new file +8
-0+ +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + mailbox@12c1c200 { + compatible = "aspeed,ast2700-mailbox"; + reg = <0x0 0x12c1c200 0x0 0x200>;
Last time I asked to test, you responded you will test. What happened? You did not test. This is just disappointing.
Best regards,
Krzysztof
RE: [PATCH v2 1/2] dt-bindings: mailbox: Add ASPEED AST2700 series SoC
Quoted 12 lines · Jammy Huang
Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml line 54
Quoted 8 lines
Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml new file +8
-0+ +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + mailbox@12c1c200 { + compatible = "aspeed,ast2700-mailbox"; + reg = <0x0 0x12c1c200 0x0 0x200>;Last time I asked to test, you responded you will test. What happened? You did not test. This is just disappointing.
I did test for my last patch. In the end, the errors shown as below did not include ast2700-mailbox. So I think it is ok. I will check what's wrong on my environment.
CHKDT ./Documentation/devicetree/bindings/home/osboxes/linux_torvalds/Documentation/devicetree/bindings/crypto/inside-secure,safexcel-eip93.yaml: properties:compatible:oneOf:1:items: 'oneOf' conditional failed, one must be fixed:
[{'not': {}, 'description': 'Need a SoC specific compatible'}, {'enum': ['inside-secure,safexcel-eip93i', 'inside-secure,safexcel-eip93ie', 'inside-secure,safexcel-eip93is', 'inside-secure,safexcel-eip93iw']}] is not of type 'object' Additional properties are not allowed ('not' was unexpected)
Additional properties are not allowed ('description', 'not' were unexpected)
from schema $id: http://devicetree.org/meta-schemas/string-array.yaml#/home/osboxes/linux_torvalds/Documentation/devicetree/bindings/display/msm/mdp4.yaml: properties:clock-names:items: 'oneOf' conditional failed, one must be fixed:
[{'const': 'core_clk'}, {'const': 'iface_clk'}, {'const': 'bus_clk'}, {'const': 'lut_clk'}, {'const': 'hdmi_clk'}, {'const': 'tv_clk'}, {'const': 'lcdc_clk'}, {'const': 'pxo', 'description': 'XO used to drive the internal LVDS PLL'}] is not of type 'object' Additional properties are not allowed ('description' was unexpected)
from schema $id: http://devicetree.org/meta-schemas/string-array.yaml#/home/osboxes/linux_torvalds/Documentation/devicetree/bindings/crypto/marvell,orion-crypto.yaml: properties:reg-names:items: 'oneOf' conditional failed, one must be fixed:
[{'const': 'regs'}, {'const': 'sram', 'deprecated': True}] is not of type 'object'
Additional properties are not allowed ('deprecated' was unexpected)
from schema $id: http://devicetree.org/meta-schemas/string-array.yaml#/home/osboxes/linux_torvalds/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml: properties:ti,x-plate-ohms: '$ref' should not be valid under {'const': '$ref'}
hint: Standard unit suffix properties don't need a type $ref
from schema $id: http://devicetree.org/meta-schemas/core.yaml#/home/osboxes/linux_torvalds/Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml: properties:ti,y-plate-ohms: '$ref' should not be valid under {'const': '$ref'}
hint: Standard unit suffix properties don't need a type $ref
from schema $id: http://devicetree.org/meta-schemas/core.yaml#/home/osboxes/linux_torvalds/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml: oneOf: Missing additionalProperties/unevaluatedProperties constraint
/home/osboxes/linux_torvalds/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml: oneOf: Missing additionalProperties/unevaluatedProperties constraint
/home/osboxes/linux_torvalds/Documentation/devicetree/bindings/timer/renesas,ostm.yaml: if:properties:compatible: Additional properties are not allowed ('not' was unexpected)
from schema $id: http://devicetree.org/meta-schemas/string-array.yaml#/home/osboxes/linux_torvalds/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml: oneOf: Missing additionalProperties/unevaluatedProperties constraint
/home/osboxes/linux_torvalds/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml: oneOf: Missing additionalProperties/unevaluatedProperties constraint
/home/osboxes/linux_torvalds/Documentation/devicetree/bindings/dma/adi,axi-dmac.yaml: properties:adi,channels:type: 'boolean' was expected
hint: A vendor boolean property can use "type: boolean"
from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
LINT ./Documentation/devicetree/bindings
Quoted 3 lines
Best regards,
Krzysztof
Re: [PATCH v2 1/2] dt-bindings: mailbox: Add ASPEED AST2700 series SoC
Quoted 12 lines · Jammy Huang
Quoted 12 lines · Jammy Huang
Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml line 54
Quoted 8 lines
Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml new file +8
-0+ +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + mailbox@12c1c200 { + compatible = "aspeed,ast2700-mailbox"; + reg = <0x0 0x12c1c200 0x0 0x200>;Last time I asked to test, you responded you will test. What happened? You did not test. This is just disappointing.
Quoted 2 lines
I did test for my last patch. In the end, the errors shown as below did not include ast2700-mailbox. So I think it is ok. I will check what's wrong on my environment.
No, it is not ok and with simple dt_binding_check I immediately reproduced the issue (wrong addresses in example), thus you did not test it.
Best regards,
Krzysztof
PATCH v2 2/2 mailbox: aspeed: add mailbox driver for AST27XX series SoC
In reply to Jammy HuangAdd mailbox controller driver for AST27XX SoCs, which provides independent tx/rx mailbox between different processors. There are 4 channels for each tx/rx mailbox and each channel has an 32-byte FIFO.
--- drivers/mailbox/Kconfig | 8 ++ drivers/mailbox/Makefile | 2 + drivers/mailbox/ast2700-mailbox.c | 226 ++++++++++++++++++++++++++++++ 3 files changed, 236 insertions(+) create mode 100644 drivers/mailbox/ast2700-mailbox.c
drivers/mailbox/Kconfig +8 -0
@@ -340,4 +340,12 @@ config THEAD_TH1520_MBOX kernel is running, and E902 core used for power management among other things. +config AST2700_MBOX + tristate "ASPEED AST2700 IPC driver" + depends on ARCH_ASPEED || COMPILE_TEST + help + Mailbox driver implementation for ASPEED AST27XX SoCs. This driver + can be used to send message between different processors in SoC. + The driver provides mailbox support for sending interrupts to the + clients. Say Y here if you want to build this driver. endif
drivers/mailbox/Makefile +2 -0
@@ -72,3 +72,5 @@ obj-$(CONFIG_QCOM_CPUCP_MBOX) += qcom-cpucp-mbox.o obj-$(CONFIG_QCOM_IPCC) += qcom-ipcc.o obj-$(CONFIG_THEAD_TH1520_MBOX) += mailbox-th1520.o + +obj-$(CONFIG_AST2700_MBOX) += ast2700-mailbox.o
drivers/mailbox/ast2700-mailbox.c new file +226 -0
226 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 6 lines · Jammy Huang
Add mailbox controller driver for AST27XX SoCs, which provides independent tx/rx mailbox between different processors. There are 4 channels for each tx/rx mailbox and each channel has an 32-byte FIFO.
v2 changes:
- Update document
This is vague. What did you update there?
Best regards,
Krzysztof
Quoted 9 lines · Jammy Huang
Quoted 6 lines
Add mailbox controller driver for AST27XX SoCs, which provides independent tx/rx mailbox between different processors. There are 4 channels for each tx/rx mailbox and each channel has an 32-byte FIFO.
v2 changes:
- Update documentThis is vague. What did you update there?
Sorry, let me supply some information as below.
1. Correct error in dts example.
2. Drop description for mbox-cell as you suggested previously.
Quoted 3 lines
Best regards,
Krzysztof
Best regards,
Jammy
Quoted 5 lines · Jammy Huang
Quoted 5 lines · Jammy Huang
Quoted 4 lines
Add mailbox controller driver for AST27XX SoCs, which provides independent tx/rx mailbox between different processors. There are 4 channels for each tx/rx mailbox and each channel has an 32-byte FIFO.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
v2 changes:
- Update documentThis is vague. What did you update there?
Sorry, let me supply some information as below.
1. Correct error in dts example.
2. Drop description for mbox-cell as you suggested previously.
Then please write proper, descriptive changelogs. I am sure U asked Aspeed that already.
Best regards,
Krzysztof