From patchwork Fri Feb 21 20:32:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artur Weber X-Patchwork-Id: 867537 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (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 B4252254AED; Fri, 21 Feb 2025 20:32:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740169976; cv=none; b=o2AiwGeFFkxwtO2iZ88Xax1/1Uf8Y/dt1J7kIRP2Pbx/YjWVCjD15u+VjQYCsjCQ8E3RQPes34fsV0rEU6EMjpcrqeIY/QaYpA1nllmDe3GphJZwBtAgHaVUb3/zNfZkRbUshwmUqm41QsV5N/3b42mmsB5uHMoeVA0hEOGpXY4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740169976; c=relaxed/simple; bh=PoeeTQAJjZ5RdKFBcSwIbKAekpRiUcC0+f84D/Pj5vE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rD6OubIiwfvAvY5sTMKxHmCHsZGtoYAr92BUw4fniXr4A5xZAHNWO/1tJDmYSB+I79CGykPy+Oy+ehCa5KWxZRoiZQHrG+CrhjY8N0kDCt20V3kdlEYAQwovxoAN3bnYtGeEnu1p56jWsVk+QrwDw8oPdwR5SIgm5azMaVDbj+8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jlcx8//u; arc=none smtp.client-ip=209.85.208.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jlcx8//u" Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5e04cb346eeso4163249a12.2; Fri, 21 Feb 2025 12:32:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740169973; x=1740774773; 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=1pvaaqiA/SmRoJNAwsNTHeXGNX/6oeYrcqiqLNPnA9o=; b=jlcx8//uJbfcmkgHONTE0ejGXsxM4W40g1zIqOSLWIxevSstrOaSvblUi0DZQ53Z4d iMr7BPvEvAwzh7mDFDzp2scB1R7tEpJctjhRT2A1zeoeGhX7NW5irSVmZ4rOQC7p8dyl qQLgPrEf/53kNcPPJL+urjbs91c7VC7Ieu8ihRQWBEJDJTXNi9szy2tjGZa1ft3/sOmL jzNOJFKjoGhUJNmkQ+Bc4Vw7BjjmP+n7Fo9Wpr9kfyHJ9RBh90kWVWzYa3u1oVeEYNEv 3AZWTOU/DliLKdfG4VqHyTQ5g2cMwa37TsAlyEaMsrTLOqCeAQ8rIz0GFsP0Fp8m5pZR TFuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740169973; x=1740774773; 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=1pvaaqiA/SmRoJNAwsNTHeXGNX/6oeYrcqiqLNPnA9o=; b=mbjOr5lTLq8BzPR4psTVRzCt4rFzWpcoSMWRcMRv6nn8dzadXJUdzTza0geJfktlbY wQH2jo80WLubuV3bjzzOVAhOaFX8ZKyJ3/od6pIR7fs8AG/IgEc4KqloJOVWeAsZc5EC y6u1TDmeEaiJ/rSLcfp+MmhBY2ExKobKdNFilw+jk7ws9SjYJPdiPPUpuN6WGhDoyOqZ kNyvpHsRVxx9SFOH8knnbdEsioRU9pf+F0JwOE5e0wjWzxmShclACoDUyDDQjeJiy23x TQoWIM3sBB5gxFBw2nfVwVjD697Lg5MUDWPGAPb3SpmN0W80XDXJW/XAo0J9s1+5r4UT JaWw== X-Forwarded-Encrypted: i=1; AJvYcCWuTy90rQFE9pELxGbqWt040ifL76iPdC059dCol+XazpOezSCA9BiGwtYMY9wZRI9o74Cn5HAD1QEf@vger.kernel.org, AJvYcCWwd+KLbV7unjLld8vX7io7WZPpKTRH8fRGkgmEQAzXnnAnpAv+O69EHaWJrS9ig2Y5LD+AnkEUyerWVTTj@vger.kernel.org X-Gm-Message-State: AOJu0YxO5Ub8PsZjb+lcVfp40j4wFiCpDhcydGKJWYm7pTjz8uWMzFR+ a6VZ+SZtjvgW6YZBYgG4xSgXhwjlwa0N82CS7jK6dlDg63JGRvmwAKyyYQ== X-Gm-Gg: ASbGnctvjNf2ESsw8H95iL6C+Z8vb15FFaUpzsfMGispQGw5+J7QlSZzFb8IEniUJtG jcykx3tvsS7WPXaQ+4267Gs5VoFnRQ/U32JJ7Gf6Nb7VnOQCgWBNzKrELH/I8HTIbAdAkMTMpeP papvtf/WiuDElErHgqc3Vi2dUKmpFZc2Pq21BR5mRlYXBiIS4HSFw03tePuTP6PQRrHr0rXnYDu XH3ujx0GcGz7YZ/KwM0RrA9daNW9UInKQ1Ota9WJCy+vjZCf6hIwgK1Tn9BKDcj92iC3YYBJ8Jm DIphtid61dqiwv2Wj7sFroLKbErPCvDjNr/CDHZZTRmOt4LESfkmCrgkgFpK0UCzh6RHftjW X-Google-Smtp-Source: AGHT+IG8svSNh/gYeOBTqhQ8L5Z26mBOThRhLDOKdDTtl2i++2iJPATf7jNc/coLmYedzNMKZxPuAA== X-Received: by 2002:a05:6402:5192:b0:5de:4f37:e59c with SMTP id 4fb4d7f45d1cf-5e0b724782amr4219796a12.31.1740169972869; Fri, 21 Feb 2025 12:32:52 -0800 (PST) Received: from hex.my.domain (83.8.202.192.ipv4.supernova.orange.pl. [83.8.202.192]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5dece1c418bsm14653485a12.24.2025.02.21.12.32.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2025 12:32:52 -0800 (PST) From: Artur Weber Date: Fri, 21 Feb 2025 21:32:42 +0100 Subject: [PATCH v2 6/6] ARM: dts: bcm2166x: Add bcm2166x-pinctrl DTSI Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250221-bcm21664-pinctrl-v2-6-7d1f0279fe16@gmail.com> References: <20250221-bcm21664-pinctrl-v2-0-7d1f0279fe16@gmail.com> In-Reply-To: <20250221-bcm21664-pinctrl-v2-0-7d1f0279fe16@gmail.com> To: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stanislav Jakubek , ~postmarketos/upstreaming@lists.sr.ht, Artur Weber X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1740169959; l=7006; i=aweber.kernel@gmail.com; s=20231030; h=from:subject:message-id; bh=PoeeTQAJjZ5RdKFBcSwIbKAekpRiUcC0+f84D/Pj5vE=; b=zlHYkjc9MveY75Vzf279SZEL8zo1UrW74RttN4qfEkj8EQd/GvUY6pm98QsjvEAOjreBhiXbx /0PJXFlhOgeACkWOYaL/NeOugqp7mwMACJ6zcDULsBLMj7+0miqiOkn X-Developer-Key: i=aweber.kernel@gmail.com; a=ed25519; pk=RhDBfWbJEHqDibXbhNEBAnc9FMkyznGxX/hwfhL8bv8= Add common DTSI with common pin control configs for BCM21664/BCM23550 and include it in bcm2166x-common.dtsi. The configs are kept in a separate DTSI to keep things cleaner (pin config definitions take up quite a lot of space). Currently contains pins for BSC buses and SD/MMC; more pins can be added in the future. Signed-off-by: Artur Weber --- arch/arm/boot/dts/broadcom/bcm2166x-common.dtsi | 2 + arch/arm/boot/dts/broadcom/bcm2166x-pinctrl.dtsi | 297 +++++++++++++++++++++++ 2 files changed, 299 insertions(+) diff --git a/arch/arm/boot/dts/broadcom/bcm2166x-common.dtsi b/arch/arm/boot/dts/broadcom/bcm2166x-common.dtsi index d4b412ac8b0343bd3773f50c59a20fa00a3923f8..f535212cb52fec0668abfc06e7268bead70d958a 100644 --- a/arch/arm/boot/dts/broadcom/bcm2166x-common.dtsi +++ b/arch/arm/boot/dts/broadcom/bcm2166x-common.dtsi @@ -337,3 +337,5 @@ master_ccu: master_ccu@3f001000 { }; }; }; + +#include "bcm2166x-pinctrl.dtsi" diff --git a/arch/arm/boot/dts/broadcom/bcm2166x-pinctrl.dtsi b/arch/arm/boot/dts/broadcom/bcm2166x-pinctrl.dtsi new file mode 100644 index 0000000000000000000000000000000000000000..51b8730c8feea501f2c5ca6a7bad8233ed708c82 --- /dev/null +++ b/arch/arm/boot/dts/broadcom/bcm2166x-pinctrl.dtsi @@ -0,0 +1,297 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Common pinmux configrations for BCM2166x (BCM21664/BCM23550). + * + * Copyright (C) 2025 Artur Weber + */ + +&pinctrl { + /* BSC1 */ + bsc1_pins: bsc1-pins { + bsc1clk-grp0 { + pins = "bsc1clk"; + function = "alt1"; /* BSC1CLK */ + }; + + bsc1dat-grp0 { + pins = "bsc1dat"; + function = "alt1"; /* BSC1DAT */ + }; + }; + + /* BSC2 */ + bsc2_pins: bsc2-pins { + bsc2clk-grp0 { + pins = "gpio16"; + function = "alt2"; /* BSC2CLK */ + }; + + bsc2dat-grp0 { + pins = "gpio17"; + function = "alt2"; /* BSC2DAT */ + }; + }; + + /* BSC3 */ + bsc3_pins: bsc3-pins { + bsc3clk-grp0 { + pins = "lcdscl"; + function = "alt1"; /* BSC3_CLK */ + }; + + bsc3dat-grp0 { + pins = "lcdsda"; + function = "alt1"; /* BSC3_SDA */ + }; + }; + + /* BSC4 */ + bsc4_pins: bsc4-pins { + bsc4clk-grp0 { + pins = "lcdres"; + function = "alt1"; /* BSC4_CLK */ + }; + + bsc4dat-grp0 { + pins = "lcdte"; + function = "alt1"; /* BSC4_SDA */ + }; + }; + + /* PMBSC */ + pmbsc_pins: pmbsc-pins { + pmbscclk-grp0 { + pins = "pmbscclk"; + function = "alt1"; /* PMBSCCLK */ + }; + + pmbscdat-grp0 { + pins = "pmbscdat"; + function = "alt1"; /* PMBSCDAT */ + }; + }; + + /* SD */ + sd_width1_pins: sd-width1-pins { + sdck-grp0 { + pins = "sdck"; + function = "alt1"; /* SDCK */ + bias-disable; + }; + + sdcmd-grp0 { + pins = "sdcmd"; + function = "alt1"; /* SDCMD */ + bias-pull-up; + }; + + sddat-grp0 { + pins = "sddat0"; + function = "alt1"; /* SDDATx */ + bias-pull-up; + }; + }; + + sd_width4_pins: sd-width4-pins { + sdck-grp0 { + pins = "sdck"; + function = "alt1"; /* SDCK */ + bias-disable; + }; + + sdcmd-grp0 { + pins = "sdcmd"; + function = "alt1"; /* SDCMD */ + bias-pull-up; + }; + + sddat-grp0 { + pins = "sddat0", "sddat1", "sddat2", "sddat3"; + function = "alt1"; /* SDDATx */ + bias-pull-up; + }; + }; + + /* SD1 */ + sd1_width1_pins: sd1-width1-pins { + sd1ck-grp0 { + pins = "mmc1dat7"; + function = "alt6"; /* SD1CK */ + bias-disable; + }; + + sd1cmd-grp0 { + pins = "spi0txd"; + function = "alt2"; /* SD1CMD */ + bias-pull-up; + }; + + sd1dat0-grp0 { + pins = "mmc1dat5"; + function = "alt6"; /* SD1DAT0 */ + bias-pull-up; + }; + }; + + sd1_width4_pins: sd1-width4-pins { + sd1ck-grp0 { + pins = "mmc1dat7"; + function = "alt6"; /* SD1CK */ + bias-disable; + }; + + sd1cmd-grp0 { + pins = "spi0txd"; + function = "alt2"; /* SD1CMD */ + bias-pull-up; + }; + + sd1dat0-grp0 { + pins = "mmc1dat5"; + function = "alt6"; /* SD1DAT0 */ + bias-pull-up; + }; + + sd1dat1-grp0 { + pins = "gpio93"; + function = "alt1"; /* SD1DAT1 */ + bias-pull-up; + }; + + sd1dat2-grp0 { + pins = "gpio94"; + function = "alt1"; /* SD1DAT2 */ + bias-pull-up; + }; + + sd1dat3-grp0 { + pins = "mmc1dat3"; + function = "alt6"; /* SD1DAT3 */ + bias-pull-up; + }; + }; + + /* MMC0 */ + mmc0_width1_pins: mmc0-width1-pins { + mmc0ck-grp0 { + pins = "mmc0ck"; + function = "alt1"; /* MMC0CK */ + bias-disable; + }; + + mmc0cmd-grp0 { + pins = "mmc0cmd"; + function = "alt1"; /* MMC0CMD */ + bias-pull-up; + }; + + mmc0dat-grp0 { + pins = "mmc0dat0"; + function = "alt1"; /* MMC0DATx */ + bias-pull-up; + }; + }; + + mmc0_width4_pins: mmc0-width4-pins { + mmc0ck-grp0 { + pins = "mmc0ck"; + function = "alt1"; /* MMC0CK */ + bias-disable; + }; + + mmc0cmd-grp0 { + pins = "mmc0cmd"; + function = "alt1"; /* MMC0CMD */ + bias-pull-up; + }; + + mmc0dat-grp0 { + pins = "mmc0dat0", "mmc0dat1", "mmc0dat2", "mmc0dat3"; + function = "alt1"; /* MMC0DATx */ + bias-pull-up; + }; + }; + + mmc0_width8_pins: mmc0-width8-pins { + mmc0ck-grp0 { + pins = "mmc0ck"; + function = "alt1"; /* MMC0CK */ + bias-disable; + }; + + mmc0cmd-grp0 { + pins = "mmc0cmd"; + function = "alt1"; /* MMC0CMD */ + bias-pull-up; + }; + + mmc0dat-grp0 { + pins = "mmc0dat0", "mmc0dat1", "mmc0dat2", "mmc0dat3", + "mmc0dat4", "mmc0dat5", "mmc0dat6", "mmc0dat7"; + function = "alt1"; /* MMC0DATx */ + bias-pull-up; + }; + }; + + /* MMC1 */ + mmc1_width1_pins: mmc1-width1-pins { + mmc1ck-grp0 { + pins = "mmc1ck"; + function = "alt1"; /* MMC1CK */ + bias-disable; + }; + + mmc1cmd-grp0 { + pins = "mmc1cmd"; + function = "alt1"; /* MMC1CMD */ + bias-pull-up; + }; + + mmc1dat-grp0 { + pins = "mmc1dat0"; + function = "alt1"; /* MMC1DATx */ + bias-pull-up; + }; + }; + + mmc1_width4_pins: mmc1-width4-pins { + mmc1ck-grp0 { + pins = "mmc1ck"; + function = "alt1"; /* MMC1CK */ + bias-disable; + }; + + mmc1cmd-grp0 { + pins = "mmc1cmd"; + function = "alt1"; /* MMC1CMD */ + bias-pull-up; + }; + + mmc1dat-grp0 { + pins = "mmc1dat0", "mmc1dat1", "mmc1dat2", "mmc1dat3"; + function = "alt1"; /* MMC1DATx */ + bias-pull-up; + }; + }; + + mmc1_width8_pins: mmc1-width8-pins { + mmc1ck-grp0 { + pins = "mmc1ck"; + function = "alt1"; /* MMC1CK */ + bias-disable; + }; + + mmc1cmd-grp0 { + pins = "mmc1cmd"; + function = "alt1"; /* MMC1CMD */ + bias-pull-up; + }; + + mmc1dat-grp0 { + pins = "mmc1dat0", "mmc1dat1", "mmc1dat2", "mmc1dat3", + "mmc1dat4", "mmc1dat5", "mmc1dat6", "mmc1dat7"; + function = "alt1"; /* MMC1DATx */ + bias-pull-up; + }; + }; +};