From patchwork Wed Oct 16 06:41:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13837789 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 3605FD206A1 for ; Wed, 16 Oct 2024 06:47: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:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=76iS9IrOL+avAFMLHux4lzigT6bPCj+idYdT2QESLs4=; b=gHrq1CGLXhyM1JYKBQJTmok0oC MHwk1n/TYMWuIPbBc0JBmxCz+3gnl7nxzgBcCNKCVXx91BAIdvCrVsX7ooWZihEXzE8sUtkqIaGUv iFSYKdTblJAMChN3zpwj2S/6ZB/7L6rgUH1+UyF5pIqO0iK/Euu8mHpuvchmATdD5chPTXVXRmlBS 3gSCriePr1E6T8vgDSzEP7ZFNkyGZLcq1+AWpcg2XfBCt1Z0/6khvldBy0smqyIpFdvxZT4qMgeMx 62SAUKtAQn8Yhi2DBTWt9nyXW4HvZV4zq8AOmCiHsGPKLz42qg5mCDoZ3Le3ILMIsFi1V1TaKM2hx VW2Vuy3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0xoF-0000000AjBU-0oqh; Wed, 16 Oct 2024 06:47:03 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0xiZ-0000000Ai1U-2Y5l for linux-arm-kernel@lists.infradead.org; Wed, 16 Oct 2024 06:41:13 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-539e59dadebso4996566e87.0 for ; Tue, 15 Oct 2024 23:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729060869; x=1729665669; darn=lists.infradead.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=76iS9IrOL+avAFMLHux4lzigT6bPCj+idYdT2QESLs4=; b=qigwqe8WMZrbUGLH13fUJvcTbzm6Dke3Oq+1DFgZJHMT/MJJQMdtKjQNrGB+ppStr8 YGVOFZqeYWAaEbQxsbwEaPCLoM8vC0Jc9F3ybk5sXMQ5RoCn2KwHrDNrtBdF85LW5awm BZ7q3GY25kfEwPWk/9jyQu0QWVpkJqkSl2xw3sMmn3VuheESGhnHoGBGWqXeHBhHGHbI LVTSR0MMidlfny7LfL6prt286T45bsEXFHHXBOZ31oVlw7MwHcBisro+2Na9GLEQHLKB 6Zd7dHkkhCp2uUWvPGyyGisd0RTjha4Vd6dK3rgdopfenbfbuiR8exGyo3W7b9a7yVSb Bxfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729060869; x=1729665669; 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=76iS9IrOL+avAFMLHux4lzigT6bPCj+idYdT2QESLs4=; b=BBzaVyQNK/r8v0vRrqP+OJ5T1vJnzcta+kgT20r2COTc/TjLz23xF0kXaz3s8gntW8 FM98TUTD9MxIyhw0J1E4b+wVIfZQwgwiSy5fGdu7bmlU9W+xlR1oyYQK+sOMPXEaHcu8 inlyHeliC1hyE5a9z3xsKzKOKS5h0brZgFPlF63/9KMlssEfaRIPOHT1a7kEUAREucIa 9kntgsMPWEDd3zpmpqwpDa7fBor9Nra2Wwexrsm3OFr7Nd44p13+wVzOGo5nGr+Cd8Gf QbTc15Hi3wTMZVNhqNmKOGC/YdbeaTjrekQMVa1IPNzRe+MoqpF6yd/NQWfjCvsCFmxp RjIw== X-Forwarded-Encrypted: i=1; AJvYcCWYiElCmsLrGFNwB+lNHfPsXZqZ9ikIzmeY/q8aCzAQocxO5/mABWnyl82EjHzG2WTN1hCI7r+Esn3Dp80AjplR@lists.infradead.org X-Gm-Message-State: AOJu0Yz/MrTvxkDl99V6V3KSAhcvXszX82I9Q8o04EiPZpqQEOuXdn4x EamOVnjtHbnauoq9adFYtcozqg4YqYbn714wgXepp+hkkIx8guESLqbNwDdPohU= X-Google-Smtp-Source: AGHT+IEJOVgamV8wficgril0A/XHS66F8ZBL3GF0JLpQ5IcOYUi0lgofBGAxFDrEK6VhHiBb/zrjOg== X-Received: by 2002:a05:6512:1051:b0:539:ed5e:e226 with SMTP id 2adb3069b0e04-53a03f2d493mr1980868e87.26.1729060869502; Tue, 15 Oct 2024 23:41:09 -0700 (PDT) Received: from lino.lan ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-539ffff3a50sm357455e87.144.2024.10.15.23.41.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 23:41:08 -0700 (PDT) From: Linus Walleij Date: Wed, 16 Oct 2024 08:41:03 +0200 Subject: [PATCH v2 3/9] ARM: dts: bcm6846: Add GPIO blocks MIME-Version: 1.0 Message-Id: <20241016-genexis-xg6846b-base-v2-3-6a7cc2ee57eb@linaro.org> References: <20241016-genexis-xg6846b-base-v2-0-6a7cc2ee57eb@linaro.org> In-Reply-To: <20241016-genexis-xg6846b-base-v2-0-6a7cc2ee57eb@linaro.org> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , William Zhang , Anand Gore , Kursad Oney , Florian Fainelli , =?utf-8?b?UmFmYcWCIE1p?= =?utf-8?b?xYJlY2tp?= , Benjamin Larsson , Broadcom internal kernel review list Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linus Walleij X-Mailer: b4 0.14.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241015_234111_950832_B8D188B5 X-CRM114-Status: GOOD ( 11.67 ) 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 The BCM6846 has the same simplistic GPIOs as some other Broadcom SoCs: plain memory-mapped registers with up to 8 blocks of 32 GPIOs each totalling 256 GPIOs. Users of the SoC can selectively enable the GPIO blocks actually used with a certain design. Signed-off-by: Linus Walleij --- arch/arm/boot/dts/broadcom/bcm6846.dtsi | 80 +++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/arch/arm/boot/dts/broadcom/bcm6846.dtsi b/arch/arm/boot/dts/broadcom/bcm6846.dtsi index f4f1f3a06eac..dc0c87c79569 100644 --- a/arch/arm/boot/dts/broadcom/bcm6846.dtsi +++ b/arch/arm/boot/dts/broadcom/bcm6846.dtsi @@ -104,6 +104,86 @@ watchdog@480 { reg = <0x480 0x10>; }; + /* 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"; + }; + uart0: serial@640 { compatible = "brcm,bcm6345-uart"; reg = <0x640 0x1b>;