From 020a01a6208f5b0613fd8094d446a25e6f0890bb Mon Sep 17 00:00:00 2001 From: Jonathan Hunter Date: Wed, 11 Sep 2019 14:46:01 +0100 Subject: [PATCH 01/15] common: overlay: Add common overlay for Jetson Add the following device-tree overlay templates for the Jetson platforms. 1. ADAFRUIT SPH0645LM4H (I2S MEMS Microphone) 2. FE-PI Audio Z V2 (SGTL5000 Audio Codec) Note that these templates cannot be compiled as-is because they include definitions that are defined in the corresponding 'dt-bindings/platform/jetson/.h'. Therefore, to use these templates they need to be compiled along with the appropriate include file. These have been created to avoid duplicating nodes that are common to all Jetson platforms for using these add-on modules. Bug 2414131 Change-Id: I60b29bb72fdd206786fd76cd1676ed6d6f3c9f1b Signed-off-by: Jonathan Hunter Reviewed-on: https://git-master.nvidia.com/r/2202471 (cherry picked from commit 3ca13ed86364fe2b606e470870ffa778f36a03c9) Reviewed-on: https://git-master.nvidia.com/r/2217432 GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu Tested-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions --- overlay/jetson-adafruit-sph0645lm4h.dtsi | 49 ++++++++++ overlay/jetson-fe-pi-audio-z-v2.dts | 110 +++++++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 overlay/jetson-adafruit-sph0645lm4h.dtsi create mode 100644 overlay/jetson-fe-pi-audio-z-v2.dts diff --git a/overlay/jetson-adafruit-sph0645lm4h.dtsi b/overlay/jetson-adafruit-sph0645lm4h.dtsi new file mode 100644 index 0000000..ae9e832 --- /dev/null +++ b/overlay/jetson-adafruit-sph0645lm4h.dtsi @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Jetson Device-tree overlay for Adafruit I2S MEMS Microphone Breakout + * (SPH0645LM4H). + * + * Copyright (c) 2019 NVIDIA CORPORATION. All rights reserved. + * + */ + +#include + +/ { + overlay-name = "Adafruit SPH0645LM4H"; + compatible = JETSON_COMPATIBLE; + + fragment@0 { + target = <&pinmux>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&hdr40_pinmux>; + + hdr40_pinmux: header-40pin-pinmux { + pin12 { + nvidia,pins = HDR40_PIN12; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + + pin35 { + nvidia,pins = HDR40_PIN35; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + + pin38 { + nvidia,pins = HDR40_PIN38; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + }; + }; + }; +}; diff --git a/overlay/jetson-fe-pi-audio-z-v2.dts b/overlay/jetson-fe-pi-audio-z-v2.dts new file mode 100644 index 0000000..42b579f --- /dev/null +++ b/overlay/jetson-fe-pi-audio-z-v2.dts @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Jetson Device-tree overlay for FE-PI Audio Z V2. + * + * Copyright (c) 2019 NVIDIA CORPORATION. All rights reserved. + * + */ + +#include + +/ { + overlay-name = "FE-PI Audio Z V2"; + compatible = JETSON_COMPATIBLE; + + fragment@0 { + target-path = "/"; + __overlay__ { + clocks { + sgtl5000_mclk: sgtl5000_mclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <12288000>; + clock-output-names = "sgtl5000-mclk"; + status = "okay"; + }; + }; + }; + }; + + fragment@1 { + target = <&hdr40_i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + + sgtl5000: sgtl5000@0a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + clocks = <&sgtl5000_mclk>; + micbias-resistor-k-ohms = <2>; + micbias-voltage-m-volts = <3000>; + VDDA-supply = <&hdr40_vdd_3v3>; + VDDIO-supply = <&hdr40_vdd_3v3>; + status = "okay"; + }; + }; + }; + + fragment@2 { + target = <&tegra_sound>; + __overlay__ { + nvidia,audio-routing = + "x Headphone", "x HP_OUT", + "x MIC_IN", "x Mic"; + }; + }; + + fragment@3 { + target = <&hdr40_snd_link_i2s>; + __overlay__ { + link-name = "fe-pi-audio-z-v2"; + codec-dai = <&sgtl5000>; + codec-dai-name = "sgtl5000"; + bitclock-master; + frame-master; + }; + }; + + fragment@4 { + target = <&pinmux>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&hdr40_pinmux>; + + hdr40_pinmux: header-40pin-pinmux { + pin12 { + nvidia,pins = HDR40_PIN12; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + + pin35 { + nvidia,pins = HDR40_PIN35; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + + pin38 { + nvidia,pins = HDR40_PIN38; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + + pin40 { + nvidia,pins = HDR40_PIN40; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + }; + }; + }; +}; From d368a439566197339911bdad53accb4d803c2e03 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Fri, 18 Oct 2019 10:14:49 +0100 Subject: [PATCH 02/15] common: overlay: Fix audio route for FE-PI Audio Z V2 Mic The Mic Bias is not being enabled for the SGTL5000 codec on the FE-PI Audio Z V2 board which prevents audio being captured from the microphone input. Fix this by adding the a route to enable the Mic Bias when the ADC is enabled. Bug 2414131 Change-Id: Ie48ee5afd401b4a22fb29fc7f0317fe844fd7e95 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/2220929 (cherry picked from commit 2e2c25c179e5b4b9dfdad6a49310344317bf43bb) Reviewed-on: https://git-master.nvidia.com/r/2224179 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions --- overlay/jetson-fe-pi-audio-z-v2.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/overlay/jetson-fe-pi-audio-z-v2.dts b/overlay/jetson-fe-pi-audio-z-v2.dts index 42b579f..b0057b8 100644 --- a/overlay/jetson-fe-pi-audio-z-v2.dts +++ b/overlay/jetson-fe-pi-audio-z-v2.dts @@ -51,7 +51,8 @@ __overlay__ { nvidia,audio-routing = "x Headphone", "x HP_OUT", - "x MIC_IN", "x Mic"; + "x MIC_IN", "x Mic", + "x ADC", "x Mic Bias"; }; }; From b152dd458f1cb383a3c2fb581135e5eb17b1d2e8 Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Fri, 20 Sep 2019 14:00:32 +0530 Subject: [PATCH 03/15] tegra: common: move to DT based DAI links Current 'sound' node does not describe all the DAI links that Tegra sound card uses. Most of the links are statically declared in the driver code and only few codec links are exposed from the DT. As the plan is to move towards DT based binding for all DAI links, the sound node is removed from 'tegra-platforms-audio-dai-links.dtsi'. This file currently enables audio nodes of APE/AHUB and populates plugin related info for ADSP. Going ahead this file either needs to be removed or renamed for better clarity with naming of files. Though it is present in common path, it is used on Tegra194 platforms only. As part of the new approach following dtsi files are proposed. * tegra210-audio-dai-links.dtsi : This includes all the DAI links needed for Tegra210 based platforms. * tegra186-audio-dai-links.dtsi : This includes all the DAI links needed for Tegra186 based platforms. Since AHUB architecture of Tegra194 is similar to Tegra186, platforms based on Tegra194 can use the same dtsi file. This patch also updates audio routing property name to be similar in style with upstream DT binding for simple card. Bug 200538260 Change-Id: If80b1de9baea572882c6ffb37d9a643d224c7088 Signed-off-by: Sameer Pujar Reviewed-on: https://git-master.nvidia.com/r/2209424 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jonathan Hunter GVS: Gerrit_Virtual_Submit Reviewed-by: Viswanath L Reviewed-by: Ravindra Lokhande Reviewed-by: mobile promotions Tested-by: mobile promotions --- overlay/jetson-fe-pi-audio-z-v2.dts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/overlay/jetson-fe-pi-audio-z-v2.dts b/overlay/jetson-fe-pi-audio-z-v2.dts index b0057b8..6f91517 100644 --- a/overlay/jetson-fe-pi-audio-z-v2.dts +++ b/overlay/jetson-fe-pi-audio-z-v2.dts @@ -41,6 +41,7 @@ micbias-voltage-m-volts = <3000>; VDDA-supply = <&hdr40_vdd_3v3>; VDDIO-supply = <&hdr40_vdd_3v3>; + #sound-dai-cells = <0>; status = "okay"; }; }; @@ -49,7 +50,7 @@ fragment@2 { target = <&tegra_sound>; __overlay__ { - nvidia,audio-routing = + nvidia-audio-card,routing = "x Headphone", "x HP_OUT", "x MIC_IN", "x Mic", "x ADC", "x Mic Bias"; @@ -60,10 +61,12 @@ target = <&hdr40_snd_link_i2s>; __overlay__ { link-name = "fe-pi-audio-z-v2"; - codec-dai = <&sgtl5000>; - codec-dai-name = "sgtl5000"; bitclock-master; frame-master; + + codec { + sound-dai = <&sgtl5000>; + }; }; }; From 2816e74b767a506e067f1c01d6db399763961cc2 Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Sat, 7 Dec 2019 16:59:23 +0530 Subject: [PATCH 04/15] common: overlay: add machine DAPM widgets Machine DAPM widgets are currently defined in the driver. Since the same driver is used on multiple platforms, all these widgets are not always used. If any platform requires additional widget, machine driver patch is required to update the DAPM widget list. This patch avoids above by moving all machine DAPM widgets to the platform DTs and the driver can just parse these. Any platform can declare required number of widgets and thus create a corresponding audio routing map. Bug 200503387 Change-Id: I62c31b67e43da850dba91607690763d61ddc39c7 Signed-off-by: Sameer Pujar Reviewed-on: https://git-master.nvidia.com/r/2257382 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Mohan Kumar D Reviewed-by: Jonathan Hunter Reviewed-by: Ravindra Lokhande Reviewed-by: mobile promotions Tested-by: mobile promotions --- overlay/jetson-fe-pi-audio-z-v2.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/overlay/jetson-fe-pi-audio-z-v2.dts b/overlay/jetson-fe-pi-audio-z-v2.dts index 6f91517..cf77bb3 100644 --- a/overlay/jetson-fe-pi-audio-z-v2.dts +++ b/overlay/jetson-fe-pi-audio-z-v2.dts @@ -50,6 +50,10 @@ fragment@2 { target = <&tegra_sound>; __overlay__ { + nvidia-audio-card,widgets = + "Headphone", "x Headphone", + "Microphone", "x Mic"; + nvidia-audio-card,routing = "x Headphone", "x HP_OUT", "x MIC_IN", "x Mic", From fa72b8e248475eb69a53b3fcdf970371987ad7f7 Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Thu, 6 Feb 2020 17:34:28 +0530 Subject: [PATCH 05/15] common: overlay: update prefix name for Fe-Pi codec Currently we are using random prefix names for widgets and mixer controls. These are not very descriptive and not consistent across platforms. For example 40-pin header has prefix "x" on TX2 and "y" on Xavier. For better readability this patch updates prefix names for above. Following guideline is proposed to have consistency in the naming: 1. Shorter prefix is preferrable, at the same time keep it meaningful. It should be noted that maximum allowed size, including prefix, for a control name is "44" characters. 2. Prefix is preferred to have an indication about the I/O it sits on and the codec it belongs to. If there are multiple instances of the codec on the same I/O, these can be differentiated by L/R or A/B/C/... or 1/2/3... suffix, whichever suits best for the board. 3. On-board codec can use combination of "CVB" and codec initials. If there are multiple instances of the codec then additionally suffix mentioned in [2] can be used. 4. Prefix for 40-pin header is used as "H40". Similarly other I/O ports can use similar syntax or specific names can be used to indicate the I/O port. One such example would be "M2.E" which is more descriptive than just "Hxx". As per above "H40-SGTL" prefix is used for Fe-Pi card. Bug 200575695 Change-Id: I667d27e2cde4416de75798e1374be1e7fb170b70 Signed-off-by: Sameer Pujar Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2290938 Reviewed-by: automaticguardword Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Asha Talambedu Reviewed-by: Mohan Kumar D Reviewed-by: Sharad Gupta Reviewed-by: Viswanath L Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- overlay/jetson-fe-pi-audio-z-v2.dts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/overlay/jetson-fe-pi-audio-z-v2.dts b/overlay/jetson-fe-pi-audio-z-v2.dts index cf77bb3..0450762 100644 --- a/overlay/jetson-fe-pi-audio-z-v2.dts +++ b/overlay/jetson-fe-pi-audio-z-v2.dts @@ -51,13 +51,13 @@ target = <&tegra_sound>; __overlay__ { nvidia-audio-card,widgets = - "Headphone", "x Headphone", - "Microphone", "x Mic"; + "Headphone", "H40-SGTL Headphone", + "Microphone", "H40-SGTL Mic"; nvidia-audio-card,routing = - "x Headphone", "x HP_OUT", - "x MIC_IN", "x Mic", - "x ADC", "x Mic Bias"; + "H40-SGTL Headphone", "H40-SGTL HP_OUT", + "H40-SGTL MIC_IN", "H40-SGTL Mic", + "H40-SGTL ADC", "H40-SGTL Mic Bias"; }; }; @@ -70,6 +70,7 @@ codec { sound-dai = <&sgtl5000>; + prefix = "H40-SGTL"; }; }; }; From 9341e77759dc8b233f52ae4081a4bdf31dc973fa Mon Sep 17 00:00:00 2001 From: Asha Talambedu Date: Mon, 24 Feb 2020 15:56:23 +0530 Subject: [PATCH 06/15] common: overlay: Add overlay for ReSpeaker 4Mic Adds the ReSpeaker 4 Mic Array device-tree overlay template for the Jetson platforms. Bug 200526593 Change-Id: I74095f0684a6322424784770a03eebc6e0b2f5ea Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2301751 (cherry picked from commit 1f358a549d0bb0f6cab46e7d6ac2ec75c1a546c8) Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2321795 Reviewed-by: automaticguardword Reviewed-by: Sameer Pujar Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Viswanath L Reviewed-by: Asha Talambedu Reviewed-by: Sharad Gupta Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: Asha Talambedu Tested-by: mobile promotions --- overlay/jetson-respeaker-4-mic-array.dtsi | 95 +++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 overlay/jetson-respeaker-4-mic-array.dtsi diff --git a/overlay/jetson-respeaker-4-mic-array.dtsi b/overlay/jetson-respeaker-4-mic-array.dtsi new file mode 100644 index 0000000..3c285b3 --- /dev/null +++ b/overlay/jetson-respeaker-4-mic-array.dtsi @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Jetson Device-tree overlay for ReSpeaker 4 Mic Array. + * + * Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved. + * + */ + +#include + +/ { + overlay-name = "ReSpeaker 4 Mic Array"; + compatible = JETSON_COMPATIBLE; + + fragment@0 { + target = <&hdr40_i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + ac108_a: ac108@3b{ + compatible = "x-power,ac108_0"; + reg = <0x3b>; + #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"; + bitclock-master; + frame-master; + codec { + sound-dai = <&ac108_a>; + prefix = "H40-AC"; + }; + }; + }; + + fragment@3 { + target = <&pinmux>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&hdr40_pinmux>; + + hdr40_pinmux: header-40pin-pinmux { + pin12 { + nvidia,pins = HDR40_PIN12; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + + pin35 { + nvidia,pins = HDR40_PIN35; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + + pin38 { + nvidia,pins = HDR40_PIN38; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + }; + }; + }; +}; From 8dd941ec2f30c44fb628eb6845e915e4f37826e4 Mon Sep 17 00:00:00 2001 From: Shubhi Garg Date: Thu, 9 Apr 2020 13:58:29 +0530 Subject: [PATCH 07/15] common: overlay: Add MCP251x overlay Adding MCP251x overlay dts file which is made common to be used on all jetson platforms. Bug 2733928 Change-Id: I3d1bf5dd2307a2039a38d1d5ae9db58a74755f88 Signed-off-by: Shubhi Garg Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2326443 (cherry picked from commit c6592f3ab2277110a4b744e605a167b7e3170cbc) Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2356320 Reviewed-by: automaticguardword Reviewed-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- overlay/jetson-mcp251x.dtsi | 96 +++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 overlay/jetson-mcp251x.dtsi diff --git a/overlay/jetson-mcp251x.dtsi b/overlay/jetson-mcp251x.dtsi new file mode 100644 index 0000000..738bb1a --- /dev/null +++ b/overlay/jetson-mcp251x.dtsi @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Jetson Device-tree overlay for MCP251x CAN Controller. + * + * Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved. + * + */ + +#include + +/ { + overlay-name = "MCP251x CAN Controller"; + compatible = JETSON_COMPATIBLE; + + fragment@0 { + target-path = "/"; + __overlay__ { + clocks { + can_clock: can_clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <20000000>; + clock-accuracy = <100>; + }; + }; + }; + }; + + fragment@1 { + target = <&hdr40_spi1>; + __overlay__ { + spi@0 { + compatible = "microchip,mcp2515"; + reg = <0x0>; + spi-max-frequency = <10000000>; + nvidia,enable-hw-based-cs; + nvidia,rx-clk-tap-delay = <0x7>; + clocks = <&can_clock>; + interrupt-parent = <&gpio>; + interrupts = ; + controller-data { + nvidia,cs-setup-clk-count = <0x1e>; + nvidia,cs-hold-clk-count = <0x1e>; + nvidia,rx-clk-tap-delay = <0x1f>; + nvidia,tx-clk-tap-delay = <0x0>; + }; + }; + }; + }; + + fragment@2 { + target = <&pinmux>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&hdr40_pinmux>; + + hdr40_pinmux: header-40pin-pinmux { + pin19 { + nvidia,pins = HDR40_PIN19; + nvidia,function = HDR40_SPI; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + pin21 { + nvidia,pins = HDR40_PIN21; + nvidia,function = HDR40_SPI; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + pin23 { + nvidia,pins = HDR40_PIN23; + nvidia,function = HDR40_SPI; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + pin24 { + nvidia,pins = HDR40_PIN24; + nvidia,function = HDR40_SPI; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + pin26 { + nvidia,pins = HDR40_PIN26; + nvidia,function = HDR40_SPI; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + }; + }; + }; +}; From 0494ee29729bee18cbaaf3c42f702698f48ac4df Mon Sep 17 00:00:00 2001 From: Ronit Halder Date: Wed, 22 Jul 2020 15:41:46 +0530 Subject: [PATCH 08/15] tegra: common: move to GPLv2 - change all dt file licenses to Nvidia, Nvidia Copyright, GPLv2 License - GPLv2 License: https://wiki.nvidia.com/nvwiki/index.php/SW_IP_Audit_Team/Licenses/GPLv2-only ESLC-5105 Change-Id: I069e525ebb521b986156495ec1c791f5a97a8b39 Signed-off-by: Ronit Halder Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2383708 Reviewed-by: automaticguardword Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Vipin Kumar Reviewed-by: mobile promotions Tested-by: mobile promotions --- overlay/jetson-adafruit-sph0645lm4h.dtsi | 20 ++++++++++++++++---- overlay/jetson-fe-pi-audio-z-v2.dts | 20 ++++++++++++++++---- overlay/jetson-mcp251x.dtsi | 20 ++++++++++++++++---- overlay/jetson-respeaker-4-mic-array.dtsi | 20 ++++++++++++++++---- 4 files changed, 64 insertions(+), 16 deletions(-) diff --git a/overlay/jetson-adafruit-sph0645lm4h.dtsi b/overlay/jetson-adafruit-sph0645lm4h.dtsi index ae9e832..9da3843 100644 --- a/overlay/jetson-adafruit-sph0645lm4h.dtsi +++ b/overlay/jetson-adafruit-sph0645lm4h.dtsi @@ -1,10 +1,22 @@ -// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2019-2020, 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 Adafruit I2S MEMS Microphone Breakout * (SPH0645LM4H). - * - * Copyright (c) 2019 NVIDIA CORPORATION. All rights reserved. - * */ #include diff --git a/overlay/jetson-fe-pi-audio-z-v2.dts b/overlay/jetson-fe-pi-audio-z-v2.dts index 0450762..7977d51 100644 --- a/overlay/jetson-fe-pi-audio-z-v2.dts +++ b/overlay/jetson-fe-pi-audio-z-v2.dts @@ -1,9 +1,21 @@ -// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2019-2020, 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 FE-PI Audio Z V2. - * - * Copyright (c) 2019 NVIDIA CORPORATION. All rights reserved. - * */ #include diff --git a/overlay/jetson-mcp251x.dtsi b/overlay/jetson-mcp251x.dtsi index 738bb1a..3923992 100644 --- a/overlay/jetson-mcp251x.dtsi +++ b/overlay/jetson-mcp251x.dtsi @@ -1,9 +1,21 @@ -// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2020, 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 MCP251x CAN Controller. - * - * Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved. - * */ #include diff --git a/overlay/jetson-respeaker-4-mic-array.dtsi b/overlay/jetson-respeaker-4-mic-array.dtsi index 3c285b3..dca61a2 100644 --- a/overlay/jetson-respeaker-4-mic-array.dtsi +++ b/overlay/jetson-respeaker-4-mic-array.dtsi @@ -1,9 +1,21 @@ -// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2020, 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 Array. - * - * Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved. - * */ #include From bbc18a5979a16fa10f4b6bcb6f4ee024d489951c Mon Sep 17 00:00:00 2001 From: Asha Talambedu Date: Fri, 3 Apr 2020 11:34:10 +0530 Subject: [PATCH 09/15] common: overlay: Rename fe-pi ovelay - Renamed overlay as FE-PI Audio V1 and Z V2 as the same overlay is applicable to both versions (V1 and Z V2) of the board - Renamed overlay file as it common across V1 and Z V2 Bug 2827043 Change-Id: I198ad1ee485a5b597fe7fae44943e721d997bf06 Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2323072 (cherry picked from commit 0ea4af124a0c99571947e2c04a30a3178c0df26e) Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2371752 Tested-by: Asha Talambedu Tested-by: mobile promotions Reviewed-by: Asha Talambedu Reviewed-by: automaticguardword Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Viswanath L Reviewed-by: Mohan Kumar D Reviewed-by: Bharat Nihalani Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- .../{jetson-fe-pi-audio-z-v2.dts => jetson-fe-pi-audio.dtsi} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename overlay/{jetson-fe-pi-audio-z-v2.dts => jetson-fe-pi-audio.dtsi} (96%) diff --git a/overlay/jetson-fe-pi-audio-z-v2.dts b/overlay/jetson-fe-pi-audio.dtsi similarity index 96% rename from overlay/jetson-fe-pi-audio-z-v2.dts rename to overlay/jetson-fe-pi-audio.dtsi index 7977d51..18ab210 100644 --- a/overlay/jetson-fe-pi-audio-z-v2.dts +++ b/overlay/jetson-fe-pi-audio.dtsi @@ -15,13 +15,13 @@ */ /* - * Jetson Device-tree overlay for FE-PI Audio Z V2. + * Jetson Device-tree overlay for FE-PI Audio V1 and Z V2. */ #include / { - overlay-name = "FE-PI Audio Z V2"; + overlay-name = "FE-PI Audio V1 and Z V2"; compatible = JETSON_COMPATIBLE; fragment@0 { From b77993bb67450d225d46b1ea7c9d8478e9b9df72 Mon Sep 17 00:00:00 2001 From: Asha Talambedu Date: Mon, 7 Sep 2020 12:24:32 +0530 Subject: [PATCH 10/15] common: overlay: Add fe-pi Line In/Out support - FE-PI Audio V1 and Z V2 have Line In and Line Out jacks. On V1, Line In and Line out are realised with the help of 2 RCA jacks for Input and 2 RCA jacks for output. on Z V2, they are realised with 3.5mm stereo jacks Added relevant DAPM widgets to support audio on these jacks Bug 2827043 Change-Id: If346f0748ea5208db08fd36bff427d1ce78e2510 Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2371097 (cherry picked from commit 6a1f8e33a424b7afc84d2479672724fada606778) Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2409602 Tested-by: Asha Talambedu Tested-by: mobile promotions Reviewed-by: Asha Talambedu Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Viswanath L Reviewed-by: Bharat Nihalani Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- overlay/jetson-fe-pi-audio.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/overlay/jetson-fe-pi-audio.dtsi b/overlay/jetson-fe-pi-audio.dtsi index 18ab210..ad26692 100644 --- a/overlay/jetson-fe-pi-audio.dtsi +++ b/overlay/jetson-fe-pi-audio.dtsi @@ -64,12 +64,16 @@ __overlay__ { nvidia-audio-card,widgets = "Headphone", "H40-SGTL Headphone", - "Microphone", "H40-SGTL Mic"; + "Microphone", "H40-SGTL Mic", + "Line", "H40-SGTL Line In", + "Line", "H40-SGTL Line Out"; nvidia-audio-card,routing = "H40-SGTL Headphone", "H40-SGTL HP_OUT", "H40-SGTL MIC_IN", "H40-SGTL Mic", - "H40-SGTL ADC", "H40-SGTL Mic Bias"; + "H40-SGTL ADC", "H40-SGTL Mic Bias", + "H40-SGTL LINE_IN", "H40-SGTL Line In", + "H40-SGTL Line Out", "H40-SGTL LINE_OUT"; }; }; From 5f0d901138841e7347743066ff0973f4d3b07206 Mon Sep 17 00:00:00 2001 From: Viswanath L Date: Tue, 29 Sep 2020 00:24:12 +0530 Subject: [PATCH 11/15] common: overlay: Overlays updated per new design HW addon overlay files on 40-pin header are updated to match the new design of Jetson-IO tool, which supports multiple headers and SFIOs: - 'jetson-header-name' property is specified to associate the 40-pin header - pinctrl phandle is standardized so that overlay from multiple headers can be overlaid - Pin node names are specified as hdr40-pin## {}; Bug 200581790 Change-Id: I7c32e11e02a2a8d53120beabd14400bed7e0221b Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2420885 (cherry picked from commit f491e1882f225c21ea884fb5173e1514b2eea9ac) Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2533825 Reviewed-by: svcacv Reviewed-by: svc_kernel_abi Reviewed-by: Viswanath L Reviewed-by: Sharad Gupta Reviewed-by: mobile promotions Tested-by: Viswanath L Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- overlay/jetson-adafruit-sph0645lm4h.dtsi | 13 +++++++------ overlay/jetson-fe-pi-audio.dtsi | 15 ++++++++------- overlay/jetson-mcp251x.dtsi | 17 +++++++++-------- overlay/jetson-respeaker-4-mic-array.dtsi | 13 +++++++------ 4 files changed, 31 insertions(+), 27 deletions(-) diff --git a/overlay/jetson-adafruit-sph0645lm4h.dtsi b/overlay/jetson-adafruit-sph0645lm4h.dtsi index 9da3843..4550868 100644 --- a/overlay/jetson-adafruit-sph0645lm4h.dtsi +++ b/overlay/jetson-adafruit-sph0645lm4h.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019-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, @@ -23,16 +23,17 @@ / { overlay-name = "Adafruit SPH0645LM4H"; + jetson-header-name = "Jetson 40pin Header"; compatible = JETSON_COMPATIBLE; fragment@0 { target = <&pinmux>; __overlay__ { pinctrl-names = "default"; - pinctrl-0 = <&hdr40_pinmux>; + pinctrl-0 = <&jetson_io_pinmux>; - hdr40_pinmux: header-40pin-pinmux { - pin12 { + jetson_io_pinmux: exp-header-pinmux { + hdr40-pin12 { nvidia,pins = HDR40_PIN12; nvidia,function = HDR40_I2S; nvidia,pull = ; @@ -40,7 +41,7 @@ nvidia,enable-input = ; }; - pin35 { + hdr40-pin35 { nvidia,pins = HDR40_PIN35; nvidia,function = HDR40_I2S; nvidia,pull = ; @@ -48,7 +49,7 @@ nvidia,enable-input = ; }; - pin38 { + hdr40-pin38 { nvidia,pins = HDR40_PIN38; nvidia,function = HDR40_I2S; nvidia,pull = ; diff --git a/overlay/jetson-fe-pi-audio.dtsi b/overlay/jetson-fe-pi-audio.dtsi index ad26692..99d6801 100644 --- a/overlay/jetson-fe-pi-audio.dtsi +++ b/overlay/jetson-fe-pi-audio.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019-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, @@ -22,6 +22,7 @@ / { overlay-name = "FE-PI Audio V1 and Z V2"; + jetson-header-name = "Jetson 40pin Header"; compatible = JETSON_COMPATIBLE; fragment@0 { @@ -95,10 +96,10 @@ target = <&pinmux>; __overlay__ { pinctrl-names = "default"; - pinctrl-0 = <&hdr40_pinmux>; + pinctrl-0 = <&jetson_io_pinmux>; - hdr40_pinmux: header-40pin-pinmux { - pin12 { + jetson_io_pinmux: exp-header-pinmux { + hdr40-pin12 { nvidia,pins = HDR40_PIN12; nvidia,function = HDR40_I2S; nvidia,pull = ; @@ -106,7 +107,7 @@ nvidia,enable-input = ; }; - pin35 { + hdr40-pin35 { nvidia,pins = HDR40_PIN35; nvidia,function = HDR40_I2S; nvidia,pull = ; @@ -114,7 +115,7 @@ nvidia,enable-input = ; }; - pin38 { + hdr40-pin38 { nvidia,pins = HDR40_PIN38; nvidia,function = HDR40_I2S; nvidia,pull = ; @@ -122,7 +123,7 @@ nvidia,enable-input = ; }; - pin40 { + hdr40-pin40 { nvidia,pins = HDR40_PIN40; nvidia,function = HDR40_I2S; nvidia,pull = ; diff --git a/overlay/jetson-mcp251x.dtsi b/overlay/jetson-mcp251x.dtsi index 3923992..1abb8eb 100644 --- a/overlay/jetson-mcp251x.dtsi +++ b/overlay/jetson-mcp251x.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020-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, @@ -22,6 +22,7 @@ / { overlay-name = "MCP251x CAN Controller"; + jetson-header-name = "Jetson 40pin Header"; compatible = JETSON_COMPATIBLE; fragment@0 { @@ -64,38 +65,38 @@ target = <&pinmux>; __overlay__ { pinctrl-names = "default"; - pinctrl-0 = <&hdr40_pinmux>; + pinctrl-0 = <&jetson_io_pinmux>; - hdr40_pinmux: header-40pin-pinmux { - pin19 { + jetson_io_pinmux: exp-header-pinmux { + hdr40-pin19 { nvidia,pins = HDR40_PIN19; nvidia,function = HDR40_SPI; nvidia,pull = ; nvidia,tristate = ; nvidia,enable-input = ; }; - pin21 { + hdr40-pin21 { nvidia,pins = HDR40_PIN21; nvidia,function = HDR40_SPI; nvidia,pull = ; nvidia,tristate = ; nvidia,enable-input = ; }; - pin23 { + hdr40-pin23 { nvidia,pins = HDR40_PIN23; nvidia,function = HDR40_SPI; nvidia,pull = ; nvidia,tristate = ; nvidia,enable-input = ; }; - pin24 { + hdr40-pin24 { nvidia,pins = HDR40_PIN24; nvidia,function = HDR40_SPI; nvidia,pull = ; nvidia,tristate = ; nvidia,enable-input = ; }; - pin26 { + hdr40-pin26 { nvidia,pins = HDR40_PIN26; nvidia,function = HDR40_SPI; nvidia,pull = ; diff --git a/overlay/jetson-respeaker-4-mic-array.dtsi b/overlay/jetson-respeaker-4-mic-array.dtsi index dca61a2..1923296 100644 --- a/overlay/jetson-respeaker-4-mic-array.dtsi +++ b/overlay/jetson-respeaker-4-mic-array.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020-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, @@ -22,6 +22,7 @@ / { overlay-name = "ReSpeaker 4 Mic Array"; + jetson-header-name = "Jetson 40pin Header"; compatible = JETSON_COMPATIBLE; fragment@0 { @@ -75,10 +76,10 @@ target = <&pinmux>; __overlay__ { pinctrl-names = "default"; - pinctrl-0 = <&hdr40_pinmux>; + pinctrl-0 = <&jetson_io_pinmux>; - hdr40_pinmux: header-40pin-pinmux { - pin12 { + jetson_io_pinmux: exp-header-pinmux { + hdr40-pin12 { nvidia,pins = HDR40_PIN12; nvidia,function = HDR40_I2S; nvidia,pull = ; @@ -86,7 +87,7 @@ nvidia,enable-input = ; }; - pin35 { + hdr40-pin35 { nvidia,pins = HDR40_PIN35; nvidia,function = HDR40_I2S; nvidia,pull = ; @@ -94,7 +95,7 @@ nvidia,enable-input = ; }; - pin38 { + hdr40-pin38 { nvidia,pins = HDR40_PIN38; nvidia,function = HDR40_I2S; nvidia,pull = ; From e557766b92e625a4c002d89170de33e2164c1d10 Mon Sep 17 00:00:00 2001 From: Asha Talambedu Date: Mon, 18 Jan 2021 13:41:43 +0530 Subject: [PATCH 12/15] common: overlay: Adafruit UDA1334A support Added common overlay for supporting Adafruit I2S Stereo Decoder UDA1334A breakout on jetson platforms Bug 200679216 Change-Id: I4c94f39ae68cff1cf940da405872c4b6b3e19db2 Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2471661 (cherry picked from commit b2394b7de4b7be1acad5ed5aacf3f4ff39af51d4) Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2491601 Reviewed-by: svcacv Reviewed-by: Asha Talambedu Reviewed-by: Viswanath L Reviewed-by: Sharad Gupta Reviewed-by: mobile promotions Tested-by: Asha Talambedu Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- overlay/jetson-adafruit-uda1334a.dtsi | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 overlay/jetson-adafruit-uda1334a.dtsi diff --git a/overlay/jetson-adafruit-uda1334a.dtsi b/overlay/jetson-adafruit-uda1334a.dtsi new file mode 100644 index 0000000..f955b4c --- /dev/null +++ b/overlay/jetson-adafruit-uda1334a.dtsi @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Jetson Device-tree overlay for Adafruit I2S Stereo Decoder Breakout + * (UDA1334A). + * + * Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved. + * + */ + +#include + +/ { + overlay-name = "Adafruit UDA1334A"; + jetson-header-name = "Jetson 40pin Header"; + compatible = JETSON_COMPATIBLE; + + fragment@0 { + 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-pin40 { + nvidia,pins = HDR40_PIN40; + nvidia,function = HDR40_I2S; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; + }; + }; + }; +}; From 42622281a7f6ffa17efe2283c52efc5fab1ff75e Mon Sep 17 00:00:00 2001 From: Asha Talambedu Date: Fri, 28 May 2021 13:20:39 +0530 Subject: [PATCH 13/15] 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 = ; + }; + }; + }; + }; +}; From e2d2cb7e4dba567dd271853127db673f25b72daf Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Tue, 14 Dec 2021 17:38:06 +0530 Subject: [PATCH 14/15] common: overlay: Add overlay for audio-graph Add audio-graph overlay for the supported audio cards. In doing so also update license header as per recommended style. Bug 200692799 Change-Id: I7cbf9835026cec173f70ba307394a7ee6b7cc437 Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/platform/tegra/common/+/2641874 Reviewed-by: svcacv Reviewed-by: Jonathan Hunter Reviewed-by: Mohan Kumar D Reviewed-by: Sameer Pujar Reviewed-by: Sharad Gupta Tested-by: Sameer Pujar GVS: Gerrit_Virtual_Submit --- overlay/jetson-fe-pi-audio.dtsi | 54 ++++++++++++------ overlay/jetson-respeaker-4-mic-array.dtsi | 57 +++++++++++++------ overlay/jetson-respeaker-4-mic-lin-array.dtsi | 56 ++++++++++++------ 3 files changed, 119 insertions(+), 48 deletions(-) diff --git a/overlay/jetson-fe-pi-audio.dtsi b/overlay/jetson-fe-pi-audio.dtsi index 99d6801..19dd187 100644 --- a/overlay/jetson-fe-pi-audio.dtsi +++ b/overlay/jetson-fe-pi-audio.dtsi @@ -1,21 +1,9 @@ -/* - * Copyright (c) 2019-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 . - */ - +// SPDX-License-Identifier: GPL-2.0-only /* * Jetson Device-tree overlay for FE-PI Audio V1 and Z V2. + * + * Copyright (c) 2019-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * */ #include @@ -56,6 +44,15 @@ VDDIO-supply = <&hdr40_vdd_3v3>; #sound-dai-cells = <0>; status = "okay"; + + sound-name-prefix = "H40-SGTL"; + + port { + sgtl5000_ep: endpoint { + remote-endpoint = <&hdr40_snd_i2s_dap_ep>; + link-name = "fe-pi-audio-z-v2"; + }; + }; }; }; }; @@ -133,4 +130,29 @@ }; }; }; + + fragment@5 { + target = <&tegra_sound_graph>; + __overlay__ { + widgets = "Headphone", "H40-SGTL Headphone", + "Microphone", "H40-SGTL Mic", + "Line", "H40-SGTL Line In", + "Line", "H40-SGTL Line Out"; + + routing = "H40-SGTL Headphone", "H40-SGTL HP_OUT", + "H40-SGTL MIC_IN", "H40-SGTL Mic", + "H40-SGTL ADC", "H40-SGTL Mic Bias", + "H40-SGTL LINE_IN", "H40-SGTL Line In", + "H40-SGTL Line Out", "H40-SGTL LINE_OUT"; + }; + }; + + fragment@6 { + target = <&hdr40_snd_i2s_dap_ep>; + __overlay__ { + bitclock-master; + frame-master; + remote-endpoint = <&sgtl5000_ep>; + }; + }; }; diff --git a/overlay/jetson-respeaker-4-mic-array.dtsi b/overlay/jetson-respeaker-4-mic-array.dtsi index 1923296..44ec15b 100644 --- a/overlay/jetson-respeaker-4-mic-array.dtsi +++ b/overlay/jetson-respeaker-4-mic-array.dtsi @@ -1,21 +1,9 @@ -/* - * Copyright (c) 2020-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 . - */ - +// SPDX-License-Identifier: GPL-2.0-only /* * Jetson Device-tree overlay for ReSpeaker 4 Mic Array. + * + * Copyright (c) 2020-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * */ #include @@ -36,6 +24,15 @@ #sound-dai-cells = <0>; data-protocol = <0>; status = "okay"; + + sound-name-prefix = "H40-AC"; + + port { + ac108_ep: endpoint { + remote-endpoint = <&hdr40_snd_i2s_dap_ep>; + link-name = "respeaker-4-mic-array"; + }; + }; }; }; }; @@ -105,4 +102,32 @@ }; }; }; + + /* Audio graph fragments */ + fragment@4 { + target = <&tegra_sound_graph>; + __overlay__ { + widgets = "Microphone", "H40-AC Mic"; + + 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@5 { + target = <&hdr40_snd_i2s_dap_ep>; + __overlay__ { + dai-format = "dsp_a"; + bitclock-master; + frame-master; + remote-endpoint = <&ac108_ep>; + }; + }; }; diff --git a/overlay/jetson-respeaker-4-mic-lin-array.dtsi b/overlay/jetson-respeaker-4-mic-lin-array.dtsi index b19921d..a51b1cd 100644 --- a/overlay/jetson-respeaker-4-mic-lin-array.dtsi +++ b/overlay/jetson-respeaker-4-mic-lin-array.dtsi @@ -1,21 +1,9 @@ -/* - * 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 . - */ - +// SPDX-License-Identifier: GPL-2.0-only /* * Jetson Device-tree overlay for ReSpeaker 4 Mic Linear Array. + * + * Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * */ #include @@ -36,6 +24,15 @@ #sound-dai-cells = <0>; data-protocol = <0>; status = "okay"; + + sound-name-prefix = "H40-AC"; + + port { + ac108_ep: endpoint { + remote-endpoint = <&hdr40_snd_i2s_dap_ep>; + link-name = "respeaker-4-mic-array"; + }; + }; }; }; }; @@ -106,4 +103,31 @@ }; }; }; + + fragment@4 { + target = <&tegra_sound_graph>; + __overlay__ { + widgets = "Microphone", "H40-AC Mic"; + + 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@5 { + target = <&hdr40_snd_i2s_dap_ep>; + __overlay__ { + dai-format = "dsp_a"; + bitclock-master; + frame-master; + remote-endpoint = <&ac108_ep>; + }; + }; }; From 56eb51fed121d87c3f2e49d13eb4bafbf1fae77f Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Tue, 27 Jun 2023 07:27:33 +0000 Subject: [PATCH 15/15] common: overlay: Fix the license and copyright Fix the license and copyright information. Change-Id: Id80962809631694bbdbb23b85b6466dfde976c62 Signed-off-by: Laxman Dewangan --- overlay/jetson-adafruit-sph0645lm4h.dtsi | 17 ++--------------- overlay/jetson-adafruit-uda1334a.dtsi | 5 ++--- overlay/jetson-fe-pi-audio.dtsi | 5 ++--- overlay/jetson-mcp251x.dtsi | 17 ++--------------- overlay/jetson-respeaker-4-mic-array.dtsi | 5 ++--- overlay/jetson-respeaker-4-mic-lin-array.dtsi | 4 ++-- 6 files changed, 12 insertions(+), 41 deletions(-) diff --git a/overlay/jetson-adafruit-sph0645lm4h.dtsi b/overlay/jetson-adafruit-sph0645lm4h.dtsi index 4550868..3444ec9 100644 --- a/overlay/jetson-adafruit-sph0645lm4h.dtsi +++ b/overlay/jetson-adafruit-sph0645lm4h.dtsi @@ -1,20 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019-2023, 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 Adafruit I2S MEMS Microphone Breakout * (SPH0645LM4H). */ diff --git a/overlay/jetson-adafruit-uda1334a.dtsi b/overlay/jetson-adafruit-uda1334a.dtsi index f955b4c..65ab1cf 100644 --- a/overlay/jetson-adafruit-uda1334a.dtsi +++ b/overlay/jetson-adafruit-uda1334a.dtsi @@ -1,10 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-only /* + * Copyright (c) 2021-2023 NVIDIA CORPORATION. All rights reserved. + * * Jetson Device-tree overlay for Adafruit I2S Stereo Decoder Breakout * (UDA1334A). - * - * Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved. - * */ #include diff --git a/overlay/jetson-fe-pi-audio.dtsi b/overlay/jetson-fe-pi-audio.dtsi index 19dd187..ec214da 100644 --- a/overlay/jetson-fe-pi-audio.dtsi +++ b/overlay/jetson-fe-pi-audio.dtsi @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only /* + * Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved. + * * Jetson Device-tree overlay for FE-PI Audio V1 and Z V2. - * - * Copyright (c) 2019-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * */ #include diff --git a/overlay/jetson-mcp251x.dtsi b/overlay/jetson-mcp251x.dtsi index 1abb8eb..8e59810 100644 --- a/overlay/jetson-mcp251x.dtsi +++ b/overlay/jetson-mcp251x.dtsi @@ -1,20 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020-2023, 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 MCP251x CAN Controller. */ diff --git a/overlay/jetson-respeaker-4-mic-array.dtsi b/overlay/jetson-respeaker-4-mic-array.dtsi index 44ec15b..0702a3a 100644 --- a/overlay/jetson-respeaker-4-mic-array.dtsi +++ b/overlay/jetson-respeaker-4-mic-array.dtsi @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only /* + * Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved. + * * Jetson Device-tree overlay for ReSpeaker 4 Mic Array. - * - * Copyright (c) 2020-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * */ #include diff --git a/overlay/jetson-respeaker-4-mic-lin-array.dtsi b/overlay/jetson-respeaker-4-mic-lin-array.dtsi index a51b1cd..003ec39 100644 --- a/overlay/jetson-respeaker-4-mic-lin-array.dtsi +++ b/overlay/jetson-respeaker-4-mic-lin-array.dtsi @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Jetson Device-tree overlay for ReSpeaker 4 Mic Linear Array. + * Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved. * - * Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * Jetson Device-tree overlay for ReSpeaker 4 Mic Linear Array. * */