blob: 1c838a390b82f12399878d530ff277f91176c5e3 [file] [log] [blame]
Angel Pons96d93d12020-04-05 13:22:23 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Stefan Reinauera7198b32012-12-11 16:00:47 -08002
3/*
4 * Parrot audio ports:
5 * ALC269:
6 * out:
7 * Internal Speaker: PORT D (0x14)
8 * Headphone: PORT A - (0x21) (SenseA)
9 *
10 * in:
11 * Mic2: PORT F (0x19) (SenseB)
12 * Line2 (internal Mic): PORT E (0x1B)
13 * PCBeep
14 *
15 * HDMI PatherPoint
16 */
17
Vladimir Serbinenko75c83872014-09-05 01:01:31 +020018#include <device/azalia_device.h>
19
20const u32 cim_verb_data[] = {
Stefan Reinauera7198b32012-12-11 16:00:47 -080021 /* coreboot specific header */
22 0x10ec0269, // Codec Vendor / Device ID: Realtek ALC269
23 0x10250742, // Subsystem ID
24 0x0000000E, // Number of jacks (NID entries)
25
Stefan Reinauera7198b32012-12-11 16:00:47 -080026 /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x10250742 */
Angel Ponsec211702019-12-19 19:37:21 +010027 AZALIA_SUBVENDOR(0, 0x10250742),
Stefan Reinauera7198b32012-12-11 16:00:47 -080028
29 /* Pin Widget Verb Table */
30
31 /* Pin Complex (NID 0x12) DMIC */
Angel Ponsec211702019-12-19 19:37:21 +010032 AZALIA_PIN_CFG(0, 0x12, 0x411111f0),
Stefan Reinauera7198b32012-12-11 16:00:47 -080033
34 /* Pin Complex (NID 0x14) SPKR-OUT PORTD */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020035 // group 1, front left/right
36 // no connector, no jack detect
37 // speaker out, analog
38 // fixed function, internal
Angel Ponsec211702019-12-19 19:37:21 +010039 AZALIA_PIN_CFG(0, 0x14, 0x90170110),
Stefan Reinauera7198b32012-12-11 16:00:47 -080040
41 /* Pin Complex (NID 0x17) */
Angel Ponsec211702019-12-19 19:37:21 +010042 AZALIA_PIN_CFG(0, 0x17, 0x411111f0),
Stefan Reinauera7198b32012-12-11 16:00:47 -080043
44 /* Pin Complex (NID 0x18) MIC1 PORTB */
Angel Ponsec211702019-12-19 19:37:21 +010045 AZALIA_PIN_CFG(0, 0x18, 0x411111f0),
Stefan Reinauera7198b32012-12-11 16:00:47 -080046
47 /* Pin Complex (NID 0x19) MIC2 PORTF */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020048 // group 2, cap 1
49 // black, jack detect
50 // mic in, analog
51 // connector, right panel
Angel Ponsec211702019-12-19 19:37:21 +010052 AZALIA_PIN_CFG(0, 0x19, 0x04a71021),
Stefan Reinauera7198b32012-12-11 16:00:47 -080053
54 /* Pin Complex (NID 0x1A) LINE1 PORTC */
Angel Ponsec211702019-12-19 19:37:21 +010055 AZALIA_PIN_CFG(0, 0x1a, 0x411111f0),
Stefan Reinauera7198b32012-12-11 16:00:47 -080056
57 /* Pin Complex (NID 0x1B) LINE2 PORTE */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020058 // group 2, cap 0
59 // no connector, no jack detect
60 // mic in, analog
61 // fixed function, internal
Angel Ponsec211702019-12-19 19:37:21 +010062 AZALIA_PIN_CFG(0, 0x1b, 0x90a70120),
Stefan Reinauera7198b32012-12-11 16:00:47 -080063
64 /* Pin Complex (NID 0x1d) PCBeep */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020065 // eapd low on ex-amp, laptop, custom enable
66 // mute spkr on hpout
Elyes HAOUAS22f8ee02020-02-22 14:13:59 +010067 // pcbeep enable, checksum
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020068 // no physical, internal
Angel Ponsec211702019-12-19 19:37:21 +010069 AZALIA_PIN_CFG(0, 0x1d, 0x4015812d),
Stefan Reinauera7198b32012-12-11 16:00:47 -080070
71 /* Pin Complex (NID 0x1E) SPDIF-OUT */
Angel Ponsec211702019-12-19 19:37:21 +010072 AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
Stefan Reinauera7198b32012-12-11 16:00:47 -080073
74 /* Pin Complex (NID 0x21) HPOUT PORTA? */
Vladimir Serbinenko02d674a2014-09-04 22:04:11 +020075 // group1,
76 // black, jack detect
77 // HPOut, 1/8 stereo
78 // connector, right panel
Angel Ponsec211702019-12-19 19:37:21 +010079 AZALIA_PIN_CFG(0, 0x21, 0x0421101f),
Stefan Reinauera7198b32012-12-11 16:00:47 -080080
81 /* Undocumented speaker output volume settings from Compal and Realtek */
82 /* Widget node 0x20 */
83 0x02050011,
84 0x02040710,
85 0x02050012,
86 0x02041901,
87
88 0x02050002,
89 0x0204AAB8,
90 0x0205000D,
91 0x02044440,
92
93 0x02050008,
94 0x02040300,
95 0x02050017,
96 0x020400AF,
97
98 /* --- Next Codec --- */
99
100 /* coreboot specific header */
101 0x80862806, // Codec Vendor / Device ID: Intel PantherPoint HDMI
102 0x80860101, // Subsystem ID
103 0x00000004, // Number of jacks
104
105 /* NID 0x01, HDA Codec Subsystem ID Verb Table: 0x80860101 */
Angel Ponsd8ce9a82019-12-19 19:44:11 +0100106 AZALIA_SUBVENDOR(3, 0x80860101),
Stefan Reinauera7198b32012-12-11 16:00:47 -0800107
108 /* Pin Complex (NID 0x05) Digital Out at Int HDMI */
Angel Ponsec211702019-12-19 19:37:21 +0100109 AZALIA_PIN_CFG(3, 0x05, 0x18560010),
Stefan Reinauera7198b32012-12-11 16:00:47 -0800110
111 /* Pin Complex (NID 0x06) Digital Out at Int HDMI */
Angel Ponsec211702019-12-19 19:37:21 +0100112 AZALIA_PIN_CFG(3, 0x06, 0x18560020),
Stefan Reinauera7198b32012-12-11 16:00:47 -0800113
114 /* Pin Complex (NID 0x07) Digital Out at Int HDMI */
Angel Ponsec211702019-12-19 19:37:21 +0100115 AZALIA_PIN_CFG(3, 0x07, 0x18560030),
Stefan Reinauera7198b32012-12-11 16:00:47 -0800116};
117
Vladimir Serbinenko75c83872014-09-05 01:01:31 +0200118const u32 pc_beep_verbs[] = {
Stefan Reinauera7198b32012-12-11 16:00:47 -0800119 0x00170500, /* power up everything (codec, dac, adc, mixers) */
120 0x01470740, /* enable speaker out */
121 0x01470c02, /* set speaker EAPD pin */
122 0x0143b01f, /* unmute speaker */
123 0x00c37100, /* unmute mixer nid 0xc input 1 */
124 0x00b37410, /* unmute mixer nid 0xb beep input and set volume */
125};
126
Vladimir Serbinenko75c83872014-09-05 01:01:31 +0200127AZALIA_ARRAY_SIZES;