mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
ODROID-N2:Added hifi-shield series dtbo. Support 7-pin I2S audio.
Change-Id: Ifd997df30260393a10bf49616fd18ecb978769cc
This commit is contained in:
@@ -216,10 +216,20 @@
|
||||
|
||||
/* Audio Related start */
|
||||
dummy_codec:dummy{
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "amlogic, aml_dummy_codec";
|
||||
status = "okay";
|
||||
};
|
||||
spdif_dit:spdif{
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "linux,spdif-dit";
|
||||
status = "okay";
|
||||
};
|
||||
pcm5102a: pcm5102a {
|
||||
compatible = "ti,pcm5102a";
|
||||
#sound-dai-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
amlogic_codec:t9015{
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "amlogic, aml_codec_T9015";
|
||||
@@ -261,7 +271,7 @@
|
||||
system-clock-frequency = <6144000>;
|
||||
};
|
||||
codec {
|
||||
sound-dai = <&dummy_codec>;
|
||||
sound-dai = <&spdif_dit>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -293,10 +303,21 @@
|
||||
system-clock-frequency = <6144000>;
|
||||
};
|
||||
codec {
|
||||
sound-dai = <&dummy_codec>;
|
||||
sound-dai = <&spdif_dit>;
|
||||
};
|
||||
};
|
||||
};
|
||||
odroid_hifi: odroid_hifi {
|
||||
compatible = "amlogic, g12a-sound-card";
|
||||
aml-audio-card,name = "ODROID-HIFI";
|
||||
status = "disabled";
|
||||
};
|
||||
odroid_hifi2: odroid_hifi2 {
|
||||
compatible = "amlogic, g12a-sound-card";
|
||||
aml-audio-card,name = "ODROID-HIFI2";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
audiolocker: locker {
|
||||
compatible = "amlogic, audiolocker";
|
||||
clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
|
||||
@@ -398,6 +419,25 @@
|
||||
|
||||
&audiobus {
|
||||
/* tdmc to internal DAC output, no pinmux */
|
||||
aml_tdmb: tdmb {
|
||||
compatible = "amlogic, g12a-snd-tdmb";
|
||||
#sound-dai-cells = <0>;
|
||||
dai-tdm-lane-slot-mask-in = <0 1 0 0>;
|
||||
dai-tdm-lane-slot-mask-out = <1 0 0 0>;
|
||||
dai-tdm-clk-sel = <1>;
|
||||
clocks = <&clkaudio CLKID_AUDIO_MCLK_B
|
||||
&clkc CLKID_MPLL1>;
|
||||
clock-names = "mclk", "clk_srcpll";
|
||||
pinctrl-names = "tdm_pins";
|
||||
pinctrl-0 = <&tdmb_mclk &tdmout_b /*&tdmin_b*/>;
|
||||
mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */
|
||||
i2s2hdmi = <0>;
|
||||
/*enable default mclk(12.288M), before extern codec start*/
|
||||
start_clk_enable = <1>;
|
||||
/*tdm clk tuning enable*/
|
||||
clk_tuning_enable = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
aml_tdmc: tdmc {
|
||||
compatible = "amlogic, g12a-snd-tdmc";
|
||||
#sound-dai-cells = <0>;
|
||||
@@ -410,7 +450,6 @@
|
||||
i2s2hdmi = <0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
aml_spdif: spdif {
|
||||
compatible = "amlogic, g12a-snd-spdif-a";
|
||||
#sound-dai-cells = <0>;
|
||||
@@ -576,6 +615,22 @@
|
||||
};
|
||||
|
||||
&pinctrl_periphs {
|
||||
tdmb_mclk: tdmb_mclk {
|
||||
mux {
|
||||
groups = "mclk0_a";
|
||||
function = "mclk0";
|
||||
drive-strength = <2>;
|
||||
};
|
||||
};
|
||||
tdmout_b: tdmout_b {
|
||||
mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
|
||||
groups = "tdmb_sclk",
|
||||
"tdmb_fs",
|
||||
"tdmb_dout0";
|
||||
function = "tdmb_out";
|
||||
drive-strength = <2>;
|
||||
};
|
||||
};
|
||||
spdifout: spdifout {
|
||||
mux {/* GPIOA_11 */
|
||||
groups = "spdif_out_a11";
|
||||
|
||||
@@ -13,6 +13,8 @@ dtbo-$(CONFIG_ARCH_MESON64_ODROIDN2) += spi0.dtbo \
|
||||
irblaster.dtbo \
|
||||
onewire.dtbo \
|
||||
can0.dtbo \
|
||||
hifishield.dtbo \
|
||||
hifishield2.dtbo \
|
||||
fanspeed-full.dtbo \
|
||||
gpio_spdif.dtbo \
|
||||
pwm_cd.dtbo \
|
||||
|
||||
64
arch/arm64/boot/dts/amlogic/overlays/odroidn2/hifishield.dts
Normal file
64
arch/arm64/boot/dts/amlogic/overlays/odroidn2/hifishield.dts
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* arch/arm64/boot/dts/amlogic/overlays/odroidn2/hifishield.dts
|
||||
*
|
||||
* Copyright (C) 2021 Hardkernel, Inc. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&aml_tdmb>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@1 {
|
||||
target = <&pcm5102a>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&odroid_hifi>;
|
||||
|
||||
__overlay__ {
|
||||
compatible = "amlogic, g12a-sound-card";
|
||||
aml-audio-card,name = "ODROID-HIFI";
|
||||
status = "okay";
|
||||
|
||||
/* ODROID-C4: I2S out(J7)*/
|
||||
aml-audio-card,dai-link@0 {
|
||||
format = "i2s";
|
||||
mclk-fs = <256>;
|
||||
continuous-clock;
|
||||
bitclock-master = <&aml_tdmb>;
|
||||
frame-master = <&aml_tdmb>;
|
||||
cpu {
|
||||
sound-dai = <&aml_tdmb>;
|
||||
dai-tdm-slot-tx-mask = <1 1>;
|
||||
dai-tdm-slot-rx-mask = <1 1>;
|
||||
dai-tdm-slot-num = <2>;
|
||||
dai-tdm-slot-width = <32>;
|
||||
system-clock-frequency = <12288000>;
|
||||
};
|
||||
codec {
|
||||
sound-dai = <&pcm5102a>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* arch/arm64/boot/dts/amlogic/overlays/odroidn2/hifishield2.dts
|
||||
*
|
||||
* Copyright (C) 2021 Hardkernel, Inc. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target = <&aml_tdmb>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
// i2c2 aliased with i2c0.
|
||||
target = <&i2c2>;
|
||||
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pcm5242: pcm5242@4c {
|
||||
compatible = "ti,pcm5242";
|
||||
reg = <0x4c>;
|
||||
#sound-dai-cells = <0>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&odroid_hifi2>;
|
||||
|
||||
__overlay__ {
|
||||
compatible = "amlogic, g12a-sound-card";
|
||||
aml-audio-card,name = "ODROID-HIFI2";
|
||||
status = "okay";
|
||||
|
||||
/* ODROID-C4: I2S out(J7)*/
|
||||
aml-audio-card,dai-link@0 {
|
||||
format = "i2s";
|
||||
mclk-fs = <256>;
|
||||
continuous-clock;
|
||||
bitclock-master = <&aml_tdmb>;
|
||||
frame-master = <&aml_tdmb>;
|
||||
cpu {
|
||||
sound-dai = <&aml_tdmb>;
|
||||
dai-tdm-slot-tx-mask = <1 1>;
|
||||
dai-tdm-slot-rx-mask = <1 1>;
|
||||
dai-tdm-slot-num = <2>;
|
||||
dai-tdm-slot-width = <32>;
|
||||
system-clock-frequency = <12288000>;
|
||||
};
|
||||
codec {
|
||||
sound-dai = <&pcm5242>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user