blob: 987d927254009b50b32f3905d18c2bcf9b9e0991 [file] [log] [blame]
Craig Lutgen88a22ad2018-10-04 12:30:46 -05001/*
Girish Gowdraa707e7c2019-11-07 11:36:13 +05302 * Copyright 2018-present Open Networking Foundation
Craig Lutgen88a22ad2018-10-04 12:30:46 -05003
Girish Gowdraa707e7c2019-11-07 11:36:13 +05304 * 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
Craig Lutgen88a22ad2018-10-04 12:30:46 -05007
Girish Gowdraa707e7c2019-11-07 11:36:13 +05308 * http://www.apache.org/licenses/LICENSE-2.0
Craig Lutgen88a22ad2018-10-04 12:30:46 -05009
Girish Gowdraa707e7c2019-11-07 11:36:13 +053010 * 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 */
Craig Lutgen88a22ad2018-10-04 12:30:46 -050016
17#ifndef __VENDOR_H__
18#define __VENDOR_H__
Girish Gowdrab0337eb2022-03-25 16:44:21 -070019#include "device.h"
Craig Lutgen88a22ad2018-10-04 12:30:46 -050020#define VENDOR_ID "generic"
21#define MODEL_ID "generic"
Girish Gowdra252f4972020-09-07 21:24:01 -070022
23// DeviceInfo definitions
24
25#define ONU_ID_START 1
26#define ONU_ID_END 32
27#define MAX_ONUS_PER_PON 32
28
29#define ALLOC_ID_START 1024
30#define ALLOC_ID_END 16383
31
32#define GEM_PORT_ID_START 1024
33#define GEM_PORT_ID_END 65535
34
35#define FLOW_ID_START 1
36#define FLOW_ID_END 65535
37#define MAX_FLOW_ID 65535
38#define INVALID_FLOW_ID 0
39
Girish Gowdra72bb4652022-01-18 17:04:30 -080040#define MAC_DEVICE_ACTIVATION_DELAY 200000 // in microseconds
41
Girish Gowdrab0337eb2022-03-25 16:44:21 -070042#define DEFAULT_MAC_SYSTEM_MODE BCMOLT_SYSTEM_MODE_GPON__16_X
43//#define DEFAULT_MAC_SYSTEM_MODE BCMOLT_SYSTEM_MODE_XGS__2_X
44#define DEFAULT_PON_MODE BCMOLT_PON_TYPE_GPON
45// #define DEFAULT_PON_MODE BCMOLT_PON_TYPE_XGPON
46
47
48#define TOTAL_PON_TRX_PORTS 16 // total PON transceiver ports
49#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)
50const 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},
51{11},{12},{13},{14},{15}};
52#define PONS_PER_TRX (TOTAL_PON_TRX_PORTS/TOTAL_PON_PORTS) // if there are more than one OLT MAC device,
53 // they all have to be of the same type for this to work.
54
55const int bus_index[TOTAL_PON_TRX_PORTS] = {
56 41, 42, 56, 55, 43, 44, 54, 53,
57 45, 46, 52, 51, 47, 48, 50, 49
58};
59
60
61#define PORT_ADDRESS 50
62
63#define NAME_EEPROM "sfp_eeprom"
64
65#define EEPROM_VENDOR_NAME_START_IDX 148
66#define EEPROM_VENDOR_NAME_LENGTH 16
67
68#define EEPROM_VENDOR_OUI_START_IDX 165
69#define EEPROM_VENDOR_OUI_LENGTH 3
70
71#define EEPROM_VENDOR_PART_NUMBER_START_IDX 168
72#define EEPROM_VENDOR_PART_NUMBER_LENGTH 16
73
74#define EEPROM_VENDOR_REVISION_START_IDX 184
75#define EEPROM_VENDOR_REVISION_LENGTH 2
76
77#define EEPROM_DOWNSTREAM_WAVELENGTH_START_IDX 186
78#define EEPROM_DOWNSTREAM_WAVELENGTH_LENGTH 2
79#define EEPROM_WAVELENGTH_RESOLUTION 0.05
80
81// Define valid values below in case of Combo PON Trx is supported
82// #define EEPROM_DOWNSTREAM_SECONDARY_WAVELENGTH_START_IDX 120
83// #define EEPROM_DOWNSTREAM_SECONDARY_WAVELENGTH_LENGTH 2
84
85class PonTrx: public PonTrxBase {
86 // override the base member functions if you need a different implementation
87};
88
89
Craig Lutgen88a22ad2018-10-04 12:30:46 -050090#endif