From c570281bd3f6475434a0bfb49a807191287e765c Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Tue, 3 May 2016 17:19:13 +0800 Subject: [PATCH] MLK-12745-3: ARM: dts: add sound card support for imx6ull-ddr3-arm2 board Add mqs, spdif and wm8958 sound card support in imx6ull-ddr3-arm2-wm8958.dts. which can use the imx6ul-14x14-ddr3-arm2 socket board. Add cs42888 sound card support in imx6ull-ddr3-arm2-cs42888.dts. ESAI use the CSI PAD which conflict with the ov5640, so disable it. Signed-off-by: Shengjiu Wang --- arch/arm/boot/dts/Makefile | 4 +- .../boot/dts/imx6ull-ddr3-arm2-cs42888.dts | 90 ++++++++++ .../arm/boot/dts/imx6ull-ddr3-arm2-wm8958.dts | 155 ++++++++++++++++++ arch/arm/boot/dts/imx6ull.dtsi | 2 +- 4 files changed, 249 insertions(+), 2 deletions(-) create mode 100644 arch/arm/boot/dts/imx6ull-ddr3-arm2-cs42888.dts create mode 100644 arch/arm/boot/dts/imx6ull-ddr3-arm2-wm8958.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 2ad40750dab6..d31cd4b520ef 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -482,13 +482,15 @@ dtb-$(CONFIG_SOC_IMX6UL) += \ dtb-$(CONFIG_SOC_IMX6ULL) += \ imx6ull-ddr3-arm2.dtb \ imx6ull-ddr3-arm2-adc.dtb \ + imx6ull-ddr3-arm2-cs42888.dtb \ imx6ull-ddr3-arm2-ecspi.dtb \ imx6ull-ddr3-arm2-flexcan2.dtb \ imx6ull-ddr3-arm2-gpmi-weim.dtb \ imx6ull-ddr3-arm2-lcdif.dtb \ imx6ull-ddr3-arm2-qspi.dtb \ imx6ull-ddr3-arm2-uart2.dtb \ - imx6ull-ddr3-arm2-usb.dtb + imx6ull-ddr3-arm2-usb.dtb \ + imx6ull-ddr3-arm2-wm8958.dtb dtb-$(CONFIG_SOC_IMX7D) += \ imx7d-cl-som-imx7.dtb \ imx7d-colibri-eval-v3.dtb \ diff --git a/arch/arm/boot/dts/imx6ull-ddr3-arm2-cs42888.dts b/arch/arm/boot/dts/imx6ull-ddr3-arm2-cs42888.dts new file mode 100644 index 000000000000..ea95c6f2cbd0 --- /dev/null +++ b/arch/arm/boot/dts/imx6ull-ddr3-arm2-cs42888.dts @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include "imx6ull-ddr3-arm2.dts" + +/ { + clocks { + codec_osc: anaclk2 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24576000>; + }; + }; + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + reg_audio: cs42888_supply { + compatible = "regulator-fixed"; + regulator-name = "cs42888_supply"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; + + sound-cs42888 { + compatible = "fsl,imx6-sabreauto-cs42888", + "fsl,imx-audio-cs42888"; + model = "imx-cs42888"; + esai-controller = <&esai>; + asrc-controller = <&asrc>; + audio-codec = <&codec_a>; + codec-master; + }; +}; + +&esai { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_esai>; + assigned-clocks = <&clks IMX6UL_CLK_ESAI_SEL>, + <&clks IMX6UL_CLK_ESAI_EXTAL>; + assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>; + assigned-clock-rates = <0>, <24576000>; + status = "okay"; +}; + +&i2c4 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c4>; + status = "okay"; + + codec_a: cs42888@048 { + compatible = "cirrus,cs42888"; + reg = <0x048>; + clocks = <&codec_osc 0>; + clock-names = "mclk"; + VA-supply = <®_audio>; + VD-supply = <®_audio>; + VLS-supply = <®_audio>; + VLC-supply = <®_audio>; + }; +}; + +&iomuxc { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_hog &pinctrl_hog1 &pinctrl_hog_sd>; +}; + +&ov5640 { + status = "disabled"; +}; + +&sdma { + gpr = <&gpr>; + /* SDMA event remap for ESAI */ + fsl,sdma-event-remap = <0 14 1>, <0 15 1>; +}; + +&uart2 { + status = "disabled"; +}; diff --git a/arch/arm/boot/dts/imx6ull-ddr3-arm2-wm8958.dts b/arch/arm/boot/dts/imx6ull-ddr3-arm2-wm8958.dts new file mode 100644 index 000000000000..112ecbf2d788 --- /dev/null +++ b/arch/arm/boot/dts/imx6ull-ddr3-arm2-wm8958.dts @@ -0,0 +1,155 @@ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include "imx6ull-ddr3-arm2.dts" + +/ { + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + reg_codec_5v: codec_5v { + compatible = "regulator-fixed"; + regulator-name = "CODEC_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + }; + + reg_aud_3v3: aud_3v3 { + compatible = "regulator-fixed"; + regulator-name = "AUD_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + }; + + reg_aud_1v8: aud_1v8 { + compatible = "regulator-fixed"; + regulator-name = "AUD_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + enable-active-high; + }; + }; + + sound-mqs { + compatible = "fsl,imx6ul-ddr3-arm2-mqs", + "fsl,imx-audio-mqs"; + model = "mqs-audio"; + cpu-dai = <&sai1>; + asrc-controller = <&asrc>; + audio-codec = <&mqs>; + }; + + sound-wm8958 { + compatible = "fsl,imx6ul-ddr3-arm2-wm8958", + "fsl,imx-audio-wm8958"; + model = "wm8958-audio"; + cpu-dai = <&sai2>; + audio-codec = <&codec_b>; + codec-master; + gpr = <&gpr>; + hp-det-gpios = <&gpio5 0 1>; + }; + + sound-spdif { + compatible = "fsl,imx-audio-spdif"; + model = "imx-spdif"; + spdif-controller = <&spdif>; + spdif-in; + spdif-out; + }; +}; + +&clks { + assigned-clocks = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>; + assigned-clock-rates = <786432000>; +}; + +&i2c4 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c4>; + status = "okay"; + + codec_b: wm8958@1a { + compatible = "wlf,wm8958"; + reg = <0x1a>; + clocks = <&clks IMX6UL_CLK_SAI2>, + <&clks IMX6UL_CLK_DUMMY>; + clock-names = "mclk1", "mclk2"; + + DBVDD1-supply = <®_aud_1v8>; + DBVDD2-supply = <®_aud_1v8>; + DBVDD3-supply = <®_aud_3v3>; + AVDD2-supply = <®_aud_1v8>; + CPVDD-supply = <®_aud_1v8>; + SPKVDD1-supply = <®_codec_5v>; + SPKVDD2-supply = <®_codec_5v>; + + wlf,ldo1ena; + wlf,ldo2ena; + }; +}; + +&iomuxc { + pinctrl-0 = <&pinctrl_hog &pinctrl_hog1>; +}; + +&sai2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai2>; + assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>, + <&clks IMX6UL_CLK_SAI2>; + assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>; + assigned-clock-rates = <0>, <24576000>; + status = "okay"; +}; + +&sai1 { + assigned-clocks = <&clks IMX6UL_CLK_SAI1_SEL>, + <&clks IMX6UL_CLK_SAI1>; + assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>; + assigned-clock-rates = <0>, <24576000>; + status = "okay"; +}; + +&mqs { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mqs>; + clocks = <&clks IMX6UL_CLK_SAI1>; + clock-names = "mclk"; + status = "okay"; +}; + +&spdif { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spdif>; + assigned-clocks = <&clks IMX6UL_CLK_SPDIF_SEL>, + <&clks IMX6UL_CLK_SPDIF_PODF>; + assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>; + assigned-clock-rates = <0>, <98304000>; + status = "okay"; +}; + +&uart2 { + status = "disabled"; +}; + +&usdhc1 { + no-1-8-v; + vmmc-supply = <>; + status = "disabled"; +}; + +&usdhc2 { + no-1-8-v; +}; diff --git a/arch/arm/boot/dts/imx6ull.dtsi b/arch/arm/boot/dts/imx6ull.dtsi index 28e78d5f64ec..6604fb71a551 100644 --- a/arch/arm/boot/dts/imx6ull.dtsi +++ b/arch/arm/boot/dts/imx6ull.dtsi @@ -323,7 +323,7 @@ }; esai: esai@02024000 { - compatible = "fsl,imx35-esai"; + compatible = "fsl,imx6ull-esai"; reg = <0x02024000 0x4000>; interrupts = ; clocks = <&clks IMX6UL_CLK_ESAI_IPG>, -- 2.17.1