Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3273470iog; Mon, 20 Jun 2022 15:53:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uXx7E0tBesMV1Mb/XKPOqhEzxgYtSdRXV9zQ0S2bkj1b5vrkHn6enlJst/jL1mokMPqr+v X-Received: by 2002:aa7:de1a:0:b0:435:7d11:9717 with SMTP id h26-20020aa7de1a000000b004357d119717mr11424145edv.148.1655765584992; Mon, 20 Jun 2022 15:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655765584; cv=none; d=google.com; s=arc-20160816; b=IHynYASdmsz597eJndXFA2KCpS9UzlZ4VEk6K0VjJHNgq0912aDdw3ZURxCLBGrYk8 L+53r6WlaysORE+mAHb4/9qkCDU+DVlFQlsSxfMBKcNNNk36irMeXoqfd2UaKhlWYM97 KY1cEKI4C0iMO/7q1398R8tA6KLRyF1oh2sgVcs1GvBmKeATu8fBK4L/QbKnPw22ytgX g00eLDxLUXZMQLmlbIxlxo6b2LngtzYP33j+Jv3oNCPBc0Yxy1R9Ny9tmZbXU5DmDcf9 GF/FspqoKhXlbYmcuuhxl+U9vVV5esjt6vys79zlMeG3iY1lFCsG2o0ZIvhaqGpW1GEA s7RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=hy0Xdesz3zE5Os2cbPhgUWle+TPKNOoLmrTtPiHUQEo=; b=zxwZfMF0Jp8vWeEH8Z3+m3k5J+KEd34K253VrJ0QLcvfYY8THyQ1acYVm3Ia3Xe58w 4RxPFYGfJhlX5PCuBsrPMlNA2J926eUAHnM0HARRD6xEql+eEd6J85QWpZMd6zLrWWkf CTE7xJxR87oHKhHzzg2r0Xvrch16D+kFkMvZuyUmBWDTAnfkh0LfgkF9UcjxllzQf1YS 3q+l5Gg2PH9Sh/2mVmUOcTTSM2Yzawccp0BJZPvoWnMoJc6fzbyy7qWuWrtIN1QbtZzR VByItrEETAgKXmh/iRNjBAWO99RRTakMp5FskIaRwQKQPeTcIXJ/p8HrjXU3LuJyYyWh ITlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@conchuod.ie header.s=google header.b=ZYwDRlfK; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=conchuod.ie Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go33-20020a1709070da100b006f3976ed175si14621497ejc.938.2022.06.20.15.52.40; Mon, 20 Jun 2022 15:53:04 -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=@conchuod.ie header.s=google header.b=ZYwDRlfK; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=conchuod.ie Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244924AbiFTWtJ (ORCPT + 99 others); Mon, 20 Jun 2022 18:49:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245713AbiFTWtI (ORCPT ); Mon, 20 Jun 2022 18:49:08 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FE581705F for ; Mon, 20 Jun 2022 15:49:06 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id m125-20020a1ca383000000b0039c63fe5f64so6367267wme.0 for ; Mon, 20 Jun 2022 15:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=hy0Xdesz3zE5Os2cbPhgUWle+TPKNOoLmrTtPiHUQEo=; b=ZYwDRlfKOOYKL+WIoMVmcZBHfH2hZEk5UjfT4f00kyzA1TsSsZ+LLvooOGasTgLcId /NSAyz9yGyNuvDaS+3NY3LrQJux2Kre3iqsxIzfjtaHz8yP2JPfiqTY0iIx54VZsLF75 Bzqxx5NujcXuLdNFG/rKZtgfRcfumIOzcQjIFXgkYjJoapiB7NEOxkt7XIo+thbkpsDZ AXPYAD+vnORi81F2kP1c7A3xKDez+YBlJvfQsHH8b+VCDdx2BVjR6HFF0zFQyv0Thecj nsZQUG8VQSsn6ub9nbGGdLWLOvXLQCQP14tjSUiP3G3d/xo+501S04egjJ0MAwRhGLpS 4+cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=hy0Xdesz3zE5Os2cbPhgUWle+TPKNOoLmrTtPiHUQEo=; b=j6iQexTonITVYBXxT+4XvIq5AteDDhMcSznskPbPUs7u0i9bC06k4oOOEt0HAqsDuE whpjgp4jI/LzqOYFICGUMxXDyl7bK+Nx6BqBaZgd8Pu/+rqjWdr8zJuWB7typd/kReqT F2fxo4Hzy301Ro3o8t+QqngFqQj1gHV3YzXf/0IWbqNGKfQ5SjZpxP1mIRBS1Ff5vuNN BtYyZ85QvEDjKSZWYMn1fAufmOlZs6zlan8NwwzfEmXbcsqCdWJpiuhk9DCAnwAHEtYa en6+dSk7imR9MF4WoEQlVyV+w0PjXOaffhQldKVfoau/EpVcoLDx1hL+AVOVxS2catcd ZF/A== X-Gm-Message-State: AJIora+aI2tpqWxD9og6/a/heDUqF7z/t6Ul35FBylcrqQlEf8RVg+cU dTtKN6YjEjNX30Ks0Bd4A3LvjA== X-Received: by 2002:a05:600c:4f51:b0:39c:7f6c:a8d6 with SMTP id m17-20020a05600c4f5100b0039c7f6ca8d6mr26961636wmq.143.1655765344601; Mon, 20 Jun 2022 15:49:04 -0700 (PDT) Received: from [192.168.2.222] ([51.37.234.167]) by smtp.gmail.com with ESMTPSA id g9-20020a5d6989000000b0020c5253d8dcsm14187651wru.40.2022.06.20.15.49.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jun 2022 15:49:03 -0700 (PDT) Message-ID: Date: Mon, 20 Jun 2022 23:49:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 06/14] spi: dt-bindings: dw-apb-ssi: update spi-{r,t}x-bus-width for dwc-ssi Content-Language: en-US To: Damien Le Moal , Conor.Dooley@microchip.com, fancer.lancer@gmail.com Cc: airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, thierry.reding@gmail.com, sam@ravnborg.org, Eugeniy.Paltsev@synopsys.com, vkoul@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, daniel.lezcano@linaro.org, palmer@dabbelt.com, palmer@rivosinc.com, tglx@linutronix.de, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, masahiroy@kernel.org, geert@linux-m68k.org, niklas.cassel@wdc.com, dillon.minfei@gmail.com, jee.heng.sia@intel.com, joabreu@synopsys.com, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, alsa-devel@alsa-project.org, linux-spi@vger.kernel.org, linux-riscv@lists.infradead.org References: <20220618123035.563070-1-mail@conchuod.ie> <20220618123035.563070-7-mail@conchuod.ie> <20220620205654.g7fyipwytbww5757@mobilestation> <61b0fb86-078d-0262-b142-df2984ce0f97@microchip.com> <9a1fcb40-9267-d8e6-b3b6-3b03fd789822@opensource.wdc.com> From: Conor Dooley In-Reply-To: <9a1fcb40-9267-d8e6-b3b6-3b03fd789822@opensource.wdc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 20/06/2022 23:46, Damien Le Moal wrote: > On 6/21/22 06:06, Conor.Dooley@microchip.com wrote: >> On 20/06/2022 21:56, Serge Semin wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>> >>> On Sat, Jun 18, 2022 at 01:30:28PM +0100, Conor Dooley wrote: >>>> From: Conor Dooley >>>> >>>> snps,dwc-ssi-1.01a has a single user - the Canaan k210, which uses a >>>> width of 4 for spi-{r,t}x-bus-width. Update the binding to reflect >>>> this. >>>> >>>> Signed-off-by: Conor Dooley >>>> --- >>>> .../bindings/spi/snps,dw-apb-ssi.yaml | 48 ++++++++++++++----- >>>> 1 file changed, 35 insertions(+), 13 deletions(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml >>>> index e25d44c218f2..f2b9e3f062cd 100644 >>>> --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml >>>> +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml >>>> @@ -135,19 +135,41 @@ properties: >>>> of the designware controller, and the upper limit is also subject to >>>> controller configuration. >>>> >>>> -patternProperties: >>>> - "^.*@[0-9a-f]+$": >>>> - type: object >>>> - properties: >>>> - reg: >>>> - minimum: 0 >>>> - maximum: 3 >>>> - >>>> - spi-rx-bus-width: >>>> - const: 1 >>>> - >>>> - spi-tx-bus-width: >>>> - const: 1 >>>> +if: >>>> + properties: >>>> + compatible: >>>> + contains: >>>> + const: snps,dwc-ssi-1.01a >>>> + >>>> +then: >>>> + patternProperties: >>>> + "^.*@[0-9a-f]+$": >>>> + type: object >>>> + properties: >>>> + reg: >>>> + minimum: 0 >>>> + maximum: 3 >>>> + >>>> + spi-rx-bus-width: >>>> + const: 4 >>>> + >>>> + spi-tx-bus-width: >>>> + const: 4 >>>> + >>>> +else: >>>> + patternProperties: >>>> + "^.*@[0-9a-f]+$": >>>> + type: object >>>> + properties: >>>> + reg: >>>> + minimum: 0 >>>> + maximum: 3 >>>> + >>>> + spi-rx-bus-width: >>>> + const: 1 >>>> + >>>> + spi-tx-bus-width: >>>> + const: 1 >>> >>> You can just use a more relaxed constraint "enum: [1 2 4 8]" here >> >> 8 too? sure. >> >>> irrespective from the compatible string. The modern DW APB SSI >>> controllers of v.4.* and newer also support the enhanced SPI Modes too >>> (Dual, Quad and Octal). Since the IP-core version is auto-detected at >>> run-time there is no way to create a DT-schema correctly constraining >>> the Rx/Tx SPI bus widths. So let's keep the >>> compatible-string-independent "patternProperties" here but just extend >>> the set of acceptable "spi-rx-bus-width" and "spi-tx-bus-width" >>> properties values. >> >> SGTM! >> >>> >>> Note the DW APB SSI/AHB SSI driver currently doesn't support the >>> enhanced SPI modes. So I am not sure whether the multi-lines Rx/Tx SPI >>> bus indeed works for Canaan K210 AHB SSI controller. AFAICS from the >>> DW APB SSI v4.01a manual the Enhanced SPI mode needs to be properly >>> activated by means of the corresponding CSR. So most likely the DW AHB >>> SSI controllers need some specific setups too. >> >> hmm, well I'll leave that up to people that have Canaan hardware! > > I will test this series. > Cool, thanks. I'll try to get a respin out tomorrow w/ the memory node "unfixed". Conor. >> Thanks, >> Conor. >> >>> >>> -Sergey >>> >>>> >>>> unevaluatedProperties: false >>>> >>>> -- >>>> 2.36.1 >>>> >> > >