blob: 7cfddada934861bc1da2db9af61317a79707068b [file] [log] [blame]
Paul Barker1d49b8d2022-04-11 15:41:59 +00001// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
4 */
5
6#include <dt-bindings/display/tda998x.h>
7#include <dt-bindings/interrupt-controller/irq.h>
8
9&am33xx_pinmux {
10 nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {
11 pinctrl-single,pins = <
12 AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_OUTPUT_PULLDOWN, MUX_MODE3)
13 AM33XX_PADCONF(AM335X_PIN_LCD_DATA0, PIN_OUTPUT, MUX_MODE0)
14 AM33XX_PADCONF(AM335X_PIN_LCD_DATA1, PIN_OUTPUT, MUX_MODE0)
15 AM33XX_PADCONF(AM335X_PIN_LCD_DATA2, PIN_OUTPUT, MUX_MODE0)
16 AM33XX_PADCONF(AM335X_PIN_LCD_DATA3, PIN_OUTPUT, MUX_MODE0)
17 AM33XX_PADCONF(AM335X_PIN_LCD_DATA4, PIN_OUTPUT, MUX_MODE0)
18 AM33XX_PADCONF(AM335X_PIN_LCD_DATA5, PIN_OUTPUT, MUX_MODE0)
19 AM33XX_PADCONF(AM335X_PIN_LCD_DATA6, PIN_OUTPUT, MUX_MODE0)
20 AM33XX_PADCONF(AM335X_PIN_LCD_DATA7, PIN_OUTPUT, MUX_MODE0)
21 AM33XX_PADCONF(AM335X_PIN_LCD_DATA8, PIN_OUTPUT, MUX_MODE0)
22 AM33XX_PADCONF(AM335X_PIN_LCD_DATA9, PIN_OUTPUT, MUX_MODE0)
23 AM33XX_PADCONF(AM335X_PIN_LCD_DATA10, PIN_OUTPUT, MUX_MODE0)
24 AM33XX_PADCONF(AM335X_PIN_LCD_DATA11, PIN_OUTPUT, MUX_MODE0)
25 AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PIN_OUTPUT, MUX_MODE0)
26 AM33XX_PADCONF(AM335X_PIN_LCD_DATA13, PIN_OUTPUT, MUX_MODE0)
27 AM33XX_PADCONF(AM335X_PIN_LCD_DATA14, PIN_OUTPUT, MUX_MODE0)
28 AM33XX_PADCONF(AM335X_PIN_LCD_DATA15, PIN_OUTPUT, MUX_MODE0)
29 AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
30 AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
31 AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
32 AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
33 >;
34 };
35
36 nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
37 pinctrl-single,pins = <
38 AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_OUTPUT_PULLDOWN, MUX_MODE3)
39 >;
40 };
41
42 mcasp0_pins: mcasp0_pins {
43 pinctrl-single,pins = <
44 AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKX, PIN_INPUT_PULLUP, MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */
45 AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKR, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/
46 AM33XX_PADCONF(AM335X_PIN_MCASP0_FSX, PIN_OUTPUT_PULLUP, MUX_MODE0)
47 AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKX, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
48 AM33XX_PADCONF(AM335X_PIN_GPMC_A11, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a11.GPIO1_27 */
49 >;
50 };
51};
52
53&lcdc {
54 status = "okay";
55
56 /* If you want to get 24 bit RGB and 16 BGR mode instead of
57 * current 16 bit RGB and 24 BGR modes, set the propety
58 * below to "crossed" and uncomment the video-ports -property
59 * in tda19988 node.
60 */
61 blue-and-red-wiring = "straight";
62
63 port {
64 lcdc_0: endpoint@0 {
65 remote-endpoint = <&hdmi_0>;
66 };
67 };
68};
69
70&i2c0 {
71 tda19988: tda19988@70 {
72 compatible = "nxp,tda998x";
73 reg = <0x70>;
74 nxp,calib-gpios = <&gpio1 25 0>;
75 interrupts-extended = <&gpio1 25 IRQ_TYPE_LEVEL_LOW>;
76
77 pinctrl-names = "default", "off";
78 pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
79 pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
80
81 /* Convert 24bit BGR to RGB, e.g. cross red and blue wiring */
82 /* video-ports = <0x234501>; */
83
84 #sound-dai-cells = <0>;
85 audio-ports = < TDA998x_I2S 0x03>;
86
87 ports {
88 port@0 {
89 hdmi_0: endpoint@0 {
90 remote-endpoint = <&lcdc_0>;
91 };
92 };
93 };
94 };
95};
96
97&mcasp0 {
98 #sound-dai-cells = <0>;
99 pinctrl-names = "default";
100 pinctrl-0 = <&mcasp0_pins>;
101 status = "okay";
102 op-mode = <0>; /* MCASP_IIS_MODE */
103 tdm-slots = <2>;
104 serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
105 0 0 1 0
106 >;
107 tx-num-evt = <32>;
108 rx-num-evt = <32>;
109};
110
111/ {
112 clk_mcasp0_fixed: clk_mcasp0_fixed {
113 #clock-cells = <0>;
114 compatible = "fixed-clock";
115 clock-frequency = <24576000>;
116 };
117
118 clk_mcasp0: clk_mcasp0 {
119 #clock-cells = <0>;
120 compatible = "gpio-gate-clock";
121 clocks = <&clk_mcasp0_fixed>;
122 enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
123 };
124
125 sound {
126 compatible = "simple-audio-card";
127 simple-audio-card,name = "TI BeagleBone Black";
128 simple-audio-card,format = "i2s";
129 simple-audio-card,bitclock-master = <&dailink0_master>;
130 simple-audio-card,frame-master = <&dailink0_master>;
131
132 dailink0_master: simple-audio-card,cpu {
133 sound-dai = <&mcasp0>;
134 clocks = <&clk_mcasp0>;
135 };
136
137 simple-audio-card,codec {
138 sound-dai = <&tda19988>;
139 };
140 };
141};