Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3648335iog; Tue, 21 Jun 2022 03:07:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sjyCEIgjnU9EtqjgJp6DaddHenOKhNuOXPPYgJN6J089md4Bt2jggCiM6WgMic1Xr76+13 X-Received: by 2002:a17:907:da0:b0:722:c42e:25b9 with SMTP id go32-20020a1709070da000b00722c42e25b9mr8391262ejc.260.1655806041901; Tue, 21 Jun 2022 03:07:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655806041; cv=none; d=google.com; s=arc-20160816; b=RUK3KlchMO8yzoqevxot8R2kBOlES0FGhjeDLczqKBdONynAIi2Eay+2tnBJ44sXyF UGZfzMVY0/6i+KAIto4wio4fTC3/PqCf99EmeGH33AmXkT7Pe82o9n4kKhgdPcU2Zu+N 3037YFlB3ppxXlPj1lImx0WMEp5K5MNSgahccz7A0qf9/eCmD/gz/ZBHzCvKsm6wHbi1 d0ThPqIsDNmkSoOo//6ZUEbM8dfNLYeq5dWjUNBCfmlAI1eb8rJZw24lt+F4IrZ8Hfht zTHW/gHBXhDz3XUX18AvTG+5WFQUhJoNgw5pb9yAoVfxENSFa2L3CEY45IPJnE4PTiEk aY0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KVxqgQkmpuz9sfivRrmvLlkvyXCsZ/UVRlJX8Kn06s0=; b=fvGYKLIZ1m43pxIHwet8ZM6t14CtgwgQf8GNq8Pv1iyyT/RFM4x9qTCj66vQ3YD90a aNzv2HuKj5J64PbnhXyl/9uHRxuX7nhPHCdv7xXk++Mm3V9hw1BMQXbGfpQGLRzSDmzq heqzG+Eynvq6dP8sqlDI1cq71Gyne2oIw9hPilMOH13Wxgs4T0grdoERMRMYFGNISYWK cZ86c+MQNXk0H3gO4RlDIfRvGVzFRI5KyASa9xCFdTOQlbsSLrXcuo5+57pm4So85eTI ylwGZ/Na6YElWyZpULGrVu6lBpceZ+1W5xOVGtgaOlJMm74VTan1F+2wJpHvMUJ0c6E/ Ct7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=baOjPn3H; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf38-20020a1709077f2600b007108d0c71fasi18108519ejc.465.2022.06.21.03.06.55; Tue, 21 Jun 2022 03:07:21 -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=@gmail.com header.s=20210112 header.b=baOjPn3H; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347043AbiFUJcj (ORCPT + 99 others); Tue, 21 Jun 2022 05:32:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347196AbiFUJch (ORCPT ); Tue, 21 Jun 2022 05:32:37 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9ADA13CF4; Tue, 21 Jun 2022 02:32:36 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id i18so7717850lfu.8; Tue, 21 Jun 2022 02:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=KVxqgQkmpuz9sfivRrmvLlkvyXCsZ/UVRlJX8Kn06s0=; b=baOjPn3HMnQGhZj1nBS+hjUUnJUJ+Qaef24QVnmcEHRl7vEXdUjo5QRsBfEgNpCnf1 Jm2mGhGNtiWo638Mh2HKumHhvcYmxsqdqaKFiIY93JNSLRKOtYQlJpKBnZGURLayjob+ /MB/FkKHC8pVilIrHz6/2s03W4EKJQLZphbVT9pgnKGGgCYWlbAKxlSPmKCXeDMSOGEz k4bqKGBybgmOLqK4EsPHVpmL5fxyLVBFK/CNU2l5aGa83kOmEMKiC50ivmJ883ZTIT77 lTZMo0A50VvPHdVjC+D1Xe9WkvlxRXsvrK+2mvS5A9BpF2X8NlUaokkHL1Dw0Q1ZNI3b GQTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KVxqgQkmpuz9sfivRrmvLlkvyXCsZ/UVRlJX8Kn06s0=; b=iyH0w6OPzvVBnyZnQGbpZ7Tuh8DECJdVFN7Es7YD91Z9oTupcexeDf37P4iKjBr9Sg 8nS173bCxi6myK1+Ko9x/9BGXqWneRiSXakLy8lhqfBIg/sGXSmuysyJC1r+Y4kkxcSg Gftks8jiKT4/ehe9ZEUzUuhCJibe8dI7FbRGVFcvExrZEMOy/m+hHodNk3JTcAfA7uME KqHRWbr7H0VFh3lsHkuxT+xaLXLs7Nb9nebSGC9b8aQTN8LZ6C7kv2Mrmpi4uF+FfOGu 1RkSXYsney1rqt2VROu8PiVAib2O1iCPXq0ZzdbjvL7m6HwjjtLy3TaXfohqEdQTBHkk 4KwA== X-Gm-Message-State: AJIora8gm6cmnZu59UMvnJflMydpWp0HrcBPIDwt8bKO0Cezklq4PH8p x1bAWD5llBKaTL+wnC9oJGA= X-Received: by 2002:a05:6512:2808:b0:47f:51c4:1dea with SMTP id cf8-20020a056512280800b0047f51c41deamr12102421lfb.390.1655803954972; Tue, 21 Jun 2022 02:32:34 -0700 (PDT) Received: from mobilestation ([95.79.189.214]) by smtp.gmail.com with ESMTPSA id h21-20020a19ca55000000b00477a287438csm916926lfj.2.2022.06.21.02.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 02:32:34 -0700 (PDT) Date: Tue, 21 Jun 2022 12:32:31 +0300 From: Serge Semin To: Geert Uytterhoeven Cc: Conor Dooley , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Thierry Reding , Sam Ravnborg , Eugeniy Paltsev , Vinod Koul , Liam Girdwood , Mark Brown , Daniel Lezcano , Palmer Dabbelt , Palmer Dabbelt , Thomas Gleixner , Paul Walmsley , Albert Ou , Conor Dooley , Masahiro Yamada , Damien Le Moal , Niklas Cassel , Dillon Min , Heng Sia , Jose Abreu , DRI Development , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , dmaengine , ALSA Development Mailing List , linux-spi , linux-riscv Subject: Re: [PATCH 06/14] spi: dt-bindings: dw-apb-ssi: update spi-{r,t}x-bus-width for dwc-ssi Message-ID: <20220621093231.tytrh6fimzfxgzm2@mobilestation> References: <20220618123035.563070-1-mail@conchuod.ie> <20220618123035.563070-7-mail@conchuod.ie> <20220620205654.g7fyipwytbww5757@mobilestation> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Geert On Tue, Jun 21, 2022 at 09:03:25AM +0200, Geert Uytterhoeven wrote: > Hi Serge, > > On Mon, Jun 20, 2022 at 10:56 PM Serge Semin wrote: > > On Sat, Jun 18, 2022 at 01:30:28PM +0100, Conor Dooley wrote: > > > From: Conor Dooley > > > [...] > > > + > > > + 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 > > 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. > > > > 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. > > That doesn't matter here, as DT describes hardware, not software > limitations. Can't argue with that.) My note regarding the current DW APB SSI driver was mainly addressed for the Canaan K210 users, since should the SoC-based board really have the Quad Tx/Rx SPI bus most likely the interface won't work with the full bandwidth. So it is a good reason to perform the platform research and if possible alter the driver accordingly. -Sergey > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds