arm64: dts: meson: p241: add internal sound support
Subsystems (2)
Jerome Brunet
reviewercover arm64: dts: meson: p241: add internal sound support
This patchset adds support for the internal sound card of the s805x p241 reference design. Audio is available on HDMI and 3.5mm jack connector.
Jerome Brunet (2):
arm64: dts: meson: p241: add vcc_5v regulator
arm64: dts: meson: p241: add sound support
.../boot/dts/amlogic/meson-gxl-s805x-p241.dts | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+)
Signature · 1 line
2.34.0
Jerome Brunet
reviewerPATCH 1/2 arm64: dts: meson: p241: add vcc_5v regulator
Add the VCC_5V regulator, which feeds the HDMI, USB and audio amplifier.
--- .../arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts +13 -0
@@ -84,6 +84,14 @@ vcc_3v3: regulator-vcc_3v3 { regulator-max-microvolt = <3300000>; }; + vcc_5v: regulator-vcc-5v { + compatible = "regulator-fixed"; + regulator-name = "VCC_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + emmc_pwrseq: emmc-pwrseq { compatible = "mmc-pwrseq-emmc"; reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
@@ -136,6 +144,7 @@ &hdmi_tx { status = "okay"; pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; pinctrl-names = "default"; + hdmi-supply = <&vcc_5v>; }; &hdmi_tx_tmds_port {
@@ -220,3 +229,7 @@ &usb { status = "okay"; dr_mode = "host"; }; + +&usb2_phy0 { + phy-supply = <&vcc_5v>; +};
Signature · 1 line
2.34.0
Re: [PATCH 1/2] arm64: dts: meson: p241: add vcc_5v regulator
Quoted 36 lines · Jerome Brunet
Add the
VCC_5Vregulator, which feeds the HDMI, USB and audio amplifier.Signed-off-by Jerome Brunet <[email protected]>--- .../arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts +9
-0@@ -84,6 +84,14 @@ vcc_3v3: regulator-vcc_3v3 { regulator-max-microvolt = <3300000>; }; + vcc_5v: regulator-vcc-5v { + compatible = "regulator-fixed"; + regulator-name = "VCC_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + emmc_pwrseq: emmc-pwrseq { compatible = "mmc-pwrseq-emmc"; reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;@@ -136,6 +144,7 @@ &hdmi_tx { status = "okay"; pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; pinctrl-names = "default"; + hdmi-supply = <&vcc_5v>; }; &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts &usb { · line 235
Quoted 7 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts +4
-0@@ -220,3 +229,7 @@ &usb { status = "okay"; dr_mode = "host"; }; + +&usb2_phy0 { + phy-supply = <&vcc_5v>; +};
Jerome Brunet
reviewerPATCH 2/2 arm64: dts: meson: p241: add sound support
In reply to Jerome BrunetAdd the p241 sound card support. This board can play audio through HDMI and the internal DAC.
--- .../boot/dts/amlogic/meson-gxl-s805x-p241.dts | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts +70 -0
@@ -8,6 +8,7 @@ /dts-v1/; #include <dt-bindings/input/input.h> +#include <dt-bindings/sound/meson-aiu.h> #include "meson-gxl-s805x.dtsi"
@@ -21,6 +22,13 @@ aliases { ethernet0 = ðmac; }; + au2: analog-amplifier { + compatible = "simple-audio-amplifier"; + sound-name-prefix = "AU2"; + VCC-supply = <&vcc_5v>; + enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; + }; + chosen { stdout-path = "serial0:115200n8"; };
@@ -110,6 +118,68 @@ sdio_pwrseq: sdio-pwrseq { clocks = <&wifi32k>; clock-names = "ext_clock"; }; + + sound { + compatible = "amlogic,gx-sound-card"; + model = "GXL-P241"; + audio-aux-devs = <&au2>; + audio-widgets = "Line", "Lineout"; + audio-routing = "AU2 INL", "ACODEC LOLN", + "AU2 INR", "ACODEC LORN", + "Lineout", "AU2 OUTL", + "Lineout", "AU2 OUTR"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + status = "okay"; + + dai-link-0 { + sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; + }; + + dai-link-1 { + sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; + dai-format = "i2s"; + mclk-fs = <256>; + + codec-0 { + sound-dai = <&aiu AIU_HDMI CTRL_I2S>; + }; + + codec-1 { + sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; + }; + }; + + dai-link-2 { + sound-dai = <&aiu AIU_HDMI CTRL_OUT>; + + codec-0 { + sound-dai = <&hdmi_tx>; + }; + }; + + dai-link-3 { + sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; + + codec-0 { + sound-dai = <&acodec>; + }; + }; + }; +}; + +&acodec { + AVDD-supply = <&vddio_ao18>; + status = "okay"; +}; + +&aiu { + status = "okay"; }; &cec_AO {
Signature · 1 line
2.34.0
Re: [PATCH 2/2] arm64: dts: meson: p241: add sound support
Quoted 94 lines · Jerome Brunet
Add the p241 sound card support. This board can play audio through HDMI and the internal DAC.
Signed-off-by Jerome Brunet <[email protected]>--- .../boot/dts/amlogic/meson-gxl-s805x-p241.dts | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+)arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts +63
-0@@ -8,6 +8,7 @@ /dts-v1/; #include <dt-bindings/input/input.h> +#include <dt-bindings/sound/meson-aiu.h> #include "meson-gxl-s805x.dtsi"@@ -21,6 +22,13 @@ aliases { ethernet0 = ðmac; }; + au2: analog-amplifier { + compatible = "simple-audio-amplifier"; + sound-name-prefix = "AU2"; + VCC-supply = <&vcc_5v>; + enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; + }; + chosen { stdout-path = "serial0:115200n8"; };@@ -110,6 +118,68 @@ sdio_pwrseq: sdio-pwrseq { clocks = <&wifi32k>; clock-names = "ext_clock"; }; + + sound { + compatible = "amlogic,gx-sound-card"; + model = "GXL-P241"; + audio-aux-devs = <&au2>; + audio-widgets = "Line", "Lineout"; + audio-routing = "AU2 INL", "ACODEC LOLN", + "AU2 INR", "ACODEC LORN", + "Lineout", "AU2 OUTL", + "Lineout", "AU2 OUTR"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + status = "okay"; + + dai-link-0 { + sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; + }; + + dai-link-1 { + sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; + dai-format = "i2s"; + mclk-fs = <256>; + + codec-0 { + sound-dai = <&aiu AIU_HDMI CTRL_I2S>; + }; + + codec-1 { + sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; + }; + }; + + dai-link-2 { + sound-dai = <&aiu AIU_HDMI CTRL_OUT>; + + codec-0 { + sound-dai = <&hdmi_tx>; + }; + }; + + dai-link-3 { + sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; + + codec-0 { + sound-dai = <&acodec>; + }; + }; + }; +}; +
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts sdio_pwrseq: sdio-pwrseq { · line 185
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts +7
-0+&acodec { + AVDD-supply = <&vddio_ao18>; + status = "okay"; +}; + +&aiu { + status = "okay"; }; &cec_AO {
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Neil Armstrong
AppliedHi,
Quoted 8 lines · Jerome Brunet
This patchset adds support for the internal sound card of the s805x p241 reference design. Audio is available on HDMI and 3.5mm jack connector.
Jerome Brunet (2):
arm64: dts: meson: p241: addvcc_5vregulator
arm64: dts: meson: p241: add sound support[...]
Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v5.17/dt64)
[1/2] arm64: dts: meson: p241: add vcc_5v regulator
https://git.kernel.org/amlogic/c/bca54f711c0a2506efcce03a02f96f39b311f188 [2/2] arm64: dts: meson: p241: add sound support https://git.kernel.org/amlogic/c/c5468e3c930d4d2937d3a842a85df0f74e95e152
Signature · 1 line
Neil