)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"38338fab82f1f58f4118d438bad36639b9e6222f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3d2a12bd_51a2b86f","updated":"2026-03-31 08:15:46.000000000","message":"Thanks for this patch, nice hack!\nPlease run checkpatch script locally, as the patch does not pass the automatic test.\nI have not reviewed it yet, but I have some comment below.","commit_id":"283569ee737f4110d7c48af9640f091850d06669"}],"configure.ac":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"dbd19e4092362cb54bda63980001a25dccf560c7","unresolved":true,"context_lines":[{"line_number":127,"context_line":"m4_define([USB1_ADAPTERS],"},{"line_number":128,"context_line":"\t[[[ftdi], [MPSSE mode of FTDI based devices], [FTDI]],"},{"line_number":129,"context_line":"\t[[ftdi_cjtag], [cJTAG (OScan1, JScan3) tunneled thru MPSSE], [FTDI_CJTAG]],"},{"line_number":130,"context_line":"\t[[ch347], [CH347 based devices], [CH347]],"},{"line_number":131,"context_line":"\t[[stlink], [ST-Link Programmer], [HLADAPTER_STLINK]],"},{"line_number":132,"context_line":"\t[[ti_icdi], [TI ICDI JTAG Programmer], [HLADAPTER_ICDI]],"},{"line_number":133,"context_line":"\t[[ulink], [Keil ULINK JTAG Programmer], [ULINK]],"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"08100626_6daa2a26","line":130,"updated":"2026-04-04 22:16:04.000000000","message":"Here the simpler change is to add one line in this list\n`[[usb3813spi], [USB3813 hub SPI driver], [USB3813SPI]],`\nand nothing more needs to be added in `configure.ac`","commit_id":"2d0e3ff3fab3e42502d22e10e84189de6741d912"}],"contrib/60-openocd.rules":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"dbd19e4092362cb54bda63980001a25dccf560c7","unresolved":true,"context_lines":[{"line_number":195,"context_line":"ATTRS{idVendor}\u003d\u003d\"1514\", ATTRS{idProduct}\u003d\u003d\"200a\", MODE\u003d\"660\", GROUP\u003d\"plugdev\", TAG+\u003d\"uaccess\""},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"# Microchip USB3813 hub adapter"},{"line_number":198,"context_line":"ATTRS{idVendor}\u003d\u003d\"0424\", ATTRS{idProduct}\u003d\u003d\"3813\", MODE\u003d\"660\", GROUP\u003d\"plugdev\", TAG+\u003d\"uaccess\""},{"line_number":199,"context_line":"ATTRS{idVendor}\u003d\u003d\"0424\", ATTRS{idProduct}\u003d\u003d\"2530\", MODE\u003d\"660\", GROUP\u003d\"plugdev\", TAG+\u003d\"uaccess\""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"# OSBDM"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"fabcce31_d0d3872c","line":198,"updated":"2026-04-04 22:16:04.000000000","message":"please keep the file in order by vendor id, and then product id\nThe above vendor ID 1514 is the old one from Actel, acquired by Microchip in 2018","commit_id":"2d0e3ff3fab3e42502d22e10e84189de6741d912"}],"doc/openocd.texi":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"38338fab82f1f58f4118d438bad36639b9e6222f","unresolved":true,"context_lines":[{"line_number":3661,"context_line":"@end deffn"},{"line_number":3662,"context_line":""},{"line_number":3663,"context_line":"@deffn {Config Command} {usb3813spi mode} mode"},{"line_number":3664,"context_line":"Specifies the SPI mode (0 or 3, default 3)."},{"line_number":3665,"context_line":"@end deffn"},{"line_number":3666,"context_line":""},{"line_number":3667,"context_line":"@deffn {Config Command} {usb3813spi queue_entries} entries"}],"source_content_type":"text/x-texinfo","patch_set":1,"id":"1e65c12d_a924f763","line":3664,"updated":"2026-03-31 08:15:46.000000000","message":"In the code I read that modes 1 and 3 are supported, not 0.\n\nReading the SWD spec and time diagram in ARM IHI 0031, \nSWD requires data is shifted out on rising SWCLK, sampled on falling SWCLK.\nThis looks more mode 1.\nAre you sure SWD works with mode 3 (that it\u0027s also the default!)?","commit_id":"283569ee737f4110d7c48af9640f091850d06669"},{"author":{"_account_id":1002347,"name":"Richard Pasek","email":"rpasek@google.com","username":"rpasek"},"change_message_id":"c5e2a8c3cc915641f0516899ff259712d9b9bef8","unresolved":false,"context_lines":[{"line_number":3661,"context_line":"@end deffn"},{"line_number":3662,"context_line":""},{"line_number":3663,"context_line":"@deffn {Config Command} {usb3813spi mode} mode"},{"line_number":3664,"context_line":"Specifies the SPI mode (0 or 3, default 3)."},{"line_number":3665,"context_line":"@end deffn"},{"line_number":3666,"context_line":""},{"line_number":3667,"context_line":"@deffn {Config Command} {usb3813spi queue_entries} entries"}],"source_content_type":"text/x-texinfo","patch_set":1,"id":"8f420d2c_7a520868","line":3664,"in_reply_to":"1e65c12d_a924f763","updated":"2026-04-02 17:39:20.000000000","message":"Thanks for finding this. The hardware only supports mode 0 and 3 and the code is wrong. This is corrected in the latest commit.\n\nWe have been debating this in the office for a while now. We\u0027ve found that mode 3 works best and we think we understand why.\nIn IHI0031H_debug_interface_v5_2_architecture_specification.pdf B4.3.1 Line interface (Page 118) we found the following text:\n\n\u003e When the target samples SWDIO, sampling is performed on the rising edge of SWCLK. When the target drives SWDIO, or stops driving it, signal changes are performed on the rising edge of SWCLK.\n\nWe think this means the sampling edge changes when the host or target is driving:\n\u003e Target: Samples rising edge\nHost: Samples falling edge\n\nMode 3 (clock idle high, sampling rising edge) is correct for the target but incorrect for the host but we suspect it always works because the host drives the clock and when the host drives the clock, there is a delay for the clock signal to propagate to the target and for the target to act on it. This means at the point that the host samples, the data is actually still correct.\n\nSince SPI can\u0027t change where it samples, we think this means that out of the options that are available to us, mode 3 is the best choice.","commit_id":"283569ee737f4110d7c48af9640f091850d06669"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"dbd19e4092362cb54bda63980001a25dccf560c7","unresolved":true,"context_lines":[{"line_number":3661,"context_line":"@end deffn"},{"line_number":3662,"context_line":""},{"line_number":3663,"context_line":"@deffn {Config Command} {usb3813spi mode} mode"},{"line_number":3664,"context_line":"Specifies the SPI mode (0 or 3, default 3)."},{"line_number":3665,"context_line":"@end deffn"},{"line_number":3666,"context_line":""},{"line_number":3667,"context_line":"@deffn {Config Command} {usb3813spi queue_entries} entries"}],"source_content_type":"text/x-texinfo","patch_set":1,"id":"b1c904a4_1ac53c54","line":3664,"in_reply_to":"8f420d2c_7a520868","updated":"2026-04-04 22:16:04.000000000","message":"It makes sense.\nI don\u0027t know the impact of clock idle high of mode 3. Probably no impact apart adding one delay at each transfer. But with clock at 30 or 60 MHz, this is not relevant.\nWhat about mode 0, supported by the command `usb3813spi mode0` ? Does it work too? If it doesn\u0027t work for SWD, maybe the command can be dropped from this driver.","commit_id":"283569ee737f4110d7c48af9640f091850d06669"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"38338fab82f1f58f4118d438bad36639b9e6222f","unresolved":true,"context_lines":[{"line_number":3664,"context_line":"Specifies the SPI mode (0 or 3, default 3)."},{"line_number":3665,"context_line":"@end deffn"},{"line_number":3666,"context_line":""},{"line_number":3667,"context_line":"@deffn {Config Command} {usb3813spi queue_entries} entries"},{"line_number":3668,"context_line":"Specifies the maximum number of SWD transactions to queue (default 32, max 32)."},{"line_number":3669,"context_line":"@end deffn"},{"line_number":3670,"context_line":"@end deffn"}],"source_content_type":"text/x-texinfo","patch_set":1,"id":"d9c5109d_ae966a55","line":3667,"updated":"2026-03-31 08:15:46.000000000","message":"What is the advantage/need of reducing the queue?","commit_id":"283569ee737f4110d7c48af9640f091850d06669"},{"author":{"_account_id":1002347,"name":"Richard Pasek","email":"rpasek@google.com","username":"rpasek"},"change_message_id":"c5e2a8c3cc915641f0516899ff259712d9b9bef8","unresolved":false,"context_lines":[{"line_number":3664,"context_line":"Specifies the SPI mode (0 or 3, default 3)."},{"line_number":3665,"context_line":"@end deffn"},{"line_number":3666,"context_line":""},{"line_number":3667,"context_line":"@deffn {Config Command} {usb3813spi queue_entries} entries"},{"line_number":3668,"context_line":"Specifies the maximum number of SWD transactions to queue (default 32, max 32)."},{"line_number":3669,"context_line":"@end deffn"},{"line_number":3670,"context_line":"@end deffn"}],"source_content_type":"text/x-texinfo","patch_set":1,"id":"effa5551_2a4969ad","line":3667,"in_reply_to":"d9c5109d_ae966a55","updated":"2026-04-02 17:39:20.000000000","message":"USB3813 only has a 256 byte transmit buffer so we can only send 256/8 (6 bytes SWD data, 2 bytes worst case delay clocks)\u003d32 SWD packets at a time.","commit_id":"283569ee737f4110d7c48af9640f091850d06669"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"dbd19e4092362cb54bda63980001a25dccf560c7","unresolved":true,"context_lines":[{"line_number":3664,"context_line":"Specifies the SPI mode (0 or 3, default 3)."},{"line_number":3665,"context_line":"@end deffn"},{"line_number":3666,"context_line":""},{"line_number":3667,"context_line":"@deffn {Config Command} {usb3813spi queue_entries} entries"},{"line_number":3668,"context_line":"Specifies the maximum number of SWD transactions to queue (default 32, max 32)."},{"line_number":3669,"context_line":"@end deffn"},{"line_number":3670,"context_line":"@end deffn"}],"source_content_type":"text/x-texinfo","patch_set":1,"id":"cd872e01_4acd9b82","line":3667,"in_reply_to":"effa5551_2a4969ad","updated":"2026-04-04 22:16:04.000000000","message":"But why an OpenOCD user would need to decrease it below 32?","commit_id":"283569ee737f4110d7c48af9640f091850d06669"}],"src/jtag/drivers/usb3813spi.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"38338fab82f1f58f4118d438bad36639b9e6222f","unresolved":true,"context_lines":[{"line_number":212,"context_line":"static uint16_t spi_vid \u003d 0x0424;"},{"line_number":213,"context_line":"static uint16_t spi_pid \u003d 0x2530;"},{"line_number":214,"context_line":"static uint16_t hub_vid \u003d 0x0424;"},{"line_number":215,"context_line":"static uint16_t hub_pid \u003d 0x3813;"},{"line_number":216,"context_line":"static uint32_t spi_mode \u003d 3;"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"struct queue_info {"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"47713928_78e3eebf","line":215,"updated":"2026-03-31 08:15:46.000000000","message":"I think you need to add these VID:PID in the file\ncontrib/60-openocd.rules\nand install it, otherwise you would be forced to run OpenOCD as root to access to the USB device\nPlease add the needed lines to that file.","commit_id":"283569ee737f4110d7c48af9640f091850d06669"},{"author":{"_account_id":1002347,"name":"Richard Pasek","email":"rpasek@google.com","username":"rpasek"},"change_message_id":"c5e2a8c3cc915641f0516899ff259712d9b9bef8","unresolved":false,"context_lines":[{"line_number":212,"context_line":"static uint16_t spi_vid \u003d 0x0424;"},{"line_number":213,"context_line":"static uint16_t spi_pid \u003d 0x2530;"},{"line_number":214,"context_line":"static uint16_t hub_vid \u003d 0x0424;"},{"line_number":215,"context_line":"static uint16_t hub_pid \u003d 0x3813;"},{"line_number":216,"context_line":"static uint32_t spi_mode \u003d 3;"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"struct queue_info {"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"7d1facb3_dcddb00f","line":215,"in_reply_to":"47713928_78e3eebf","updated":"2026-04-02 17:39:20.000000000","message":"Thanks!","commit_id":"283569ee737f4110d7c48af9640f091850d06669"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"dbd19e4092362cb54bda63980001a25dccf560c7","unresolved":true,"context_lines":[{"line_number":18,"context_line":" * The Microchip USB3813 is originally an SMSC part. It\u0027s very poorly"},{"line_number":19,"context_line":" * documented, seemingly intentionally. Original SMSC documentation contains"},{"line_number":20,"context_line":" * more information than Microchip documentation. Most of the SMSC"},{"line_number":21,"context_line":" * documentation is no longer online."},{"line_number":22,"context_line":" *"},{"line_number":23,"context_line":" * Here are the documents and code that was used to create this driver:"},{"line_number":24,"context_line":" * 1. USB3813: USB 2.0 Hi-Speed 3-Port Hub Controller Optimized for Portable Applications"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"ea31d866_9a8d6927","line":21,"updated":"2026-04-04 22:16:04.000000000","message":"Maybe you can try asking Microchip directly.\nMe, I don\u0027t feel comfortable asking Microchip for un-official docs, but only because my employer is one of their competitors.","commit_id":"2d0e3ff3fab3e42502d22e10e84189de6741d912"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"dbd19e4092362cb54bda63980001a25dccf560c7","unresolved":true,"context_lines":[{"line_number":46,"context_line":" *"},{"line_number":47,"context_line":" * Other Microchip hubs will likely need modification to REG_SPI_BASE."},{"line_number":48,"context_line":" *"},{"line_number":49,"context_line":" * The SPI bus appears to only be able operate at 30 or 60 MHz and is selectable"},{"line_number":50,"context_line":" * exclusively with strap resistors. The SEC1210 documentation discusses a"},{"line_number":51,"context_line":" * divisor that would provide a lot of flexibility but it\u0027s unknown if and where"},{"line_number":52,"context_line":" * it\u0027s present in USB3813."}],"source_content_type":"text/x-csrc","patch_set":6,"id":"692ced3a_aabc5494","line":49,"updated":"2026-04-04 22:16:04.000000000","message":"typo? \"able `to` operate\" ?","commit_id":"2d0e3ff3fab3e42502d22e10e84189de6741d912"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"dbd19e4092362cb54bda63980001a25dccf560c7","unresolved":true,"context_lines":[{"line_number":52,"context_line":" * it\u0027s present in USB3813."},{"line_number":53,"context_line":" */"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"/* Uncomment to log SPI exchanges (very verbose, slows things down a lot)"},{"line_number":56,"context_line":" *"},{"line_number":57,"context_line":" * A quick note on interpreting SPI exchange messages:"},{"line_number":58,"context_line":" *"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"88535af2_56f65a43","line":55,"updated":"2026-04-04 22:16:04.000000000","message":"Instead of using the macro LOG_SPI_EXCHANGE to enable the verbose log through `LOG_OUTPUT()`, why not using `LOG_DEBUG_IO()` directly whitout any `#if`?","commit_id":"2d0e3ff3fab3e42502d22e10e84189de6741d912"}],"src/jtag/interface.h":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"dbd19e4092362cb54bda63980001a25dccf560c7","unresolved":true,"context_lines":[{"line_number":396,"context_line":"extern struct adapter_driver kitprog_adapter_driver;"},{"line_number":397,"context_line":"extern struct adapter_driver linuxgpiod_adapter_driver;"},{"line_number":398,"context_line":"extern struct adapter_driver linuxspidev_adapter_driver;"},{"line_number":399,"context_line":"extern struct adapter_driver usb3813spi_adapter_driver;"},{"line_number":400,"context_line":"extern struct adapter_driver opendous_adapter_driver;"},{"line_number":401,"context_line":"extern struct adapter_driver openjtag_adapter_driver;"},{"line_number":402,"context_line":"extern struct adapter_driver osbdm_adapter_driver;"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"35352483_97fa8c90","line":399,"updated":"2026-04-04 22:16:04.000000000","message":"please keep the list in alphabetic order, as reported on top","commit_id":"2d0e3ff3fab3e42502d22e10e84189de6741d912"}],"src/jtag/interfaces.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"dbd19e4092362cb54bda63980001a25dccf560c7","unresolved":true,"context_lines":[{"line_number":110,"context_line":"#if BUILD_LINUXSPIDEV \u003d\u003d 1"},{"line_number":111,"context_line":"\t\t\u0026linuxspidev_adapter_driver,"},{"line_number":112,"context_line":"#endif"},{"line_number":113,"context_line":"#if BUILD_USB3813SPI \u003d\u003d 1"},{"line_number":114,"context_line":"\t\t\u0026usb3813spi_adapter_driver,"},{"line_number":115,"context_line":"#endif"},{"line_number":116,"context_line":"#if BUILD_OPENDOUS \u003d\u003d 1"}],"source_content_type":"text/x-csrc","patch_set":6,"id":"34113723_1ff7a5ad","line":113,"updated":"2026-04-04 22:16:04.000000000","message":"Keep the list in alphabetic order","commit_id":"2d0e3ff3fab3e42502d22e10e84189de6741d912"}]}
