From patchwork Sat Oct 19 20:39:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13842906 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 44883D3C92C for ; Sat, 19 Oct 2024 20:45:46 +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=Yw13KjrULp3LV0D+B9twkzERNz FmcN83Clj1qnoXLHmhlopqRcvzeCZiaSitdBImpUXZ5TGF9UAzkVX3zhRWXsxN4Mk0VwhW3lR+CTv E7kya8z5/IwhVDkhL/adYFAtKt/NLbXmZFZWzuISuZ6sRt2HusUuqhJCb6CMHlJU7K8CJNwGKXVgc 9ETvgs570cMN2HTmG6Q4T/1Ex1udu0GJ3pdKNuyYNKGiBYcLeDAK/xE+KBAcaS58CvJlbh/+B9Nny 7IRRGlSugMeuacvMc3PnM+ONiC3NxDZW+2swp8dyh5LrHZKljWDeRbHy1ejj4DI2K3NdLTjpel/sr h2aVDeHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2GKL-00000003uEt-1v1O; Sat, 19 Oct 2024 20:45:33 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2GEc-00000003taB-1mWP for linux-arm-kernel@lists.infradead.org; Sat, 19 Oct 2024 20:39:39 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-539e13375d3so3548461e87.3 for ; Sat, 19 Oct 2024 13:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729370376; x=1729975176; 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=XbH9hynKwkH43z2u9w+OhDtgo+M5SUJ/Os6Xsr0iekPc2LsHlPv2znBLnm6/q8hjxS 7vwpPGqiy8TM8nPSllFoWva1p+VfzxrDZC7u4/xnfl/LI97OzYgSkf5j+Z+wfgZabzIz qIbUOBn6L6QksYA8v/DgRDGenUzQPCWKPSuKQ74oD0KXpy7P4Jkbw7FyTYVaGTwC9biN qcvnYg23jBfpTnqQprEMhsL03U6aJro9jBnoVuMx8cwNXeE50PeO4E78IO5p6C2G21Kj Q0HtOXjRhZiHp3KAo5/2o8HVFL4QDv0RbI5g2ryni82tG6ZSTsmzxXt3UZ4RK7jgm9KC UOWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729370376; x=1729975176; 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=LRfMblWkBrcsn8iFfFtGUWlmsru84YpCf/nRvT2yga2slR9PELV3P4vWQ5vr4dHsab 42zDDjPuh7JZuNh58e+cOPSgap/xXn5GbR0GrZhPjwQPOe9HNVXEUCKzBzCMG2moSWfp d4dBEcocMpzxLlTqDkpP6YeWy6btaY+BayTp3ja1D8L5zA/B8Cg5jUAPCAyjEum9amCh R1fBQiQuDQRGQSwsX9uVaromNW23OTKJcq1R5OkHZgA/vuQZcl2rAgUzj/0KlRVLMzWr DT0fA8bG3S/vTBQqCMp7ThjfcjOGXqUy0d2+nv7z02dajrbcTy8XB30tEsMFSfjPBQfk UXKg== X-Forwarded-Encrypted: i=1; AJvYcCUfndRet0E2ghW22ePQ+q51kHiu1Flx78avfc1RQNEUFtM2EaKuVnZIAd45EoBITeIuMAH1GM11ZtxwRF7r0c4n@lists.infradead.org X-Gm-Message-State: AOJu0YzhxtrPaWPW8LXNnsI2eFenuY8ohfUJNAuHeTD8VmyznXj82n+d GGWTURBGQWAyGmFz1sKQTJG5g/mEdgQzeIRXTvc2rvu4FdiOI24m0H+ZbzSTzz0= X-Google-Smtp-Source: AGHT+IEB3/yGsKyTFxUImL1LWLXOOOvApVg1cvzkjIgd+yHxxvNS365uAL/Zw4hAqdeVv9cQlQSzNQ== X-Received: by 2002:a05:6512:1055:b0:539:fbfa:4a9f with SMTP id 2adb3069b0e04-53a1550ca17mr3358502e87.58.1729370376472; Sat, 19 Oct 2024 13:39:36 -0700 (PDT) Received: from lino.lan ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53a224202d5sm37564e87.136.2024.10.19.13.39.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2024 13:39:35 -0700 (PDT) From: Linus Walleij Date: Sat, 19 Oct 2024 22:39:32 +0200 Subject: [PATCH v3 3/9] ARM: dts: bcm6846: Add GPIO blocks MIME-Version: 1.0 Message-Id: <20241019-genexis-xg6846b-base-v3-3-8375a0e1f89f@linaro.org> References: <20241019-genexis-xg6846b-base-v3-0-8375a0e1f89f@linaro.org> In-Reply-To: <20241019-genexis-xg6846b-base-v3-0-8375a0e1f89f@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-20241019_133938_499598_6256744C X-CRM114-Status: GOOD ( 11.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 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>;