Skip to content

Commit

Permalink
[Edgecore][as4560-52p][as4561-52p] Add new platform
Browse files Browse the repository at this point in the history
CPU:
[as4560-52p] Marvell 98DX3530 with integrated CPU
[as4561-52p] COMe CPU Module

MAC: Marvell 98DX3530
PHY: Marvell 88E1780 x 4 (1G port 16~32)
     Marvell 88E2780 x 2 (Migi-G port 33-48)
DRAM: 8GB(MAC) DDR4 SDRAM
AirFlow: Front To Back
Function port: 1 x USB port
	   1 x RJ45 Mgmt port
	   1 x RJ45 Console port
Ethernet Port: 48 x 1G
Uplink port: 4xSFP+
PoE: Microsemi PD69208M x 12 + PD69210 x 2

DTS:
The DTS for as4560-52p/as4561-52p
dentproject/linux#12
dentproject/linux#11

Signed-off-by: Brandon Chuang <[email protected]>
  • Loading branch information
brandonchuang committed Feb 21, 2024
1 parent fdb2eef commit 8fb0d1d
Show file tree
Hide file tree
Showing 72 changed files with 7,378 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ K_PATCH_SERIES=series.arm64

include ../../kconfig.mk
K_CONFIG := arm64-all.config
K_BUILD_TARGET := Image Image.gz freescale/fsl-ls1043a-rdb.dtb freescale/fsl-ls1046a-rdb-sdk.dtb freescale/fsl-ls2080a-rdb.dtb freescale/fsl-ls2088a-rdb.dtb freescale/fsl-ls1088a-rdb.dtb marvell/accton-as4224.dtb marvell/accton-as5114.dtb marvell/accton-as4564-26p.dtb marvell/delta-tn48m.dtb marvell/delta-tn4810m.dtb marvell/delta-tn48m-dn.dtb marvell/delta-tn4810m-dn.dtb marvell/delta-tn48m2-swdev.dtb
K_BUILD_TARGET := Image Image.gz freescale/fsl-ls1043a-rdb.dtb freescale/fsl-ls1046a-rdb-sdk.dtb freescale/fsl-ls2080a-rdb.dtb freescale/fsl-ls2088a-rdb.dtb freescale/fsl-ls1088a-rdb.dtb marvell/accton-as4224.dtb marvell/accton-as5114.dtb marvell/accton-as4564-26p.dtb marvell/accton-as4560-52p.dtb marvell/delta-tn48m.dtb marvell/delta-tn4810m.dtb marvell/delta-tn48m-dn.dtb marvell/delta-tn4810m-dn.dtb marvell/delta-tn48m2-swdev.dtb freescale/accton-as4561-52p5.dtb
K_COPY_SRC := arch/arm64/boot/Image
K_COPY_GZIP := 1
ifndef K_COPY_DST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2597,7 +2597,7 @@ CONFIG_USB_NET_DRIVERS=y
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_RTL8152 is not set
# CONFIG_USB_LAN78XX is not set
CONFIG_USB_LAN78XX=y
CONFIG_USB_USBNET=y
CONFIG_USB_NET_AX8817X=y
CONFIG_USB_NET_AX88179_178A=y
Expand Down Expand Up @@ -4285,6 +4285,7 @@ CONFIG_DUMMY_CONSOLE=y
CONFIG_DUMMY_CONSOLE_COLUMNS=80
CONFIG_DUMMY_CONSOLE_ROWS=25
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set
Expand Down Expand Up @@ -5985,6 +5986,10 @@ CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
CONFIG_FSL_ERRATUM_A008585=y
CONFIG_HISILICON_ERRATUM_161010101=y
# CONFIG_ARM64_ERRATUM_2441009 is not set
# CONFIG_ARM64_ERRATUM_1742098 is not set
# CONFIG_ARM64_ERRATUM_2441007 is not set
# CONFIG_ARM64_ERRATUM_2457168 is not set
CONFIG_ARM64_ERRATUM_858921=y
CONFIG_SUN50I_ERRATUM_UNKNOWN1=y
CONFIG_ARM_TIMER_SP804=y
Expand Down
2 changes: 1 addition & 1 deletion packages/base/any/kernels/5.15-lts/kconfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*arm64*accton*as4560*52p.mk
onlpdump.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk
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-as4560-52p KERNELS="onl-kernel-5.15-lts-arm64-all:arm64"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib
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/as456x-52p/src/modules/
VENDOR := accton
BASENAME := arm64-accton-as4560-52p
ARCH := arm64
include $(ONL)/make/kmodule.mk
export CROSS_COMPILE=aarch64-linux-gnu-
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!include $ONL_TEMPLATES/onlp-platform-any.yml PLATFORM=arm64-accton-as4560-52p ARCH=arm64 TOOLCHAIN=aarch64-linux-gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FILTER=src
include $(ONL)/make/subdirs.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PLATFORM := arm64-accton-as4560-52p
PLATFORM_MODULE := arm64_accton_as456x_52p
include $(ONL)/packages/base/any/onlp/builds/platform/libonlp-platform.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PLATFORM := arm64-accton-as4560-52p
PLATFORM_MODULE := arm64_accton_as456x_52p
include $(ONL)/packages/base/any/onlp/builds/platform/onlps.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk
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-as4560-52p REVISION=r0
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---

######################################################################
#
# platform-config for AS4560-52P
#
######################################################################

arm64-accton-as4560-52p-r0:
flat_image_tree:
kernel:
<<: *arm64-kernel-5-15
dtb:
=: accton-as4560-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
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_as4560_52p_r0(OnlPlatformAccton,
OnlPlatformPortConfig_48x1_4x10):
PLATFORM='arm64-accton-as4560-52p-r0'
MODEL="AS4560-52P"
SYS_OBJECT_ID=".4560.52.1"

def baseconfig(self):
self.insmod('optoe')
self.insmod('dps850')

# Insert platform drivers
for m in [ 'mux', 'cpld', 'psu' ]:
self.insmod("arm64-accton-as456x-52p-%s" % m)

########### initialize I2C bus 1 ###########
self.new_i2c_devices(
[
# initialize CPLD
('pca9641_mux', 0x73, 0), # i2c-2
('as456x_cpldm_mux', 0x76, 0), # i2c-3 ~ i2c-8
('as4560_cpld_m', 0x42, 0),
('as456x_cpld_s', 0x62, 2),
('as456x_psu1', 0x50, 6),
('dps850', 0x58, 6),
('as456x_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-as456x-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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*arm64*accton*as4561*52p5.mk
onlpdump.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk
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-as4561-52p5 KERNELS="onl-kernel-5.15-lts-arm64-all:arm64"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib
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/as456x-52p/src/modules/
VENDOR := accton
BASENAME := arm64-accton-as4561-52p5
ARCH := arm64
include $(ONL)/make/kmodule.mk
export CROSS_COMPILE=aarch64-linux-gnu-
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!include $ONL_TEMPLATES/onlp-platform-any.yml PLATFORM=arm64-accton-as4561-52p5 ARCH=arm64 TOOLCHAIN=aarch64-linux-gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FILTER=src
include $(ONL)/make/subdirs.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PLATFORM := arm64-accton-as4561-52p5
PLATFORM_MODULE := arm64_accton_as456x_52p
include $(ONL)/packages/base/any/onlp/builds/platform/libonlp-platform.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PLATFORM := arm64-accton-as4561-52p5
PLATFORM_MODULE := arm64_accton_as456x_52p
include $(ONL)/packages/base/any/onlp/builds/platform/onlps.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(ONL)/make/pkg.mk
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-as4561-52p5 REVISION=r0
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---

######################################################################
#
# platform-config for AS4561-52P5
#
######################################################################

arm64-accton-as4561-52p5-r0:
flat_image_tree:
kernel:
<<: *arm64-kernel-5-15
dtb:
=: accton-as4561-52p5.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: eth1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/python

from onl.platform.base import *
from onl.platform.accton import *

class OnlPlatform_arm64_accton_as4561_52p5_r0(OnlPlatformAccton,
OnlPlatformPortConfig_48x1_4x10):
PLATFORM='arm64-accton-as4561-52p5-r0'
MODEL="AS4561-52P5"
SYS_OBJECT_ID=".4561.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' ]:
self.insmod("arm64-accton-as456x-52p-%s" % m)

########### initialize I2C bus 1 ###########
self.new_i2c_devices(
[
# initialize CPLD
('pca9641_mux', 0x73, 1), # i2c-8
('as456x_cpldm_mux', 0x76, 1), # i2c-9 ~ i2c-14
('as4561_cpld_m', 0x61, 1),
('as456x_cpld_s', 0x62, 8),
('as456x_psu1', 0x50, 12),
('dps850', 0x58, 12),
('as456x_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)
]
)

# Insert platform drivers
for m in [ 'fan', 'sfp' ]:
self.insmod("arm64-accton-as456x-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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
arm64_accton_as456x_52p.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name: arm64_accton_as456x_52p
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
############################################################
#
#
#
############################################################
include $(ONL)/make/config.mk
MODULE := arm64_accton_as456x_52p
AUTOMODULE := arm64_accton_as456x_52p
include $(BUILDER)/definemodule.mk
Loading

0 comments on commit 8fb0d1d

Please sign in to comment.