From nobody Mon Nov 25 19:41:57 2024 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 26E9020604B; Fri, 25 Oct 2024 11:25:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729855526; cv=none; b=DcasL4+jljY4Bv/f5tVdBMpgPW7E+pT18RPfBUPRicBKR2NDRcYYToTEkFLuYeUkKaRLGUiC6hdwaNeIAlumHhrv4cj4YjNHb3NwIib1aKIA345uOsV8ogonFx/bUQtwYYLJw/LOV5Lb8D7s73rjCb1NIjl+qyGIDZh1YSFQP8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729855526; c=relaxed/simple; bh=zCK6xRgCZy+aKLIxLIRPz3zizHsPoXeVWBzInpPZLhg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LlMLq/Px5qoUAs4portmLK2+Ri18cNDiErXXzT7I5EHy2n36RpYy1PO8eTjCSo3PpO7Fe/Bo3NAqKZvo/mEm56JPC5eCa4huohSI4eL43v+mUpa2hx50xw5xB6gzhgHNdST2vEwn3ma3hg51D4JHT6+2U6CTW/J9emmDS2oWcfw= 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=a7CQT0hG; arc=none smtp.client-ip=209.85.167.54 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="a7CQT0hG" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-539e5c15fd3so1844978e87.3; Fri, 25 Oct 2024 04:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729855522; x=1730460322; 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=zn+7F6oggE1lig6kPZvEQNZOusLBwpTaI0hE7CNqEqE=; b=a7CQT0hG2cU7zlvPQ+se7Ld66OlAq0hkXhGfKm3nWfpcCZGchyXvmvGKl4S7h/hZ9T Su4Ah0sG+9OpJT46FpOaobfGv+MtHZWxGwwsjjM/uNmEOpVU2sl1OLiFlCcKtvpeFM6y VTUbivt1+YOGsbqwVVNAwL6IhkMT9cdAoryacLZDM9N+an/K1q4DI7UfVcOb91SVZkU9 MYyODkdx0Ly9QSa4X7CnVg7TEzJzBQ/cyq2UCYC8sE1SLMQJsEB2elJf0UYOTCdkMA0z mvMS5ZgNmzqXH5sSVfCmk9QS8Ts/zyT/DHWvOiduB8cOBIiSNbJFqQipUPdoF5j5Wa3r mlpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729855522; x=1730460322; 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=zn+7F6oggE1lig6kPZvEQNZOusLBwpTaI0hE7CNqEqE=; b=HJ9b98FOlpOnUj1FToe9WlKxbVhHubiPjn2UdfJEh9HAjoL5/qCh5VSkKqMb2Z5dse OWmAc0NBhgXLWnZUFK9LNSY7zz1DogGFuUGTybxeD1VG5eOzBG+3tFthlq5z4p0iNYrF PBddFXDaMU1F/szwrF2NMeVtisi59n/Pe7w7aRMoqV/LaStR1ixUNydF5N89tOiXMzKg 87mKo5I9phh24GWBdJhN+z56dMNfuAzoK2dD83M5aNOirD74oVvU/yY6x+dwQ601bcOB 5ULN8VRjtRmtuNaZ1/SnEKAxQFR/kbJkHVLhSsrKpbiac70wm4lZPPr77h5UxFg29v7s 88iQ== X-Forwarded-Encrypted: i=1; AJvYcCUDNQA+uMc9V+TuFeJxgC+r471vH2tSxHR/oY2auGAMs/VMiRIOPJ0apN3+NH9uP3c+s+i29AodBZlvwYJKwsU9QNA=@vger.kernel.org, AJvYcCUNWAKRVdAhF8wCit1YUn+65PdykMUH2ewiNeWrCUE0oZxGpZQvY3PU1Jk81kuMs66oKzbUWSpmw7FPLu/f@vger.kernel.org, AJvYcCXXKnEgA8UlWNUedXBDaqxXH+cEjZ/Zo7bsetTbOWyKADZTPv9Sl/tTndZ/eO6mXzGBzX61RTcKXDK8@vger.kernel.org X-Gm-Message-State: AOJu0Yy1CooWXg9gjXpMsmgrZXo6ZSmyjmV6h0bSs8a2rhEmt11yLTC2 OwQlL34TYbSVYYd0FNQPe/aWhuXRj5LA8+GZMjeSx6uServARbNuNbNMwA== X-Google-Smtp-Source: AGHT+IEski2on4iXFKI6mEIlLUoETq9Zlf7UC7YIlQafJhak+qWdwEBP7Z9LGZOPtwt8GZx9CbaPQA== X-Received: by 2002:a05:6512:130e:b0:539:949a:a793 with SMTP id 2adb3069b0e04-53b23e254d8mr3983180e87.36.1729855521841; Fri, 25 Oct 2024 04:25:21 -0700 (PDT) Received: from [192.168.1.105] ([178.136.36.129]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53b2e1c90c0sm144028e87.189.2024.10.25.04.25.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 04:25:21 -0700 (PDT) From: Markuss Broks Date: Fri, 25 Oct 2024 14:24:57 +0300 Subject: [PATCH v2 10/12] pinctrl: samsung: Add Exynos9810 SoC specific data Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241025-exynos9810-v2-10-99ca3f316e21@gmail.com> References: <20241025-exynos9810-v2-0-99ca3f316e21@gmail.com> In-Reply-To: <20241025-exynos9810-v2-0-99ca3f316e21@gmail.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lorenzo Pieralisi , Alim Akhtar , Sylwester Nawrocki , Linus Walleij , Tomasz Figa , Will Deacon , Mark Rutland Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, Ivaylo Ivanov , Markuss Broks , Maksym Holovach X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1729855507; l=9501; i=markuss.broks@gmail.com; s=20241024; h=from:subject:message-id; bh=zCK6xRgCZy+aKLIxLIRPz3zizHsPoXeVWBzInpPZLhg=; b=MB/JUSXZ0nO699uTxQYOiHGh8dMGUv1etUbsrO9qmWZmVT9zg47XSRO8lWIjd6JBbjyrHKr0i p9gfkq8PRDjA0O663uOYlaabWjTBHc/yMkU0bWqAdbRGeA+yBWtoUw4 X-Developer-Key: i=markuss.broks@gmail.com; a=ed25519; pk=p3Bh4oPpeCrTpffJvGch5WsWNikteWHJ+4LBICPbZg0= Add Samsung Exynos9810 SoC specific data to enable pinctrl support for platforms based on Exynos9810. Co-developed-by: Maksym Holovach Signed-off-by: Maksym Holovach Signed-off-by: Markuss Broks --- drivers/pinctrl/samsung/pinctrl-exynos-arm64.c | 154 +++++++++++++++++++++= ++++ drivers/pinctrl/samsung/pinctrl-samsung.c | 2 + drivers/pinctrl/samsung/pinctrl-samsung.h | 1 + 3 files changed, 157 insertions(+) diff --git a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c b/drivers/pinct= rl/samsung/pinctrl-exynos-arm64.c index f07c26d374425505019447161150929f7677f91d..3ea7106ce5eae3c21f11790b5a4= 0037042c1d407 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c @@ -767,6 +767,160 @@ const struct samsung_pinctrl_of_match_data exynos990_= of_data __initconst =3D { .num_ctrl =3D ARRAY_SIZE(exynos990_pin_ctrl), }; =20 +/* pin banks of exynos9810 pin-controller 0 (ALIVE) */ +static const struct samsung_pin_bank_data exynos9810_pin_banks0[] __initco= nst =3D { + EXYNOS850_PIN_BANK_EINTN(6, 0x000, "etc1"), + EXYNOS850_PIN_BANK_EINTW(8, 0x020, "gpa0", 0x00), + EXYNOS850_PIN_BANK_EINTW(8, 0x040, "gpa1", 0x04), + EXYNOS850_PIN_BANK_EINTW(8, 0x060, "gpa2", 0x08), + EXYNOS850_PIN_BANK_EINTW(8, 0x080, "gpa3", 0x0c), + EXYNOS850_PIN_BANK_EINTN(6, 0x0A0, "gpq0"), + EXYNOS850_PIN_BANK_EINTW(2, 0x0C0, "gpa4", 0x10), +}; + +/* pin banks of exynos9810 pin-controller 1 (AUD) */ +static const struct samsung_pin_bank_data exynos9810_pin_banks1[] __initco= nst =3D { + EXYNOS850_PIN_BANK_EINTG(5, 0x000, "gpb0", 0x00), + EXYNOS850_PIN_BANK_EINTG(8, 0x020, "gpb1", 0x04), + EXYNOS850_PIN_BANK_EINTG(4, 0x040, "gpb2", 0x08), +}; + +/* pin banks of exynos9810 pin-controller 2 (CHUB) */ +static const struct samsung_pin_bank_data exynos9810_pin_banks2[] __initco= nst =3D { + EXYNOS850_PIN_BANK_EINTG(8, 0x000, "gph0", 0x00), + EXYNOS850_PIN_BANK_EINTG(5, 0x020, "gph1", 0x04), +}; + +/* pin banks of exynos9810 pin-controller 3 (CMGP) */ +static const struct samsung_pin_bank_data exynos9810_pin_banks3[] __initco= nst =3D { + EXYNOS850_PIN_BANK_EINTW(1, 0x000, "gpm0", 0x00), + EXYNOS850_PIN_BANK_EINTW(1, 0x020, "gpm1", 0x04), + EXYNOS850_PIN_BANK_EINTW(1, 0x040, "gpm2", 0x08), + EXYNOS850_PIN_BANK_EINTW(1, 0x060, "gpm3", 0x0C), + EXYNOS850_PIN_BANK_EINTW(1, 0x080, "gpm4", 0x10), + EXYNOS850_PIN_BANK_EINTW(1, 0x0A0, "gpm5", 0x14), + EXYNOS850_PIN_BANK_EINTW(1, 0x0C0, "gpm6", 0x18), + EXYNOS850_PIN_BANK_EINTW(1, 0x0E0, "gpm7", 0x1C), + EXYNOS850_PIN_BANK_EINTW(1, 0x100, "gpm10", 0x20), + EXYNOS850_PIN_BANK_EINTW(1, 0x120, "gpm11", 0x24), + EXYNOS850_PIN_BANK_EINTW(1, 0x140, "gpm12", 0x28), + EXYNOS850_PIN_BANK_EINTW(1, 0x160, "gpm13", 0x2C), + EXYNOS850_PIN_BANK_EINTW(1, 0x180, "gpm14", 0x30), + EXYNOS850_PIN_BANK_EINTW(1, 0x1A0, "gpm15", 0x34), + EXYNOS850_PIN_BANK_EINTW(1, 0x1C0, "gpm16", 0x38), + EXYNOS850_PIN_BANK_EINTW(1, 0x1E0, "gpm17", 0x3C), + EXYNOS850_PIN_BANK_EINTW(1, 0x200, "gpm40", 0x40), + EXYNOS850_PIN_BANK_EINTW(1, 0x220, "gpm41", 0x44), + EXYNOS850_PIN_BANK_EINTW(1, 0x240, "gpm42", 0x48), + EXYNOS850_PIN_BANK_EINTW(1, 0x260, "gpm43", 0x4C), +}; + +/* pin banks of exynos9810 pin-controller 4 (FSYS0) */ +static const struct samsung_pin_bank_data exynos9810_pin_banks4[] __initco= nst =3D { + EXYNOS850_PIN_BANK_EINTG(2, 0x000, "gpf0", 0x00), +}; + +/* pin banks of exynos9810 pin-controller 5 (FSYS1) */ +static const struct samsung_pin_bank_data exynos9810_pin_banks5[] __initco= nst =3D { + EXYNOS850_PIN_BANK_EINTG(7, 0x000, "gpf1", 0x00), + EXYNOS850_PIN_BANK_EINTG(6, 0x020, "gpf2", 0x04), +}; + +/* pin banks of exynos9810 pin-controller 6 (PERIC0) */ +static const struct samsung_pin_bank_data exynos9810_pin_banks6[] __initco= nst =3D { + EXYNOS850_PIN_BANK_EINTG(8, 0x000, "gpp0", 0x00), + EXYNOS850_PIN_BANK_EINTG(8, 0x020, "gpp1", 0x04), + EXYNOS850_PIN_BANK_EINTG(8, 0x040, "gpp2", 0x08), + EXYNOS850_PIN_BANK_EINTG(4, 0x060, "gpp3", 0x0C), + EXYNOS850_PIN_BANK_EINTG(8, 0x080, "gpg0", 0x10), + EXYNOS850_PIN_BANK_EINTG(8, 0x0A0, "gpg1", 0x14), + EXYNOS850_PIN_BANK_EINTG(8, 0x0C0, "gpg2", 0x18), +}; + +/* pin banks of exynos9810 pin-controller 7 (PERIC1) */ +static const struct samsung_pin_bank_data exynos9810_pin_banks7[] __initco= nst =3D { + EXYNOS850_PIN_BANK_EINTG(8, 0x000, "gpp4", 0x00), + EXYNOS850_PIN_BANK_EINTG(8, 0x020, "gpp5", 0x04), + EXYNOS850_PIN_BANK_EINTG(4, 0x040, "gpp6", 0x08), + EXYNOS850_PIN_BANK_EINTG(8, 0x060, "gpc0", 0x0C), + EXYNOS850_PIN_BANK_EINTG(8, 0x080, "gpc1", 0x10), + EXYNOS850_PIN_BANK_EINTG(4, 0x0A0, "gpd0", 0x14), + EXYNOS850_PIN_BANK_EINTG(7, 0x0C0, "gpg3", 0x18), +}; + +/* pin banks of exynos9810 pin-controller 8 (VTS) */ +static const struct samsung_pin_bank_data exynos9810_pin_banks8[] __initco= nst =3D { + EXYNOS850_PIN_BANK_EINTG(3, 0x000, "gpt0", 0x00), +}; + +static const struct samsung_pin_ctrl exynos9810_pin_ctrl[] __initconst =3D= { + { + /* pin-controller instance 0 ALIVE data */ + .pin_banks =3D exynos9810_pin_banks0, + .nr_banks =3D ARRAY_SIZE(exynos9810_pin_banks0), + .eint_wkup_init =3D exynos_eint_wkup_init, + .eint_gpio_init =3D exynos_eint_gpio_init, + .suspend =3D exynos_pinctrl_suspend, + .resume =3D exynos_pinctrl_resume, + }, { + /* pin-controller instance 1 AUD data */ + .pin_banks =3D exynos9810_pin_banks1, + .nr_banks =3D ARRAY_SIZE(exynos9810_pin_banks1), + }, { + /* pin-controller instance 2 CHUB data */ + .pin_banks =3D exynos9810_pin_banks2, + .nr_banks =3D ARRAY_SIZE(exynos9810_pin_banks2), + .eint_gpio_init =3D exynos_eint_gpio_init, + .suspend =3D exynos_pinctrl_suspend, + .resume =3D exynos_pinctrl_resume, + }, { + /* pin-controller instance 3 CMGP data */ + .pin_banks =3D exynos9810_pin_banks3, + .nr_banks =3D ARRAY_SIZE(exynos9810_pin_banks3), + .eint_wkup_init =3D exynos_eint_wkup_init, + .eint_gpio_init =3D exynos_eint_gpio_init, + .suspend =3D exynos_pinctrl_suspend, + .resume =3D exynos_pinctrl_resume, + }, { + /* pin-controller instance 4 FSYS0 data */ + .pin_banks =3D exynos9810_pin_banks4, + .nr_banks =3D ARRAY_SIZE(exynos9810_pin_banks4), + .eint_gpio_init =3D exynos_eint_gpio_init, + .suspend =3D exynos_pinctrl_suspend, + .resume =3D exynos_pinctrl_resume, + }, { + /* pin-controller instance 5 FSYS1 data */ + .pin_banks =3D exynos9810_pin_banks5, + .nr_banks =3D ARRAY_SIZE(exynos9810_pin_banks5), + .eint_gpio_init =3D exynos_eint_gpio_init, + .suspend =3D exynos_pinctrl_suspend, + .resume =3D exynos_pinctrl_resume, + }, { + /* pin-controller instance 6 PERIC0 data */ + .pin_banks =3D exynos9810_pin_banks6, + .nr_banks =3D ARRAY_SIZE(exynos9810_pin_banks6), + .eint_gpio_init =3D exynos_eint_gpio_init, + .suspend =3D exynos_pinctrl_suspend, + .resume =3D exynos_pinctrl_resume, + }, { + /* pin-controller instance 7 PERIC1 data */ + .pin_banks =3D exynos9810_pin_banks7, + .nr_banks =3D ARRAY_SIZE(exynos9810_pin_banks7), + .eint_gpio_init =3D exynos_eint_gpio_init, + .suspend =3D exynos_pinctrl_suspend, + .resume =3D exynos_pinctrl_resume, + }, { + /* pin-controller instance 8 VTS data */ + .pin_banks =3D exynos9810_pin_banks8, + .nr_banks =3D ARRAY_SIZE(exynos9810_pin_banks8), + }, +}; + +const struct samsung_pinctrl_of_match_data exynos9810_of_data __initconst = =3D { + .ctrl =3D exynos9810_pin_ctrl, + .num_ctrl =3D ARRAY_SIZE(exynos9810_pin_ctrl), +}; + /* pin banks of exynosautov9 pin-controller 0 (ALIVE) */ static const struct samsung_pin_bank_data exynosautov9_pin_banks0[] __init= const =3D { EXYNOS850_PIN_BANK_EINTW(8, 0x000, "gpa0", 0x00), diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/sa= msung/pinctrl-samsung.c index 42e40860841bcc94e3c11bf313df792da10ab00b..bbedd980ec67234aad847b757f4= 0af5002b11ebb 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c @@ -1479,6 +1479,8 @@ static const struct of_device_id samsung_pinctrl_dt_m= atch[] =3D { .data =3D &exynos850_of_data }, { .compatible =3D "samsung,exynos8895-pinctrl", .data =3D &exynos8895_of_data }, + { .compatible =3D "samsung,exynos9810-pinctrl", + .data =3D &exynos9810_of_data }, { .compatible =3D "samsung,exynos990-pinctrl", .data =3D &exynos990_of_data }, { .compatible =3D "samsung,exynosautov9-pinctrl", diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.h b/drivers/pinctrl/sa= msung/pinctrl-samsung.h index 615048f945243d4173d40142f1e62c8aeefe5b7e..bb0689d52ea0b4392714fa9bcdc= bae8d253c73a1 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.h +++ b/drivers/pinctrl/samsung/pinctrl-samsung.h @@ -385,6 +385,7 @@ extern const struct samsung_pinctrl_of_match_data exyno= s7_of_data; extern const struct samsung_pinctrl_of_match_data exynos7885_of_data; extern const struct samsung_pinctrl_of_match_data exynos850_of_data; extern const struct samsung_pinctrl_of_match_data exynos8895_of_data; +extern const struct samsung_pinctrl_of_match_data exynos9810_of_data; extern const struct samsung_pinctrl_of_match_data exynos990_of_data; extern const struct samsung_pinctrl_of_match_data exynosautov9_of_data; extern const struct samsung_pinctrl_of_match_data exynosautov920_of_data; --=20 2.46.2