Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp137112imn; Wed, 27 Jul 2022 17:50:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sRp7t3qZqUcf2Ot1UTvWR/g5hYKiVCyfiX8/eynsLhZJxAHInrzt5nyoh+oCA8k/rdR8NY X-Received: by 2002:a17:907:760f:b0:72b:7eb4:be52 with SMTP id jx15-20020a170907760f00b0072b7eb4be52mr19606609ejc.737.1658969439282; Wed, 27 Jul 2022 17:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658969439; cv=none; d=google.com; s=arc-20160816; b=vWqtIGgIKq0mJoVQwZWiuPQ/qgHp2VgJVQbkJdGrwKJkRwB7ZQ5kCC+6k6ZxMl8tg0 afX4JsS86t1GAGup42h++I4ZDfWKF1WXgGxY74XDXiZ2IW+zY/Fp4KkX7Vatwvhw19kq KxP9K9fCAGMOpGSQTlehtTuic+1tX4+SBdLyRxn+ElMieDbgBfavqRqtgwoweBxV6zB5 sa0A/xaL9iydXAncDqS0maI1/bcQn+prziFj4v+djemPlzYDV2jbk3dVben82nu/w3yo 1jYOMipkD9tNZccZk2JKk5oMSli029tqcH/bMsR2Ag1rK+6aaNY21PVhIndP3xGjunGw uTKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=AmEmeRZhd9Zjf3GjjylIGsA/lCIIeJ6jjo7QTxJzxvA=; b=hgHOgMjeU4EGQDDUrZeghqH6S5lQjW78CcsrGA0MWggLvOU5SV7AN2/rroTvhrivry jzFN5qxx0RONaZ0IOyKr7Pk+b00Yai/IgvZs/oy0eYlaIUYNZ4Gyn2y8zzbS7WQ6Fc3P DrPLJiEKA7xklerpEfURNHHrHoD4dtfrqhvlHn6Z9HllKFWOFHjm1iESpR81j5opsBmN cHruxtOM8+gzYvHjVFO8/9eIFpv+vCWqbG9XRJnN811k7WQfCqfD3KhvcKtB/x0Qzw1I 2Y4bOoludJwB+6D8LA7xkxz8/UmdUcRZVAtkrLz193lefVvNlmJqYcE/HZTF8C9hXDgr Ig2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ICGsuhAh; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn21-20020a1709070d1500b007123c7ecf90si21959555ejc.476.2022.07.27.17.50.13; Wed, 27 Jul 2022 17:50:39 -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=@chromium.org header.s=google header.b=ICGsuhAh; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233975AbiG1AW7 (ORCPT + 99 others); Wed, 27 Jul 2022 20:22:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbiG1AW5 (ORCPT ); Wed, 27 Jul 2022 20:22:57 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 214444B4BD for ; Wed, 27 Jul 2022 17:22:56 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id c22so135153wmr.2 for ; Wed, 27 Jul 2022 17:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AmEmeRZhd9Zjf3GjjylIGsA/lCIIeJ6jjo7QTxJzxvA=; b=ICGsuhAhunYr+r/GoO+4BHNivDMLZR5fvOwLh5HFkDDRz6EfC02ywECIWGFN71ODiB 3LxXaj60PZEk9S9t5ZHy9PcgGbOX2Ff4/uR0n+FZBgj+oBEs+XUGLMjTqeOEJZsaeYVq lrQkcGUdHRgl0eQl3YnUoRvXLNV3rPzWu/zXc= 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=AmEmeRZhd9Zjf3GjjylIGsA/lCIIeJ6jjo7QTxJzxvA=; b=buV73R/iwSaJ7fU5z0NYIpOXYPQPyQ89X1K2iBBnEgC/1QkLczOdWiogcodEKSKWOn z+LdmDira7z894iA2xI6Gzq0F/XE4/34YNlRr3xXQpftG2LivVkx6O/Y5WSLAzi60b47 V4JeISzAFZwW8Aky0Hyhumn8adHXiFfaLFLx9BHiCovRvBRmDtYvERb2FEw/mpEaA8rC J5202cGizgwkHTvca91bEm4LEr4DhTFy6PxtKtvNQ2pDIBszwscZ9fNRYAhkDJcCPAQU PDhXq8tygrfIqq250HOf8bjn9b3AdTCWtxdsDxDJbkeWAIwtZWP2nce1+3jdGh8ZaM3c RrJw== X-Gm-Message-State: AJIora+EJPmnjAB9en5H2VdZ+Nkmtbhr1/9e9aYtHuVCZBb+np0Jrr0M GnQe6WhJGeBN4KY58wuccGMi2uRrIMkxLYqzP67fbQ== X-Received: by 2002:a05:600c:a03:b0:39e:4f0c:938c with SMTP id z3-20020a05600c0a0300b0039e4f0c938cmr4621229wmp.145.1658967774472; Wed, 27 Jul 2022 17:22:54 -0700 (PDT) MIME-Version: 1.0 References: <3bb0ffa0-8091-0848-66af-180a41a68bf7@linaro.org> <8f51aed8-956b-ac09-3baf-2b4572db1352@linaro.org> <628a7302-1409-81f7-f72b-6b1645df9225@linaro.org> <1f3189ef-7d3f-27b3-a691-b9649090b650@linaro.org> <86b9c6d6-e8e5-7f6d-0970-460baf9b6fcc@linaro.org> In-Reply-To: <86b9c6d6-e8e5-7f6d-0970-460baf9b6fcc@linaro.org> From: Julius Werner Date: Wed, 27 Jul 2022 17:22:42 -0700 Message-ID: Subject: Re: [RFC] Correct memory layout reporting for "jedec,lpddr2" and related bindings To: Krzysztof Kozlowski Cc: Julius Werner , Krzysztof Kozlowski , Dmitry Osipenko , Jian-Jia Su , Doug Anderson , Rob Herring , LKML , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Nikola Milosavljevic Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_SPF_WL 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 > > By "use case" I mean our particular platform and firmware requirements > > -- or rather, the realities of building devices with widely > > multi-sourced LPDDR parts. One cannot efficiently build firmware that > > can pass an exact vendor-and-part-specific compatible string to Linux > > for this binding for every single LPDDR part used on such a platform. > > Why cannot? You want to pass them as numerical values which directly map > to vendor ID and some part, don't they? Yes, but the current compatible string format also requires the exact part number, of which there are many thousands and it's impossible to build a list in advance. Even for vendors, hardcoding 255 strings in a tight firmware space would be an unnecessary burden. There's also an update problem -- firmware may be built and signed and burned into ROM long before the assembly of the final mainboard. Board manufacturers want to be able to just drop-in replace a newly-sourced LPDDR part in their existing production line without having to worry if the existing (and possibly no longer changeable) firmware contains a string table entry for this part. If you just want the compatible string to be unique, encoding the numbers like Doug suggested (e.g. jedec,lpddr3-ff-0100) would work for us. > If we talk about standard, then DT purpose is not for autodetectable > pieces. These values are autodetectable, so such properties should not > be encoded in DT. But the DT is the only interface that we have to pass information from firmware to kernel and userspace. Where else should these properties be encoded? They are auto-detectable, but not for the kernel itself (only for memory-training firmware running in SRAM). Maybe the usual rules of thumb don't apply here, because unlike all other peripheral controllers the memory controller is special in that the kernel cannot simply reinitialize it and get the same information from the original source again.