Message ID | 20200515104758.6934-2-Sergey.Semin@baikalelectronics.ru (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | spi: dw: Add generic DW DMA controller support | expand |
On Fri, May 15, 2020 at 01:47:40PM +0300, Serge Semin wrote: > Since commit 22d48ad7bfac ("spi: dw: Add Elkhart Lake PSE DMA support") > the spi-dw-mid.c module supports a platform DMA engine handling the DW APB > SSI controller requests. Lets alter the DW SPI bindings file to accept the > Rx and Tx DMA line specifiers. I'm wondering if these properties are implied by the SPI generic one? (forgive me if I'm not understanding all DT schema relations) Per se looks good. > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> > Cc: Georgy Vlasov <Georgy.Vlasov@baikalelectronics.ru> > Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru> > Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru> > Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> > Cc: Paul Burton <paulburton@kernel.org> > Cc: Ralf Baechle <ralf@linux-mips.org> > Cc: Arnd Bergmann <arnd@arndb.de> > Cc: Allison Randal <allison@lohutok.net> > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Cc: Gareth Williams <gareth.williams.jx@renesas.com> > Cc: linux-mips@vger.kernel.org > > --- > > Changelog v2: > - Revert the order of the DT changes: first add the DMA channels support, > then perform the binding file conversion. > --- > Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt > index 7a4702edf896..020e3168ee41 100644 > --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt > +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt > @@ -23,6 +23,8 @@ Optional properties: > - num-cs : The number of chipselects. If omitted, this will default to 4. > - reg-io-width : The I/O register width (in bytes) implemented by this > device. Supported values are 2 or 4 (the default). > +- dmas : Phandle + identifiers of Tx and Rx DMA channels. > +- dma-names : Contains the names of the DMA channels. Must be "tx" and "rx". > > Child nodes as per the generic SPI binding. > > -- > 2.25.1 >
On Fri, May 15, 2020 at 02:51:51PM +0300, Andy Shevchenko wrote: > On Fri, May 15, 2020 at 01:47:40PM +0300, Serge Semin wrote: > > Since commit 22d48ad7bfac ("spi: dw: Add Elkhart Lake PSE DMA support") > > the spi-dw-mid.c module supports a platform DMA engine handling the DW APB > > SSI controller requests. Lets alter the DW SPI bindings file to accept the > > Rx and Tx DMA line specifiers. > I'm wondering if these properties are implied by the SPI generic one? > (forgive me if I'm not understanding all DT schema relations) Which SPI generic DMA bindings are you thinking of here? There aren't any in spi-controller.yaml.
On Fri, May 15, 2020 at 01:27:15PM +0100, Mark Brown wrote: > On Fri, May 15, 2020 at 02:51:51PM +0300, Andy Shevchenko wrote: > > On Fri, May 15, 2020 at 01:47:40PM +0300, Serge Semin wrote: > > > > Since commit 22d48ad7bfac ("spi: dw: Add Elkhart Lake PSE DMA support") > > > the spi-dw-mid.c module supports a platform DMA engine handling the DW APB > > > SSI controller requests. Lets alter the DW SPI bindings file to accept the > > > Rx and Tx DMA line specifiers. > > > I'm wondering if these properties are implied by the SPI generic one? > > (forgive me if I'm not understanding all DT schema relations) > > Which SPI generic DMA bindings are you thinking of here? There aren't > any in spi-controller.yaml. There are default schemas in the dt-core, which defines the dmas and dma-names type, but the exact naming and number of phandler+identifiers are implementation specific. So it's either supposed to be implemented on the generic SPI controller basis (like in someplace of spi-controller.yaml) or in individual controllers DT schema. As Mark said we don't have any DMA properties definition in the generic SPI controller schema (spi-controller.yaml), so the particular SPI controllers DT schemas have got their own DMA properties declared. Most of them BTW use the same naming as we do here: "rx" and "tx", but some alas don't. -Sergey
diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt index 7a4702edf896..020e3168ee41 100644 --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt @@ -23,6 +23,8 @@ Optional properties: - num-cs : The number of chipselects. If omitted, this will default to 4. - reg-io-width : The I/O register width (in bytes) implemented by this device. Supported values are 2 or 4 (the default). +- dmas : Phandle + identifiers of Tx and Rx DMA channels. +- dma-names : Contains the names of the DMA channels. Must be "tx" and "rx". Child nodes as per the generic SPI binding.
Since commit 22d48ad7bfac ("spi: dw: Add Elkhart Lake PSE DMA support") the spi-dw-mid.c module supports a platform DMA engine handling the DW APB SSI controller requests. Lets alter the DW SPI bindings file to accept the Rx and Tx DMA line specifiers. Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Cc: Georgy Vlasov <Georgy.Vlasov@baikalelectronics.ru> Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru> Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Paul Burton <paulburton@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Allison Randal <allison@lohutok.net> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Gareth Williams <gareth.williams.jx@renesas.com> Cc: linux-mips@vger.kernel.org --- Changelog v2: - Revert the order of the DT changes: first add the DMA channels support, then perform the binding file conversion. --- Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt | 2 ++ 1 file changed, 2 insertions(+)