Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp861518rwb; Fri, 18 Nov 2022 09:11:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf7uZT6K0hA+eTYHPDlP2H+GMCtokxx63+elM5QENN+PUcQFNWkUtxjegns8lzTKc+VTOwF0 X-Received: by 2002:a17:906:ecfa:b0:78d:9723:d9c3 with SMTP id qt26-20020a170906ecfa00b0078d9723d9c3mr6689103ejb.316.1668791485976; Fri, 18 Nov 2022 09:11:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668791485; cv=none; d=google.com; s=arc-20160816; b=C4kxlvukhY1H9/7jJyBHfsCiU/SJRyu7huBchp5FUKr80xNyBPqVgYqmKfTRdb5xmy cfbSlnFJsrWIQjSe5Gox4LBduDr1QhIgdrXjDgG3NFSUvrU63UjcUONJkgfuvnMqZoe/ K089Gv1IWM/pmrjuRMNbBFQhFLeguULDAGAikliGpCTaB4LClGYuDgSs7IW2zHDaCH7m pqZiInBkPWSOWSW1utbGjky6mZGNBcK0MpEUnD+tGtijF8NilsCHGZLZtWThSytYI7+y s3OMMzKNu9RCUV5MVWWJKNJA2gT+Gp2xkhcnZ4Va54PHalLUusxLnodAZxi44SVxDFmr rm5g== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=/yXYNYz6XZfl/a6wSpBn32ffmOTgfl84iZ+3Pl0rfSQ=; b=b79sjQvj0Ed0hc/3xFT/pyzagr8YdqhYxbMnK5lATiMh2Ju1xXLZY3lPQ9Kwh7/ALS J2DPEAi/JS1PTcph+yPguGUc0U9dCVicHlFYjtFYokvZy3Y7KClmg9S6NqZmlRH656/A 6/exMgsQvY5PMURCCp2mk2F9t0buvzt9qpQpVZ1HcfQCsNoxjNX/OVD93nftTVGeKwO0 vJqFda3NaHSEAB+CehvXe+DSaimC9aebJJaMfk+AWwkexIt8zkrQC8p7q+K7hYhzhFyt Py/AuT3/WWUQjOHyomgP68gj3h5E5AJg23rbRfX0AONofi43cn3vvH+dJ/lHstfACKJX xuJw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b19-20020a170906039300b0078034101c0esi2963452eja.978.2022.11.18.09.11.03; Fri, 18 Nov 2022 09:11:25 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242130AbiKRQl0 (ORCPT + 90 others); Fri, 18 Nov 2022 11:41:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235285AbiKRQlY (ORCPT ); Fri, 18 Nov 2022 11:41:24 -0500 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CAC3A6204A; Fri, 18 Nov 2022 08:41:22 -0800 (PST) Received: from unknown (HELO iyokan2-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 19 Nov 2022 01:41:21 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by iyokan2-ex.css.socionext.com (Postfix) with ESMTP id 6D25E2058B4F; Sat, 19 Nov 2022 01:41:21 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Sat, 19 Nov 2022 01:41:21 +0900 Received: from [10.212.159.221] (unknown [10.212.159.221]) by kinkan2.css.socionext.com (Postfix) with ESMTP id AA8DFB62A4; Sat, 19 Nov 2022 01:41:20 +0900 (JST) Message-ID: <935b3413-7a6f-79c8-aa74-2dae2fec62a0@socionext.com> Date: Sat, 19 Nov 2022 01:41:20 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 1/2] dt-bindings: spi: Add Socionext F_OSPI controller bindings To: Mark Brown Cc: Rob Herring , Krzysztof Kozlowski , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221118005904.23557-1-hayashi.kunihiko@socionext.com> <20221118005904.23557-2-hayashi.kunihiko@socionext.com> <5483711f-504c-bcf3-0fbf-65d04530d188@socionext.com> Content-Language: en-US From: Kunihiko Hayashi In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 On 2022/11/19 0:36, Mark Brown wrote: > On Fri, Nov 18, 2022 at 11:16:22PM +0900, Kunihiko Hayashi wrote: >> On 2022/11/18 20:39, Mark Brown wrote: >>> On Fri, Nov 18, 2022 at 09:59:03AM +0900, Kunihiko Hayashi wrote: > >>>> + socionext,cs-start-cycle: >>>> + socionext,cs-end-cycle: >>>> + socionext,cs-deassert-clk-cycle: > >>> These are all generic SPI properties so we should add them >>> generically, on the device rather than the controller since this >>> is something that might vary per client device. There was also a >>> core function spi_set_cs_timing() which was in earlier versions >>> and is about to get reintroduced. > >> So I understand you mean that these properties should be defined like >> spi-peripheral-props.yaml for the devices. > >> If yes, I'll drop these properties once and define our vendor-specific >> "peripheral-props" in the next series. > > Yes, sounds good. Okay, I'll send simple one in v2. >>>> + $ref: /schemas/types.yaml#/definitions/uint32-array >>>> + items: >>>> + - description: the number of bytes to transfer >>>> + maximum: 4 >>>> + - description: value to transfer >>>> + default: 0 >>>> + - description: bit-width to transfer >>>> + enum: [0, 1, 2, 4, 8] > >>> This is also something SPI device should set up, as far as I can >>> tell this should be set vis spi_mem_op.dummy.nbytes. > >> Yes, but the controller also supports dummy cycles, and can send >> extra bytes before the dummy cycles. > > Ah, so this is some additional thing on top of dummy cycles? I'd > not realised that. It probably wants to be added into spi-mem I > guess. Yes, however, it's tough to handle with spi-mem and I don't have any use case, so drop it. >>>> + socionext,data-swap-2byte: >>>> + description: >>>> + Indicates swap byte order per 2-bytes. >>>> + type: boolean >>> >>>> + socionext,data-swap-4byte: >>>> + description: >>>> + Indicates swap byte order per 4-bytes. >>>> + type: boolean > >>> Again these should be set by the device. I think these should be >>> set based on a combination of bits per word and if the host is in >>> big endian or little endian mode. > >> I see. This feature is complicated to use, so I'll not add it here. > > That also works, someone can always add additional support later > when they have a concrete use case. I understand. Thank you, --- Best Regards Kunihiko Hayashi