diff --git a/doc/devices/PCB-K0402WS-V1.0.md b/doc/devices/PCB-K0402WS-V1.0.md new file mode 100644 index 00000000..e732a20f --- /dev/null +++ b/doc/devices/PCB-K0402WS-V1.0.md @@ -0,0 +1,72 @@ +# PCB-K0402WS-V1.0 + +This is the first revision of the PCB-K0402WS series of boards; it's very similar to 2.0 in terms of layout/wiring. + +The board does have footprints for a VLAN modeswitch at the front and a second flash chip on the bottom of the PCB, but these have been seen to ship unpopulated. + +### Brands + +* YuanLey YS25-0402 Note: there are [multiple revisions](PCB-K0402WS-V3.0.md) of the YS25-0402. This first revision lacks the "Vlan" switch cutout on the front of the enclosure. + +### Programming + +Use a SOIC-8 clamp to the flash chip (U1 on silkscreen) at the top of the board, leaving it otherwise unpowered. + +The board has been seen to ship with a single [BoyaMicro BY25Q16BSSIG](https://www.lcsc.com/datasheet/C382744.pdf) 16Mbit (2MiB) chip, though exact BOM may vary. + + + +### What works + +- All four 2.5GBASE-T RJ45 ports at 10/100/1000/2500 Mbps +- Both SFP ports supporting 1G, 2.5G and 10G modules +- LEDs (Power LED is always on) + +### PCB overview + +#### Board markings +- Top silkscreen: PCB-K0402W-V1.0 / DIP-K0402WS-V1.0 + +#### Key components +- U1: SPI NOR flash, 2 MiB +- S1: unpopulated slide switch footprint (three through-holes used as serial console) + +Front panel + + + +PCB top + + + +PCB bottom + + + +Bottom and rear + + + +### Power supply + +Input power is delivered via a standard DC barrel jack (5.5x2.1mm) with an included 12V 1A adapter. + +There is an optional grounding screw next to the DC input. + +### Serial console + +The PCB has a slide switch footprint (unpopulated) at the front right that is connected to the UART. It is labeled as "S1" on the silkscreen. + +Facing the top front (port) side of the board, the pinout from left to right is: + +| Position | Signal | GPIO | +|----------|--------|-------------------| +| 1 | RX | GPIO32\_UART0\_RX | +| 2 | GND | N/A | +| 3 | TX | GPIO31\_UART0\_TX | + +Standard 0.1" / 2.54mm pin headers will not fit, so wires or clips may be used instead. + +The image below shows some oversized clips clumsily attached. + + diff --git a/doc/devices/PCB-K0402WS-V3.0.md b/doc/devices/PCB-K0402WS-V3.0.md index ae0d5910..6246a910 100644 --- a/doc/devices/PCB-K0402WS-V3.0.md +++ b/doc/devices/PCB-K0402WS-V3.0.md @@ -22,6 +22,11 @@ of the device just above the big label, might be covered by a QC sticker. * SICSOLINK SL-G0402F + +* YuanLey YS25-0402 Note: there are [multiple revisions](PCB-K0402WS-V1.0.md) of the YS25-0402. This is the newer revision that has a "Vlan" switch on the front. + + + ### Programming Using SPI clamp in-board is the only method for initial installation. diff --git a/doc/devices/photos/PCB-K0402WS-V1.0/bottom.jpg b/doc/devices/photos/PCB-K0402WS-V1.0/bottom.jpg new file mode 100644 index 00000000..3c5d2440 Binary files /dev/null and b/doc/devices/photos/PCB-K0402WS-V1.0/bottom.jpg differ diff --git a/doc/devices/photos/PCB-K0402WS-V1.0/flash.jpg b/doc/devices/photos/PCB-K0402WS-V1.0/flash.jpg new file mode 100644 index 00000000..7781f009 Binary files /dev/null and b/doc/devices/photos/PCB-K0402WS-V1.0/flash.jpg differ diff --git a/doc/devices/photos/PCB-K0402WS-V1.0/pcb-bottom.jpg b/doc/devices/photos/PCB-K0402WS-V1.0/pcb-bottom.jpg new file mode 100644 index 00000000..43d13a7e Binary files /dev/null and b/doc/devices/photos/PCB-K0402WS-V1.0/pcb-bottom.jpg differ diff --git a/doc/devices/photos/PCB-K0402WS-V1.0/pcb-top.jpg b/doc/devices/photos/PCB-K0402WS-V1.0/pcb-top.jpg new file mode 100644 index 00000000..0ca412d7 Binary files /dev/null and b/doc/devices/photos/PCB-K0402WS-V1.0/pcb-top.jpg differ diff --git a/doc/devices/photos/PCB-K0402WS-V1.0/ports.jpg b/doc/devices/photos/PCB-K0402WS-V1.0/ports.jpg new file mode 100644 index 00000000..c6bded40 Binary files /dev/null and b/doc/devices/photos/PCB-K0402WS-V1.0/ports.jpg differ diff --git a/doc/devices/photos/PCB-K0402WS-V1.0/uart.jpg b/doc/devices/photos/PCB-K0402WS-V1.0/uart.jpg new file mode 100644 index 00000000..b76602a5 Binary files /dev/null and b/doc/devices/photos/PCB-K0402WS-V1.0/uart.jpg differ diff --git a/doc/devices/photos/PCB-K0402WS-V3.0/YuanLey_YS25-0402.jpg b/doc/devices/photos/PCB-K0402WS-V3.0/YuanLey_YS25-0402.jpg new file mode 100644 index 00000000..bb403cce Binary files /dev/null and b/doc/devices/photos/PCB-K0402WS-V3.0/YuanLey_YS25-0402.jpg differ diff --git a/doc/supported_devices.md b/doc/supported_devices.md index 6bbcb8d4..f0b11c63 100644 --- a/doc/supported_devices.md +++ b/doc/supported_devices.md @@ -42,6 +42,8 @@ The following devices have been tested and are fully working: | TRENDnet | TEG-S562 | No | [TEG-S563/EU H/W: V1.0R](devices/TEG-S562.md) | 2M | 4 + 2 | | XikeStor | SKS3200M-4GPY2XF| Yes | [SWTG024AS-v1.0](devices/SWTG024AS.md) | | 4 + 2 | | XikeStor | SKS3200-8E1X | Yes | [SWTG118AS-V2.1-17462](devices/SWTGW218AS.md) | 2M | 8 + 1 | +| YuanLey | YS25-0402 | No | [PCB-K0402WS-V1.0](devices/PCB-K0402WS-V1.0.md) | 2M | 4 + 2 | +| YuanLey | YS25-0402 | No | [PCB-K0402WS-V3.0](devices/PCB-K0402WS-V3.0.md) | 2M | 4 + 2 | | Ztyuav | Z-QWYT0402 | No | [PCB-K0402WS-V3.0](devices/PCB-K0402WS-V3.0.md) | | 4 + 2 | For KP-9000-6XH-X2 / KP-9000-6XHML-X2 / Mokerlink 2G040210GSM devices, select diff --git a/machine/PCB_K0402WS_V1.c b/machine/PCB_K0402WS_V1.c new file mode 100644 index 00000000..0f365025 --- /dev/null +++ b/machine/PCB_K0402WS_V1.c @@ -0,0 +1,57 @@ +#include "machine_defs.h" + +__code const struct machine machine = { + .machine_name = MACHINE_MODEL, + .isRTL8373 = 0, + .min_port = 3, + .max_port = 8, + .n_sfp = 2, + .log_to_phys_port = {0, 0, 0, 6, 1, 2, 3, 4, 5}, + .phys_to_log_port = {4, 5, 6, 7, 8, 3, 0, 0, 0}, + .is_sfp = {0, 0, 0, 2, 0, 0, 0, 0, 1}, + + /* Left SFP (logical 8, SDS1): GPIO30=ModAbs, GPIO37=RX_LOS */ + .sfp_port[0].pin_detect = GPIO30_ACL_BIT3_EN, + .sfp_port[0].pin_los = GPIO37, + .sfp_port[0].pin_tx_disable = GPIO_NA, + .sfp_port[0].sds = 1, + .sfp_port[0].i2c = I2CBUS( GPIO39_I2C_SDA4, GPIO40_I2C_SCL3_MDC1 ), + + /* Right SFP (logical 3, SDS0): GPIO50=ModAbs, GPIO51=RX_LOS */ + .sfp_port[1].pin_detect = GPIO50_I2C_SCL2_UART1_TX, + .sfp_port[1].pin_los = GPIO51_I2C_SDA2_UART1_RX, + .sfp_port[1].pin_tx_disable = GPIO_NA, + .sfp_port[1].sds = 0, + .sfp_port[1].i2c = I2CBUS( GPIO41_I2C_SDA3_MDIO1, GPIO40_I2C_SCL3_MDC1 ), + + .reset_pin = GPIO_NA, + + /* These don't appear to be populated / wired-up; the power LED is always on */ + .high_leds = { 0 }, + + /* Copper ports use SET0; SFP ports use SET1 */ + .port_led_set = {0, 0, 0, 1, 0, 0, 0, 0, 1}, + + .led_sets = { + { /* SET0: copper — LED0=amber (2.5G), LED2=green (1G/100M/10M) */ + LEDS_2G5 | LEDS_LINK | LEDS_ACT, + 0, + LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, + 0 + }, + { /* SET1: SFP — all speeds link/act */ + LEDS_10G | LEDS_2G5 | LEDS_1G | LEDS_100M | LEDS_10M | LEDS_LINK | LEDS_ACT, + 0, + 0, + 0 + }, + }, + + .led_mux_custom = 1, + .led_mux = { + 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, /* GPIO0-7: unused */ + 0x0f, 0x0c, 0x0d, 0x0e, 0x10, 0x11, 0x12, /* GPIO8-14 */ + 0x14, 0x15, 0x16, 0x18, 0x19, 0x1a, /* GPIO15-20 */ + 0x1c, 0x1d, 0x1e, 0x20, 0x21, 0x22, 0x23 /* GPIO21-27 */ + }, +}; diff --git a/machine/PCB_K0402WS_V1.h b/machine/PCB_K0402WS_V1.h new file mode 100644 index 00000000..d1170aa7 --- /dev/null +++ b/machine/PCB_K0402WS_V1.h @@ -0,0 +1,6 @@ +#ifndef _MACHINE_PCB_K0402WS_V1_H_ +#define _MACHINE_PCB_K0402WS_V1_H_ + +#define MACHINE_MODEL "PCB-K0402WS-V1.0" + +#endif