From patchwork Fri May 10 14:35:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea della Porta X-Patchwork-Id: 13661685 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AE5316F8EB for ; Fri, 10 May 2024 14:35:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715351729; cv=none; b=qUSCXe2gfG5dNszzVQIGCDixBrZ5oGrslxs2dcQc/Jmwbqa/6/yQJzEpGBpIYbfytpHMit3EJYgJbBmGRL4FD5VI1PPIyzL3JYqe3ZqO5+ulEIUd7Lwl1usZS/eRE/qgjhry9NY9HucceI//hwZYgscoYf8cezbdc3MHQ7ZUEeA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715351729; c=relaxed/simple; bh=kATQMNOhJrdbief3Fgl9OA3f1yYFHp3atah9Ebe5p/w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JSHWSNafo/KIWCUbJTp8BfFR2NvbePH0Kg9CePJpnvJjm6yLtV3qw9sxmPh64gUgFH+DiJE/lXkMaS7fLHKl0GikHg2AkBP+15kcmleh4pFZ1DXQjmmyXzcmI2i6r3w6Xq7dYJHLkMX4xAqJm0C8RoAFeQ9jB1SdAb+yy2kGtFE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Ntflsule; arc=none smtp.client-ip=209.85.208.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Ntflsule" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2e3f6166e4aso37382671fa.1 for ; Fri, 10 May 2024 07:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1715351726; x=1715956526; darn=vger.kernel.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=GhvBTKrIEHNw+3a6hb0Xwmt+4VWhx+P/N8uTLnP7/w0=; b=NtflsuleneyiSe8fyggklJJCyZrlNS+7h+NUOYbNLGh4/vwTPZgbtMd3BZFsbmNjje VYvWEWwBduIMmrhEwpmXXkFUl6JFDr+ZEtbkKQNKC8V9DySLTyHeuXQtOxCWepoSWz7e EniYE7vSwdJ8D9jXdLLN1Li1JMbnbs2+jrqviSzSQ2H5DJF65ONhQSfrF2yqoSXnDkr1 C4asEYE0AYlkhj7LbXjNmRsr79sMEa5lcf+Lg/pV8SvNQWggoSnPHBq40D15pEJ3ePxi ZcZ1J5hRaM50gYV0yuCn6dbBeaUyH8VG6HIuyOhfsxAiJDvp53j06bC9fR5IQNOisQ4i iBXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715351726; x=1715956526; 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=GhvBTKrIEHNw+3a6hb0Xwmt+4VWhx+P/N8uTLnP7/w0=; b=A6oJ645fpJtr5vmwRWKE/LT3Biw7sCIpmU43+5/iG5bZSvgiCEv9DCUIyUbihrDddz 7UUzdEyLGcGvbS1VDDTFbG3LXP8Sy4NSj1Ih2500FAvPrrbOq3WdCizv4adk1nDfr0/1 PHi44cpa9cIy6gvpyOFb/CqPx+YJSZYUj+cYV2h1ZiWq9Y3nFPg1yQnYkgXJ692SP+PD ExBB2EQRr4XzP06SZPYRLs6A3cG03F3w7viThqDNGUALLcnGBOAzJrOkxoRE6CUBfN47 1lgeIE+uxb5lTgnCyIlQ+GgB00DmWwHVWWqXhNRuv2ArqTv1WunlihcNwWlsE/nMSHTT XTJg== X-Forwarded-Encrypted: i=1; AJvYcCUfu4AcbDleiR6+uxsfgvO8JqvP5uzZwDEtbin5hUp+NwvfkIp02MxtuU+vX8ipX8ls+gIl454qsiEj100iMC4azgLHKRa+9i2n X-Gm-Message-State: AOJu0YzSFUC+pjA4I6NFfkWBG4EEv3IG4+lz17UlPNBMc5RU/zc6hvFU 0xSQD9aHVpn51vKfde8f8Kt3CKvCfkRQwgs+ZaiDZr5+H5cuDoJMphwR+AUfab4= X-Google-Smtp-Source: AGHT+IEAC9dVjDMT1UPdVqARhjQhRcXJv3fsVQDnUMR3w47CcGcW+O53nF2+nRJEW7ujUyZvmdSP2g== X-Received: by 2002:a2e:bc24:0:b0:2e0:83a9:e385 with SMTP id 38308e7fff4ca-2e51fc340a2mr28548151fa.6.1715351725643; Fri, 10 May 2024 07:35:25 -0700 (PDT) Received: from localhost (host-95-235-217-160.retail.telecomitalia.it. [95.235.217.160]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a179c7fc4sm191151166b.135.2024.05.10.07.35.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:35:25 -0700 (PDT) From: Andrea della Porta To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Ulf Hansson , Adrian Hunter , Kamal Dasu , Al Cooper , Eric Anholt , Stefan Wahren , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Cc: Andrea della Porta Subject: [PATCH v2 1/4] dt-bindings: arm: bcm: Add BCM2712 SoC support Date: Fri, 10 May 2024 16:35:27 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The BCM2712 SoC is found on Raspberry Pi 5. Add compatible string to acknowledge its new chipset. Signed-off-by: Andrea della Porta Reviewed-by: Stefan Wahren Acked-by: Conor Dooley Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml index 162a39dab218..e4ff71f006b8 100644 --- a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml +++ b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml @@ -23,6 +23,12 @@ properties: - raspberrypi,4-model-b - const: brcm,bcm2711 + - description: BCM2712 based Boards + items: + - enum: + - raspberrypi,5-model-b + - const: brcm,bcm2712 + - description: BCM2835 based Boards items: - enum: From patchwork Fri May 10 14:35:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea della Porta X-Patchwork-Id: 13661686 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 985EA17082E for ; Fri, 10 May 2024 14:35:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715351730; cv=none; b=ScVxIrOu8/cUtiGE2BXpa1M1K9X34YYMyK2htPyroGfxszBaW7nWLxxejkbx+GZnndXhEXqcnVqv3yTgbqe8s8na8tSLGeIPxbsYsXX6VkihMW/uEDczMtRAGx5je6N3MHYIcr2RXQnnGPT3P3hamCvwsvwYixMtv2f1KaubCe8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715351730; c=relaxed/simple; bh=P92kk6BhCHW3muExoIcLcwA5qcNfUfMADu6b2AJa6JA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pTKzGDayMhWbFnCBawa1FzvdBOCXVZtazIrIQV5SuCVYn/QHOZA+/RYJikkvVDls40S2Em1u3hKsGR+xrCmYIuby5VaykuBtXds7q9wXiau3h5AWoYE27NR427rdMbQ7/KZxZK4TEYUQRYyCg1o0rP2gmDup3QI8rZxySkLdZZI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=ROHqB4m2; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="ROHqB4m2" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a599c55055dso549027166b.0 for ; Fri, 10 May 2024 07:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1715351727; x=1715956527; darn=vger.kernel.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=fJE6iq5KMzfXhNp8cO0cJHNPNYoqLhn2RR6V0vH5QBM=; b=ROHqB4m2bwmUAfyqROd6dRtM6BST+qJEOTL/Voj49JLC+hzHMfFPxNQPLN8KCzJCbp +iSdYwX6IRridt4tSm7D3gkea4E9Rm+wFX8VbCvEZs4+ucEePY0NdM3LZd5wx0yJcUUP wonQgTFaz9pLp/dca/DM46ymG/wlOzu0jNupxPMUHVnfiJ2LsP2AfcRNFPSfUVmPs4Jg mXTtA+1cvPm3aXNG88VTB7Vx6d/fO5JjG1QJuwmoOq5flpZXOdhtVBGkvGmEkU4gj4Ec 2pHAFkWbvXSjQDE0eRQwwIA357Nt+VCgRL1dNdYbm0n0vs/MjL4EASrI43DDkyPZdHQp xZTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715351727; x=1715956527; 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=fJE6iq5KMzfXhNp8cO0cJHNPNYoqLhn2RR6V0vH5QBM=; b=uXCM/cTB3c07SLVrMiCip9k58t95d9mVYtLRwF1F4v7PhPK8Mk7eUe4MfqvpHl0jV7 o2QgsEVyQgkWrDu71PlzQypjLGu+UEmu5eJqydl+OpT8lp0A+0KEAs/RL4uZCPkUQ2G0 KMwQxfk3q6xCbsxiWBWB9HJ31PhRwc4RYIag7oZ+WiBV5wiIMSdkB7T/Vsty66iKU8xp 2daClDbumws11w4r5E9nRJxTQmKDlfgDHfzyMSKl+UrFkUBlmnIB5sMy4tq5Kecs6vPi ljc+JmQO8TiVf6NIZIq2j1IGnGf2y0UCYcqnPYA/YzA6BhCGwdZSFBNP6WHP3NkjLlYp uk6w== X-Forwarded-Encrypted: i=1; AJvYcCWkyIHcGP8GDsoKC3mPaLkcrz2D1/t9IhKlWwISqa5l2XtQ8aK21+ubVuQD2nxpbKEVj4ToXWY145zPjOEfQ0y7+La/aA+QKKlr X-Gm-Message-State: AOJu0Yz9Xrl/ai793K9j2HIxu8/DPIHA6mIDkH11TIvxzibtcZ4zniMF fXtXxs3GHd8vYfiLmZoSs72KfhCHIzPkdNwO6CeHTOILLCYbXmQbJ+/wtwCHZPI= X-Google-Smtp-Source: AGHT+IGYZyhWDzVYf6DmjGdC71tudm6uLp4GK1JX9oFjlfQU0KYYH9PsgUrcikFgCQeJEwb7baoaaQ== X-Received: by 2002:a50:baeb:0:b0:56e:2ebc:5c4 with SMTP id 4fb4d7f45d1cf-5734d5ceae0mr2015999a12.20.1715351727022; Fri, 10 May 2024 07:35:27 -0700 (PDT) Received: from localhost (host-95-235-217-160.retail.telecomitalia.it. [95.235.217.160]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733bea6a36sm1882673a12.12.2024.05.10.07.35.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:35:26 -0700 (PDT) From: Andrea della Porta To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Ulf Hansson , Adrian Hunter , Kamal Dasu , Al Cooper , Eric Anholt , Stefan Wahren , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Cc: Andrea della Porta Subject: [PATCH v2 2/4] dt-bindings: mmc: Add support for BCM2712 SD host controller Date: Fri, 10 May 2024 16:35:28 +0200 Message-ID: <1f0c4fa62d6849753e2138cce5498693cfc3a230.1715332922.git.andrea.porta@suse.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The BCM2712 has an SDHCI capable host interface similar to the one found in other STB chipsets. Add the relevant compatible string and relative example. Signed-off-by: Andrea della Porta --- .../bindings/mmc/brcm,sdhci-brcmstb.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml index cbd3d6c6c77f..404b75fa7adb 100644 --- a/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml +++ b/Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.yaml @@ -13,6 +13,10 @@ maintainers: properties: compatible: oneOf: + - items: + - enum: + - brcm,bcm2712-sdhci + - const: brcm,sdhci-brcmstb - items: - enum: - brcm,bcm7216-sdhci @@ -114,3 +118,22 @@ examples: clocks = <&scmi_clk 245>; clock-names = "sw_sdio"; }; + + - | + #include + soc { + #address-cells = <2>; + #size-cells = <2>; + + mmc@1000fff000 { + compatible = "brcm,bcm2712-sdhci", + "brcm,sdhci-brcmstb"; + reg = <0x10 0x00fff000 0x0 0x260>, + <0x10 0x00fff400 0x0 0x200>; + reg-names = "host", "cfg"; + mmc-ddr-3_3v; + interrupts = ; + clocks = <&clk_emmc2>; + clock-names = "sw_sdio"; + }; + }; From patchwork Fri May 10 14:35:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea della Porta X-Patchwork-Id: 13661687 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9149D170891 for ; Fri, 10 May 2024 14:35:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715351731; cv=none; b=HKOCRR28ITabfbQpPX4bzSz9wkinaQhR0y7mwoAK0q7YjCsAWEi+kRjFZkcdRGhnD9lL6e8rC18BYRkavF3zEl99ITZlE8s0u5xFLQ99k6coHNG4B+42PoirbafQrk8w1iY2pDNeLQMYjDiEC42Mdt6ObxCEvjrLWZggeXuwxhY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715351731; c=relaxed/simple; bh=E7NUkbQ1yYPYk13T3ngej5HA0PiOQTLH4ED/QrY2NS0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D2NE/sRZenxR7QUeICqjueclDSZLQ0kzwOFSp0VFJ8pfCG+EeMF1u1kX0Rd5YNezbXbyDWXZ9pAAmel1dMOkHf0zDHsXGH3+s6+eJ/DB6xYZaEZzDMUHGg2ibb021QPwyEWz2l6GKOyqa8traAC1jCZ4pgtVGBYBXOhjW45QeAk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=GdEhHa1c; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="GdEhHa1c" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a59a0168c75so557289166b.1 for ; Fri, 10 May 2024 07:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1715351728; x=1715956528; darn=vger.kernel.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=XSzJbe+WTx3YozI8N8SsrWCbxRZkF3THuwWmguwkPbs=; b=GdEhHa1cv6nrOXV8JYxxp53rDF6H/yktwVp2/QCqoPaI2enKBovbKGoUpkeq8QtKyM nqBa1UNy8Ga0t5Ff2C60HZHT3RAJ+EJj+MdLawe0sx56R+5K6VQXwnGRz4wrhQiSSo5k jQkU9aWiQh5gkXby4nq0Pgwu5O3/y6Ij6ilaVSLm7RlR1ADNOqCP3Ytqv2BTPkO8gqpD 6b9q/p5UtBRFmAp6irxWs8MceByrfqJ1hrws5/gXeCFKW0TXrL5ybC/eConPDvK/Q5iD V429b9CUNljPT/8QPJkX+YM1MYeIghVvAKeNCHWoA1NiZLJzXYRQIFHvz4mHMCPzsJlx zOQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715351728; x=1715956528; 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=XSzJbe+WTx3YozI8N8SsrWCbxRZkF3THuwWmguwkPbs=; b=mhe4zSAYDzoFVffq8bHZi6KVxplUGoHqyvKjZ/1+IU/qVbhUqN//u8fpcs8jcQlWRY aDLZyiVD4q1GlYK2yP2dFs8bO1Qlx1FXaEr2evk0stcQfN8ykoerIy9BJuFvYW2Vyin+ 4/eelG4uL7kQyQsTTHDpDUqOZYlDWPouDcHU7M7zFYgn3vXN9jWiE4nqhDYMIcvQZnUW qLvWXZ2QUZ6wFc0OZL1YWQAFoEm5WZZPMIKxlDgWtY8oaX/GrtpVCKA0zCfRcdt/tCdq HVps3LLpReir1vRrds6WDbc1yO+qlFmYbXBvmn/v3F5TuD/QcR6LfyJSKj9HjWu4MIzX E+Tw== X-Forwarded-Encrypted: i=1; AJvYcCUaQHInBA7bWp1AoPpnZrkuldgoG7rTr4N48X9+QBHXUilkUi/wzF495MP9+XbkVBfEyPh6SaL/yKaEQJY3hrg6DR7uH7d+MfRX X-Gm-Message-State: AOJu0YyKYs7/lFN47S6iiHbvpOmKg76P4y+tgseQ0b1tDdxsRkC14977 dV95NfXEfeaI7PUVaUKqKcx6BiFyDNibgoGupjJG8ZdLQRyVB8BkdGF1C7lfSsk= X-Google-Smtp-Source: AGHT+IHvNWn+a/E+B1THbrDUUwvq+JSMNDMNjIXDVlIPLuJo/eF+Pd3MYBa8HUbGY5Yt7plZIaokhg== X-Received: by 2002:a50:d710:0:b0:572:1589:eb98 with SMTP id 4fb4d7f45d1cf-5734d5b9098mr2123594a12.12.1715351727997; Fri, 10 May 2024 07:35:27 -0700 (PDT) Received: from localhost (host-95-235-217-160.retail.telecomitalia.it. [95.235.217.160]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733bea65e2sm1878884a12.19.2024.05.10.07.35.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:35:27 -0700 (PDT) From: Andrea della Porta To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Ulf Hansson , Adrian Hunter , Kamal Dasu , Al Cooper , Eric Anholt , Stefan Wahren , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Cc: Andrea della Porta Subject: [PATCH v2 3/4] mmc: sdhci-brcmstb: Add BCM2712 support Date: Fri, 10 May 2024 16:35:29 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Broadcom BCM2712 SoC has an SDHCI card controller using the SDIO CFG register block present on other STB chips. Add support for BCM2712 SD capabilities of this chipset. The silicon is SD Express capable but this driver port does not currently include that feature yet. Based on downstream driver by raspberry foundation maintained kernel. Signed-off-by: Andrea della Porta --- drivers/mmc/host/sdhci-brcmstb.c | 81 ++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c index 9053526fa212..13a1017d53c5 100644 --- a/drivers/mmc/host/sdhci-brcmstb.c +++ b/drivers/mmc/host/sdhci-brcmstb.c @@ -30,6 +30,24 @@ #define SDHCI_ARASAN_CQE_BASE_ADDR 0x200 +#define SDIO_CFG_CQ_CAPABILITY 0x4c +#define SDIO_CFG_CQ_CAPABILITY_FMUL GENMASK(13, 12) + +#define SDIO_CFG_CTRL 0x0 +#define SDIO_CFG_CTRL_SDCD_N_TEST_EN BIT(31) +#define SDIO_CFG_CTRL_SDCD_N_TEST_LEV BIT(30) + +#define SDIO_CFG_MAX_50MHZ_MODE 0x1ac +#define SDIO_CFG_MAX_50MHZ_MODE_STRAP_OVERRIDE BIT(31) +#define SDIO_CFG_MAX_50MHZ_MODE_ENABLE BIT(0) + +#define MMC_CAP_HSE_MASK (MMC_CAP2_HS200_1_8V_SDR | \ + MMC_CAP2_HS200_1_2V_SDR | \ + MMC_CAP2_HS400_1_8V | \ + MMC_CAP2_HS400_1_2V) + +#define MMC_CAP_UHS_MASK (MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR104) + struct sdhci_brcmstb_priv { void __iomem *cfg_regs; unsigned int flags; @@ -38,6 +56,7 @@ struct sdhci_brcmstb_priv { }; struct brcmstb_match_priv { + void (*cfginit)(struct sdhci_host *host); void (*hs400es)(struct mmc_host *mmc, struct mmc_ios *ios); struct sdhci_ops *ops; const unsigned int flags; @@ -139,6 +158,17 @@ static void sdhci_brcmstb_set_clock(struct sdhci_host *host, unsigned int clock) sdhci_enable_clk(host, clk); } +static void sdhci_brcmstb_set_power(struct sdhci_host *host, unsigned char mode, + unsigned short vdd) +{ + struct mmc_host *mmc = host->mmc; + + if (!IS_ERR(mmc->supply.vmmc)) + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd); + + sdhci_set_power_noreg(host, mode, vdd); +} + static void sdhci_brcmstb_set_uhs_signaling(struct sdhci_host *host, unsigned int timing) { @@ -168,6 +198,40 @@ static void sdhci_brcmstb_set_uhs_signaling(struct sdhci_host *host, sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2); } +static void sdhci_brcmstb_cfginit_2712(struct sdhci_host *host) +{ + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); + struct sdhci_brcmstb_priv *brcmstb_priv = sdhci_pltfm_priv(pltfm_host); + u32 hsemmc_mask = MMC_CAP_HSE_MASK; + u32 uhs_mask = MMC_CAP_UHS_MASK; + u32 reg, base_clk_mhz; + + /* + * If we support a speed that requires tuning, + * then select the delay line PHY as the clock source. + */ + if ((host->mmc->caps & uhs_mask) || (host->mmc->caps2 & hsemmc_mask)) { + reg = readl(brcmstb_priv->cfg_regs + SDIO_CFG_MAX_50MHZ_MODE); + reg &= ~SDIO_CFG_MAX_50MHZ_MODE_ENABLE; + reg |= SDIO_CFG_MAX_50MHZ_MODE_STRAP_OVERRIDE; + writel(reg, brcmstb_priv->cfg_regs + SDIO_CFG_MAX_50MHZ_MODE); + } + + if ((host->mmc->caps & MMC_CAP_NONREMOVABLE) || + (host->mmc->caps & MMC_CAP_NEEDS_POLL)) { + /* Force presence */ + reg = readl(brcmstb_priv->cfg_regs + SDIO_CFG_CTRL); + reg &= ~SDIO_CFG_CTRL_SDCD_N_TEST_LEV; + reg |= SDIO_CFG_CTRL_SDCD_N_TEST_EN; + writel(reg, brcmstb_priv->cfg_regs + SDIO_CFG_CTRL); + } + + /* Guesstimate the timer frequency (controller base clock) */ + base_clk_mhz = max_t(u32, clk_get_rate(pltfm_host->clk) / (1000 * 1000), 1); + reg = SDIO_CFG_CQ_CAPABILITY_FMUL | base_clk_mhz; + writel(reg, brcmstb_priv->cfg_regs + SDIO_CFG_CQ_CAPABILITY); +} + static void sdhci_brcmstb_dumpregs(struct mmc_host *mmc) { sdhci_dumpregs(mmc_priv(mmc)); @@ -200,6 +264,14 @@ static struct sdhci_ops sdhci_brcmstb_ops = { .set_uhs_signaling = sdhci_set_uhs_signaling, }; +static struct sdhci_ops sdhci_brcmstb_ops_2712 = { + .set_clock = sdhci_set_clock, + .set_power = sdhci_brcmstb_set_power, + .set_bus_width = sdhci_set_bus_width, + .reset = sdhci_reset, + .set_uhs_signaling = sdhci_set_uhs_signaling, +}; + static struct sdhci_ops sdhci_brcmstb_ops_7216 = { .set_clock = sdhci_brcmstb_set_clock, .set_bus_width = sdhci_set_bus_width, @@ -214,6 +286,11 @@ static struct sdhci_ops sdhci_brcmstb_ops_74165b0 = { .set_uhs_signaling = sdhci_brcmstb_set_uhs_signaling, }; +static const struct brcmstb_match_priv match_priv_2712 = { + .cfginit = sdhci_brcmstb_cfginit_2712, + .ops = &sdhci_brcmstb_ops_2712, +}; + static struct brcmstb_match_priv match_priv_7425 = { .flags = BRCMSTB_MATCH_FLAGS_NO_64BIT | BRCMSTB_MATCH_FLAGS_BROKEN_TIMEOUT, @@ -238,6 +315,7 @@ static struct brcmstb_match_priv match_priv_74165b0 = { }; static const struct of_device_id __maybe_unused sdhci_brcm_of_match[] = { + { .compatible = "brcm,bcm2712-sdhci", .data = &match_priv_2712 }, { .compatible = "brcm,bcm7425-sdhci", .data = &match_priv_7425 }, { .compatible = "brcm,bcm7445-sdhci", .data = &match_priv_7445 }, { .compatible = "brcm,bcm7216-sdhci", .data = &match_priv_7216 }, @@ -370,6 +448,9 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) (host->mmc->caps2 & MMC_CAP2_HS400_ES)) host->mmc_host_ops.hs400_enhanced_strobe = match_priv->hs400es; + if (match_priv->cfginit) + match_priv->cfginit(host); + /* * Supply the existing CAPS, but clear the UHS modes. This * will allow these modes to be specified by device tree From patchwork Fri May 10 14:35:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea della Porta X-Patchwork-Id: 13661688 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D095217109B for ; Fri, 10 May 2024 14:35:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715351733; cv=none; b=Rv5niNFjmkIb4SMW7sU3IdzgBFP8hSBrlG5aaQLsgXMGMAwIZerrzRBzIgxrjwIZ6N6pI/lVkzMolpRlhbjTj/X6WypGvt3mDp0LceEMN50TKx2Vpx++HPGBjLTgXrcbsSaJozPZ93PqwViEaGffxYJgUwK7ydJRgwTAlV5ivNc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715351733; c=relaxed/simple; bh=a/Zm1aOtoF6fTgbVv22pEtGFt0o9J0gPOzdoRW/np7U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OSIprJJqkXQk4vpn7VjtNaixTb1C6Tuo/gLstenwSOskvk/9uFtHjbq0TNCx3kkTjX+6jkJzTchBY6AreS639Ct7MIruGzHjYPzcRAC8yhqq3YaTWe1na6lSE4Am8XhHPW6fxqALbEFkctBIk2Eo6XkIXsizgos2qRa/nsRuKmc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Ppm33PYA; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Ppm33PYA" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a59b58fe083so508812166b.0 for ; Fri, 10 May 2024 07:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1715351729; x=1715956529; darn=vger.kernel.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=Kj/cLDfzxXevCwWbwB3QfsabvjhH4BWkNchBa5h63Sc=; b=Ppm33PYAUhtE0jpwWC2Lp2OEyzjllzZ6qyTJRDGBjxQnHjleXBah1j51OWQId1f8+q h3Umz0yg70XKeVD71qysdj67UHFRn17NCyQ6KKDMdMwKBn+bEcIBp/F2t4aH+lcLUcTn 7+ft1lzYEHzWBFZs6ZY/5Evy9TsD1LGdBFGhI44ItiHO5YhYlpFJjMJIecQYogMzugN+ uDA9BfKMmEL26RU720VGtFWpSCKG7O5TybqpIEviBDIcRYMGgdQQkVXEAfgHcnKUkYt5 62bx3CpF9uodqFOmGaGB4/iaw6K78wLElANQ74KLxnufLRUFbXsYTtq+lzrZZjVGMbg/ B9GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715351729; x=1715956529; 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=Kj/cLDfzxXevCwWbwB3QfsabvjhH4BWkNchBa5h63Sc=; b=nuF8puNfdrO4UMmBhhPZm96WTTWqVdKhnjqpIeMTGEs6pXIjvfhVO7PI3YjigsyMPr TO7saOPkzC/1VZb3ZhVB33UpZJyV9LlDPssekWtLQhse9idAzks14Dq8CIBH5Y1QS28Q Smd6BfNbIDfVEAr6NyKVht5n6/Sq+I/X2D+ZR0fIKnfctylI7+QXs3CD2DYd1wfKepNK qA2AtN2G74Do1HfqFHv/Rj54iQxLe8txdnURSZmWb6bi85n2Oai3aymzFZ0iWvSXl1ni wGJPJ4EPd0zifAfuVXMmMtKi6GaOUJspluGBictpVS6zCdzapEIYt5+/MpPz4i3WFAFg fCIQ== X-Forwarded-Encrypted: i=1; AJvYcCXHeF66IVjhkFY7vxMd2rrk05ItguOK37flMVaDT+VviX/IizlxMVbFNWZmakdL4+F6VxqM2KHjJLaYtKtDix7kGaQWZclES46y X-Gm-Message-State: AOJu0YyuvXWSKIs9hFTo2wIKLWLNQbyPag0QZdCM6zH+PmkDPi8dbEKi wyKTFx6e6YR0EYXyOJ768WqKJFlIOj9vv5mSykrogCgBmm/v9mK8niobL2j8JOU= X-Google-Smtp-Source: AGHT+IHmjCuzjfxjIj9Ldhj8nwcB0t4f8y+uTj99CA3VJX1i4r7PXdGY26CcC0kfylVSjXZC5GzWjA== X-Received: by 2002:a17:906:7fd6:b0:a59:c7d7:8b18 with SMTP id a640c23a62f3a-a5a2d57a3a6mr174201766b.30.1715351729267; Fri, 10 May 2024 07:35:29 -0700 (PDT) Received: from localhost (host-95-235-217-160.retail.telecomitalia.it. [95.235.217.160]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a179c822fsm189865966b.138.2024.05.10.07.35.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:35:28 -0700 (PDT) From: Andrea della Porta To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Ulf Hansson , Adrian Hunter , Kamal Dasu , Al Cooper , Eric Anholt , Stefan Wahren , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Cc: Andrea della Porta Subject: [PATCH v2 4/4] arm64: dts: broadcom: Add support for BCM2712 Date: Fri, 10 May 2024 16:35:30 +0200 Message-ID: <59a3015c3a6f2f0b70a38c030274a163773e7757.1715332922.git.andrea.porta@suse.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The BCM2712 SoC family can be found on Raspberry Pi 5. Add minimal SoC and board (Rpi5 specific) dts file to be able to boot from SD card and use console on debug UART. Signed-off-by: Andrea della Porta --- arch/arm64/boot/dts/broadcom/Makefile | 1 + .../boot/dts/broadcom/bcm2712-rpi-5-b.dts | 62 ++++ arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 302 ++++++++++++++++++ 3 files changed, 365 insertions(+) create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712.dtsi diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile index 8b4591ddd27c..92565e9781ad 100644 --- a/arch/arm64/boot/dts/broadcom/Makefile +++ b/arch/arm64/boot/dts/broadcom/Makefile @@ -6,6 +6,7 @@ DTC_FLAGS := -@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \ bcm2711-rpi-4-b.dtb \ bcm2711-rpi-cm4-io.dtb \ + bcm2712-rpi-5-b.dtb \ bcm2837-rpi-3-a-plus.dtb \ bcm2837-rpi-3-b.dtb \ bcm2837-rpi-3-b-plus.dtb \ diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts new file mode 100644 index 000000000000..b5921437e09f --- /dev/null +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include +#include "bcm2712.dtsi" + +/ { + compatible = "raspberrypi,5-model-b", "brcm,bcm2712"; + model = "Raspberry Pi 5"; + + aliases { + serial10 = &uart0; + }; + + chosen: chosen { + stdout-path = "serial10:115200n8"; + }; + + /* Will be filled by the bootloader */ + memory@0 { + device_type = "memory"; + reg = <0 0 0x28000000>; + }; + + sd_io_1v8_reg: sd-io-1v8-reg { + compatible = "regulator-gpio"; + regulator-name = "vdd-sd-io"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + regulator-settling-time-us = <5000>; + gpios = <&gio_aon 3 GPIO_ACTIVE_HIGH>; + states = <1800000 0x1>, + <3300000 0x0>; + }; + + sd_vcc_reg: sd-vcc-reg { + compatible = "regulator-fixed"; + regulator-name = "vcc-sd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + enable-active-high; + gpios = <&gio_aon 4 GPIO_ACTIVE_HIGH>; + }; +}; + +/* The system UART */ +&uart0 { + status = "okay"; +}; + +/* SDIO1 is used to drive the SD card */ +&sdio1 { + vqmmc-supply = <&sd_io_1v8_reg>; + vmmc-supply = <&sd_vcc_reg>; + bus-width = <4>; + sd-uhs-sdr50; + sd-uhs-ddr50; + sd-uhs-sdr104; +}; diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi new file mode 100644 index 000000000000..398df13148bd --- /dev/null +++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi @@ -0,0 +1,302 @@ +// SPDX-License-Identifier: GPL-2.0 +#include + +/ { + compatible = "brcm,bcm2712"; + + #address-cells = <2>; + #size-cells = <1>; + + interrupt-parent = <&gicv2>; + + axi: axi { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <1>; + ranges; + + sdio1: mmc@1000fff000 { + compatible = "brcm,bcm2712-sdhci", + "brcm,sdhci-brcmstb"; + reg = <0x10 0x00fff000 0x260>, + <0x10 0x00fff400 0x200>; + reg-names = "host", "cfg"; + interrupts = ; + clocks = <&clk_emmc2>; + clock-names = "sw_sdio"; + mmc-ddr-3_3v; + }; + + gicv2: interrupt-controller@107fff9000 { + interrupt-controller; + #interrupt-cells = <3>; + compatible = "arm,gic-400"; + reg = <0x10 0x7fff9000 0x1000>, + <0x10 0x7fffa000 0x2000>, + <0x10 0x7fffc000 0x2000>, + <0x10 0x7fffe000 0x2000>; + interrupts = ; + }; + }; + + clocks { + /* The oscillator is the root of the clock tree. */ + clk_osc: clk-osc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-output-names = "osc"; + clock-frequency = <54000000>; + }; + + clk_vpu: clk-vpu { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <750000000>; + clock-output-names = "vpu-clock"; + }; + + clk_uart: clk-uart { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <9216000>; + clock-output-names = "uart-clock"; + }; + + clk_emmc2: clk-emmc2 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <200000000>; + clock-output-names = "emmc2-clock"; + }; + }; + + cpus: cpus { + #address-cells = <1>; + #size-cells = <0>; + + /* Source for d/i cache-line-size, cache-sets, cache-size + * https://developer.arm.com/documentation/100798/0401 + * /L1-memory-system/About-the-L1-memory-system?lang=en + */ + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a76"; + reg = <0x000>; + enable-method = "psci"; + d-cache-size = <0x10000>; + d-cache-line-size = <64>; + d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set + i-cache-size = <0x10000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set + next-level-cache = <&l2_cache_l0>; + }; + + cpu1: cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a76"; + reg = <0x100>; + enable-method = "psci"; + d-cache-size = <0x10000>; + d-cache-line-size = <64>; + d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set + i-cache-size = <0x10000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set + next-level-cache = <&l2_cache_l1>; + }; + + cpu2: cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a76"; + reg = <0x200>; + enable-method = "psci"; + d-cache-size = <0x10000>; + d-cache-line-size = <64>; + d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set + i-cache-size = <0x10000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set + next-level-cache = <&l2_cache_l2>; + }; + + cpu3: cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a76"; + reg = <0x300>; + enable-method = "psci"; + d-cache-size = <0x10000>; + d-cache-line-size = <64>; + d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set + i-cache-size = <0x10000>; + i-cache-line-size = <64>; + i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set + next-level-cache = <&l2_cache_l3>; + }; + + /* Source for cache-line-size and cache-sets: + * https://developer.arm.com/documentation/100798/0401 + * /L2-memory-system/About-the-L2-memory-system?lang=en + * and for cache-size: + * https://www.raspberrypi.com/documentation/computers + * /processors.html#bcm2712 + */ + l2_cache_l0: l2-cache-l0 { + compatible = "cache"; + cache-size = <0x80000>; + cache-line-size = <128>; + cache-sets = <1024>; // 512KiB(size)/64(line-size)=8192ways/8-way set + cache-level = <2>; + cache-unified; + next-level-cache = <&l3_cache>; + }; + + l2_cache_l1: l2-cache-l1 { + compatible = "cache"; + cache-size = <0x80000>; + cache-line-size = <128>; + cache-sets = <1024>; // 512KiB(size)/64(line-size)=8192ways/8-way set + cache-level = <2>; + cache-unified; + next-level-cache = <&l3_cache>; + }; + + l2_cache_l2: l2-cache-l2 { + compatible = "cache"; + cache-size = <0x80000>; + cache-line-size = <128>; + cache-sets = <1024>; // 512KiB(size)/64(line-size)=8192ways/8-way set + cache-level = <2>; + cache-unified; + next-level-cache = <&l3_cache>; + }; + + l2_cache_l3: l2-cache-l3 { + compatible = "cache"; + cache-size = <0x80000>; + cache-line-size = <128>; + cache-sets = <1024>; // 512KiB(size)/64(line-size)=8192ways/8-way set + cache-level = <2>; + cache-unified; + next-level-cache = <&l3_cache>; + }; + + /* Source for cache-line-size and cache-sets: + * https://developer.arm.com/documentation/100453/0401/L3-cache?lang=en + * Source for cache-size: + * https://www.raspberrypi.com/documentation/computers/processors.html#bcm2712 + */ + l3_cache: l3-cache { + compatible = "cache"; + cache-size = <0x200000>; + cache-line-size = <64>; + cache-sets = <2048>; // 2MiB(size)/64(line-size)=32768ways/16-way set + cache-level = <3>; + cache-unified; + }; + }; + + psci { + method = "smc"; + compatible = "arm,psci-1.0", "arm,psci-0.2", "arm,psci"; + cpu_on = <0xc4000003>; + cpu_suspend = <0xc4000001>; + cpu_off = <0x84000002>; + }; + + rmem: reserved-memory { + #address-cells = <2>; + #size-cells = <1>; + ranges; + + atf@0 { + reg = <0x0 0x0 0x80000>; + no-map; + }; + + cma: linux,cma { + compatible = "shared-dma-pool"; + size = <0x4000000>; /* 64MB */ + reusable; + linux,cma-default; + alloc-ranges = <0x0 0x00000000 0x40000000>; + }; + }; + + soc: soc@107c000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + + ranges = <0x7c000000 0x10 0x7c000000 0x04000000>; + /* Emulate a contiguous 30-bit address range for DMA */ + dma-ranges = <0xc0000000 0x00 0x00000000 0x40000000>, + <0x7c000000 0x10 0x7c000000 0x04000000>; + + system_timer: timer@7c003000 { + compatible = "brcm,bcm2835-system-timer"; + reg = <0x7c003000 0x1000>; + interrupts = , + , + , + ; + clock-frequency = <1000000>; + }; + + mailbox: mailbox@7c013880 { + compatible = "brcm,bcm2835-mbox"; + reg = <0x7c013880 0x40>; + interrupts = ; + #mbox-cells = <0>; + }; + + local_intc: local-intc@7cd00000 { + compatible = "brcm,bcm2836-l1-intc"; + reg = <0x7cd00000 0x100>; + }; + + uart0: serial@7d001000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x7d001000 0x200>; + interrupts = ; + clocks = <&clk_uart>, <&clk_vpu>; + clock-names = "uartclk", "apb_pclk"; + arm,primecell-periphid = <0x00241011>; + status = "disabled"; + }; + + interrupt-controller@7d517000 { + compatible = "brcm,bcm7271-l2-intc"; + reg = <0x7d517000 0x10>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <1>; + status = "disabled"; + }; + + gio_aon: gpio@7d517c00 { + compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio"; + reg = <0x7d517c00 0x40>; + gpio-controller; + #gpio-cells = <2>; + // Don't use GIO_AON as an interrupt controller because it will + // clash with the firmware monitoring the PMIC interrupt via the VPU. + brcm,gpio-bank-widths = <17 6>; + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = , + , + , + ; + /* This only applies to the ARMv7 stub */ + arm,cpu-registers-not-fw-configured; + }; +};