12959ab24SNipun GuptaWhat: /sys/bus/cdx/rescan 22959ab24SNipun GuptaDate: March 2023 32959ab24SNipun GuptaContact: nipun.gupta@amd.com 42959ab24SNipun GuptaDescription: 52959ab24SNipun Gupta Writing y/1/on to this file will cause rescan of the bus 62959ab24SNipun Gupta and devices on the CDX bus. Any new devices are scanned and 72959ab24SNipun Gupta added to the list of Linux devices and any devices removed are 82959ab24SNipun Gupta also deleted from Linux. 92959ab24SNipun Gupta 102959ab24SNipun Gupta For example:: 112959ab24SNipun Gupta 122959ab24SNipun Gupta # echo 1 > /sys/bus/cdx/rescan 1348a6c7bcSNipun Gupta 1448a6c7bcSNipun GuptaWhat: /sys/bus/cdx/devices/.../vendor 1548a6c7bcSNipun GuptaDate: March 2023 1648a6c7bcSNipun GuptaContact: nipun.gupta@amd.com 1748a6c7bcSNipun GuptaDescription: 1848a6c7bcSNipun Gupta Vendor ID for this CDX device, in hexadecimal. Vendor ID is 1948a6c7bcSNipun Gupta 16 bit identifier which is specific to the device manufacturer. 2048a6c7bcSNipun Gupta Combination of Vendor ID and Device ID identifies a device. 2148a6c7bcSNipun Gupta 2248a6c7bcSNipun GuptaWhat: /sys/bus/cdx/devices/.../device 2348a6c7bcSNipun GuptaDate: March 2023 2448a6c7bcSNipun GuptaContact: nipun.gupta@amd.com 2548a6c7bcSNipun GuptaDescription: 2648a6c7bcSNipun Gupta Device ID for this CDX device, in hexadecimal. Device ID is 2748a6c7bcSNipun Gupta 16 bit identifier to identify a device type within the range 2848a6c7bcSNipun Gupta of a device manufacturer. 2948a6c7bcSNipun Gupta Combination of Vendor ID and Device ID identifies a device. 3048a6c7bcSNipun Gupta 31*fa10f413SAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../subsystem_vendor 32*fa10f413SAbhijit GangurdeDate: July 2023 33*fa10f413SAbhijit GangurdeContact: puneet.gupta@amd.com 34*fa10f413SAbhijit GangurdeDescription: 35*fa10f413SAbhijit Gangurde Subsystem Vendor ID for this CDX device, in hexadecimal. 36*fa10f413SAbhijit Gangurde Subsystem Vendor ID is 16 bit identifier specific to the 37*fa10f413SAbhijit Gangurde card manufacturer. 38*fa10f413SAbhijit Gangurde 39*fa10f413SAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../subsystem_device 40*fa10f413SAbhijit GangurdeDate: July 2023 41*fa10f413SAbhijit GangurdeContact: puneet.gupta@amd.com 42*fa10f413SAbhijit GangurdeDescription: 43*fa10f413SAbhijit Gangurde Subsystem Device ID for this CDX device, in hexadecimal 44*fa10f413SAbhijit Gangurde Subsystem Device ID is 16 bit identifier specific to the 45*fa10f413SAbhijit Gangurde card manufacturer. 46*fa10f413SAbhijit Gangurde 47*fa10f413SAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../class 48*fa10f413SAbhijit GangurdeDate: July 2023 49*fa10f413SAbhijit GangurdeContact: puneet.gupta@amd.com 50*fa10f413SAbhijit GangurdeDescription: 51*fa10f413SAbhijit Gangurde This file contains the class of the CDX device, in hexadecimal. 52*fa10f413SAbhijit Gangurde Class is 24 bit identifier specifies the functionality of the device. 53*fa10f413SAbhijit Gangurde 54*fa10f413SAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../revision 55*fa10f413SAbhijit GangurdeDate: July 2023 56*fa10f413SAbhijit GangurdeContact: puneet.gupta@amd.com 57*fa10f413SAbhijit GangurdeDescription: 58*fa10f413SAbhijit Gangurde This file contains the revision field of the CDX device, in hexadecimal. 59*fa10f413SAbhijit Gangurde Revision is 8 bit revision identifier of the device. 60*fa10f413SAbhijit Gangurde 61e3cfd49cSAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../enable 62e3cfd49cSAbhijit GangurdeDate: October 2023 63e3cfd49cSAbhijit GangurdeContact: abhijit.gangurde@amd.com 64e3cfd49cSAbhijit GangurdeDescription: 65e3cfd49cSAbhijit Gangurde CDX bus should be disabled before updating the devices in FPGA. 66e3cfd49cSAbhijit Gangurde Writing n/0/off will attempt to disable the CDX bus and. 67e3cfd49cSAbhijit Gangurde writing y/1/on will attempt to enable the CDX bus. Reading this file 68e3cfd49cSAbhijit Gangurde gives the current state of the bus, 1 for enabled and 0 for disabled. 69e3cfd49cSAbhijit Gangurde 70e3cfd49cSAbhijit Gangurde For example:: 71e3cfd49cSAbhijit Gangurde 72e3cfd49cSAbhijit Gangurde # echo 1 > /sys/bus/cdx/.../enable 73e3cfd49cSAbhijit Gangurde 7448a6c7bcSNipun GuptaWhat: /sys/bus/cdx/devices/.../reset 7548a6c7bcSNipun GuptaDate: March 2023 7648a6c7bcSNipun GuptaContact: nipun.gupta@amd.com 7748a6c7bcSNipun GuptaDescription: 780174f581SAbhijit Gangurde Writing y/1/on to this file resets the CDX device or all devices 790174f581SAbhijit Gangurde on the bus. On resetting the device, the corresponding driver is 800174f581SAbhijit Gangurde notified twice, once before the device is being reset, and again 810174f581SAbhijit Gangurde after the reset has been complete. 8248a6c7bcSNipun Gupta 8348a6c7bcSNipun Gupta For example:: 8448a6c7bcSNipun Gupta 8548a6c7bcSNipun Gupta # echo 1 > /sys/bus/cdx/.../reset 8648a6c7bcSNipun Gupta 8748a6c7bcSNipun GuptaWhat: /sys/bus/cdx/devices/.../remove 8848a6c7bcSNipun GuptaDate: March 2023 8948a6c7bcSNipun GuptaContact: tarak.reddy@amd.com 9048a6c7bcSNipun GuptaDescription: 9148a6c7bcSNipun Gupta Writing y/1/on to this file removes the corresponding 9248a6c7bcSNipun Gupta device from the CDX bus. If the device is to be reconfigured 9348a6c7bcSNipun Gupta reconfigured in the Hardware, the device can be removed, so 9448a6c7bcSNipun Gupta that the device driver does not access the device while it is 9548a6c7bcSNipun Gupta being reconfigured. 9648a6c7bcSNipun Gupta 9748a6c7bcSNipun Gupta For example:: 9848a6c7bcSNipun Gupta 9948a6c7bcSNipun Gupta # echo 1 > /sys/bus/cdx/devices/.../remove 100*fa10f413SAbhijit Gangurde 101*fa10f413SAbhijit GangurdeWhat: /sys/bus/cdx/devices/.../modalias 102*fa10f413SAbhijit GangurdeDate: July 2023 103*fa10f413SAbhijit GangurdeContact: nipun.gupta@amd.com 104*fa10f413SAbhijit GangurdeDescription: 105*fa10f413SAbhijit Gangurde This attribute indicates the CDX ID of the device. 106*fa10f413SAbhijit Gangurde That is in the format: 107*fa10f413SAbhijit Gangurde cdx:vXXXXdXXXXsvXXXXsdXXXXcXXXXXX, 108*fa10f413SAbhijit Gangurde where: 109*fa10f413SAbhijit Gangurde 110*fa10f413SAbhijit Gangurde - vXXXX contains the vendor ID; 111*fa10f413SAbhijit Gangurde - dXXXX contains the device ID; 112*fa10f413SAbhijit Gangurde - svXXXX contains the subsystem vendor ID; 113*fa10f413SAbhijit Gangurde - sdXXXX contains the subsystem device ID; 114*fa10f413SAbhijit Gangurde - cXXXXXX contains the device class. 115