return;
if (is_10g_sds) {
- rtpcs_sds_write_bits(odd_sds, 0xb, 0x1d, 3, 0, 0x5);
+ rtpcs_sds_write_bits(odd_sds, 0x2f, 0x1d, 3, 0, 0x5);
msleep(500);
- rtpcs_sds_write_bits(odd_sds, 0xb, 0x1d, 3, 0, 0xf);
- rtpcs_sds_write_bits(odd_sds, 0xb, 0x1d, 3, 0, 0x0);
+ rtpcs_sds_write_bits(odd_sds, 0x2f, 0x1d, 3, 0, 0xf);
+ rtpcs_sds_write_bits(odd_sds, 0x2f, 0x1d, 3, 0, 0x0);
- rtpcs_sds_write_bits(even_sds, 0xa, 0x10, 3, 3, 0x0);
- rtpcs_sds_write_bits(even_sds, 0xb, 0x0, 15, 15, 0x1);
+ rtpcs_sds_write_bits(even_sds, 0x2e, 0x10, 3, 3, 0x0);
+ rtpcs_sds_write_bits(even_sds, 0x2f, 0x0, 15, 15, 0x1);
msleep(100);
- rtpcs_sds_write_bits(even_sds, 0xb, 0x0, 15, 15, 0x0);
+ rtpcs_sds_write_bits(even_sds, 0x2f, 0x0, 15, 15, 0x0);
} else {
rtpcs_sds_write(odd_sds, 0x9, 0x1, 0x0050);
rtpcs_sds_write(odd_sds, 0x9, 0x1, 0x00f0);
return;
/* Part 1: register setup */
- rtpcs_sds_write(sds, 0xa, 0x0, 0x5800);
- rtpcs_sds_write(sds, 0xa, 0x1, 0x4000);
- rtpcs_sds_write(sds, 0xa, 0x2, is_even ? 0x5400 : 0x5000);
- rtpcs_sds_write(sds, 0xa, 0x3, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0x4, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0x5, 0x4000);
- rtpcs_sds_write(sds, 0xa, 0x6, 0x4000);
- rtpcs_sds_write(sds, 0xa, 0x7, 0xffff);
- rtpcs_sds_write(sds, 0xa, 0x8, 0xffff);
- rtpcs_sds_write(sds, 0xa, 0x9, 0x806f);
- rtpcs_sds_write(sds, 0xa, 0xa, 0x0004);
- rtpcs_sds_write(sds, 0xa, 0xb, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0xc, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0xd, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0xe, 0x0a00);
- rtpcs_sds_write(sds, 0xa, 0xf, 0x2000);
- rtpcs_sds_write(sds, 0xa, 0x10, 0xf00e);
- rtpcs_sds_write(sds, 0xa, 0x11, is_even ? 0xf04a : 0xfdab);
- rtpcs_sds_write(sds, 0xa, 0x12, is_even ? 0x97b3 : 0x96ea);
- rtpcs_sds_write(sds, 0xa, 0x13, 0x5318);
- rtpcs_sds_write(sds, 0xa, 0x14, 0x0f03);
- rtpcs_sds_write(sds, 0xa, 0x15, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0x16, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0x17, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0x18, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0x19, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0x1a, 0xffff);
- rtpcs_sds_write(sds, 0xa, 0x1b, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0x1c, 0x1203);
- rtpcs_sds_write(sds, 0xa, 0x1d, 0x0000);
- rtpcs_sds_write(sds, 0xa, 0x1e, 0xa052);
- rtpcs_sds_write(sds, 0xa, 0x1f, 0x9a00);
- rtpcs_sds_write(sds, 0xb, 0x0, 0x00f5);
- rtpcs_sds_write(sds, 0xb, 0x1, 0xf000);
- rtpcs_sds_write(sds, 0xb, 0x2, is_even ? 0x41ff : 0x4079);
- rtpcs_sds_write(sds, 0xb, 0x3, 0x0000);
- rtpcs_sds_write(sds, 0xb, 0x4, is_even ? 0x39ff : 0x93fa);
- rtpcs_sds_write(sds, 0xb, 0x5, 0x3340);
- rtpcs_sds_write(sds, 0xb, 0x6, is_even ? 0x40aa : 0x4280);
- rtpcs_sds_write(sds, 0xb, 0x7, 0x0000);
- rtpcs_sds_write(sds, 0xb, 0x8, 0x801f);
- rtpcs_sds_write(sds, 0xb, 0x9, 0x0000);
- rtpcs_sds_write(sds, 0xb, 0xa, 0x619c);
- rtpcs_sds_write(sds, 0xb, 0xb, 0xffed);
- rtpcs_sds_write(sds, 0xb, 0xc, 0x29ff);
- rtpcs_sds_write(sds, 0xb, 0xd, 0x29ff);
- rtpcs_sds_write(sds, 0xb, 0xe, is_even ? 0x4e10 : 0x4c50);
- rtpcs_sds_write(sds, 0xb, 0xf, is_even ? 0x4e10 : 0x4c50);
- rtpcs_sds_write(sds, 0xb, 0x10, 0x0000);
- rtpcs_sds_write(sds, 0xb, 0x11, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0x0, 0x5800);
+ rtpcs_sds_write(sds, 0x2e, 0x1, 0x4000);
+ rtpcs_sds_write(sds, 0x2e, 0x2, is_even ? 0x5400 : 0x5000);
+ rtpcs_sds_write(sds, 0x2e, 0x3, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0x4, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0x5, 0x4000);
+ rtpcs_sds_write(sds, 0x2e, 0x6, 0x4000);
+ rtpcs_sds_write(sds, 0x2e, 0x7, 0xffff);
+ rtpcs_sds_write(sds, 0x2e, 0x8, 0xffff);
+ rtpcs_sds_write(sds, 0x2e, 0x9, 0x806f);
+ rtpcs_sds_write(sds, 0x2e, 0xa, 0x0004);
+ rtpcs_sds_write(sds, 0x2e, 0xb, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0xc, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0xd, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0xe, 0x0a00);
+ rtpcs_sds_write(sds, 0x2e, 0xf, 0x2000);
+ rtpcs_sds_write(sds, 0x2e, 0x10, 0xf00e);
+ rtpcs_sds_write(sds, 0x2e, 0x11, is_even ? 0xf04a : 0xfdab);
+ rtpcs_sds_write(sds, 0x2e, 0x12, is_even ? 0x97b3 : 0x96ea);
+ rtpcs_sds_write(sds, 0x2e, 0x13, 0x5318);
+ rtpcs_sds_write(sds, 0x2e, 0x14, 0x0f03);
+ rtpcs_sds_write(sds, 0x2e, 0x15, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0x16, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0x17, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0x18, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0x19, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0x1a, 0xffff);
+ rtpcs_sds_write(sds, 0x2e, 0x1b, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0x1c, 0x1203);
+ rtpcs_sds_write(sds, 0x2e, 0x1d, 0x0000);
+ rtpcs_sds_write(sds, 0x2e, 0x1e, 0xa052);
+ rtpcs_sds_write(sds, 0x2e, 0x1f, 0x9a00);
+ rtpcs_sds_write(sds, 0x2f, 0x0, 0x00f5);
+ rtpcs_sds_write(sds, 0x2f, 0x1, 0xf000);
+ rtpcs_sds_write(sds, 0x2f, 0x2, is_even ? 0x41ff : 0x4079);
+ rtpcs_sds_write(sds, 0x2f, 0x3, 0x0000);
+ rtpcs_sds_write(sds, 0x2f, 0x4, is_even ? 0x39ff : 0x93fa);
+ rtpcs_sds_write(sds, 0x2f, 0x5, 0x3340);
+ rtpcs_sds_write(sds, 0x2f, 0x6, is_even ? 0x40aa : 0x4280);
+ rtpcs_sds_write(sds, 0x2f, 0x7, 0x0000);
+ rtpcs_sds_write(sds, 0x2f, 0x8, 0x801f);
+ rtpcs_sds_write(sds, 0x2f, 0x9, 0x0000);
+ rtpcs_sds_write(sds, 0x2f, 0xa, 0x619c);
+ rtpcs_sds_write(sds, 0x2f, 0xb, 0xffed);
+ rtpcs_sds_write(sds, 0x2f, 0xc, 0x29ff);
+ rtpcs_sds_write(sds, 0x2f, 0xd, 0x29ff);
+ rtpcs_sds_write(sds, 0x2f, 0xe, is_even ? 0x4e10 : 0x4c50);
+ rtpcs_sds_write(sds, 0x2f, 0xf, is_even ? 0x4e10 : 0x4c50);
+ rtpcs_sds_write(sds, 0x2f, 0x10, 0x0000);
+ rtpcs_sds_write(sds, 0x2f, 0x11, 0x0000);
rtpcs_sds_write(sds, 0x0, 0xc, 0x08ec);
if (!is_even)
- rtpcs_sds_write(sds, 0xb, 0x1f, 0x003f);
+ rtpcs_sds_write(sds, 0x2f, 0x1f, 0x003f);
/* Part 2: register bit patching (contains some "reset flips") */
rtpcs_sds_write_bits(sds, 0x0, 0x7, 14, 14, 0x0001);
- rtpcs_sds_write_bits(sds, 0xb, 0x9, 15, 0, 0x417f);
- rtpcs_sds_write_bits(sds, 0xa, 0x1c, 9, 9, 0x0000);
- rtpcs_sds_write_bits(sds, 0xa, 0x1c, 12, 10, 0x0000);
- rtpcs_sds_write_bits(sds, 0xa, 0x1c, 5, 3, 0x0005);
- rtpcs_sds_write_bits(sds, 0xa, 0x1c, 8, 6, 0x0000);
- rtpcs_sds_write_bits(sds, 0xa, 0x1c, 2, 0, 0x0002);
- rtpcs_sds_write_bits(sds, 0xb, 0x1, 15, 0, 0xc440);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x9, 15, 0, 0x417f);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x1c, 9, 9, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x1c, 12, 10, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x1c, 5, 3, 0x0005);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x1c, 8, 6, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x1c, 2, 0, 0x0002);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x1, 15, 0, 0xc440);
if (is_even)
- rtpcs_sds_write_bits(sds, 0xb, 0x6, 3, 3, 0x0000);
- rtpcs_sds_write_bits(sds, 0xa, 0x5, 15, 0, 0x8000);
- rtpcs_sds_write_bits(sds, 0xa, 0x6, 15, 0, 0x8000);
- rtpcs_sds_write_bits(sds, 0xa, 0xa, 15, 0, 0x0000);
- rtpcs_sds_write_bits(sds, 0xa, 0x1e, 15, 0, 0x0002);
- rtpcs_sds_write_bits(sds, 0xa, 0x1f, 15, 0, 0xbe00);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x6, 3, 3, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x5, 15, 0, 0x8000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x6, 15, 0, 0x8000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0xa, 15, 0, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x1e, 15, 0, 0x0002);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x1f, 15, 0, 0xbe00);
if (is_even) {
- rtpcs_sds_write_bits(sds, 0xb, 0xe, 10, 10, 0x0000);
- rtpcs_sds_write_bits(sds, 0xb, 0xf, 10, 10, 0x0000);
- rtpcs_sds_write_bits(sds, 0xb, 0xe, 14, 14, 0x0000);
- rtpcs_sds_write_bits(sds, 0xb, 0xf, 14, 14, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2f, 0xe, 10, 10, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2f, 0xf, 10, 10, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2f, 0xe, 14, 14, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2f, 0xf, 14, 14, 0x0000);
}
- rtpcs_sds_write_bits(sds, 0xa, 0x10, 5, 5, 0x0000);
- rtpcs_sds_write_bits(sds, 0xb, 0x9, 8, 8, 0x0000);
- rtpcs_sds_write_bits(sds, 0xa, 0x3, 15, 12, 0x000f);
- rtpcs_sds_write_bits(sds, 0xa, 0x1f, 13, 12, 0x0003);
- rtpcs_sds_write_bits(sds, 0xa, 0x1f, 11, 9, 0x0007);
- rtpcs_sds_write_bits(sds, 0xb, 0x1, 15, 15, 0x0001);
- rtpcs_sds_write_bits(sds, 0xb, 0x1, 14, 14, 0x0001);
- rtpcs_sds_write_bits(sds, 0xb, 0x1, 13, 13, 0x0000);
- rtpcs_sds_write_bits(sds, 0xb, 0x1, 12, 12, 0x0000);
- rtpcs_sds_write_bits(sds, 0xb, 0x1, 11, 9, 0x0002);
- rtpcs_sds_write_bits(sds, 0xb, 0x1, 8, 6, 0x0002);
- rtpcs_sds_write_bits(sds, 0xb, 0x1, 5, 3, 0x0000);
- rtpcs_sds_write_bits(sds, 0xb, 0x1, 2, 0, 0x0000);
- rtpcs_sds_write_bits(sds, 0xb, 0xc, 9, 9, 0x0001);
- rtpcs_sds_write_bits(sds, 0xb, 0xd, 9, 9, 0x0001);
- rtpcs_sds_write_bits(sds, 0xb, 0x8, 5, 5, 0x0001);
- rtpcs_sds_write_bits(sds, 0xb, 0x8, 6, 6, 0x0000);
- rtpcs_sds_write_bits(sds, 0xa, 0x1c, 15, 15, 0x0000);
- rtpcs_sds_write_bits(sds, 0xa, 0x10, 15, 12, 0x0000);
- rtpcs_sds_write_bits(sds, 0xa, 0x13, 4, 4, 0x0000);
- rtpcs_sds_write_bits(sds, 0xa, 0x13, 9, 9, 0x0000);
- rtpcs_sds_write_bits(sds, 0xa, 0x13, 3, 0, 0x0008);
- rtpcs_sds_write_bits(sds, 0xa, 0x13, 8, 5, 0x0008);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x10, 5, 5, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x9, 8, 8, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x3, 15, 12, 0x000f);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x1f, 13, 12, 0x0003);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x1f, 11, 9, 0x0007);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x1, 15, 15, 0x0001);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x1, 14, 14, 0x0001);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x1, 13, 13, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x1, 12, 12, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x1, 11, 9, 0x0002);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x1, 8, 6, 0x0002);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x1, 5, 3, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x1, 2, 0, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2f, 0xc, 9, 9, 0x0001);
+ rtpcs_sds_write_bits(sds, 0x2f, 0xd, 9, 9, 0x0001);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x8, 5, 5, 0x0001);
+ rtpcs_sds_write_bits(sds, 0x2f, 0x8, 6, 6, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x1c, 15, 15, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x10, 15, 12, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x13, 4, 4, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x13, 9, 9, 0x0000);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x13, 3, 0, 0x0008);
+ rtpcs_sds_write_bits(sds, 0x2e, 0x13, 8, 5, 0x0008);
}
static int rtpcs_839x_init_serdes_common(struct rtpcs_ctrl *ctrl)