From 42622281a7f6ffa17efe2283c52efc5fab1ff75e Mon Sep 17 00:00:00 2001 From: Asha Talambedu Date: Fri, 28 May 2021 13:20:39 +0530 Subject: [PATCH] common: overlay: ReSpeaker 4Mic Linear Array support Added common overlay for supporting ReSpeaker 4Mic Linear Array on jetson platforms Bug 200679216 Change-Id: Ia19d54347252befe77d4315a66fb76941495c1fa Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2536284 (cherry picked from commit 467507c8cb0de0b91ff28a97b9f18f3daf6230a5) Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2547865 Reviewed-by: svcacv Reviewed-by: Asha Talambedu Reviewed-by: Sameer Pujar Reviewed-by: Sharad Gupta Reviewed-by: mobile promotions Tested-by: Asha Talambedu Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- overlay/jetson-respeaker-4-mic-lin-array.dtsi | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 overlay/jetson-respeaker-4-mic-lin-array.dtsi diff --git a/overlay/jetson-respeaker-4-mic-lin-array.dtsi b/overlay/jetson-respeaker-4-mic-lin-array.dtsi new file mode 100644 index 0000000..b19921d --- /dev/null +++ b/overlay/jetson-respeaker-4-mic-lin-array.dtsi @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * Jetson Device-tree overlay for ReSpeaker 4 Mic Linear Array. + */ + +#include + +/ { + overlay-name = "ReSpeaker 4 Mic Linear Array"; + jetson-header-name = "Jetson 40pin Header"; + compatible = JETSON_COMPATIBLE; + + fragment@0 { + target = <&hdr40_i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + ac108_a: ac108@35{ + compatible = "x-power,ac108_0"; + reg = <0x35>; + #sound-dai-cells = <0>; + data-protocol = <0>; + status = "okay"; + }; + }; + }; + + fragment@1 { + target = <&tegra_sound>; + __overlay__ { + nvidia-audio-card,widgets = + "Microphone", "H40-AC Mic"; + nvidia-audio-card,routing = + "H40-AC MIC1N", "H40-AC Mic", + "H40-AC MIC1P", "H40-AC Mic", + "H40-AC MIC2N", "H40-AC Mic", + "H40-AC MIC2P", "H40-AC Mic", + "H40-AC MIC3N", "H40-AC Mic", + "H40-AC MIC3P", "H40-AC Mic", + "H40-AC MIC4N", "H40-AC Mic", + "H40-AC MIC4P", "H40-AC Mic", + "H40-AC Capture", "H40-AC Mic"; + }; + }; + + fragment@2 { + target = <&hdr40_snd_link_i2s>; + __overlay__ { + link-name = "respeaker-4-mic-array"; + format = "dsp_a"; + fsync-width = <0>; + bitclock-master; + frame-master; + codec { + sound-dai = <&ac108_a>; + prefix = "H40-AC"; + }; + }; + }; + + fragment@3 { + target = <&pinmux>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&jetson_io_pinmux>; + + jetson_io_pinmux: exp-header-pinmux { + hdr40-pin12 { + nvidia,pins = HDR40_PIN12; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + + hdr40-pin35 { + nvidia,pins = HDR40_PIN35; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + + hdr40-pin38 { + nvidia,pins = HDR40_PIN38; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + }; + }; + }; +};