From patchwork Fri Jan 19 21:52:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 13524203 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 34795C4725D for ; Fri, 19 Jan 2024 21:53:15 +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=Icl2tl7fX7RH6nTrEX++3YAVOjGGI/mRvfk3xODC8e4=; b=OyL4S6ikFF8XYA LdNvNo3HCyuSoqwgoX9QhZ0mYnhEEzmh3vAO9XzwgQwjU3DayFqb7d5aZOjY5m15MoCw3Xkb10vfG xT+rV3pHqON6cykfIas8yXWvxuQgShXEWGvTt2gEFLHAJi6CUgW/vxAKlXe5524XRG9zJbFetQMhR pwMzCfwRklcchuTk0PC2Ce4ix8SPpudXaDQ/wTwoFGidHmeFdqPLbTxRFMMrl3jzKiDd0KT/DdcYg YArpQnYM+zo9IOPOUjweo7POwr7uZO/YQR7tCj+FT1UCYGTyyBiPKl62AbNB3TH8zkvUBtYUOlnYJ qXnu2EL/NPCuP8oRdV9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQwn8-006i4E-0A; Fri, 19 Jan 2024 21:52:46 +0000 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQwn4-006i3F-21 for linux-arm-kernel@lists.infradead.org; Fri, 19 Jan 2024 21:52:44 +0000 Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-7838d1176b4so15052185a.0 for ; Fri, 19 Jan 2024 13:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1705701157; x=1706305957; 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=oK5JfnFjUnPI3L0y0Aa2Q4btTFp3M7GIq/C+XWsHPDA=; b=LplMSikICQNFPfX41JVFyYT1u/dAz9o7PpM/EseXjDh0lkPWwo5xRX9Oml7L8xB6gP 5P1vpNFxUKnFYozffGu2++Pm7PERZO9GfB/EhvKO4PyqrcdTLJNtXIxxVHJRXiwEJDdV Ti2xJOsIb2QGa6JzYjfy4Iz3XpIyrR0posxlk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705701157; x=1706305957; 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=oK5JfnFjUnPI3L0y0Aa2Q4btTFp3M7GIq/C+XWsHPDA=; b=tGbqDb2fY5LXvVGCSJY8x8zakskOg3JHthvOE7+nU70s2K0jP4sA/yqPjwwTxMc8A7 5t7ce/VnK26VBUb5L+SkmZxhCLp4xls0FKyY0RVv1uZucZOjXlNgDTHHikDCsh5mHduo wy+KJbRTVJxja9LW6T2rTsd6kuQy/epBA8qNMN81Dx5cTS24zKWM7pi6kYPZsRFVmcp+ jDehTSG22pKf6AbMRL8KoKzu5qUTXNvsHqZ7erldP+CXsKuy9fdwze1RjZLqAEJ6F98s 4k/VA9U/Iotn4Zps6S/PewCLNc/hIq/ClDibKzcRFjSoJJFDgO9cv9TtrF2d2MSVSuKN TMBA== X-Gm-Message-State: AOJu0YzDYpCr2K1jbzn3yaA9MNjL1NWeetOu1W4LckCaGpeYT34Q4yAf /JarOLvstfaf56Q3rnoNdAJGwh1oNHLB7y2/osaEzOWdpj2bL/Q6OoPEaC0/fw== X-Google-Smtp-Source: AGHT+IGZbRKEeocIbWCL2fcCda6LWbsu1WPCHHpOlC+CSAAPaAt3hyLSRR/40E6PY6YNjqTVyk2u2A== X-Received: by 2002:a05:6214:5089:b0:685:3dbd:1566 with SMTP id kk9-20020a056214508900b006853dbd1566mr377663qvb.6.1705701157591; Fri, 19 Jan 2024 13:52:37 -0800 (PST) Received: from lbrmn-mmayer.ric.broadcom.net ([192.19.161.248]) by smtp.gmail.com with ESMTPSA id i3-20020ad44ba3000000b0068198012890sm55854qvw.66.2024.01.19.13.52.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 13:52:37 -0800 (PST) Received: by lbrmn-mmayer.ric.broadcom.net (Postfix, from userid 1000) id 6FC23890; Fri, 19 Jan 2024 13:52:35 -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 Subject: [PATCH v2 0/5] memory: brcmstb_dpfe: support DPFE API v4 Date: Fri, 19 Jan 2024 13:52:23 -0800 Message-ID: <20240119215231.758844-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-20240119_135242_730357_D5238154 X-CRM114-Status: GOOD ( 13.59 ) 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 no longer meeting our needs. Furthermore, the generic compatible string "brcm,dpfe-cpu" is being removed as it doesn't serve any actual purpose. Finally, a new DPFE API version, v4, needs to be supported by the driver. To select between the different API versions, a new compatible string format is being introduced: brcm,dpfe-cpu-v where represents the API version number. This approach is needed, because the API version has changed in the past for some chip, which means it cannot be derived reliably just based on the chip name. We rely on the boot firmware to populate Device Tree with the proper compatible string for the correct DPFE API version. The boot firmware already has this information and can easily pass it to the kernel in this manner. Changes since v1: - remove compatible string brcm,dpfe-cpu - add compatible strings brcm,bcm7278-dpfe-cpu, brcm,bcm7211-dpfe-cpu - add "description" section to the binding - drop patch that contained API probing and detection code - tweak and clarify a few code comments Markus Mayer (5): dt-bindings: memory: remove generic compatible string brcm,dpfe-cpu dt-bindings: memory: add two chip-specific compatible string 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-controllers/brcm,dpfe-cpu.yaml | 24 ++++++++++- drivers/memory/brcmstb_dpfe.c | 41 ++++++++++++++++++- 2 files changed, 62 insertions(+), 3 deletions(-)