[alsa-devel] [PATCH v3 0/3] add UniPhier audio nodes
This series adds device-tree nodes for Socionext audio system for UniPhier LD11/LD20 SoCs. This one enables I2S output for Line-In, Line-Out, S/PDIF output and compress audio output.
Katsuhiro Suzuki (3): arm64: dts: uniphier: add sound node for UniPhier arm64: dts: uniphier: add speaker out for UniPhier LD11/LD20 boards arm64: dts: uniphier: add compress audio out for UniPhier LD11/LD20
.../boot/dts/socionext/uniphier-ld11-global.dts | 62 ++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 92 +++++++++++++++++++++ .../boot/dts/socionext/uniphier-ld20-global.dts | 62 ++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 96 ++++++++++++++++++++++ 4 files changed, 312 insertions(+)
This patch adds audio controller, codec and simple card node of UniPhier AIO sound system for LD11/20 SoCs.
Signed-off-by: Katsuhiro Suzuki suzuki.katsuhiro@socionext.com
---
Changes in v3: - Move sound and spdif-out nodes to root from soc node - Use phandle of endpoint directly instead of port node - Describe connections between AIO and EVEA in *.dtsi because these cores are in inside of SoC --- .../boot/dts/socionext/uniphier-ld11-global.dts | 25 ++++++ arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 92 +++++++++++++++++++++ .../boot/dts/socionext/uniphier-ld20-global.dts | 25 ++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 96 ++++++++++++++++++++++ 4 files changed, 238 insertions(+)
diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts b/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts index 2452b2243f42..fb6bf435dc96 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts @@ -37,6 +37,27 @@ device_type = "memory"; reg = <0 0x80000000 0 0x40000000>; }; + + sound { + compatible = "audio-graph-card"; + label = "UniPhier LD11"; + widgets = "Headphone", "Headphone Jack"; + + dais = <&i2s_port2 + &i2s_port4 + &spdif_port0>; + }; + + spdif-out { + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + + port@0 { + spdif_tx: endpoint { + remote-endpoint = <&spdif_hiecout1>; + }; + }; + }; };
&serial0 { @@ -72,3 +93,7 @@ &nand { status = "okay"; }; + +&spdif_hiecout1 { + remote-endpoint = <&spdif_tx>; +}; diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi index cd7c2d0a1f64..f4eb1c6353a5 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi @@ -187,6 +187,90 @@ <21 217 3>; };
+ audio: audio@56000000 { + compatible = "socionext,uniphier-ld11-aio"; + reg = <0x56000000 0x80000>; + interrupts = <0 144 4>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_aout>; + clock-names = "aio"; + clocks = <&sys_clk 40>; + reset-names = "aio"; + resets = <&sys_rst 40>; + #sound-dai-cells = <1>; + + i2s_port0: port@0 { + i2s_hdmi: endpoint { + }; + }; + + i2s_port1: port@1 { + i2s_pcmin2: endpoint { + }; + }; + + i2s_port2: port@2 { + i2s_line: endpoint { + dai-format = "i2s"; + remote-endpoint = <&evea_line>; + }; + }; + + i2s_port3: port@3 { + i2s_hpcmout1: endpoint { + }; + }; + + i2s_port4: port@4 { + i2s_hp: endpoint { + dai-format = "i2s"; + remote-endpoint = <&evea_hp>; + }; + }; + + spdif_port0: port@5 { + spdif_hiecout1: endpoint { + }; + }; + + src_port0: port@6 { + i2s_epcmout2: endpoint { + }; + }; + + src_port1: port@7 { + i2s_epcmout3: endpoint { + }; + }; + + comp_spdif_port0: port@8 { + comp_spdif_hiecout1: endpoint { + }; + }; + }; + + evea: codec@57900000 { + compatible = "socionext,uniphier-evea"; + reg = <0x57900000 0x1000>; + clock-names = "evea", "exiv"; + clocks = <&sys_clk 41>, <&sys_clk 42>; + reset-names = "evea", "exiv", "adamv"; + resets = <&sys_rst 41>, <&sys_rst 42>, <&adamv_rst 0>; + #sound-dai-cells = <1>; + + evea_line_port: port@0 { + evea_line: endpoint { + remote-endpoint = <&i2s_line>; + }; + }; + + evea_hp_port: port@1 { + evea_hp: endpoint { + remote-endpoint = <&i2s_hp>; + }; + }; + }; + adamv@57920000 { compatible = "socionext,uniphier-ld11-adamv", "simple-mfd", "syscon"; @@ -475,3 +559,11 @@ };
#include "uniphier-pinctrl.dtsi" + +&pinctrl_aout { + drive-strength = <4>; /* default: 4mA */ + group_1 { + pins = "AO1ARC"; + drive-strength = <8>; /* 8mA */ + }; +}; diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts b/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts index fc2bc9d75d35..2d49163cfde4 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts @@ -37,6 +37,27 @@ device_type = "memory"; reg = <0 0x80000000 0 0xc0000000>; }; + + sound { + compatible = "audio-graph-card"; + label = "UniPhier LD20"; + widgets = "Headphone", "Headphone Jack"; + + dais = <&i2s_port2 + &i2s_port4 + &spdif_port0>; + }; + + spdif-out { + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + + port@0 { + spdif_tx: endpoint { + remote-endpoint = <&spdif_hiecout1>; + }; + }; + }; };
&serial0 { @@ -54,3 +75,7 @@ &nand { status = "okay"; }; + +&spdif_hiecout1 { + remote-endpoint = <&spdif_tx>; +}; diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi index 8a3276ba2da1..9d0f23f100df 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi @@ -287,6 +287,90 @@ <21 217 3>; };
+ audio: audio@56000000 { + compatible = "socionext,uniphier-ld20-aio"; + reg = <0x56000000 0x80000>; + interrupts = <0 144 4>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_aout>; + clock-names = "aio"; + clocks = <&sys_clk 40>; + reset-names = "aio"; + resets = <&sys_rst 40>; + #sound-dai-cells = <1>; + + i2s_port0: port@0 { + i2s_hdmi: endpoint { + }; + }; + + i2s_port1: port@1 { + i2s_pcmin2: endpoint { + }; + }; + + i2s_port2: port@2 { + i2s_line: endpoint { + dai-format = "i2s"; + remote-endpoint = <&evea_line>; + }; + }; + + i2s_port3: port@3 { + i2s_hpcmout1: endpoint { + }; + }; + + i2s_port4: port@4 { + i2s_hp: endpoint { + dai-format = "i2s"; + remote-endpoint = <&evea_hp>; + }; + }; + + spdif_port0: port@5 { + spdif_hiecout1: endpoint { + }; + }; + + src_port0: port@6 { + i2s_epcmout2: endpoint { + }; + }; + + src_port1: port@7 { + i2s_epcmout3: endpoint { + }; + }; + + comp_spdif_port0: port@8 { + comp_spdif_hiecout1: endpoint { + }; + }; + }; + + evea: codec@57900000 { + compatible = "socionext,uniphier-evea"; + reg = <0x57900000 0x1000>; + clock-names = "evea", "exiv"; + clocks = <&sys_clk 41>, <&sys_clk 42>; + reset-names = "evea", "exiv", "adamv"; + resets = <&sys_rst 41>, <&sys_rst 42>, <&adamv_rst 0>; + #sound-dai-cells = <1>; + + evea_line_port: port@0 { + evea_line: endpoint { + remote-endpoint = <&i2s_line>; + }; + }; + + evea_hp_port: port@1 { + evea_hp: endpoint { + remote-endpoint = <&i2s_hp>; + }; + }; + }; + adamv@57920000 { compatible = "socionext,uniphier-ld20-adamv", "simple-mfd", "syscon"; @@ -528,3 +612,15 @@ };
#include "uniphier-pinctrl.dtsi" + +&pinctrl_aout { + drive-strength = <4>; /* default: 3.5mA */ + group_1 { + pins = "AO1DACCK"; + drive-strength = <5>; /* 5mA */ + }; + group_2 { + pins = "AO1ARC"; + drive-strength = <11>; /* 11mA */ + }; +};
This patch adds codec node for TI TAS571x on UniPhier LD11/20 global boards. And adds settings of AIO for speaker out.
Signed-off-by: Katsuhiro Suzuki suzuki.katsuhiro@socionext.com
---
Changes in v3: - Use phandle of endpoint directly instead of port node --- .../boot/dts/socionext/uniphier-ld11-global.dts | 21 +++++++++++++++++++++ .../boot/dts/socionext/uniphier-ld20-global.dts | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+)
diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts b/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts index fb6bf435dc96..f057ee80f38e 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts @@ -10,6 +10,7 @@
/dts-v1/; #include "uniphier-ld11.dtsi" +#include "dt-bindings/gpio/uniphier-gpio.h"
/ { model = "UniPhier LD11 Global Board (REF_LD11_GP)"; @@ -44,6 +45,7 @@ widgets = "Headphone", "Headphone Jack";
dais = <&i2s_port2 + &i2s_port3 &i2s_port4 &spdif_port0>; }; @@ -71,6 +73,20 @@ &i2c0 { status = "okay";
+ tas5707a@1d { + compatible = "ti,tas5711"; + reg = <0x1d>; + reset-gpios = <&gpio UNIPHIER_GPIO_PORT(23, 4) GPIO_ACTIVE_LOW>; + pdn-gpios = <&gpio UNIPHIER_GPIO_PORT(23, 5) GPIO_ACTIVE_LOW>; + #sound-dai-cells = <0>; + + port@0 { + tas_speaker: endpoint { + remote-endpoint = <&i2s_hpcmout1>; + }; + }; + }; + eeprom@50 { compatible = "st,24c64", "atmel,24c64"; reg = <0x50>; @@ -94,6 +110,11 @@ status = "okay"; };
+&i2s_hpcmout1 { + dai-format = "i2s"; + remote-endpoint = <&tas_speaker>; +}; + &spdif_hiecout1 { remote-endpoint = <&spdif_tx>; }; diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts b/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts index 2d49163cfde4..b2e197bc968c 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts @@ -10,6 +10,7 @@
/dts-v1/; #include "uniphier-ld20.dtsi" +#include "dt-bindings/gpio/uniphier-gpio.h"
/ { model = "UniPhier LD20 Global Board (REF_LD20_GP)"; @@ -44,6 +45,7 @@ widgets = "Headphone", "Headphone Jack";
dais = <&i2s_port2 + &i2s_port3 &i2s_port4 &spdif_port0>; }; @@ -70,12 +72,31 @@
&i2c0 { status = "okay"; + + tas5707@1b { + compatible = "ti,tas5711"; + reg = <0x1b>; + reset-gpios = <&gpio UNIPHIER_GPIO_PORT(0, 0) GPIO_ACTIVE_LOW>; + pdn-gpios = <&gpio UNIPHIER_GPIO_PORT(0, 1) GPIO_ACTIVE_LOW>; + #sound-dai-cells = <0>; + + port@0 { + tas_speaker: endpoint { + remote-endpoint = <&i2s_hpcmout1>; + }; + }; + }; };
&nand { status = "okay"; };
+&i2s_hpcmout1 { + dai-format = "i2s"; + remote-endpoint = <&tas_speaker>; +}; + &spdif_hiecout1 { remote-endpoint = <&spdif_tx>; };
This patch adds compress audio node for S/PDIF on UniPhier LD11/20 global boards. And adds settings of AIO for it.
Signed-off-by: Katsuhiro Suzuki suzuki.katsuhiro@socionext.com
---
Changes in v3: - Move comp-spdif-out node to root from soc node - Use phandle of endpoint directly instead of port node --- arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts | 18 +++++++++++++++++- arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts b/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts index f057ee80f38e..875d05b1356e 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts @@ -47,7 +47,8 @@ dais = <&i2s_port2 &i2s_port3 &i2s_port4 - &spdif_port0>; + &spdif_port0 + &comp_spdif_port0>; };
spdif-out { @@ -60,6 +61,17 @@ }; }; }; + + comp-spdif-out { + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + + port@0 { + comp_spdif_tx: endpoint { + remote-endpoint = <&comp_spdif_hiecout1>; + }; + }; + }; };
&serial0 { @@ -118,3 +130,7 @@ &spdif_hiecout1 { remote-endpoint = <&spdif_tx>; }; + +&comp_spdif_hiecout1 { + remote-endpoint = <&comp_spdif_tx>; +}; diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts b/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts index b2e197bc968c..34537f9dce82 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts @@ -47,7 +47,8 @@ dais = <&i2s_port2 &i2s_port3 &i2s_port4 - &spdif_port0>; + &spdif_port0 + &comp_spdif_port0>; };
spdif-out { @@ -60,6 +61,17 @@ }; }; }; + + comp-spdif-out { + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + + port@0 { + comp_spdif_tx: endpoint { + remote-endpoint = <&comp_spdif_hiecout1>; + }; + }; + }; };
&serial0 { @@ -100,3 +112,7 @@ &spdif_hiecout1 { remote-endpoint = <&spdif_tx>; }; + +&comp_spdif_hiecout1 { + remote-endpoint = <&comp_spdif_tx>; +};
2018-02-13 22:01 GMT+09:00 Katsuhiro Suzuki suzuki.katsuhiro@socionext.com:
This series adds device-tree nodes for Socionext audio system for UniPhier LD11/LD20 SoCs. This one enables I2S output for Line-In, Line-Out, S/PDIF output and compress audio output.
Katsuhiro Suzuki (3): arm64: dts: uniphier: add sound node for UniPhier arm64: dts: uniphier: add speaker out for UniPhier LD11/LD20 boards arm64: dts: uniphier: add compress audio out for UniPhier LD11/LD20
Series, applied to linux-uniphier. Thanks!
Note, I locally fixed trivial things: - Use #include <...> instead of #include "..." to include dt-binding header - Fix DTC warnings (Character '_' not recommended in node) - Remove unused labels such as 'audio', 'evea'
.../boot/dts/socionext/uniphier-ld11-global.dts | 62 ++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 92 +++++++++++++++++++++ .../boot/dts/socionext/uniphier-ld20-global.dts | 62 ++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 96 ++++++++++++++++++++++ 4 files changed, 312 insertions(+)
-- 2.15.1
-- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
participants (2)
-
Katsuhiro Suzuki
-
Masahiro Yamada