From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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 06690212B15 for ; Fri, 28 Mar 2025 07:44:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743147867; cv=none; b=SZuF0FAt9KCzw5hDrDVM1ia46VMH2JzAnXekld5qC1dlqdUVYm1cij70fr8qeHXMAksK9SV2u2E54Ed1t7hwdbuz1pXOP3q8j/JcF72uhM1L4VyL+oGaDPvhBMUDKRRmsQTjbDnnS9lLx4PuUW6UnEv+jkziWI9iSUWthI7Qnuo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743147867; c=relaxed/simple; bh=q2PmTDQegE/isnKM1Da4UKDK69dR4SgFV6YzECB6JsE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lMKhT8Q91Hx39IP9Z7du3GUDxMdohot2HNvvpQYFkDrEx/b9p2aCMmjCdLTyEVTDKtkj/7OghtYPkuONXuCkKkFnveX4oEGRzuXHyZQ9ssB43gGxo8+giiToeQpgLZEF1bz4JF7iJJeEkapCt3yLpdgztagqew02DTO8Ibb/FV0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=JIRCopL4; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="JIRCopL4" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-54954fa61c9so2039315e87.1 for ; Fri, 28 Mar 2025 00:44:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1743147862; x=1743752662; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zArY1PRZ2YS97S9H1azNoi4GZH8ue6vwYjHQDksS40s=; b=JIRCopL44SKE/Cxrs2CGO/WPKhqebwkwbuw44LsGbUOu5x54IFYjiHhvlbuzjpG3wu vFJBRl4jXNnVmPhWaUNRtdlZVDe4gXknl8ENoPF3HjCHe8CyhDfjiAk8krUto6tmTv5V UftKKg0DKX+m5UBoV/azsRAv9yiVQDbUi+/LOb9A4BB1OMefel14fopKBLmpR9DAALUL RThXcX3bDkmjjhyr4pdZIV49+31QxJw/20gB5By9CGIY7XKuz1+MCk702/8WxMlZfdqt tPLEbo/azHUObtTGTnOgGI9J5y8FUqqcpeNx5bdDap6nrAi2sULhOezM1hzoSelec+7v I36w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743147862; x=1743752662; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zArY1PRZ2YS97S9H1azNoi4GZH8ue6vwYjHQDksS40s=; b=F8P33tCK/vzv2OaG4YOi3Z+Jkd+xZOp+cEp9TpUHY9xWSunRAC0ew9023n/h3KYg7s W12oirY+VU2DwBfVmLyVy25IBTvSPzHSABakXh5Snnky8Py/iZmdvxNyv0P862b4rWUH F4wnpDhOk7ZmkqlulYtB01UBtXEPhCXBnFMRmJaCuPA84L1N5bLvrc3OM88IYZL5enCP Lbt1W0BQlOS/8ijzoRBuc8jj904pIjqyhVrd4ATclv8BMFyQdTIGO9dPqsLXVBeo1TOb J9rRIvazNnvY7aJya2g6O9znepWkiP0SZDt8WvdAFe4J++K9e/LD/saIesXOdFUOjNsy v+cA== X-Gm-Message-State: AOJu0YxMDqYS2ENDhxdKJHGOQPWtrf3YqqjA9FxTk9YydtxNNYaVaOFq SBB7y9zGV2CAOhAz8X0ofGFdm9GKLvO7bSrA5g0fhV1Keo18kXx7bLNkuOqUPao= X-Gm-Gg: ASbGnctcmBIGIEUTydCzqqarYk7kW1Kl/wJ7d5R+g3XWSmuQZHMBOV4Ov8AXYaybQHm WbPN5JkuQGcAnlMwmEwr9vHr+OZS0eXdtensz92qZ3rfIwnkqUAV9OD+MmIciWJQdr8oYUnUQsK DrVnXXBAggbQMGMew7LTFReMZuCxTePrUaTC0jAujD1a55q65uZ8xNHERxUe15uLCDMIDXrROVd AVJGrB9t/v3XYf4EJ0150akKQRvLyr8zRpXcf87pd4TZoLJSQiUwdvWjORSiVooyabMurk3+XH5 hV21ZErbKnOTjvrvCQdziTHCvvd25L6xQLGUbfTeZrAfGqQTt0ju7YAV/oRec8NytQ== X-Google-Smtp-Source: AGHT+IGmha8Fr2gz/FUW8U8A5VVRA9bYdMwRke2TGOO5wTQdAYbyURhNf7j91OLXxy4jdG7Mg7idRQ== X-Received: by 2002:a05:6512:159f:b0:545:54b:6a05 with SMTP id 2adb3069b0e04-54b012668cemr2795574e87.45.1743147862054; Fri, 28 Mar 2025 00:44:22 -0700 (PDT) Received: from [192.168.1.140] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54b094bb32esm215589e87.26.2025.03.28.00.44.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Mar 2025 00:44:20 -0700 (PDT) From: Linus Walleij Date: Fri, 28 Mar 2025 08:44:02 +0100 Subject: [PATCH 12/12] ARM64: dts: bcm63158: Add BCMBCA peripherals Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250328-bcmbca-peripherals-arm-v1-12-e4e515dc9b8c@linaro.org> References: <20250328-bcmbca-peripherals-arm-v1-0-e4e515dc9b8c@linaro.org> In-Reply-To: <20250328-bcmbca-peripherals-arm-v1-0-e4e515dc9b8c@linaro.org> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , William Zhang , Anand Gore , Kursad Oney , Florian Fainelli , =?utf-8?q?Rafa=C5=82_Mi=C5=82ecki?= , Broadcom internal kernel review list , Olivia Mackall , Ray Jui , Scott Branden , Florian Fainelli Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, Linus Walleij X-Mailer: b4 0.14.2 All the BCMBCA SoCs share a set of peripherals at 0xff800000, albeit at slightly varying memory locations on the bus and with varying IRQ assignments. On BCM63158 the PERF window was too big so adjust it down to its real size (0x3000). Add the watchdog, GPIO blocks, RNG, LED, second UART and DMA blocks for the BCM63158 based on the vendor files 63158_map_part.h and 63158_intr.h from the "bcmopen-consumer" code drop. The DTSI file has clearly been authored for the B0 revision of the SoC: there is an earlier A0 version, but this has the UARTs in the legacy PERF memory space, while the B0 has opened a new peripheral window at 0xff812000 for the three UARTs. It also has a designated AHB peripheral area at 0xff810000 where the DMA resides, so we create new windows for these two peripheral group reflecting the internal structure of the B0 SoC. This SoC has up to 256 possible GPIOs due to having 8 registers with 32 GPIOs in each available. Signed-off-by: Linus Walleij --- arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi | 150 +++++++++++++++++++++- 1 file changed, 147 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi index 48d618e75866452a64adfdc781ac0ea3c2eff3e8..a47c5d6d034a7ae56803a651636148383acb8cc9 100644 --- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi @@ -1,6 +1,7 @@ // SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright 2022 Broadcom Ltd. + * This DTSI is for the B0 and later revision of the SoC */ #include @@ -119,11 +120,107 @@ gic: interrupt-controller@1000 { }; }; + /* PERF Peripherals */ bus@ff800000 { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - ranges = <0x0 0x0 0xff800000 0x800000>; + ranges = <0x0 0x0 0xff800000 0x3000>; + + /* GPIOs 0 .. 31 */ + gpio0: gpio@500 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x500 0x04>, <0x520 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 32 .. 63 */ + gpio1: gpio@504 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x504 0x04>, <0x524 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 64 .. 95 */ + gpio2: gpio@508 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x508 0x04>, <0x528 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 96 .. 127 */ + gpio3: gpio@50c { + compatible = "brcm,bcm6345-gpio"; + reg = <0x50c 0x04>, <0x52c 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 128 .. 159 */ + gpio4: gpio@510 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x510 0x04>, <0x530 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 160 .. 191 */ + gpio5: gpio@514 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x514 0x04>, <0x534 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 192 .. 223 */ + gpio6: gpio@518 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x518 0x04>, <0x538 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + /* GPIOs 224 .. 255 */ + gpio7: gpio@51c { + compatible = "brcm,bcm6345-gpio"; + reg = <0x51c 0x04>, <0x53c 0x04>; + reg-names = "dirout", "dat"; + gpio-controller; + #gpio-cells = <2>; + status = "disabled"; + }; + + + leds: led-controller@800 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "brcm,bcm63138-leds"; + reg = <0x800 0xdc>; + status = "disabled"; + }; + + rng@b80 { + compatible = "brcm,iproc-rng200"; + reg = <0xb80 0x28>; + interrupts = ; + }; hsspi: spi@1000 { #address-cells = <1>; @@ -150,14 +247,61 @@ nandcs: nand@0 { reg = <0>; }; }; + }; + + /* B0 AHB Peripherals */ + bus@ff810000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x0 0xff810000 0x2000>; + + pl081_dma: dma-controller@1000 { + compatible = "arm,pl081", "arm,primecell"; + // The magic B105F00D info is missing + arm,primecell-periphid = <0x00041081>; + reg = <0x1000 0x1000>; + interrupts = ; + memcpy-burst-size = <256>; + memcpy-bus-width = <32>; + clocks = <&periph_clk>; + clock-names = "apb_pclk"; + #dma-cells = <2>; + }; + }; + + /* B0 ARM UART Peripheral block */ + bus@ff812000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x0 0xff812000 0x3000>; - uart0: serial@12000 { + uart0: serial@0 { compatible = "arm,pl011", "arm,primecell"; - reg = <0x12000 0x1000>; + reg = <0x0 0x1000>; interrupts = ; clocks = <&uart_clk>, <&uart_clk>; clock-names = "uartclk", "apb_pclk"; status = "disabled"; }; + + uart1: serial@1000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x1000 0x1000>; + interrupts = ; + clocks = <&uart_clk>, <&uart_clk>; + clock-names = "uartclk", "apb_pclk"; + status = "disabled"; + }; + + uart2: serial@2000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x2000 0x1000>; + interrupts = ; + clocks = <&uart_clk>, <&uart_clk>; + clock-names = "uartclk", "apb_pclk"; + status = "disabled"; + }; }; }; -- 2.48.1