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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45D44C433EF for ; Mon, 1 Nov 2021 23:28:05 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A9F260C40 for ; Mon, 1 Nov 2021 23:28:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9A9F260C40 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 31A308354D; Tue, 2 Nov 2021 00:28:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.b="gCPUu+f+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 18E638354D; Tue, 2 Nov 2021 00:28:00 +0100 (CET) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4FF988326F for ; Tue, 2 Nov 2021 00:27:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=roman.bacik@broadcom.com Received: by mail-lf1-x133.google.com with SMTP id p16so39371898lfa.2 for ; Mon, 01 Nov 2021 16:27:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=44LILdPcnMFP2Bm/XgsofilpyH51pPqmunrqNdoRtfc=; b=gCPUu+f+s4maVn6wE0jCHUSxUSKNPBfwO5M4XJ4+JD7FVXvHT1QsXITW1nPvp4tqZx 7ibht1+WDxlECa/nQKoGdQsMjT2A05NuTBvK2FhL9vvFzrH4XejZeW4MMPt+aPKp+6pn hvnPrhFlAKgmfDWgupVfhgRrCDfw2Zpn9WgWE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=44LILdPcnMFP2Bm/XgsofilpyH51pPqmunrqNdoRtfc=; b=Zm78ICUYfLYJ5EcUzXP8JwBDHQV0IpwWizAAzhck2dV6ck8yBmp+dk5r14s6H26JKC gl5WDqiHfE4Vo7NzNMJ9qsqQJfnvOwtwLaZZ/V5Bv99d2lKrxQJOqMQAfJ26JSDBdkx2 SoOgFqmOaoja3E6VhcQqKTNJmGr+EzzM1wheTkorFO8IpDTQXfCgV0fuH0M5XYe55UX+ 3K4pq4xLrDA1o9LyKOls/utwkjceR5rstjQzBuCj4+e26kSDqc4540oXwluRckkFBurZ cdM+2dRdNaOl4SI2CCs/ZPDOFEX+X0VW8ie2go26J3dwz5mniyQPC3wzQIgdbJReWYof +nxg== X-Gm-Message-State: AOAM532fQu7c2Ve3Nc0LsZmcVrleWnGUJGXQyt2H0MoGHl8ZvQNlmEXj y8BfvNQcTgwQS2V+u2OkSmP3N21HIT26NFYcZCwyNKT32Mjm2Kqquhne0h2pqO+gL6fkM4J7OFz 3VNB4sK1QAOgAUd0ggfHa X-Google-Smtp-Source: ABdhPJyToicb4YR/UF+5mTpkdhhNIl4rq3eerrBIMd+HOxywjwKGFF8eNX4Sg/bENrZSw51sJhKb+dRjA0LnoG2pBgM= X-Received: by 2002:a19:4851:: with SMTP id v78mr30142390lfa.690.1635809275390; Mon, 01 Nov 2021 16:27:55 -0700 (PDT) MIME-Version: 1.0 References: <20211025123639.v4.1.Ibcd6b4db038dac555a5071d1406a0c2f757c9570@changeid> In-Reply-To: From: Roman Bacik Date: Mon, 1 Nov 2021 16:27:19 -0700 Message-ID: Subject: Re: [PATCH v4] driver: spi: add bcm iproc qspi support. To: Jagan Teki Cc: U-Boot Mailing List , Rayagonda Kokatanur , Bharat Gooty , Vignesh R Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Jagan, On Mon, Nov 1, 2021 at 12:12 AM Jagan Teki wrote: > > On Tue, Oct 26, 2021 at 1:07 AM Roman Bacik wrote: > > > > From: Rayagonda Kokatanur > > > > IPROC qspi driver supports both BSPI and MSPI modes. > > > > Signed-off-by: Rayagonda Kokatanur > > Signed-off-by: Bharat Gooty > > Acked-by: Rayagonda Kokatanur > > > > Signed-off-by: Roman Bacik > > --- > > > > Changes in v4: > > - move iproc_qspi.c from spi to mtd/spi > > - remove iproc_qspi.h > > - rename IPROC_QSPI to SPI_FLASH_IPROC > > > > Changes in v3: > > - fix warning by including linux/delay.h > > - change ofdata_to_platdata to of_to_plat > > - change priv_auto_alloc_size to priv_auto > > > > Changes in v2: > > - remove include spi-nor.h > > - define and use named BITs for writing register values > > - remove bspi_set_4byte_mode() method > > > > drivers/mtd/spi/Kconfig | 6 + > > drivers/mtd/spi/Makefile | 1 + > > drivers/mtd/spi/iproc_qspi.c | 718 +++++++++++++++++++++++++++++++++++ > > 3 files changed, 725 insertions(+) > > create mode 100644 drivers/mtd/spi/iproc_qspi.c > > Look like you confused what I've mentioned before, your driver is > flash specific so add a driver in UCLASS_SPI_FLASH. drivers with > UCLASS_SPI to be in drivers/spi/ > > Jagan. This is a controller driver and it is currently meant to be used as follows: qspi: spi@370000 { compatible = "brcm,iproc-qspi"; reg = <0x00370000 0x100>, <0x00370100 0x100>, <0x00370200 0x200>; reg-names = "bspi", "bspi_raf", "mspi"; flash-iomap-addr = /bits/ 64 <0x70000000>; #address-cells = <1>; #size-cells = <0>; spi_nor_flash: spi_flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <12500000>; spi-cpol; spi-cpha; spi-tx-bus-width = <1>; spi-rx-bus-width = <4>; }; }; Can you please provide more details or point us to an example we can use as a reference when asking us to switch from UCLASS_SPI to UCLASS_SPI_FLASH? What will the new device tree look like? Do we need to add read/write/erase methods (likely around our existing xfer method), which are currently not needed or is there a way around it by reusing existing code base? Thanks, Roman -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.