Received: by 2002:ac0:c50a:0:0:0:0:0 with SMTP id y10csp998913imi; Fri, 1 Jul 2022 00:16:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uK+0guAw2n5xAUHap3N0BhNcHFE+0abq0d3QFznllF9UBhhbhCfZS2B8sXlJoqrgKFFeTZ X-Received: by 2002:a17:902:dac3:b0:16b:914a:81ba with SMTP id q3-20020a170902dac300b0016b914a81bamr16747548plx.19.1656659811870; Fri, 01 Jul 2022 00:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656659811; cv=none; d=google.com; s=arc-20160816; b=mX+ucWIVxuFIpErDJtAlrgbCw8uDQCE/D6kLy25eFmZ+jFSnIgpHynaMsBHBlvviXV 2waEsv58gCJVk58XLP1n0GGVgopJeswBPNQnIkt9L4SKNBqYgIT1M6hKIWSVwEskE1Hs JCQTcBpXCM6hvNmyzhH6vC7n1D7Aa3OBKpla0orfiLFjjy9F15kM6v9Yn2Xlf0ANfzK5 EX/ErKO/4q6vyQ8X9ByJ5c38IMDMSsKKhxpCOuM9VcLs586FAjzBX/AGh7t5JRh9/RsY z9tRJceVBBATPEZQ8SUTn4r5nqXEu0eiwrIznMiEQXR51Uf/XShCH9jHq/5Kfj/qSn3t ZZOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=YfRTFJ02bj0rSle4oHFbCTtD3AzfJegzrCINfxa5z78=; b=OjK2pb4NvuPjj3LuNoXyliFvBk6zbSK51Ci0tXp6VGk4xr1DUZULn9aCix+WA3D71U 1Fr3d01ReqSvqfFfQnhBhrm8k/Gg3UAsNFad6AQ1VxEpcxWzMpQu3Sif3R0NYneVDDVx siAEHfqlK05lg6jizkKOFgqwHHLDUADOKu4qe+PgBMpIQcRFupTvZdkdBC9SbGr6ZswP XWSNDJQxdk3pdAOn0ahsOJfdN/IbwIO4qgy+K+ushLkX9R++yPJw04mgHYrYnSGNzsy6 2t6tBQ3T1Gc0YVZVbhnSxXK1/Lh28E/Cb+paREJFG5o2X/hqafaygap0Ip1aUH0QRlDp BaRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ra+Quhh0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a170902cf1100b0016bc0628816si621125plg.332.2022.07.01.00.16.39; Fri, 01 Jul 2022 00:16:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ra+Quhh0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234852AbiGAG53 (ORCPT + 99 others); Fri, 1 Jul 2022 02:57:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234969AbiGAG50 (ORCPT ); Fri, 1 Jul 2022 02:57:26 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BAE0599FE for ; Thu, 30 Jun 2022 23:57:25 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id fi2so2297623ejb.9 for ; Thu, 30 Jun 2022 23:57:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=YfRTFJ02bj0rSle4oHFbCTtD3AzfJegzrCINfxa5z78=; b=ra+Quhh0Thq+O+pDwNGVWGKshm6dhVQrA0NwUrQk6urw1fww60IgrAdq9TctmVZtI0 9imy4vadKzymt3zTc60EZMX1KXg9q2LMthU8xJZHjMxTE5m39ZOWIM3rtl78U/J2X4BF pD9xQ9wMQlrdVi+wPN6oQTdbOxrmfjY4+21nFMchj4H7MxbCTcqCKGuTBpNLtU+CmN/t iO2zwcbO0+w7nX86aEa++YAzE0FWu1M19jqSjdt2MBhqQL9DANsEMgtZ4joZUZCIU2kf xY13fWzGhi/kPQ2VSBPCfF7ttILfcPilh9iht6+fTep2c6fiiTI70OghAIjJeYgFbl4n S74g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=YfRTFJ02bj0rSle4oHFbCTtD3AzfJegzrCINfxa5z78=; b=h0DhlURuPQBNQVEQCpTlJNQPClrwFm5NHuAfFPJS1kCv8d6tVZBZtlmZkIxuYJLr3+ 3i+KEi3t3bJ6BPdytk8M/oFiEUrLWFBOFN35NBlmjot5LENsG3FyYk00pPG27JYxAWeo GhjCH3JKJEIXJptx8+CUs6TYuTnxlr1g60vv5NMFSZwFT43fzxe+adWKkUziH4XIEwfQ qWKbxXAP2IWHVXyiZM8S/SsmnYPV5V+nAaLlLyR/LhDDYa3TO+WEFKM9N06g4Z54tsj8 aecNC2IVOhc2PSh0nmh1packuJZXvtVNoNkMvRXYnTSl8FDdgdmXH4SJNCpH6rrjnkDo DslA== X-Gm-Message-State: AJIora+H4t6Av06+4eciBigTb6SwgIgrazK8NaDvqV54LHg0XBj200Gk PluS2xn0fqewywvpPFV2eYjmA0UUX+0vJg== X-Received: by 2002:a17:907:9686:b0:71b:6f0a:c724 with SMTP id hd6-20020a170907968600b0071b6f0ac724mr12435861ejc.138.1656658644129; Thu, 30 Jun 2022 23:57:24 -0700 (PDT) Received: from [192.168.0.190] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id x10-20020a170906298a00b00705cd37fd5asm10106858eje.72.2022.06.30.23.57.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jun 2022 23:57:23 -0700 (PDT) Message-ID: <628a7302-1409-81f7-f72b-6b1645df9225@linaro.org> Date: Fri, 1 Jul 2022 08:57:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [RFC] Correct memory layout reporting for "jedec,lpddr2" and related bindings Content-Language: en-US To: Julius Werner Cc: Krzysztof Kozlowski , Dmitry Osipenko , Jian-Jia Su , Doug Anderson , Rob Herring , LKML , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Nikola Milosavljevic References: <3bb0ffa0-8091-0848-66af-180a41a68bf7@linaro.org> <8f51aed8-956b-ac09-3baf-2b4572db1352@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/07/2022 02:52, Julius Werner wrote: >> How the asymmetric SDRAMs report density? This is a field with >> fixed/enum values, so does it mean two-rank-asymmetric module has two >> registers, one per each rank and choice of register depends on chip select? > > Yes, each rank has a completely separate set of mode registers. Then I would assume that all lpddr properties can differ between ranks, including the timings. But probably some SDRAM memory expert should clarify that. > >> Manufacturer ID is taken from compatible. LPDDR3 has it deprecated. > > Oh! Oh no, I only just saw that. I wish you had CCed us on that patch. :/ > > That really doesn't work for our use case, we can't generate a > specific compatible string for each part number. This may work when > your board is only using a single memory part and you can hardcode > that in the DTB blob bundled with the kernel, but we are trying to do > runtime identification between dozens of different parts on our > boards. The whole point of us wanting to add these bindings is that we > want to have the firmware inject the raw values it can read from mode > registers into the device tree (with just the compatible string > "jedec,lpddr3"), You cannot have jedec,lpddr3 alone. You need specific compatible. > so that we can then delegate the task of matching > those values to part numbers to a userspace process. Constructing a vendor from mode registers is like 10 lines of C code, so this is not a problem. Trouble would be with device part of compatible. > We don't want to > hardcode long tables for ID-to-string matching that have to be updated > all the time in our constrained firmware space. I understand. > Can we please revert that deprecation and at least keep the property > around as optional? Yes, we can. You still would need to generate the compatible according to the current bindings. Whether we can change it I am not sure. I think it depends how much customization is possible per vendor, according to JEDEC spec. If we never ever have to identify specific part, because JEDEC spec and registers tell us everything, then we could skip it, similarly to lpddr2 and jedec,spi-nor. Best regards, Krzysztof