Skip to content

Commit

Permalink
[device]: add the new platform ag9064 (#23)
Browse files Browse the repository at this point in the history
Signed-off-by: hans <hans.tseng@deltaww.com>
  • Loading branch information
hans-tseng authored and lguohan committed Aug 11, 2018
1 parent 764a7ed commit cbf204b
Show file tree
Hide file tree
Showing 9 changed files with 840 additions and 85 deletions.
10 changes: 5 additions & 5 deletions device/delta/x86_64-delta_ag9032v1-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def get_presence(self, port_num):
return False

try:
reg_file = open("/sys/devices/platform/delta-ag9032v1-cpld.0/sfp_present")
reg_file = open("/sys/devices/platform/delta-ag9032v1-swpld.0/sfp_present")
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
Expand All @@ -76,7 +76,7 @@ def get_low_power_mode(self, port_num):
return False

try:
reg_file = open("/sys/devices/platform/delta-ag9032v1-cpld.0/sfp_lpmode")
reg_file = open("/sys/devices/platform/delta-ag9032v1-swpld.0/sfp_lpmode")
except IOError as e:
print "Error: unable to open file: %s" % str(e)

Expand All @@ -100,7 +100,7 @@ def set_low_power_mode(self, port_num, lpmode):
return False

try:
reg_file = open("/sys/devices/platform/delta-ag9032v1-cpld.0/sfp_lpmode", "r+")
reg_file = open("/sys/devices/platform/delta-ag9032v1-swpld.0/sfp_lpmode", "r+")
except IOError as e:
print "Error: unable to open file: %s" % str(e)
return False
Expand Down Expand Up @@ -129,7 +129,7 @@ def set_low_power_mode(self, port_num, lpmode):
return True

def reset(self, port_num):
QSFP_RESET_REGISTER_DEVICE_FILE = "/sys/devices/platform/delta-ag9032v1-cpld.0/sfp_reset"
QSFP_RESET_REGISTER_DEVICE_FILE = "/sys/devices/platform/delta-ag9032v1-swpld.0/sfp_reset"

# Check for invalid port_num
if port_num < self.port_start or port_num > self.port_end:
Expand Down Expand Up @@ -172,4 +172,4 @@ def reset(self, port_num):
reg_file.write(hex(reg_value))
reg_file.close()

return True
return True
132 changes: 65 additions & 67 deletions device/delta/x86_64-delta_ag9064-r0/Delta-ag9064/port_config.ini
Original file line number Diff line number Diff line change
@@ -1,67 +1,65 @@
# name lanes alias index
Ethernet0 49,50,51,52 Ethernet1/1 1
Ethernet4 53,54,55,56 Ethernet2/1 2
Ethernet8 65,66,67,68 Ethernet3/1 3
Ethernet12 69,70,71,72 Ethernet4/1 4
Ethernet16 81,82,83,84 Ethernet5/1 5
Ethernet20 85,86,87,88 Ethernet6/1 6
Ethernet24 1,2,3,4 Ethernet7/1 7
Ethernet28 101,102,103,104 Ethernet8/1 8
Ethernet32 5,6,7,8 Ethernet9/1 9
Ethernet36 17,18,19,20 Ethernet10/1 10
Ethernet40 21,22,23,24 Ethernet11/1 11
Ethernet44 33,34,35,36 Ethernet12/1 12
Ethernet48 37,38,39,40 Ethernet13/1 13
Ethernet52 97,98,99,100 Ethernet14/1 14
Ethernet56 113,114,115,116 Ethernet15/1 15
Ethernet60 117,118,119,120 Ethernet16/1 16
Ethernet64 129,130,131,132 Ethernet17/1 17
Ethernet68 133,134,135,136 Ethernet18/1 18
Ethernet72 145,146,147,148 Ethernet19/1 19
Ethernet76 209,210,211,212 Ethernet20/1 20
Ethernet80 213,214,215,216 Ethernet21/1 21
Ethernet84 225,226,227,228 Ethernet22/1 22
Ethernet88 229,230,231,232 Ethernet23/1 23
Ethernet92 241,242,243,244 Ethernet24/1 24
Ethernet96 245,246,247,248 Ethernet25/1 25
Ethernet100 157,158,159,160 Ethernet26/1 26
Ethernet104 161,162,163,164 Ethernet27/1 27
Ethernet108 165,166,167,168 Ethernet28/1 28
Ethernet112 177,178,179,180 Ethernet29/1 29
Ethernet116 181,182,183,184 Ethernet30/1 30
Ethernet120 193,194,195,196 Ethernet31/1 31
Ethernet124 197,198,199,200 Ethernet32/1 32
Ethernet128 61,62,63,64 Ethernet33/1 33
Ethernet132 57,58,59,60 Ethernet34/1 34
Ethernet136 77,78,79,80 Ethernet35/1 35
Ethernet140 73,74,75,76 Ethernet36/1 36
Ethernet144 93,94,95,96 Ethernet37/1 37
Ethernet148 89,90,91,92 Ethernet38/1 38
Ethernet152 105,106,107,108 Ethernet39/1 39
Ethernet156 9,10,11,12 Ethernet40/1 40
Ethernet160 25,26,27,28 Ethernet41/1 41
Ethernet164 13,14,15,16 Ethernet42/1 42
Ethernet168 41,42,43,44 Ethernet43/1 43
Ethernet172 29,30,31,32 Ethernet44/1 44
Ethernet176 45,46,47,48 Ethernet45/1 45
Ethernet180 109,110,111,112 Ethernet46/1 46
Ethernet184 125,126,127,128 Ethernet47/1 47
Ethernet188 121,122,123,124 Ethernet48/1 48
Ethernet192 141,142,143,144 Ethernet49/1 49
Ethernet196 137,138,139,140 Ethernet50/1 50
Ethernet200 217,218,219,220 Ethernet51/1 51
Ethernet204 149,150,151,152 Ethernet52/1 52
Ethernet208 233,234,235,236 Ethernet53/1 53
Ethernet212 221,222,223,224 Ethernet54/1 54
Ethernet216 249,250,251,252 Ethernet55/1 55
Ethernet220 237,238,239,240 Ethernet56/1 56
Ethernet224 153,154,155,156 Ethernet57/1 57
Ethernet228 253,254,255,256 Ethernet58/1 58
Ethernet232 173,174,175,176 Ethernet59/1 59
Ethernet236 169,170,171,172 Ethernet60/1 60
Ethernet240 189,190,191,192 Ethernet61/1 61
Ethernet244 185,186,187,188 Ethernet62/1 62
Ethernet248 205,206,207,208 Ethernet63/1 63
Ethernet252 201,202,203,204 Ethernet64/1 64
Ethernet256 257 Ethernet65 65
Ethernet260 259 Ethernet66 66
# name lanes alias
Ethernet0 49,50,51,52 Ethernet1/1
Ethernet4 53,54,55,56 Ethernet2/1
Ethernet8 65,66,67,68 Ethernet3/1
Ethernet12 69,70,71,72 Ethernet4/1
Ethernet16 81,82,83,84 Ethernet5/1
Ethernet20 85,86,87,88 Ethernet6/1
Ethernet24 1,2,3,4 Ethernet7/1
Ethernet28 101,102,103,104 Ethernet8/1
Ethernet32 5,6,7,8 Ethernet9/1
Ethernet36 17,18,19,20 Ethernet10/1
Ethernet40 21,22,23,24 Ethernet11/1
Ethernet44 33,34,35,36 Ethernet12/1
Ethernet48 37,38,39,40 Ethernet13/1
Ethernet52 97,98,99,100 Ethernet14/1
Ethernet56 113,114,115,116 Ethernet15/1
Ethernet60 117,118,119,120 Ethernet16/1
Ethernet64 129,130,131,132 Ethernet17/1
Ethernet68 133,134,135,136 Ethernet18/1
Ethernet72 145,146,147,148 Ethernet19/1
Ethernet76 209,210,211,212 Ethernet20/1
Ethernet80 213,214,215,216 Ethernet21/1
Ethernet84 225,226,227,228 Ethernet22/1
Ethernet88 229,230,231,232 Ethernet23/1
Ethernet92 241,242,243,244 Ethernet24/1
Ethernet96 245,246,247,248 Ethernet25/1
Ethernet100 157,158,159,160 Ethernet26/1
Ethernet104 161,162,163,164 Ethernet27/1
Ethernet108 165,166,167,168 Ethernet28/1
Ethernet112 177,178,179,180 Ethernet29/1
Ethernet116 181,182,183,184 Ethernet30/1
Ethernet120 193,194,195,196 Ethernet31/1
Ethernet124 197,198,199,200 Ethernet32/1
Ethernet128 61,62,63,64 Ethernet33/1
Ethernet132 57,58,59,60 Ethernet34/1
Ethernet136 77,78,79,80 Ethernet35/1
Ethernet140 73,74,75,76 Ethernet36/1
Ethernet144 93,94,95,96 Ethernet37/1
Ethernet148 89,90,91,92 Ethernet38/1
Ethernet152 105,106,107,108 Ethernet39/1
Ethernet156 9,10,11,12 Ethernet40/1
Ethernet160 25,26,27,28 Ethernet41/1
Ethernet164 13,14,15,16 Ethernet42/1
Ethernet168 41,42,43,44 Ethernet43/1
Ethernet172 29,30,31,32 Ethernet44/1
Ethernet176 45,46,47,48 Ethernet45/1
Ethernet180 109,110,111,112 Ethernet46/1
Ethernet184 125,126,127,128 Ethernet47/1
Ethernet188 121,122,123,124 Ethernet48/1
Ethernet192 141,142,143,144 Ethernet49/1
Ethernet196 137,138,139,140 Ethernet50/1
Ethernet200 217,218,219,220 Ethernet51/1
Ethernet204 149,150,151,152 Ethernet52/1
Ethernet208 233,234,235,236 Ethernet53/1
Ethernet212 221,222,223,224 Ethernet54/1
Ethernet216 249,250,251,252 Ethernet55/1
Ethernet220 237,238,239,240 Ethernet56/1
Ethernet224 153,154,155,156 Ethernet57/1
Ethernet228 253,254,255,256 Ethernet58/1
Ethernet232 173,174,175,176 Ethernet59/1
Ethernet236 169,170,171,172 Ethernet60/1
Ethernet240 189,190,191,192 Ethernet61/1
Ethernet244 185,186,187,188 Ethernet62/1
Ethernet248 205,206,207,208 Ethernet63/1
Ethernet252 201,202,203,204 Ethernet64/1
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ static int __exit i2c_deivce_remove(struct platform_device *pdev)
}

if (pdata->client) {
parent = i2c_get_adapter(pdata->parent);
parent = (pdata->client)->adapter;
i2c_unregister_device(pdata->client);
i2c_put_adapter(parent);
}
Expand Down
Loading

0 comments on commit cbf204b

Please sign in to comment.