1 1.1 jmcneill /* $NetBSD: tegra186-hsp.h,v 1.1.1.3 2019/05/25 11:29:13 jmcneill Exp $ */ 2 1.1 jmcneill 3 1.1.1.2 jmcneill /* SPDX-License-Identifier: GPL-2.0 */ 4 1.1 jmcneill /* 5 1.1 jmcneill * This header provides constants for binding nvidia,tegra186-hsp. 6 1.1 jmcneill */ 7 1.1 jmcneill 8 1.1 jmcneill #ifndef _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H 9 1.1 jmcneill #define _DT_BINDINGS_MAILBOX_TEGRA186_HSP_H 10 1.1 jmcneill 11 1.1 jmcneill /* 12 1.1 jmcneill * These define the type of mailbox that is to be used (doorbell, shared 13 1.1 jmcneill * mailbox, shared semaphore or arbitrated semaphore). 14 1.1 jmcneill */ 15 1.1 jmcneill #define TEGRA_HSP_MBOX_TYPE_DB 0x0 16 1.1 jmcneill #define TEGRA_HSP_MBOX_TYPE_SM 0x1 17 1.1 jmcneill #define TEGRA_HSP_MBOX_TYPE_SS 0x2 18 1.1 jmcneill #define TEGRA_HSP_MBOX_TYPE_AS 0x3 19 1.1 jmcneill 20 1.1 jmcneill /* 21 1.1 jmcneill * These defines represent the bit associated with the given master ID in the 22 1.1 jmcneill * doorbell registers. 23 1.1 jmcneill */ 24 1.1 jmcneill #define TEGRA_HSP_DB_MASTER_CCPLEX 17 25 1.1 jmcneill #define TEGRA_HSP_DB_MASTER_BPMP 19 26 1.1 jmcneill 27 1.1.1.3 jmcneill /* 28 1.1.1.3 jmcneill * Shared mailboxes are unidirectional, so the direction needs to be specified 29 1.1.1.3 jmcneill * in the device tree. 30 1.1.1.3 jmcneill */ 31 1.1.1.3 jmcneill #define TEGRA_HSP_SM_MASK 0x00ffffff 32 1.1.1.3 jmcneill #define TEGRA_HSP_SM_FLAG_RX (0 << 31) 33 1.1.1.3 jmcneill #define TEGRA_HSP_SM_FLAG_TX (1 << 31) 34 1.1.1.3 jmcneill 35 1.1.1.3 jmcneill #define TEGRA_HSP_SM_RX(x) (TEGRA_HSP_SM_FLAG_RX | ((x) & TEGRA_HSP_SM_MASK)) 36 1.1.1.3 jmcneill #define TEGRA_HSP_SM_TX(x) (TEGRA_HSP_SM_FLAG_TX | ((x) & TEGRA_HSP_SM_MASK)) 37 1.1.1.3 jmcneill 38 1.1 jmcneill #endif 39