From cf4fa13cdad142f1d1bdf1485cc941140062e1ce Mon Sep 17 00:00:00 2001 From: Biju Das Date: Thu, 2 Apr 2015 13:46:13 +0100 Subject: [PATCH 2/7] ARM: shmobile: porter: Sound PIO support on DTS This change is identical to the koelsch patch "ARM: shmobile: koelsch: Sound PIO support on DTS" from Kuninori Morimoto and backported to 3.10 Signed-off-by: Biju Das --- arch/arm/boot/dts/r8a7791-porter.dts | 52 ++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/r8a7791-porter.dts b/arch/arm/boot/dts/r8a7791-porter.dts index 4fb5cd5..b39dc6a 100644 --- a/arch/arm/boot/dts/r8a7791-porter.dts +++ b/arch/arm/boot/dts/r8a7791-porter.dts @@ -12,11 +12,9 @@ /* * SSI-AK4643 * - * these commands are required when playback. + * This command is required when Playback/Capture * - * # amixer set "LINEOUT Mixer DACL" on - * # amixer set "Digital" 200 - * # amixer set "DVC Out" 50 + * amixer set "LINEOUT Mixer DACL" on */ /dts-v1/; @@ -102,6 +100,23 @@ 1800000 0>; }; + sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sndcodec>; + simple-audio-card,frame-master = <&sndcodec>; + + sndcpu: simple-audio-card,cpu { + sound-dai = <&rcar_sound>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&ak4643>; + system-clock-frequency = <11289600>; + }; + }; + hdmi_transmitter: adv7511 { compatible = "adi,adv7511"; gpios = <&gpio3 29 GPIO_ACTIVE_LOW>; @@ -128,7 +143,7 @@ }; &pfc { - pinctrl-0 = <&du_pins &usb0_pins &usb1_pins &sound_pins &sound_clk_pins &vin0_pins>; + pinctrl-0 = <&du_pins &usb0_pins &usb1_pins &vin0_pins>; pinctrl-names = "default"; du_pins: du { @@ -337,7 +352,7 @@ pagesize = <16>; }; - snd_codec: ak4643 { + ak4643: sound-codec@12 { #sound-dai-cells = <0>; compatible = "asahi-kasei,ak4643"; reg = <0x12>; @@ -395,3 +410,28 @@ &cpu0 { cpu0-supply = <&vdd_dvfs>; }; + +&rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; + + #sound-dai-cells = <0>; + + status = "okay"; + + rcar_sound,dai { + dai0 { + playback = <&ssi0>; + capture = <&ssi1>; + }; + }; +}; + +&ssi0 { + pio-transfer; +}; + +&ssi1 { + pio-transfer; + shared-pin; +}; -- 1.7.9.5