blob: 2940b910b3043750d6941cca4263e4b3d3352668 [file] [log] [blame]
Thiyagarajan Subramani4e62e172021-06-25 17:31:30 +05301/*
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 Gowdrab0337eb2022-03-25 16:44:21 -070019#include "device.h"
20
Thiyagarajan Subramani4e62e172021-06-25 17:31:30 +053021#define VENDOR_ID "Radisys"
22#define RLT1600GW
23#define MODEL_ID "rlt-1600g-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
Girish Gowdrab0337eb2022-03-25 16:44:21 -070028#define DEFAULT_MAC_SYSTEM_MODE BCMOLT_SYSTEM_MODE_GPON__16_X
29//#define DEFAULT_MAC_SYSTEM_MODE BCMOLT_SYSTEM_MODE_XGS__2_X
30#define DEFAULT_PON_MODE BCMOLT_PON_TYPE_GPON
31// #define DEFAULT_PON_MODE BCMOLT_PON_TYPE_XGPON
32
33
Thiyagarajan Subramani4e62e172021-06-25 17:31:30 +053034// DeviceInfo definitions
35
36#define ONU_ID_START 1
37#define ONU_ID_END 32
38#define MAX_ONUS_PER_PON (ONU_ID_END - ONU_ID_START + 1)
39
40#define MAX_ALLOC_ID_PER_ONU 4
41#define ALLOC_ID_START 256
42#define ALLOC_ID_END (ALLOC_ID_START + MAX_ONUS_PER_PON * MAX_ALLOC_ID_PER_ONU)
43
44#define GEM_PORT_ID_PER_ALLOC_ID 8
45#define GEM_PORT_ID_START 256
46#define GEM_PORT_ID_END (GEM_PORT_ID_START + MAX_ONUS_PER_PON * MAX_ALLOC_ID_PER_ONU * GEM_PORT_ID_PER_ALLOC_ID)
47
48#define FLOW_ID_START 1
49#define FLOW_ID_END 65535
50#define MAX_FLOW_ID FLOW_ID_END
51#define INVALID_FLOW_ID 0
52
Girish Gowdra72bb4652022-01-18 17:04:30 -080053#define MAC_DEVICE_ACTIVATION_DELAY 200000 // in microseconds
54
Girish Gowdrab0337eb2022-03-25 16:44:21 -070055#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)
57const 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
63const 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
94class PonTrx: public PonTrxBase {
95 // override the base member functions if you need a different implementation
96
97};
98
Thiyagarajan Subramani4e62e172021-06-25 17:31:30 +053099#endif