Re: [alsa-devel] [PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
On 15-03-31 12:26 AM, Lars-Peter Clausen wrote: On 03/31/2015 05:16 AM, Scott Branden wrote: [...] +- ssp-port-id: The ssp port interface to use +Valid value are 0, 1, 2, or 3 (for spdif) How about using 'reg' as the property name here. It is the standard property name for identifying or assigning an address to a sub-node. Okay. Thanks. I will change. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
On 15-03-30 10:58 PM, Mark Brown wrote: On Mon, Mar 30, 2015 at 08:16:23PM -0700, Scott Branden wrote: +SSP Subnode properties: +- dai-name: The name of the DAI registered with ASOC ASoC. Okay. Why is this in the DT - it sounds like this is just an internal implementation detail for Linux, not a property of the hardware. Will move into the driver code. +- mode: Controls if this port should be configured as I2S or TDM mode. + Valid values are: "tdm" or "i2s" +- tdm-bits-per-frame: only if mode is "tdm" then this property must set. + Valid values are (128/256/512) We'd normally leave these up to the machine driver to set as they're link wide things for system integration. The bits per frame in particular looks like something that's not going to be fixed by the hardware and could be varied at runtime. I was using the device tree to set some board specific properties of our audio serial port driver. The idea was that these properties would only need to be one value for a specific board. Therefore, we could set them in the device tree and then not have to set them in the machine file. I thought it would help keep the machine file a little more basic. Moving these to the machine file is reasonable and will allow for a more dynamic usage of our driver. I will move them to machine file. +- port-status: Controls if port is enabled or not + Valid values "enabled" or "disabled" This sounds like it's replicating the DT standard status property? Okay. Will replace with "status" +- channel-group: Control grouping of serial port + Valid values are "2_0", "3_1", or "5_1" What does this mean? It looks like it's setting the number of channels which again seems like a runtime thing. It is a configuration where we can link together two or three of the ports to allow for synchronized starts and stop. I will look into another method of configuring this operational mode. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [alsa-devel] [PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
On 15-03-31 12:26 AM, Lars-Peter Clausen wrote: On 03/31/2015 05:16 AM, Scott Branden wrote: [...] +- ssp-port-id: The ssp port interface to use +Valid value are 0, 1, 2, or 3 (for spdif) How about using 'reg' as the property name here. It is the standard property name for identifying or assigning an address to a sub-node. Okay. Thanks. I will change. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
On 15-03-30 10:58 PM, Mark Brown wrote: On Mon, Mar 30, 2015 at 08:16:23PM -0700, Scott Branden wrote: +SSP Subnode properties: +- dai-name: The name of the DAI registered with ASOC ASoC. Okay. Why is this in the DT - it sounds like this is just an internal implementation detail for Linux, not a property of the hardware. Will move into the driver code. +- mode: Controls if this port should be configured as I2S or TDM mode. + Valid values are: tdm or i2s +- tdm-bits-per-frame: only if mode is tdm then this property must set. + Valid values are (128/256/512) We'd normally leave these up to the machine driver to set as they're link wide things for system integration. The bits per frame in particular looks like something that's not going to be fixed by the hardware and could be varied at runtime. I was using the device tree to set some board specific properties of our audio serial port driver. The idea was that these properties would only need to be one value for a specific board. Therefore, we could set them in the device tree and then not have to set them in the machine file. I thought it would help keep the machine file a little more basic. Moving these to the machine file is reasonable and will allow for a more dynamic usage of our driver. I will move them to machine file. +- port-status: Controls if port is enabled or not + Valid values enabled or disabled This sounds like it's replicating the DT standard status property? Okay. Will replace with status +- channel-group: Control grouping of serial port + Valid values are 2_0, 3_1, or 5_1 What does this mean? It looks like it's setting the number of channels which again seems like a runtime thing. It is a configuration where we can link together two or three of the ports to allow for synchronized starts and stop. I will look into another method of configuring this operational mode. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [alsa-devel] [PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
On 03/31/2015 05:16 AM, Scott Branden wrote: [...] +- ssp-port-id: The ssp port interface to use + Valid value are 0, 1, 2, or 3 (for spdif) How about using 'reg' as the property name here. It is the standard property name for identifying or assigning an address to a sub-node. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
On Mon, Mar 30, 2015 at 08:16:23PM -0700, Scott Branden wrote: > +Required properties: > + - compatible : "brcm,cygnus-audio" > + - #address-cells: 32bit valued, 1 cell. <1> > + - #size-cells: 32bit valued, 1 cell. <1> > + - reg : Should contain audio registers location and length > + - interrupts: audio DMA interrupt number > + > +SSP Subnode properties: This document does rather gloss over the fact that the binding requires subnodes, it should mention this requirement and say what they mean. signature.asc Description: Digital signature
Re: [PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
On Mon, Mar 30, 2015 at 08:16:23PM -0700, Scott Branden wrote: +Required properties: + - compatible : brcm,cygnus-audio + - #address-cells: 32bit valued, 1 cell. 1 + - #size-cells: 32bit valued, 1 cell. 1 + - reg : Should contain audio registers location and length + - interrupts: audio DMA interrupt number + +SSP Subnode properties: This document does rather gloss over the fact that the binding requires subnodes, it should mention this requirement and say what they mean. signature.asc Description: Digital signature
Re: [alsa-devel] [PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
On 03/31/2015 05:16 AM, Scott Branden wrote: [...] +- ssp-port-id: The ssp port interface to use + Valid value are 0, 1, 2, or 3 (for spdif) How about using 'reg' as the property name here. It is the standard property name for identifying or assigning an address to a sub-node. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
On Mon, Mar 30, 2015 at 08:16:23PM -0700, Scott Branden wrote: > +SSP Subnode properties: > +- dai-name: The name of the DAI registered with ASOC ASoC. Why is this in the DT - it sounds like this is just an internal implementation detail for Linux, not a property of the hardware. > +- mode: Controls if this port should be configured as I2S or TDM mode. > + Valid values are: "tdm" or "i2s" > +- tdm-bits-per-frame: only if mode is "tdm" then this property must set. > + Valid values are (128/256/512) We'd normally leave these up to the machine driver to set as they're link wide things for system integration. The bits per frame in particular looks like something that's not going to be fixed by the hardware and could be varied at runtime. > +- port-status: Controls if port is enabled or not > + Valid values "enabled" or "disabled" This sounds like it's replicating the DT standard status property? > +- channel-group: Control grouping of serial port > + Valid values are "2_0", "3_1", or "5_1" What does this mean? It looks like it's setting the number of channels which again seems like a runtime thing. signature.asc Description: Digital signature
[PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
From: Lori Hikichi Add device tree binding documentation for the Cygnus SOC audio block Reviewed-by: Jonathan Richardson Reviewed-by: Ray Jui Signed-off-by: Scott Branden Signed-off-by: Lori Hikichi --- .../bindings/sound/brcm,cygnus-audio.txt | 68 ++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt diff --git a/Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt b/Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt new file mode 100644 index 000..5358cc3 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt @@ -0,0 +1,68 @@ +BROADCOM Cygnus Audio I2S/TDM/SPDIF controller + +Required properties: + - compatible : "brcm,cygnus-audio" + - #address-cells: 32bit valued, 1 cell. <1> + - #size-cells: 32bit valued, 1 cell. <1> + - reg : Should contain audio registers location and length + - interrupts: audio DMA interrupt number + +SSP Subnode properties: +- dai-name: The name of the DAI registered with ASOC +- ssp-port-id: The ssp port interface to use + Valid value are 0, 1, 2, or 3 (for spdif) +- mode: Controls if this port should be configured as I2S or TDM mode. + Valid values are: "tdm" or "i2s" +- tdm-bits-per-frame: only if mode is "tdm" then this property must set. + Valid values are (128/256/512) +- port-status: Controls if port is enabled or not + Valid values "enabled" or "disabled" +- channel-group: Control grouping of serial port + Valid values are "2_0", "3_1", or "5_1" + +Example: + cygnus_audio: audio@0x180ae000 { + compatible = "brcm,cygnus-audio"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x180ae000 0x1000>; + + interrupts = ; + + ssp0: ssp_port@0 { + dai-name = "cygnus-ssp0"; + ssp-port-id = <0>; + + mode = "i2s"; /* "i2s" or "tdm" */ + channel-group = "2_0"; /* Use 2_0, 3_1, 5_1 */ + port-status = "enabled"; + }; + + ssp1: ssp_port@1 { + dai-name = "cygnus-ssp1"; + ssp-port-id = <1>; + + mode = "i2s"; /* "i2s" or "tdm" */ + channel-group = "2_0"; /* Use 2_0, 3_1, 5_1 */ + port-status = "disabled"; + }; + + ssp2: ssp_port@2 { + dai-name = "cygnus-ssp2"; + ssp-port-id = <2>; + + mode = "tdm"; /* "i2s" or "tdm" */ + tdm-bits-per-frame = <256>; + channel-group = "2_0"; /* Use 2_0, 3_1, 5_1 */ + port-status = "disabled"; + }; + + spdif: spdif_port@3 { + dai-name = "cygnus-spdif"; + ssp-port-id = <3>; + + mode = "i2s"; /* "i2s" or "tdm" */ + channel-group = "2_0"; /* Use 2_0, 3_1, 5_1 */ + port-status = "disabled"; + }; + }; -- 2.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
From: Lori Hikichi lhiki...@broadcom.com Add device tree binding documentation for the Cygnus SOC audio block Reviewed-by: Jonathan Richardson jonat...@broadcom.com Reviewed-by: Ray Jui r...@broadcom.com Signed-off-by: Scott Branden sbran...@broadcom.com Signed-off-by: Lori Hikichi lhiki...@broadcom.com --- .../bindings/sound/brcm,cygnus-audio.txt | 68 ++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt diff --git a/Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt b/Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt new file mode 100644 index 000..5358cc3 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/brcm,cygnus-audio.txt @@ -0,0 +1,68 @@ +BROADCOM Cygnus Audio I2S/TDM/SPDIF controller + +Required properties: + - compatible : brcm,cygnus-audio + - #address-cells: 32bit valued, 1 cell. 1 + - #size-cells: 32bit valued, 1 cell. 1 + - reg : Should contain audio registers location and length + - interrupts: audio DMA interrupt number + +SSP Subnode properties: +- dai-name: The name of the DAI registered with ASOC +- ssp-port-id: The ssp port interface to use + Valid value are 0, 1, 2, or 3 (for spdif) +- mode: Controls if this port should be configured as I2S or TDM mode. + Valid values are: tdm or i2s +- tdm-bits-per-frame: only if mode is tdm then this property must set. + Valid values are (128/256/512) +- port-status: Controls if port is enabled or not + Valid values enabled or disabled +- channel-group: Control grouping of serial port + Valid values are 2_0, 3_1, or 5_1 + +Example: + cygnus_audio: audio@0x180ae000 { + compatible = brcm,cygnus-audio; + #address-cells = 1; + #size-cells = 1; + reg = 0x180ae000 0x1000; + + interrupts = GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH; + + ssp0: ssp_port@0 { + dai-name = cygnus-ssp0; + ssp-port-id = 0; + + mode = i2s; /* i2s or tdm */ + channel-group = 2_0; /* Use 2_0, 3_1, 5_1 */ + port-status = enabled; + }; + + ssp1: ssp_port@1 { + dai-name = cygnus-ssp1; + ssp-port-id = 1; + + mode = i2s; /* i2s or tdm */ + channel-group = 2_0; /* Use 2_0, 3_1, 5_1 */ + port-status = disabled; + }; + + ssp2: ssp_port@2 { + dai-name = cygnus-ssp2; + ssp-port-id = 2; + + mode = tdm; /* i2s or tdm */ + tdm-bits-per-frame = 256; + channel-group = 2_0; /* Use 2_0, 3_1, 5_1 */ + port-status = disabled; + }; + + spdif: spdif_port@3 { + dai-name = cygnus-spdif; + ssp-port-id = 3; + + mode = i2s; /* i2s or tdm */ + channel-group = 2_0; /* Use 2_0, 3_1, 5_1 */ + port-status = disabled; + }; + }; -- 2.3.3 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/2] ASoC: cygnus-audio: adding device tree bindings
On Mon, Mar 30, 2015 at 08:16:23PM -0700, Scott Branden wrote: +SSP Subnode properties: +- dai-name: The name of the DAI registered with ASOC ASoC. Why is this in the DT - it sounds like this is just an internal implementation detail for Linux, not a property of the hardware. +- mode: Controls if this port should be configured as I2S or TDM mode. + Valid values are: tdm or i2s +- tdm-bits-per-frame: only if mode is tdm then this property must set. + Valid values are (128/256/512) We'd normally leave these up to the machine driver to set as they're link wide things for system integration. The bits per frame in particular looks like something that's not going to be fixed by the hardware and could be varied at runtime. +- port-status: Controls if port is enabled or not + Valid values enabled or disabled This sounds like it's replicating the DT standard status property? +- channel-group: Control grouping of serial port + Valid values are 2_0, 3_1, or 5_1 What does this mean? It looks like it's setting the number of channels which again seems like a runtime thing. signature.asc Description: Digital signature