Skip to content
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

Add support for Delta DDS64C8 #1057

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build-config/scripts/onie-build-targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
{ "Vendor": "delta", "Platform": "delta_ak7448", "BuildEnv": "Debian9", "Release": "2020.05br", "Architecture": "amd64", "Notes": "No notes." },
{ "Vendor": "delta", "Platform": "delta_common_bwde", "BuildEnv": "Debian9", "Release": "2020.05br", "Architecture": "amd64", "Notes": "No notes." },
{ "Vendor": "delta", "Platform": "delta_common_dnv", "BuildEnv": "Debian9", "Release": "2020.05br", "Architecture": "amd64", "Notes": "No notes." },
{ "Vendor": "delta", "Platform": "delta_dds64c8", "BuildEnv": "Debian10", "Release": "2024.02", "Architecture": "amd64", "Notes": "No notes." },
{ "Vendor": "delta", "Platform": "delta_et-6248brb", "BuildEnv": "Debian9", "Release": "2020.05br", "Architecture": "amd64", "Notes": "No notes." },
{ "Vendor": "delta", "Platform": "delta_tn48m", "BuildEnv": "Debian10", "Release": "2022.05br", "Architecture": "armv8a", "Notes": "DemoOS does not build." },
{ "Vendor": "delta", "Platform": "delta_tx4810", "BuildEnv": "Debian9", "Release": "2021.02br", "Architecture": "armv8a", "Notes": "No notes." },
Expand Down
86 changes: 86 additions & 0 deletions machine/delta/delta_dds64c8/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
================================================================================
Installing ONIE on DELTA Switch (CPU Module : Intel Ice Lake)
================================================================================

Cross-Compiling ONIE
====================

To compile ONIE first change directories to ``build-config`` and then
type ``"make MACHINEROOT=../machine/delta MACHINE=delta_dds64c8 all"``. For example::

$ cd build-config
$ make -j4 MACHINEROOT=../machine/delta MACHINE=delta_dds64c8 all

When complete, the ONIE binaries are located in
``build/images``::

-rw-r--r-- 1 lsharma ncore 3360400 May 28 15:29 delta_dds64c8-r0.vmlinuz
-rw-r--r-- 1 lsharma ncore 5504404 May 28 15:31 delta_dds64c8-r0.initrd
-rw-r--r-- 1 lsharma ncore 8910711 May 28 15:31 onie-updater-x86_64-delta_dds64c8-r0
-rw-r--r-- 1 lsharma ncore 20381696 May 28 15:32 onie-recovery-x86_64-delta_dds64c8-r0.iso

Cross-Compiling the DEMO OS
===========================

To compile the demo OS first change directories to ``build-config``
and then type ``"make MACHINEROOT=../machine/delta MACHINE=delta_dds64c8 demo"``. For example::

$ cd build-config
$ make -j4 MACHINEROOT=../machine/delta MACHINE=delta_dds64c8 demo

When complete, the demo OS installer is located in ``build/images``::

-rw-r--r-- 10486945 Mar 27 13:30 demo-installer-x86_64-delta_dds64c8-r0.bin

Installing ONIE on a Blank Machine
==================================

To install ONIE on a new machine use one of the onie-recovery images.

Overview
--------

An "ONIE recovery image" is used for:

1. installing ONIE on a blank machine, i.e. what manufacturing would
use.

2. recovering a destroyed ONIE system.

The recovery image is:

. <machine>.iso -- a hybrid ISO image.

ISO Recovery Image
------------------

You can use the .iso image to create a bootable USB memory stick.
Use ``dd`` to copy the .iso image to a USB stick and boot from that::

dd if=<machine>.iso of=/dev/sdX bs=10M

Find the correct ``/dev/sdX`` by inspecing the ``dmesg``
output after inserting the USB stick into your work station.

To enable booting from USB in the BIOS:

1. Insert the USB stick (needs to be in before configuring BIOS)

2. Power on the S6010 and enter the BIOS configuration

3. Set the USB device to "Hard Disk"::

Advanced-->USB Configuration-->Mass Storage Devices:
<Name of your device> [Hard Disk]

<Name of your device> might be something like "SanDisk 1.26".

4. Set the hard drive boot order::

Boot-->Hard Drive BBS Priorities-->Boot Option #1

In "Boot Option #1" select the device that corresponds to your
device.

5. Save and Exit the BIOS configuration

10 changes: 10 additions & 0 deletions machine/delta/delta_dds64c8/busybox/conf/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CONFIG_SYS_EEPROM=y
CONFIG_SYS_EEPROM_DEVICE_I2C=y
CONFIG_SYS_EEPROM_MAX_SIZE=2048
CONFIG_SYS_EEPROM_OFFSET=0
CONFIG_SYS_EEPROM_SIZE=2048
CONFIG_SYS_EEPROM_I2C_DEVICE="/dev/i2c-0"
CONFIG_SYS_EEPROM_I2C_ADDR=0x50
CONFIG_SYS_EEPROM_I2C_MEM_ADDR_BITS=8
CONFIG_SYS_EEPROM_I2C_WRITE_1B_DELAY=5000
CONFIG_SYS_EEPROM_I2C_WRITE_2B_DELAY=5000
Empty file.
1 change: 1 addition & 0 deletions machine/delta/delta_dds64c8/demo/platform.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# delta_dds64c8 specific info
25 changes: 25 additions & 0 deletions machine/delta/delta_dds64c8/installer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
description="delta_dds64c8"

# Default ONIE block device
install_device_platform()
{
ssd_path="/sys/devices/pci0000:00/0000:00:0e.0/ata6/host5/target5:0:0/5:0:0:0"
for d in /sys/block/* ; do
if [ -e "$d/device" ] ; then
path="$(realpath $d/device)"
if [ "$path" = "$ssd_path" ] ; then
device="/dev/$(basename $d)"
echo $device
return 0
fi
fi
done
echo "WARNING: ${onie_platform}: Unable to find internal ONIE install device"
echo "WARNING: expecting $ssd_path"
return 1
}

# Local Variables:
# mode: shell-script
# eval: (sh-set-shell "/bin/sh" t nil)
# End:
16 changes: 16 additions & 0 deletions machine/delta/delta_dds64c8/kernel/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
CONFIG_I2C_I801=y
# CONFIG_I2C_ISMT is not set
CONFIG_X86_X2APIC=y
# CONFIG_ACPI_IPMI is not set
CONFIG_IPMI_HANDLER=y
# CONFIG_IPMI_PANIC_EVENT is not set
CONFIG_IPMI_DMI_DECODE=y
CONFIG_IPMI_DEVICE_INTERFACE=y
CONFIG_IPMI_SI=y
CONFIG_IPMI_SSIF=y
CONFIG_IPMI_WATCHDOG=y
CONFIG_IPMI_POWEROFF=y
# CONFIG_SENSORS_IBMAEM is not set
# CONFIG_SENSORS_IBMPEX is not set
CONFIG_SERIAL_8250_RUNTIME_UARTS=4

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
old mode 100644
new mode 100755
index bc3d914d..60d27e2f
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -173,7 +173,7 @@ static int acpi_pci_link_get_possible(struct acpi_pci_link *link)
status = acpi_walk_resources(link->device->handle, METHOD_NAME__PRS,
acpi_pci_link_check_possible, link);
if (ACPI_FAILURE(status)) {
- ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS"));
+ acpi_handle_debug(link->device->handle, "failed to evaluate _PRS");
return -ENODEV;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
old mode 100644
new mode 100755
index e6fe21a6..17c34211
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -202,6 +202,7 @@

/* Older devices have their ID defined in <linux/pci_ids.h> */
#define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS 0x0f12
+#define PCI_DEVICE_ID_INTEL_CDF_SMBUS 0x18df
#define PCI_DEVICE_ID_INTEL_DNV_SMBUS 0x19df
#define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22
#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22
@@ -1012,6 +1013,7 @@ static const struct pci_device_id i801_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BRASWELL_SMBUS) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_SMBUS) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_SMBUS) },
+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CDF_SMBUS) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_DNV_SMBUS) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BROXTON_SMBUS) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LEWISBURG_SMBUS) },
@@ -1494,6 +1496,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
case PCI_DEVICE_ID_INTEL_LEWISBURG_SSKU_SMBUS:
case PCI_DEVICE_ID_INTEL_DNV_SMBUS:
case PCI_DEVICE_ID_INTEL_KABYLAKE_PCH_H_SMBUS:
+ case PCI_DEVICE_ID_INTEL_CDF_SMBUS:
priv->features |= FEATURE_I2C_BLOCK_READ;
priv->features |= FEATURE_IRQ;
priv->features |= FEATURE_SMBUS_PEC;
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/drivers/tty/serial/8250/8250_mid.c b/drivers/tty/serial/8250/8250_mid.c
old mode 100644
new mode 100755
index 39c23244..74901629
--- a/drivers/tty/serial/8250/8250_mid.c
+++ b/drivers/tty/serial/8250/8250_mid.c
@@ -23,6 +23,7 @@
#define PCI_DEVICE_ID_INTEL_PNW_UART2 0x081c
#define PCI_DEVICE_ID_INTEL_PNW_UART3 0x081d
#define PCI_DEVICE_ID_INTEL_TNG_UART 0x1191
+#define PCI_DEVICE_ID_INTEL_CDF_UART 0x18d8
#define PCI_DEVICE_ID_INTEL_DNV_UART 0x19d8

/* Intel MID Specific registers */
@@ -338,6 +339,7 @@ static const struct pci_device_id pci_ids[] = {
MID_DEVICE(PCI_DEVICE_ID_INTEL_PNW_UART2, pnw_board),
MID_DEVICE(PCI_DEVICE_ID_INTEL_PNW_UART3, pnw_board),
MID_DEVICE(PCI_DEVICE_ID_INTEL_TNG_UART, tng_board),
+ MID_DEVICE(PCI_DEVICE_ID_INTEL_CDF_UART, dnv_board),
MID_DEVICE(PCI_DEVICE_ID_INTEL_DNV_UART, dnv_board),
{ },
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h
old mode 100644
new mode 100755
index f353061b..6204e589
--- a/arch/x86/include/asm/perf_event.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -6,7 +6,7 @@
*/

#define INTEL_PMC_MAX_GENERIC 32
-#define INTEL_PMC_MAX_FIXED 3
+#define INTEL_PMC_MAX_FIXED 4
#define INTEL_PMC_IDX_FIXED 32

#define X86_PMC_IDX_MAX 64
5 changes: 5 additions & 0 deletions machine/delta/delta_dds64c8/kernel/series
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
driver-i2c-i801-support-intel-cdf.patch
include-perf-event-increase-intel-pmc-max-fixed.patch
driver-tty-serial-8250-support-intel-cdf.patch
driver-acpi-pci-link-remove-error-message.patch

50 changes: 50 additions & 0 deletions machine/delta/delta_dds64c8/machine.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Delta dds64c8

ARCH = x86_64
TARGET = $(ARCH)-onie-linux-uclibc
CROSSPREFIX = $(TARGET)-
CROSSBIN = $(XTOOLS_INSTALL_DIR)/$(TARGET)/bin
EFI_ARCH = x64

ONIE_ARCH ?= x86_64
SWITCH_ASIC_VENDOR = bcm

VENDOR_REV ?= 0

# Translate hardware revision to ONIE hardware revision
ifeq ($(VENDOR_REV),0)
MACHINE_REV = 0
else
$(warning Unknown VENDOR_REV '$(VENDOR_REV)' for MACHINE '$(MACHINE)')
$(error Unknown VENDOR_REV)
endif

# The VENDOR_VERSION string is appended to the overal ONIE version
# string. HW vendors can use this to appended their own versioning
# information to the base ONIE version string.
VENDOR_VERSION ?= -onie_version-delta_dds64c8-v9.9

# Vendor ID -- IANA Private Enterprise Number:
# http://www.iana.org/assignments/enterprise-numbers
# Open Compute Project IANA number
VENDOR_ID = 2254

# Enable the i2ctools and the onie-syseeprom command for this platform
I2CTOOLS_ENABLE = yes
IPMITOOL_ENABLE = yes

# Console parameters
CONSOLE_PORT = 0x5060
GRUB_SERIAL_COMMAND = "serial --port=0x5060 --speed=115200 --word=8 --parity=no --stop=1"

# Set Linux kernel version
LINUX_VERSION = 4.9
LINUX_MINOR_VERSION = 95

# Enable UEFI support by default
UEFI_ENABLE = yes
#-------------------------------------------------------------------------------
#
# Local Variables:
# mode: makefile-gmake
# End: