Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef __VENDOR_H__ |
| 18 | #define __VENDOR_H__ |
Girish Gowdra | b0337eb | 2022-03-25 16:44:21 -0700 | [diff] [blame] | 19 | #include "device.h" |
| 20 | |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 21 | #define VENDOR_ID "Radisys" |
| 22 | #define RLT1600XW |
| 23 | #define MODEL_ID "rlt-1600x-w" |
| 24 | #define MAX_SUPPORTED_PON 16 |
| 25 | #define ONU_BIT_TRANSMISSION_DELAY 0.8038585/1000 /* unit: ns to us */ |
| 26 | #define MINIMUM_ONU_RESPONSE_RANGING_TIME 198075 /* hardcore: this is ranging time for the shortest distance, typically 35us */ |
| 27 | |
| 28 | // DeviceInfo definitions |
| 29 | |
| 30 | #define ONU_ID_START 1 |
| 31 | #define ONU_ID_END 32 |
| 32 | #define MAX_ONUS_PER_PON (ONU_ID_END - ONU_ID_START + 1) |
| 33 | |
| 34 | #define MAX_ALLOC_ID_PER_ONU 4 |
| 35 | #define ALLOC_ID_START 256 |
| 36 | #define ALLOC_ID_END (ALLOC_ID_START + MAX_ONUS_PER_PON * MAX_ALLOC_ID_PER_ONU) |
| 37 | |
| 38 | #define GEM_PORT_ID_PER_ALLOC_ID 8 |
| 39 | #define GEM_PORT_ID_START 256 |
| 40 | #define GEM_PORT_ID_END (GEM_PORT_ID_START + MAX_ONUS_PER_PON * MAX_ALLOC_ID_PER_ONU * GEM_PORT_ID_PER_ALLOC_ID) |
| 41 | |
| 42 | #define FLOW_ID_START 1 |
| 43 | #define FLOW_ID_END 65535 |
| 44 | #define MAX_FLOW_ID FLOW_ID_END |
| 45 | #define INVALID_FLOW_ID 0 |
| 46 | |
Girish Gowdra | 72bb465 | 2022-01-18 17:04:30 -0800 | [diff] [blame] | 47 | #define MAC_DEVICE_ACTIVATION_DELAY 200000 // in microseconds |
| 48 | |
Girish Gowdra | b0337eb | 2022-03-25 16:44:21 -0700 | [diff] [blame] | 49 | #define DEFAULT_MAC_SYSTEM_MODE BCMOLT_SYSTEM_MODE_GPON__16_X |
| 50 | //#define DEFAULT_MAC_SYSTEM_MODE BCMOLT_SYSTEM_MODE_XGS__2_X |
| 51 | #define DEFAULT_PON_MODE BCMOLT_PON_TYPE_GPON |
| 52 | // #define DEFAULT_PON_MODE BCMOLT_PON_TYPE_XGPON |
| 53 | |
| 54 | |
| 55 | #define TOTAL_PON_TRX_PORTS 16 // total PON transceiver ports |
| 56 | #define TOTAL_PON_PORTS 16 // total PON ports (we could have up to 2 PON ports on the OLT MAC mapped to the external PON Trx) |
| 57 | const int trx_port_to_pon_port_map[TOTAL_PON_TRX_PORTS][TOTAL_PON_PORTS/TOTAL_PON_TRX_PORTS]={{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}, |
| 58 | {11},{12},{13},{14},{15}}; |
| 59 | #define PONS_PER_TRX (TOTAL_PON_TRX_PORTS/TOTAL_PON_PORTS) // if there are more than one OLT MAC device, |
| 60 | // they all have to be of the same type for this to work. |
| 61 | |
| 62 | // FIXME: These may not be correct for this platform |
| 63 | const int bus_index[TOTAL_PON_TRX_PORTS] = { |
| 64 | 41, 42, 56, 55, 43, 44, 54, 53, |
| 65 | 45, 46, 52, 51, 47, 48, 50, 49 |
| 66 | }; |
| 67 | |
| 68 | // FIXME: Check the correctness of the below constants for this platform |
| 69 | |
| 70 | #define PORT_ADDRESS 50 |
| 71 | |
| 72 | #define NAME_EEPROM "eeprom" |
| 73 | |
| 74 | #define EEPROM_VENDOR_NAME_START_IDX 20 |
| 75 | #define EEPROM_VENDOR_NAME_LENGTH 16 |
| 76 | |
| 77 | #define EEPROM_VENDOR_OUI_START_IDX 37 |
| 78 | #define EEPROM_VENDOR_OUI_LENGTH 3 |
| 79 | |
| 80 | #define EEPROM_VENDOR_PART_NUMBER_START_IDX 40 |
| 81 | #define EEPROM_VENDOR_PART_NUMBER_LENGTH 16 |
| 82 | |
| 83 | #define EEPROM_VENDOR_REVISION_START_IDX 56 |
| 84 | #define EEPROM_VENDOR_REVISION_LENGTH 4 |
| 85 | |
| 86 | #define EEPROM_DOWNSTREAM_WAVELENGTH_START_IDX 60 |
| 87 | #define EEPROM_DOWNSTREAM_WAVELENGTH_LENGTH 2 |
| 88 | #define EEPROM_WAVELENGTH_RESOLUTION 1 |
| 89 | |
| 90 | // Define valid values below in case of Combo PON Trx is supported |
| 91 | // #define EEPROM_DOWNSTREAM_SECONDARY_WAVELENGTH_START_IDX 120 |
| 92 | // #define EEPROM_DOWNSTREAM_SECONDARY_WAVELENGTH_LENGTH 2 |
| 93 | |
| 94 | class PonTrx: public PonTrxBase { |
| 95 | // override the base member functions if you need a different implementation |
| 96 | |
| 97 | }; |
| 98 | |
Thiyagarajan Subramani | 4e62e17 | 2021-06-25 17:31:30 +0530 | [diff] [blame] | 99 | #endif |