Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: rockchip-max98090: Support usage with and without HDMI

Add one optional property "rockchip,hdmi-codec" to let user specify HDMI
device node in DTS so machine driver can find hdmi-codec device node for
HDMI codec DAI.

Use the presence of rockchip,audio-codec and rockchip,hdmi-codec to
specify the use case.

Use max98090 only : specify rockchip,audio-codec.
Use HDMI only: specify rockchip,hdmi-codec.
Use both max98090 and HDMI: specify rockchip,audio-codec and
rockchip,hdmi-codec.

Move these properties to optional because they are not needed for
HDMI-only use case.
"rockchip,audio-codec": The phandle of the MAX98090 audio codec
"rockchip,headset-codec": The phandle of Ext chip for jack detection

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Link: https://lore.kernel.org/r/20191028071930.145899-3-cychiang@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Cheng-Yi Chiang and committed by
Mark Brown
f03412b7 a9c82d63

+25 -2
+25 -2
Documentation/devicetree/bindings/sound/rockchip-max98090.txt
··· 5 5 - rockchip,model: The user-visible name of this sound complex 6 6 - rockchip,i2s-controller: The phandle of the Rockchip I2S controller that's 7 7 connected to the CODEC 8 - - rockchip,audio-codec: The phandle of the MAX98090 audio codec 9 - - rockchip,headset-codec: The phandle of Ext chip for jack detection 8 + 9 + Optional properties: 10 + - rockchip,audio-codec: The phandle of the MAX98090 audio codec. 11 + - rockchip,headset-codec: The phandle of Ext chip for jack detection. This is 12 + required if there is rockchip,audio-codec. 13 + - rockchip,hdmi-codec: The phandle of HDMI device for HDMI codec. 10 14 11 15 Example: 12 16 17 + /* For max98090-only board. */ 13 18 sound { 14 19 compatible = "rockchip,rockchip-audio-max98090"; 15 20 rockchip,model = "ROCKCHIP-I2S"; 16 21 rockchip,i2s-controller = <&i2s>; 17 22 rockchip,audio-codec = <&max98090>; 18 23 rockchip,headset-codec = <&headsetcodec>; 24 + }; 25 + 26 + /* For HDMI-only board. */ 27 + sound { 28 + compatible = "rockchip,rockchip-audio-max98090"; 29 + rockchip,model = "ROCKCHIP-I2S"; 30 + rockchip,i2s-controller = <&i2s>; 31 + rockchip,hdmi-codec = <&hdmi>; 32 + }; 33 + 34 + /* For max98090 plus HDMI board. */ 35 + sound { 36 + compatible = "rockchip,rockchip-audio-max98090"; 37 + rockchip,model = "ROCKCHIP-I2S"; 38 + rockchip,i2s-controller = <&i2s>; 39 + rockchip,audio-codec = <&max98090>; 40 + rockchip,headset-codec = <&headsetcodec>; 41 + rockchip,hdmi-codec = <&hdmi>; 19 42 };