diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/default_sku b/device/barefoot/x86_64-accton_as9526bf_32o-r0/default_sku new file mode 100644 index 000000000000..af54eca89222 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/default_sku @@ -0,0 +1 @@ +stinson t1 diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/installer.conf b/device/barefoot/x86_64-accton_as9526bf_32o-r0/installer.conf new file mode 100644 index 000000000000..3714ff053bb0 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/installer.conf @@ -0,0 +1 @@ +CONSOLE_SPEED=57600 diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/pcie.yaml b/device/barefoot/x86_64-accton_as9526bf_32o-r0/pcie.yaml new file mode 100644 index 000000000000..628c1c33f859 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/pcie.yaml @@ -0,0 +1,434 @@ +- bus: '00' + dev: '00' + fn: '0' + id: 6f00 + name: 'Host bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D DMI2 + (rev 03)' +- bus: '00' + dev: '01' + fn: '0' + id: 6f02 + name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI + Express Root Port 1 (rev 03)' +- bus: '00' + dev: '01' + fn: '1' + id: 6f03 + name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI + Express Root Port 1 (rev 03)' +- bus: '00' + dev: '02' + fn: '0' + id: 6f04 + name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI + Express Root Port 2 (rev 03)' +- bus: '00' + dev: '02' + fn: '2' + id: 6f06 + name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI + Express Root Port 2 (rev 03)' +- bus: '00' + dev: '03' + fn: '0' + id: 6f08 + name: 'PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI + Express Root Port 3 (rev 03)' +- bus: '00' + dev: '05' + fn: '0' + id: 6f28 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Map/VTd_Misc/System Management (rev 03)' +- bus: '00' + dev: '05' + fn: '1' + id: 6f29 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D IIO Hot Plug (rev 03)' +- bus: '00' + dev: '05' + fn: '2' + id: 6f2a + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D IIO RAS/Control Status/Global Errors (rev 03)' +- bus: '00' + dev: '05' + fn: '4' + id: 6f2c + name: 'PIC: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D I/O APIC (rev + 03)' +- bus: '00' + dev: '16' + fn: '0' + id: 8c3a + name: 'Communication controller: Intel Corporation 8 Series/C220 Series Chipset + Family MEI Controller #1 (rev 04)' +- bus: '00' + dev: '16' + fn: '1' + id: 8c3b + name: 'Communication controller: Intel Corporation 8 Series/C220 Series Chipset + Family MEI Controller #2 (rev 04)' +- bus: '00' + dev: 1c + fn: '0' + id: 8c10 + name: 'PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express + Root Port #1 (rev d5)' +- bus: '00' + dev: 1c + fn: '7' + id: 8c1e + name: 'PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express + Root Port #8 (rev d5)' +- bus: '00' + dev: 1d + fn: '0' + id: 8c26 + name: 'USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB + EHCI #1 (rev 05)' +- bus: '00' + dev: 1f + fn: '0' + id: 8c54 + name: 'ISA bridge: Intel Corporation C224 Series Chipset Family Server Standard + SKU LPC Controller (rev 05)' +- bus: '00' + dev: 1f + fn: '2' + id: 8c02 + name: 'SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port + SATA Controller 1 [AHCI mode] (rev 05)' +- bus: '00' + dev: 1f + fn: '3' + id: 8c22 + name: 'SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller + (rev 05)' +- bus: '03' + dev: '00' + fn: '0' + id: 6f50 + name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology + Register DMA Channel 0' +- bus: '03' + dev: '00' + fn: '1' + id: 6f51 + name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology + Register DMA Channel 1' +- bus: '03' + dev: '00' + fn: '2' + id: 6f52 + name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology + Register DMA Channel 2' +- bus: '03' + dev: '00' + fn: '3' + id: 6f53 + name: 'System peripheral: Intel Corporation Xeon Processor D Family QuickData Technology + Register DMA Channel 3' +- bus: '04' + dev: '00' + fn: '0' + id: 15ab + name: 'Ethernet controller: Intel Corporation Ethernet Connection X552 10 GbE Backplane' +- bus: '04' + dev: '00' + fn: '1' + id: 15ab + name: 'Ethernet controller: Intel Corporation Ethernet Connection X552 10 GbE Backplane' +- bus: '06' + dev: '00' + fn: '0' + id: 0da2 + name: 'Ethernet controller: Intel Corporation Device 0da2' +- bus: '07' + dev: '00' + fn: '0' + id: 01f1 + name: 'Memory controller: Device 1d1c:01f1' +- bus: 08 + dev: '00' + fn: '0' + id: '1533' + name: 'Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev + 03)' +- bus: ff + dev: 0b + fn: '0' + id: 6f81 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D R3 QPI Link 0/1 (rev 03)' +- bus: ff + dev: 0b + fn: '1' + id: 6f36 + name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D R3 QPI Link 0/1 (rev 03)' +- bus: ff + dev: 0b + fn: '2' + id: 6f37 + name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D R3 QPI Link 0/1 (rev 03)' +- bus: ff + dev: 0b + fn: '3' + id: 6f76 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D R3 QPI Link Debug (rev 03)' +- bus: ff + dev: 0c + fn: '0' + id: 6fe0 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Caching Agent (rev 03)' +- bus: ff + dev: 0c + fn: '1' + id: 6fe1 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Caching Agent (rev 03)' +- bus: ff + dev: 0c + fn: '2' + id: 6fe2 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Caching Agent (rev 03)' +- bus: ff + dev: 0c + fn: '3' + id: 6fe3 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Caching Agent (rev 03)' +- bus: ff + dev: 0f + fn: '0' + id: 6ff8 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Caching Agent (rev 03)' +- bus: ff + dev: 0f + fn: '4' + id: 6ffc + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Caching Agent (rev 03)' +- bus: ff + dev: 0f + fn: '5' + id: 6ffd + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Caching Agent (rev 03)' +- bus: ff + dev: 0f + fn: '6' + id: 6ffe + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Caching Agent (rev 03)' +- bus: ff + dev: '10' + fn: '0' + id: 6f1d + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D R2PCIe Agent (rev 03)' +- bus: ff + dev: '10' + fn: '1' + id: 6f34 + name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D R2PCIe Agent (rev 03)' +- bus: ff + dev: '10' + fn: '5' + id: 6f1e + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Ubox (rev 03)' +- bus: ff + dev: '10' + fn: '6' + id: 6f7d + name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Ubox (rev 03)' +- bus: ff + dev: '10' + fn: '7' + id: 6f1f + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Ubox (rev 03)' +- bus: ff + dev: '12' + fn: '0' + id: 6fa0 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Home Agent 0 (rev 03)' +- bus: ff + dev: '12' + fn: '1' + id: 6f30 + name: 'Performance counters: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Home Agent 0 (rev 03)' +- bus: ff + dev: '13' + fn: '0' + id: 6fa8 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Target Address/Thermal/RAS (rev 03)' +- bus: ff + dev: '13' + fn: '1' + id: 6f71 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Target Address/Thermal/RAS (rev 03)' +- bus: ff + dev: '13' + fn: '2' + id: 6faa + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel Target Address Decoder (rev 03)' +- bus: ff + dev: '13' + fn: '3' + id: 6fab + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel Target Address Decoder (rev 03)' +- bus: ff + dev: '13' + fn: '4' + id: 6fac + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel Target Address Decoder (rev 03)' +- bus: ff + dev: '13' + fn: '5' + id: 6fad + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel Target Address Decoder (rev 03)' +- bus: ff + dev: '13' + fn: '6' + id: 6fae + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D DDRIO Channel 0/1 Broadcast (rev 03)' +- bus: ff + dev: '13' + fn: '7' + id: 6faf + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D DDRIO Global Broadcast (rev 03)' +- bus: ff + dev: '14' + fn: '0' + id: 6fb0 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel 0 Thermal Control (rev 03)' +- bus: ff + dev: '14' + fn: '1' + id: 6fb1 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel 1 Thermal Control (rev 03)' +- bus: ff + dev: '14' + fn: '2' + id: 6fb2 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel 0 Error (rev 03)' +- bus: ff + dev: '14' + fn: '3' + id: 6fb3 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel 1 Error (rev 03)' +- bus: ff + dev: '14' + fn: '4' + id: 6fbc + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D DDRIO Channel 0/1 Interface (rev 03)' +- bus: ff + dev: '14' + fn: '5' + id: 6fbd + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D DDRIO Channel 0/1 Interface (rev 03)' +- bus: ff + dev: '14' + fn: '6' + id: 6fbe + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D DDRIO Channel 0/1 Interface (rev 03)' +- bus: ff + dev: '14' + fn: '7' + id: 6fbf + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D DDRIO Channel 0/1 Interface (rev 03)' +- bus: ff + dev: '15' + fn: '0' + id: 6fb4 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel 2 Thermal Control (rev 03)' +- bus: ff + dev: '15' + fn: '1' + id: 6fb5 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel 3 Thermal Control (rev 03)' +- bus: ff + dev: '15' + fn: '2' + id: 6fb6 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel 2 Error (rev 03)' +- bus: ff + dev: '15' + fn: '3' + id: 6fb7 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Memory Controller 0 - Channel 3 Error (rev 03)' +- bus: ff + dev: 1e + fn: '0' + id: 6f98 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Power Control Unit (rev 03)' +- bus: ff + dev: 1e + fn: '1' + id: 6f99 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Power Control Unit (rev 03)' +- bus: ff + dev: 1e + fn: '2' + id: 6f9a + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Power Control Unit (rev 03)' +- bus: ff + dev: 1e + fn: '3' + id: 6fc0 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Power Control Unit (rev 03)' +- bus: ff + dev: 1e + fn: '4' + id: 6f9c + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Power Control Unit (rev 03)' +- bus: ff + dev: 1f + fn: '0' + id: 6f88 + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Power Control Unit (rev 03)' +- bus: ff + dev: 1f + fn: '2' + id: 6f8a + name: 'System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon + D Power Control Unit (rev 03)' diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/platform.json b/device/barefoot/x86_64-accton_as9526bf_32o-r0/platform.json new file mode 100644 index 000000000000..bd5bcac23b1a --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/platform.json @@ -0,0 +1,587 @@ +{ + "chassis": { + "name": "Stinson", + "components": [ + { + "name": "BIOS" + }, + { + "name": "BMC" + } + ], + "fans": [ + { + "name": "counter-rotating-fan-1" + }, + { + "name": "counter-rotating-fan-2" + }, + { + "name": "counter-rotating-fan-3" + }, + { + "name": "counter-rotating-fan-4" + }, + { + "name": "counter-rotating-fan-5" + }, + { + "name": "counter-rotating-fan-6" + }, + { + "name": "counter-rotating-fan-7" + } + ], + "fan_drawers": [ + { + "name": "fantray-1", + "fans": [ + { + "name": "counter-rotating-fan-1" + }, + { + "name": "counter-rotating-fan-2" + }, + { + "name": "counter-rotating-fan-3" + }, + { + "name": "counter-rotating-fan-4" + }, + { + "name": "counter-rotating-fan-5" + }, + { + "name": "counter-rotating-fan-6" + }, + { + "name": "counter-rotating-fan-7" + } + ] + } + ], + "psus": [ + { + "name": "psu-1", + "thermals": [ + { + "name": "psu_driver-i2c-7-5a:psu1-temp1" + }, + { + "name": "psu_driver-i2c-7-5a:psu1-temp2" + }, + { + "name": "psu_driver-i2c-7-5a:psu1-temp3" + } + ] + }, + { + "name": "psu-2", + "thermals": [ + { + "name": "psu_driver-i2c-7-59:psu2-temp1" + }, + { + "name": "psu_driver-i2c-7-59:psu2-temp2" + }, + { + "name": "psu_driver-i2c-7-59:psu2-temp3" + } + ] + } + ], + "thermals": [ + { + "name": "com_e_driver-i2c-4-33:cpu-temp" + }, + { + "name": "com_e_driver-i2c-4-33:memory-temp" + }, + { + "name": "tmp75-i2c-3-48:chip-temp" + }, + { + "name": "tmp75-i2c-3-49:exhaust2-temp" + }, + { + "name": "tmp75-i2c-3-4a:exhaust-temp" + }, + { + "name": "tmp75-i2c-3-4b:intake-temp" + }, + { + "name": "tmp75-i2c-3-4c:tofino-temp" + }, + { + "name": "tmp75-i2c-3-4d:intake2-temp" + }, + { + "name": "coretemp-isa-0000:package-id-0" + }, + { + "name": "coretemp-isa-0000:core-0" + }, + { + "name": "coretemp-isa-0000:core-1" + }, + { + "name": "coretemp-isa-0000:core-2" + }, + { + "name": "coretemp-isa-0000:core-3" + } + ], + "sfps": [ + { + "name": "sfp1" + }, + { + "name": "sfp2" + }, + { + "name": "sfp3" + }, + { + "name": "sfp4" + }, + { + "name": "sfp5" + }, + { + "name": "sfp6" + }, + { + "name": "sfp7" + }, + { + "name": "sfp8" + }, + { + "name": "sfp9" + }, + { + "name": "sfp10" + }, + { + "name": "sfp11" + }, + { + "name": "sfp12" + }, + { + "name": "sfp13" + }, + { + "name": "sfp14" + }, + { + "name": "sfp15" + }, + { + "name": "sfp16" + }, + { + "name": "sfp17" + }, + { + "name": "sfp18" + }, + { + "name": "sfp19" + }, + { + "name": "sfp20" + }, + { + "name": "sfp21" + }, + { + "name": "sfp22" + }, + { + "name": "sfp23" + }, + { + "name": "sfp24" + }, + { + "name": "sfp25" + }, + { + "name": "sfp26" + }, + { + "name": "sfp27" + }, + { + "name": "sfp28" + }, + { + "name": "sfp29" + }, + { + "name": "sfp30" + }, + { + "name": "sfp31" + }, + { + "name": "sfp32" + } + ] + }, + "interfaces": { + "Ethernet0": { + "index": "1,1,1,1", + "lanes": "0,1,2,3", + "breakout_modes": { + "1x400G[200G]": ["Ethernet0"], + "2x200G[100G,40G]": ["Ethernet0", "Ethernet4"], + "4x100G[50G]": ["Ethernet0", "Ethernet2", "Ethernet4", "Ethernet6"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet0", "Ethernet4", "Ethernet5", "Ethernet6", "Ethernet7"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet0", "Ethernet1", "Ethernet2", "Ethernet3", "Ethernet4"] + } + }, + "Ethernet8": { + "index": "2,2,2,2", + "lanes": "8,9,10,11", + "breakout_modes": { + "1x400G[200G]": ["Ethernet8"], + "2x200G[100G,40G]": ["Ethernet8", "Ethernet12"], + "4x100G[50G]": ["Ethernet8", "Ethernet10", "Ethernet12", "Ethernet14"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet8", "Ethernet12", "Ethernet13", "Ethernet14", "Ethernet15"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet8", "Ethernet9", "Ethernet10", "Ethernet11", "Ethernet12"] + } + }, + "Ethernet16": { + "index": "3,3,3,3", + "lanes": "16,17,18,19", + "breakout_modes": { + "1x400G[200G]": ["Ethernet16"], + "2x200G[100G,40G]": ["Ethernet16", "Ethernet20"], + "4x100G[50G]": ["Ethernet16", "Ethernet18", "Ethernet20", "Ethernet22"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet16", "Ethernet20", "Ethernet21", "Ethernet22", "Ethernet23"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet16", "Ethernet17", "Ethernet18", "Ethernet19", "Ethernet20"] + } + }, + "Ethernet24": { + "index": "4,4,4,4", + "lanes": "24,25,26,27", + "breakout_modes": { + "1x400G[200G]": ["Ethernet24"], + "2x200G[100G,40G]": ["Ethernet24", "Ethernet28"], + "4x100G[50G]": ["Ethernet24", "Ethernet26", "Ethernet28", "Ethernet30"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet24", "Ethernet28", "Ethernet29", "Ethernet30", "Ethernet31"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet24", "Ethernet25", "Ethernet26", "Ethernet27", "Ethernet28"] + } + }, + "Ethernet32": { + "index": "5,5,5,5", + "lanes": "32,33,34,35", + "breakout_modes": { + "1x400G[200G]": ["Ethernet32"], + "2x200G[100G,40G]": ["Ethernet32", "Ethernet36"], + "4x100G[50G]": ["Ethernet32", "Ethernet34", "Ethernet36", "Ethernet38"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet32", "Ethernet36", "Ethernet37", "Ethernet38", "Ethernet39"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet32", "Ethernet33", "Ethernet34", "Ethernet35", "Ethernet36"] + } + }, + "Ethernet40": { + "index": "6,6,6,6", + "lanes": "40,41,42,43", + "breakout_modes": { + "1x400G[200G]": ["Ethernet40"], + "2x200G[100G,40G]": ["Ethernet40", "Ethernet44"], + "4x100G[50G]": ["Ethernet40", "Ethernet42", "Ethernet44", "Ethernet46"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet40", "Ethernet44", "Ethernet45", "Ethernet46", "Ethernet47"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet40", "Ethernet41", "Ethernet42", "Ethernet43", "Ethernet44"] + } + }, + "Ethernet48": { + "index": "7,7,7,7", + "lanes": "48,49,50,51", + "breakout_modes": { + "1x400G[200G]": ["Ethernet48"], + "2x200G[100G,40G]": ["Ethernet48", "Ethernet52"], + "4x100G[50G]": ["Ethernet48", "Ethernet50", "Ethernet52", "Ethernet54"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet48", "Ethernet52", "Ethernet53", "Ethernet54", "Ethernet55"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet48", "Ethernet49", "Ethernet50", "Ethernet51", "Ethernet52"] + } + }, + "Ethernet56": { + "index": "8,8,8,8", + "lanes": "56,57,58,59", + "breakout_modes": { + "1x400G[200G]": ["Ethernet56"], + "2x200G[100G,40G]": ["Ethernet56", "Ethernet60"], + "4x100G[50G]": ["Ethernet56", "Ethernet58", "Ethernet60", "Ethernet62"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet56", "Ethernet60", "Ethernet61", "Ethernet62", "Ethernet63"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet56", "Ethernet57", "Ethernet58", "Ethernet59", "Ethernet60"] + } + }, + "Ethernet64": { + "index": "9,9,9,9", + "lanes": "64,65,66,67", + "breakout_modes": { + "1x400G[200G]": ["Ethernet64"], + "2x200G[100G,40G]": ["Ethernet64", "Ethernet68"], + "4x100G[50G]": ["Ethernet64", "Ethernet66", "Ethernet68", "Ethernet70"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet64", "Ethernet68", "Ethernet69", "Ethernet70", "Ethernet71"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet64", "Ethernet65", "Ethernet66", "Ethernet67", "Ethernet68"] + } + }, + "Ethernet72": { + "index": "10,10,10,10", + "lanes": "72,73,74,75", + "breakout_modes": { + "1x400G[200G]": ["Ethernet72"], + "2x200G[100G,40G]": ["Ethernet72", "Ethernet76"], + "4x100G[50G]": ["Ethernet72", "Ethernet74", "Ethernet76", "Ethernet78"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet72", "Ethernet76", "Ethernet77", "Ethernet78", "Ethernet79"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet72", "Ethernet73", "Ethernet74", "Ethernet75", "Ethernet76"] + } + }, + "Ethernet80": { + "index": "11,11,11,11", + "lanes": "80,81,82,83", + "breakout_modes": { + "1x400G[200G]": ["Ethernet80"], + "2x200G[100G,40G]": ["Ethernet80", "Ethernet84"], + "4x100G[50G]": ["Ethernet80", "Ethernet82", "Ethernet84", "Ethernet86"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet80", "Ethernet84", "Ethernet85", "Ethernet86", "Ethernet87"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet80", "Ethernet81", "Ethernet82", "Ethernet83", "Ethernet84"] + } + }, + "Ethernet88": { + "index": "12,12,12,12", + "lanes": "88,89,90,91", + "breakout_modes": { + "1x400G[200G]": ["Ethernet88"], + "2x200G[100G,40G]": ["Ethernet88", "Ethernet92"], + "4x100G[50G]": ["Ethernet88", "Ethernet90", "Ethernet92", "Ethernet94"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet88", "Ethernet92", "Ethernet93", "Ethernet94", "Ethernet95"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet88", "Ethernet89", "Ethernet90", "Ethernet91", "Ethernet92"] + } + }, + "Ethernet96": { + "index": "13,13,13,13", + "lanes": "96,97,98,99", + "breakout_modes": { + "1x400G[200G]": ["Ethernet96"], + "2x200G[100G,40G]": ["Ethernet96", "Ethernet100"], + "4x100G[50G]": ["Ethernet96", "Ethernet98", "Ethernet100", "Ethernet102"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet96", "Ethernet100", "Ethernet101", "Ethernet102", "Ethernet103"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet96", "Ethernet97", "Ethernet98", "Ethernet99", "Ethernet100"] + } + }, + "Ethernet104": { + "index": "14,14,14,14", + "lanes": "104,105,106,107", + "breakout_modes": { + "1x400G[200G]": ["Ethernet104"], + "2x200G[100G,40G]": ["Ethernet104", "Ethernet108"], + "4x100G[50G]": ["Ethernet104", "Ethernet106", "Ethernet108", "Ethernet110"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet104", "Ethernet108", "Ethernet109", "Ethernet110", "Ethernet111"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet104", "Ethernet105", "Ethernet106", "Ethernet107", "Ethernet108"] + } + }, + "Ethernet112": { + "index": "15,15,15,15", + "lanes": "112,113,114,115", + "breakout_modes": { + "1x400G[200G]": ["Ethernet112"], + "2x200G[100G,40G]": ["Ethernet112", "Ethernet116"], + "4x100G[50G]": ["Ethernet112", "Ethernet114", "Ethernet116", "Ethernet118"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet112", "Ethernet116", "Ethernet117", "Ethernet118", "Ethernet119"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet112", "Ethernet113", "Ethernet114", "Ethernet115", "Ethernet116"] + } + }, + "Ethernet120": { + "index": "16,16,16,16", + "lanes": "120,121,122,123", + "breakout_modes": { + "1x400G[200G]": ["Ethernet120"], + "2x200G[100G,40G]": ["Ethernet120", "Ethernet124"], + "4x100G[50G]": ["Ethernet120", "Ethernet122", "Ethernet124", "Ethernet126"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet120", "Ethernet124", "Ethernet125", "Ethernet126", "Ethernet127"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet120", "Ethernet121", "Ethernet122", "Ethernet123", "Ethernet124"] + } + }, + "Ethernet128": { + "index": "17,17,17,17", + "lanes": "128,129,130,131", + "breakout_modes": { + "1x400G[200G]": ["Ethernet128"], + "2x200G[100G,40G]": ["Ethernet128", "Ethernet132"], + "4x100G[50G]": ["Ethernet128", "Ethernet130", "Ethernet132", "Ethernet134"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet128", "Ethernet132", "Ethernet133", "Ethernet134", "Ethernet135"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet128", "Ethernet129", "Ethernet130", "Ethernet131", "Ethernet132"] + } + }, + "Ethernet136": { + "index": "18,18,18,18", + "lanes": "136,137,138,139", + "breakout_modes": { + "1x400G[200G]": ["Ethernet136"], + "2x200G[100G,40G]": ["Ethernet136", "Ethernet140"], + "4x100G[50G]": ["Ethernet136", "Ethernet138", "Ethernet140", "Ethernet142"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet136", "Ethernet140", "Ethernet141", "Ethernet142", "Ethernet143"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet136", "Ethernet137", "Ethernet138", "Ethernet139", "Ethernet140"] + } + }, + "Ethernet144": { + "index": "19,19,19,19", + "lanes": "144,145,146,147", + "breakout_modes": { + "1x400G[200G]": ["Ethernet144"], + "2x200G[100G,40G]": ["Ethernet144", "Ethernet148"], + "4x100G[50G]": ["Ethernet144", "Ethernet146", "Ethernet148", "Ethernet150"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet144", "Ethernet148", "Ethernet149", "Ethernet150", "Ethernet151"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet144", "Ethernet145", "Ethernet146", "Ethernet147", "Ethernet148"] + } + }, + "Ethernet152": { + "index": "20,20,20,20", + "lanes": "152,153,154,155", + "breakout_modes": { + "1x400G[200G]": ["Ethernet152"], + "2x200G[100G,40G]": ["Ethernet152", "Ethernet156"], + "4x100G[50G]": ["Ethernet152", "Ethernet154", "Ethernet156", "Ethernet158"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet152", "Ethernet156", "Ethernet157", "Ethernet158", "Ethernet159"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet152", "Ethernet153", "Ethernet154", "Ethernet155", "Ethernet156"] + } + }, + "Ethernet160": { + "index": "21,21,21,21", + "lanes": "160,161,162,163", + "breakout_modes": { + "1x400G[200G]": ["Ethernet160"], + "2x200G[100G,40G]": ["Ethernet160", "Ethernet164"], + "4x100G[50G]": ["Ethernet160", "Ethernet162", "Ethernet164", "Ethernet166"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet160", "Ethernet164", "Ethernet165", "Ethernet166", "Ethernet167"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet160", "Ethernet161", "Ethernet162", "Ethernet163", "Ethernet164"] + } + }, + "Ethernet168": { + "index": "22,22,22,22", + "lanes": "168,169,170,171", + "breakout_modes": { + "1x400G[200G]": ["Ethernet168"], + "2x200G[100G,40G]": ["Ethernet168", "Ethernet172"], + "4x100G[50G]": ["Ethernet168", "Ethernet170", "Ethernet172", "Ethernet174"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet168", "Ethernet172", "Ethernet173", "Ethernet174", "Ethernet175"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet168", "Ethernet169", "Ethernet170", "Ethernet171", "Ethernet172"] + } + }, + "Ethernet176": { + "index": "23,23,23,23", + "lanes": "176,177,178,179", + "breakout_modes": { + "1x400G[200G]": ["Ethernet176"], + "2x200G[100G,40G]": ["Ethernet176", "Ethernet180"], + "4x100G[50G]": ["Ethernet176", "Ethernet178", "Ethernet180", "Ethernet182"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet176", "Ethernet180", "Ethernet181", "Ethernet182", "Ethernet183"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet176", "Ethernet177", "Ethernet178", "Ethernet179", "Ethernet180"] + } + }, + "Ethernet184": { + "index": "24,24,24,24", + "lanes": "184,185,186,187", + "breakout_modes": { + "1x400G[200G]": ["Ethernet184"], + "2x200G[100G,40G]": ["Ethernet184", "Ethernet188"], + "4x100G[50G]": ["Ethernet184", "Ethernet186", "Ethernet188", "Ethernet190"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet184", "Ethernet188", "Ethernet189", "Ethernet190", "Ethernet191"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet184", "Ethernet185", "Ethernet186", "Ethernet187", "Ethernet188"] + } + }, + "Ethernet192": { + "index": "25,25,25,25", + "lanes": "192,193,194,195", + "breakout_modes": { + "1x400G[200G]": ["Ethernet192"], + "2x200G[100G,40G]": ["Ethernet192", "Ethernet196"], + "4x100G[50G]": ["Ethernet192", "Ethernet194", "Ethernet196", "Ethernet198"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet192", "Ethernet196", "Ethernet197", "Ethernet198", "Ethernet199"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet192", "Ethernet193", "Ethernet194", "Ethernet195", "Ethernet196"] + } + }, + "Ethernet200": { + "index": "26,26,26,26", + "lanes": "200,201,202,203", + "breakout_modes": { + "1x400G[200G]": ["Ethernet200"], + "2x200G[100G,40G]": ["Ethernet200", "Ethernet204"], + "4x100G[50G]": ["Ethernet200", "Ethernet202", "Ethernet204", "Ethernet206"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet200", "Ethernet204", "Ethernet205", "Ethernet206", "Ethernet207"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet200", "Ethernet201", "Ethernet202", "Ethernet203", "Ethernet204"] + } + }, + "Ethernet208": { + "index": "27,27,27,27", + "lanes": "208,209,210,211", + "breakout_modes": { + "1x400G[200G]": ["Ethernet208"], + "2x200G[100G,40G]": ["Ethernet208", "Ethernet212"], + "4x100G[50G]": ["Ethernet208", "Ethernet210", "Ethernet212", "Ethernet214"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet208", "Ethernet212", "Ethernet213", "Ethernet214", "Ethernet215"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet208", "Ethernet209", "Ethernet210", "Ethernet211", "Ethernet212"] + } + }, + "Ethernet216": { + "index": "28,28,28,28", + "lanes": "216,217,218,219", + "breakout_modes": { + "1x400G[200G]": ["Ethernet216"], + "2x200G[100G,40G]": ["Ethernet216", "Ethernet220"], + "4x100G[50G]": ["Ethernet216", "Ethernet218", "Ethernet220", "Ethernet222"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet216", "Ethernet220", "Ethernet221", "Ethernet222", "Ethernet223"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet216", "Ethernet217", "Ethernet218", "Ethernet219", "Ethernet220"] + } + }, + "Ethernet224": { + "index": "29,29,29,29", + "lanes": "224,225,226,227", + "breakout_modes": { + "1x400G[200G]": ["Ethernet224"], + "2x200G[100G,40G]": ["Ethernet224", "Ethernet228"], + "4x100G[50G]": ["Ethernet224", "Ethernet226", "Ethernet228", "Ethernet230"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet224", "Ethernet228", "Ethernet229", "Ethernet230", "Ethernet231"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet224", "Ethernet225", "Ethernet226", "Ethernet227", "Ethernet228"] + } + }, + "Ethernet232": { + "index": "30,30,30,30", + "lanes": "232,233,234,235", + "breakout_modes": { + "1x400G[200G]": ["Ethernet232"], + "2x200G[100G,40G]": ["Ethernet232", "Ethernet236"], + "4x100G[50G]": ["Ethernet232", "Ethernet234", "Ethernet236", "Ethernet238"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet232", "Ethernet236", "Ethernet237", "Ethernet238", "Ethernet239"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet232", "Ethernet233", "Ethernet234", "Ethernet235", "Ethernet236"] + } + }, + "Ethernet240": { + "index": "31,31,31,31", + "lanes": "240,241,242,243", + "breakout_modes": { + "1x400G[200G]": ["Ethernet240"], + "2x200G[100G,40G]": ["Ethernet240", "Ethernet244"], + "4x100G[50G]": ["Ethernet240", "Ethernet242", "Ethernet244", "Ethernet246"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet240", "Ethernet244", "Ethernet245", "Ethernet246", "Ethernet247"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet240", "Ethernet241", "Ethernet242", "Ethernet243", "Ethernet244"] + } + }, + "Ethernet248": { + "index": "32,32,32,32", + "lanes": "248,249,250,251", + "breakout_modes": { + "1x400G[200G]": ["Ethernet248"], + "2x200G[100G,40G]": ["Ethernet248", "Ethernet252"], + "4x100G[50G]": ["Ethernet248", "Ethernet250", "Ethernet252", "Ethernet254"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet248", "Ethernet252", "Ethernet253", "Ethernet254", "Ethernet255"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet248", "Ethernet249", "Ethernet250", "Ethernet251", "Ethernet252"] + } + } + } +} diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/platform_asic b/device/barefoot/x86_64-accton_as9526bf_32o-r0/platform_asic new file mode 100644 index 000000000000..88d88117928c --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/platform_asic @@ -0,0 +1 @@ +barefoot diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/platform_components.json b/device/barefoot/x86_64-accton_as9526bf_32o-r0/platform_components.json new file mode 100644 index 000000000000..0a18cb619382 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/platform_components.json @@ -0,0 +1,10 @@ +{ + "chassis": { + "Newport": { + "component": { + "BIOS": { }, + "BMC": { } + } + } + } +} diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/pmon_daemon_control.json b/device/barefoot/x86_64-accton_as9526bf_32o-r0/pmon_daemon_control.json new file mode 100644 index 000000000000..a0431d47812a --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/pmon_daemon_control.json @@ -0,0 +1,9 @@ +{ + "skip_pcied": false, + "skip_fancontrol": true, + "skip_thermalctld": false, + "skip_ledd": true, + "skip_xcvrd": false, + "skip_psud": false, + "skip_syseepromd": false +} diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/buffers.json.j2 b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/buffers.json.j2 new file mode 100644 index 000000000000..1083a6210fc9 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/buffers.json.j2 @@ -0,0 +1,2 @@ +{%- set default_topo = 't0' %} +{%- include 'buffers_config.j2' %} diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/buffers_defaults_t0.j2 b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/buffers_defaults_t0.j2 new file mode 100644 index 000000000000..34c5db2ef708 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/buffers_defaults_t0.j2 @@ -0,0 +1,71 @@ +{% set default_cable = '5m' %} +{% set ingress_lossless_pool_size = '23850816' %} +{% set ingress_lossy_pool_size = '36222208' %} +{% set egress_lossless_pool_size = '29482816' %} +{% set egress_lossy_pool_size = '26400000' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,32) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "{{ ingress_lossless_pool_size }}", + "type": "ingress", + "mode": "dynamic", + "xoff": "36222208" + }, + "ingress_lossy_pool": { + "size": "{{ ingress_lossy_pool_size }}", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "{{ egress_lossless_pool_size }}", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossy_pool": { + "size": "{{ egress_lossy_pool_size }}", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"ingress_lossy_pool", + "size":"4096", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"egress_lossless_pool", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"egress_lossy_pool", + "size":"4096", + "dynamic_th":"3" + }, + "q_lossy_profile": { + "pool":"egress_lossy_pool", + "size":"4096", + "dynamic_th":"3" + } + }, +{%- endmacro %} + +{%- macro generate_queue_buffers(port_names) %} + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "egress_lossless_profile" + }, + "{{ port_names }}|0-1": { + "profile" : "q_lossy_profile" + } + } +{%- endmacro %} diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/buffers_defaults_t1.j2 b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/buffers_defaults_t1.j2 new file mode 100644 index 000000000000..34c5db2ef708 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/buffers_defaults_t1.j2 @@ -0,0 +1,71 @@ +{% set default_cable = '5m' %} +{% set ingress_lossless_pool_size = '23850816' %} +{% set ingress_lossy_pool_size = '36222208' %} +{% set egress_lossless_pool_size = '29482816' %} +{% set egress_lossy_pool_size = '26400000' %} + +{%- macro generate_port_lists(PORT_ALL) %} + {# Generate list of ports #} + {%- for port_idx in range(0,32) %} + {%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro generate_buffer_pool_and_profiles() %} + "BUFFER_POOL": { + "ingress_lossless_pool": { + "size": "{{ ingress_lossless_pool_size }}", + "type": "ingress", + "mode": "dynamic", + "xoff": "36222208" + }, + "ingress_lossy_pool": { + "size": "{{ ingress_lossy_pool_size }}", + "type": "ingress", + "mode": "dynamic" + }, + "egress_lossless_pool": { + "size": "{{ egress_lossless_pool_size }}", + "type": "egress", + "mode": "dynamic" + }, + "egress_lossy_pool": { + "size": "{{ egress_lossy_pool_size }}", + "type": "egress", + "mode": "dynamic" + } + }, + "BUFFER_PROFILE": { + "ingress_lossy_profile": { + "pool":"ingress_lossy_pool", + "size":"4096", + "dynamic_th":"3" + }, + "egress_lossless_profile": { + "pool":"egress_lossless_pool", + "size":"0", + "dynamic_th":"7" + }, + "egress_lossy_profile": { + "pool":"egress_lossy_pool", + "size":"4096", + "dynamic_th":"3" + }, + "q_lossy_profile": { + "pool":"egress_lossy_pool", + "size":"4096", + "dynamic_th":"3" + } + }, +{%- endmacro %} + +{%- macro generate_queue_buffers(port_names) %} + "BUFFER_QUEUE": { + "{{ port_names }}|3-4": { + "profile" : "egress_lossless_profile" + }, + "{{ port_names }}|0-1": { + "profile" : "q_lossy_profile" + } + } +{%- endmacro %} diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/hwsku.json b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/hwsku.json new file mode 100644 index 000000000000..bc0ddddb51b3 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/hwsku.json @@ -0,0 +1,132 @@ +{ + "interfaces": { + "Ethernet0": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet8": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet16": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet24": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet32": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet40": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet48": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet56": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet64": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet72": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet80": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet88": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet96": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet104": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet112": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet120": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet128": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet136": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet144": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet152": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet160": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet168": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet176": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet184": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet192": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet200": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet208": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet216": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet224": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet232": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet240": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + }, + "Ethernet248": { + "default_brkout_mode": "1x400G[200G]", + "fec": "rs" + } + } +} diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/pg_profile_lookup.ini b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/pg_profile_lookup.ini new file mode 100644 index 000000000000..ad007ece1aef --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/pg_profile_lookup.ini @@ -0,0 +1,23 @@ +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 34816 18432 16384 7 + 25000 5m 34816 18432 16384 7 + 40000 5m 34816 18432 16384 7 + 50000 5m 34816 18432 16384 7 + 100000 5m 36864 18432 18432 7 + 200000 5m 36864 18432 18432 7 + 400000 5m 36864 18432 18432 7 + 10000 40m 36864 18432 18432 7 + 25000 40m 39936 18432 21504 7 + 40000 40m 41984 18432 23552 7 + 50000 40m 41984 18432 23552 7 + 100000 40m 54272 18432 35840 7 + 200000 40m 54272 18432 35840 7 + 400000 40m 54272 18432 35840 7 + 10000 300m 49152 18432 30720 7 + 25000 300m 71680 18432 53248 7 + 40000 300m 94208 18432 75776 7 + 50000 300m 94208 18432 75776 7 + 100000 300m 184320 18432 165888 7 + 200000 300m 184320 18432 165888 7 + 400000 300m 184320 18432 165888 7 diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/port_config.ini b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/port_config.ini new file mode 100644 index 000000000000..222f096e3dbf --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/port_config.ini @@ -0,0 +1,33 @@ +# name lanes alias index speed autoneg fec +Ethernet0 0,1,2,3 Ethernet0 1 400000 off rs +Ethernet8 8,9,10,11 Ethernet8 2 400000 off rs +Ethernet16 16,17,18,19 Ethernet16 3 400000 off rs +Ethernet24 24,25,26,27 Ethernet24 4 400000 off rs +Ethernet32 32,33,34,35 Ethernet32 5 400000 off rs +Ethernet40 40,41,42,43 Ethernet40 6 400000 off rs +Ethernet48 48,49,50,51 Ethernet48 7 400000 off rs +Ethernet56 56,57,58,59 Ethernet56 8 400000 off rs +Ethernet64 64,65,66,67 Ethernet64 9 400000 off rs +Ethernet72 72,73,74,75 Ethernet72 10 400000 off rs +Ethernet80 80,81,82,83 Ethernet80 11 400000 off rs +Ethernet88 88,89,90,91 Ethernet80 12 400000 off rs +Ethernet96 96,97,98,99 Ethernet96 14 400000 off rs +Ethernet104 104,105,106,107 Ethernet104 14 400000 off rs +Ethernet112 112,113,114,115 Ethernet112 16 400000 off rs +Ethernet120 120,121,122,123 Ethernet120 16 400000 off rs +Ethernet128 128,129,130,131 Ethernet124 18 400000 off rs +Ethernet136 136,137,138,139 Ethernet124 18 400000 off rs +Ethernet144 144,145,146,147 Ethernet124 20 400000 off rs +Ethernet152 152,153,154,155 Ethernet124 20 400000 off rs +Ethernet160 160,161,162,163 Ethernet160 21 400000 off rs +Ethernet168 168,169,170,171 Ethernet168 22 400000 off rs +Ethernet176 176,177,178,179 Ethernet176 23 400000 off rs +Ethernet184 184,185,186,187 Ethernet184 24 400000 off rs +Ethernet192 192,193,194,195 Ethernet192 25 400000 off rs +Ethernet200 200,201,202,203 Ethernet200 26 400000 off rs +Ethernet208 208,209,210,211 Ethernet208 27 400000 off rs +Ethernet216 216,217,218,219 Ethernet216 28 400000 off rs +Ethernet224 224,225,226,227 Ethernet224 29 400000 off rs +Ethernet232 232,233,234,235 Ethernet232 30 400000 off rs +Ethernet240 240,241,242,243 Ethernet240 31 400000 off rs +Ethernet248 248,249,250,251 Ethernet248 32 400000 off rs diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/qos.json.j2 b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/qos.json.j2 new file mode 100644 index 000000000000..a685277448f1 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/qos.json.j2 @@ -0,0 +1,10 @@ +{%- macro generate_tc_to_pg_map() %} + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "3": "3", + "4": "4" + } + }, +{%- endmacro %} + +{%- include 'qos_config.j2' %} diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/sai.profile b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/sai.profile new file mode 100644 index 000000000000..037b5c135370 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/sai.profile @@ -0,0 +1,3 @@ +SAI_KEY_WARM_BOOT_WRITE_FILE=/var/warmboot/sai-warmboot.bin +SAI_KEY_WARM_BOOT_READ_FILE=/var/warmboot/sai-warmboot.bin + diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/switch-tna-sai.conf b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/switch-tna-sai.conf new file mode 100644 index 000000000000..be639a03f02d --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/stinson/switch-tna-sai.conf @@ -0,0 +1,46 @@ +{ + "chip_list": [ + { + "instance": 0, + "chip_family": "tofino3", + "subdev_list": [ + { + "subdev_instance": 0, + "cdev_name": "/dev/bf0s0" + }, + { + "subdev_instance": 1, + "cdev_name": "/dev/bf0s1" + } + ] + } + ], + "p4_devices": [ + { + "device-id": 0, + "agent0": "lib/platform/x86_64-accton_as9526bf_32o-r0/libpltfm_mgr.so", + "p4_programs": [ + { + "program-name": "switch", + "bfrt-config": "share/switch/bf-rt.json", + "p4_pipelines": [ + { + "p4_pipeline_name": "pipe", + "config": "share/switch/pipe/tofino3.bin", + "context": "share/switch/pipe/context.json" + } + ], + "non_default_port_ppgs": 5 + } + ] + } + ], + "switch_options": [ + { + "device-id": 0, + "model_json_path": "share/switch/aug_model.json", + "non_default_port_ppgs": 5, + "switchapi_port_add": false + } + ] +} diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/syncd.conf b/device/barefoot/x86_64-accton_as9526bf_32o-r0/syncd.conf new file mode 100644 index 000000000000..082ba2f88afe --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/syncd.conf @@ -0,0 +1,29 @@ +#!/bin/bash + + +y_profile_set() { + P4_PROFILE=$(sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["p4_profile"]') + if [[ -n "$P4_PROFILE" || ( ! -L /opt/bfn/install && -e /opt/bfn/install ) ]]; then + return + fi + + if [[ $(readlink /opt/bfn/install) =~ "install_y" ]]; then + echo "/opt/bfn/install is a link to Y profile" + return + fi + + Y_PROFILE=$(ls -d /opt/bfn/install_y*_profile 2> /dev/null | head -1) + if [[ -z $Y_PROFILE ]]; then + echo "No P4 profile found for Stinson" + return + fi + + echo "Link /opt/bfn/install to $Y_PROFILE" + ln -srfn $Y_PROFILE /opt/bfn/install +} + +( + unset PYTHONPATH + unset PYTHONHOME + y_profile_set +) diff --git a/device/barefoot/x86_64-accton_as9526bf_32o-r0/system_health_monitoring_config.json b/device/barefoot/x86_64-accton_as9526bf_32o-r0/system_health_monitoring_config.json new file mode 100644 index 000000000000..654d43d81096 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9526bf_32o-r0/system_health_monitoring_config.json @@ -0,0 +1,11 @@ +{ + "services_to_ignore": [], + "devices_to_ignore": [], + "user_defined_checkers": [], + "polling_interval": 60, + "led_color": { + "fault": "amber", + "normal": "green", + "booting": "orange_blink" + } +} diff --git a/platform/barefoot/bfn-modules/modules/bf_kdrv.c b/platform/barefoot/bfn-modules/modules/bf_kdrv.c index 4f48de9ba99b..bfa7cf0e1e7b 100644 --- a/platform/barefoot/bfn-modules/modules/bf_kdrv.c +++ b/platform/barefoot/bfn-modules/modules/bf_kdrv.c @@ -187,7 +187,11 @@ static inline struct bf_pci_dev *bf_get_pci_dev(struct bf_dev_info *info) { * It masks the msix on/off of generating MSI-X messages. */ static void bf_msix_mask_irq(struct msi_desc *desc, int32_t state) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) u32 mask_bits = desc->masked; +#else + u32 mask_bits = desc->msix_ctrl; +#endif unsigned offset = desc->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL; @@ -196,12 +200,19 @@ static void bf_msix_mask_irq(struct msi_desc *desc, int32_t state) { } else { mask_bits |= PCI_MSIX_ENTRY_CTRL_MASKBIT; } - +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) if (mask_bits != desc->masked) { writel(mask_bits, desc->mask_base + offset); readl(desc->mask_base); desc->masked = mask_bits; } +#else + if (mask_bits != desc->msix_ctrl) { + writel(mask_bits, desc->mask_base + offset); + readl(desc->mask_base); + desc->msix_ctrl = mask_bits; + } +#endif } /** @@ -878,7 +889,7 @@ static int bf_tof3_register_device(struct device *parent, physical Tofino(3) device. We have not figured that out yet. until then, we support only one CB device per host CPU */ bf_addr = (u32 *)((u8 *)bf_base_addr + TOFINO3_MISC_PAD_STATUS_OFFSET); -#if 1 /* USING EMULATOR where subdevice info is not possible to have */ +#if 0 /* USING EMULATOR where subdevice info is not possible to have */ bf_multisub_tof_unused_devid_get(); /* keep compiler happy */ subdev_id = 0; if (bf_get_next_minor_no(&minor)) { @@ -893,9 +904,13 @@ static int bf_tof3_register_device(struct device *parent, /* we cannot assume the order in which sub devices are probed */ if (subdev_id == 0) { dev_id = bf_multisub_tof_unused_devid_get(); + if (dev_id < 0) { + return -EINVAL; + } bf_tof3_info[dev_id].dev_id = dev_id; /* back reference */ (bf_tof3_info[dev_id].minor)[subdev_id] = minor; } else { + subdev_id = 1; dev_id = 0; /* TBD : for Tofino with multi sub devices */ (bf_tof3_info[dev_id].minor)[subdev_id] = minor; } @@ -1036,10 +1051,10 @@ int bf_register_device(struct device *parent, struct bf_pci_dev *bfdev) { * sub devices using the minor number are unregistered */ static int bf_tof3_unregister_device(struct bf_pci_dev *bfdev) { struct bf_dev_info *info = &bfdev->info; -#if 1 //HACK until emulator implements efuse +#if 0 //HACK until emulator implements efuse bf_return_minor_no(info->minor); #else - int j, dev_id, subdev_id, found; + int dev_id, subdev_id; if (!info->tof3_info) { printk(KERN_ERR "BF TOF3 bad info in tof3_unregister_device\n"); diff --git a/platform/barefoot/one-image.mk b/platform/barefoot/one-image.mk index d282fec5640a..b9e8582f4814 100644 --- a/platform/barefoot/one-image.mk +++ b/platform/barefoot/one-image.mk @@ -9,6 +9,7 @@ $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_PLATFORM_MODULE) $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_MONTARA_PLATFORM_MODULE) $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_NEWPORT_PLATFORM_MODULE) $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_NEWPORT_BF_PLATFORM_MODULE) +$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_STINSON_PLATFORM_MODULE) $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(WNC_OSW1800_PLATFORM_MODULE) $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(INGRASYS_S9180_32X_PLATFORM_MODULE) $(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(INGRASYS_S9280_64X_PLATFORM_MODULE) diff --git a/platform/barefoot/platform-modules-bfn-stinson.mk b/platform/barefoot/platform-modules-bfn-stinson.mk new file mode 100644 index 000000000000..7c64043c7771 --- /dev/null +++ b/platform/barefoot/platform-modules-bfn-stinson.mk @@ -0,0 +1,11 @@ +# BFN Platform modules + +BFN_STINSON_PLATFORM_MODULE_VERSION = 1.0 + +export BFN_STINSON_PLATFORM_MODULE_VERSION + +BFN_STINSON_PLATFORM_MODULE = sonic-platform-modules-bfn-stinson-as9526bf_$(BFN_STINSON_PLATFORM_MODULE_VERSION)_amd64.deb +$(BFN_STINSON_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-bfn-stinson +$(BFN_STINSON_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) +$(BFN_STINSON_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as9526bf_32o-r0 +SONIC_DPKG_DEBS += $(BFN_STINSON_PLATFORM_MODULE) diff --git a/platform/barefoot/rules.mk b/platform/barefoot/rules.mk index 7f159da63fc7..afbd77fce871 100644 --- a/platform/barefoot/rules.mk +++ b/platform/barefoot/rules.mk @@ -3,6 +3,7 @@ include $(PLATFORM_PATH)/platform-modules-bfn.mk include $(PLATFORM_PATH)/platform-modules-bfn-montara.mk include $(PLATFORM_PATH)/platform-modules-accton.mk include $(PLATFORM_PATH)/platform-modules-bfn-newport.mk +include $(PLATFORM_PATH)/platform-modules-bfn-stinson.mk include $(PLATFORM_PATH)/platform-modules-wnc-osw1800.mk include $(PLATFORM_PATH)/platform-modules-ingrasys.mk include $(PLATFORM_PATH)/platform-modules-netberg.mk diff --git a/platform/barefoot/sonic-platform-modules-bfn-newport/modules/bf_fpga_main.c b/platform/barefoot/sonic-platform-modules-bfn-newport/modules/bf_fpga_main.c index 9910117b72cb..2d24ad8c07c4 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-newport/modules/bf_fpga_main.c +++ b/platform/barefoot/sonic-platform-modules-bfn-newport/modules/bf_fpga_main.c @@ -184,7 +184,11 @@ static inline struct bf_pci_dev *bf_get_pci_dev(struct bf_dev_info *info) { * It masks the msix on/off of generating MSI-X messages. */ static void bf_msix_mask_irq(struct msi_desc *desc, int32_t state) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) u32 mask_bits = desc->masked; +#else + u32 mask_bits = desc->msix_ctrl; +#endif unsigned offset = desc->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL; @@ -193,12 +197,19 @@ static void bf_msix_mask_irq(struct msi_desc *desc, int32_t state) { } else { mask_bits |= PCI_MSIX_ENTRY_CTRL_MASKBIT; } - +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) if (mask_bits != desc->masked) { writel(mask_bits, desc->mask_base + offset); readl(desc->mask_base); desc->masked = mask_bits; } +#else + if (mask_bits != desc->msix_ctrl) { + writel(mask_bits, desc->mask_base + offset); + readl(desc->mask_base); + desc->msix_ctrl = mask_bits; + } +#endif } /** @@ -659,6 +670,13 @@ static void bf_major_cleanup(struct bf_pci_dev *bfdev, int minor) { cdev_del(bf_global[minor].bf_cdev); } +static char *bf_fpga_user_devnode(struct device *dev, umode_t *mode) { + if (mode) { + *mode = (S_IWUGO | S_IRUGO); + } + return kasprintf(GFP_KERNEL, "%s", dev_name(dev)); +} + static int bf_init_cdev(struct bf_pci_dev *bfdev, int minor) { int ret; ret = bf_major_init(bfdev, minor); @@ -670,6 +688,8 @@ static int bf_init_cdev(struct bf_pci_dev *bfdev, int minor) { ret = -ENODEV; goto err_class_register; } + /* change the default device file permissions */ + bf_class->devnode = bf_fpga_user_devnode; return 0; err_class_register: @@ -1220,6 +1240,11 @@ static void bf_pci_resume(struct pci_dev *pdev) { } static int bf_config_intr_mode(char *intr_str) { + bf_intr_mode_default = BF_INTR_MODE_NONE; + pr_info("BF_FPGA interrupt disabled\n"); + return 0; + + /* pre coded stuff if fpga supports interrupt in future */ if (!intr_str) { pr_info("BF_FPGA Use MSI interrupt by default\n"); return 0; diff --git a/platform/barefoot/sonic-platform-modules-bfn-newport/modules/i2c/bf_fpga_i2c_ctrl.c b/platform/barefoot/sonic-platform-modules-bfn-newport/modules/i2c/bf_fpga_i2c_ctrl.c index 6e3291587a64..400bd545f8dc 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-newport/modules/i2c/bf_fpga_i2c_ctrl.c +++ b/platform/barefoot/sonic-platform-modules-bfn-newport/modules/i2c/bf_fpga_i2c_ctrl.c @@ -98,7 +98,7 @@ fpga_i2c_controller_t *fpga_i2c_ctrl_get(int bus_id) { if (bus_id >= BF_I2C_FPGA_NUM_CTRL) { return NULL; } else { - return &fpga_i2c_ctrl[bus_id]; + return &(fpga_i2c_ctrl[bus_id]); } } diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/LICENSE b/platform/barefoot/sonic-platform-modules-bfn-stinson/LICENSE new file mode 100644 index 000000000000..676cdeec726b --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/LICENSE @@ -0,0 +1,15 @@ +Copyright (C) 2016 Microsoft, Inc + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/MAINTAINERS b/platform/barefoot/sonic-platform-modules-bfn-stinson/MAINTAINERS new file mode 100644 index 000000000000..b089191b652d --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/MAINTAINERS @@ -0,0 +1,3 @@ +# This file describes the maintainers for sonic-platform-modules-bfn-stinson +# See the SONiC project governance document for more information +Mailinglist = sonicproject@googlegroups.com diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/README.md b/platform/barefoot/sonic-platform-modules-bfn-stinson/README.md new file mode 100644 index 000000000000..e2495f051a1e --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/README.md @@ -0,0 +1,2 @@ +# sonic-platform-modules-bfn-stinson +Device drivers for support of BFN platform for the SONiC project diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/configs/systemd/system/bfn-stinson.service b/platform/barefoot/sonic-platform-modules-bfn-stinson/configs/systemd/system/bfn-stinson.service new file mode 100644 index 000000000000..aced082aa492 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/configs/systemd/system/bfn-stinson.service @@ -0,0 +1,14 @@ +[Unit] +Description=Barefoot Stinson FPGA driver +Before=syncd.service + +[Service] +User=root +ExecStartPre=/sbin/depmod -a +ExecStart=/sbin/modprobe bf_fpga +ExecStartPost=/sbin/modprobe bf_tun +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target + diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/changelog b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/changelog new file mode 100644 index 000000000000..2129ad1eff9e --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/changelog @@ -0,0 +1,5 @@ +sonic-platform-modules-bfn-stinson (1.0) unstable; urgency=low + + * Initial release + + -- Support Mon, 21 Mar 2022 10:00:00 -0800 diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/compat b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/compat new file mode 100644 index 000000000000..ec635144f600 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/compat @@ -0,0 +1 @@ +9 diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/control b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/control new file mode 100644 index 000000000000..e9b17fa754c4 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/control @@ -0,0 +1,11 @@ +Source: sonic-platform-modules-bfn-stinson +Section: main +Priority: extra +Maintainer: Support +Build-Depends: debhelper (>= 9.0.0), bzip2, python3 +Standards-Version: 3.9.3 + +Package: sonic-platform-modules-bfn-stinson-as9526bf +Architecture: amd64 +Depends: linux-image-5.10.0-12-2-amd64-unsigned +Description: kernel module for bfn platform fpga and scripts for the devices such as fan, led, sfp diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/copyright b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/copyright new file mode 100644 index 000000000000..ade42b7aa75a --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/copyright @@ -0,0 +1,15 @@ +Provides linux kernel driver for BF PCIe devices + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/rules b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/rules new file mode 100755 index 000000000000..df7a1bc248fc --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/rules @@ -0,0 +1,48 @@ +#!/usr/bin/make -f + +export INSTALL_MOD_DIR:=extra + +PACKAGE_PRE_NAME := sonic-platform-modules-bfn-stinson +KVERSION ?= $(shell uname -r) +KERNEL_SRC := /lib/modules/$(KVERSION) +MODULE_SRC := $(shell pwd)/modules +SCRIPT_SRC := $(shell pwd)/scripts +CONFIGS_SRC := $(shell pwd)/configs +BUILD_DIR := $(shell pwd)/build +WHEEL_BUILD_DIR := $(BUILD_DIR)/wheel +MODULE_NAMES := as9526bf + +%: + dh $@ --with python3 --buildsystem=pybuild + +override_dh_auto_build: + make -C $(KERNEL_SRC)/build M=$(MODULE_SRC) + set -e + python3 setup.py bdist_wheel -d $(WHEEL_BUILD_DIR) + set +e + +override_dh_auto_install: + (for mod in $(MODULE_NAMES); do \ + dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} $(KERNEL_SRC)/$(INSTALL_MOD_DIR); \ + cp $(MODULE_SRC)/*.ko debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \ + dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} usr/local/bin; \ + cp -r $(SCRIPT_SRC)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/local/bin; \ + dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} etc/network/interfaces.d/; \ + cp -r $(CONFIGS_SRC)/network/interfaces.d/* debian/$(PACKAGE_PRE_NAME)-$${mod}/etc/network/interfaces.d/; \ + dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} usr/share/sonic/device/x86_64-accton_$${mod}_32o-r0/; \ + cp -r $(WHEEL_BUILD_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/share/sonic/device/x86_64-accton_$${mod}_32o-r0/; \ + done) + +override_dh_usrlocal: + +override_dh_pysupport: + +override_dh_clean: + dh_clean + rm -fr $(WHEEL_BUILD_DIR) + rm -fr *.egg-info + rm -fr $(BUILD) + rm -f $(MODULE_SRC)/*.o $(MODULE_SRC)/*.ko $(MODULE_SRC)/*.mod.c $(MODULE_SRC)/.*.cmd + rm -f $(MODULE_SRC)/Module.markers $(MODULE_SRC)/Module.symvers $(MODULE_SRC)/modules.order + rm -rf $(MODULE_SRC)/.tmp_versions + diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/sonic-platform-modules-bfn-stinson-as9526bf.install b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/sonic-platform-modules-bfn-stinson-as9526bf.install new file mode 100644 index 000000000000..167a551b0dcb --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/sonic-platform-modules-bfn-stinson-as9526bf.install @@ -0,0 +1 @@ +configs/systemd/system/bfn-stinson.service etc/systemd/system diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/sonic-platform-modules-bfn-stinson-as9526bf.postinst b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/sonic-platform-modules-bfn-stinson-as9526bf.postinst new file mode 100644 index 000000000000..b04404f159b2 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/sonic-platform-modules-bfn-stinson-as9526bf.postinst @@ -0,0 +1,11 @@ +#!/bin/sh +set -e +depmod -a +systemctl enable bfn-stinson.service +systemctl start bfn-stinson.service + +PLATFORM_NAME=x86_64-accton_as9526bf_32o-r0 +SONIC_PLATFORM_WHEEL_PY3="/usr/share/sonic/device/${PLATFORM_NAME}/sonic_platform-1.0-py3-none-any.whl" +python3 -m pip install ${SONIC_PLATFORM_WHEEL_PY3} + +#DEBHELPER# diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/sonic-platform-modules-bfn-stinson-as9526bf.prerm b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/sonic-platform-modules-bfn-stinson-as9526bf.prerm new file mode 100644 index 000000000000..cd2495f03606 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/debian/sonic-platform-modules-bfn-stinson-as9526bf.prerm @@ -0,0 +1,5 @@ +#!/bin/sh + +python3 -m pip uninstall -y sonic-platform + +#DEBHELPER# diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/modules b/platform/barefoot/sonic-platform-modules-bfn-stinson/modules new file mode 120000 index 000000000000..2fcf02cc5213 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/modules @@ -0,0 +1 @@ +../sonic-platform-modules-bfn-newport/modules \ No newline at end of file diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/scripts b/platform/barefoot/sonic-platform-modules-bfn-stinson/scripts new file mode 120000 index 000000000000..14008f061862 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/scripts @@ -0,0 +1 @@ +../sonic-platform-modules-bfn-montara/scripts \ No newline at end of file diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/setup.py b/platform/barefoot/sonic-platform-modules-bfn-stinson/setup.py new file mode 120000 index 000000000000..a68e2eec6762 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/setup.py @@ -0,0 +1 @@ +../sonic-platform-modules-bfn-montara/setup.py \ No newline at end of file diff --git a/platform/barefoot/sonic-platform-modules-bfn-stinson/sonic_platform b/platform/barefoot/sonic-platform-modules-bfn-stinson/sonic_platform new file mode 120000 index 000000000000..b2918418aad1 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-stinson/sonic_platform @@ -0,0 +1 @@ +../sonic-platform-modules-bfn-montara/sonic_platform \ No newline at end of file