From patchwork Tue Dec 5 18:47:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 13480639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D531C10DCE for ; Tue, 5 Dec 2023 18:48:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=EYNS3EHAbw/kR0L8g+FmuYr4hGGDlbJ/LWFzKHiPqEs=; b=y8ZnusSxtGmCZW OGgbKvqwRxppiu/zCKqPx2p+rVb6tr6lbyUobD4kVuEipj84WtUg3Q8oS6rNiHq1UN39h5bsMkgdw 926j/34+8vRXuoLfnfXDIMTSq0QuD71ZIvWJ6WSfQOkqMsEn69McIz8Op7lXI3jxZENPClN+DjXNW 9n6Sog2oHBXk6i55HWocEqF1Dpxq91DAt2adKjNYc4oMQbMFFKTN0IcB21Pr2StkULjwx4xzKl3Fp ErXtkCZPYt2fsZXOu2P6MyNFHWyXJ7QOzIfqhEI4csbodVsfjjm+CKWIhN/VgyL4ZnOrzvEp1XIVy f4vP0YJrD+/EQkuEHB4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rAaSo-008CGi-03; Tue, 05 Dec 2023 18:48:10 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAaSl-008CFS-2s for linux-arm-kernel@lists.infradead.org; Tue, 05 Dec 2023 18:48:09 +0000 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1d0481b68ebso10158845ad.0 for ; Tue, 05 Dec 2023 10:48:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1701802084; x=1702406884; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=n9X0r27/UbN68GCjekZeYhwtKfth61JxLqxfjcWsu3w=; b=A19Zw7j/SFFY0pUHnMvCnv5FSqybQBCkYAOAw2KBlo3LcFEvA2EfS+ymypaEi160r/ qPViWwPMXhFBQM9Dinm34PwG704uxDNlq7I56O69jC52g8XaJfb+8jZOMSPJNNvmDl8E /tbD1wJRMKD4OH7gi3Y9z+KgEBv8kTobrh+EE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701802084; x=1702406884; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=n9X0r27/UbN68GCjekZeYhwtKfth61JxLqxfjcWsu3w=; b=LMJHFNjNCgt8TSsGvptHJh9yg2BCtcQI055O34UDL7EjyfcSKxhqro/yz+hNV34g8p tCw8P+OwOheyqc3RxOs87njgj9K2gAluf+xYCT1n+HABCNvKffcg7mSOvGiO077vXZvr Xwh8AeYK60lXnlsfUlpQtlFwcprDGNSSH8Cly4SrNNOD4M7naJXVvMN3Nwb6LDB5pQ6F r2zaXfyNR+Zo2lWNPG40I80yt6R1lCB/p2QrDEj6RW7ElhIo/2im7ThSDMfpEz0127W7 e0vLpMJYPBu/4slV+AyIa5OpdlCrj5hZ5JFqkLEOB7SBnJipIEA8lNaELBnYZ5p+lCOz lqxw== X-Gm-Message-State: AOJu0YwwM1dVjLiPUU+kHneksCOmOYVRxZxgFX4SIjZJY7dgvgP04gsP zPw0yaBWsGSE9UO1BE6TgW2S7A== X-Google-Smtp-Source: AGHT+IE1+yOzhmVcL8taX+gYSSTqB7TcNtmGAbJ+dH168Aul+Cu6lmHkkattSuS8hRhsTx9zw4Jk4g== X-Received: by 2002:a17:903:41c1:b0:1d0:6eae:8e57 with SMTP id u1-20020a17090341c100b001d06eae8e57mr12590444ple.1.1701802084368; Tue, 05 Dec 2023 10:48:04 -0800 (PST) Received: from lbrmn-mmayer.ric.broadcom.net ([192.19.161.248]) by smtp.gmail.com with ESMTPSA id b11-20020a1709027e0b00b001bbb7af4963sm10726422plm.68.2023.12.05.10.48.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 10:48:03 -0800 (PST) Received: by lbrmn-mmayer.ric.broadcom.net (Postfix, from userid 1000) id 7555AD00; Tue, 5 Dec 2023 10:48:02 -0800 (PST) From: Markus Mayer To: Krzysztof Kozlowski , Florian Fainelli , Rob Herring , Conor Dooley Cc: Markus Mayer , Linux ARM Kernel List , Device Tree Mailing List , Linux Kernel Mailing List Subject: [PATCH 0/4] memory: brcmstb_dpfe: support DPFE API v4 Date: Tue, 5 Dec 2023 10:47:33 -0800 Message-ID: <20231205184741.3092376-1-mmayer@broadcom.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231205_104807_974528_730A303B X-CRM114-Status: GOOD ( 14.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It has become necessary to distinguish between the various DPFE API versions by version number. Having just chip-specific compatible strings and one generic version is no longer meeting our needs. Also, a new DPFE API version, v4, needs to be supported by the driver. As a result, an intermediate compatible string format is being introduced: brcm,dpfe-cpu-v where represents the API version number. This is more specific than the catch-all "brcm,dpfe-cpu" and more generic than chip-specific compatible strings, such as "brcm,bcm7271-dpfe-cpu". The changes are split into several steps. First, we update the binding and introduce the versioned compatible strings. Secondly, we add support for brcm,dpfe-cpu-v1 through brcm,dpfe-cpu-v3 in the driver to match existing API versions. Thirdly, we introduce DPFE API v4. Lastly, there is a change that isn't directly related to the introduction of the new binding format or DPFE API v4. However, with the increasing number of API versions, broadening compatibility can be helpful. If registering the driver using the DT-provided compatible string fails, the driver will try all DPFE APIs (except for v1) to see if one might end up working. This can come in handy if the driver moves on and learns about new API versions while Device Tree cannot be updated. Markus Mayer (4): dt-bindings: memory: additional compatible strings for Broadcom DPFE memory: brcmstb_dpfe: introduce version-specific compatible strings memory: brcmstb_dpfe: support DPFE API v4 memory: brcmstb_dpfe: introduce best-effort API detection .../memory-controllers/brcm,dpfe-cpu.yaml | 8 +- drivers/memory/brcmstb_dpfe.c | 95 ++++++++++++++++++- 2 files changed, 100 insertions(+), 3 deletions(-)