From 03422463e4fa3a24480535e61306385549e4db03 Mon Sep 17 00:00:00 2001 From: Jan Hoffmann Date: Thu, 26 Mar 2026 19:53:55 +0100 Subject: [PATCH] Rename K0501W to include PCB version It seems very likely that other versions are not compatible, so make it clear by including it in the machine type and name. Also update the documentation. --- doc/devices/{K0501W.md => K0501W_V2_0.md} | 14 +++++++------- .../photos/{K0501W => K0501W_V2_0}/pcb-bottom.jpg | Bin .../photos/{K0501W => K0501W_V2_0}/pcb-top.jpg | Bin machine.c | 4 ++-- machine.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) rename doc/devices/{K0501W.md => K0501W_V2_0.md} (54%) rename doc/devices/photos/{K0501W => K0501W_V2_0}/pcb-bottom.jpg (100%) rename doc/devices/photos/{K0501W => K0501W_V2_0}/pcb-top.jpg (100%) diff --git a/doc/devices/K0501W.md b/doc/devices/K0501W_V2_0.md similarity index 54% rename from doc/devices/K0501W.md rename to doc/devices/K0501W_V2_0.md index 7a48236..92ca40e 100644 --- a/doc/devices/K0501W.md +++ b/doc/devices/K0501W_V2_0.md @@ -1,16 +1,16 @@ -# K0501W +# K0501W V2.0 This board appears for example in the Davuaz Da-K6501W switch. -It is designed similarly to Hi-K0402WS. However, there are a few differences: +The general design of the board is similar to Hi-K0402WS V3.0. +However, there are several differences: - One SFP port is replaced by a RTL8221B 2.5G PHY - Only one LED is populated for the SFP port - No mode switch and only one flash chip -- Like earlier revisions of the K0402W(S) board, there is no UART +- Older design using RTL8372 instead of RTL8372N (which also means different GPIO and LED configuration) +- Like earlier versions of the K0402W(S) board, there is no UART -Even though board looks very similar to K0402W(S), the actual GPIO and LED configuration is quite different. All ports and LEDs are supported. - Installation is possible using a flash programmer. The BoyaMicro 25Q16BSSIG flash chip is supported by flashprog with chip name "B.25D16AS/BY25Q16BS/BY25Q16ES". @@ -18,6 +18,6 @@ The BoyaMicro 25Q16BSSIG flash chip is supported by flashprog with chip name "B. The board is marked `PCB-K0501W-V2.0 DIP-K0501WS-V2.0`. - + - + diff --git a/doc/devices/photos/K0501W/pcb-bottom.jpg b/doc/devices/photos/K0501W_V2_0/pcb-bottom.jpg similarity index 100% rename from doc/devices/photos/K0501W/pcb-bottom.jpg rename to doc/devices/photos/K0501W_V2_0/pcb-bottom.jpg diff --git a/doc/devices/photos/K0501W/pcb-top.jpg b/doc/devices/photos/K0501W_V2_0/pcb-top.jpg similarity index 100% rename from doc/devices/photos/K0501W/pcb-top.jpg rename to doc/devices/photos/K0501W_V2_0/pcb-top.jpg diff --git a/machine.c b/machine.c index 4c083cc..7ff7a73 100644 --- a/machine.c +++ b/machine.c @@ -409,9 +409,9 @@ void machine_custom_init(void) { reg_bit_set(RTL837X_REG_LED_GLB_IO_EN, 6); } -#elif defined MACHINE_K0501W +#elif defined MACHINE_K0501W_V2_0 __code const struct machine machine = { - .machine_name = "K0501W", + .machine_name = "K0501W V2.0", .isRTL8373 = 0, .min_port = 3, .max_port = 8, diff --git a/machine.h b/machine.h index 451c6b1..1b4746c 100644 --- a/machine.h +++ b/machine.h @@ -17,7 +17,7 @@ // #define MACHINE_SWTG018AS_A_V_2_0 // #define MACHINE_SWTGW218AS // #define MACHINE_HI_K0402WS -// #define MACHINE_K0501W +// #define MACHINE_K0501W_V2_0 // #define MACHINE_DEFAULT_8C_1SFP typedef struct {