From 2edc71fc799c4fb2661a4b69767f2e28a096954b Mon Sep 17 00:00:00 2001 From: Michal Ulianko Date: Tue, 30 Jul 2013 14:28:17 +0200 Subject: [PATCH 2/2] Added DTS with mxs-builtin-* entries for testing the audio driver. --- arch/arm/boot/dts/imx23-audio.dts | 153 +++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 arch/arm/boot/dts/imx23-audio.dts diff --git a/arch/arm/boot/dts/imx23-audio.dts b/arch/arm/boot/dts/imx23-audio.dts new file mode 100644 index 0000000..1555896 --- /dev/null +++ b/arch/arm/boot/dts/imx23-audio.dts @@ -0,0 +1,153 @@ +/* + * Copyright 2012 Freescale Semiconductor, Inc. + * + * Author: Fabio Estevam + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/* + * DTS for testing mxs-builtin-audio. + */ + +/dts-v1/; +/include/ "imx23.dtsi" + +/ { + model = "i.MX23 Olinuxino Low Cost Board"; + compatible = "olimex,imx23-olinuxino", "fsl,imx23"; + + memory { + reg = <0x40000000 0x04000000>; + }; + + apb@80000000 { + apbh@80000000 { + ssp0: ssp@80010000 { + compatible = "fsl,imx23-mmc"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_pins_fixup>; + bus-width = <4>; + broken-cd; + status = "okay"; + }; + + pinctrl@80018000 { + pinctrl-names = "default"; + // TODO Can gpio_keys use pinctrl? + pinctrl-0 = <&hog_pins_a &btns_pins_a>; + + hog_pins_a: hog@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x0113 /* MX23_PAD_GPMI_ALE__GPIO_0_17 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + + led_pin_gpio2_1: led_gpio2_1@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x2013 /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + + btns_pins_a: btns@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x0033 /* MX23_PAD_GPMI_D03__GPIO_0_3 */ + 0x0043 /* MX23_PAD_GPMI_D04__GPIO_0_4 */ + 0x0053 /* MX23_PAD_GPMI_D05__GPIO_0_5 */ + 0x0063 /* MX23_PAD_GPMI_D06__GPIO_0_6 */ + 0x0073 /* MX23_PAD_GPMI_D07__GPIO_0_7 */ + >; + fsl,voltage = <1>; + fsl,pull-up = <1>; + }; + }; + + ssp1: ssp@80034000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx23-spi"; + pinctrl-names = "default"; + pinctrl-0 = <&spi2_pins_a>; + status = "okay"; + }; + }; + + apbx@80040000 { + duart: serial@80070000 { + pinctrl-names = "default"; + pinctrl-0 = <&duart_pins_a>; + status = "okay"; + }; + + auart0: serial@8006c000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart0_2pins_a>; + status = "okay"; + }; + + usbphy0: usbphy@8007c000 { + status = "okay"; + }; + + codec: mxs-builtin-codec { + compatible = "fsl,mxs-builtin-codec"; + reg = <0x80048000 0x2000>, <0x8004c000 0x2000>, + <0x8005c000 0x2000>; + reg-names = "audioout", "audioin", "rtc"; + clocks = <&clks 31>; + clock-names = "filt"; + }; + + platform_dai: mxs-builtin-cpu-dai { + compatible = "fsl,mxs-builtin-cpu-dai"; + reg = <0x80048000 0x2000>, <0x8004c000 0x2000>, + <0x8005c000 0x2000>; + reg-names = "audioout", "audioin", "rtc"; + interrupts = <8 6 4>; + dmas = <&dma_apbx 0>, <&dma_apbx 1>; + dma-names = "rx", "tx"; + }; + }; + }; + + ahb@80080000 { + usb0: usb@80080000 { + vbus-supply = <®_usb0_vbus>; + status = "okay"; + }; + }; + + regulators { + compatible = "simple-bus"; + + reg_usb0_vbus: usb0_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb0_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + startup-delay-us = <300>; /* LAN9215 requires a POR of 200us minimum */ + gpio = <&gpio0 17 0>; + }; + }; + + mxs-builtin-audio { + compatible = "fsl,mxs-builtin-audio"; + audio-codec = <&codec>; + cpu-dai = <&platform_dai>; + }; +}; -- 1.7.10.4