|
92 | 92 | #define SN_DATARATE_CONFIG_REG 0x94 |
93 | 93 | #define DP_DATARATE_MASK GENMASK(7, 5) |
94 | 94 | #define DP_DATARATE(x) ((x) << 5) |
| 95 | +#define SN_TRAINING_SETTING_REG 0x95 |
| 96 | +#define SCRAMBLE_DISABLE BIT(4) |
95 | 97 | #define SN_ML_TX_MODE_REG 0x96 |
96 | 98 | #define ML_TX_MAIN_LINK_OFF 0 |
97 | 99 | #define ML_TX_NORMAL_MODE BIT(0) |
@@ -1070,12 +1072,23 @@ static void ti_sn_bridge_atomic_enable(struct drm_bridge *bridge, |
1070 | 1072 |
|
1071 | 1073 | /* |
1072 | 1074 | * The SN65DSI86 only supports ASSR Display Authentication method and |
1073 | | - * this method is enabled by default. An eDP panel must support this |
| 1075 | + * this method is enabled for eDP panels. An eDP panel must support this |
1074 | 1076 | * authentication method. We need to enable this method in the eDP panel |
1075 | 1077 | * at DisplayPort address 0x0010A prior to link training. |
| 1078 | + * |
| 1079 | + * As only ASSR is supported by SN65DSI86, for full DisplayPort displays |
| 1080 | + * we need to disable the scrambler. |
1076 | 1081 | */ |
1077 | | - drm_dp_dpcd_writeb(&pdata->aux, DP_EDP_CONFIGURATION_SET, |
1078 | | - DP_ALTERNATE_SCRAMBLER_RESET_ENABLE); |
| 1082 | + if (pdata->bridge.type == DRM_MODE_CONNECTOR_eDP) { |
| 1083 | + drm_dp_dpcd_writeb(&pdata->aux, DP_EDP_CONFIGURATION_SET, |
| 1084 | + DP_ALTERNATE_SCRAMBLER_RESET_ENABLE); |
| 1085 | + |
| 1086 | + regmap_update_bits(pdata->regmap, SN_TRAINING_SETTING_REG, |
| 1087 | + SCRAMBLE_DISABLE, 0); |
| 1088 | + } else { |
| 1089 | + regmap_update_bits(pdata->regmap, SN_TRAINING_SETTING_REG, |
| 1090 | + SCRAMBLE_DISABLE, SCRAMBLE_DISABLE); |
| 1091 | + } |
1079 | 1092 |
|
1080 | 1093 | bpp = ti_sn_bridge_get_bpp(connector); |
1081 | 1094 | /* Set the DP output format (18 bpp or 24 bpp) */ |
@@ -1241,6 +1254,8 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev, |
1241 | 1254 |
|
1242 | 1255 | pdata->bridge.funcs = &ti_sn_bridge_funcs; |
1243 | 1256 | pdata->bridge.of_node = np; |
| 1257 | + pdata->bridge.type = pdata->next_bridge->type == DRM_MODE_CONNECTOR_DisplayPort |
| 1258 | + ? DRM_MODE_CONNECTOR_DisplayPort : DRM_MODE_CONNECTOR_eDP; |
1244 | 1259 |
|
1245 | 1260 | drm_bridge_add(&pdata->bridge); |
1246 | 1261 |
|
|
0 commit comments