Repository navigation
realtek: serdes patch sequence. - #19834
Conversation
There was a problem hiding this comment.
I took a look at the code to get a better understanding of the patching process. I don’t have any substantial feedback, but I do have a couple of minor suggestions.
It would have been nice when the PR would have explained better what the current problem is and where exactly the sequences came from. I will add some references later to point to the sources.
EDIT: The text PR was updated and and explains a lot more
| if (phy_mode == PHY_INTERFACE_MODE_USXGMII) { | ||
| rtl9300_sds_usxgmii_config(sds_num, 1, 0xaa, 0x5078, 0, 1, 0x1); | ||
| } |
There was a problem hiding this comment.
| if (phy_mode == PHY_INTERFACE_MODE_USXGMII) { | |
| rtl9300_sds_usxgmii_config(sds_num, 1, 0xaa, 0x5078, 0, 1, 0x1); | |
| } | |
| if (phy_mode == PHY_INTERFACE_MODE_USXGMII) | |
| rtl9300_sds_usxgmii_config(sds_num, 1, 0xaa, 0x5078, 0, 1, 0x1); |
These are just random numbers for me. Is it possible/useful to give them some kind of names instead of having just a couple of random numbers as parameters of a function?
There was a problem hiding this comment.
The original values come from here: https://github.com/ddejean/dms-1250-oss-release/blob/0ea68a5a711e977ee035975ca45af7e4f742e5ff/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1315
Unfortunately I can't explain what's their meaning. I agree it's ugly but unfortunalely these patch/configuration sequences are almost not documented.
| { | ||
| {0x00, 0x0E, 0x3053},{0x01, 0x14, 0x0100}, | ||
| {0x21, 0x03, 0x8206},{0x21, 0x05, 0x40B0},{0x21, 0x06, 0x0010},{0x21, 0x07, 0xF09F}, | ||
| {0x21, 0x0C, 0x0007},{0x21, 0x0D, 0x6009},{0x21, 0x0E, 0x0000},{0x21, 0x0F, 0x0008}, | ||
| {0x24, 0x00, 0x0668},{0x24, 0x02, 0xD020},{0x24, 0x06, 0xC000},{0x24, 0x0B, 0x1892}, | ||
| {0x24, 0x0F, 0xFFDF},{0x24, 0x12, 0x03C4},{0x24, 0x13, 0x027F},{0x24, 0x14, 0x1311}, | ||
| {0x24, 0x16, 0x00C9},{0x24, 0x17, 0xA100},{0x24, 0x1A, 0x0001},{0x24, 0x1C, 0x0400}, | ||
| {0x25, 0x01, 0x0300},{0x25, 0x02, 0x1017},{0x25, 0x03, 0xFFDF},{0x25, 0x05, 0x7F7C}, | ||
| {0x25, 0x07, 0x8100},{0x25, 0x08, 0x0001},{0x25, 0x09, 0xFFD4},{0x25, 0x0A, 0x7C2F}, | ||
| {0x25, 0x0E, 0x003F},{0x25, 0x0F, 0x0121},{0x25, 0x10, 0x0020},{0x25, 0x11, 0x8840}, | ||
| {0x28, 0x00, 0x0668},{0x28, 0x02, 0xD020},{0x28, 0x06, 0xC000},{0x28, 0x0B, 0x1892}, | ||
| {0x28, 0x0F, 0xFFDF},{0x28, 0x12, 0x01C4},{0x28, 0x13, 0x027F},{0x28, 0x14, 0x1311}, | ||
| {0x28, 0x16, 0x00C9},{0x28, 0x17, 0xA100},{0x28, 0x1A, 0x0001},{0x28, 0x1C, 0x0400}, | ||
| {0x29, 0x01, 0x0300},{0x29, 0x02, 0x1017},{0x29, 0x03, 0xFFDF},{0x29, 0x05, 0x7F7C}, | ||
| {0x29, 0x07, 0x8100},{0x29, 0x08, 0x0001},{0x29, 0x09, 0xFFD4},{0x29, 0x0A, 0x7C2F}, | ||
| {0x29, 0x0E, 0x003F},{0x29, 0x0F, 0x0121},{0x29, 0x10, 0x0020},{0x29, 0x11, 0x8840}, | ||
| {0x2B, 0x13, 0x0050},{0x2B, 0x18, 0x8E88},{0x2B, 0x19, 0x4902},{0x2B, 0x1D, 0x2501}, | ||
| {0x2D, 0x13, 0x0050},{0x2D, 0x18, 0x8E88},{0x2D, 0x17, 0x4109},{0x2D, 0x19, 0x4902}, | ||
| {0x2D, 0x1C, 0x1109},{0x2D, 0x1D, 0x2641}, | ||
| {0x2F, 0x13, 0x0050},{0x2F, 0x18, 0x8E88},{0x2F, 0x19, 0x4902},{0x2F, 0x1D, 0x66E1}, | ||
| }; |
There was a problem hiding this comment.
| {0x00, 0x0E, 0x3053},{0x01, 0x14, 0x0100}, | ||
| {0x21, 0x03, 0x8206},{0x21, 0x06, 0x0010},{0x21, 0x07, 0xF09F},{0x21, 0x0A, 0x0003}, | ||
| {0x21, 0x0B, 0x0005},{0x21, 0x0C, 0x0007},{0x21, 0x0D, 0x6009},{0x21, 0x0E, 0x0000}, | ||
| {0x21, 0x0F, 0x0008}, | ||
| {0x24, 0x00, 0x0668},{0x24, 0x02, 0xD020},{0x24, 0x06, 0xC000},{0x24, 0x0B, 0x1892}, | ||
| {0x24, 0x0F, 0xFFDF},{0x24, 0x12, 0x03C4},{0x24, 0x13, 0x027F},{0x24, 0x14, 0x1311}, | ||
| {0x24, 0x16, 0x00C9},{0x24, 0x17, 0xA100},{0x24, 0x1A, 0x0001},{0x24, 0x1C, 0x0400}, | ||
| {0x25, 0x00, 0x820F},{0x25, 0x01, 0x0300},{0x25, 0x02, 0x1017},{0x25, 0x03, 0xFFDF}, | ||
| {0x25, 0x05, 0x7F7C},{0x25, 0x07, 0x8100},{0x25, 0x08, 0x0001},{0x25, 0x09, 0xFFD4}, | ||
| {0x25, 0x0A, 0x7C2F},{0x25, 0x0E, 0x003F},{0x25, 0x0F, 0x0121},{0x25, 0x10, 0x0020}, | ||
| {0x25, 0x11, 0x8840}, | ||
| {0x28, 0x00, 0x0668},{0x28, 0x02, 0xD020},{0x28, 0x06, 0xC000},{0x28, 0x0B, 0x1892}, | ||
| {0x28, 0x0F, 0xFFDF},{0x28, 0x12, 0x01C4},{0x28, 0x13, 0x027F},{0x28, 0x14, 0x1311}, | ||
| {0x28, 0x16, 0x00C9},{0x28, 0x17, 0xA100},{0x28, 0x1A, 0x0001},{0x28, 0x1C, 0x0400}, | ||
| {0x29, 0x00, 0x820F},{0x29, 0x01, 0x0300},{0x29, 0x02, 0x1017},{0x29, 0x03, 0xFFDF}, | ||
| {0x29, 0x05, 0x7F7C},{0x29, 0x07, 0x8100},{0x29, 0x08, 0x0001},{0x29, 0x0A, 0x7C2F}, | ||
| {0x29, 0x0E, 0x003F},{0x29, 0x0F, 0x0121},{0x29, 0x10, 0x0020},{0x29, 0x11, 0x8840}, | ||
| {0x2B, 0x13, 0x3D87},{0x2B, 0x14, 0x3108}, | ||
| {0x2D, 0x13, 0x3C87},{0x2D, 0x14, 0x1808}, |
There was a problem hiding this comment.
| {0x06, 0x00, 0x0000},{0x06, 0x0D, 0x0F00},{0x06, 0x0E, 0x055A},{0x07, 0x10, 0x6003}, | ||
| {0x06, 0x1D, 0x0600},{0x06, 0x13, 0x68C1},{0x06, 0x14, 0xF021},{0x07, 0x06, 0x1401}, | ||
| {0x21, 0x03, 0x8206},{0x21, 0x05, 0x40B0},{0x21, 0x06, 0x0010},{0x21, 0x07, 0xF09F}, | ||
| {0x21, 0x0C, 0x0007},{0x21, 0x0D, 0x6009},{0x21, 0x0E, 0x0000},{0x21, 0x0F, 0x0008}, | ||
| {0x2E, 0x00, 0xA668},{0x2E, 0x01, 0x2088},{0x2E, 0x02, 0xD020},{0x2E, 0x06, 0xC000}, | ||
| {0x2E, 0x0B, 0x1892},{0x2E, 0x0F, 0xFFDF},{0x2E, 0x11, 0x8280},{0x2E, 0x12, 0x0484}, | ||
| {0x2E, 0x13, 0x027F},{0x2E, 0x14, 0x1311},{0x2E, 0x17, 0xA100},{0x2E, 0x1A, 0x0001}, | ||
| {0x2E, 0x1C, 0x0400},{0x2F, 0x01, 0x0300},{0x2F, 0x02, 0x1017},{0x2F, 0x03, 0xFFDF}, | ||
| {0x2F, 0x05, 0x7F7C},{0x2F, 0x07, 0x8104},{0x2F, 0x08, 0x0001},{0x2F, 0x09, 0xFFD4}, | ||
| {0x2F, 0x0A, 0x7C2F},{0x2F, 0x0E, 0x003F},{0x2F, 0x0F, 0x0121},{0x2F, 0x10, 0x0020}, | ||
| {0x2F, 0x11, 0x8840}, | ||
| {0x2B, 0x13, 0x0050},{0x2B, 0x18, 0x8E88},{0x2B, 0x19, 0x4902},{0x2B, 0x1D, 0x2501}, | ||
| {0x2D, 0x13, 0x0050},{0x2D, 0x18, 0x8E88},{0x2D, 0x19, 0x4902},{0x2D, 0x1D, 0x2641}, | ||
| {0x2F, 0x13, 0x0050},{0x2F, 0x18, 0x8E88},{0x2F, 0x19, 0x4902},{0x2F, 0x1D, 0x66E1}, | ||
| /*enable eee*/ | ||
| {0x06, 0x03, 0xc45c}, |
There was a problem hiding this comment.
Reference for reviewers: https://github.com/plappermaul/realtek-doc/blob/54589ff0afa70045abfdc71a3133aa55c76257bc/sources/rtk-xgs1210/src/dal/longan/dal_longan_construct.c#L977
WARNING: The {0x06, 0x03, 0xc45c}, is not part of the referenced source code
There was a problem hiding this comment.
The last sequence comes from https://github.com/ddejean/dms-1250-oss-release/blob/0ea68a5a711e977ee035975ca45af7e4f742e5ff/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1035
It's a more recent version of the OSS release.
| {0x06, 0x00, 0x0000},{0x06, 0x0D, 0x0F00},{0x06, 0x0E, 0x055A},{0x07, 0x10, 0x6003}, | ||
| {0x06, 0x1D, 0x0600},{0x06, 0x13, 0x68C1},{0x06, 0x14, 0xF021},{0x07, 0x06, 0x1401}, | ||
| {0x21, 0x03, 0x8206},{0x21, 0x05, 0x40B0},{0x21, 0x06, 0x0010},{0x21, 0x07, 0xF09F}, | ||
| {0x21, 0x0A, 0x0003},{0x21, 0x0B, 0x0005},{0x21, 0x0C, 0x0007},{0x21, 0x0D, 0x6009}, | ||
| {0x21, 0x0E, 0x0000},{0x21, 0x0F, 0x0008}, | ||
| {0x2E, 0x00, 0xA668},{0x2E, 0x02, 0xD020},{0x2E, 0x06, 0xC000},{0x2E, 0x0B, 0x1892}, | ||
| {0x2E, 0x0F, 0xFFDF},{0x2E, 0x11, 0x8280},{0x2E, 0x12, 0x0484},{0x2E, 0x13, 0x027F}, | ||
| {0x2E, 0x14, 0x1311},{0x2E, 0x17, 0xA100},{0x2E, 0x1A, 0x0001},{0x2E, 0x1C, 0x0400}, | ||
| {0x2F, 0x00, 0x820F},{0x2F, 0x01, 0x0300},{0x2F, 0x02, 0x1017},{0x2F, 0x03, 0xFFDF}, | ||
| {0x2F, 0x05, 0x7F7C},{0x2F, 0x07, 0x8104},{0x2F, 0x08, 0x0001},{0x2F, 0x09, 0xFFD4}, | ||
| {0x2F, 0x0A, 0x7C2F},{0x2F, 0x0E, 0x003F},{0x2F, 0x0F, 0x0121},{0x2F, 0x10, 0x0020}, | ||
| {0x2F, 0x11, 0x8840}, | ||
| {0x2B, 0x13, 0x3D87},{0x2B, 0x14, 0x3108}, | ||
| {0x2D, 0x13, 0x3C87},{0x2D, 0x14, 0x1808}, | ||
| /*enable eee*/ | ||
| {0x06, 0x03, 0xc45c}, |
There was a problem hiding this comment.
Reference for reviewers: https://github.com/plappermaul/realtek-doc/blob/54589ff0afa70045abfdc71a3133aa55c76257bc/sources/rtk-xgs1210/src/dal/longan/dal_longan_construct.c#L995
WARNING: The {0x06, 0x03, 0xc45c}, is not part of the referenced source code
There was a problem hiding this comment.
| rtl9300_sds_field_w(sds, 0x7, 0x11, 0, 0, nway_en); | ||
| rtl9300_sds_field_w(sds, 0x7, 0x11, 1, 1, nway_en); | ||
| rtl9300_sds_field_w(sds, 0x7, 0x11, 2, 2, nway_en); | ||
| rtl9300_sds_field_w(sds, 0x7, 0x11, 3, 3, nway_en); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x12, 15, 0, am_period); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x13, 7, 0, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x13, 15, 8, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x14, 7, 0, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x14, 15, 8, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x15, 7, 0, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x15, 15, 8, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x16, 7, 0, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x16, 15, 8, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x17, 7, 0, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x17, 15, 8, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x18, 7, 0, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x18, 15, 8, all_am_markers); | ||
| rtl9300_sds_field_w(sds, 0x7, 0x10, 7, 0, opcode); | ||
| rtl9300_sds_field_w(sds, 0x6, 0xe, 10, 10, an_table); | ||
| rtl9300_sds_field_w(sds, 0x6, 0x1d, 11, 10, sync_bit); |
There was a problem hiding this comment.
Can you please provide some references/additional information for this code?
EDIT:
- https://github.com/ddejean/dms-1250-oss-release/blob/0ea68a5a711e977ee035975ca45af7e4f742e5ff/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1315
- https://github.com/ddejean/dms-1250-oss-release/blob/0ea68a5a711e977ee035975ca45af7e4f742e5ff/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L3320
- https://github.com/ddejean/dms-1250-oss-release/blob/0ea68a5a711e977ee035975ca45af7e4f742e5ff/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1439
| {0x06, 0x00, 0x0000},{0x06, 0x0D, 0x0F00},{0x06, 0x0E, 0x055A},{0x07, 0x10, 0x6003}, | ||
| {0x06, 0x1D, 0x0600},{0x06, 0x13, 0x68C1},{0x06, 0x14, 0xF021},{0x07, 0x06, 0x1401}, | ||
| {0x21, 0x03, 0x8206},{0x21, 0x05, 0x40B0},{0x21, 0x06, 0x0010},{0x21, 0x07, 0xF09F}, | ||
| {0x21, 0x0C, 0x0007},{0x21, 0x0D, 0x6009},{0x21, 0x0E, 0x0000},{0x21, 0x0F, 0x0008}, | ||
| {0x2E, 0x00, 0xA668},{0x2E, 0x01, 0x2088},{0x2E, 0x02, 0xD020},{0x2E, 0x06, 0xC000}, | ||
| {0x2E, 0x0B, 0x1892},{0x2E, 0x0F, 0xFFDF},{0x2E, 0x11, 0x8280},{0x2E, 0x12, 0x0484}, | ||
| {0x2E, 0x13, 0x027F},{0x2E, 0x14, 0x1311},{0x2E, 0x17, 0xA100},{0x2E, 0x1A, 0x0001}, | ||
| {0x2E, 0x1C, 0x0400},{0x2F, 0x01, 0x0300},{0x2F, 0x02, 0x1017},{0x2F, 0x03, 0xFFDF}, | ||
| {0x2F, 0x05, 0x7F7C},{0x2F, 0x07, 0x8104},{0x2F, 0x08, 0x0001},{0x2F, 0x09, 0xFFD4}, | ||
| {0x2F, 0x0A, 0x7C2F},{0x2F, 0x0E, 0x003F},{0x2F, 0x0F, 0x0121},{0x2F, 0x10, 0x0020}, | ||
| {0x2F, 0x11, 0x8840}, | ||
| {0x2B, 0x13, 0x0050},{0x2B, 0x18, 0x8E88},{0x2B, 0x19, 0x4902},{0x2B, 0x1D, 0x2501}, | ||
| {0x2D, 0x13, 0x0050},{0x2D, 0x18, 0x8E88},{0x2D, 0x19, 0x4902},{0x2D, 0x1D, 0x2641}, | ||
| {0x2F, 0x13, 0x0050},{0x2F, 0x18, 0x8E88},{0x2F, 0x19, 0x4902},{0x2F, 0x1D, 0x66E1}, | ||
| /*enable eee*/ | ||
| {0x06, 0x03, 0xc45c}, |
There was a problem hiding this comment.
The last sequence comes from https://github.com/ddejean/dms-1250-oss-release/blob/0ea68a5a711e977ee035975ca45af7e4f742e5ff/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1035
It's a more recent version of the OSS release.
| {0x06, 0x00, 0x0000},{0x06, 0x0D, 0x0F00},{0x06, 0x0E, 0x055A},{0x07, 0x10, 0x6003}, | ||
| {0x06, 0x1D, 0x0600},{0x06, 0x13, 0x68C1},{0x06, 0x14, 0xF021},{0x07, 0x06, 0x1401}, | ||
| {0x21, 0x03, 0x8206},{0x21, 0x05, 0x40B0},{0x21, 0x06, 0x0010},{0x21, 0x07, 0xF09F}, | ||
| {0x21, 0x0A, 0x0003},{0x21, 0x0B, 0x0005},{0x21, 0x0C, 0x0007},{0x21, 0x0D, 0x6009}, | ||
| {0x21, 0x0E, 0x0000},{0x21, 0x0F, 0x0008}, | ||
| {0x2E, 0x00, 0xA668},{0x2E, 0x02, 0xD020},{0x2E, 0x06, 0xC000},{0x2E, 0x0B, 0x1892}, | ||
| {0x2E, 0x0F, 0xFFDF},{0x2E, 0x11, 0x8280},{0x2E, 0x12, 0x0484},{0x2E, 0x13, 0x027F}, | ||
| {0x2E, 0x14, 0x1311},{0x2E, 0x17, 0xA100},{0x2E, 0x1A, 0x0001},{0x2E, 0x1C, 0x0400}, | ||
| {0x2F, 0x00, 0x820F},{0x2F, 0x01, 0x0300},{0x2F, 0x02, 0x1017},{0x2F, 0x03, 0xFFDF}, | ||
| {0x2F, 0x05, 0x7F7C},{0x2F, 0x07, 0x8104},{0x2F, 0x08, 0x0001},{0x2F, 0x09, 0xFFD4}, | ||
| {0x2F, 0x0A, 0x7C2F},{0x2F, 0x0E, 0x003F},{0x2F, 0x0F, 0x0121},{0x2F, 0x10, 0x0020}, | ||
| {0x2F, 0x11, 0x8840}, | ||
| {0x2B, 0x13, 0x3D87},{0x2B, 0x14, 0x3108}, | ||
| {0x2D, 0x13, 0x3C87},{0x2D, 0x14, 0x1808}, | ||
| /*enable eee*/ | ||
| {0x06, 0x03, 0xc45c}, |
There was a problem hiding this comment.
| if (phy_mode == PHY_INTERFACE_MODE_USXGMII) { | ||
| rtl9300_sds_usxgmii_config(sds_num, 1, 0xaa, 0x5078, 0, 1, 0x1); | ||
| } |
There was a problem hiding this comment.
The original values come from here: https://github.com/ddejean/dms-1250-oss-release/blob/0ea68a5a711e977ee035975ca45af7e4f742e5ff/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L1315
Unfortunately I can't explain what's their meaning. I agree it's ugly but unfortunalely these patch/configuration sequences are almost not documented.
0d8ef41 to
4f1d57c
Compare
|
Please add a comment into the source code with a link where you found the init sequence. |
4f1d57c to
458cdbb
Compare
|
@plappermaul should these be tested on hw before being merged, or is that not required, what do you think? |
|
@ddejean Thanks for this piece of the puzzle. Pease drop the USXGMII commit in this series (for now). Why? We currently use USXGMII for convenience in several modes (that also includes the proprietary XSGMII aka 10G SGMII Realtek mode). The XGS1210-12 ports 1-8 are driven in XSGMII but are declared USXGMII. Before we solve this riddle we should get the 2500base-x mode working. |
|
EDIT: USXGMII mode patches dropped.
Sure I can do that. However I'm gonna need to introduce the support 10G_QXGMII mode (USXGMII_QX in Realtek stuff) soon to add the support for the RTL8224, and it also requires patches and configuration, will it be an issue? |
|
PHY_INTERFACE_MODE_10G_QXGMII is no issue as we do not use it yet. |
458cdbb to
f95af39
Compare
|
Please rebase on current master. |
f95af39 to
6a0d779
Compare
Done! |
plappermaul
left a comment
There was a problem hiding this comment.
Additionally. The patching function itself needs no link to the source. It is about where the values come from. Please move the link from the first commit to the second commit and link to the data definition.
6a0d779 to
a449135
Compare
plappermaul
left a comment
There was a problem hiding this comment.
Thanks.
P.S. please give the PR a "realtek:" prefix.
a449135 to
f71797a
Compare
Prepare the SerDes patch function to allow different patch sequences depending on the phy mode. Patches are required to allow devices with a lightweight bootloader (one that doesn't have a "rtk network init" command) to use the serdes. Some modes required a different patch sequence than the one currently used. Signed-off-by: Damien Dejean <[email protected]> Link: openwrt#19834 Signed-off-by: Hauke Mehrtens <[email protected]>
Adds the SerDes patch sequence for 2500base-x to improve the support of devices with minimal bootloaders (like BootBase). The sequences were imported from [1] for even lanes and [2] for odd lanes. [1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L641 [2] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L664 Signed-off-by: Damien Dejean <[email protected]> Link: openwrt#19834 Signed-off-by: Hauke Mehrtens <[email protected]>
f71797a to
886382b
Compare
Prepare the SerDes patch function to allow different patch sequences depending on the phy mode. Patches are required to allow devices with a lightweight bootloader (one that doesn't have a "rtk network init" command) to use the serdes. Some modes required a different patch sequence than the one currently used. Signed-off-by: Damien Dejean <[email protected]> Link: openwrt#19834 Signed-off-by: Hauke Mehrtens <[email protected]>
Adds the SerDes patch sequence for 2500base-x to improve the support of devices with minimal bootloaders (like BootBase). The sequences were imported from [1] for even lanes and [2] for odd lanes. [1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L641 [2] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L664 Signed-off-by: Damien Dejean <[email protected]> Link: openwrt#19834 Signed-off-by: Hauke Mehrtens <[email protected]>
Prepare the SerDes patch function to allow different patch sequences depending on the phy mode. Patches are required to allow devices with a lightweight bootloader (one that doesn't have a "rtk network init" command) to use the serdes. Some modes required a different patch sequence than the one currently used. Signed-off-by: Damien Dejean <[email protected]> Link: openwrt/openwrt#19834 Signed-off-by: Hauke Mehrtens <[email protected]>
Adds the SerDes patch sequence for 2500base-x to improve the support of devices with minimal bootloaders (like BootBase). The sequences were imported from [1] for even lanes and [2] for odd lanes. [1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L641 [2] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L664 Signed-off-by: Damien Dejean <[email protected]> Link: openwrt/openwrt#19834 Signed-off-by: Hauke Mehrtens <[email protected]>
Prepare the SerDes patch function to allow different patch sequences depending on the phy mode. Patches are required to allow devices with a lightweight bootloader (one that doesn't have a "rtk network init" command) to use the serdes. Some modes required a different patch sequence than the one currently used. Signed-off-by: Damien Dejean <[email protected]> Link: openwrt#19834 Signed-off-by: Hauke Mehrtens <[email protected]>
Adds the SerDes patch sequence for 2500base-x to improve the support of devices with minimal bootloaders (like BootBase). The sequences were imported from [1] for even lanes and [2] for odd lanes. [1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L641 [2] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L664 Signed-off-by: Damien Dejean <[email protected]> Link: openwrt#19834 Signed-off-by: Hauke Mehrtens <[email protected]>
Lightweight bootloaders (like BootBase) don't offer the
rtk network initcommand as u-boot usually does, thus the kernel starts with a lot of hardware not initialized and fails to use them. The SerDes are requiring an initial patch/configuration sequence to work correctly with certain modes. While the code already has such a sequence for a few modes (10gbase-r, ...), it lacks all the others.This PR brings a set of patches with the following goal:
The sequences come from the DMS1250 OSS package release and were tested on a Zyxel XMG1915-10E switch. For reference, the original patch sequences are located in https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c