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 CTI Photon Xavier NX #76

Merged
15 commits merged into from
Jul 9, 2020
Merged
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
7 changes: 7 additions & 0 deletions layers/meta-balena-jetson/conf/machine/photon-xavier-nx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#@TYPE: Machine
#@NAME: CTI Photon Xavier NX
##@DESCRIPTION: CTI Photon Carrier Board for Nvidia Jetson Xavier NX
#

MACHINEOVERRIDES = "jetson-xavier-nx-devkit-emmc:${MACHINE}"
include conf/machine/jetson-xavier-nx-devkit-emmc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ SRC_URI = " \

FLASHXML = "resinOS-flash194_nxde.xml"
DTBNAME = "tegra194-p3668-all-p3509-0000"
DTBNAME_photon-xavier-nx = "tegra194-xavier-nx-cti-NGX003"
KERNEL_DEVICETREE = "${DEPLOY_DIR_IMAGE}/${DTBNAME}.dtb"
DTBFILE ?= "${@os.path.basename(d.getVar('KERNEL_DEVICETREE', True).split()[0])}"
LNXSIZE ?= "67108864"
Expand Down Expand Up @@ -256,6 +257,7 @@ do_configure() {
cp -r ${DTBNAME}-root*.dtb* ${DEPLOY_DIR_IMAGE}/bootfiles/
cp ${WORKDIR}/${FLASHXML} ${DEPLOY_DIR_IMAGE}/bootfiles/flash.xml
cp -r signed/* ${DEPLOY_DIR_IMAGE}/bootfiles/
cp tegra194-p3668-all-p3509-0000_sigheader.dtb.encrypt ${DEPLOY_DIR_IMAGE}/bootfiles/

dd if=/dev/zero count=1 bs=33554432 | tr "\000" "\377" > boot0.img
dd if=/dev/zero bs=2887 count=1 of=boot0.img conv=notrunc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ DTBFILE_jetson-nano = "tegra210-p3448-0000-p3449-0000-b00.dtb"
DTBFILE_jetson-nano-emmc = "tegra210-p3448-0002-p3449-0000-b00.dtb"
DTBFILE_jn30b-nano = "tegra210-p3448-0002-p3449-0000-b00-jn30b.dtb"
DTBFILE_photon-nano = "tegra210-nano-cti-NGX003.dtb"
DTBFILE_photon-xavier-nx = "tegra194-xavier-nx-cti-NGX003.dtb"

# Name update files as partition names for easier updating
RESIN_BOOT_PARTITION_FILES_jetson-nano = " \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 8ff350a9dbc99bbb9af6c4e908f9a1fb67dddb59 Mon Sep 17 00:00:00 2001
From: Pelle van Gils <[email protected]>
Date: Thu, 28 May 2020 18:19:25 +0000
Subject: [PATCH 1/2] cti photon: merge CDC MBIM driver changes from bsp

Merge CDC MBIM driver changes from CTI bsp xavier-nx-32.4.2 v001

Upstream-status: Backport
Signed-off-by: Pelle van Gils <[email protected]>
---
drivers/net/usb/cdc_mbim.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c
index 4c8baba72933..79904cecc725 100644
--- a/drivers/net/usb/cdc_mbim.c
+++ b/drivers/net/usb/cdc_mbim.c
@@ -633,6 +633,11 @@ static const struct usb_device_id mbim_devs[] = {
.driver_info = (unsigned long)&cdc_mbim_info,
},

+ /* 0x03F0, 0x4e1d */
+ { USB_DEVICE_AND_INTERFACE_INFO(0x03F0, 0x4e1d, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE),
+ .driver_info = (unsigned long)&cdc_mbim_info,
+ },
+
/* Some Huawei devices, ME906s-158 (12d1:15c1) and E3372
* (12d1:157d), are known to fail unless the NDP is placed
* after the IP packets. Applying the quirk to all Huawei
--
2.17.1

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ SRC_URI_append_photon-nano = " \
file://tegra210-nano-cti-NGX003.dtb \
"

SRC_URI_append_photon-xavier-nx = " \
file://0001-cti-photon-nano-merge-MMC-driver-changes-from-BSP.patch \
file://0001-cti-photon-merge-CDC-MBIM-driver-changes-from-bsp.patch \
file://tegra194-xavier-nx-cti-NGX003.dtb \
"

TEGRA_INITRAMFS_INITRD = "0"

RESIN_CONFIGS_append = " tegra-wdt-t21x debug_kmemleak "
Expand Down Expand Up @@ -167,10 +173,39 @@ RESIN_CONFIGS[gasket] = " \
RESIN_CONFIGS_append_srd3-tx2 = " tpg d3_hdr"

RESIN_CONFIGS_append_photon-nano = " tlc591xx"
RESIN_CONFIGS_append_photon-xavier-nx = " tlc591xx"
RESIN_CONFIGS[tlc591xx] = " \
CONFIG_LEDS_TLC591XX=m \
"

RESIN_CONFIGS_append_photon-xavier-nx = " cdc-wdm"
RESIN_CONFIGS[cdc-wdm] = " \
CONFIG_USB_WDM=m \
"

RESIN_CONFIGS_append_photon-xavier-nx = " sierra-net"
RESIN_CONFIGS[sierra-net] = " \
CONFIG_USB_SIERRA_NET=m \
"

RESIN_CONFIGS_DEPS[sierra-net] = " \
CONFIG_USB_USBNET=m \
"

RESIN_CONFIGS_append_photon-xavier-nx = " cdc-ncm"
RESIN_CONFIGS[cdc-ncm] = " \
CONFIG_USB_NET_CDC_NCM=m \
"

RESIN_CONFIGS_DEPS[cdc-ncm] = " \
CONFIG_USB_USBNET=m \
"

RESIN_CONFIGS_append_photon-xavier-nx = " mii"
RESIN_CONFIGS[mii] = " \
CONFIG_MII=m \
"

KERNEL_MODULE_AUTOLOAD_srd3-tx2 += " nvhost-vi-tpg "
KERNEL_MODULE_PROBECONF_srd3-tx2 += " nvhost-vi-tpg tegra-udrm"

Expand Down Expand Up @@ -253,6 +288,10 @@ do_deploy_append_photon-nano() {
cp ${WORKDIR}/tegra210-nano-cti-NGX003.dtb "${DEPLOYDIR}"
}

do_deploy_append_photon-xavier-nx() {
cp ${WORKDIR}/tegra194-xavier-nx-cti-NGX003.dtb "${DEPLOYDIR}"
}

do_deploy_append_astro-tx2() {
cp ${WORKDIR}/tegra186-tx2-cti-ASG001-revG+.dtb "${DEPLOYDIR}"
}
45 changes: 45 additions & 0 deletions photon-xavier-nx.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
deviceTypesCommon = require '@resin.io/device-types/common'
{ networkOptions, commonImg, instructions } = deviceTypesCommon

BOARD_PREPARE = 'Put the carrier board in recovery mode'
FLASH_TOOL = 'Unzip BalenaOS image and use the Jetson Flash tool to flash the board. Jetson Flash tool can be found at https://github.com/balena-os/jetson-flash'
DONE_FLASHING = 'After flashing is completed, please wait until the board is rebooted'
module.exports =
version: 1
slug: 'photon-xavier-nx'
aliases: [ 'photon-xavier-nx' ]
name: 'CTI Photon Xavier NX'
arch: 'aarch64'
state: 'new'
private: false

instructions: [
BOARD_PREPARE
FLASH_TOOL
DONE_FLASHING
]

gettingStartedLink:
windows: 'https://docs.resin.io/jetson-xavier-nx-devkit-emmc/nodejs/getting-started/#adding-your-first-device'
osx: 'https://docs.resin.io/jetson-xavier-nx-devkit-emmc/nodejs/getting-started/#adding-your-first-device'
linux: 'https://docs.resin.io/jetson-xavier-nx-devkit-emmc/nodejs/getting-started/#adding-your-first-device'

supportsBlink: false

yocto:
machine: 'photon-xavier-nx'
image: 'resin-image'
fstype: 'resinos-img'
version: 'yocto-warrior'
deployArtifact: 'resin-image-photon-xavier-nx.resinos-img'
compressed: true

options: [ networkOptions.group ]

configuration:
config:
partition:
primary: 9
path: '/config.json'

initialization: commonImg.initialization
12 changes: 12 additions & 0 deletions photon-xavier-nx.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.