Message ID | 20240620175657.358273-3-piotr.wojtaszczyk@timesys.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Add audio support for LPC32XX CPUs | expand |
On Thu, 20 Jun 2024 19:56:33 +0200, Piotr Wojtaszczyk wrote: > LPC32XX SoCs use pl080 dma controller which have few request signals > multiplexed between peripherals. This binding describes how devices can > use the multiplexed request signals. > > Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> > --- > Changes for v4: > - This patch is new in v4 > > .../bindings/dma/nxp,lpc3220-dmamux.yaml | 56 +++++++++++++++++++ > MAINTAINERS | 9 +++ > 2 files changed, 65 insertions(+) > create mode 100644 Documentation/devicetree/bindings/dma/nxp,lpc3220-dmamux.yaml > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: Documentation/devicetree/bindings/dma/nxp,lpc3220-dmamux.example.dtb: /example-0/syscon@40004000: failed to match any schema with compatible: ['nxp,lpc3220-creg', 'syscon', 'simple-mfd'] doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240620175657.358273-3-piotr.wojtaszczyk@timesys.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.
On 20/06/2024 19:56, Piotr Wojtaszczyk wrote: > LPC32XX SoCs use pl080 dma controller which have few request signals > multiplexed between peripherals. This binding describes how devices can > use the multiplexed request signals. > > Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> > + > +properties: > + "#dma-cells": > + const: 3 > + description: | > + First two cells same as for device pointed in dma-masters. > + Third cell represents mux value for the request. > + > + compatible: > + const: nxp,lpc3220-dmamux Please put compatible first in the list of properties (and follow the same order in "required"). It's the most important piece, so we want it to be the first to see. It also follows the convention of DTS, where compatible is expected to be first. > + > + dma-masters: > + description: phandle to a dma node compatible with arm,pl080 maxItems: 1 > + > + reg: > + maxItems: 1 Keep reg after compatible. > + > +required: > + - compatible > + - reg > + - dma-masters > + > +additionalProperties: false > + > +examples: > + - | > + syscon@40004000 { > + compatible = "nxp,lpc3220-creg", "syscon", "simple-mfd"; > + reg = <0x40004000 0x114>; > + ranges = <0 0x40004000 0x114>; > + #address-cells = <1>; > + #size-cells = <1>; Drop the node above (you will see Rob's warning). Alternatively, this schema could skip the example and the nxp,lpc3220-creg could have one complete example for entire device with children. > + > + dma-router@7c { > + compatible = "nxp,lpc3220-dmamux"; > + reg = <0x7c 0x8>; > + #dma-cells = <3>; > + dma-masters = <&dma>; > + }; > + }; > + > +... > diff --git a/MAINTAINERS b/MAINTAINERS > index aacccb376c28..f7adf9f66dfa 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -2396,6 +2396,15 @@ F: drivers/usb/host/ohci-nxp.c > F: drivers/watchdog/pnx4008_wdt.c > N: lpc32xx > > +ARM/LPC32XX DMAMUX SUPPORT This should be just "LPC32XX DMAMUX SUPPORT" > +M: J.M.B. Downing <jonathan.downing@nautel.com> > +M: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> > +R: Vladimir Zapolskiy <vz@mleia.com> > +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) > +S: Maintained > +F: Documentation/devicetree/bindings/dma/nxp,lpc3220-dmamux.yaml > +N: lpc32xx I think this entry is only foor DMAMUX so the last "N:" is not appropriate. You are welcomed to help maintaining the platform. Add yourself to appropriate place of LPC32xx ARM. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/dma/nxp,lpc3220-dmamux.yaml b/Documentation/devicetree/bindings/dma/nxp,lpc3220-dmamux.yaml new file mode 100644 index 000000000000..a5384b6c67fc --- /dev/null +++ b/Documentation/devicetree/bindings/dma/nxp,lpc3220-dmamux.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/nxp,lpc3220-dmamux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: DMA multiplexer for LPC32XX SoC (DMA request router) + +maintainers: + - J.M.B. Downing <jonathan.downing@nautel.com> + - Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> + +allOf: + - $ref: dma-router.yaml# + +properties: + "#dma-cells": + const: 3 + description: | + First two cells same as for device pointed in dma-masters. + Third cell represents mux value for the request. + + compatible: + const: nxp,lpc3220-dmamux + + dma-masters: + description: phandle to a dma node compatible with arm,pl080 + + reg: + maxItems: 1 + +required: + - compatible + - reg + - dma-masters + +additionalProperties: false + +examples: + - | + syscon@40004000 { + compatible = "nxp,lpc3220-creg", "syscon", "simple-mfd"; + reg = <0x40004000 0x114>; + ranges = <0 0x40004000 0x114>; + #address-cells = <1>; + #size-cells = <1>; + + dma-router@7c { + compatible = "nxp,lpc3220-dmamux"; + reg = <0x7c 0x8>; + #dma-cells = <3>; + dma-masters = <&dma>; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index aacccb376c28..f7adf9f66dfa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2396,6 +2396,15 @@ F: drivers/usb/host/ohci-nxp.c F: drivers/watchdog/pnx4008_wdt.c N: lpc32xx +ARM/LPC32XX DMAMUX SUPPORT +M: J.M.B. Downing <jonathan.downing@nautel.com> +M: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> +R: Vladimir Zapolskiy <vz@mleia.com> +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/dma/nxp,lpc3220-dmamux.yaml +N: lpc32xx + ARM/Marvell Dove/MV78xx0/Orion SOC support M: Andrew Lunn <andrew@lunn.ch> M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
LPC32XX SoCs use pl080 dma controller which have few request signals multiplexed between peripherals. This binding describes how devices can use the multiplexed request signals. Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> --- Changes for v4: - This patch is new in v4 .../bindings/dma/nxp,lpc3220-dmamux.yaml | 56 +++++++++++++++++++ MAINTAINERS | 9 +++ 2 files changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/nxp,lpc3220-dmamux.yaml