Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4998323imb; Thu, 7 Mar 2019 05:37:44 -0800 (PST) X-Google-Smtp-Source: APXvYqzVnYVx84U6gi1eCwmAUphrmjR9wNxqMwO3MqhTUF5Or7nFm4aFGdPxK6iWU4jh0nO3exZA X-Received: by 2002:aa7:9310:: with SMTP id 16mr12868870pfj.84.1551965864730; Thu, 07 Mar 2019 05:37:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551965864; cv=none; d=google.com; s=arc-20160816; b=tr+ZCKESkajFLuATBwGvUQfMsDlc7elej4vjLD8Cad9qA5z9wbc0zL/Y/kWi5pMsbo /wPnyuJb1N0joXI68VEnhkBTGgEy3FJH9yk7YMNo78A9++WxMWc5YJh6hVsXTl/h86vy aTUwfOwvpjP9ODX7aCHCl90EgNIOAleI6QRjabz5hAaHN/dvpyAFDxublw6GwLxPD+Oq rMWsLu+mfiTX66lYaEPtwBNHGFTYZd53SnkLkXSeWvN81cle7JWXsdHkBIIoLYW5fwUm IGgUJbZgAS9iix5J1S2SfX9mRgz8wpXRTxjre1vvFu6R1UOexVU6iJLHUoE3+SgkVj6L mAPA== 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; bh=4Yshxeu2EukO/7GoHA6xpeKTc/eSOyBLzKBl8+QcqeQ=; b=RKcbm78XdpL3rdC0tjXA8dHwx2XelTch9HoyiStCnQpa0mDmITFAwPA+etsxog/6Q6 cTnfSEf0jlZVi8BUBGwK7uCny44qEkoFNhm7XJd4gud/ADipd/jSwgaVg5WidKggYy8t ggDzWC4BcjhuNA6LdeqWSwdYMcAE8q+HaKzCti/+G9Jyw/IJ4VvV33dXAAxs7SxmmZay 3pz9B8fIP3Of9PcMT3sYAADluVjahsYIQ0FSFwIEgkk+uOIEqYFhW66AiiFpkeCZ598K dibttm9gTopKl/x6quvlGdfnDf0WkbumCi9wXhkRT6NXIdpEhxR7hNdRs7ma0C5cac4t xOqg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1si3884143pgt.559.2019.03.07.05.37.28; Thu, 07 Mar 2019 05:37:44 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726285AbfCGNfo (ORCPT + 99 others); Thu, 7 Mar 2019 08:35:44 -0500 Received: from mail-sz.amlogic.com ([211.162.65.117]:16206 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbfCGNfn (ORCPT ); Thu, 7 Mar 2019 08:35:43 -0500 Received: from [10.28.18.125] (10.28.18.125) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Thu, 7 Mar 2019 21:36:37 +0800 Subject: Re: [RFC PATCH nand-next 0/2] meson-nand: support for older SoCs To: Miquel Raynal , Martin Blumenstingl CC: , , , , , , , References: <20190301182922.8309-1-martin.blumenstingl@googlemail.com> <98776767-c4d7-1207-6d42-97105f289bec@amlogic.com> <20190307140959.10092d45@xps13> From: Liang Yang Message-ID: Date: Thu, 7 Mar 2019 21:36:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190307140959.10092d45@xps13> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.28.18.125] X-ClientProxiedBy: mail-sz.amlogic.com (10.28.11.5) To mail-sz.amlogic.com (10.28.11.5) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, On 2019/3/7 21:09, Miquel Raynal wrote: > Hello, > > Martin Blumenstingl wrote on Tue, > 5 Mar 2019 23:12:51 +0100: > >> Hi Liang, >> >> On Mon, Mar 4, 2019 at 5:55 AM Liang Yang wrote: >>> >>> Hello Martin, >>> >>> On 2019/3/2 2:29, Martin Blumenstingl wrote: >>>> Hi Liang, >>>> >>>> I am trying to add support for older SoCs to the meson-nand driver. >>>> Back when the driver was in development I used an early revision (of >>>> your driver) and did some modifications to make it work on older SoCs. >>>> >>>> Now that the driver is upstream I wanted to give it another try and >>>> make a real patch out of it. Unfortunately it's not working anymore. >>>> >>>> As far as I know the NFC IP block revision on GXL is similar (or even >>>> the same?) as on all older SoCs. As far as I can tell only the clock >>>> setup is different on the older SoCs (which have a dedicated NAND >>>> clock): >>>> - we don't need the "amlogic,mmc-syscon" property on the older SoCs >>>> because we don't need to setup any muxing (common clock framework >>>> will do everything for us) >>>> - "rx" and "tx" clocks don't exist >>>> - I could not find any other differences between Meson8, Meson8b, >>>> Meson8m2, GXBB and GXL >>>> >>> That is right. the serials NFC is almost the same except: >>> 1) The clock control and source that M8-serials are not share with EMMC. >>> 2) The base register address >>> 3) DMA encryption option which we don't care on NFC driver. >> great, thank you for confirming this! >> >>>> In this series I'm sending two patches which add support for the older >>>> SoCs. >>>> >>>> Unfortunately these patches are currently not working for me (hence the >>>> "RFC" prefix). I get a (strange) crash which is triggered by the >>>> kzalloc() in meson_nfc_read_buf() - see below for more details. >>>> >>>> Can you please help me on this one? I'd like to know whether: >>>> - the meson-nand driver works for you on GXL or AXG on linux-next? >>>> (I was running these patches on top of next-20190301 on my M8S >>>> board which uses a 32-bit Meson8m2 SoC. I don't have any board using >>>> a GXL SoC which also has NAND) >>> Yes, it works on AXG platform using a MXIC slc nand flash(MX30LF4G); but >>> i an not sure it runs the same flow with yours. because i see the print >>> "Counld not find a valid ONFI parameter page, ...." in yours. i will try >>> to reproduce it on AXG(i don't have a M8 platform now). >> I'm looking forward to hear about the test results on your AXG boards >> for reference: my board has a SK Hynix H27UCG8T2B (ID bytes: 0xad 0xde >> 0x94 0xeb 0x74 0x44, 20nm MLC) >> I have another board (where I haven't tested the NFC driver yet) with >> a SK Hynix H27UCG8T2E (ID bytes: 0xad 0xde 0x14 0xa7 0x42 0x4a, 1Ynm >> MLC). if it helps with your analysis I can test on that board as well > > Liang, you just have to fake the output of the ONFI page detection and > you will probably run into this error which will then be easy to > reproduce. > I have tested it on AXG platform; I find MX30LF4G also enter this flow , but it doesn't crash. log as follow: [ 1.018056] Could not find a valid ONFI parameter page, trying bit-wise majority to recover it [ 1.021057] ONFI parameter recovery failed, aborting [ 1.025966] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xdc [ 1.032237] nand: Macronix NAND 512MiB 3,3V 8-bit [ 1.036889] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [ 1.045741] Bad block table not found for chip 0 [ 1.050077] Bad block table not found for chip 0 [ 1.053538] Scanning device for bad blocks [ 1.069094] Bad eraseblock 20 at 0x000000280000 [ 1.071074] Bad eraseblock 24 at 0x000000300000 [ 1.127494] random: fast init done [ 1.348754] Bad eraseblock 519 at 0x0000040e0000 [ 1.632819] Bad eraseblock 1028 at 0x000008080000 [ 2.405420] Bad eraseblock 2411 at 0x000012d60000 [ 3.349276] Bad block table written to 0x00001ffe0000, version 0x01 [ 3.350967] Bad block table written to 0x00001ffc0000, version 0x01 [ 3.356429] 5 fixed-partitions partitions found on MTD device ffe07800.nfc [ 3.362925] Creating 5 MTD partitions on "ffe07800.nfc": [ 3.368188] 0x000000000000-0x000000200000 : "boot" [ 3.373970] 0x000000200000-0x000000600000 : "env" [ 3.378564] 0x000000600000-0x000001000000 : "system" [ 3.383511] 0x000001000000-0x000004000000 : "rootfs" [ 3.388525] 0x000004000000-0x00000c000000 : "media" I am looking forward to a Hynix nand flash to test on GXL platform, and there should be something different from MXIC flash on ONFI page detection. I will update the result asap net week. Do you have another type of nand flash to test on M8 platform ? > > Thanks, > Miquèl > > . >