From patchwork Mon May 3 21:42:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takahiro Kuwano X-Patchwork-Id: 1473436 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Tw5jLI6V; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FYxQQ4b9Sz9sSs for ; Tue, 4 May 2021 07:47:10 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5281E82CB2; Mon, 3 May 2021 23:45:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Tw5jLI6V"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9725182B95; Mon, 3 May 2021 23:44:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (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 A80AA82B70 for ; Mon, 3 May 2021 23:44:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tkuw584924@gmail.com Received: by mail-pl1-x62b.google.com with SMTP id y2so3630876plr.5 for ; Mon, 03 May 2021 14:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y5NwHBomXnLv6/NQqRAVEo/cPIzcX9AzOblqWzIcDnw=; b=Tw5jLI6VaihDIughTOxsuG8obXdj911KrkPX05NsMQgY9oU9xVkEKlpqTSRq3hDja6 jtBr1jq/YWG979+NKddQYVmUyM0Qe6+8MncaypFq2KG7z2bdvW18QrTW1rTz7FsQAvZX dnhNkU4LDsLHVeFHcQJ+D21COLncYZfJmPmZpo6MrgyqWXOzMDikgS1GZ4ZxcAczYvpr kR6vJz+eSdukUeQS6sXtXpjHj41iiJdicegCBiGRunlzFI+orHUNkibXGuroaRG96HeM U4Y27Yl3jc6svMEQIN+h7kYvC5tiqwD5Ca/Oqkv+nU5XGu/G/Daomu4lf/Y+Mf7mLtte nr6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Y5NwHBomXnLv6/NQqRAVEo/cPIzcX9AzOblqWzIcDnw=; b=j3xL9bWNjVDtvYvIkcW/LiJg2i8defEzOKgdtt2noEHIYIuhCqkJj4XieQHsZ9qAYD jkRT3BdXI6HovTsSmgQC2Iw3mDPdFqIVqRF0z6Vvqhsuo5fxnHEIkwl3GawzWWbs4h+O y1XNWzO3DjHS+IqGWO05fKHI/44V/uy26NEzH3T8aS3gtbY67Ne11VkAlrFiw9iUfjT0 p8m1tV7j+UZSueBkbe5zYZ7bZRIjKHBR8FIgAQlGBBNijjvAfomih3cNcZ6gmRPsm7Vs myJ12rk9a8wkC/82CgIb2GV5/hn58u9TdoHsDcpnzCfqa1ZSff2EHJyaksrJm8/khAo9 5ntA== X-Gm-Message-State: AOAM530V/CXkJTTT5iijwn24LJGdpJaFMwaSE5b3UL46h+LlOkiXRe56 bbAXOkF73+HpfyD1x/mFKx2B9v0jfBc= X-Google-Smtp-Source: ABdhPJz9aOR/s8Q8YIa9W0pQRCbWHsomnRjYKd682aNKCHrv0pMxaq7+7GW5H4WdZkXqVQo7Y96PrA== X-Received: by 2002:a17:902:e5cb:b029:ed:7f74:f3a1 with SMTP id u11-20020a170902e5cbb02900ed7f74f3a1mr22052350plf.45.1620078286077; Mon, 03 May 2021 14:44:46 -0700 (PDT) Received: from ISCNPF1JZGWX.infineon.com (zz20174137476F6254EB.userreverse.dion.ne.jp. [111.98.84.235]) by smtp.gmail.com with ESMTPSA id y1sm624867pgl.88.2021.05.03.14.44.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:44:45 -0700 (PDT) From: tkuw584924@gmail.com X-Google-Original-From: Takahiro.Kuwano@infineon.com To: u-boot@lists.denx.de Cc: jagan@amarulasolutions.com, vigneshr@ti.com, p.yadav@ti.com, tkuw584924@gmail.com, Bacem.Daassi@infineon.com, Takahiro Kuwano Subject: [PATCH v8 15/15] mtd: spi-nor-tiny: Add fixups for Cypress s25hl-t/s25hs-t Date: Tue, 4 May 2021 06:42:38 +0900 Message-Id: <4dc437299f55413dc7200c48bae5c648b5adfacd.1620076245.git.Takahiro.Kuwano@infineon.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 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.102.4 at phobos.denx.de X-Virus-Status: Clean From: Takahiro Kuwano Fixes mode clocks for SPINOR_OP_READ_FAST_4B in tiny. Signed-off-by: Takahiro Kuwano --- Changes in v8: - No change Changes in v7: - No change Changes in v6: - Remove spansion_quad_enable_volatile() per comment in https://patchwork.ozlabs.org/project/uboot/patch/a5c3cf1353d9a621379e2fcfefc51fb44c9680c5.1611729896.git.Takahiro.Kuwano@infineon.com/ Changes in v5: - Add a comment about Flash models and respective IDs drivers/mtd/spi/spi-nor-tiny.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c index 5cc2b7d996..aa2df75c60 100644 --- a/drivers/mtd/spi/spi-nor-tiny.c +++ b/drivers/mtd/spi/spi-nor-tiny.c @@ -583,6 +583,12 @@ static int spi_nor_init_params(struct spi_nor *nor, spi_nor_set_read_settings(¶ms->reads[SNOR_CMD_READ_FAST], 0, 8, SPINOR_OP_READ_FAST, SNOR_PROTO_1_1_1); +#ifdef CONFIG_SPI_FLASH_SPANSION + if (JEDEC_MFR(info) == SNOR_MFR_CYPRESS && + (info->id[1] == 0x2a || info->id[1] == 0x2b)) + /* 0x2a: S25HL (QSPI, 3.3V), 0x2b: S25HS (QSPI, 1.8V) */ + params->reads[SNOR_CMD_READ_FAST].num_mode_clocks = 8; +#endif } if (info->flags & SPI_NOR_QUAD_READ) {