Skip to content

Instantly share code, notes, and snippets.

@rvega
Last active October 12, 2019 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rvega/fd10ad2533c0bd2e4b152696436226ae to your computer and use it in GitHub Desktop.
Save rvega/fd10ad2533c0bd2e4b152696436226ae to your computer and use it in GitHub Desktop.
/dts-v1/;
#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include "am335x-bonegreen-common.dtsi"
/* #include "am335x-bone-jtag.dtsi" */
&am33xx_pinmux {
mostro_audio_pins: pinmux_mostro_audio_pins {
pinctrl-single,pins = <
0x190 0x20 /* BCLK P9.31 MUX_MODE0 (mcasp0_aclkx), INPUT_PULLDOWN */
0x194 0x20 /* WCLK P9.29 MUX_MODE0 (mcasp0_fsx), INPUT_PULLDOWN */
0x198 0x20 /* DIN P9.30 MUX_MODE0 (mcasp0_axr0), INPUT_PULLDOWN */
0x19c 0x02 /* DOUT P9.28 MUX_MODE2 (mcasp0_axr2), OUTPUT_PULLDOWN */
0x1ac 0x20 /* MCLK P9.25 MUX_MODE0 (mcasp0_ahclkx), INPUT_PULLDOWN) */
0x06c 0x07 /* Clock enable gpio1[27] MUX_MODE7, OUTPUT_PULLDOWN) */
>;
};
i2c2_pins: pinmux_i2c2_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_ctsn.i2c2_sda */
AM33XX_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_rtsn.i2c2_scl */
>;
};
};
&i2c2 {
codec320: tlv320aic3104@18 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "ti,tlv320aic3104";
reg = <0x18>;
};
};
&mcasp0 {
#sound-dai-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mostro_audio_pins>;
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
>;
rx-num-evt = <1>;
tx-num-evt = <1>;
};
/ {
model = "TI AM335x BeagleBone Green";
compatible = "ti,am335x-bone-green", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
chosen {
base_dtb = "am335x-bonegreen.dts";
base_dtb_timestamp = __TIMESTAMP__;
};
clk_mcasp0_fixed: clk_mcasp0_fixed {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24576000>;
};
clk_mcasp0: clk_mcasp0 {
#clock-cells = <0>;
compatible = "gpio-gate-clock";
clocks = <&clk_mcasp0_fixed>;
enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27, the actual clock is on gpio3[21] (P9.25) */
};
sound {
status = "okay";
compatible = "simple-audio-card";
simple-audio-card,name = "Mostro Audio";
simple-audio-card,widgets =
"Headphone", "Headphone Jack",
"Line", "Line In";
simple-audio-card,routing =
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT",
"LINE1L", "Line In",
"LINE1R", "Line In";
simple-audio-card,dai-link {
format = "dsp_b";
bitclock-master = <&sndmaster>;
frame-master = <&sndmaster>;
bitclock-inversion;
cpu {
sound-dai = <&mcasp0>;
};
sndmaster:codec {
sound-dai = <&codec320>;
clocks = <&clk_mcasp0>;
clock-names = "mclk";
};
};
};
};
&sgx {
status = "okay";
};
/dts-v1/;
#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include "am335x-bonegreen-common.dtsi"
/* #include "am335x-bone-jtag.dtsi" */
&am33xx_pinmux {
mostro_audio_pins: pinmux_mostro_audio_pins {
pinctrl-single,pins = <
0x190 0x20 /* BCLK P9.31 MUX_MODE0 (mcasp0_aclkx), INPUT_PULLDOWN */
0x194 0x20 /* WCLK P9.29 MUX_MODE0 (mcasp0_fsx), INPUT_PULLDOWN */
0x198 0x20 /* DIN P9.30 MUX_MODE0 (mcasp0_axr0), INPUT_PULLDOWN */
0x19c 0x02 /* DOUT P9.28 MUX_MODE2 (mcasp0_axr2), OUTPUT_PULLDOWN */
0x1ac 0x20 /* MCLK P9.25 MUX_MODE0 (mcasp0_ahclkx), INPUT_PULLDOWN) */
0x06c 0x07 /* Clock enable gpio1[27] MUX_MODE7, OUTPUT_PULLDOWN) */
>;
};
i2c2_pins: pinmux_i2c2_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_ctsn.i2c2_sda */
AM33XX_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_rtsn.i2c2_scl */
>;
};
};
&i2c2 {
codec320: tlv320aic3104@18 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "ti,tlv320aic3104";
reg = <0x18>;
};
};
&mcasp0 {
#sound-dai-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mostro_audio_pins>;
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
>;
rx-num-evt = <1>;
tx-num-evt = <1>;
};
/ {
model = "TI AM335x BeagleBone Green";
compatible = "ti,am335x-bone-green", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
chosen {
base_dtb = "am335x-bonegreen.dts";
base_dtb_timestamp = __TIMESTAMP__;
};
clk_mcasp0_fixed: clk_mcasp0_fixed {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24576000>;
};
clk_mcasp0: clk_mcasp0 {
#clock-cells = <0>;
compatible = "gpio-gate-clock";
clocks = <&clk_mcasp0_fixed>;
/* enable-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>; /1* BeagleBone Black Clk enable on GPIO1_27, the actual clock is on gpio3[21] (P9.25) *1/ */
enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27, the actual clock is on gpio3[21] (P9.25) */
};
sound {
status = "okay";
compatible = "simple-audio-card";
simple-audio-card,name = "Mostro Audio";
simple-audio-card,widgets =
"Headphone", "Headphone Jack",
"Line", "Line In";
simple-audio-card,routing =
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT",
"LINE1L", "Line In",
"LINE1R", "Line In";
simple-audio-card,format = "dsp_b";
simple-audio-card,bitclock-master = <&sndmaster>;
simple-audio-card,frame-master = <&sndmaster>;
simple-audio-card,bitclock-inversion;
simple-audio-card,cpu {
sound-dai = <&mcasp0>;
bitclock-inversion;
};
simple-audio-card,codec {
sound-dai = <&codec320>;
clocks = <&clk_mcasp0>;
clock-names = "mclk";
bitclock-master;
frame-master;
bitclock-inversion;
};
};
};
&sgx {
status = "okay";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment