Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "dt-bindings/gpio/gpio.h"
- #include "dt-bindings/pinctrl/am33xx.h"
- /dts-v1/;
- /plugin/;
- / {
- compatible = "ti,beaglebone-black", "ti,beaglebone-green";
- /* identification */
- part-number = "LZ-PODTIQUE1";
- /* version */
- version = "00A0";
- fragment@0 {
- target = <&am33xx_pinmux>;
- __overlay__ {
- lz_podtique_reg_pins: pinmux_lz_podtique_reg_pins {
- pinctrl-single,pins = <
- 0x048 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) // P9_14, gpio1_18, GPIO 50, CODEC regulator enable
- 0x04c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) // P9_16, gpio1_19, GPIO 48, CODEC nRESET
- 0x1a4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) // P9_27, gpio3_19, GPIO 115, Front Panel Power
- >;
- };
- i2c2_pins: pinmux_i2c2_pins {
- pinctrl-single,pins = <
- 0x150 (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE2) // P9_22, spi0_scl.i2c2_sda
- 0x154 (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE2) // P9_21, spi0_d0.i2c2_scl
- >;
- };
- pru_pins: pinmux_pru_pins {
- pinctrl-single,pins = <
- 0x034 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) // P8_11, gpio1_13, GPIO 45, spi0_scl.i2c2_sda, NeoPixel data out
- >;
- };
- i2s_pins: pinmux_i2s_pins {
- pinctrl-single,pins = < // Hdr I2S TLV SoC
- 0x190 (PIN_INPUT | MUX_MODE0) // P9_31 BCLK BCLK mcasp0_aclkx
- 0x194 (PIN_INPUT | MUX_MODE0) // P9_29 WCLK WCLK mcasp0_fsx
- 0x198 (PIN_INPUT | MUX_MODE0) // P9_30 RX SDOUT mcasp0_axr0
- 0x19c (PIN_INPUT | MUX_MODE2) // P9_28 TX SDIN mcasp0_axr2
- 0x1ac (PIN_INPUT | MUX_MODE0) // P9_25 MCLK MCLK mcasp0_ahclkx
- >;
- };
- };
- };
- // GPIOs…
- fragment@2 {
- target = <&ocp>;
- __overlay__ {
- gpio_helper {
- compatible = "gpio-of-helper";
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&lz_podtique_reg_pins>;
- };
- };
- };
- // Set up the codec regulator…
- fragment@3 {
- target-path="/";
- __overlay__ {
- lz_codec_reg: fixedregulator@1 {
- compatible = "regulator-fixed";
- regulator-name = "lz-codec-reg";
- gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>; // GPIO_ACTIVE_HIGH is ignored by regulator-fixed,
- enable-active-high; // need to also have enable-active-high.
- };
- };
- };
- // Configure the i2c bus to the audio CODEC…
- fragment@4 {
- target = <&i2c2>;
- __overlay__ {
- #address-cells = <1>;
- #size-cells = <0>;
- clock-frequency = <100000>;
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&i2c2_pins>;
- tlv320aic3104: tlv320aic3104@0 {
- #sound-dai-cells = <0>;
- compatible = "ti,tlv320aic3104";
- reg = <0x18>;
- gpio-reset = <&gpio1 19 GPIO_ACTIVE_LOW>;
- AVDD-supply = <&lz_codec_reg>;
- IOVDD-supply = <&lz_codec_reg>;
- DRVDD-supply = <&lz_codec_reg>;
- DVDD-supply = <&lz_codec_reg>;
- };
- };
- };
- // Configure the McASP audio…
- fragment@5 {
- target = <&mcasp0>;
- __overlay__ {
- #sound-dai-cells = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&i2s_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>;
- };
- };
- // Create a sound card device…
- fragment@6 {
- target-path="/";
- __overlay__ {
- sound {
- compatible = "simple-audio-card";
- simple-audio-card,name = "Podtique Cape Rev A";
- simple-audio-card,widgets =
- "Speaker", "External Speaker";
- simple-audio-card,routing =
- "External Speaker", "LLOUT",
- "External Speaker", "RLOUT";
- simple-audio-card,format = "dsp_b";
- simple-audio-card,bitclock-master = <&sound_master>;
- simple-audio-card,frame-master = <&sound_master>;
- simple-audio-card,bitclock-inversion;
- simple-audio-card,cpu {
- sound-dai = <&mcasp0>;
- };
- sound_master: simple-audio-card,codec {
- #sound-dai-cells = <0>;
- sound-dai = <&tlv320aic3104>;
- clocks = <&clk_mcasp0>;
- clock-names = "mclk";
- };
- };
- };
- };
- // Enable ADC…
- fragment@7 {
- target = <&tscadc>;
- __overlay__ {
- status = "okay";
- adc {
- ti,adc-channels = <0 1 2>;
- };
- };
- };
- // Enable the PRUSS
- fragment@8 {
- target = <&pruss>;
- __overlay__ {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&pru_pins>;
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement