@@ -1,4 +1,5 @@
#include <dt-bindings/input/input.h>
+#include <dt-bindings/sound/audio-jack-events.h>
#include "tegra124.dtsi"
/ {
@@ -661,6 +662,23 @@
};
};
+ audio_jack: gpio-audio-jack {
+ compatible = "gpio-audio-jack";
+ gpio-audio-jack,jack-name = "Headset Jack";
+ gpio-audio-jack,sw-det-gpios =
+ <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>,
+ <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_LOW>;
+ gpio-audio-jack,gpio-names =
+ "Headphones",
+ "Mic Jack";
+ gpio-audio-jack,report-masks =
+ <JACK_HEADPHONE>,
+ <JACK_MICROPHONE>;
+ gpio-audio-jack,debounce-times =
+ <150>,
+ <150>;
+ };
+
sound {
nvidia,audio-routing =
"Headphones", "HPR",
@@ -674,15 +692,13 @@
nvidia,i2s-controller = <&tegra_i2s1>;
nvidia,audio-codec = <&acodec>;
+ nvidia,headset-dev = <&audio_jack>;
clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
<&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
<&tegra_car TEGRA124_CLK_EXTERN1>;
clock-names = "pll_a", "pll_a_out0", "mclk";
- nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>;
- nvidia,mic-det-gpios =
- <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>;
};
gpio-restart {
Model the audio jack as a headset jack using the new gpio-audio-jack device. Signed-off-by: Dylan Reid <dgreid@chromium.org> --- arch/arm/boot/dts/tegra124-nyan.dtsi | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-)