Ok,
Because I’ve many devices on the I2C, I decided to make one dtsi file:
The pinmux part :
&am33xx_pinmux {
i2c2_pins: pinmux_i2c2_pins {
pinctrl-single,pins = <
BONE_P9_20 0x73 /* (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE3) uart1_ctsn.i2c2_sda */
BONE_P9_19 0x73 /* (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE3) uart1_rtsn.i2c2_scl */
;
};
bone_audio_cape_audio_pins: pinmux_bone_audio_cape_audio_pins {
pinctrl-single,pins = <
0x1ac 0x00 /* mcasp0_ahclkx, MODE0 | INPUT */
0x19c 0x22 /* mcasp0_ahclkr, */
0x194 0x20 /* mcasp0_fsx, MODE0 | OUTPUT */
0x190 0x20 /* mcasp0_aclkr.mcasp0_aclkx, MODE0 | OUTPUT_PULLDOWN */
;
};
};
The I2C2 part :
&i2c2 {
pinctrl-names = “default”;
pinctrl-0 = <&i2c2_pins>;
status = “okay”;
clock-frequency = <100000>;
rtc@68 {
compatible = “ignored,mcp7941x”;
reg = <0x68>;
status = “okay”;
};
tlv320aic3x@18 {
compatible = “ti,tlv320aic3x”;
reg = <0x18>;
status = “okay”;
};
};
But I’ve difficulty to include the audio part :
In the cap file I’ve :
fragment@2 {
target = <&mcasp0>;
overlay {
pinctrl-names = “default”;
pinctrl-0 = <&bone_audio_cape_audio_pins>;
status = “okay”;
op-mode = <0>; /* MCASP_IIS_MODE /
tdm-slots = <2>;
num-serializer = <16>;
serial-dir = < / 0: INACTIVE, 1: TX, 2: RX */
2 0 1 0
0 0 0 0
0 0 0 0
0 0 0 0
;
tx-num-evt = <1>;
rx-num-evt = <1>;
};
};
fragment@3 {
target = <&ocp>;
overlay {
sound {
compatible = “ti,da830-evm-audio”;
ti,model = “DA830 EVM”;
ti,audio-codec = <&tlv320aic3x>;
ti,mcasp-controller = <&mcasp0>;
ti,codec-clock-rate = <12000000>;
ti,audio-routing =
“Headphone Jack”, “HPLOUT”,
“Headphone Jack”, “HPROUT”,
“LINE1L”, “Line In”,
“LINE1R”, “Line In”;
};
};
};
Can I do that :
&mcasp0{
pinctrl-names = “default”;
pinctrl-0 = <&bone_audio_cape_audio_pins>;
status = “okay”;
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
num-serializer = <16>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
2 0 1 0
0 0 0 0
0 0 0 0
0 0 0 0
;
tx-num-evt = <1>;
rx-num-evt = <1>;
}
&ocp{
sound {
compatible = “ti,da830-evm-audio”;
ti,model = “DA830 EVM”;
ti,audio-codec = <&tlv320aic3x>;
ti,mcasp-controller = <&mcasp0>;
ti,codec-clock-rate = <12000000>;
ti,audio-routing =
“Headphone Jack”, “HPLOUT”,
“Headphone Jack”, “HPROUT”,
“LINE1L”, “Line In”,
“LINE1R”, “Line In”;
};
}
I have also to find the driver (or code it) for:
Micka,