diff --git a/doc/devices/KP-9000-6XH-X2.md b/doc/devices/KP-9000-6XH-X2.md index b1c8fdc..d0f19b9 100644 --- a/doc/devices/KP-9000-6XH-X2.md +++ b/doc/devices/KP-9000-6XH-X2.md @@ -16,16 +16,20 @@ Using SPI clamp in-board is the only method for initial installation. ### Machine target These devices exist with different PCB revisions. Select the machine target by -the PCB silkscreen, not only by the label on the case. +the PCB silkscreen, not by the label on the case. The `6XH` / `6XHML` +distinction appears to be a stock firmware, SKU or label difference, not a +reliable indicator of PCB wiring. The PCB revision defines the hardware layout. -| PCB silkscreen | Known labels | Recommended machine target | Legacy target | -| --- | --- | --- | --- | -| `2M-PCB43-V1.2` | `KP-9000-6XHML-X2` | `MACHINE_KP_9000_6XHML_X2_V1_2` | `MACHINE_KP_9000_6XHML_X2` | -| `2M-PCB43-V2.1` | `KP-9000-6XH-X2`, `KP-9000-6XHML-X2` | `MACHINE_KP_9000_6XH_X2_V2_1` or `MACHINE_KP_9000_6XHML_X2_V2_1` | `MACHINE_KP_9000_6XH_X2` | +| PCB silkscreen | Known labels / devices | Recommended machine target | Equivalent target | Legacy target | +| --- | --- | --- | --- | --- | +| `2M-PCB43-V1.1` | Mokerlink 2G040210GSM web-managed 4+2 switch | `MACHINE_KP_9000_6XHML_X2_V1_1` | `MACHINE_KP_9000_6XH_X2_V1_1` | `MACHINE_KP_9000_6XHML_X2` | +| `2M-PCB43-V1.2` | `KP-9000-6XHML-X2` | `MACHINE_KP_9000_6XHML_X2_V1_2` | `MACHINE_KP_9000_6XH_X2_V1_2` | `MACHINE_KP_9000_6XHML_X2` | +| `2M-PCB43-V2.1` | `KP-9000-6XH-X2`, `KP-9000-6XHML-X2` | `MACHINE_KP_9000_6XH_X2_V2_1` or `MACHINE_KP_9000_6XHML_X2_V2_1` | same V2.1 layout | `MACHINE_KP_9000_6XH_X2` | -The V1.2 and V2.1 boards use different GPIO, SFP, port and LED mappings. -The unmanaged and managed labels are firmware/SKU differences and do not by -themselves identify the PCB wiring. +The V1.1 and V1.2 boards currently use the same V1.x GPIO, SFP, port and LED +layout. The V2.1 board uses a different V2.1 layout with custom LED muxing. +Legacy targets are preserved for compatibility with already-tested devices, but +new builds should prefer the explicit PCB-revision targets. ### What works @@ -59,9 +63,11 @@ Bottom -### Hardware overview: 2M-PCB43-V1.2 +### Hardware overview: 2M-PCB43-V1.1 / V1.2 -The V1.2 board has been seen in managed `KP-9000-6XHML-X2` devices. +The V1.1 board has been reported in the Mokerlink 2G040210GSM web-managed 4+2 +switch. The V1.2 board has been seen in managed `KP-9000-6XHML-X2` devices. +Both use the same V1.x layout. Label: diff --git a/doc/supported_devices.md b/doc/supported_devices.md index b367c1e..bdb21c2 100644 --- a/doc/supported_devices.md +++ b/doc/supported_devices.md @@ -13,7 +13,8 @@ The following devices have been tested and are fully working: | Horaco | ZX310S-4T2XH | Yes | [PCB-SL310S-4T1T1X-V1.0.1-24107](https://github.com/logicog/RTLPlayground/blob/main/doc/devices/ZX310S-4T2XH.md) | 2M | 5 + 1 | | Horaco | ZX310S-4T2XT | Yes | [PCB-SL310S-4T2XT-V1.0.0-22273](https://github.com/logicog/RTLPlayground/blob/main/doc/devices/ZX310S-4T2XT.md) | 2M | 6 | | Horaco | ZX-SWTG124AS | Yes | [SWTG024AS-v2.0](https://github.com/logicog/RTLPlayground/blob/main/doc/devices/SWTG024AS.md) | | 4 + 2 | -| Keeplink | KP-9000-6XH-X2 / KP-9000-6XHML-X2 | No/Yes | [2M-PCB43-V1.2 / V2.1](https://github.com/logicog/RTLPlayground/blob/main/doc/devices/KP-9000-6XH-X2.md) | | 4 + 2 | +| Keeplink | KP-9000-6XH-X2 / KP-9000-6XHML-X2 | No/Yes | [2M-PCB43-V1.2 / V2.1](https://github.com/logicog/RTLPlayground/blob/main/doc/devices/KP-9000-6XH-X2.md) | | 4 + 2 | +| Mokerlink | 2G040210GSM | Yes | [2M-PCB43-V1.1](https://github.com/logicog/RTLPlayground/blob/main/doc/devices/KP-9000-6XH-X2.md) | | 4 + 2 | | keepLINK | KP-9000-9XHML-X | Yes | [2M-PCB23-V2.2](https://github.com/logicog/RTLPlayground/blob/main/doc/devices/2M-PCB23-V2_2.md) | 2M | 8 + 1 | | keepLINK | KP-9000-9XHML-X | Yes | [2M-PCB23-V3.1](https://github.com/logicog/RTLPlayground/blob/main/doc/devices/2M-PCB23-V3_1.md) | 2M | 8 + 1 | | LIANGUO | SWTG024AS | No | [SWTG024AS-v2.0-17452](https://github.com/logicog/RTLPlayground/blob/main/doc/devices/SWTG024AS.md) | 0.5M | 4 + 2 | @@ -26,8 +27,9 @@ The following devices have been tested and are fully working: | XikeStor | SKS3200-8E1X | Yes | [SWTG118AS-V2.1-17462](https://github.com/logicog/RTLPlayground/blob/main/doc/devices/SWTGW218AS.md) | 2M | 8 + 1 | | Ztyuav | Z-QWYT0402 | No | [PCB-K0402WS-V3.0](https://github.com/logicog/RTLPlayground/blob/main/doc/devices/PCB-K0402WS-V3.0.md) | | 4 + 2 | -For KP-9000-6XH-X2 / KP-9000-6XHML-X2 devices, select the machine target by PCB -revision. The managed/unmanaged label alone does not identify the wiring. +For KP-9000-6XH-X2 / KP-9000-6XHML-X2 / Mokerlink 2G040210GSM devices, select +the machine target by PCB revision. The ML/non-ML or managed/unmanaged label +alone does not identify the wiring. Other device based on RTL8272/3 that may work are described here: [Up-N-Atoms 2.5 GBit RTL Switch hacking guide](https://github.com/up-n-atom/SWTG118AS) diff --git a/machine.c b/machine.c index d54998b..35b545d 100644 --- a/machine.c +++ b/machine.c @@ -5,9 +5,19 @@ #include "rtl837x_regs.h" #include "rtl837x_common.h" -#if defined(MACHINE_KP_9000_6XHML_X2) || defined(MACHINE_KP_9000_6XHML_X2_V1_2) +#if defined(MACHINE_KP_9000_6XHML_X2) || \ + defined(MACHINE_KP_9000_6XH_X2_V1_1) || \ + defined(MACHINE_KP_9000_6XHML_X2_V1_1) || \ + defined(MACHINE_KP_9000_6XH_X2_V1_2) || \ + defined(MACHINE_KP_9000_6XHML_X2_V1_2) __code const struct machine machine = { -#if defined(MACHINE_KP_9000_6XHML_X2_V1_2) +#if defined(MACHINE_KP_9000_6XH_X2_V1_1) + .machine_name = "keepLink KP-9000-6XH V1.1", +#elif defined(MACHINE_KP_9000_6XHML_X2_V1_1) + .machine_name = "keepLink KP-9000-6XHML V1.1", +#elif defined(MACHINE_KP_9000_6XH_X2_V1_2) + .machine_name = "keepLink KP-9000-6XH V1.2", +#elif defined(MACHINE_KP_9000_6XHML_X2_V1_2) .machine_name = "keepLink KP-9000-6XHML V1.2", #else .machine_name = "keepLink KP-9000-6XHML-X2", diff --git a/machine.h b/machine.h index 5ae75c9..1da0458 100644 --- a/machine.h +++ b/machine.h @@ -6,12 +6,19 @@ /* * Select your machine type below */ +// Legacy KP-9000 4+2 targets. Prefer the PCB-revision-specific targets below. // #define MACHINE_KP_9000_6XHML_X2 -// #define MACHINE_KP_9000_6XHML_X2_V1_2 -// #define MACHINE_KP_9000_6XHML_X2_V2_1 -// #define MACHINE_KP_9000_6XH_X // #define MACHINE_KP_9000_6XH_X2 + +// KP-9000 4+2 targets by PCB silkscreen revision. +// #define MACHINE_KP_9000_6XH_X2_V1_1 +// #define MACHINE_KP_9000_6XHML_X2_V1_1 +// #define MACHINE_KP_9000_6XH_X2_V1_2 +// #define MACHINE_KP_9000_6XHML_X2_V1_2 // #define MACHINE_KP_9000_6XH_X2_V2_1 +// #define MACHINE_KP_9000_6XHML_X2_V2_1 + +// #define MACHINE_KP_9000_6XH_X // #define MACHINE_KP_9000_9XH_X_EU // #define MACHINE_KP_9000_9XHML_X_V2_2 // #define MACHINE_KP_9000_9XHML_X_V3_1