From patchwork Fri Feb 16 00:08:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13559311 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 454D2C48BC4 for ; Fri, 16 Feb 2024 00:09:09 +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:References:In-Reply-To: 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: List-Owner; bh=EVrvfmCfpPCJIKw9BNDttAyEAe7sSGwl119HMORxlnI=; b=ltsuJOjjMnXFBk CdreX8hC7ijaF+/gxL0WTPhcaX73uSMwp1p4PxteEMgtc2tgfJlNDUFdN9rlfm6ccDK0AT4SyMh8I WhWTTuv2KZ+eg3QV6abJMCEat3h/ymYxwMecoxj/pavDNS7dvK2zFAuApcQEEbXme1K8YVD6XQkf5 BibhCVVaNbyyj8YXNM77zf5StQpi2BnhjmkKeZxFAulzdSiH4r174AHQAYz7dcKMyUdyFhJAsBhmC Z4+HgD9V8fD+mqbgaZCCBmKQDh/5huJj4C2190oibDD4zki8rgfCbGUWaLn06zYkdEmQeqauKjhuu VRb8B3Hwl2z9IXO2yO2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ralmk-00000000Yhf-0pTD; Fri, 16 Feb 2024 00:08:58 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ralma-00000000YaP-1LiH for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 00:08:49 +0000 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6e0aa4bb62fso841070b3a.1 for ; Thu, 15 Feb 2024 16:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1708042127; x=1708646927; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bVhGY5w5frFGTLRRHW7GA0aZ7SPA+FA1JdXFhjNvDZY=; b=SuxfDFVr9DzWh7QiR2QSy3FLOaDborM6UG1AVmP5XF6AATkce6cZxIr5ixBvllN5r9 lCAGOq3cdpkx0jjkonBbSlR6IJqeMo6RwZreaIwjnY8W1BX4uRW0Sv3TVCni4/+I2njb lQF8p1CZytf7h1moqcJqYHWWQydPbWM+1c2tUbGCTrBZZsoYObEge8/3U9wRq+YOl+KN 6nY2bwumYpLtK84Qx2vzhSqgT0qOevU0MnM8ufd76Ww7+DeoO9VNKGgF3wIikwd7qZFb vMmnu+k7FtU6Skjm2frHE0jsUfSgzi+5Li33YOMbl6YvithRKsJOtN0Qbga4Jy36udFh 9THA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708042127; x=1708646927; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bVhGY5w5frFGTLRRHW7GA0aZ7SPA+FA1JdXFhjNvDZY=; b=Spefr0ZTFHNRhC9u30mo8dUVorDdFWX3dMsNTQuvtkgRCfNvdKCEGDjSE9JM6M9cNw FlKvrdPNtwx4hOJiKZHw/jzke7SFSIvK/pzAGclpb+GHmpIuF96JbWi4gLliE7hSEQwl rRsVmt++k1AzFkTEorEh0rOpZfmiFd+ZuMMQ3AIyDXWbGOJIiTdoOmMFSWeX7hr2j83W zNDT38KCTDS3Z2jJCIYVtb5EIbE4sCDpgrgIADGuMgL8s46lcgA0MQsXa4LvMRcEEkBy akVQMvVGz6FNTsOI1om17RGGze5An0JXWmrNZsx9wF2yeCidypF1CG0ruF4wlhgA0/hN KqLA== X-Forwarded-Encrypted: i=1; AJvYcCXw4DQWlxCHEIqlq1u/zKDlzwtb2w+yzXU1u2P58U9eZKtfX+agOw5sFRQkIiwNnsg+eeJdS+PzL+SzjArN56+g1rV5ursJ0IApw6Xqr9rqWFfWCdI= X-Gm-Message-State: AOJu0Yy8UXi5cjkN8SRZuTcA8p80QbLqY48Zxu7djL5FE7Ucm4IQeeR7 NdwLzd324rztTqeQmsjqCSHq1PYGsFMigPfC/uO0buI+Pw4+CWS7ZpKHNr0HJKM= X-Google-Smtp-Source: AGHT+IETLEvEo995N/RIp3zMdESx5S+hcPKSxSPuG/aIgheazSPtzHakRWnlA/tfpia2Ssum3vBxWA== X-Received: by 2002:a17:902:d48b:b0:1db:8181:9d04 with SMTP id c11-20020a170902d48b00b001db81819d04mr3724031plg.38.1708042127232; Thu, 15 Feb 2024 16:08:47 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id bb6-20020a170902bc8600b001db3d365082sm1789486plb.265.2024.02.15.16.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 16:08:45 -0800 (PST) From: Samuel Holland To: Will Deacon , Mark Rutland , Eric Lin , Conor Dooley Cc: Palmer Dabbelt , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Walmsley , linux-riscv@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, Samuel Holland Subject: [PATCH v1 3/6] dt-bindings: cache: Add SiFive Extensible Cache controller Date: Thu, 15 Feb 2024 16:08:15 -0800 Message-ID: <20240216000837.1868917-4-samuel.holland@sifive.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240216000837.1868917-1-samuel.holland@sifive.com> References: <20240216000837.1868917-1-samuel.holland@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240215_160848_399852_DAB8EBBE X-CRM114-Status: GOOD ( 14.63 ) 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 From: Eric Lin Add YAML DT binding documentation for the SiFive Extensible Cache controller. The Extensible Cache controller interleaves cache blocks across a number of heterogeneous independently-programmed slices. Each slice contains an MMIO interface for configuration, cache maintenance, error reporting, and performance monitoring. Signed-off-by: Eric Lin Co-developed-by: Samuel Holland Signed-off-by: Samuel Holland --- .../cache/sifive,extensiblecache0.yaml | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 Documentation/devicetree/bindings/cache/sifive,extensiblecache0.yaml diff --git a/Documentation/devicetree/bindings/cache/sifive,extensiblecache0.yaml b/Documentation/devicetree/bindings/cache/sifive,extensiblecache0.yaml new file mode 100644 index 000000000000..d027114dbdba --- /dev/null +++ b/Documentation/devicetree/bindings/cache/sifive,extensiblecache0.yaml @@ -0,0 +1,136 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright (C) 2023-2024 SiFive, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/cache/sifive,extensiblecache0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SiFive Extensible Cache Controller + +maintainers: + - Eric Lin + +description: + The SiFive Extensible Cache Controller provides a high-performance extensible + system (L2 or L3) cache. It is divided into several independent heterogeneous + slices, enabling a flexible topology and physical design. + +allOf: + - $ref: /schemas/cache-controller.yaml# + +select: + properties: + compatible: + contains: + enum: + - sifive,extensiblecache0 + + required: + - compatible + +properties: + compatible: + items: + - const: sifive,extensiblecache0 + - const: cache + + "#address-cells": true + "#size-cells": true + ranges: true + + interrupts: + maxItems: 1 + + cache-block-size: + const: 64 + + cache-level: true + cache-sets: true + cache-size: true + cache-unified: true + +patternProperties: + "^cache-controller@[0-9a-f]+$": + type: object + additionalProperties: false + properties: + reg: + maxItems: 1 + + cache-block-size: + const: 64 + + cache-sets: true + cache-size: true + cache-unified: true + + sifive,bm-event-counters: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + description: Number of bucket monitor registers in this slice + + sifive,cache-ways: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Number of ways in this slice (independent of cache size) + + sifive,perfmon-counters: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + description: Number of PMU counter registers in this slice + + required: + - reg + - cache-block-size + - cache-sets + - cache-size + - cache-unified + - sifive,cache-ways + +required: + - compatible + - ranges + - interrupts + - cache-block-size + - cache-level + - cache-sets + - cache-size + - cache-unified + +additionalProperties: false + +examples: + - | + cache-controller@30040000 { + compatible = "sifive,extensiblecache0", "cache"; + ranges = <0x30040000 0x30040000 0x10000>; + interrupts = <0x4>; + cache-block-size = <0x40>; + cache-level = <3>; + cache-sets = <0x800>; + cache-size = <0x100000>; + cache-unified; + #address-cells = <1>; + #size-cells = <1>; + + cache-controller@30040000 { + reg = <0x30040000 0x4000>; + cache-block-size = <0x40>; + cache-sets = <0x400>; + cache-size = <0x80000>; + cache-unified; + sifive,bm-event-counters = <8>; + sifive,cache-ways = <9>; + sifive,perfmon-counters = <8>; + }; + + cache-controller@30044000 { + reg = <0x30044000 0x4000>; + cache-block-size = <0x40>; + cache-sets = <0x400>; + cache-size = <0x80000>; + cache-unified; + sifive,bm-event-counters = <8>; + sifive,cache-ways = <9>; + sifive,perfmon-counters = <8>; + }; + };