Attention is currently required from: Michael Niewöhner.
Nicholas Sudsgaard has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84461?usp=email )
Change subject: mb/clevo: Use temporary macros to facilitate reworking verb table ......................................................................
mb/clevo: Use temporary macros to facilitate reworking verb table
TEST=Timeless build produces identical binaries for all mainboards.
Change-Id: Ia7959ebaf6aceefca50f5f2bbafcf909e643c39a Signed-off-by: Nicholas Sudsgaard devel+coreboot@nsudsgaard.com --- M src/mainboard/clevo/cml-u/variants/l140cu/hda_verb.c M src/mainboard/clevo/kbl-u/variants/n13xwu/hda_verb.c M src/mainboard/clevo/tgl-u/variants/l140mu/hda_verb.c 3 files changed, 139 insertions(+), 124 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/84461/1
diff --git a/src/mainboard/clevo/cml-u/variants/l140cu/hda_verb.c b/src/mainboard/clevo/cml-u/variants/l140cu/hda_verb.c index 7903025..fbade10 100644 --- a/src/mainboard/clevo/cml-u/variants/l140cu/hda_verb.c +++ b/src/mainboard/clevo/cml-u/variants/l140cu/hda_verb.c @@ -2,33 +2,39 @@
#include <device/azalia_device.h>
-const u32 cim_verb_data[] = { - /* Realtek ALC293 */ - 0x10ec0293, /* Vendor ID */ - 0x15581401, /* Subsystem ID */ - 12, /* Number of entries */ - AZALIA_SUBVENDOR(0, 0x15581401), - AZALIA_PIN_CFG(0, 0x12, 0x90a60130), - AZALIA_PIN_CFG(0, 0x13, 0x40000000), - AZALIA_PIN_CFG(0, 0x14, 0x90170110), - AZALIA_PIN_CFG(0, 0x15, 0x02211020), - AZALIA_PIN_CFG(0, 0x16, AZALIA_PIN_CFG_NC(0)), - AZALIA_PIN_CFG(0, 0x18, AZALIA_PIN_CFG_NC(0)), - AZALIA_PIN_CFG(0, 0x19, AZALIA_PIN_CFG_NC(0)), - AZALIA_PIN_CFG(0, 0x1a, 0x01a1913c), - AZALIA_PIN_CFG(0, 0x1b, AZALIA_PIN_CFG_NC(0)), - AZALIA_PIN_CFG(0, 0x1d, 0x41748245), - AZALIA_PIN_CFG(0, 0x1e, AZALIA_PIN_CFG_NC(0)), - - /* Intel GPU HDMI */ - 0x8086280b, /* Vendor ID */ - 0x80860101, /* Subsystem ID */ - 4, /* Number of entries */ - AZALIA_SUBVENDOR(2, 0x80860101), - AZALIA_PIN_CFG(2, 0x05, 0x18560010), - AZALIA_PIN_CFG(2, 0x06, 0x18560010), - AZALIA_PIN_CFG(2, 0x07, 0x18560010), -}; +CIM_VERB_DATA_2(\ + /* Realtek ALC293 */\ + realtek_alc293,\ + 0x10ec0293, /* Vendor ID */\ + 0x15581401, /* Subsystem ID */\ + 12, /* Number of entries */\ + VERB_DATA(\ + AZALIA_SUBVENDOR(0, 0x15581401),\ + AZALIA_PIN_CFG(0, 0x12, 0x90a60130),\ + AZALIA_PIN_CFG(0, 0x13, 0x40000000),\ + AZALIA_PIN_CFG(0, 0x14, 0x90170110),\ + AZALIA_PIN_CFG(0, 0x15, 0x02211020),\ + AZALIA_PIN_CFG(0, 0x16, AZALIA_PIN_CFG_NC(0)),\ + AZALIA_PIN_CFG(0, 0x18, AZALIA_PIN_CFG_NC(0)),\ + AZALIA_PIN_CFG(0, 0x19, AZALIA_PIN_CFG_NC(0)),\ + AZALIA_PIN_CFG(0, 0x1a, 0x01a1913c),\ + AZALIA_PIN_CFG(0, 0x1b, AZALIA_PIN_CFG_NC(0)),\ + AZALIA_PIN_CFG(0, 0x1d, 0x41748245),\ + AZALIA_PIN_CFG(0, 0x1e, AZALIA_PIN_CFG_NC(0))\ +),\ +\ + /* Intel GPU HDMI */\ + intel_hdmi,\ + 0x8086280b, /* Vendor ID */\ + 0x80860101, /* Subsystem ID */\ + 4, /* Number of entries */\ + VERB_DATA(\ + AZALIA_SUBVENDOR(2, 0x80860101),\ + AZALIA_PIN_CFG(2, 0x05, 0x18560010),\ + AZALIA_PIN_CFG(2, 0x06, 0x18560010),\ + AZALIA_PIN_CFG(2, 0x07, 0x18560010)\ +)\ +);
const u32 pc_beep_verbs[] = {};
diff --git a/src/mainboard/clevo/kbl-u/variants/n13xwu/hda_verb.c b/src/mainboard/clevo/kbl-u/variants/n13xwu/hda_verb.c index 68f4159..de8b17f 100644 --- a/src/mainboard/clevo/kbl-u/variants/n13xwu/hda_verb.c +++ b/src/mainboard/clevo/kbl-u/variants/n13xwu/hda_verb.c @@ -2,32 +2,38 @@
#include <device/azalia_device.h>
-const u32 cim_verb_data[] = { - /* Realtek ALC269VC */ - 0x10ec0269, - 0x15581314, - 11, - AZALIA_SUBVENDOR(0, 0x15581314), - AZALIA_PIN_CFG(0, 0x12, 0x90a60140), - AZALIA_PIN_CFG(0, 0x14, 0x90170120), - AZALIA_PIN_CFG(0, 0x15, 0x02211010), - AZALIA_PIN_CFG(0, 0x17, 0x40000000), - AZALIA_PIN_CFG(0, 0x18, 0x02a11030), - AZALIA_PIN_CFG(0, 0x19, AZALIA_PIN_CFG_NC(0)), - AZALIA_PIN_CFG(0, 0x1a, AZALIA_PIN_CFG_NC(0)), - AZALIA_PIN_CFG(0, 0x1b, AZALIA_PIN_CFG_NC(0)), - AZALIA_PIN_CFG(0, 0x1d, 0x40f4a205), - AZALIA_PIN_CFG(0, 0x1e, AZALIA_PIN_CFG_NC(0)), - - /* Intel iGPU HDMI */ - 0x8086280b, - 0x80860101, - 4, - AZALIA_SUBVENDOR(2, 0x80860101), - AZALIA_PIN_CFG(2, 0x5, 0x18560010), - AZALIA_PIN_CFG(2, 0x6, 0x18560010), - AZALIA_PIN_CFG(2, 0x7, 0x18560010) -}; +CIM_VERB_DATA_2(\ + /* Realtek ALC269VC */\ + realtek_alc269vc,\ + 0x10ec0269,\ + 0x15581314,\ + 11,\ + VERB_DATA(\ + AZALIA_SUBVENDOR(0, 0x15581314),\ + AZALIA_PIN_CFG(0, 0x12, 0x90a60140),\ + AZALIA_PIN_CFG(0, 0x14, 0x90170120),\ + AZALIA_PIN_CFG(0, 0x15, 0x02211010),\ + AZALIA_PIN_CFG(0, 0x17, 0x40000000),\ + AZALIA_PIN_CFG(0, 0x18, 0x02a11030),\ + AZALIA_PIN_CFG(0, 0x19, AZALIA_PIN_CFG_NC(0)),\ + AZALIA_PIN_CFG(0, 0x1a, AZALIA_PIN_CFG_NC(0)),\ + AZALIA_PIN_CFG(0, 0x1b, AZALIA_PIN_CFG_NC(0)),\ + AZALIA_PIN_CFG(0, 0x1d, 0x40f4a205),\ + AZALIA_PIN_CFG(0, 0x1e, AZALIA_PIN_CFG_NC(0))\ +),\ +\ + /* Intel iGPU HDMI */\ + intel_hdmi,\ + 0x8086280b,\ + 0x80860101,\ + 4,\ + VERB_DATA(\ + AZALIA_SUBVENDOR(2, 0x80860101),\ + AZALIA_PIN_CFG(2, 0x5, 0x18560010),\ + AZALIA_PIN_CFG(2, 0x6, 0x18560010),\ + AZALIA_PIN_CFG(2, 0x7, 0x18560010)\ +)\ +);
const u32 pc_beep_verbs[] = {};
diff --git a/src/mainboard/clevo/tgl-u/variants/l140mu/hda_verb.c b/src/mainboard/clevo/tgl-u/variants/l140mu/hda_verb.c index b6bf5c5..51f1a26 100644 --- a/src/mainboard/clevo/tgl-u/variants/l140mu/hda_verb.c +++ b/src/mainboard/clevo/tgl-u/variants/l140mu/hda_verb.c @@ -3,77 +3,80 @@ #include <device/azalia_device.h> #include <stdint.h>
-const u32 cim_verb_data[] = { - /* Realtek ALC293 */ - 0x10ec0293, /* Vendor ID */ - 0x155814a1, /* Subsystem ID */ - 12, /* Number of entries */ - AZALIA_SUBVENDOR(0, 0x155814a1), - - /* Microphone (display lid), vendor value: 0x90a60130 */ - AZALIA_PIN_CFG(0, 0x12, AZALIA_PIN_DESC( - AZALIA_INTEGRATED, - AZALIA_MOBILE_LID_INSIDE, /* vendor: AZALIA_INTERNAL */ - AZALIA_MIC_IN, - AZALIA_OTHER_DIGITAL, - AZALIA_COLOR_UNKNOWN, - AZALIA_NO_JACK_PRESENCE_DETECT, - 3, 0) - ), - - /* Integrated speakers, vendor value: 0x90170110 */ - AZALIA_PIN_CFG(0, 0x14, AZALIA_PIN_DESC( - AZALIA_INTEGRATED, - AZALIA_LOCATION_OTHER | AZALIA_BOTTOM, /* vendor: AZALIA_INTERNAL */ - AZALIA_SPEAKER, - AZALIA_OTHER_ANALOG, - AZALIA_COLOR_UNKNOWN, - AZALIA_NO_JACK_PRESENCE_DETECT, - 1, 0) - ), - - /* Headphones, vendor value: 0x02211020 */ - AZALIA_PIN_CFG(0, 0x15, AZALIA_PIN_DESC( - AZALIA_JACK, - /* vendor: AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_FRONT */ - AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_RIGHT, - AZALIA_HP_OUT, - AZALIA_STEREO_MONO_1_8, - AZALIA_BLACK, - AZALIA_JACK_PRESENCE_DETECT, - 2, 0) - ), - - /* ext. Microphone, vendor value: 0x411111f0, linux override: 0x01a1913c */ - AZALIA_PIN_CFG(0, 0x1a, AZALIA_PIN_DESC( - AZALIA_JACK, - /* linux: AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_REAR */ - AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_RIGHT, - AZALIA_MIC_IN, - AZALIA_STEREO_MONO_1_8, - AZALIA_BLACK, /* linux: AZALIA_PINK */ - AZALIA_NO_JACK_PRESENCE_DETECT, - 3, 12) - ), - - /* PCBEEP, vendor value: 0x41748245 */ - AZALIA_PIN_CFG(0, 0x1d, AZALIA_PIN_DESC( - AZALIA_INTEGRATED, /* vendor: AZALIA_NC */ - AZALIA_INTERNAL, /* vendor: AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_REAR */ - AZALIA_DEVICE_OTHER, /* vendor: AZALIA_MODEM_HANDSET_SIDE */ - AZALIA_OTHER_ANALOG, /* vendor: AZALIA_RCA */ - AZALIA_COLOR_UNKNOWN, /* vendor: AZALIA_PURPLE */ - AZALIA_NO_JACK_PRESENCE_DETECT, /* vendor: 2 */ - 4, 5) - ), - - AZALIA_PIN_CFG(0, 0x13, 0x40000000), /* NC, but different from 0x411111f0 */ - AZALIA_PIN_CFG(0, 0x16, AZALIA_PIN_CFG_NC(0)), - AZALIA_PIN_CFG(0, 0x18, AZALIA_PIN_CFG_NC(0)), - AZALIA_PIN_CFG(0, 0x19, AZALIA_PIN_CFG_NC(0)), - AZALIA_PIN_CFG(0, 0x1b, AZALIA_PIN_CFG_NC(0)), - AZALIA_PIN_CFG(0, 0x1e, AZALIA_PIN_CFG_NC(0)), -}; +CIM_VERB_DATA_1(\ + /* Realtek ALC293 */\ + realtek_alc293,\ + 0x10ec0293, /* Vendor ID */\ + 0x155814a1, /* Subsystem ID */\ + 12, /* Number of entries */\ + VERB_DATA(\ + AZALIA_SUBVENDOR(0, 0x155814a1),\ +\ + /* Microphone (display lid), vendor value: 0x90a60130 */\ + AZALIA_PIN_CFG(0, 0x12, AZALIA_PIN_DESC(\ + AZALIA_INTEGRATED,\ + AZALIA_MOBILE_LID_INSIDE, /* vendor: AZALIA_INTERNAL */\ + AZALIA_MIC_IN,\ + AZALIA_OTHER_DIGITAL,\ + AZALIA_COLOR_UNKNOWN,\ + AZALIA_NO_JACK_PRESENCE_DETECT,\ + 3, 0)\ + ),\ +\ + /* Integrated speakers, vendor value: 0x90170110 */\ + AZALIA_PIN_CFG(0, 0x14, AZALIA_PIN_DESC(\ + AZALIA_INTEGRATED,\ + AZALIA_LOCATION_OTHER | AZALIA_BOTTOM, /* vendor: AZALIA_INTERNAL */\ + AZALIA_SPEAKER,\ + AZALIA_OTHER_ANALOG,\ + AZALIA_COLOR_UNKNOWN,\ + AZALIA_NO_JACK_PRESENCE_DETECT,\ + 1, 0)\ + ),\ +\ + /* Headphones, vendor value: 0x02211020 */\ + AZALIA_PIN_CFG(0, 0x15, AZALIA_PIN_DESC(\ + AZALIA_JACK,\ + /* vendor: AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_FRONT */\ + AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_RIGHT,\ + AZALIA_HP_OUT,\ + AZALIA_STEREO_MONO_1_8,\ + AZALIA_BLACK,\ + AZALIA_JACK_PRESENCE_DETECT,\ + 2, 0)\ + ),\ +\ + /* ext. Microphone, vendor value: 0x411111f0, linux override: 0x01a1913c */\ + AZALIA_PIN_CFG(0, 0x1a, AZALIA_PIN_DESC(\ + AZALIA_JACK,\ + /* linux: AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_REAR */\ + AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_RIGHT,\ + AZALIA_MIC_IN,\ + AZALIA_STEREO_MONO_1_8,\ + AZALIA_BLACK, /* linux: AZALIA_PINK */\ + AZALIA_NO_JACK_PRESENCE_DETECT,\ + 3, 12)\ + ),\ +\ + /* PCBEEP, vendor value: 0x41748245 */\ + AZALIA_PIN_CFG(0, 0x1d, AZALIA_PIN_DESC(\ + AZALIA_INTEGRATED, /* vendor: AZALIA_NC */\ + AZALIA_INTERNAL, /* vendor: AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_REAR */\ + AZALIA_DEVICE_OTHER, /* vendor: AZALIA_MODEM_HANDSET_SIDE */\ + AZALIA_OTHER_ANALOG, /* vendor: AZALIA_RCA */\ + AZALIA_COLOR_UNKNOWN, /* vendor: AZALIA_PURPLE */\ + AZALIA_NO_JACK_PRESENCE_DETECT, /* vendor: 2 */\ + 4, 5)\ + ),\ +\ + AZALIA_PIN_CFG(0, 0x13, 0x40000000), /* NC, but different from 0x411111f0 */\ + AZALIA_PIN_CFG(0, 0x16, AZALIA_PIN_CFG_NC(0)),\ + AZALIA_PIN_CFG(0, 0x18, AZALIA_PIN_CFG_NC(0)),\ + AZALIA_PIN_CFG(0, 0x19, AZALIA_PIN_CFG_NC(0)),\ + AZALIA_PIN_CFG(0, 0x1b, AZALIA_PIN_CFG_NC(0)),\ + AZALIA_PIN_CFG(0, 0x1e, AZALIA_PIN_CFG_NC(0))\ +)\ +);
const u32 pc_beep_verbs[] = {};