Finally, I have prepared the DT file after a few compilation cycles:
because the i2c@3160000 was already defined I had to add at the end of i2c@3160000:
i2c@3160000 {
reg = <0x0 0x3160000 0x0 0x100>;
dmas = <0x19 0x15 0x19 0x15>;
interrupts = <0x0 0x19 0x4>;
compatible = "nvidia,tegra186-i2c";
clock-names = "div-clk", "parent", "slow-clk";
reset-names = "i2c";
clock-frequency = <0x61a80>;
scl-gpio = <0x12 0x15 0x0>;
sda-gpio = <0x12 0x16 0x0>;
clocks = <0xd 0x2f 0xd 0x10d 0xd 0x5c>;
resets = <0xd 0x13>;
status = "okay";
#address-cells = <0x1>;
phandle = <0x8a>;
#stream-id-cells = <0x1>;
#size-cells = <0x0>;
dma-names = "rx", "tx";
linux,phandle = <0x8a>;
prod-settings {
prod_c_fmplus {
prod = <0x6c 0xffff0000 0x100000 0x94 0x3f00 0x200>;
};
prod_c_fm {
prod = <0x6c 0xffff0000 0x190000 0x94 0x3f00 0x200>;
};
prod_c_hs {
prod = <0x6c 0xffff 0x2 0x9c 0x3f00 0x300>;
};
prod_c_sm {
prod = <0x6c 0xffff0000 0x160000 0x94 0x3f00 0x300>;
};
};
lp8557-backlight-s-wuxga-8-0@2c {
reg = <0x2c>;
pwms = <0x1b 0x0 0x9ce1>;
compatible = "ti,lp8557";
disable-on-kernel-charging;
bl-measured = <0x0 0x1 0x2 0x3 0x4 0x5 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xb 0xc 0xd 0xe 0xf 0xf 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x25 0x26 0x27 0x28 0x29 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x36 0x37 0x38 0x39 0x3a 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47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0x1a 0x1b 0x1b 0x1c 0x1c 0x1d 0x1d 0x1e 0x1e 0x1f 0x1f 0x20 0x21 0x21 0x22 0x22 0x23 0x23 0x24 0x24 0x25 0x25 0x26 0x26 0x27 0x28 0x28 0x29 0x29 0x2a 0x2a 0x2b 0x2b 0x2c 0x2c 0x2d 0x2e 0x2e 0x2f 0x2f 0x30 0x30 0x31 0x31 0x32 0x32 0x33 0x34 0x34 0x35 0x35 0x36 0x36 0x37 0x37 0x38 0x38 0x39 0x39 0x3a 0x3b 0x3b 0x3c 0x3c 0x3d 0x3d 0x3e 0x3e 0x3f 0x3f 0x40 0x41 0x41 0x42 0x42 0x43 0x43 0x44 0x44 0x45 0x45 0x46 0x46 0x47 0x48 0x48 0x49 0x49 0x4a 0x4a 0x4b 0x4b 0x4c 0x4c 0x4d 0x4e 0x4e 0x4f 0x4f 0x50 0x50 0x51 0x51 0x52 0x52 0x53 0x53 0x54 0x55 0x55 0x56 0x56 0x57 0x57 0x58 0x58 0x59 0x59 0x5a 0x5c 0x5e 0x60 0x61 0x63 0x65 0x67 0x69 0x6b 0x6d 0x6e 0x70 0x72 0x74 0x76 0x78 0x7a 0x7b 0x7d 0x7f 0x81 0x83 0x85 0x86 0x88 0x8a 0x8c 0x8e 0x90 0x92 0x93 0x95 0x97 0x99 0x9b 0x9d 0x9f 0xa0 0xa2 0xa4 0xa6 0xa8 0xaa 0xac 0xad 0xaf 0xb1 0xb3 0xb5 0xb7 0xb9 0xba 0xbc 0xbe 0xc0 0xc2 0xc4 0xc6 0xc7 0xc9 0xcb 0xcd 0xcf 0xd1 0xd3 0xd4 0xd6 0xd8 0xda 0xdc 0xde 0xdf 0xe1 0xe3 0xe5 0xe7 0xe9 0xeb 0xec 0xee 0xf0 0xf2 0xf4 0xf6 0xf8 0xf9 0xfb 0xfd 0xff>;
dev-ctrl = [80];
status = "disabled";
pwm-names = "lp8557";
bl-name = "pwm-backlight";
init-brt = [ff];
power-supply = <0x1a>;
rom_11h {
rom-val = [05];
rom-addr = [11];
};
rom_13h {
rom-val = [01];
rom-addr = [13];
};
rom_14h {
rom-val = [9f];
rom-addr = [14];
};
};
gpio@21 {
reg = <0x21>;
#gpio-cells = <0x2>;
compatible = "ti,tca6408";
status = "disabled";
vcc-supply = <0x1a>;
phandle = <0x33>;
gpio-controller;
linux,phandle = <0x33>;
vpp-vmm-rails {
gpios = <0x2 0x0 0x3 0x0>;
label = "vmm-en-rail", "vmm-en-rail";
output-high;
gpio-hog;
};
};
gpio@74 {
reg = <0x74>;
#gpio-cells = <0x2>;
compatible = "ti,tca9539";
vcc-supply = <0x1a>;
phandle = <0x107>;
gpio-controller;
linux,phandle = <0x107>;
touch-rails {
gpios = <0x1 0x0 0x2 0x0>;
label = "touch-rail-1", "touch-rail-2";
output-high;
gpio-hog;
};
};
gpio@77 {
reg = <0x77>;
#gpio-cells = <0x2>;
compatible = "ti,tca9539";
vcc-supply = <0x1a>;
phandle = <0xc4>;
gpio-controller;
linux,phandle = <0xc4>;
lcd-bias-rails {
gpios = <0x4 0x0>;
label = "lcd-bias-en-rail";
output-high;
gpio-hog;
};
};
ina3221x@40 {
reg = <0x40>;
ti,continuous-config = <0x7c07>;
compatible = "ti,ina3221x";
ti,trigger-config = <0x7003>;
ti,enable-forced-continuous;
#address-cells = <0x1>;
phandle = <0x114>;
#size-cells = <0x0>;
linux,phandle = <0x114>;
channel@0 {
reg = <0x0>;
ti,shunt-resistor-mohm = <0xa>;
ti,rail-name = "VDD_SYS_GPU";
};
channel@1 {
reg = <0x1>;
ti,shunt-resistor-mohm = <0xa>;
ti,rail-name = "VDD_SYS_SOC";
};
channel@2 {
reg = <0x2>;
ti,shunt-resistor-mohm = <0xa>;
ti,rail-name = "VDD_4V0_WIFI";
};
};
ina3221x@41 {
reg = <0x41>;
ti,continuous-config = <0x7c07>;
compatible = "ti,ina3221x";
ti,trigger-config = <0x7003>;
ti,enable-forced-continuous;
#address-cells = <0x1>;
phandle = <0x115>;
#size-cells = <0x0>;
linux,phandle = <0x115>;
channel@0 {
reg = <0x0>;
ti,shunt-resistor-mohm = <0x14>;
ti,rail-name = "VDD_IN";
};
channel@1 {
reg = <0x1>;
ti,shunt-resistor-mohm = <0xa>;
ti,rail-name = "VDD_SYS_CPU";
};
channel@2 {
reg = <0x2>;
ti,shunt-resistor-mohm = <0xa>;
ti,rail-name = "VDD_SYS_DDR";
};
};
ina3221x@42 {
reg = <0x42>;
ti,continuous-config = <0x7c07>;
compatible = "ti,ina3221x";
ti,trigger-config = <0x7003>;
ti,enable-forced-continuous;
#address-cells = <0x1>;
#size-cells = <0x0>;
channel@0 {
reg = <0x0>;
ti,shunt-resistor-mohm = <0x14>;
ti,rail-name = "VDD_MUX";
};
channel@1 {
reg = <0x1>;
ti,shunt-resistor-mohm = <0x5>;
ti,rail-name = "VDD_5V0_IO_SYS";
};
channel@2 {
reg = <0x2>;
ti,shunt-resistor-mohm = <0xa>;
ti,rail-name = "VDD_3V3_SYS";
};
};
ina3221x@43 {
reg = <0x43>;
ti,continuous-config = <0x7c07>;
compatible = "ti,ina3221x";
ti,trigger-config = <0x7003>;
ti,enable-forced-continuous;
#address-cells = <0x1>;
#size-cells = <0x0>;
channel@0 {
reg = <0x0>;
ti,shunt-resistor-mohm = <0xa>;
ti,rail-name = "VDD_3V3_IO_SLP";
};
channel@1 {
reg = <0x1>;
ti,shunt-resistor-mohm = <0xa>;
ti,rail-name = "VDD_1V8_IO";
};
channel@2 {
reg = <0x2>;
ti,shunt-resistor-mohm = <0xa>;
ti,rail-name = "VDD_3V3_SYS_M2";
};
};
tps65132@3e {
reg = <0x3e>;
compatible = "ti,tps65132";
status = "disabled";
phandle = <0x127>;
linux,phandle = <0x127>;
outn {
regulator-name = "outn";
enable-active-high;
regulator-min-microvolt = <0x3d0900>;
ti,disable-active-discharge;
regulator-max-microvolt = <0x5b8d80>;
phandle = <0xc0>;
linux,phandle = <0xc0>;
};
outp {
regulator-name = "outp";
enable-active-high;
regulator-min-microvolt = <0x3d0900>;
regulator-max-microvolt = <0x5b8d80>;
phandle = <0xbf>;
linux,phandle = <0xbf>;
};
};
aic32x4: tlv320aic32x4.0-0018@18 {
compatible = "ti,tlv320aic32x4";
reg = <0x18>;
};
};
Then I have added âmyâ sound token configuration, which had to be modified to point to an âhandleâ of the axbar, and the cpu_dai handle which supposed to point to the I2S1 handle, and include another dai for recording audio:
sound {
compatible = "nvidia,tegra-audio-t210ref";
nvidia,model = "tegra-snd-t210ref";
nvidia,num-codec-link = <2>;
nvidia,audio-routing =
"Headphone-z", "HPL",
"Headphone-z", "HPR",
"IN1_L", "LineIn-z",
"IN1_R", "LineIn-z";
//nvidia,xbar = <&tegra_axbar>;
nvidia,xbar = <0xce>;
nvidia,dai-link-1 {
link-name = "ti-capture-z";
cpu-dai = <0xcf>;
codec-dai = <&aic32x4>;
cpu-dai-name = "I2S1";
codec-dai-name = "tlv320aic32x4-hifi";
tx-mask = <0xFF>;
rx-mask = <0xFF>;
format = "i2s";
bitclock-slave;
frame-slave;
bitclock-noninversion;
frame-noninversion;
bit-format = "s16_le";
bclk_ratio = <2>;
srate = <44100>;
num-channel = <2>;
ignore_suspend;
name-prefix = "z";
};
nvidia,dai-link-2 {
link-name = "ti-playback-x";
cpu-dai = <0xcf>;
codec-dai = <&aic32x4>;
cpu-dai-name = "I2S1";
codec-dai-name = "tlv320aic32x4-hifi";
tx-mask = <0xFF>;
rx-mask = <0xFF>;
format = "i2s";
bitclock-slave;
frame-slave;
bitclock-noninversion;
frame-noninversion;
bit-format = "s16_le";
bclk_ratio = <2>;
srate = <44100>;
num-channel = <2>;
ignore_suspend;
name-prefix = "x";
};
};
The I2S handle was taken from the ahub:
ahub {
reg = <0x0 0x2900800 0x0 0x800>;
compatible = "nvidia,tegra210-axbar";
clock-names = "ahub", "pll_a_out0", "apb2ape", "xbar.ape";
clocks = <0xd 0x57 0xd 0xf6 0xd 0x68 0xd 0x69>;
power-domains = <0x34>;
ranges = <0x2900000 0x0 0x2900000 0x20000>;
status = "okay";
#address-cells = <0x1>;
phandle = <0xce>;
#size-cells = <0x1>;
linux,phandle = <0xce>;
wakeup-disable;
i2s@2901000 {
reg = <0x2901000 0x100>;
pinctrl-0;
pinctrl-1;
compatible = "nvidia,tegra210-i2s";
clock-names = "i2s1", "pll_a_out0", "ext_audio_sync", "audio_sync";
fsync-width = <0x1f>;
clocks = <0xd 0x4f 0xd 0xf6 0xd 0x269 0xd 0xf7>;
nvidia,ahub-i2s-id = <0x0>;
status = "okay";
phandle = <0xcf>;
pinctrl-names = "dap_active", "dap_inactive";
linux,phandle = <0xcf>;
};
...
};
programmed the DT realizing the following from the log file:
...
[ 0.174932] Tegra reboot handler registered.
[ 0.175957] Registering Tegra186 clocks (this may take a while)...done
[ 0.177268] arm-smmu 12000000.iommu: probing hardware configuration...
[ 0.177284] arm-smmu 12000000.iommu: SMMUv2 with:
[ 0.177296] arm-smmu 12000000.iommu: stage 1 translation
[ 0.177309] arm-smmu 12000000.iommu: stage 2 translation
[ 0.177319] arm-smmu 12000000.iommu: nested translation
[ 0.177333] arm-smmu 12000000.iommu: stream matching with 128 register groups, mask 0x7f80
[ 0.177351] arm-smmu 12000000.iommu: SMMU address space size (0x800000) differs from mapped region size (0x1000000)!
[ 0.177370] arm-smmu 12000000.iommu: 64 context banks (0 stage-2 only)
[ 0.177383] arm-smmu 12000000.iommu: Stage-1: 39-bit VA -> 48-bit IPA
[ 0.177395] arm-smmu 12000000.iommu: Stage-2: 39-bit IPA -> 48-bit PA
[ 0.207927] /iommu@12000000: could not get #stream-id-cells for /i2c@3160000/tlv320aic32x4.0-0018@18
[ 0.207946] arm-smmu 12000000.iommu: registered 38 master devices
[ 0.210111] mc: mapped MMIO address: 0xffffff8000540000 -> 0x2c10000
[ 0.210134] mc: mapped MMIO address: 0xffffff8000560000 -> 0x2c20000
[ 0.210154] mc: mapped MMIO address: 0xffffff8000640000 -> 0x2c30000
[ 0.210173] mc: mapped MMIO address: 0xffffff8000660000 -> 0x2c40000
[ 0.210191] mc: mapped MMIO address: 0xffffff8000fa0000 -> 0x2c50000
...
What is the meaning of this failure?
Igal