From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCFBA158DAC for ; Mon, 1 Jul 2024 12:53:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719838409; cv=none; b=kdPGCmWtNl5+3vmkoXX5vLoCB7jot3ogmZoe7vYx+CQBgpae+ZrflB7PW3gk1HeVHgpHnRMkyPzUoRu3gmtog0w1hrrGy/HYLtAfT3Hwvt/7EEhjKSIpZ9V5IpfiyAse4TezK74dwpjZx61ct/QYqM6hR152UB+RNmq/4XMz6Mc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719838409; c=relaxed/simple; bh=ggHcRrATCWawOIFv3hL6A8ohViqNbuc5DfUNEHb7Ezc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GRcbo2DE8X2gAhyGeePHZ+18b9x/jTS3FRaP56yc9nPt9XbT/ayeZZHiveXwKZ29NWDkdZzLlZzJDVHGUTTZE0t/9hOMFO0V3RIBxu1FOurayRZliYhLSXj7I/q+52l5t6Tp4EzlG+aCj9UIK0xtey0eO80i3N9A+q0DDuLwzlA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=gjqsJMiZ; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gjqsJMiZ" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-364ff42999eso967837f8f.3 for ; Mon, 01 Jul 2024 05:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719838406; x=1720443206; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=/8E2zTSxKsdYTXl/eFQJuC6tkBg5mMtLfz++9IP/rJs=; b=gjqsJMiZBSDhn2JkcmwzQJB98qzb6Qag56g2Y6flJY//iGGVpwlLzsMwhPb7SuEN0O nc0SdhYcEFC2QIyzanZPn1lE5reR/EnZynCmfX9SCatI620G5fkYLGW4F3TCgK/fML1W e0gdUbB9Ly8PiTCRzCOZOEAN51n29r8abmmToCdJ6hmFdcFIMPRVXn6HycEaq8XE1EWT 0HdOVBkdt1DSCr+Jd5HwThM6GiFrmGpA73hkC8irNKQm1N0uMMpqzeDkugwkaRzNNCdW s7olWh4T/P1u8Ywd01hXRbau3WPQ02XwDps+T5iHuePSl9AfaNS0FiSxWy6yYlIFwvdB qkog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719838406; x=1720443206; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/8E2zTSxKsdYTXl/eFQJuC6tkBg5mMtLfz++9IP/rJs=; b=E0tjiBt88GMRBoOzblFwDe3YbIziCFi+TZWpjMYCfCoRP/WOI3ysH8FwGQmJPzu28g FWzUsuMQ12SPF0va+KTsQvB9iuYGBV5SfREZnmSWuRGjB3iC+afcokTZwRh1zd5LjK0i 9OVp1W0Nt9WU8FfYd06MnPV7GqExqH2MsVwU2iDEeeXSpaZH4MSFf7a3qb5K+JN32jDM zbc3+c+Cc9VWfPkSZQNSyXMMovWtrFSBCAHNv4rj6iY//BqMdt/K+8rQigTUsOa7ShCX fd/Hu+3PB0Wh0pwW6rtyOtGE6LelzfLwVQM0pk//y4qInZPHGQug/bTZ3uLQP9HBrssX Pmtw== X-Forwarded-Encrypted: i=1; AJvYcCWO/zgaaGGCh7sRgrhU3jgvbPnhVBsf9LBKpR/eKdvXUfMpOpxndVS/ARXADDZDDZSyFN2EUryKEoAIo7C9bIVKzX2PYXzk03vNpQaK X-Gm-Message-State: AOJu0YzK/SvKd7fiY/NKTPvcpgpW/XHtv8S+NDch0kW1r9LJvPj3HQ/2 2fxliFK64R6xA+zjAFKbh707S3twWXFKrm9wLzmKih/o1sfUZeffXyy6E9ojw5kHbN1HYytgAqT b X-Google-Smtp-Source: AGHT+IFsN5M7EmHtq0/p5K+Huwk+NrUQg51/5m34mJW9idpCbT3p95cPzf2wdQfK7yooDdM0biGapw== X-Received: by 2002:adf:fe51:0:b0:367:40e6:46a7 with SMTP id ffacd0b85a97d-367756aaceemr3735232f8f.28.1719838406050; Mon, 01 Jul 2024 05:53:26 -0700 (PDT) Received: from [192.168.2.107] ([79.115.63.178]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0d9ef3sm10034544f8f.46.2024.07.01.05.53.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Jul 2024 05:53:25 -0700 (PDT) Message-ID: Date: Mon, 1 Jul 2024 13:53:23 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/4] dt-bindings: mtd: macronix,mx25l12833f: add SPI-NOR chip To: Erez Cc: Esben Haabendal , Erez Geva , linux-mtd@lists.infradead.org, Pratyush Yadav , Michael Walle , linux-kernel@vger.kernel.org, Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley References: <20240629103914.161530-1-erezgeva@nwtime.org> <20240629103914.161530-4-erezgeva@nwtime.org> <1c457520-07b7-4bde-b040-e8bca959a4f5@linaro.org> <1d56c3b2-7adf-45b9-a509-956340f3f17b@linaro.org> <04f5162d-8a95-45ce-a891-3f711b27a469@linaro.org> Content-Language: en-US From: Tudor Ambarus In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 7/1/24 12:03 PM, Erez wrote: > On Mon, 1 Jul 2024 at 12:23, Tudor Ambarus wrote: >> >> >> >> On 7/1/24 11:15 AM, Tudor Ambarus wrote: >>> >>> >>> On 7/1/24 10:46 AM, Erez wrote: >>>> When using mx25l12805d, we do not read SFDP. >>>> As it uses the no-SFDP flags. >>>> When using mx25l12833f hardware with mx25l12805d driver, it did not >>>> try to read the SFDP. >>>> Yet mx25l12833f does have SFDP, when I remove the no-SFDP flags, the >>>> driver fetch the SFDP. >>>> >>>> Secondly SFDP does not contain OTP information. >>>> >>>> mx25l12805d has two OTP regions of 128 KiB and 384 KiB (yes asymmetric). >>>> While mx25l12833f has two OTP regions of 512 KiB. >>>> >>>> How do we handle it? >>> >>> You would first try to parse SFDP and initialize the flash based on >>> SFDP. If there's no SFDP then you fallback to the flags declared at >>> flash declaration. Esben had a try recently, see [1]. I don't know if >>> there's any progress in that direction. >>> >> >> And you can then decide which OTP org to use based on whether SFDP is >> present or not. > > That can work, but sound like a hack. It's not a hack, we're just doing our best to dynamically identify the flash. > Is that really that important to hack? we push really hard against new compatibles. Users shouldn't care about what SPI NOR flash is there. > Just for OTP, that very few use? > And if in the future Macronix adds a newer one with the same JEDEC ID, > but a different OTP size? we'll compare SFDP data and choose based on the differences. This is not encouraged. Instead ask for unique IDs or choose other flash. > Macronix does not consult with the Linux Kernel on these matters. > I'm complaining about unique flash IDs for years now. Hopefully vendors have learnt their lesson. I didn't see new flash designs reusing old IDs. > Anyhow as I do not have the hardware anymore, I can not do more > changes and test them. > Be aware that we're not queuing patches without some minimal tests. If you don't have the hardware, contact mchp and see if they care, otherwise we're wasting our time. Here are the minimum testing requirements: https://docs.kernel.org/driver-api/mtd/spi-nor.html#minimum-testing-requirements For OTP we'll also need some OTP tests. Cheers, ta