diff --git a/arch/arm64/boot/dts/seco/overlays/Makefile b/arch/arm64/boot/dts/seco/overlays/Makefile index b27e7e56c54c535811f2667d9c4802e3dc586ee1..acd86fefa230c67f8bdff00c25b18f7bf969e9c4 100644 --- a/arch/arm64/boot/dts/seco/overlays/Makefile +++ b/arch/arm64/boot/dts/seco/overlays/Makefile @@ -1,5 +1,8 @@ DTC_FLAGS ?= -@ -H epapr +dtbo-$(CONFIG_ARCH_MXC) += \ + seco-imx8mp-d18-audio-btsco.dtbo + targets += dtbs dtbs_install targets += $(dtbo-y) diff --git a/arch/arm64/boot/dts/seco/overlays/seco-imx8mp-d18-audio-btsco-overlay.dts b/arch/arm64/boot/dts/seco/overlays/seco-imx8mp-d18-audio-btsco-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..12d426c2dbc78da6d290ad26a94fa63f7cd67ab2 --- /dev/null +++ b/arch/arm64/boot/dts/seco/overlays/seco-imx8mp-d18-audio-btsco-overlay.dts @@ -0,0 +1,73 @@ +/* + * Copyright 2021 SECO + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that 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. + */ + +#include <dt-bindings/clock/imx8mp-clock.h> + +/dts-v1/; +/plugin/; + +/ { + compatible = "fsl,imx8mp-evk", "seco,imx8mp-d18", "fsl,imx8mp"; + +/* __________________________________________________________________________ + * | | + * | AUDIO BLUETOOTH | + * |__________________________________________________________________________| + */ + + fragment@0 { + target = <&bt_sco_codec>; + __overlay__ { + #sound-dai-cells = <1>; + compatible = "linux,bt-sco"; + }; + }; + + fragment@1 { + target = <&soundbtsco>; + __overlay__ { + status = "okay"; + compatible = "simple-audio-card"; + simple-audio-card,name = "bt-sco-audio"; + simple-audio-card,format = "dsp_a"; + simple-audio-card,bitclock-inversion; + simple-audio-card,frame-master = <&btcpu>; + simple-audio-card,bitclock-master = <&btcpu>; + + btcpu: simple-audio-card,cpu { + sound-dai = <&sai3>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <16>; + }; + + simple-audio-card,codec { + sound-dai = <&bt_sco_codec 1>; + }; + }; + }; + + fragment@2 { + target = <&sai3>; + __overlay__ { + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai3>; + assigned-clocks = <&clk IMX8MP_CLK_SAI3>; + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; + assigned-clock-rates = <12288000>; + status = "okay"; + }; + }; + +}; diff --git a/arch/arm64/boot/dts/seco/seco-imx8mp-d18.dts b/arch/arm64/boot/dts/seco/seco-imx8mp-d18.dts index dcb6e59e05262d4bccaab133efb985a30c63c8e5..6d0a79a244898598e0d0855c22fae5edbc0bfca8 100644 --- a/arch/arm64/boot/dts/seco/seco-imx8mp-d18.dts +++ b/arch/arm64/boot/dts/seco/seco-imx8mp-d18.dts @@ -101,7 +101,7 @@ reg_audio: regulator-soc-audio { bt_sco_codec: bt_sco_codec { }; - sound-bt-sco { + soundbtsco: sound-bt-sco { }; sound { @@ -896,9 +896,6 @@ MX8MP_IOMUXC_SAI3_TXFS__AUDIOMIX_SAI3_TX_SYNC 0xd6 MX8MP_IOMUXC_SAI3_TXC__AUDIOMIX_SAI3_TX_BCLK 0xd6 MX8MP_IOMUXC_SAI3_RXD__AUDIOMIX_SAI3_RX_DATA00 0xd6 MX8MP_IOMUXC_SAI3_TXD__AUDIOMIX_SAI3_TX_DATA00 0xd6 - MX8MP_IOMUXC_SAI3_MCLK__AUDIOMIX_SAI3_MCLK 0xd6 - MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0xd6 - MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0xd6 >; };