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: 17583 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3635395vqy; Tue, 5 Dec 2023 10:48:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtxd4bF9gcVp7M+y5RqUwhXCXtfqUAm0UntIL+gXvfaCWV5QsipPL9AtvwNXNV/Sqx815r X-Received: by 2002:a05:6358:918d:b0:170:678:cb49 with SMTP id j13-20020a056358918d00b001700678cb49mr8232303rwa.26.1701802092736; Tue, 05 Dec 2023 10:48:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701802092; cv=none; d=google.com; s=arc-20160816; b=YxbZ9NnUXmZoSKcJn47TaQfXeXHnOCbrU7iV94ELCXaArzvIQ7p/kzWKVuCLnkaPmM jujQl47eVee4Crh7cJnY2nD/AeIK06tx9fr8+0MWCvZHNx5x+mnktFW5NmBB8wNPhfnC zwd4ERZ9/8hHrHAX55wejLWOKDF0CUxRfbOYTUx70r0h8Y14Dtf6lSh4r7rpoUU7qKWV FL8bFGf2vJJ9s2Z3UWYgSukV/pUXVNQ8373rD04xAw3c25bQmnTV4I+CDwTZ71594gk5 uMNsBe3Zbqd14ujMAbIxWqUeMHaefdlQorqwDVnOFOGpJTupC3GqDiae437/E5z84gZ7 8pcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=n9X0r27/UbN68GCjekZeYhwtKfth61JxLqxfjcWsu3w=; fh=JtBfHkLwU5057B0nnGl+wIE10FqpQSpetKyOLDjQ+JQ=; b=C5H/OqQjtqHFUytkJl8ZkLAZw+u+xgD/8X2VG/1dJAkVEMLwgZ3oJUIpJWiGCJaKLL pzulH5u9jPAVrtv/SMDs6ii/AWxRin6QYToAn9RKQUo+cCAlHNCLgGTW72kGl/d1Qjdv K+sQcluY1g5ylOwZViFq8zvC25isEiwKjCunarUdrowa0/JABWc6LKoZ5yDJ4OlB4fRQ +nqXfJUWHa1tI7O1SIaLO8jVBjhTezaEzKWSES9kL/rl5HlsjBjxXl0LAEwLZ8yrzrGq fG7XU5ZvsMGI9nkfri6owCGeZkltetjkfIqnTqBTDHvyVW/+t8kFoqgqbYirQB4R4BKH oYdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=YV2NNP5+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id v6-20020a63f846000000b0056959099f46si9831912pgj.856.2023.12.05.10.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 10:48:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=YV2NNP5+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 76F7180309ED; Tue, 5 Dec 2023 10:48:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232239AbjLESsB (ORCPT + 99 others); Tue, 5 Dec 2023 13:48:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232183AbjLESr6 (ORCPT ); Tue, 5 Dec 2023 13:47:58 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1377C1BC for ; Tue, 5 Dec 2023 10:48:05 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1d0481b68ebso10158865ad.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=vger.kernel.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=YV2NNP5+YFYUnHdaeV4f6/85wPAFHWoasarITInW0kh+SFHFbfPwIyYU6WgGtvE98P xP9YrLa2YLFqpTVvsguubIcm9Sd+HxuIE7XW252He/6OiWRYT3v1NJlneHu/1WjpqFU6 Z+LWKyT9WKAFwEFMpEA9SLzDKtQdfj+td3nEc= 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=GhIhKnshYeL/kYgkpATmks+h9qj/kQUs/GE3T20B5t4YN7j2Sw69tCRSpBRQ/QqjEr 7hyEYk+KGEm++A0wrayP+XbZa48ULiMpKVqynmHeGtvEpq6AxUCpuCTcBrXTFhWN5Iff BYTkpsYPFpaKDrbHxbY1IOFBVxqfY5N89Cfpw1qGk68tk2CDIhl1adtXT4FPGSehGVAN gT2FJBSAbq+MPT8JmF8sZFmuErtowVur5xbIUeH5XdRNjW7wUsi3Ey14cW2N+rxCT3jS zmmLmieKTddedkP+64+nMt9jyYDOTb83pwZDc/kB547dIehC4bqnINXzKsh47IBrE8lx iZew== X-Gm-Message-State: AOJu0YwbOIxhOYdKFR0OoyNx+L1i31/6J06hraBzLqH9SbdZG1uDVc0v D0kRpdUsKw9GQ8/xESRvUtLPTQ== 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 10:48:11 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784468831019503699 X-GMAIL-MSGID: 1784468831019503699 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(-)