Beaglebone-Black HDMI audio
Subsystems (10)
v2 cover Beaglebone-Black HDMI audio
Changes since v1 of the patch set:
- Move gpio-clock under drivers drivers/clk/ti/ and change compatible string to "ti,gpio-clock" to get it accepted
- Drop already applied "ASoC: mcasp: Fix implicit BLCK divider setting"
- Fix typo from "ARM: dts: am33xx: Add external clock provider" commit message
The code has a functional dependency to:
http://www.mail-archive.com/[email protected]/msg108199.html
Without the above patch the audio card does not probe.
The code has been rebased on top of Linux 3.17-rc1 merged withgit://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
with http://www.mail-archive.com/[email protected]/msg108199.html
cherry-picked on top.
Cheers,
Jyri
Jyri Sarha (8):
clk: ti: add gpio controlled clock
drm/tilcdc: Add I2S HDMI audio config for tda998x
ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S
bus
ASoC: davinci: HDMI audio build for AM33XX and TDA998x
ARM: dts: am33xx: Add external clock provider
ARM: dts: am335x-boneblack: Add HDMI audio support
ARM: OMAP2+: omap2plus_defconfig: TDA998X HDMI trough tilcdc,slave
ARM: OMAP2+: omap2plus_defconfig: Enable BeagleBone Black HDMI audio
support
.../devicetree/bindings/clock/ti/gpio-clock.txt | 21 ++ .../bindings/sound/davinci-evm-audio.txt | 4 +- arch/arm/boot/dts/am335x-boneblack.dts | 54 ++++++ arch/arm/boot/dts/am33xx.dtsi | 10 + arch/arm/configs/omap2plus_defconfig | 5 + drivers/clk/ti/Makefile | 2 +- drivers/clk/ti/gpio.c | 202 ++++++++++++++++++++ drivers/gpu/drm/tilcdc/tilcdc_slave.c | 24 ++- sound/soc/davinci/Kconfig | 12 ++ sound/soc/davinci/davinci-evm.c | 82 +++++++- 10 files changed, 411 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/ti/gpio-clock.txt create mode 100644 drivers/clk/ti/gpio.c
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 1/8 clk: ti: add gpio controlled clock
The added ti,gpio-clock is a basic clock that can be enabled and disabled trough a gpio output. The DT binding document for the clock is also added. For EPROBE_DEFER handling the registering of the clock has to be delayed until of_clk_get() call time.
--- .../devicetree/bindings/clock/ti/gpio-clock.txt | 21 ++ drivers/clk/ti/Makefile | 2 +- drivers/clk/ti/gpio.c | 202 ++++++++++++++++++++ 3 files changed, 224 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/clock/ti/gpio-clock.txt create mode 100644 drivers/clk/ti/gpio.c
Documentation/devicetree/bindings/clock/ti/gpio-clock.txt new file +21 -0
@@ -0,0 +1,21 @@ +Binding for simple gpio controlled clock. + +This binding uses the common clock binding[1]. + +[1] Documentation/devicetree/bindings/clock/clock-bindings.txt + +Required properties: +- compatible : shall be "ti,gpio-clock". +- #clock-cells : from common clock binding; shall be set to 0. +- enable-gpios : GPIO reference for enabling and disabling the clock. + +Optional properties: +- clocks: Maximum of one parent clock is supported. + +Example: + clock { + compatible = "ti,gpio-clock"; + clocks = <&parentclk>; + #clock-cells = <0>; + enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + };
drivers/clk/ti/Makefile +1 -1
@@ -1,7 +1,7 @@ ifneq ($(CONFIG_OF),) obj-y += clk.o autoidle.o clockdomain.o clk-common = dpll.o composite.o divider.o gate.o \ - fixed-factor.o mux.o apll.o + fixed-factor.o mux.o apll.o gpio.o obj-$(CONFIG_SOC_AM33XX) += $(clk-common) clk-33xx.o obj-$(CONFIG_ARCH_OMAP2) += $(clk-common) interface.o clk-2xxx.o obj-$(CONFIG_ARCH_OMAP3) += $(clk-common) interface.o clk-3xxx.o
drivers/clk/ti/gpio.c new file +202 -0
202 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Re: [PATCH v2 1/8] clk: ti: add gpio controlled clock
Quoted 4 lines · Jyri Sarha
The added ti,gpio-clock is a basic clock that can be enabled and disabled trough a gpio output. The DT binding document for the clock is also added. For
EPROBE_DEFERhandling the registering of the clock has to be delayed untilof_clk_get()call time.
I guess this is basically an AND gate with the GPIO and parent clock as inputs? Or is this something more complex that we might want to do more things with later?
If it's the former it sounds like this could be a completely generic "gpio-gate-clock".
Thanks,
Mark.
Quoted 265 lines
Signed-off-by Jyri Sarha <[email protected]>--- .../devicetree/bindings/clock/ti/gpio-clock.txt | 21 ++ drivers/clk/ti/Makefile | 2 +- drivers/clk/ti/gpio.c | 202 ++++++++++++++++++++ 3 files changed, 224 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/clock/ti/gpio-clock.txt create mode 100644 drivers/clk/ti/gpio.cDocumentation/devicetree/bindings/clock/ti/gpio-clock.txt new file +21
-0@@ -0,0 +1,21 @@ +Binding for simple gpio controlled clock. + +This binding uses the common clock binding[1]. + +[1] Documentation/devicetree/bindings/clock/clock-bindings.txt + +Required properties: +- compatible : shall be "ti,gpio-clock". +- #clock-cells : from common clock binding; shall be set to 0. +- enable-gpios : GPIO reference for enabling and disabling the clock. + +Optional properties: +- clocks: Maximum of one parent clock is supported. + +Example: + clock { + compatible = "ti,gpio-clock"; + clocks = <&parentclk>; + #clock-cells = <0>; + enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + };drivers/clk/ti/Makefile +1
-1@@ -1,7 +1,7 @@ ifneq ($(CONFIG_OF),) obj-y += clk.o autoidle.o clockdomain.o clk-common = dpll.o composite.o divider.o gate.o \ - fixed-factor.o mux.o apll.o + fixed-factor.o mux.o apll.o gpio.o obj-$(CONFIG_SOC_AM33XX) += $(clk-common) clk-33xx.o obj-$(CONFIG_ARCH_OMAP2) += $(clk-common) interface.o clk-2xxx.o obj-$(CONFIG_ARCH_OMAP3) += $(clk-common) interface.o clk-3xxx.odrivers/clk/ti/gpio.c new file +202
-0@@ -0,0 +1,202 @@ +/* +* Copyright (C) 2012 - 2014 Texas Instruments Incorporated - http://www.ti.com +* Author: Jyri Sarha <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* Gpio controlled clock implementation +*/ + +#include <linux/clk-provider.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/gpio.h> +#include <linux/of_gpio.h> +#include <linux/err.h> +#include <linux/device.h> + +struct clk_gpio { +struct clk_hw hw; +struct gpio_desc *gpiod; +}; + +/** +* DOC: basic gpio controlled clock which can be enabled and disabled +* with gpio output +* Traits of this clock: +* prepare - clk_(un)prepare only ensures parent is (un)prepared +* enable - clk_enable and clk_disable are functional & control gpio +* rate - inherits rate from parent. No clk_set_rate support +* parent - fixed parent. No clk_set_parent support +*/ + +#define to_clk_gpio (_hw) container_of(_hw, struct clk_gpio, hw) + +static int clk_gpio_enable (struct clk_hw *hw) +{ +struct clk_gpio *clk =to_clk_gpio (hw); + +gpiod_set_value (clk->gpiod,1 ); + +return 0 ; +} + +static void clk_gpio_disable (struct clk_hw *hw) +{ +struct clk_gpio *clk =to_clk_gpio (hw); + +gpiod_set_value (clk->gpiod,0 ); +} + +static int clk_gpio_is_enabled (struct clk_hw *hw) +{ +struct clk_gpio *clk =to_clk_gpio (hw); + +return gpiod_get_value (clk->gpiod); +} + +static const struct clk_ops clk_gpio_ops = { + .enable = clk_gpio_enable, + .disable = clk_gpio_disable, + .is_enabled = clk_gpio_is_enabled, +}; + +/** +* clk_register_gpio - register a gpip clock with the clock framework +* @dev: device that is registering this clock +* @name: name of this clock +* @parent_name: name of this clock's parent +* @gpiod: gpio descriptor to control this clock +*/ +static struct clk *clk_register_gpio (struct device *dev,const char *name, +const char *parent_name,struct gpio_desc *gpiod, +unsigned long flags) +{ +struct clk_gpio *clk_gpio =NULL ; +struct clk *clk =ERR_PTR (-EINVAL ); +struct clk_init_data init = {NULL }; +unsigned long gpio_flags; +int err; + +if (gpiod_is_active_low (gpiod)) + gpio_flags =GPIOF_OUT_INIT_HIGH ; +else + gpio_flags =GPIOF_OUT_INIT_LOW ; + +if (dev) + err =devm_gpio_request_one (dev,desc_to_gpio (gpiod), + gpio_flags, name); +else + err =gpio_request_one (desc_to_gpio (gpiod), gpio_flags, name); + +if (err) { +pr_err ("%s: %s: Error requesting clock control gpio %u\n" , + __func__, name,desc_to_gpio (gpiod)); +return ERR_PTR (err); + } + +if (dev) + clk_gpio =devm_kzalloc (dev,sizeof (struct clk_gpio ), +GFP_KERNEL ); +else + clk_gpio =kzalloc (sizeof (struct clk_gpio ),GFP_KERNEL ); + +if (!clk_gpio) + goto clk_register_gpio_err; + + init.name = name; + init.ops = &clk_gpio_ops; + init.flags = flags |CLK_IS_BASIC ; + init.parent_names = (parent_name ? &parent_name :NULL ); + init.num_parents = (parent_name ?1 :0 ); + + clk_gpio->gpiod = gpiod; + clk_gpio->hw.init = &init; + + clk =clk_register (dev, &clk_gpio->hw); + +if (!IS_ERR (clk)) +return clk; + +if (!dev) +kfree (clk_gpio); + +clk_register_gpio_err: +gpiod_put (gpiod); + +return clk; +} + +/** +* The clk_register_gpio has to be delayed, because the EPROBE_DEFER +* can not be handled properly at of_clk_init() call time. +*/ + +struct clk_gpio_delayed_register_data { +struct device_node *node; +struct mutex lock; +struct clk *clk; +}; + +static +struct clk *of_clk_gpio_delayed_register_get (struct of_phandle_args *clkspec, +void *_data) +{ +struct clk_gpio_delayed_register_data *data = _data; +struct clk *clk; +const char *clk_name = data->node->name; +const char *parent_name; +struct gpio_desc *gpiod; +int gpio; + +mutex_lock (&data->lock); + +if (data->clk) { +mutex_unlock (&data->lock); +return data->clk; + } + + gpio =of_get_named_gpio_flags (data->node,"enable-gpios" ,0 ,NULL ); +if (gpio <0 ) { +mutex_unlock (&data->lock); +if (gpio != -EPROBE_DEFER ) +pr_err ("%s: %s: Can't get 'enable-gpios' DT property\n" , + __func__, clk_name); +return ERR_PTR (gpio); + } + gpiod =gpio_to_desc (gpio); + + parent_name =of_clk_get_parent_name (data->node,0 ); + + clk =clk_register_gpio (NULL , clk_name, parent_name, gpiod,0 ); +if (IS_ERR (clk)) { +mutex_unlock (&data->lock); +return clk; + } + + data->clk = clk; +mutex_unlock (&data->lock); + +return clk; +} + +/** +* of_gpio_clk_setup() - Setup function for gpio controlled clock +*/ +static void __init of_gpio_clk_setup (struct device_node *node) +{ +struct clk_gpio_delayed_register_data *data; + + data =kzalloc (sizeof (struct clk_gpio_delayed_register_data ), +GFP_KERNEL ); +if (!data) +return ; + + data->node = node; +mutex_init (&data->lock); + +of_clk_add_provider (node, of_clk_gpio_delayed_register_get, data); +} +CLK_OF_DECLARE (gpio_clk,"ti,gpio-clock" , of_gpio_clk_setup);Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/8] clk: ti: add gpio controlled clock
Quoted 6 lines · Mark Rutland
Quoted 4 lines · Jyri Sarha
The added ti,gpio-clock is a basic clock that can be enabled and disabled trough a gpio output. The DT binding document for the clock is also added. For
EPROBE_DEFERhandling the registering of the clock has to be delayed untilof_clk_get()call time.
Quoted 7 lines
I guess this is basically an AND gate with the GPIO and parent clock as inputs? Or is this something more complex that we might want to do more things with later?
If it's the former it sounds like this could be a completely generic "gpio-gate-clock".
Yes, its completely generic. However, since there has been no response to my several earlier attempts to get this patch in I finally gave up and moved it under clk/ti.
"gpio-gate-clock" sound like more accurate name for ti. I'll change that.
Do you think I should give this one more try to get it in as generic basic clock?
Cheers,
Jyri
Re: [PATCH v2 1/8] clk: ti: add gpio controlled clock
Quoted 11 lines · Jyri Sarha
Quoted 10 lines · Mark Rutland
Quoted 4 lines · Jyri Sarha
The added ti,gpio-clock is a basic clock that can be enabled and disabled trough a gpio output. The DT binding document for the clock is also added. For
EPROBE_DEFERhandling the registering of the clock has to be delayed untilof_clk_get()call time.I guess this is basically an AND gate with the GPIO and parent clock as inputs? Or is this something more complex that we might want to do more things with later?
Quoted 7 lines
Quoted 3 lines
If it's the former it sounds like this could be a completely generic "gpio-gate-clock".
Yes, its completely generic. However, since there has been no response to my several earlier attempts to get this patch in I finally gave up and moved it under clk/ti.
Ah. Apolgoies for that having happened.
Quoted 4 lines
"gpio-gate-clock" sound like more accurate name for ti. I'll change that.
Do you think I should give this one more try to get it in as generic basic clock?
I'd certainly be happy with a generic gpio-gate-clock.
Mike, thoughts?
Thanks,
Mark.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 2/8 drm/tilcdc: Add I2S HDMI audio config for tda998x
The configuration is needed for HDMI audio. The "swap" and "mirr" parameters have to be correctly set in the configuration in order to have proper colors in the HDMI picture.
--- drivers/gpu/drm/tilcdc/tilcdc_slave.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
drivers/gpu/drm/tilcdc/tilcdc_slave.c +23 -1
@@ -19,6 +19,7 @@#include <linux/pinctrl/pinmux.h> #include <linux/pinctrl/consumer.h> #include <drm/drm_encoder_slave.h> +#include <drm/i2c/tda998x.h> #include "tilcdc_drv.h"
@@ -111,8 +112,29 @@ static const struct drm_encoder_helper_funcs slave_encoder_helper_funcs = { .restore = drm_i2c_encoder_restore, }; +static struct tda998x_encoder_params tda998x_pdata = { + .swap_b =0x3 , + .mirr_b =0x0 , + .swap_a =0x2 , + .mirr_a =0x0 , + .swap_d =0x1 , + .mirr_d =0x0 , + .swap_c =0x0 , + .mirr_c =0x0 , + .swap_f =0x5 , + .mirr_f =0x0 , + .swap_e =0x4 , + .mirr_e =0x0 , + .audio_cfg =0x3 ,/* I2S mode */ + .audio_clk_cfg =1 ,/* select clock pin */ + .audio_frame[1 ] =1 ,/* channels - 1 */ + .audio_format =AFMT_I2S , + .audio_sample_rate =48000 , +}; +static const struct i2c_board_info info = { -I2C_BOARD_INFO ("tda998x" ,0x70 ) +I2C_BOARD_INFO ("tda998x" ,0x70 ), + .platform_data = &tda998x_pdata, }; static struct drm_encoder *slave_encoder_create(struct drm_device *dev,
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 3/8 ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus
In reply to Jyri SarhaAdd machine driver support for BeagleBone-Black HDMI audio. BBB has NXP TDA998X HDMI transmitter connected to McASP port in I2S mode. The 44100 Hz sample-rate and it's multiples can not be accurately produced on BBB. The only supported sample format is SNDRV_PCM_FORMAT_S32_LE. The 8 least significant bits are ignored.
--- .../bindings/sound/davinci-evm-audio.txt | 4 +- sound/soc/davinci/davinci-evm.c | 82 +++++++++++++++++++- 2 files changed, 83 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt +3 -1
@@ -1,7 +1,9 @@ * Texas Instruments SoC audio setups with TLV320AIC3X Codec Required properties: -- compatible : "ti,da830-evm-audio" : forDM365/DA8xx/OMAPL1x/AM33xx +- compatible : "ti,da830-evm-audio" : for DM365/DA8xx/OMAPL1x/AM33xx + "ti,am335x-beaglebone-black-audio" : for Beaglebone-black HDMI + audio - ti,model : The user-visible name of this sound complex. - ti,audio-codec : The phandle of the TLV320AIC3x audio codec - ti,mcasp-controller : The phandle of the McASP controller
sound/soc/davinci/davinci-evm.c +80 -2
121 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Re: [PATCH v2 3/8] ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus
Quoted 17 lines · Jyri Sarha
Add machine driver support for BeagleBone-Black HDMI audio. BBB has NXP TDA998X HDMI transmitter connected to McASP port in I2S mode. The 44100 Hz sample-rate and it's multiples can not be accurately produced on BBB. The only supported sample format is
SNDRV_PCM_FORMAT_S32_LE. The 8 least significant bits are ignored.Signed-off-by Jyri Sarha <[email protected]>--- .../bindings/sound/davinci-evm-audio.txt | 4 +- sound/soc/davinci/davinci-evm.c | 82 +++++++++++++++++++- 2 files changed, 83 insertions(+), 3 deletions(-)Documentation/devicetree/bindings/sound/davinci-evm-audio.txt +0
-0
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt line 6
Quoted 7 lines
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt +3
-1@@ -1,7 +1,9 @@ * Texas Instruments SoC audio setups with TLV320AIC3X Codec Required properties: -- compatible : "ti,da830-evm-audio" : forDM365/DA8xx/OMAPL1x/AM33xx +- compatible : "ti,da830-evm-audio" : for DM365/DA8xx/OMAPL1x/AM33xx + "ti,am335x-beaglebone-black-audio" : for Beaglebone-black HDMI + audio
To keep this legible I'd recommend reorganising this like:
- compatible: should contain one of:
* "ti,da830-evm-audio" for DM365/DA8xx/OMAPL1x/AM33xx
* "ti,am335x-beaglebone-black-audio" for Beaglebone-black HDMI audio
For the BBB case, do you expect both strings or just the BBB-specific string?
Is the 'x' in the BBB string a wildcard? If we know the particular number for BBB we should use that.
Cheers,
Mark.
Re: [PATCH v2 3/8] ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus
Quoted 28 lines · Mark Rutland
Quoted 17 lines · Jyri Sarha
Add machine driver support for BeagleBone-Black HDMI audio. BBB has NXP TDA998X HDMI transmitter connected to McASP port in I2S mode. The 44100 Hz sample-rate and it's multiples can not be accurately produced on BBB. The only supported sample format is
SNDRV_PCM_FORMAT_S32_LE. The 8 least significant bits are ignored.Signed-off-by Jyri Sarha <[email protected]>--- .../bindings/sound/davinci-evm-audio.txt | 4 +- sound/soc/davinci/davinci-evm.c | 82 +++++++++++++++++++- 2 files changed, 83 insertions(+), 3 deletions(-)Documentation/devicetree/bindings/sound/davinci-evm-audio.txt +0
-0Documentation/devicetree/bindings/sound/davinci-evm-audio.txt line 6
Quoted 7 lines
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt +3
-1@@ -1,7 +1,9 @@ * Texas Instruments SoC audio setups with TLV320AIC3X Codec Required properties: -- compatible : "ti,da830-evm-audio" : forDM365/DA8xx/OMAPL1x/AM33xx +- compatible : "ti,da830-evm-audio" : for DM365/DA8xx/OMAPL1x/AM33xx + "ti,am335x-beaglebone-black-audio" : for Beaglebone-black HDMI + audioTo keep this legible I'd recommend reorganising this like:
Quoted 4 lines
- compatible: should contain one of:
* "ti,da830-evm-audio" for DM365/DA8xx/OMAPL1x/AM33xx
* "ti,am335x-beaglebone-black-audio" for Beaglebone-black HDMI audio
The above looks indeed better. I'll make the change. Oh, and I probably should change the first line to something like:
* TI SoC audio using McASP to connect to TLV320AIC3X or HDMI endcoder
Quoted 3 lines
For the BBB case, do you expect both strings or just the BBB-specific string?
Normally just the one. In theory a BBB with an audio-cape on top could utilize another sound node with "ti,da830-evm-audio" compatible property.
Quoted 3 lines
Is the 'x' in the BBB string a wildcard? If we know the particular number for BBB we should use that.
Yes, its a wild card. BBBs have been made at least with AM3358 and AM3359 SoCs.
Thanks,
Jyri
Re: [PATCH v2 3/8] ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus
Quoted 37 lines · Jyri Sarha
Quoted 28 lines · Mark Rutland
Quoted 17 lines · Jyri Sarha
Add machine driver support for BeagleBone-Black HDMI audio. BBB has NXP TDA998X HDMI transmitter connected to McASP port in I2S mode. The 44100 Hz sample-rate and it's multiples can not be accurately produced on BBB. The only supported sample format is
SNDRV_PCM_FORMAT_S32_LE. The 8 least significant bits are ignored.Signed-off-by Jyri Sarha <[email protected]>--- .../bindings/sound/davinci-evm-audio.txt | 4 +- sound/soc/davinci/davinci-evm.c | 82 +++++++++++++++++++- 2 files changed, 83 insertions(+), 3 deletions(-)Documentation/devicetree/bindings/sound/davinci-evm-audio.txt +0
-0Documentation/devicetree/bindings/sound/davinci-evm-audio.txt line 6
Quoted 7 lines
Documentation/devicetree/bindings/sound/davinci-evm-audio.txt +3
-1@@ -1,7 +1,9 @@ * Texas Instruments SoC audio setups with TLV320AIC3X Codec Required properties: -- compatible : "ti,da830-evm-audio" : forDM365/DA8xx/OMAPL1x/AM33xx +- compatible : "ti,da830-evm-audio" : for DM365/DA8xx/OMAPL1x/AM33xx + "ti,am335x-beaglebone-black-audio" : for Beaglebone-black HDMI + audioTo keep this legible I'd recommend reorganising this like:
Quoted 4 lines
- compatible: should contain one of:
* "ti,da830-evm-audio" for DM365/DA8xx/OMAPL1x/AM33xx
* "ti,am335x-beaglebone-black-audio" for Beaglebone-black HDMI audioThe above looks indeed better. I'll make the change. Oh, and I probably should change the first line to something like:
Quoted 8 lines
* TI SoC audio using McASP to connect to TLV320AIC3X or HDMI endcoder
Quoted 3 lines
For the BBB case, do you expect both strings or just the BBB-specific string?
Normally just the one. In theory a BBB with an audio-cape on top could utilize another sound node with "ti,da830-evm-audio" compatible property.
Sorry, I meant in the same node. I take it we never expect:
compatible = "ti,am335x-beaglebone-black-audio", "ti,da830-evm-audio";
Quoted 6 lines
Quoted 3 lines
Is the 'x' in the BBB string a wildcard? If we know the particular number for BBB we should use that.
Yes, its a wild card. BBBs have been made at least with AM3358 and AM3359 SoCs.
In general we've pushed back against wildcard strings, and used the first implementation for the naming. We should be able to use "ti,am3358-beaglebone-black-audio" for AM335{8,9} assuming the block is the same? Otherwise we might need separate strings anyway.
Thanks,
Mark.
Re: [PATCH v2 3/8] ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus
On 08/20/2014 03:34 PM, Mark Rutland wrote:
...
Quoted 4 lines
Sorry, I meant in the same node. I take it we never expect:
compatible = "ti,am335x-beaglebone-black-audio", "ti,da830-evm-audio";
No never like that.
Quoted 10 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Is the 'x' in the BBB string a wildcard? If we know the particular number for BBB we should use that.
Yes, its a wild card. BBBs have been made at least with AM3358 and AM3359 SoCs.
In general we've pushed back against wildcard strings, and used the first implementation for the naming. We should be able to use "ti,am3358-beaglebone-black-audio" for AM335{8,9} assuming the block is the same? Otherwise we might need separate strings anyway.
At least the relevant block (McASP) is the same. AM335x is commonly used in all TI documentation, but I am not picky am3358 is fine with me.
Could we drop the SoC id completely and make it just "beaglebone-black-audio"?
The board design is the unique factor here, not the SoC. McASP block can be found from several TI SoCs.
Cheers,
Jyri
Mark Brown
maintainerRe: [PATCH v2 3/8] ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus
Quoted 5 lines · Jyri Sarha
Could we drop the SoC id completely and make it just "beaglebone-black-audio"?
The board design is the unique factor here, not the SoC. McASP block can be found from several TI SoCs.
That's a lot more sensible, yes.
PATCH v2 4/8 ASoC: davinci: HDMI audio build for AM33XX and TDA998x
In reply to Jyri SarhaAdds configuration option for HDMI audio support for AM33XX based boards with NXP TDA998x HDMI transmitter. The audio is connected to NXP TDA998x trough McASP running in i2s mode.
--- sound/soc/davinci/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+)
sound/soc/davinci/Kconfig +12 -0
@@ -43,6 +43,18 @@ config SND_AM33XX_SOC_EVM AM335X-EVMSK, and BeagelBone with AudioCape boards have this setup. +config SND_AM335X_SOC_NXPTDA_EVM + tristate "HDMI Audio for the AM33XX chip based boards with TDA998x" + depends on SND_EDMA_SOC && SOC_AM33XX && DRM_I2C_NXP_TDA998X + select SND_SOC_HDMI_CODEC + select SND_DAVINCI_SOC_MCASP + select SND_DAVINCI_SOC_GENERIC_EVM + help + Say Y or M if you want to add support for HDMI SoC audio on + AM33XX boards with NXP TDA998x HDMI transmitter. For example + BeagleBoneBack. The audio is connected to NXP TDA998x trough + McASP running in i2s mode. + config SND_DAVINCI_SOC_EVM tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM" depends on SND_DAVINCI_SOC && I2C
Signature · 1 line
1.7.9.5
PATCH v2 5/8 ARM: dts: am33xx: Add external clock provider
In reply to Jyri SarhaAdd external clock provider for am33xx devices.
--- arch/arm/boot/dts/am33xx.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +10 -0
@@ -92,6 +92,16 @@ pinctrl-single,function-mask = <0x7f>; }; + ext_clocks { + compatible = "ti,external-clocks"; + + ext_clocks: clocks { + }; + + ext_clockdomains: clockdomains { + }; + }; + /* * XXX: Use a flat representation of the AM33XX interconnect. * The real AM33XX interconnect network is quite complex. Since
Signature · 1 line
1.7.9.5
Tony Lindgren
maintainerRe: [PATCH v2 5/8] ARM: dts: am33xx: Add external clock provider
Quoted 1 line · Jyri Sarha
Add external clock provider for am33xx devices.
Please send all the .dts and defconfig changes separately so I can pick them up and we don't get pointless merge conflicts.
Regards,
TOny
Quoted 29 lines
Signed-off-by Jyri Sarha <[email protected]>--- arch/arm/boot/dts/am33xx.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm/boot/dts/am33xx.dtsi +10
-0@@ -92,6 +92,16 @@ pinctrl-single,function-mask = <0x7f>; }; + ext_clocks { + compatible = "ti,external-clocks"; + + ext_clocks: clocks { + }; + + ext_clockdomains: clockdomains { + }; + }; + /* * XXX: Use a flat representation of the AM33XX interconnect. * The real AM33XX interconnect network is quite complex. SinceSignature · 1 line
1.7.9.5
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH v2 5/8] ARM: dts: am33xx: Add external clock provider
Quoted 6 lines · Tony Lindgren
Quoted 1 line · Jyri Sarha
Add external clock provider for am33xx devices.
Please send all the .dts and defconfig changes separately so I can pick them up and we don't get pointless merge conflicts.
Moreover, this patch is obsolete now, given I have posted this:
http://www.spinics.net/lists/arm-kernel/msg355992.html
There will be v2 of my patch coming in though this week, but the functionality will be the same.
-Tero
Quoted 18 lines
Regards,
TOny
Quoted 13 lines
Signed-off-by Jyri Sarha <[email protected]>--- arch/arm/boot/dts/am33xx.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm/boot/dts/am33xx.dtsi +0
-0@@ -92,6 +92,16 @@ pinctrl-single,function-mask = <0x7f>; };
Quoted 16 lines
Quoted 14 lines
arch/arm/boot/dts/am33xx.dtsi +10
-1+ ext_clocks { + compatible = "ti,external-clocks"; + + ext_clocks: clocks { + }; + + ext_clockdomains: clockdomains { + }; + }; + /* * XXX: Use a flat representation of the AM33XX interconnect. * The real AM33XX interconnect network is quite complex. Since --Quoted 2 lines
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 6/8 ARM: dts: am335x-boneblack: Add HDMI audio support
In reply to Jyri SarhaAdds mcasp0_pins, clk_mcasp0_fixed, clk_mcasp0, mcasp0, hdmi_audio, and sound nodes.
--- arch/arm/boot/dts/am335x-boneblack.dts | 54 ++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+)
arch/arm/boot/dts/am335x-boneblack.dts +54 -0
@@ -59,12 +59,50 @@ 0x1b0 0x03 /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */ >; }; + + mcasp0_pins: mcasp0_pins { + pinctrl-single,pins = < + 0x1ac (PIN_INPUT_PULLUP | MUX_MODE0) /* mcasp0_ahclkx.mcasp0_ahclkx */ + 0x19c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2 */ + 0x194 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */ + 0x190 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */ + 0x06c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */ + >; + }; }; &lcdc { status = "okay"; }; +&mcasp0 { + pinctrl-names = "default"; + pinctrl-0 = <&mcasp0_pins>; + status = "okay"; + op-mode = <0>; /* MCASP_IIS_MODE */ + tdm-slots = <2>; + serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ + 0 0 1 0 + >; + tx-num-evt = <1>; + rx-num-evt = <1>; +}; + +&ext_clocks { + clk_mcasp0_fixed: clk_mcasp0_fixed { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24576000>; + }; + + clk_mcasp0: clk_mcasp0 { + #clock-cells = <0>; + compatible = "ti,gpio-clock"; + clocks = <&clk_mcasp0_fixed>; + enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */ + }; +}; + / { hdmi { compatible = "ti,tilcdc,slave";
@@ -74,4 +112,20 @@ pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>; status = "okay"; }; + + hdmi_audio: hdmi_audio@0 { + compatible = "linux,hdmi-audio"; + status = "okay"; + }; + + sound { + compatible = "ti,am335x-beaglebone-black-audio"; + ti,model = "TI BeagleBone Black"; + ti,audio-codec = <&hdmi_audio>; + ti,mcasp-controller = <&mcasp0>; + ti,audio-routing = + "HDMI Out", "TX"; + clocks = <&clk_mcasp0>; + clock-names = "mclk"; + }; };
Signature · 1 line
1.7.9.5
PATCH v2 7/8 ARM: OMAP2+: omap2plus_defconfig: TDA998X HDMI trough tilcdc,slave
In reply to Jyri SarhaSelect CONFIG_DRM=m, CONFIG_DRM_I2C_NXP_TDA998X=m, and CONFIG_DRM_TILCDC=m, for Beaglebone-Black HDMI video support.
--- arch/arm/configs/omap2plus_defconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/configs/omap2plus_defconfig +3 -0
@@ -193,6 +193,9 @@ CONFIG_REGULATOR_TPS65218=y CONFIG_REGULATOR_TPS65910=y CONFIG_REGULATOR_TWL4030=y CONFIG_REGULATOR_PBIAS=y +CONFIG_DRM=m +CONFIG_DRM_I2C_NXP_TDA998X=m +CONFIG_DRM_TILCDC=m CONFIG_FB=y CONFIG_FIRMWARE_EDID=y CONFIG_FB_MODE_HELPERS=y
Signature · 1 line
1.7.9.5
PATCH v2 8/8 ARM: OMAP2+: omap2plus_defconfig: Enable BeagleBone Black HDMI audio support
In reply to Jyri SarhaSelect CONFIG_SND_EDMA_SOC=m and CONFIG_SND_AM335X_SOC_NXPTDA_EVM=m for BBB HDMI audio.
--- arch/arm/configs/omap2plus_defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/configs/omap2plus_defconfig +2 -0
@@ -224,7 +224,9 @@ CONFIG_SND_DEBUG=y CONFIG_SND_USB_AUDIO=m CONFIG_SND_SOC=m CONFIG_SND_OMAP_SOC=m +CONFIG_SND_EDMA_SOC=m CONFIG_SND_AM33XX_SOC_EVM=m +CONFIG_SND_AM335X_SOC_NXPTDA_EVM=m CONFIG_SND_DAVINCI_SOC=m CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
Signature · 1 line
1.7.9.5