Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2003776rwp; Thu, 13 Jul 2023 22:06:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlGuelvBk115AVRLx1jjtgYZS+c7pdNo2eqDie5YSrSDktSnfBokUK//rxTc1wn/da6yzrHU X-Received: by 2002:a05:6808:2027:b0:3a3:6e43:e681 with SMTP id q39-20020a056808202700b003a36e43e681mr4828570oiw.58.1689311161452; Thu, 13 Jul 2023 22:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689311161; cv=none; d=google.com; s=arc-20160816; b=WaYfsXvxUC10fj7XBQ06WDrSwPnCgbKTpktZBnvAFHt12tKGcyf9DuNU6CrnH028Fn P8v66F/OKAq4pr7SCh41dSXIVBlLYTlAjsbFZB7KGsNU9TE50c1ex7r8IdP8CxOUEsKQ UjHLn6Vhwq0FdNKZvOS2COvevaOsdmiZeMXt3QBkW89MtZOjwaSNBEJDq59FBbVp45be l3UF0/TQweD9fOsTC5uq7G0aw80zdhT1g/epyU1Yzd+HmSYlNJDrwkfs1B84Pzsk5Rzr f3zynBxbmTA03LRDRZllj445bl2rkPfL+ZR01SFpPU2MlHOyqQLFjyeLf5Is0IwjV7dI OZWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=v+sWmtQ8vULtW+xeSqWfqGGCyk7WyDFlzUh+e1o0+yI=; fh=FQHwAm4e+sv62d0A9W0r/7x/vfsGSTHXfhuG4YjaNeY=; b=QMLUl3rLoXQG4ZkQHg/L5PH5S4x/o9iPNCNkzpnywnoesy8MHGAyGSWSDXT0tKij7M w1Sw471/O2HJu0HQmMTXA24rZ0pzqmaCj5XJp+MCcqOFT8gH9658Jxd8X5lfUt763Op3 d7Oo/q+VYaZY1BjxBaDqDDePpUlu0G4VE+bFAiUVk/KfDZ+SCm/D4RLmeVREh2CRYRTe n2McT/gEcZ5P2kYYN2Bl/lto2AVcwgxdyxY7GSd+eBopE2nZ+ivohqht6smu8xmqhKt5 HIQOcbKr6dxdE+CCJ7xrybWGqrWuaxgRFnUAf26fFvlcLhpjafGuKMhY3zLoZBVxP2mU dpXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=pqYNxa3S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m8-20020a633f08000000b0055c558ac4cfsi6296623pga.487.2023.07.13.22.05.49; Thu, 13 Jul 2023 22:06:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=pqYNxa3S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234954AbjGNEW4 (ORCPT + 99 others); Fri, 14 Jul 2023 00:22:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234994AbjGNEWu (ORCPT ); Fri, 14 Jul 2023 00:22:50 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 560AC2D53; Thu, 13 Jul 2023 21:22:46 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36E3XWN7024271; Fri, 14 Jul 2023 04:22:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=v+sWmtQ8vULtW+xeSqWfqGGCyk7WyDFlzUh+e1o0+yI=; b=pqYNxa3Sp/fXGtLaV20MU4kYG4bzTyFvTxNavq0Vs7FPxIXvwPjmS+MoQzCrWk9BC6OZ l97HLkDSUYOSNkOcQFQEdAfXM9hsUDRRsX2rFimBImpgbjY+NPdiI0L3dShPVSNMQWHn 10tjv8y9Uv38NpngdLoQ1H6qCV//d3CYRaqFSUvK5m5QIMEFAVA2Q2twgA0x6Sd7gjgh cALEuclZ62n0hgADb/uhkk6ObDCCNMbK0T+XR2zbjEc0m7yZHAOViAJASHP9VX91pgqQ 3MuRlsr1qDNZBtDAiw0FUpkZm8CszCCDE243RZndwyQB4nDKr4WhNOGzfrZviPKISlMu Kw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rtpub8t2e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jul 2023 04:22:43 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 36E4Mgg4029011 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Jul 2023 04:22:42 GMT Received: from hu-ptalari-hyd.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Thu, 13 Jul 2023 21:22:38 -0700 From: Praveen Talari To: , , , , , , CC: , , , , Praveen Talari Subject: [PATCH v7 1/2] soc: qcom: geni-se: Add SPI Device mode support for GENI based QuPv3 Date: Fri, 14 Jul 2023 09:52:02 +0530 Message-ID: <20230714042203.14251-2-quic_ptalari@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230714042203.14251-1-quic_ptalari@quicinc.com> References: <20230714042203.14251-1-quic_ptalari@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: IfLH1o0CUxis5See1RoKBijYYTNdOscp X-Proofpoint-GUID: IfLH1o0CUxis5See1RoKBijYYTNdOscp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-14_01,2023-07-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 priorityscore=1501 spamscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 suspectscore=0 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307140039 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add device mode supported registers and masks. Signed-off-by: Praveen Talari --- v6 -> v7: - corrected author mail v2 -> v3: - modified commit message to use device mode instead of slave mode v1 -> v2: - modified commit message --- include/linux/soc/qcom/geni-se.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/soc/qcom/geni-se.h b/include/linux/soc/qcom/geni-se.h index 821a19135bb6..29e06905bc1f 100644 --- a/include/linux/soc/qcom/geni-se.h +++ b/include/linux/soc/qcom/geni-se.h @@ -35,6 +35,7 @@ enum geni_se_protocol_type { GENI_SE_UART, GENI_SE_I2C, GENI_SE_I3C, + GENI_SE_SPI_SLAVE, }; struct geni_wrapper; @@ -73,12 +74,14 @@ struct geni_se { /* Common SE registers */ #define GENI_FORCE_DEFAULT_REG 0x20 +#define GENI_OUTPUT_CTRL 0x24 #define SE_GENI_STATUS 0x40 #define GENI_SER_M_CLK_CFG 0x48 #define GENI_SER_S_CLK_CFG 0x4c #define GENI_IF_DISABLE_RO 0x64 #define GENI_FW_REVISION_RO 0x68 #define SE_GENI_CLK_SEL 0x7c +#define SE_GENI_CFG_SEQ_START 0x84 #define SE_GENI_DMA_MODE_EN 0x258 #define SE_GENI_M_CMD0 0x600 #define SE_GENI_M_CMD_CTRL_REG 0x604 @@ -111,6 +114,9 @@ struct geni_se { /* GENI_FORCE_DEFAULT_REG fields */ #define FORCE_DEFAULT BIT(0) +/* GENI_OUTPUT_CTRL fields */ +#define GENI_IO_MUX_0_EN BIT(0) + /* GENI_STATUS fields */ #define M_GENI_CMD_ACTIVE BIT(0) #define S_GENI_CMD_ACTIVE BIT(12) @@ -130,6 +136,9 @@ struct geni_se { /* GENI_CLK_SEL fields */ #define CLK_SEL_MSK GENMASK(2, 0) +/* SE_GENI_CFG_SEQ_START fields */ +#define START_TRIGGER BIT(0) + /* SE_GENI_DMA_MODE_EN */ #define GENI_DMA_MODE_EN BIT(0) -- 2.17.1