Devicetree
 help / color / mirror / Atom feed
From: Wadim Egorov <w.egorov@phytec.de>
To: Garrett Giordano <ggiordano@phytec.com>, <nm@ti.com>,
	<vigneshr@ti.com>, <kristo@kernel.org>, <robh@kernel.org>,
	<krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<upstream@lists.phytec.de>
Subject: Re: [PATCH] arm64: dts: ti: k3-am625-phyboard-lyra-rdk: Add Audio Codec
Date: Tue, 9 Apr 2024 19:10:44 +0200	[thread overview]
Message-ID: <264325a7-015f-4ed4-b027-fb5013e4b6e9@phytec.de> (raw)
In-Reply-To: <20240404184250.3772829-1-ggiordano@phytec.com>



Am 04.04.24 um 20:42 schrieb Garrett Giordano:
> The Audio Codec runs over the MCASP (Multichannel Audio Serial Port).
> 
> Add pinmux for the Audio Reference Clock and MCASP2.
> 
> Add DT nodes for Audio Codec, MCASP2, VCC 1v8 and VCC 3v3 regulators.
> 
> Additionally, create a sound node that connects our sound card and the
> MCASP2.
> 
> Signed-off-by: Garrett Giordano <ggiordano@phytec.com>


Reviewed-by: Wadim Egorov <w.egorov@phytec.de>


> ---
>   .../dts/ti/k3-am625-phyboard-lyra-rdk.dts     | 99 +++++++++++++++++++
>   1 file changed, 99 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am625-phyboard-lyra-rdk.dts b/arch/arm64/boot/dts/ti/k3-am625-phyboard-lyra-rdk.dts
> index a83a90497857..dfc78995d30a 100644
> --- a/arch/arm64/boot/dts/ti/k3-am625-phyboard-lyra-rdk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am625-phyboard-lyra-rdk.dts
> @@ -66,6 +66,35 @@ key-menu {
>   		};
>   	};
>   
> +	sound {
> +		compatible = "simple-audio-card";
> +		simple-audio-card,name = "phyBOARD-Lyra";
> +		simple-audio-card,widgets =
> +			"Microphone",           "Mic Jack",
> +			"Headphone",            "Headphone Jack",
> +			"Speaker",              "External Speaker";
> +		simple-audio-card,routing =
> +			"MIC3R",                "Mic Jack",
> +			"Mic Jack",             "Mic Bias",
> +			"Headphone Jack",       "HPLOUT",
> +			"Headphone Jack",       "HPROUT",
> +			"External Speaker",     "SPOP",
> +			"External Speaker",     "SPOM";
> +		simple-audio-card,format = "dsp_b";
> +		simple-audio-card,bitclock-master = <&sound_master>;
> +		simple-audio-card,frame-master = <&sound_master>;
> +		simple-audio-card,bitclock-inversion;
> +
> +		simple-audio-card,cpu {
> +			sound-dai = <&mcasp2>;
> +		};
> +
> +		sound_master: simple-audio-card,codec {
> +				sound-dai = <&audio_codec>;
> +				clocks = <&audio_refclk1>;
> +		};
> +	};
> +
>   	leds {
>   		compatible = "gpio-leds";
>   		pinctrl-names = "default";
> @@ -82,6 +111,15 @@ led-2 {
>   		};
>   	};
>   
> +	vcc_1v8: regulator-vcc-1v8 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "VCC_1V8";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
> +
>   	vcc_3v3_mmc: regulator-vcc-3v3-mmc {
>   		compatible = "regulator-fixed";
>   		regulator-name = "VCC_3V3_MMC";
> @@ -90,9 +128,24 @@ vcc_3v3_mmc: regulator-vcc-3v3-mmc {
>   		regulator-always-on;
>   		regulator-boot-on;
>   	};
> +
> +	vcc_3v3_sw: regulator-vcc-3v3-sw {
> +		compatible = "regulator-fixed";
> +		regulator-name = "VCC_3V3_SW";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
>   };
>   
>   &main_pmx0 {
> +	audio_ext_refclk1_pins_default: audio-ext-refclk1-default-pins {
> +		pinctrl-single,pins = <
> +			AM62X_IOPAD(0x0a0, PIN_OUTPUT, 1) /* (K25) GPMC0_WPn.AUDIO_EXT_REFCLK1 */
> +		>;
> +	};
> +
>   	gpio_keys_pins_default: gpio-keys-default-pins {
>   		pinctrl-single,pins = <
>   			AM62X_IOPAD(0x1d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */
> @@ -150,6 +203,15 @@ AM62X_IOPAD(0x1d8, PIN_OUTPUT, 0) /* (C15) MCAN0_TX */
>   		>;
>   	};
>   
> +	main_mcasp2_pins_default: main-mcasp2-default-pins {
> +		pinctrl-single,pins = <
> +			AM62X_IOPAD(0x070, PIN_INPUT, 3) /* (T24) GPMC0_AD13.MCASP2_ACLKX */
> +			AM62X_IOPAD(0x06c, PIN_INPUT, 3) /* (T22) GPMC0_AD12.MCASP2_AFSX */
> +			AM62X_IOPAD(0x064, PIN_OUTPUT, 3) /* (T25) GPMC0_AD10.MCASP2_AXR2 */
> +			AM62X_IOPAD(0x068, PIN_INPUT, 3) /* (R21) GPMC0_AD11.MCASP2_AXR3 */
> +		>;
> +	};
> +
>   	main_mmc1_pins_default: main-mmc1-default-pins {
>   		pinctrl-single,pins = <
>   			AM62X_IOPAD(0x23c, PIN_INPUT_PULLUP, 0) /* (A21) MMC1_CMD */
> @@ -254,6 +316,21 @@ &main_i2c1 {
>   	clock-frequency = <100000>;
>   	status = "okay";
>   
> +	audio_codec: audio-codec@18 {
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&audio_ext_refclk1_pins_default>;
> +
> +		#sound-dai-cells = <0>;
> +		compatible = "ti,tlv320aic3007";
> +		reg = <0x18>;
> +		ai3x-micbias-vg = <2>;
> +
> +		AVDD-supply = <&vcc_3v3_sw>;
> +		IOVDD-supply = <&vcc_3v3_sw>;
> +		DRVDD-supply = <&vcc_3v3_sw>;
> +		DVDD-supply = <&vcc_1v8>;
> +	};
> +
>   	gpio_exp: gpio-expander@21 {
>   		pinctrl-names = "default";
>   		pinctrl-0 = <&gpio_exp_int_pins_default>;
> @@ -329,6 +406,28 @@ &main_uart1 {
>   	status = "okay";
>   };
>   
> +&mcasp2 {
> +	status = "okay";
> +	#sound-dai-cells = <0>;
> +
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&main_mcasp2_pins_default>;
> +
> +	/* MCASP_IIS_MODE */
> +	op-mode = <0>;
> +	tdm-slots = <2>;
> +
> +	/* 0: INACTIVE, 1: TX, 2: RX */
> +	serial-dir = <
> +			0 0 1 2
> +			0 0 0 0
> +			0 0 0 0
> +			0 0 0 0
> +	>;
> +	tx-num-evt = <32>;
> +	rx-num-evt = <32>;
> +};
> +
>   &sdhci1 {
>   	vmmc-supply = <&vcc_3v3_mmc>;
>   	vqmmc-supply = <&vddshv5_sdio>;

  reply	other threads:[~2024-04-09 17:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 18:42 [PATCH] arm64: dts: ti: k3-am625-phyboard-lyra-rdk: Add Audio Codec Garrett Giordano
2024-04-09 17:10 ` Wadim Egorov [this message]
2024-04-26 22:38 ` Nishanth Menon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=264325a7-015f-4ed4-b027-fb5013e4b6e9@phytec.de \
    --to=w.egorov@phytec.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ggiordano@phytec.com \
    --cc=kristo@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robh@kernel.org \
    --cc=upstream@lists.phytec.de \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox