Message ID | 20240227-asrc_8qxp-v2-3-521bcc7eb1c0@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | arm64: dts: imx8qxp add asrc and sai | expand |
On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > Some sai only connect one direction. So allow only "rx" or "tx" for > dma-names. Which sai? Can you restrict this per compatible please, so that someone cannot add 2 dmas for ones where only the tx is supported. | dmas: | minItems: 1 | items: | - description: DMA controller phandle and request line for RX | - description: DMA controller phandle and request line for TX The binding already allows only one, but it documents that the first dma is always the RX dma, and that doesn't change with this patch.. Cheers, Conor. > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > --- > Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > index 2456d958adeef..0302752d58a2b 100644 > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > @@ -86,10 +86,14 @@ properties: > - description: DMA controller phandle and request line for TX > > dma-names: > - minItems: 1 > - items: > - - const: rx > - - const: tx > + oneOf: > + - items: > + - const: rx > + - const: tx > + - items: > + - enum: > + - rx > + - tx > > interrupts: > items: > > -- > 2.34.1 >
On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > Some sai only connect one direction. So allow only "rx" or "tx" for > > dma-names. > > Which sai? Can you restrict this per compatible please, so that someone > cannot add 2 dmas for ones where only the tx is supported. > > | dmas: > | minItems: 1 > | items: > | - description: DMA controller phandle and request line for RX > | - description: DMA controller phandle and request line for TX > > The binding already allows only one, but it documents that the first dma > is always the RX dma, and that doesn't change with this patch.. I said "doesn't change" - but I don't think you can change this trivially, as something could rely on the first dma being the rx one. You'd have to check that there is nothing using these using indices rather than names before making any changes here. > > Cheers, > Conor. > > > > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > > --- > > Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++---- > > 1 file changed, 8 insertions(+), 4 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > index 2456d958adeef..0302752d58a2b 100644 > > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > @@ -86,10 +86,14 @@ properties: > > - description: DMA controller phandle and request line for TX > > > > dma-names: > > - minItems: 1 > > - items: > > - - const: rx > > - - const: tx > > + oneOf: > > + - items: > > + - const: rx > > + - const: tx > > + - items: > > + - enum: > > + - rx > > + - tx > > > > interrupts: > > items: > > > > -- > > 2.34.1 > >
On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > Some sai only connect one direction. So allow only "rx" or "tx" for > > dma-names. > > Which sai? Can you restrict this per compatible please, so that someone > cannot add 2 dmas for ones where only the tx is supported. SAI is exact the same. Only external connect one dma channel. > > | dmas: > | minItems: 1 > | items: > | - description: DMA controller phandle and request line for RX > | - description: DMA controller phandle and request line for TX > > The binding already allows only one, but it documents that the first dma > is always the RX dma, and that doesn't change with this patch.. Does below logic work? anyOf - enum - description: ---rx - description: ---tx > > Cheers, > Conor. > > > > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > > --- > > Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++---- > > 1 file changed, 8 insertions(+), 4 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > index 2456d958adeef..0302752d58a2b 100644 > > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > @@ -86,10 +86,14 @@ properties: > > - description: DMA controller phandle and request line for TX > > > > dma-names: > > - minItems: 1 > > - items: > > - - const: rx > > - - const: tx > > + oneOf: > > + - items: > > + - const: rx > > + - const: tx > > + - items: > > + - enum: > > + - rx > > + - tx > > > > interrupts: > > items: > > > > -- > > 2.34.1 > >
On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote: > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > dma-names. > > > > Which sai? Can you restrict this per compatible please, so that someone > > cannot add 2 dmas for ones where only the tx is supported. > > > > | dmas: > > | minItems: 1 > > | items: > > | - description: DMA controller phandle and request line for RX > > | - description: DMA controller phandle and request line for TX > > > > The binding already allows only one, but it documents that the first dma > > is always the RX dma, and that doesn't change with this patch.. > > I said "doesn't change" - but I don't think you can change this > trivially, as something could rely on the first dma being the rx one. > You'd have to check that there is nothing using these using indices > rather than names before making any changes here. Linux driver and dts with tx only work well. Only issue is dtb_check will report error. I want to eliminate these DTB_CHECK warning. And it also reasonable, only rx or tx for a special SAI. Can we remove 'description'? dmas should already descripted at common place and 'RX' and 'TX' are listed at 'dma-names' Frank > > > > > Cheers, > > Conor. > > > > > > > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > > > --- > > > Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++---- > > > 1 file changed, 8 insertions(+), 4 deletions(-) > > > > > > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > > index 2456d958adeef..0302752d58a2b 100644 > > > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > > @@ -86,10 +86,14 @@ properties: > > > - description: DMA controller phandle and request line for TX > > > > > > dma-names: > > > - minItems: 1 > > > - items: > > > - - const: rx > > > - - const: tx > > > + oneOf: > > > + - items: > > > + - const: rx > > > + - const: tx > > > + - items: > > > + - enum: > > > + - rx > > > + - tx > > > > > > interrupts: > > > items: > > > > > > -- > > > 2.34.1 > > > > >
On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote: > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote: > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > > dma-names. > > > > > > Which sai? Can you restrict this per compatible please, so that someone > > > cannot add 2 dmas for ones where only the tx is supported. > > > > > > | dmas: > > > | minItems: 1 > > > | items: > > > | - description: DMA controller phandle and request line for RX > > > | - description: DMA controller phandle and request line for TX > > > > > > The binding already allows only one, but it documents that the first dma > > > is always the RX dma, and that doesn't change with this patch.. > > > > I said "doesn't change" - but I don't think you can change this > > trivially, as something could rely on the first dma being the rx one. > > You'd have to check that there is nothing using these using indices > > rather than names before making any changes here. > > Linux driver and dts with tx only work well. Only issue is dtb_check will > report error. I want to eliminate these DTB_CHECK warning. Linux is not the only user of these bindings, citing linux as your evidence here is only sufficient if no other users exist. Do they? > And it also reasonable, only rx or tx for a special SAI. > > Can we remove 'description'? dmas should already descripted at common place > and 'RX' and 'TX' are listed at 'dma-names' Removing the description has the same problem. The existing binding has set a fixed order that you now want to make flexible. Thanks, Conor.
On Thu, Feb 29, 2024 at 02:31:20PM -0500, Frank Li wrote: > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > dma-names. > > > > Which sai? Can you restrict this per compatible please, so that someone > > cannot add 2 dmas for ones where only the tx is supported. > > SAI is exact the same. Only external connect one dma channel. Right. The wording made it sound like some SAIs were capable of this and some were not, but what you actually mean is that all SAIs can sometimes be connected in only one direction.
On Fri, Mar 01, 2024 at 04:05:25PM +0000, Conor Dooley wrote: > On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote: > > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote: > > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > > > dma-names. > > > > > > > > Which sai? Can you restrict this per compatible please, so that someone > > > > cannot add 2 dmas for ones where only the tx is supported. > > > > > > > > | dmas: > > > > | minItems: 1 > > > > | items: > > > > | - description: DMA controller phandle and request line for RX > > > > | - description: DMA controller phandle and request line for TX > > > > > > > > The binding already allows only one, but it documents that the first dma > > > > is always the RX dma, and that doesn't change with this patch.. > > > > > > I said "doesn't change" - but I don't think you can change this > > > trivially, as something could rely on the first dma being the rx one. > > > You'd have to check that there is nothing using these using indices > > > rather than names before making any changes here. > > > > Linux driver and dts with tx only work well. Only issue is dtb_check will > > report error. I want to eliminate these DTB_CHECK warning. > > Linux is not the only user of these bindings, citing linux as your > evidence here is only sufficient if no other users exist. Do they? But, 'dmas' should be common property for all these bindings? I don't think they use 'descriptions:' property, which should guide dts writer to write dts file. actually words 'DMA controller phandle and request line' just nonsense words. let 'regs', it'd better descript at 'reg-names' instead of 'regs' if reg-names exist. Only meansful words is "RX" and "TX", which already show at "dma-names". > > > And it also reasonable, only rx or tx for a special SAI. > > > > Can we remove 'description'? dmas should already descripted at common place > > and 'RX' and 'TX' are listed at 'dma-names' > > Removing the description has the same problem. The existing binding has > set a fixed order that you now want to make flexible. Actually original set minItems: is 1, which means allow 1 channel. but set items to force two channel. Does it work oneOf: items: - description: TX - description: RX items: - description: TX items: - description: RX > > Thanks, > Conor.
On Fri, Mar 01, 2024 at 04:06:35PM +0000, Conor Dooley wrote: > On Thu, Feb 29, 2024 at 02:31:20PM -0500, Frank Li wrote: > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > > dma-names. > > > > > > Which sai? Can you restrict this per compatible please, so that someone > > > cannot add 2 dmas for ones where only the tx is supported. > > > > SAI is exact the same. Only external connect one dma channel. > > Right. The wording made it sound like some SAIs were capable of this and > some were not, but what you actually mean is that all SAIs can sometimes > be connected in only one direction. IP is the same, just some instance only connect one direction dma. for example there are 6 sai instance in SOC. sai0, ... sai4 have both rx and tx. sai5 only connect tx.
On Fri, Mar 01, 2024 at 11:46:20AM -0500, Frank Li wrote: > On Fri, Mar 01, 2024 at 04:05:25PM +0000, Conor Dooley wrote: > > On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote: > > > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote: > > > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > > > > dma-names. > > > > > > > > > > Which sai? Can you restrict this per compatible please, so that someone > > > > > cannot add 2 dmas for ones where only the tx is supported. > > > > > > > > > > | dmas: > > > > > | minItems: 1 > > > > > | items: > > > > > | - description: DMA controller phandle and request line for RX > > > > > | - description: DMA controller phandle and request line for TX > > > > > > > > > > The binding already allows only one, but it documents that the first dma > > > > > is always the RX dma, and that doesn't change with this patch.. > > > > > > > > I said "doesn't change" - but I don't think you can change this > > > > trivially, as something could rely on the first dma being the rx one. > > > > You'd have to check that there is nothing using these using indices > > > > rather than names before making any changes here. > > > > > > Linux driver and dts with tx only work well. Only issue is dtb_check will > > > report error. I want to eliminate these DTB_CHECK warning. > > > > Linux is not the only user of these bindings, citing linux as your > > evidence here is only sufficient if no other users exist. Do they? > > But, 'dmas' should be common property for all these bindings? I don't think > they use 'descriptions:' property, which should guide dts writer to write > dts file. actually words 'DMA controller phandle and request line' just > nonsense words. let 'regs', it'd better descript at 'reg-names' instead > of 'regs' if reg-names exist. Only meansful words is "RX" and "TX", which > already show at "dma-names". None of this matters. If there's a documented order for these, which there is, software is not obligated to use the names and can rely on the order alone. You need to check that there are no other users which will be broken by your proposed change. > > > And it also reasonable, only rx or tx for a special SAI. > > > > > > Can we remove 'description'? dmas should already descripted at common place > > > and 'RX' and 'TX' are listed at 'dma-names' > > > > Removing the description has the same problem. The existing binding has > > set a fixed order that you now want to make flexible. > > Actually original set minItems: is 1, which means allow 1 channel. but > set items to force two channel. > > Does it work > > oneOf: > items: > - description: TX > - description: RX > items: > - description: TX > items: > - description: RX > > > > > Thanks, > > Conor. > >
On Fri, Mar 01, 2024 at 05:07:07PM +0000, Conor Dooley wrote: > On Fri, Mar 01, 2024 at 11:46:20AM -0500, Frank Li wrote: > > On Fri, Mar 01, 2024 at 04:05:25PM +0000, Conor Dooley wrote: > > > On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote: > > > > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote: > > > > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > > > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > > > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > > > > > dma-names. > > > > > > > > > > > > Which sai? Can you restrict this per compatible please, so that someone > > > > > > cannot add 2 dmas for ones where only the tx is supported. > > > > > > > > > > > > | dmas: > > > > > > | minItems: 1 > > > > > > | items: > > > > > > | - description: DMA controller phandle and request line for RX > > > > > > | - description: DMA controller phandle and request line for TX > > > > > > > > > > > > The binding already allows only one, but it documents that the first dma > > > > > > is always the RX dma, and that doesn't change with this patch.. > > > > > > > > > > I said "doesn't change" - but I don't think you can change this > > > > > trivially, as something could rely on the first dma being the rx one. > > > > > You'd have to check that there is nothing using these using indices > > > > > rather than names before making any changes here. > > > > > > > > Linux driver and dts with tx only work well. Only issue is dtb_check will > > > > report error. I want to eliminate these DTB_CHECK warning. > > > > > > Linux is not the only user of these bindings, citing linux as your > > > evidence here is only sufficient if no other users exist. Do they? > > > > But, 'dmas' should be common property for all these bindings? I don't think > > they use 'descriptions:' property, which should guide dts writer to write > > dts file. actually words 'DMA controller phandle and request line' just > > nonsense words. let 'regs', it'd better descript at 'reg-names' instead > > of 'regs' if reg-names exist. Only meansful words is "RX" and "TX", which > > already show at "dma-names". > > None of this matters. If there's a documented order for these, which > there is, software is not obligated to use the names and can rely on the > order alone. You need to check that there are no other users which will > be broken by your proposed change. As my best knowledge, only linux use this binding. Frank > > > > > And it also reasonable, only rx or tx for a special SAI. > > > > > > > > Can we remove 'description'? dmas should already descripted at common place > > > > and 'RX' and 'TX' are listed at 'dma-names' > > > > > > Removing the description has the same problem. The existing binding has > > > set a fixed order that you now want to make flexible. > > > > Actually original set minItems: is 1, which means allow 1 channel. but > > set items to force two channel. > > > > Does it work > > > > oneOf: > > items: > > - description: TX > > - description: RX > > items: > > - description: TX > > items: > > - description: RX > > > > > > > > Thanks, > > > Conor. > > > >
On Fri, Mar 01, 2024 at 12:25:44PM -0500, Frank Li wrote: > On Fri, Mar 01, 2024 at 05:07:07PM +0000, Conor Dooley wrote: > > On Fri, Mar 01, 2024 at 11:46:20AM -0500, Frank Li wrote: > > > On Fri, Mar 01, 2024 at 04:05:25PM +0000, Conor Dooley wrote: > > > > On Thu, Feb 29, 2024 at 02:38:24PM -0500, Frank Li wrote: > > > > > On Thu, Feb 29, 2024 at 06:57:29PM +0000, Conor Dooley wrote: > > > > > > On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote: > > > > > > > On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote: > > > > > > > > Some sai only connect one direction. So allow only "rx" or "tx" for > > > > > > > > dma-names. > > > > > > > > > > > > > > Which sai? Can you restrict this per compatible please, so that someone > > > > > > > cannot add 2 dmas for ones where only the tx is supported. > > > > > > > > > > > > > > | dmas: > > > > > > > | minItems: 1 > > > > > > > | items: > > > > > > > | - description: DMA controller phandle and request line for RX > > > > > > > | - description: DMA controller phandle and request line for TX > > > > > > > > > > > > > > The binding already allows only one, but it documents that the first dma > > > > > > > is always the RX dma, and that doesn't change with this patch.. > > > > > > > > > > > > I said "doesn't change" - but I don't think you can change this > > > > > > trivially, as something could rely on the first dma being the rx one. > > > > > > You'd have to check that there is nothing using these using indices > > > > > > rather than names before making any changes here. > > > > > > > > > > Linux driver and dts with tx only work well. Only issue is dtb_check will > > > > > report error. I want to eliminate these DTB_CHECK warning. > > > > > > > > Linux is not the only user of these bindings, citing linux as your > > > > evidence here is only sufficient if no other users exist. Do they? > > > > > > But, 'dmas' should be common property for all these bindings? I don't think > > > they use 'descriptions:' property, which should guide dts writer to write > > > dts file. actually words 'DMA controller phandle and request line' just > > > nonsense words. let 'regs', it'd better descript at 'reg-names' instead > > > of 'regs' if reg-names exist. Only meansful words is "RX" and "TX", which > > > already show at "dma-names". > > > > None of this matters. If there's a documented order for these, which > > there is, software is not obligated to use the names and can rely on the > > order alone. You need to check that there are no other users which will > > be broken by your proposed change. > > As my best knowledge, only linux use this binding. If you've checked and there are no users, that's fine. Please mention in the commit message that there are no users that will be affected as justification for the ABI change.
diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml index 2456d958adeef..0302752d58a2b 100644 --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml @@ -86,10 +86,14 @@ properties: - description: DMA controller phandle and request line for TX dma-names: - minItems: 1 - items: - - const: rx - - const: tx + oneOf: + - items: + - const: rx + - const: tx + - items: + - enum: + - rx + - tx interrupts: items:
Some sai only connect one direction. So allow only "rx" or "tx" for dma-names. Signed-off-by: Frank Li <Frank.Li@nxp.com> --- Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)