Message ID | 1422267511-6649-3-git-send-email-Zubair.Kakakhel@imgtec.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 26/01/15 10:37, Lars-Peter Clausen wrote: > On 01/26/2015 11:18 AM, Zubair Lutfullah Kakakhel wrote: > [...] >> +Required properties: >> +- compatible : "ingenic,jz4740-i2s" >> +- reg : I2S registers location and length >> +- clocks : AIC and I2S PLL clock specifiers. >> +- clock-names: "aic" and "i2s" > > We also need a handle to the DMA channels. Currently the request ids are hardcoded in the driver, but that needs to go away once the driver starts to support multiple SoCs with different request lines. I know. I've left DMA until we push the jz4780-dma driver upstream and see how things fit.. ZubairLK
On 01/26/2015 12:32 PM, Zubair Lutfullah Kakakhel wrote: > > On 26/01/15 10:37, Lars-Peter Clausen wrote: >> On 01/26/2015 11:18 AM, Zubair Lutfullah Kakakhel wrote: >> [...] >>> +Required properties: >>> +- compatible : "ingenic,jz4740-i2s" >>> +- reg : I2S registers location and length >>> +- clocks : AIC and I2S PLL clock specifiers. >>> +- clock-names: "aic" and "i2s" >> >> We also need a handle to the DMA channels. Currently the request ids are hardcoded in the driver, but that needs to go away once the driver starts to support multiple SoCs with different request lines. > > I know. I've left DMA until we push the jz4780-dma driver upstream and see how things fit.. It doesn't hurt to put it in the spec. It will be two DMA channels one for rx, one for tx. See for example Documentation/devicetree/bindings/sound/bcm2835-i2s.txt - Lars
On Monday 26 January 2015 10:18:29 Zubair Lutfullah Kakakhel wrote: > index 0000000..0e40517 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt > @@ -0,0 +1,18 @@ > +Ingenic JZ4740 I2S controller > + > +Required properties: > +- compatible : "ingenic,jz4740-i2s" > +- reg : I2S registers location and length > +- clocks : AIC and I2S PLL clock specifiers. > +- clock-names: "aic" and "i2s" > + > +Example: > + > +i2s: i2s@10020000 { > + compatible = "ingenic,jz4740-i2s"; > + reg = <0x10020000 0x94>; > + > + clocks = <&cgu JZ4740_CLK_AIC>, <&cgu JZ4740_CLK_I2SPLL>; > + clock-names = "aic", "i2s"; > + > +}; > I would argue that the binding should mandate "dmas" property already. The code currently does not use it, but it will need to get changed in order to allow the dmaengine driver for this platform to be converted. You should require only one argument for the channel ID, so something like dmas = <&dma 24>, <&dma 25>; dma-names = "tx", "rx"; would be enough for the binding. Unfortunately that also requires having a device node for the dma engine, but you can cheat there and not call of_dma_controller_register() in the first step. Arnd
diff --git a/Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt b/Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt new file mode 100644 index 0000000..0e40517 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt @@ -0,0 +1,18 @@ +Ingenic JZ4740 I2S controller + +Required properties: +- compatible : "ingenic,jz4740-i2s" +- reg : I2S registers location and length +- clocks : AIC and I2S PLL clock specifiers. +- clock-names: "aic" and "i2s" + +Example: + +i2s: i2s@10020000 { + compatible = "ingenic,jz4740-i2s"; + reg = <0x10020000 0x94>; + + clocks = <&cgu JZ4740_CLK_AIC>, <&cgu JZ4740_CLK_I2SPLL>; + clock-names = "aic", "i2s"; + +};
This patch adds binding for the jz4740-i2s driver. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> --- The jz4740 is platform only at the moment. But DT support is being added See http://patchwork.linux-mips.org/bundle/paulburton/ci20-v3.20/ --- .../devicetree/bindings/sound/ingenic,jz4740-i2s.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt