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=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 D5945C433DB for ; Tue, 9 Feb 2021 19:36:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 97CFE64E08 for ; Tue, 9 Feb 2021 19:36:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233654AbhBITfy (ORCPT ); Tue, 9 Feb 2021 14:35:54 -0500 Received: from mga07.intel.com ([134.134.136.100]:63377 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233522AbhBITZy (ORCPT ); Tue, 9 Feb 2021 14:25:54 -0500 IronPort-SDR: aqZlTnDLpYP24DoIeTBbkkXA7/RCK0UwTkNZYLKOtUa3QLI09GbbcCw46x+2UlwedMvbcDpS9C R6W21kvdGymg== X-IronPort-AV: E=McAfee;i="6000,8403,9890"; a="246010853" X-IronPort-AV: E=Sophos;i="5.81,166,1610438400"; d="scan'208";a="246010853" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 11:17:31 -0800 IronPort-SDR: MxO/TaNgsO9MJwQeVuSDeZorgw79f/mE+ATgYIh8UIY00h59Mhp7oCFKPPRQQErfUUviuKCn6m NrxcRfEOV2Jg== X-IronPort-AV: E=Sophos;i="5.81,166,1610438400"; d="scan'208";a="375068802" Received: from yoojae-mobl.amr.corp.intel.com (HELO [10.209.39.4]) ([10.209.39.4]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 11:17:30 -0800 Subject: Re: [PATCH v2 1/4] dt-bindings: i2c: aspeed: add buffer and DMA mode transfer support To: Joel Stanley Cc: Rob Herring , Brendan Higgins , Wolfram Sang , Benjamin Herrenschmidt , Mark Rutland , Andrew Jeffery , Tao Ren , Cedric Le Goater , linux-i2c@vger.kernel.org, devicetree , linux-aspeed , OpenBMC Maillist References: <20210112003749.10565-1-jae.hyun.yoo@linux.intel.com> <20210112003749.10565-2-jae.hyun.yoo@linux.intel.com> <20210114193416.GA3432711@robh.at.kernel.org> <4f67358e-58e5-65a5-3680-1cd8e9851faa@linux.intel.com> <1814b8d1-954c-0988-0745-e95129079708@linux.intel.com> <87ed4085-26e4-98f8-21e3-b1e3c16b0891@linux.intel.com> From: Jae Hyun Yoo Message-ID: <3cb75f5e-43d8-a06c-5149-e69823728325@linux.intel.com> Date: Tue, 9 Feb 2021 11:17:29 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 2/9/2021 4:10 AM, Joel Stanley wrote: > On Wed, 3 Feb 2021 at 23:03, Jae Hyun Yoo wrote: >> >> Hi Joel >> >> On 1/28/2021 11:36 AM, Jae Hyun Yoo wrote: >>> Hi Joel >>> >>> On 1/27/2021 4:06 PM, Joel Stanley wrote: >>>>>> All this information doesn't need to be in the binding. >>>>>> >>>>>> It's also an oddly structured dts file if this is what you are doing... >>>>> >>>>> I removed the default buffer mode settings that I added into >>>>> 'aspeed-g4.dtsi' and 'aspeed-g5.dtsi' in v1 to avoid touching of the >>>>> default transfer mode setting, but each bus should use its dedicated >>>>> SRAM buffer range for enabling buffer mode so I added this information >>>>> at here as overriding examples instead. I thought that binding document >>>>> is a right place for providing this information but looks like it's not. >>>>> Any recommended place for it? Is it good enough if I add it just into >>>>> the commit message? >>>> >>>> I agree with Rob, we don't need this described in the device tree >>>> (binding or dts). We know what the layout is for a given aspeed >>>> family, so the driver can have this information hard coded. >>>> >>>> (Correct me if I've misinterpted here Rob) >>>> >>> >>> Makes sense. Will add these settings into the driver module as hard >>> coded per each bus. >>> >> >> Realized that the SRAM buffer range setting should be added into device >> tree because each bus module should get the dedicated IO resource range. >> So I'm going to add it to dtsi default reg setting for each I2C bus >> and will remove this description in binding. Also, I'll add a mode >> setting property instead to keep the current setting as byte mode. > > I don't understand. What do you propose adding? > I'm going to add reg resource for the SRAM buffer per each bus like reg = <0x40 0x40>, <0x800 0x80>; into the aspeed-g*.dtsi but adding like this will not be a key for enabling buffer mode like this v2 does. Also, I'm going to remove the 'aspeed,dma-buf-size' in this patch series and I'll add fixed DMA length as a configuration per each SoC. Instead, I'm going to add a xfer mode property e.g. 'aspeed,i2c-xfer-mode' to select 'byte', 'buffer' or 'dma' modes. Thanks, Jae