From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1D26C433DF for ; Tue, 14 Jul 2020 08:32:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B18A3221E7 for ; Tue, 14 Jul 2020 08:32:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I2SnL1bR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="jLvnmqXA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B18A3221E7 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:In-Reply-To:Subject:To: From:References:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XiDvThNiQapvZ73hqT99yG+zIODKJIXkYxv+tT5qYyg=; b=I2SnL1bRjfJIL2eSC8ZhVKlin MtW1RlCcBezVxoTH4BY0WLhG5QPIS/NfZGiOOizX+2dmSan4RvSkNm+kjP2LQxMNHAZyNjHZ54fk2 PK4+TZ6oGdU43IMYeWochDvD6byH2AvfEUVLN8l6w5POToQfWKz4CwPXDtlUPMkyCGGcrMXSlVTLE h9FmahB1Ab2Q4jV8yXSHktFKCtu/w2L2/rMMeizrARuc9zvWOIoae1P8f/mVcT/g4/camVSw6N6Lw lHSTlm730lJEp2MfU2o64xzb3AovFV+KzYr20A1YZTAyOCXABZXupDT/lH5yGdwfxo3bV9FOELs2+ sJVpgY+0A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvGL9-0004To-2D; Tue, 14 Jul 2020 08:31:03 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvGL3-0004T0-Od for linux-arm-kernel@lists.infradead.org; Tue, 14 Jul 2020 08:31:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1594715457; x=1626251457; h=references:from:to:cc:subject:in-reply-to:date: message-id:mime-version; bh=iwME0Emw2+J43pHMb9qYdnILvBRF1cOmxeCbkgwHHWI=; b=jLvnmqXATSTUgP761WDhA9O6rivwjDwUh36InHWiWXUrnQTVgwfoP+YV WA6xET6pJa/PnFn8rl/WIQBQ6zRpxaJB/7Q6/SQErPXYOvTXy43oy7L9M rTA26XiUKW10SsUvv7pgy16dw4SVeSzPo3RVYf4FcgGhfsqDm0hxBmaNh z0K84e2NP1z3Uyq8widYu2wW8Zuf5k6fwWvTgi+Lu4Vcx3nGr+3/RWPum emwttiMK0KWGPK1fXoCHwsWUpoIwmlId5Dsg/uLM/xmlSfasH9ABhg3Ib DXqRkNgrI5eCYx2KTHDcszD2qfOoHoMT9tnFCuWH2rzF60PvZFZQNFPXF w==; IronPort-SDR: rDCm3eZA3Wna9AO+bK/EoLvsiUHMNsKMDHn3nfTK+yrolAsyVlBnVSS1verBpraJXN83kMw8i8 R0nwofBCha3cvA79LOIo5b8kNGzwuiST9NpBr6An6U5v6hPEEMu6t448RPxcYtREMfCViZNZEB JF7Ed4bGIIR34VfHP/943RyhAj/6MQoJxxmThFf4p2CwZysnM8IXuBpNyhwWuzc8ODnKgh2bah pH8DdvW4lFzsp+rORr5YIX3twSt19kuTp7CulOfVd2V91QKNYPItKglCEf9q1UkDXb3K4gYi5S 23U= X-IronPort-AV: E=Sophos;i="5.75,350,1589266800"; d="scan'208";a="87503354" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Jul 2020 01:30:55 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 14 Jul 2020 01:30:54 -0700 Received: from soft-dev15.microsemi.net.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3 via Frontend Transport; Tue, 14 Jul 2020 01:30:52 -0700 References: <20200702101331.26375-1-lars.povlsen@microchip.com> <20200702101331.26375-6-lars.povlsen@microchip.com> <20200713192259.GA553903@bogus> <20200713195219.xfvqknioqw7yyr74@mobilestation> From: Lars Povlsen To: Serge Semin , Mark Brown Subject: Re: [PATCH v3 5/8] dt-bindings: snps, dw-apb-ssi: Add sparx5 support, plus snps, rx-sample-delay-ns property In-Reply-To: <20200713195219.xfvqknioqw7yyr74@mobilestation> Date: Tue, 14 Jul 2020 10:30:51 +0200 Message-ID: <87zh82jy6c.fsf@soft-dev15.microsemi.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200714_043057_943553_24E4E2EA X-CRM114-Status: GOOD ( 24.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Serge Semin , Microchip Linux Driver Support , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, Peter Rosin , Lars Povlsen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Serge Semin writes: > On Mon, Jul 13, 2020 at 01:22:59PM -0600, Rob Herring wrote: >> On Thu, Jul 02, 2020 at 12:13:28PM +0200, Lars Povlsen wrote: > ... >> >> > + >> > patternProperties: >> > "^.*@[0-9a-f]+$": >> > type: object >> > @@ -107,6 +122,14 @@ patternProperties: >> > spi-tx-bus-width: >> > const: 1 >> > >> > + snps,rx-sample-delay-ns: >> > >> We already have 'rx-sample-delay-ns' from Rockchip SPI, so use that. But >> note that it applies to the SPI node. Does this need to be per SPI >> child? > > It was me, who suggested to Lars to have that parameter moved to the SPI > sub-nodes. As I see it the property is highly dependent on the SPI slave device > the controller is communicating to. Some of the them may need the delay some > may not. It's not always the capacitance thing, but also depends on how good > the MISO signal a particular slave generates. So IMO the Rockchip SPI driver > developer should have moved that property to the sub-nodes too. > In the case with sparx5, having two bus interfaces, spi slaves may be on different busses - making it obvious why you may need different settings. But I guess even on the same bus the physical length of SPI connections and device response delay to each device could play in as well. Nevertheless, it *does* make sense to be able to specify per slave, but a default could make the DT more terse. Should I add this to my patch? I will remove the "snps," prefix now that the property is globally established. ---Lars > On the other hand if the Rx errors are caused by the MISO lane capacitance, > then it will be cumbersome to have the same property duplicated for each > sub-node. Then what about having the property supported by both the SPI > controller and the SPI-child nodes? For instance the SPI-controller > "rx-sample-delay-ns" will provide a default sample delay for each sub-node > instead of zero by default, while the individual sub-node "rx-sample-delay-ns" > property can be used to override the default value. > > -Sergey > >> >> BTW, the Rockchip controller appears to be a version of the DW >> controller. >> >> > + description: SPI Rx sample delay offset, unit is nanoseconds. >> > + The delay from the default sample time before the actual >> > + sample of the rxd input signal occurs. The "rx_sample_delay" >> > + is an optional feature of the designware controller, and the >> > + upper limit is also subject to controller configuration. >> > + $ref: /schemas/types.yaml#/definitions/uint32 >> > + >> > unevaluatedProperties: false >> > >> > required: >> > @@ -129,5 +152,10 @@ examples: >> > num-cs = <2>; >> > cs-gpios = <&gpio0 13 0>, >> > <&gpio0 14 0>; >> > + spi-flash@1 { >> > + compatible = "spi-nand"; >> > + reg = <1>; >> > + snps,rx-sample-delay-ns = <7>; >> > + }; >> > }; >> > ... >> > -- >> > 2.27.0 -- Lars Povlsen, Microchip _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel