Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp293580lqs; Thu, 13 Jun 2024 10:08:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVi9ZJA1SWjnN7Yg/dFe9DC5TtwKYeSxNPiUHRQFTUYHAx6TtLZHmB3+gXt3h4vfhNi+btMvaMtjMDsiE3r7u0hYOw4IArNl5bW1ELwEQ== X-Google-Smtp-Source: AGHT+IECBQLLpZfdCeBxDp7GgYqYjkr840ylz6v8l1mXQepIV+ER9Hk9lfpQ2I/6LoS1kVDKwPhs X-Received: by 2002:a50:ed85:0:b0:57c:bc03:caa2 with SMTP id 4fb4d7f45d1cf-57cbc03cddbmr686016a12.20.1718298509703; Thu, 13 Jun 2024 10:08:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718298509; cv=pass; d=google.com; s=arc-20160816; b=JmC1YpsQT4kw+jU6+yT2keDysvEDQcdsBd5ZIYMr9LO9SYKD6caIb8PYbIIokUmOuH vdIK4uMsbaVFHZBqMhrLpA7p+AxcdHW04m7ckT5gR4M/dokF8MRaDxoN+ch3K21qCDZF AO0bzc5YKAkUtcBBmtcoc7RDe96g3xYS+u/M0bcQu1OU1B3FPVkd77DuTMlxObrPd7xB eTNrU8gQjxECjSmwHB0VX7nHcN39+l+V8Jskfdjymr0RJtpUiw5EaMvKkfe9PtdUZ+/z 5lPqgOcSqLOhvWMIVATKzDNNqFP/AIr6r8+uPJRlaiqhGHxhoJU50iYvBXP6ky/rN+3+ Ry1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=itYvqgP5vAlyU8rB+9Bvq7PDjTkR7Be5ld9vH1SyPoI=; fh=RgDUtGS1smsLaAhG7Rr/unfl3XqKo5YHPUXqOWmRbUM=; b=EvRjm6NoJP5q8DRERtHy8E/qDhcTkIxVFcVZIonQzIXfBUZHU9glPO6VYGnVovpNwb G60/aQU/3D+KmH1Rx8CG7yiD29PtaWDV3GlI+Oq9FHhI1k/ZqK2RgcRQPxOxPgLTbmbK 1SF/PuWQzmHFbdk0Jxoz0ccP+WYegC+MQ5XIVIIerSPEtIQ9eLtgfkOIaTSdyPahOozW HNNQqifN54TRBQg8mOzxiUbSvzhIK1p15Jk/pJsM9kUoh9wW4WC/9hnY/GQaRkfehizF x0kHw9dMaP7flcZXIMbMiZt+nUnInCwucSCfUflf3DwLmQtIbQQdtAqLWEh8d4iTB2qf 1ejw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kji33KUA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb72d6b01si872990a12.67.2024.06.13.10.08.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 10:08:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kji33KUA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 697711F24276 for ; Thu, 13 Jun 2024 17:08:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 15E80149E01; Thu, 13 Jun 2024 17:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kji33KUA" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D0AB4C6B; Thu, 13 Jun 2024 17:08:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718298498; cv=none; b=hg3cCp+/PEKYs7f1Sep0Ufniw5Y83AyxCo+GkG41SRUdJ7gXoM/C8q8EE8iMjuSKH/MZiPWZ9pnuMBCMHNHPTtY2fmreibLP3Suw7Z/nnCpGe51n9FyxNkIivZWLxKhcfk65AAzIBBYaYwrwbaq2DafoFcVhLFsZ6Pg53u+r8/0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718298498; c=relaxed/simple; bh=/mtpv7oQiB/HDp/WMox9w7Z6Glgw+lsaHSyHSzXTWnw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FQCbox2aNY3AfnBWxiXXiDKOjdUrBP/1zgw4ZmBDjXHbUKJsa/YfA4cXcQawjP0pZ8kWczbCcmeXQYb7pSzanxHSLmrXX9G0ToSjxSrgJaeEId3Eoa4OYjKbHM4kCwG/dZpzjZfFsGCoC/q/ZG2m8CBuLO3SlCVjNlXrWfCo0Ss= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kji33KUA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EA55C3277B; Thu, 13 Jun 2024 17:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718298497; bh=/mtpv7oQiB/HDp/WMox9w7Z6Glgw+lsaHSyHSzXTWnw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kji33KUAszF4cmuHylrzAFirU0EPFC5g79J6Z9DPYf+d1UcS5mMwA0fMS7EvkEUiO rRWaNB2iErp6PePjPgvoD+b2VLVc06h1pPT7BIRbPQYeM1DK1NjZAUDt+/rYGP+PN7 3gL9u2LbjI6hPjo/Kp5gFQ4JqV5CXSttTaU3iPCzk9x3uTAqMfc4DKppjDA+IF88ho 529fdp2nWG0brVsVe2N/wi9CkC3vE0t3wBo9uN06AVakPJ/Jj4Or2welFU3vumKzk6 5f4y7uFW/7vXZvonpkdAUH1s1OWcA3AcDdrr0xri0UkAjLrHM0pmCrTFm4X6Wf/JPw +/SllKTYDwMOw== Date: Thu, 13 Jun 2024 11:08:16 -0600 From: Rob Herring To: Xianwei Zhao Cc: Linus Walleij , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Bartosz Golaszewski , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] dt-bindings: pinctrl: Add support for Amlogic A4 SoCs Message-ID: <20240613170816.GA2020944-robh@kernel.org> References: <20240611-a4_pinctrl-v1-0-dc487b1977b3@amlogic.com> <20240611-a4_pinctrl-v1-1-dc487b1977b3@amlogic.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240611-a4_pinctrl-v1-1-dc487b1977b3@amlogic.com> On Tue, Jun 11, 2024 at 01:10:57PM +0800, Xianwei Zhao wrote: > Add the new compatible name for Amlogic A4 pin controller, and add > a new dt-binding header file which document the detail pin names. > > Signed-off-by: Xianwei Zhao > --- > .../bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml | 2 + > .../dt-bindings/gpio/amlogic,a4-aobus-pinctrl.h | 21 +++++ > .../dt-bindings/gpio/amlogic,a4-periphs-pinctrl.h | 93 ++++++++++++++++++++++ > 3 files changed, 116 insertions(+) > > diff --git a/Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml b/Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml > index d9e0b2c48e84..f5eefa0fab5b 100644 > --- a/Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml > +++ b/Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml > @@ -15,6 +15,8 @@ allOf: > properties: > compatible: > enum: > + - amlogic,a4-aobus-pinctrl > + - amlogic,a4-periphs-pinctrl > - amlogic,c3-periphs-pinctrl > - amlogic,t7-periphs-pinctrl > - amlogic,meson-a1-periphs-pinctrl > diff --git a/include/dt-bindings/gpio/amlogic,a4-aobus-pinctrl.h b/include/dt-bindings/gpio/amlogic,a4-aobus-pinctrl.h > new file mode 100644 > index 000000000000..7c7e746baed5 > --- /dev/null > +++ b/include/dt-bindings/gpio/amlogic,a4-aobus-pinctrl.h > @@ -0,0 +1,21 @@ > +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ > +/* > + * Copyright (c) 2024 Amlogic, Inc. All rights reserved. > + * Author: Xianwei Zhao > + */ > + > +#ifndef _DT_BINDINGS_AMLOGIC_A4_AOBUS_PINCTRL_H > +#define _DT_BINDINGS_AMLOGIC_A4_AOBUS_PINCTRL_H > + > +/* GPIOAO */ > +#define GPIOAO_0 0 > +#define GPIOAO_1 1 > +#define GPIOAO_2 2 > +#define GPIOAO_3 3 > +#define GPIOAO_4 4 > +#define GPIOAO_5 5 > +#define GPIOAO_6 6 I find defines with the value of the define in the name pretty pointless. > + > +#define GPIO_TEST_N 7 > + > +#endif > diff --git a/include/dt-bindings/gpio/amlogic,a4-periphs-pinctrl.h b/include/dt-bindings/gpio/amlogic,a4-periphs-pinctrl.h > new file mode 100644 > index 000000000000..dfabca4b4790 > --- /dev/null > +++ b/include/dt-bindings/gpio/amlogic,a4-periphs-pinctrl.h > @@ -0,0 +1,93 @@ > +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ > +/* > + * Copyright (c) 2024 Amlogic, Inc. All rights reserved. > + * Author: Xianwei Zhao > + */ > + > +#ifndef _DT_BINDINGS_AMLOGIC_A4_PERIPHS_PINCTRL_H > +#define _DT_BINDINGS_AMLOGIC_A4_PERIPHS_PINCTRL_H > + > +/* GPIOE */ > +#define GPIOE_0 0 > +#define GPIOE_1 1 > + > +/* GPIOD */ > +#define GPIOD_0 2 > +#define GPIOD_1 3 > +#define GPIOD_2 4 > +#define GPIOD_3 5 > +#define GPIOD_4 6 > +#define GPIOD_5 7 > +#define GPIOD_6 8 > +#define GPIOD_7 9 > +#define GPIOD_8 10 > +#define GPIOD_9 11 > +#define GPIOD_10 12 > +#define GPIOD_11 13 > +#define GPIOD_12 14 > +#define GPIOD_13 15 > +#define GPIOD_14 16 > +#define GPIOD_15 17 I'm not really much of a fan of using defines for GPIOs, but if you do, wouldn't be better to split banks and lines up rather than a global number space. See ASPEED_GPIO() or tegra header. Rob