Loading Documentation/devicetree/bindings/sound/st,stm32-sai.txt 0 → 100644 +89 −0 Original line number Diff line number Diff line STMicroelectronics STM32 Serial Audio Interface (SAI). The SAI interface (Serial Audio Interface) offers a wide set of audio protocols as I2S standards, LSB or MSB-justified, PCM/DSP, TDM, and AC'97. The SAI contains two independent audio sub-blocks. Each sub-block has its own clock generator and I/O lines controller. Required properties: - compatible: Should be "st,stm32f4-sai" - reg: Base address and size of SAI common register set. - clocks: Must contain phandle and clock specifier pairs for each entry in clock-names. - clock-names: Must contain "x8k" and "x11k" "x8k": SAI parent clock for sampling rates multiple of 8kHz. "x11k": SAI parent clock for sampling rates multiple of 11.025kHz. - interrupts: cpu DAI interrupt line shared by SAI sub-blocks Optional properties: - resets: Reference to a reset controller asserting the SAI SAI subnodes: Two subnodes corresponding to SAI sub-block instances A et B can be defined. Subnode can be omitted for unsused sub-block. SAI subnodes required properties: - compatible: Should be "st,stm32-sai-sub-a" or "st,stm32-sai-sub-b" for SAI sub-block A or B respectively. - reg: Base address and size of SAI sub-block register set. - clocks: Must contain one phandle and clock specifier pair for sai_ck which feeds the internal clock generator. - clock-names: Must contain "sai_ck". - dmas: see Documentation/devicetree/bindings/dma/stm32-dma.txt - dma-names: identifier string for each DMA request line "tx": if sai sub-block is configured as playback DAI "rx": if sai sub-block is configured as capture DAI - pinctrl-names: should contain only value "default" - pinctrl-0: see Documentation/devicetree/bindings/pinctrl/pinctrl-stm32.txt Example: sound_card { compatible = "audio-graph-card"; dais = <&sai1b_port>; }; sai1: sai1@40015800 { compatible = "st,stm32f4-sai"; #address-cells = <1>; #size-cells = <1>; ranges; reg = <0x40015800 0x4>; clocks = <&rcc 1 CLK_SAIQ_PDIV>, <&rcc 1 CLK_I2SQ_PDIV>; clock-names = "x8k", "x11k"; interrupts = <87>; sai1b: audio-controller@40015824 { #sound-dai-cells = <0>; compatible = "st,stm32-sai-sub-b"; reg = <0x40015824 0x1C>; clocks = <&rcc 1 CLK_SAI2>; clock-names = "sai_ck"; dmas = <&dma2 5 0 0x400 0x0>; dma-names = "tx"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai1b>; ports { #address-cells = <1>; #size-cells = <0>; sai1b_port: port@0 { reg = <0>; cpu_endpoint: endpoint { remote-endpoint = <&codec_endpoint>; audio-graph-card,format = "i2s"; audio-graph-card,bitclock-master = <&codec_endpoint>; audio-graph-card,frame-master = <&codec_endpoint>; }; }; }; }; }; audio-codec { codec_port: port { codec_endpoint: endpoint { remote-endpoint = <&cpu_endpoint>; }; }; }; Documentation/devicetree/bindings/sound/tas2552.txt +7 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,8 @@ The tas2552 serial control bus communicates through I2C protocols Required properties: - compatible - One of: "ti,tas2552" - TAS2552 - reg - I2C slave address - reg - I2C slave address: it can be 0x40 if ADDR pin is 0 or 0x41 if ADDR pin is 1. - supply-*: Required supply regulators are: "vbat" battery voltage "iovdd" I/O Voltage Loading @@ -14,17 +15,20 @@ Required properties: Optional properties: - enable-gpio - gpio pin to enable/disable the device tas2552 can receive it's reference clock via MCLK, BCLK, IVCLKIN pin or use the tas2552 can receive its reference clock via MCLK, BCLK, IVCLKIN pin or use the internal 1.8MHz. This CLKIN is used by the PLL. In addition to PLL, the PDM reference clock is also selectable: PLL, IVCLKIN, BCLK or MCLK. For system integration the dt-bindings/sound/tas2552.h header file provides defined values to selct and configure the PLL and PDM reference clocks. defined values to select and configure the PLL and PDM reference clocks. Example: tas2552: tas2552@41 { compatible = "ti,tas2552"; reg = <0x41>; vbat-supply = <®_vbat>; iovdd-supply = <®_iovdd>; avdd-supply = <®_avdd>; enable-gpio = <&gpio4 2 GPIO_ACTIVE_HIGH>; }; Loading sound/soc/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ source "sound/soc/sh/Kconfig" source "sound/soc/sirf/Kconfig" source "sound/soc/spear/Kconfig" source "sound/soc/sti/Kconfig" source "sound/soc/stm/Kconfig" source "sound/soc/sunxi/Kconfig" source "sound/soc/tegra/Kconfig" source "sound/soc/txx9/Kconfig" Loading sound/soc/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ obj-$(CONFIG_SND_SOC) += sh/ obj-$(CONFIG_SND_SOC) += sirf/ obj-$(CONFIG_SND_SOC) += spear/ obj-$(CONFIG_SND_SOC) += sti/ obj-$(CONFIG_SND_SOC) += stm/ obj-$(CONFIG_SND_SOC) += sunxi/ obj-$(CONFIG_SND_SOC) += tegra/ obj-$(CONFIG_SND_SOC) += txx9/ Loading sound/soc/codecs/sta529.c +7 −0 Original line number Diff line number Diff line Loading @@ -375,9 +375,16 @@ static const struct i2c_device_id sta529_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, sta529_i2c_id); static const struct of_device_id sta529_of_match[] = { { .compatible = "st,sta529", }, { } }; MODULE_DEVICE_TABLE(of, sta529_of_match); static struct i2c_driver sta529_i2c_driver = { .driver = { .name = "sta529", .of_match_table = sta529_of_match, }, .probe = sta529_i2c_probe, .remove = sta529_i2c_remove, Loading Loading
Documentation/devicetree/bindings/sound/st,stm32-sai.txt 0 → 100644 +89 −0 Original line number Diff line number Diff line STMicroelectronics STM32 Serial Audio Interface (SAI). The SAI interface (Serial Audio Interface) offers a wide set of audio protocols as I2S standards, LSB or MSB-justified, PCM/DSP, TDM, and AC'97. The SAI contains two independent audio sub-blocks. Each sub-block has its own clock generator and I/O lines controller. Required properties: - compatible: Should be "st,stm32f4-sai" - reg: Base address and size of SAI common register set. - clocks: Must contain phandle and clock specifier pairs for each entry in clock-names. - clock-names: Must contain "x8k" and "x11k" "x8k": SAI parent clock for sampling rates multiple of 8kHz. "x11k": SAI parent clock for sampling rates multiple of 11.025kHz. - interrupts: cpu DAI interrupt line shared by SAI sub-blocks Optional properties: - resets: Reference to a reset controller asserting the SAI SAI subnodes: Two subnodes corresponding to SAI sub-block instances A et B can be defined. Subnode can be omitted for unsused sub-block. SAI subnodes required properties: - compatible: Should be "st,stm32-sai-sub-a" or "st,stm32-sai-sub-b" for SAI sub-block A or B respectively. - reg: Base address and size of SAI sub-block register set. - clocks: Must contain one phandle and clock specifier pair for sai_ck which feeds the internal clock generator. - clock-names: Must contain "sai_ck". - dmas: see Documentation/devicetree/bindings/dma/stm32-dma.txt - dma-names: identifier string for each DMA request line "tx": if sai sub-block is configured as playback DAI "rx": if sai sub-block is configured as capture DAI - pinctrl-names: should contain only value "default" - pinctrl-0: see Documentation/devicetree/bindings/pinctrl/pinctrl-stm32.txt Example: sound_card { compatible = "audio-graph-card"; dais = <&sai1b_port>; }; sai1: sai1@40015800 { compatible = "st,stm32f4-sai"; #address-cells = <1>; #size-cells = <1>; ranges; reg = <0x40015800 0x4>; clocks = <&rcc 1 CLK_SAIQ_PDIV>, <&rcc 1 CLK_I2SQ_PDIV>; clock-names = "x8k", "x11k"; interrupts = <87>; sai1b: audio-controller@40015824 { #sound-dai-cells = <0>; compatible = "st,stm32-sai-sub-b"; reg = <0x40015824 0x1C>; clocks = <&rcc 1 CLK_SAI2>; clock-names = "sai_ck"; dmas = <&dma2 5 0 0x400 0x0>; dma-names = "tx"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai1b>; ports { #address-cells = <1>; #size-cells = <0>; sai1b_port: port@0 { reg = <0>; cpu_endpoint: endpoint { remote-endpoint = <&codec_endpoint>; audio-graph-card,format = "i2s"; audio-graph-card,bitclock-master = <&codec_endpoint>; audio-graph-card,frame-master = <&codec_endpoint>; }; }; }; }; }; audio-codec { codec_port: port { codec_endpoint: endpoint { remote-endpoint = <&cpu_endpoint>; }; }; };
Documentation/devicetree/bindings/sound/tas2552.txt +7 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,8 @@ The tas2552 serial control bus communicates through I2C protocols Required properties: - compatible - One of: "ti,tas2552" - TAS2552 - reg - I2C slave address - reg - I2C slave address: it can be 0x40 if ADDR pin is 0 or 0x41 if ADDR pin is 1. - supply-*: Required supply regulators are: "vbat" battery voltage "iovdd" I/O Voltage Loading @@ -14,17 +15,20 @@ Required properties: Optional properties: - enable-gpio - gpio pin to enable/disable the device tas2552 can receive it's reference clock via MCLK, BCLK, IVCLKIN pin or use the tas2552 can receive its reference clock via MCLK, BCLK, IVCLKIN pin or use the internal 1.8MHz. This CLKIN is used by the PLL. In addition to PLL, the PDM reference clock is also selectable: PLL, IVCLKIN, BCLK or MCLK. For system integration the dt-bindings/sound/tas2552.h header file provides defined values to selct and configure the PLL and PDM reference clocks. defined values to select and configure the PLL and PDM reference clocks. Example: tas2552: tas2552@41 { compatible = "ti,tas2552"; reg = <0x41>; vbat-supply = <®_vbat>; iovdd-supply = <®_iovdd>; avdd-supply = <®_avdd>; enable-gpio = <&gpio4 2 GPIO_ACTIVE_HIGH>; }; Loading
sound/soc/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ source "sound/soc/sh/Kconfig" source "sound/soc/sirf/Kconfig" source "sound/soc/spear/Kconfig" source "sound/soc/sti/Kconfig" source "sound/soc/stm/Kconfig" source "sound/soc/sunxi/Kconfig" source "sound/soc/tegra/Kconfig" source "sound/soc/txx9/Kconfig" Loading
sound/soc/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ obj-$(CONFIG_SND_SOC) += sh/ obj-$(CONFIG_SND_SOC) += sirf/ obj-$(CONFIG_SND_SOC) += spear/ obj-$(CONFIG_SND_SOC) += sti/ obj-$(CONFIG_SND_SOC) += stm/ obj-$(CONFIG_SND_SOC) += sunxi/ obj-$(CONFIG_SND_SOC) += tegra/ obj-$(CONFIG_SND_SOC) += txx9/ Loading
sound/soc/codecs/sta529.c +7 −0 Original line number Diff line number Diff line Loading @@ -375,9 +375,16 @@ static const struct i2c_device_id sta529_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, sta529_i2c_id); static const struct of_device_id sta529_of_match[] = { { .compatible = "st,sta529", }, { } }; MODULE_DEVICE_TABLE(of, sta529_of_match); static struct i2c_driver sta529_i2c_driver = { .driver = { .name = "sta529", .of_match_table = sta529_of_match, }, .probe = sta529_i2c_probe, .remove = sta529_i2c_remove, Loading