-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Edgecore][as4500-52p][as4581-52p] Add new platform #285
Open
brandonchuang
wants to merge
2
commits into
dentproject:main
Choose a base branch
from
brandonchuang:as4560-52p
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ K_PATCH_DIR := $(THIS_DIR)/patches | |
K_MODSYNCLIST := tools/objtool | ||
K_GIT := 1 | ||
K_GIT_URL := https://github.com/dentproject/linux.git | ||
K_GIT_BRANCH := dent-linux-5.15.y | ||
K_GIT_BRANCH := dent-linux-5.15.105 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shouldn't be part of this PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May I know if there is any plan to change default branch to "dent-linux-5.15.105"? |
2 changes: 2 additions & 0 deletions
2
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*arm64*accton*as4500*52p.mk | ||
onlpdump.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/modules/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/modules/PKG.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!include $ONL_TEMPLATES/platform-modules.yml ARCH=arm64 VENDOR=accton BASENAME=arm64-accton-as4500-52p KERNELS="onl-kernel-5.15-lts-arm64-all:arm64" |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/modules/builds/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib |
7 changes: 7 additions & 0 deletions
7
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/modules/builds/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
KERNELS := onl-kernel-5.15-lts-arm64-all:arm64 | ||
KMODULES := $(ONL)/packages/platforms/accton/arm64/as45xx-52p/src/modules/ | ||
VENDOR := accton | ||
BASENAME := arm64-accton-as4500-52p | ||
ARCH := arm64 | ||
include $(ONL)/make/kmodule.mk | ||
export CROSS_COMPILE=aarch64-linux-gnu- |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/onlp/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/onlp/PKG.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!include $ONL_TEMPLATES/onlp-platform-any.yml PLATFORM=arm64-accton-as4500-52p ARCH=arm64 TOOLCHAIN=aarch64-linux-gnu |
2 changes: 2 additions & 0 deletions
2
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/onlp/builds/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FILTER=src | ||
include $(ONL)/make/subdirs.mk |
3 changes: 3 additions & 0 deletions
3
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/onlp/builds/lib/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PLATFORM := arm64-accton-as4500-52p | ||
PLATFORM_MODULE := arm64_accton_as45xx_52p | ||
include $(ONL)/packages/base/any/onlp/builds/platform/libonlp-platform.mk |
3 changes: 3 additions & 0 deletions
3
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/onlp/builds/onlpdump/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PLATFORM := arm64-accton-as4500-52p | ||
PLATFORM_MODULE := arm64_accton_as45xx_52p | ||
include $(ONL)/packages/base/any/onlp/builds/platform/onlps.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/platform-config/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/platform-config/r0/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4500-52p/platform-config/r0/PKG.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!include $ONL_TEMPLATES/platform-config-platform.yml ARCH=arm64 VENDOR=accton BASENAME=arm64-accton-as4500-52p REVISION=r0 |
38 changes: 38 additions & 0 deletions
38
...ton/arm64/as45xx-52p/as4500-52p/platform-config/r0/src/lib/arm64-accton-as4500-52p-r0.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
|
||
###################################################################### | ||
# | ||
# platform-config for AS4500-52P | ||
# | ||
###################################################################### | ||
|
||
arm64-accton-as4500-52p-r0: | ||
flat_image_tree: | ||
kernel: | ||
<<: *arm64-kernel-5-15 | ||
dtb: | ||
=: accton-as4500-52p.dtb | ||
<<: *arm64-kernel-5-15-package | ||
itb: | ||
<<: *arm64-itb | ||
|
||
loader: | ||
device: /dev/mmcblk0 | ||
##partition: /dev/sda1 | ||
loadaddr: 0x220000000 | ||
nos_bootcmds: *mmc_bootcmds | ||
|
||
setenv: | ||
- bootargs: >- | ||
console=ttyS0,115200 | ||
onl_platform=$onl_platform | ||
arm-smmu.disable_bypass=n | ||
maxcpus=8 | ||
pci=pcie_bus_perf | ||
cpuidle.off=1 | ||
|
||
environment: | ||
- device: /dev/mmcblk0boot0 | ||
env_offset: 0x001e0000 | ||
env_size: 0x00010000 | ||
sector_size: 0x00010000 |
51 changes: 51 additions & 0 deletions
51
...s45xx-52p/as4500-52p/platform-config/r0/src/python/arm64_accton_as4500_52p_r0/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/python | ||
|
||
from onl.platform.base import * | ||
from onl.platform.accton import * | ||
|
||
class OnlPlatform_arm64_accton_as4500_52p_r0(OnlPlatformAccton, | ||
OnlPlatformPortConfig_48x1_4x10): | ||
PLATFORM='arm64-accton-as4500-52p-r0' | ||
MODEL="AS4500-52P" | ||
SYS_OBJECT_ID=".4500.52.1" | ||
|
||
def baseconfig(self): | ||
self.insmod('optoe') | ||
self.insmod('dps850') | ||
|
||
# Insert platform drivers | ||
for m in [ 'mux', 'cpld', 'psu' ]: | ||
self.insmod("arm64-accton-as45xx-52p-%s" % m) | ||
|
||
########### initialize I2C bus 1 ########### | ||
self.new_i2c_devices( | ||
[ | ||
# initialize CPLD | ||
('pca9641_mux', 0x73, 0), # i2c-2 | ||
('as45xx_cpldm_mux', 0x76, 0), # i2c-3 ~ i2c-8 | ||
('as4500_cpld_m', 0x42, 0), | ||
('as45xx_cpld_s', 0x62, 2), | ||
('as45xx_psu1', 0x50, 6), | ||
('dps850', 0x58, 6), | ||
('as45xx_psu2', 0x51, 5), | ||
('dps850', 0x59, 5), | ||
('pca9546', 0x71, 7), # i2c-9 ~ i2c-12 | ||
('pca9546', 0x70, 8), # i2c-13 ~ i2c-16 | ||
('tmp175', 0x48, 10), | ||
('tmp175', 0x49, 10), | ||
('tmp175', 0x4b, 10), | ||
('tmp175', 0x4c, 10), | ||
('24c64', 0x54, 9) | ||
] | ||
) | ||
|
||
# Insert platform drivers | ||
for m in [ 'fan', 'sfp' ]: | ||
self.insmod("arm64-accton-as45xx-52p-%s" % m) | ||
|
||
# initialize SFP devices | ||
for port in range(49, 53): | ||
self.new_i2c_device('optoe2', 0x50, port-36) | ||
subprocess.call('echo port%d > /sys/bus/i2c/devices/%d-0050/port_name' % (port, port-36), shell=True) | ||
|
||
return True |
2 changes: 2 additions & 0 deletions
2
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*arm64*accton*as4581*52pl.mk | ||
onlpdump.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/modules/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/modules/PKG.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!include $ONL_TEMPLATES/platform-modules.yml ARCH=arm64 VENDOR=accton BASENAME=arm64-accton-as4581-52pl KERNELS="onl-kernel-5.15-lts-arm64-all:arm64" |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/modules/builds/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib |
7 changes: 7 additions & 0 deletions
7
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/modules/builds/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
KERNELS := onl-kernel-5.15-lts-arm64-all:arm64 | ||
KMODULES := $(ONL)/packages/platforms/accton/arm64/as45xx-52p/src/modules/ | ||
VENDOR := accton | ||
BASENAME := arm64-accton-as4581-52pl | ||
ARCH := arm64 | ||
include $(ONL)/make/kmodule.mk | ||
export CROSS_COMPILE=aarch64-linux-gnu- |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/onlp/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/onlp/PKG.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!include $ONL_TEMPLATES/onlp-platform-any.yml PLATFORM=arm64-accton-as4581-52pl ARCH=arm64 TOOLCHAIN=aarch64-linux-gnu |
2 changes: 2 additions & 0 deletions
2
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/onlp/builds/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FILTER=src | ||
include $(ONL)/make/subdirs.mk |
3 changes: 3 additions & 0 deletions
3
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/onlp/builds/lib/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PLATFORM := arm64-accton-as4581-52pl | ||
PLATFORM_MODULE := arm64_accton_as45xx_52p | ||
include $(ONL)/packages/base/any/onlp/builds/platform/libonlp-platform.mk |
3 changes: 3 additions & 0 deletions
3
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/onlp/builds/onlpdump/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PLATFORM := arm64-accton-as4581-52pl | ||
PLATFORM_MODULE := arm64_accton_as45xx_52p | ||
include $(ONL)/packages/base/any/onlp/builds/platform/onlps.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/platform-config/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/platform-config/r0/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(ONL)/make/pkg.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/as4581-52pl/platform-config/r0/PKG.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!include $ONL_TEMPLATES/platform-config-platform.yml ARCH=arm64 VENDOR=accton BASENAME=arm64-accton-as4581-52pl REVISION=r0 |
47 changes: 47 additions & 0 deletions
47
...n/arm64/as45xx-52p/as4581-52pl/platform-config/r0/src/lib/arm64-accton-as4581-52pl-r0.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
|
||
###################################################################### | ||
# | ||
# platform-config for AS4581-52PL | ||
# | ||
###################################################################### | ||
|
||
arm64-accton-as4581-52pl-r0: | ||
flat_image_tree: | ||
kernel: | ||
<<: *arm64-kernel-5-15 | ||
dtb: | ||
=: accton-as4581-52pl.dtb | ||
<<: *arm64-kernel-5-15-package | ||
itb: | ||
<<: *arm64-itb | ||
|
||
loader: | ||
device: /dev/sda | ||
##partition: /dev/sda1 | ||
loadaddr: 0xa0000000 | ||
nos_bootcmds: | ||
- scsi reset | ||
- sf read 0x80d00000 0xd00000 0x100000 | ||
- fsl_mc lazyapply dpl 0x80d00000 | ||
- ext2load scsi 0:1 $onl_loadaddr $onl_itb | ||
- "bootm $onl_loadaddr#$onl_platform" | ||
|
||
setenv: | ||
- bootargs: >- | ||
console=ttyAMA0,115200 | ||
onl_platform=$onl_platform | ||
arm-smmu.disable_bypass=n | ||
maxcpus=8 | ||
pci=pcie_bus_perf | ||
|
||
environment: | ||
- device: /dev/mtd1 | ||
env_offset: 0x00000000 | ||
env_size: 0x00004000 | ||
sector_size: 0x00010000 | ||
|
||
network: | ||
interfaces: | ||
ma1: | ||
name: eth0 |
57 changes: 57 additions & 0 deletions
57
...5xx-52p/as4581-52pl/platform-config/r0/src/python/arm64_accton_as4581_52pl_r0/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/python | ||
|
||
from onl.platform.base import * | ||
from onl.platform.accton import * | ||
|
||
class OnlPlatform_arm64_accton_as4581_52pl_r0(OnlPlatformAccton, | ||
OnlPlatformPortConfig_48x1_4x10): | ||
PLATFORM='arm64-accton-as4581-52pl-r0' | ||
MODEL="AS4581-52PL" | ||
SYS_OBJECT_ID=".4581.52.1" | ||
|
||
def baseconfig(self): | ||
self.modprobe('i2c-imx') | ||
self.modprobe('i2c-mux-pca954x') | ||
self.insmod('optoe') | ||
self.insmod('dps850') | ||
|
||
# Insert platform drivers | ||
for m in [ 'mux', 'cpld', 'psu', 'asc' ]: | ||
self.insmod("arm64-accton-as45xx-52p-%s" % m) | ||
|
||
########### initialize I2C bus 1 ########### | ||
self.new_i2c_devices( | ||
[ | ||
# initialize CPLD | ||
('pca9641_mux', 0x73, 1), # i2c-8 | ||
('as45xx_cpldm_mux', 0x76, 1), # i2c-9 ~ i2c-14 | ||
('as4581_cpld_m', 0x61, 1), | ||
('as45xx_cpld_s', 0x62, 8), | ||
('as45xx_psu1', 0x50, 12), | ||
('dps850', 0x58, 12), | ||
('as45xx_psu2', 0x51, 11), | ||
('dps850', 0x59, 11), | ||
('pca9546', 0x71, 13), # i2c-15 ~ i2c-18 | ||
('pca9546', 0x70, 14), # i2c-19 ~ i2c-22 | ||
('tmp175', 0x48, 16), | ||
('tmp175', 0x49, 16), | ||
('tmp175', 0x4b, 16), | ||
('tmp175', 0x4c, 16), | ||
('24c64', 0x54, 15), | ||
|
||
# initialize ASC | ||
('pca9548', 0x70, 0), # i2c-23 ~ i2c-30 | ||
('as45xx_asc', 0x60, 26) | ||
] | ||
) | ||
|
||
# Insert platform drivers | ||
for m in [ 'fan', 'sfp' ]: | ||
self.insmod("arm64-accton-as45xx-52p-%s" % m) | ||
|
||
# initialize SFP devices | ||
for port in range(49, 53): | ||
self.new_i2c_device('optoe2', 0x50, port-30) | ||
subprocess.call('echo port%d > /sys/bus/i2c/devices/%d-0050/port_name' % (port, port-30), shell=True) | ||
|
||
return True |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/src/arm64_accton_as45xx_52p/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
arm64_accton_as45xx_52p.mk |
1 change: 1 addition & 0 deletions
1
packages/platforms/accton/arm64/as45xx-52p/src/arm64_accton_as45xx_52p/.module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
name: arm64_accton_as45xx_52p |
9 changes: 9 additions & 0 deletions
9
packages/platforms/accton/arm64/as45xx-52p/src/arm64_accton_as45xx_52p/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
############################################################ | ||
# | ||
# | ||
# | ||
############################################################ | ||
include $(ONL)/make/config.mk | ||
MODULE := arm64_accton_as45xx_52p | ||
AUTOMODULE := arm64_accton_as45xx_52p | ||
include $(BUILDER)/definemodule.mk |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need this? Does this device use an USB-LAN adapter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as4560 use this USB-LAN adapter