blob: df21c3272fb49765b17d3bb377198ddef879f7a8 [file] [log] [blame]
Thiyagarajan Subramani3e8bfd92021-04-26 15:07:14 +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 Subramani3e8bfd92021-04-26 15:07:14 +053021#define VENDOR_ID "Radisys"
Thiyagarajan Subramania2c2c5a2021-05-18 14:47:52 +053022#define RLT3200GW
23#define MODEL_ID "rlt-3200g-w"
Thiyagarajan Subramani4e62e172021-06-25 17:31:30 +053024#define MAX_SUPPORTED_PON 32
Thiyagarajan Subramani3e8bfd92021-04-26 15:07:14 +053025#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
Girish Gowdraeec0fc92021-05-12 15:37:55 -070032#define MAX_ONUS_PER_PON (ONU_ID_END - ONU_ID_START + 1)
Thiyagarajan Subramani3e8bfd92021-04-26 15:07:14 +053033
Girish Gowdraeec0fc92021-05-12 15:37:55 -070034#define MAX_ALLOC_ID_PER_ONU 4
Thiyagarajan Subramani3e8bfd92021-04-26 15:07:14 +053035#define ALLOC_ID_START 256
Girish Gowdraeec0fc92021-05-12 15:37:55 -070036#define ALLOC_ID_END (ALLOC_ID_START + MAX_ONUS_PER_PON * MAX_ALLOC_ID_PER_ONU)
Thiyagarajan Subramani3e8bfd92021-04-26 15:07:14 +053037
Girish Gowdraeec0fc92021-05-12 15:37:55 -070038#define GEM_PORT_ID_PER_ALLOC_ID 8
Thiyagarajan Subramani3e8bfd92021-04-26 15:07:14 +053039#define GEM_PORT_ID_START 256
Girish Gowdraeec0fc92021-05-12 15:37:55 -070040#define GEM_PORT_ID_END (GEM_PORT_ID_START + MAX_ONUS_PER_PON * MAX_ALLOC_ID_PER_ONU * GEM_PORT_ID_PER_ALLOC_ID)
Thiyagarajan Subramani3e8bfd92021-04-26 15:07:14 +053041
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 Gowdra72bb4652022-01-18 17:04:30 -080047#define MAC_DEVICE_ACTIVATION_DELAY 200000 // in microseconds
48
Girish Gowdrab0337eb2022-03-25 16:44:21 -070049#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 32 // total PON transceiver ports
56#define TOTAL_PON_PORTS 32 // 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},{16},{17},{18},{19},{20},{21},{22},{23},{24},{25},{26},{27},{28},{29},{30},{31}};
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 57, 58, 72, 71, 59, 60, 70, 69,
67 61, 62, 68, 67, 63, 64, 66, 65
68};
69
70// FIXME: Check the correctness of the below constants for this platform
71
72#define PORT_ADDRESS 50
73
74#define NAME_EEPROM "eeprom"
75
76#define EEPROM_VENDOR_NAME_START_IDX 20
77#define EEPROM_VENDOR_NAME_LENGTH 16
78
79#define EEPROM_VENDOR_OUI_START_IDX 37
80#define EEPROM_VENDOR_OUI_LENGTH 3
81
82#define EEPROM_VENDOR_PART_NUMBER_START_IDX 40
83#define EEPROM_VENDOR_PART_NUMBER_LENGTH 16
84
85#define EEPROM_VENDOR_REVISION_START_IDX 56
86#define EEPROM_VENDOR_REVISION_LENGTH 4
87
88#define EEPROM_DOWNSTREAM_WAVELENGTH_START_IDX 60
89#define EEPROM_DOWNSTREAM_WAVELENGTH_LENGTH 2
90#define EEPROM_WAVELENGTH_RESOLUTION 1
91
92// Define valid values below in case of Combo PON Trx is supported
93// #define EEPROM_DOWNSTREAM_SECONDARY_WAVELENGTH_START_IDX 120
94// #define EEPROM_DOWNSTREAM_SECONDARY_WAVELENGTH_LENGTH 2
95
96class PonTrx: public PonTrxBase {
97 // override the base member functions if you need a different implementation
98
99};
100
Thiyagarajan Subramani3e8bfd92021-04-26 15:07:14 +0530101#endif