* Re: [PATCH v2 1/5] dt-bindings: serial: 8250: Add aspeed,ast2600-uart
[not found] ` <20230314021817.30446-2-chiawei_wang@aspeedtech.com>
@ 2023-03-17 20:58 ` Rob Herring
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2023-03-17 20:58 UTC (permalink / raw)
To: Chia-Wei Wang
Cc: krzysztof.kozlowski+dt, openbmc, robh+dt, andrew, dmaengine,
linux-aspeed, pmenzel, linux-arm-kernel, devicetree, gregkh,
joel, linux-kernel, jirislaby, ilpo.jarvinen, linux-serial,
vkoul
On Tue, 14 Mar 2023 10:18:13 +0800, Chia-Wei Wang wrote:
> Add a compatible string for the NS16550A-compatible UARTs
> of Aspeed AST2600 SoCs.
>
> Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
> ---
> Documentation/devicetree/bindings/serial/8250.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 3/5] dmaengine: aspeed: Add AST2600 UART DMA driver
[not found] ` <20230314021817.30446-4-chiawei_wang@aspeedtech.com>
@ 2023-03-17 21:00 ` Rob Herring
2023-03-20 2:58 ` ChiaWei Wang
0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2023-03-17 21:00 UTC (permalink / raw)
To: Chia-Wei Wang
Cc: vkoul, krzysztof.kozlowski+dt, joel, andrew, gregkh, jirislaby,
pmenzel, ilpo.jarvinen, dmaengine, devicetree, linux-arm-kernel,
linux-aspeed, linux-kernel, linux-serial, openbmc
On Tue, Mar 14, 2023 at 10:18:15AM +0800, Chia-Wei Wang wrote:
> Aspeed AST2600 UART DMA (UDMA) includes 14 channels for the
> DMA transmission and recevie of each UART devices.
>
> Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
> ---
> drivers/dma/Kconfig | 9 +
> drivers/dma/Makefile | 1 +
> drivers/dma/ast2600-udma.c | 528 +++++++++++++++++++++++++++++++++++++
> 3 files changed, 538 insertions(+)
> create mode 100644 drivers/dma/ast2600-udma.c
>
> diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
> index fb7073fc034f..c35f87dbafd9 100644
> --- a/drivers/dma/Kconfig
> +++ b/drivers/dma/Kconfig
> @@ -748,6 +748,15 @@ config XILINX_ZYNQMP_DPDMA
> driver provides the dmaengine required by the DisplayPort subsystem
> display driver.
>
> +config ASPEED_AST2600_UDMA
> + bool "Aspeed AST2600 UDMA support"
> + depends on ARCH_ASPEED
|| COMPILE_TEST
> + help
> + Enable support for Aspeed AST2600 UART DMA. Select this option if you
> + have a AST2600 SoC integrated system. The driver provides the UART DMA
> + support with the dmaengine subsystem, which can be leveraged by generic
> + 8250 serial drivers.
> +
> # driver files
> source "drivers/dma/bestcomm/Kconfig"
>
> diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
> index a4fd1ce29510..6cbacebcdcab 100644
> --- a/drivers/dma/Makefile
> +++ b/drivers/dma/Makefile
> @@ -81,6 +81,7 @@ obj-$(CONFIG_XGENE_DMA) += xgene-dma.o
> obj-$(CONFIG_ST_FDMA) += st_fdma.o
> obj-$(CONFIG_FSL_DPAA2_QDMA) += fsl-dpaa2-qdma/
> obj-$(CONFIG_INTEL_LDMA) += lgm/
> +obj-$(CONFIG_ASPEED_AST2600_UDMA) += ast2600-udma.o
>
> obj-y += mediatek/
> obj-y += qcom/
> diff --git a/drivers/dma/ast2600-udma.c b/drivers/dma/ast2600-udma.c
> new file mode 100644
> index 000000000000..ff678724f9d9
> --- /dev/null
> +++ b/drivers/dma/ast2600-udma.c
> @@ -0,0 +1,528 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) ASPEED Technology Inc.
> + */
> +#include <linux/delay.h>
> +#include <linux/bitfield.h>
> +#include <linux/interrupt.h>
> +#include <linux/dmaengine.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/platform_device.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/of_dma.h>
> +#include <linux/of_irq.h>
> +#include <linux/of_address.h>
You probably don't need these as you should use platform APIs instead.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/5] dt-bindings: dmaengine: Add AST2600 UDMA bindings
[not found] ` <20230314021817.30446-3-chiawei_wang@aspeedtech.com>
@ 2023-03-17 21:05 ` Rob Herring
2023-03-20 2:56 ` ChiaWei Wang
0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2023-03-17 21:05 UTC (permalink / raw)
To: Chia-Wei Wang
Cc: vkoul, krzysztof.kozlowski+dt, joel, andrew, gregkh, jirislaby,
pmenzel, ilpo.jarvinen, dmaengine, devicetree, linux-arm-kernel,
linux-aspeed, linux-kernel, linux-serial, openbmc
On Tue, Mar 14, 2023 at 10:18:14AM +0800, Chia-Wei Wang wrote:
> Add the dmaengine bindings for the UART DMA engine of Aspeed AST2600 SoC.
>
> Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
> ---
> .../bindings/dma/aspeed,ast2600-udma.yaml | 56 +++++++++++++++++++
> include/dt-bindings/dma/ast2600-udma.h | 40 +++++++++++++
> 2 files changed, 96 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/dma/aspeed,ast2600-udma.yaml
> create mode 100644 include/dt-bindings/dma/ast2600-udma.h
>
> diff --git a/Documentation/devicetree/bindings/dma/aspeed,ast2600-udma.yaml b/Documentation/devicetree/bindings/dma/aspeed,ast2600-udma.yaml
> new file mode 100644
> index 000000000000..f92e06ac9f39
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/aspeed,ast2600-udma.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/aspeed,ast2600-udma.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Aspeed AST2600 UART DMA controller
> +
> +maintainers:
> + - Chia-Wei Wang <chiawei_wang@aspeedtech.com>
> +
> +description: |
Don't need '|'
> + The Aspeed AST2600 UDMA controller provides direct memory access capabilities
> + for the NS16550A-compatible UART devices inside AST2600 SoCs. UDMA supports 28
> + DMA channels and each UART device has its dedicated pair of TX and RX channels.
> +
> +allOf:
> + - $ref: "dma-controller.yaml#"
Drop quotes
> +
> +properties:
> + compatible:
> + const: aspeed,ast2600-udma
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + "#dma-cells":
> + const: 1
> +
> + dma-channels:
> + maximum: 28
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - "#dma-cells"
> + - dma-channels
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + udma: dma-controller@1e79e000 {
Drop unused label.
> + compatible = "aspeed,ast2600-udma";
> + reg = <0x1e79e000 0x1000>;
> + interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
> + dma-channels = <28>;
> + #dma-cells = <1>;
> + };
> +
> +...
> diff --git a/include/dt-bindings/dma/ast2600-udma.h b/include/dt-bindings/dma/ast2600-udma.h
> new file mode 100644
> index 000000000000..0b92035b94f1
> --- /dev/null
> +++ b/include/dt-bindings/dma/ast2600-udma.h
> @@ -0,0 +1,40 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
Headers should be dual licensed.
However, similar to interrupts, we don't normally do defines for DMA
request numbers. It's only when we make up the numbering (e.g. clock
ids).
Rob
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v2 2/5] dt-bindings: dmaengine: Add AST2600 UDMA bindings
2023-03-17 21:05 ` [PATCH v2 2/5] dt-bindings: dmaengine: Add AST2600 UDMA bindings Rob Herring
@ 2023-03-20 2:56 ` ChiaWei Wang
0 siblings, 0 replies; 5+ messages in thread
From: ChiaWei Wang @ 2023-03-20 2:56 UTC (permalink / raw)
To: Rob Herring
Cc: vkoul, krzysztof.kozlowski+dt, joel, andrew, gregkh, jirislaby,
pmenzel, ilpo.jarvinen, dmaengine, devicetree, linux-arm-kernel,
linux-aspeed, linux-kernel, linux-serial, openbmc
> From: Rob Herring <robh@kernel.org>
> Sent: Saturday, March 18, 2023 5:06 AM
>
> On Tue, Mar 14, 2023 at 10:18:14AM +0800, Chia-Wei Wang wrote:
> > Add the dmaengine bindings for the UART DMA engine of Aspeed AST2600
> SoC.
> >
> > Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
> > ---
> > .../bindings/dma/aspeed,ast2600-udma.yaml | 56
> +++++++++++++++++++
> > include/dt-bindings/dma/ast2600-udma.h | 40 +++++++++++++
> > 2 files changed, 96 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/dma/aspeed,ast2600-udma.yaml
> > create mode 100644 include/dt-bindings/dma/ast2600-udma.h
> >
> > diff --git
> > a/Documentation/devicetree/bindings/dma/aspeed,ast2600-udma.yaml
> > b/Documentation/devicetree/bindings/dma/aspeed,ast2600-udma.yaml
> > new file mode 100644
> > index 000000000000..f92e06ac9f39
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/dma/aspeed,ast2600-udma.yaml
> > @@ -0,0 +1,56 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/dma/aspeed,ast2600-udma.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Aspeed AST2600 UART DMA controller
> > +
> > +maintainers:
> > + - Chia-Wei Wang <chiawei_wang@aspeedtech.com>
> > +
> > +description: |
>
> Don't need '|'
Will revise in v3 revision.
>
> > + The Aspeed AST2600 UDMA controller provides direct memory access
> > + capabilities for the NS16550A-compatible UART devices inside
> > + AST2600 SoCs. UDMA supports 28 DMA channels and each UART device
> has its dedicated pair of TX and RX channels.
> > +
> > +allOf:
> > + - $ref: "dma-controller.yaml#"
>
> Drop quotes
Will revise in v3 revision.
>
> > +
> > +properties:
> > + compatible:
> > + const: aspeed,ast2600-udma
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + "#dma-cells":
> > + const: 1
> > +
> > + dma-channels:
> > + maximum: 28
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - "#dma-cells"
> > + - dma-channels
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > + udma: dma-controller@1e79e000 {
>
> Drop unused label.
Will revise in v3 revision.
>
> > + compatible = "aspeed,ast2600-udma";
> > + reg = <0x1e79e000 0x1000>;
> > + interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
> > + dma-channels = <28>;
> > + #dma-cells = <1>;
> > + };
> > +
> > +...
> > diff --git a/include/dt-bindings/dma/ast2600-udma.h
> > b/include/dt-bindings/dma/ast2600-udma.h
> > new file mode 100644
> > index 000000000000..0b92035b94f1
> > --- /dev/null
> > +++ b/include/dt-bindings/dma/ast2600-udma.h
> > @@ -0,0 +1,40 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
>
> Headers should be dual licensed.
>
> However, similar to interrupts, we don't normally do defines for DMA request
> numbers. It's only when we make up the numbering (e.g. clock ids).
>
Will remove the header file in v3 revision.
Thanks,
Chiawei
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v2 3/5] dmaengine: aspeed: Add AST2600 UART DMA driver
2023-03-17 21:00 ` [PATCH v2 3/5] dmaengine: aspeed: Add AST2600 UART DMA driver Rob Herring
@ 2023-03-20 2:58 ` ChiaWei Wang
0 siblings, 0 replies; 5+ messages in thread
From: ChiaWei Wang @ 2023-03-20 2:58 UTC (permalink / raw)
To: Rob Herring
Cc: vkoul, krzysztof.kozlowski+dt, joel, andrew, gregkh, jirislaby,
pmenzel, ilpo.jarvinen, dmaengine, devicetree, linux-arm-kernel,
linux-aspeed, linux-kernel, linux-serial, openbmc
> From: Rob Herring <robh@kernel.org>
> Sent: Saturday, March 18, 2023 5:01 AM
>
> On Tue, Mar 14, 2023 at 10:18:15AM +0800, Chia-Wei Wang wrote:
> > Aspeed AST2600 UART DMA (UDMA) includes 14 channels for the DMA
> > transmission and recevie of each UART devices.
> >
> > Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
> > ---
> > drivers/dma/Kconfig | 9 +
> > drivers/dma/Makefile | 1 +
> > drivers/dma/ast2600-udma.c | 528
> > +++++++++++++++++++++++++++++++++++++
> > 3 files changed, 538 insertions(+)
> > create mode 100644 drivers/dma/ast2600-udma.c
> >
> > diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index
> > fb7073fc034f..c35f87dbafd9 100644
> > --- a/drivers/dma/Kconfig
> > +++ b/drivers/dma/Kconfig
> > @@ -748,6 +748,15 @@ config XILINX_ZYNQMP_DPDMA
> > driver provides the dmaengine required by the DisplayPort subsystem
> > display driver.
> >
> > +config ASPEED_AST2600_UDMA
> > + bool "Aspeed AST2600 UDMA support"
> > + depends on ARCH_ASPEED
>
> || COMPILE_TEST
Will add it in v3 revision.
>
> > + help
> > + Enable support for Aspeed AST2600 UART DMA. Select this option if
> you
> > + have a AST2600 SoC integrated system. The driver provides the UART
> DMA
> > + support with the dmaengine subsystem, which can be leveraged by
> generic
> > + 8250 serial drivers.
> > +
> > # driver files
> > source "drivers/dma/bestcomm/Kconfig"
> >
> > diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile index
> > a4fd1ce29510..6cbacebcdcab 100644
> > --- a/drivers/dma/Makefile
> > +++ b/drivers/dma/Makefile
> > @@ -81,6 +81,7 @@ obj-$(CONFIG_XGENE_DMA) += xgene-dma.o
> > obj-$(CONFIG_ST_FDMA) += st_fdma.o
> > obj-$(CONFIG_FSL_DPAA2_QDMA) += fsl-dpaa2-qdma/
> > obj-$(CONFIG_INTEL_LDMA) += lgm/
> > +obj-$(CONFIG_ASPEED_AST2600_UDMA) += ast2600-udma.o
> >
> > obj-y += mediatek/
> > obj-y += qcom/
> > diff --git a/drivers/dma/ast2600-udma.c b/drivers/dma/ast2600-udma.c
> > new file mode 100644 index 000000000000..ff678724f9d9
> > --- /dev/null
> > +++ b/drivers/dma/ast2600-udma.c
> > @@ -0,0 +1,528 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (C) ASPEED Technology Inc.
> > + */
> > +#include <linux/delay.h>
> > +#include <linux/bitfield.h>
> > +#include <linux/interrupt.h>
> > +#include <linux/dmaengine.h>
> > +#include <linux/dma-mapping.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/module.h>
> > +#include <linux/of.h>
> > +#include <linux/of_dma.h>
>
> > +#include <linux/of_irq.h>
> > +#include <linux/of_address.h>
>
> You probably don't need these as you should use platform APIs instead.
Will try re-compilation without these inclusion.
Thanks,
Chiawei
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-20 16:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20230314021817.30446-1-chiawei_wang@aspeedtech.com>
[not found] ` <20230314021817.30446-2-chiawei_wang@aspeedtech.com>
2023-03-17 20:58 ` [PATCH v2 1/5] dt-bindings: serial: 8250: Add aspeed,ast2600-uart Rob Herring
[not found] ` <20230314021817.30446-4-chiawei_wang@aspeedtech.com>
2023-03-17 21:00 ` [PATCH v2 3/5] dmaengine: aspeed: Add AST2600 UART DMA driver Rob Herring
2023-03-20 2:58 ` ChiaWei Wang
[not found] ` <20230314021817.30446-3-chiawei_wang@aspeedtech.com>
2023-03-17 21:05 ` [PATCH v2 2/5] dt-bindings: dmaengine: Add AST2600 UDMA bindings Rob Herring
2023-03-20 2:56 ` ChiaWei Wang
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).