diff mbox

[RFC] ARM/dts: am335x-boneblack: Add HDMI audio support

Message ID 18d71a32fb46d34197fd2e0ec5dc8ebc36371704.1384863282.git.jsarha@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jyri Sarha Nov. 19, 2013, 12:21 p.m. UTC
Adds mcasp0_pins, clk_mcasp0_fixed, clk_mcasp0, mcasp0, hdmi_audio,
and sound nodes.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 arch/arm/boot/dts/am335x-boneblack.dts |   52 ++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

Comments

Benoit Cousson Nov. 19, 2013, 1:02 p.m. UTC | #1
Hi Jyri,

A side question related to audio cape support on BBB. In the "official" 
3.8.13 CircuitCo version the HDMI audio support was breaking the 
audio-cape support due to some bad hacks in the mcasp driver.

Is this still the case with you series?

Thanks,
Benoit


On 19/11/2013 13:21, Jyri Sarha wrote:
> Adds mcasp0_pins, clk_mcasp0_fixed, clk_mcasp0, mcasp0, hdmi_audio,
> and sound nodes.
>
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
>   arch/arm/boot/dts/am335x-boneblack.dts |   52 ++++++++++++++++++++++++++++++++
>   1 file changed, 52 insertions(+)
>
> diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
> index 6b71ad9..b5a2404 100644
> --- a/arch/arm/boot/dts/am335x-boneblack.dts
> +++ b/arch/arm/boot/dts/am335x-boneblack.dts
> @@ -60,12 +60,35 @@
>   			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_PULLUP | 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>;
> +};
> +
>   / {
>   	hdmi {
>   		compatible = "ti,tilcdc,slave";
> @@ -75,4 +98,33 @@
>   		pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
>   		status = "okay";
>   	};
> +
> +	clk_mcasp0_fixed: clk_mcasp0_fixed {
> +		#clock-cells = <0>;
> +		compatible = "fixed-clock";
> +		clock-frequency = <24576000>;
> +	};
> +
> +	clk_mcasp0: clk_mcasp0 {
> +		#clock-cells = <0>;
> +		compatible = "gpio-clock";
> +		clocks = <&clk_mcasp0_fixed>;
> +		enable-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>; /* BeagleBone Black Clk enable on GPIO1_27 */
> +	};
> +
> +	hdmi_audio: hdmi_audio@0 {
> +	       compatible = "linux,hdmi-audio";
> +	       status = "okay";
> +	};
> +
> +	sound {
> +		compatible = "ti,am33xx-beaglebone-black";
> +		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 = "ti,codec-clock";
> +	};
>   };
>
Jyri Sarha Nov. 19, 2013, 1:29 p.m. UTC | #2
On 11/19/2013 03:02 PM, Benoit Cousson wrote:
> A side question related to audio cape support on BBB. In the "official"
> 3.8.13 CircuitCo version the HDMI audio support was breaking the
> audio-cape support due to some bad hacks in the mcasp driver.
>
> Is this still the case with you series?

My patches do not touch davinci-mcasp at all and the davinci-evm changes 
should be backwards compatible. So if the audio-cape was working before 
my patches should not break it.

Best regards,
Jyri
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
index 6b71ad9..b5a2404 100644
--- a/arch/arm/boot/dts/am335x-boneblack.dts
+++ b/arch/arm/boot/dts/am335x-boneblack.dts
@@ -60,12 +60,35 @@ 
 			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_PULLUP | 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>;
+};
+
 / {
 	hdmi {
 		compatible = "ti,tilcdc,slave";
@@ -75,4 +98,33 @@ 
 		pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
 		status = "okay";
 	};
+
+	clk_mcasp0_fixed: clk_mcasp0_fixed {
+		#clock-cells = <0>;
+		compatible = "fixed-clock";
+		clock-frequency = <24576000>;
+	};
+
+	clk_mcasp0: clk_mcasp0 {
+		#clock-cells = <0>;
+		compatible = "gpio-clock";
+		clocks = <&clk_mcasp0_fixed>;
+		enable-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>; /* BeagleBone Black Clk enable on GPIO1_27 */
+	};
+
+	hdmi_audio: hdmi_audio@0 {
+	       compatible = "linux,hdmi-audio";
+	       status = "okay";
+	};
+
+	sound {
+		compatible = "ti,am33xx-beaglebone-black";
+		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 = "ti,codec-clock";
+	};
 };