Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2243658ybb; Mon, 30 Mar 2020 02:21:56 -0700 (PDT) X-Google-Smtp-Source: ADFU+vunfLKgLmX8HD9AFVjXwQsgU8xMbSuJ/R+nOmwD8vaP1DovkAsmO1mKKhx9OgmOzOQRoOVJ X-Received: by 2002:a05:6830:1e19:: with SMTP id s25mr253347otr.86.1585560116588; Mon, 30 Mar 2020 02:21:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585560116; cv=none; d=google.com; s=arc-20160816; b=PaO3a5fqpo6y+KvN4v94a3T5l9NfXFV9FT+YZ2NgHwk4f+79xqHKtE96/JB4eLYV/A UvXGUlTLw1MWF87hLdYd8tm6tZl3ayUfr6RLll6rXCVteaK9LVetKZ+3bkuHM3knFJ3y qNciXTNFAKESzWgoDcfdVe6u535KGRqgqNlUTTjfK8pxDsUymElGBREi3ffW9XE4xG45 M88CHismgh0vyCVRgevSJQ9phfVFdGPkacI/8hUc8DERaHQFYSg6L9gSieMV0HJFeIwC Q2KdjDMB0nQ4MgNhAGWBmkwB9yydkfPXsZBt/d3EDVqAlAYnh41QWnajTwVeqk1QjnXY NgTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=BDnCI6b6acG0T9BuR5lD6KHabVMwol0RzaAFhI2kJT4=; b=CzFjkk2dmPPCNVty/Ofd2sepSuPcd9CucTnW76g7tnkAn7ofgl/9MI5Eb1oH5tCOl8 DveLsR2YjfkhoQpaXdXIOhxT8thDnYgZgj0Awm7Thkb2E61xCr4Bjy3qnJq9wqNR1qMi Mx9J5xpuM3fcumpPQaMsFiJ89esliS1JNY76UQGjkXAjmDz/CceBfmf8ecmjGC3gxMTt qHDRYn/P9P/YfjCzwHE8fbYYpgIyBkXe4q0EsqmxWQ7W6hYbTHt8beCUCBovUueYm3ji +gfGpQJEoLfQ7WrdtiPgr/Kwx7+Zs3xXQsM4SKXsb2gpvIpFMnU3L8B9OIfjQY73LO4Q Rbbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=O80uZaTr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17si6058537oti.82.2020.03.30.02.21.43; Mon, 30 Mar 2020 02:21:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=O80uZaTr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728524AbgC3JUR (ORCPT + 99 others); Mon, 30 Mar 2020 05:20:17 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:23316 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727896AbgC3JUR (ORCPT ); Mon, 30 Mar 2020 05:20:17 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02U9IYdM014314; Mon, 30 Mar 2020 11:20:01 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=STMicroelectronics; bh=BDnCI6b6acG0T9BuR5lD6KHabVMwol0RzaAFhI2kJT4=; b=O80uZaTrRU+TKNGXXOn3OuaqH7qhsSISN7rM7SxjiNx5UpqOOxsD2WxxsHg7k4VSTZmI Gdc8/quoSj95b7b7LiDadZ+jAgcBfd3nIn/BHNEeDJqBQPae+I5qo1WZiLu5YbT3+Ahk VddpuR3XxuWnG9pVc/aaJeJzTeUpwJPVfU+OBr5KoNkGgkW1rN4T0o0pkhTHBeVXLY+g /5S8oJ38QulCzBiS7oGMOOQBYV/b6dfjV2YMeXQrGwsrc0hNUcf66VtMGS1PoOE0WaCX 1InMK+Fw12Lsd95xFVgpRXzS7h9y4mBfukwQHwyCG5AhE4Aqc4bl3pFndDzOFfLuAfbq vw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 302y53jtcp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Mar 2020 11:20:01 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D394F10002A; Mon, 30 Mar 2020 11:20:00 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag6node2.st.com [10.75.127.17]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BE52B2A6215; Mon, 30 Mar 2020 11:20:00 +0200 (CEST) Received: from [10.211.11.146] (10.75.127.46) by SFHDAG6NODE2.st.com (10.75.127.17) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 30 Mar 2020 11:19:57 +0200 Subject: Re: [03/12] bus: stm32-fmc2-ebi: add STM32 FMC2 EBI controller driver To: Marek Vasut , , , , , , , CC: , , References: <1584975532-8038-1-git-send-email-christophe.kerello@st.com> <1584975532-8038-4-git-send-email-christophe.kerello@st.com> From: Christophe Kerello Message-ID: <93fce520-9269-123c-9523-173e75cdce2e@st.com> Date: Mon, 30 Mar 2020 11:19:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG5NODE1.st.com (10.75.127.13) To SFHDAG6NODE2.st.com (10.75.127.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-30_01:2020-03-27,2020-03-30 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/30/20 3:24 AM, Marek Vasut wrote: > On 3/23/20 3:58 PM, Christophe Kerello wrote: >> The driver adds the support for the STMicroelectronics FMC2 EBI controller >> found on STM32MP SOCs. >> > > On DH STM32MP1 SoM in PDK2 carrier board, > Tested-by: Marek Vasut > > btw. it seems this sets BTRx DATLAT and CLKDIV to 0xf , it's "Don't > care" in the datasheet for Muxed mode, but then it should probably be > set to 0. Hi Marek, Thanks for testing. These 2 bit fields (BTRx DATLAT and CLKDIV) are only needed for synchronous transactions. Based on your bindings, the transaction type is asynchronous. CLKDIV bit fields should not be set to 0x0, as this value is reserved for this bit field. The driver keeps the reset value when it is not needed to update a bit field. Regards, Christophe Kerello. > > The bindings I used are below: > > &fmc { > pinctrl-names = "default", "sleep"; > pinctrl-0 = <&fmc_pins_b>; > pinctrl-1 = <&fmc_sleep_pins_b>; > status = "okay"; > #address-cells = <1>; > #size-cells = <1>; > /delete-property/interrupts; > /delete-property/dmas; > /delete-property/dma-names; > reg = <0x58002000 0x1000>; > ranges; > > ebi { > #address-cells = <2>; > #size-cells = <1>; > compatible = "st,stm32mp1-fmc2-ebi"; > ranges = <0 0 0x60000000 0x4000000>, > <1 0 0x64000000 0x4000000>, > <2 0 0x68000000 0x4000000>, > <3 0 0x6c000000 0x4000000>; > > ksz8851: ks8851mll@0,0 { > compatible = "micrel,ks8851-mll"; > reg = <1 0x0 0x2 1 0x2 0x20000>; > interrupt-parent = <&gpioc>; > interrupts = <3 IRQ_TYPE_LEVEL_LOW>; > bank-width = <2>; > > /* Timing values are in nS */ > st,fmc2_ebi_cs_mux_enable; > st,fmc2_ebi_cs_transaction_type = <4>; > st,fmc2_ebi_cs_buswidth = <16>; > st,fmc2_ebi_cs_address_setup = <6>; > st,fmc2_ebi_cs_address_hold = <6>; > st,fmc2_ebi_cs_data_setup = <127>; > st,fmc2_ebi_cs_bus_turnaround = <9>; > st,fmc2_ebi_cs_data_hold = <9>; > }; > > sram@3,0 { > compatible = "mtd-ram"; > reg = <3 0x0 0x80000>; > bank-width = <2>; > > /* Timing values are in nS */ > st,fmc2_ebi_cs_mux_enable; > st,fmc2_ebi_cs_transaction_type = <4>; > st,fmc2_ebi_cs_buswidth = <16>; > st,fmc2_ebi_cs_address_setup = <6>; > st,fmc2_ebi_cs_address_hold = <6>; > st,fmc2_ebi_cs_data_setup = <127>; > st,fmc2_ebi_cs_bus_turnaround = <9>; > st,fmc2_ebi_cs_data_hold = <9>; > }; > }; > }; >