From patchwork Wed Sep 27 16:25:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 145461 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2753800vqu; Wed, 27 Sep 2023 09:36:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/a9w/mNUUl4eggXUd1Q73Jyr5P+cUiMnVpukRsUf2gHFL2StVp2UGYrkmVbTL2VYcJSEG X-Received: by 2002:a0d:d456:0:b0:59f:61b6:f584 with SMTP id w83-20020a0dd456000000b0059f61b6f584mr2857793ywd.9.1695832609091; Wed, 27 Sep 2023 09:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695832609; cv=none; d=google.com; s=arc-20160816; b=I4qJzlaa8mvDoN6Ghyjy2D96XOSsX0rM/wdUP3070voPU8LkETYL3JHkNxb+4oMQib acEjguWuh/m49afBD72BAQ6y9fYTB41ea4X/cRcGdEBEQlQkikbmNT+yhvliPAs1GzrR YSbdsgsAl/n1cP18R5mHwL4/EEoksbnsrOnshC9S55hHTkMo3n6ERTzA0InX5/GCtbFo EnrIMZwu0FAdbnU/4Lwd+AHqlWW4mDK2kNlVPbpQ6n6gDt2XmbOaGk3Li43n0NQ1tLlr sztrvgJe+SE1gjCfHXmvgRK09wMe6XezofnjVj7Fwgu47X6KWZe6MIT6XpRoix3Ilzwk 7aBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LDCOC4NsY6mO1+zh4YaRAuvCeCZqeIQI86ED6pL+Lhw=; fh=RCG5UTJZL4x7EFXQRWT8toPnZJDmRxABMjXK1Kmzugw=; b=oyTgZ/aDv5flJyrKZ8ZC4HbHPaUsTI+b1pe8HOMZu4ABfhsPnou+4zkrAwDIsoExby Ahw0uuHdeRZycrgpC/SdKMRVAoH9+BufR3jovRIo7Tw6JDIZydmb3QC72FMJcuQMaGWQ K9Vk4BZe7NioHgT/T/cHJ3dHdoeOSYMpCfhz9POUAMSTsP9ACz05zpkULWTnNc8tXruc TI+fNG92ysfp1qAEayIyAnHD27+zY9QjKaPcDp+dKB491qsq5x8S+I4b6sWraP4rQt8M Ll7nYyFOB+9uiyCGsGxlX7l4SpAEOyUZ+0uZj2N8+pcsf3aiNCkB5xrtYUoWyKhyoRoa 5cXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id j70-20020a638049000000b005777535a67bsi16336977pgd.746.2023.09.27.09.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 09:36:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CFD0280A73E0; Wed, 27 Sep 2023 09:25:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231657AbjI0QZY (ORCPT + 19 others); Wed, 27 Sep 2023 12:25:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbjI0QZW (ORCPT ); Wed, 27 Sep 2023 12:25:22 -0400 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A474A91; Wed, 27 Sep 2023 09:25:20 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.03,181,1694703600"; d="scan'208";a="181181547" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 28 Sep 2023 01:25:20 +0900 Received: from mulinux.home (unknown [10.226.92.108]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id DD4FE401F564; Thu, 28 Sep 2023 01:25:15 +0900 (JST) From: Fabrizio Castro To: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven Cc: Fabrizio Castro , Magnus Damm , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Chris Paterson , Biju Das , Lad Prabhakar Subject: [PATCH v2 1/2] spi: renesas,rzv2m-csi: Add CSI (SPI) target related property Date: Wed, 27 Sep 2023 17:25:07 +0100 Message-Id: <20230927162508.328736-2-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230927162508.328736-1-fabrizio.castro.jz@renesas.com> References: <20230927162508.328736-1-fabrizio.castro.jz@renesas.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 27 Sep 2023 09:25:27 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778209373909587188 X-GMAIL-MSGID: 1778209373909587188 The CSI IP found inside the Renesas RZ/V2M SoC can also work in SPI target mode. When working in target mode, the IP will make use of the SS (Slave Selection) pin, with "low" as default active level. The active level of SS can be changed to "high" upon setting property "spi-cs-high" to true. By default, the SS will be used in target mode, unless property "renesas,csi-no-ss" is set to true, in which case data will be shifted in and out purely based on clock activity, and the logic level of the SS pin will be completely ignored. Signed-off-by: Fabrizio Castro Reviewed-by: Rob Herring --- v1->v2: I have dropped properties renesas,csi-ss and renesas,csi-ss-high. I have added property renesas,csi-no-ss, and to configure SS as active high one now needs to use property spi-cs-high. I have also reworded the changelog to use a more modern terminology (host and target as opposed to master and slave). .../devicetree/bindings/spi/renesas,rzv2m-csi.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/renesas,rzv2m-csi.yaml b/Documentation/devicetree/bindings/spi/renesas,rzv2m-csi.yaml index e59183e53690..bed829837df1 100644 --- a/Documentation/devicetree/bindings/spi/renesas,rzv2m-csi.yaml +++ b/Documentation/devicetree/bindings/spi/renesas,rzv2m-csi.yaml @@ -39,6 +39,12 @@ properties: power-domains: maxItems: 1 + renesas,csi-no-ss: + type: boolean + description: + The CSI Slave Selection (SS) pin won't be used to enable transmission and + reception. Only available when in target mode. + required: - compatible - reg @@ -50,6 +56,9 @@ required: - '#address-cells' - '#size-cells' +dependencies: + renesas,csi-no-ss: [ spi-slave ] + unevaluatedProperties: false examples: