Skip to content

Instantly share code, notes, and snippets.

@jpizarrom
Created November 17, 2015 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpizarrom/e636660ed4ae573f7ae5 to your computer and use it in GitHub Desktop.
Save jpizarrom/e636660ed4ae573f7ae5 to your computer and use it in GitHub Desktop.
/**************************************************************************************************
* Filename: RemoTI_RNP_SPI_BBB.cfg
* Revised: $Date: 2012-03-21 17:37:33 -0700 (Wed, 21 Mar 2012) $
* Revision: $Revision: 246 $
*
* Description: This file contains Linux platform specific RemoTI (RTI) RNP
* Hardware configuration. Modify this file to adapt to your
* own system. This file also choose what serial interface to
* use; I2C, SPI or UART
*
* Copyright (C) {2014} Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**************************************************************************************************/
/*
* RemoTI RNP HW Configuration File Syntax:
*
* [SectionName.SubSectionName]
* Key=value ; comment
*
* Valid Section Names:
* DEVICE
* Valid Keys:
* deviceKey (uart=0, spi=1, i2c=2, usb-cdc/acm=3) Device 3 can be used for any UART implementation where Reset is not controlled by GPIO
* devPath (path to device as string)
* GPIO_SRDY
* Valid Sub Sections
* GPIO, LEVEL_SHIFTER
* Valid Keys
* value (path to .value as string)
* direction (path to .direction as string)
* edge
* active_high_low (Active Low=0, Active High=1) -- Not used
* GPIO_MRDY
* Valid Sub Sections
* GPIO, LEVEL_SHIFTER
* Valid Keys
* value (path to .value as string)
* direction (path to .direction as string)
* GPIO_RESET
* Valid Sub Sections
* GPIO, LEVEL_SHIFTER
* Valid Keys
* value (path to .value as string)
* direction (path to .direction as string)
* SPI
* Valid Keys
* speed -- Baudrate in Hz. Used by hal_spi.c when configuring spidev
* mode -- Sets clock polarity and falling/rising edge detection. See spidev.h. Used by hal_spi.c when configuring spidev
* bitsPerWord -- Number of bits per transaction. Usually 8. Used by hal_spi.c when configuring spidev
* forceRunOnReset -- 0xFF disables feature. It is used by some ZigBee network processors to force run of Serial Bootloader after a reset. This would happen before potential MRDY/SRDY handshake, it also requires a GPIO to control Reset.
* MRDY_SRDY
* Valid Keys
* earlyMrdyAssert -- 1 is TRUE and 0 is FALSE. Should be set to TRUE when MRDY cannot reliably be set fast. De-asserting MRDY too late will trick RNP into assuming the host has more data to send
* detectResetFromSlowSrdyAssert -- SPI does not provide serial indication of reset, via RTI_ResetInd(). To deal with this we can detect reset by a slow SRDY response to MRDY. If a reset occurs it will take at least 150ms for SRDY to go low.
* srdyMrdyHandshakeSupport -- 1 is TRUE and 0 is FALSE. Some network processors does not use the MRDY/SRDY handshake.
* UART
* Valid Keys
* speed
* flowcontrol
* LOG
* Valid Keys
* log (path to store error and warning log)
*
* DEBUG
* Valid Keys
* supported
*
* GPIO_DD
* Valid Sub Sections
* GPIO, LEVEL_SHIFTER
* Valid Keys
* value (path to .value as string)
* direction (path to .direction as string)
* active_high_low (Active Low=0, Active High=1)
* GPIO_DC
* Valid Sub Sections
* GPIO, LEVEL_SHIFTER
* Valid Keys
* value (path to .value as string)
* direction (path to .direction as string)
*/
[PORT]
port=2533
[DEVICE]
deviceKey=0 ; UART
#deviceKey=1 ; SPI
#deviceKey=2 ; I2C
#deviceKey=3 ; USB-CDC or USB-ACM, or any other UART without support for GPIO control of Reset
devPath="/dev/ttyS4" ; UART
#devPath="/dev/ttyACM0" ; UART/CDC
#devPath="/dev/spidev2.0" ; SPI
#devPath="/dev/i2c-2" ; I2C
[GPIO_RESET.GPIO]
value="/sys/class/gpio/gpio26/value"
direction="/sys/class/gpio/gpio26/direction"
active_high_low=1 ; (Active Low=0, Active High=1)
[SPI]
speed=115200 ; Set default speed 2MHz
mode=0x03 ; Mode 0 for RNP, Mode 3 for ZNP (SPI_CPO | SPI_CPHA) = 0x03
bitsPerWord=8
forceRunOnReset=0x07 ; 0xFF for RNP, 0x07 for ZNP
[MRDY_SRDY]
earlyMrdyDeAssert=0 ; 1 (TRUE) for RNP, 0 for ZNP
detectResetFromSlowSrdyAssert=0 ; 1 (TRUE) for RNP, 0 for ZNP
srdyMrdyHandshakeSupport=0 ; 1 (TRUE) for RNP, 0 for ZNP
useFullDuplexAPI=1 ; Set to FALSE (0) if driver is ported to platform that doesn't support full duplex API
[UART]
speed=115200 ; Set baudrate to 115200
flowcontrol=1 ; 0 (FALSE) for RNP, 1 (TRUE) for ZNP
[LOG]
log="./NpiLnxLog.txt" ; file to log all event/error
[DEBUG]
supported=0 ; 1 = TRUE 0 or not existing = FALSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment