Kevin Chiu | d800d5e | 2020-12-15 17:01:16 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
| 3 | #include <baseboard/variants.h> |
Kevin Chiu | d800d5e | 2020-12-15 17:01:16 +0800 | [diff] [blame] | 4 | #include <device/device.h> |
| 5 | #include <drivers/i2c/generic/chip.h> |
| 6 | #include <soc/pci_devs.h> |
| 7 | #include <ec/google/chromeec/ec.h> |
| 8 | #include <ec/google/chromeec/i2c_tunnel/chip.h> |
| 9 | #include <string.h> |
| 10 | |
| 11 | /* FIXME: Comments seem to suggest these are not entirely correct. */ |
| 12 | static const fsp_ddi_descriptor non_hdmi_ddi_descriptors[] = { |
| 13 | { |
| 14 | // DDI0, DP0, eDP |
| 15 | .connector_type = EDP, |
| 16 | .aux_index = AUX1, |
| 17 | .hdp_index = HDP1 |
| 18 | }, |
| 19 | { |
| 20 | // DDI1, DP1, DB OPT2 USB-C1 / DB OPT3 MST hub |
| 21 | .connector_type = DP, |
| 22 | .aux_index = AUX2, |
| 23 | .hdp_index = HDP2 |
| 24 | }, |
| 25 | { |
| 26 | // DP2 pins not connected on Dali |
| 27 | // DDI2, DP3, USB-C0 |
| 28 | .connector_type = DP, |
| 29 | .aux_index = AUX4, |
| 30 | .hdp_index = HDP4, |
| 31 | } |
| 32 | }; |
| 33 | |
| 34 | void variant_get_dxio_ddi_descriptors(const fsp_dxio_descriptor **dxio_descs, |
| 35 | size_t *dxio_num, |
| 36 | const fsp_ddi_descriptor **ddi_descs, |
| 37 | size_t *ddi_num) |
| 38 | { |
| 39 | |
| 40 | *dxio_descs = baseboard_get_dxio_descriptors(dxio_num); |
| 41 | *ddi_descs = &non_hdmi_ddi_descriptors[0]; |
| 42 | *ddi_num = ARRAY_SIZE(non_hdmi_ddi_descriptors); |
| 43 | } |