2024-05-30 01:40:40

by Andrew Jeffery

[permalink] [raw]
Subject: [PATCH v2 0/2] dt-bindings: gpio: aspeed,sgpio: Miscellaneous cleanups

Hello,

This short series fixes some SGPIO-related devicetree warnings currently
emitted by `make dtbs_check` for Aspeed devicetrees.

Please review!

Andrew

---
Changes in v2:
- Dropped 1/4 from v1 as it was considered noise (Krzysztof)
- Squashed 4/4 into 3/4 from v1 (Krzysztof)
- Addressed remaining comments and applied tags (Krzysztof)
- Link to v1: https://lore.kernel.org/r/20240529-dt-warnings-gpio-sgpio-interrupt-cells-v1-0-91c42976833b@codeconstruct.com.au

---
Andrew Jeffery (2):
dt-bindings: gpio: aspeed,sgpio: Specify gpio-line-names
dt-bindings: gpio: aspeed,sgpio: Specify #interrupt-cells

Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
---
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
change-id: 20240528-dt-warnings-gpio-sgpio-interrupt-cells-685a0efd2c0b

Best regards,
--
Andrew Jeffery <[email protected]>



2024-05-30 01:40:45

by Andrew Jeffery

[permalink] [raw]
Subject: [PATCH v2 1/2] dt-bindings: gpio: aspeed,sgpio: Specify gpio-line-names

Some devicetrees specify gpio-line-names in the sgpio node despite it
not being defined by the binding. It's a reasonable thing to do, so
define the property to squash warnings such as:

arch/arm/boot/dts/aspeed/aspeed-bmc-vegman-rx20.dtb: sgpio@1e780200: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+'

Acked-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Andrew Jeffery <[email protected]>
---
Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml b/Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml
index 46bb121360dc..34cdf1ad9c73 100644
--- a/Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml
@@ -33,6 +33,11 @@ properties:

gpio-controller: true

+ # Each SGPIO is represented as a pair of input and output GPIOs
+ gpio-line-names:
+ minItems: 160
+ maxItems: 256
+
'#gpio-cells':
const: 2


--
2.39.2


2024-05-30 01:41:07

by Andrew Jeffery

[permalink] [raw]
Subject: [PATCH v2 2/2] dt-bindings: gpio: aspeed,sgpio: Specify #interrupt-cells

Squash warnings such as:

arch/arm/boot/dts/aspeed/aspeed-ast2500-evb.dtb: sgpio@1e780200: '#interrupt-cells' does not match any of the regexes: 'pinctrl-[0-9]+'

Also, mark #interrupt-cells as required. The kernel devicetrees already
specified it where compatible nodes were defined, and u-boot pulls in
the kernel devicetrees, so this should have minimal practical impact.

Signed-off-by: Andrew Jeffery <[email protected]>
---
Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml b/Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml
index 34cdf1ad9c73..1046f0331c09 100644
--- a/Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/aspeed,sgpio.yaml
@@ -46,6 +46,9 @@ properties:

interrupt-controller: true

+ '#interrupt-cells':
+ const: 2
+
clocks:
maxItems: 1

@@ -60,6 +63,7 @@ required:
- '#gpio-cells'
- interrupts
- interrupt-controller
+ - '#interrupt-cells'
- ngpios
- clocks
- bus-frequency
@@ -77,6 +81,7 @@ examples:
reg = <0x1e780200 0x0100>;
clocks = <&syscon ASPEED_CLK_APB>;
interrupt-controller;
+ #interrupt-cells = <2>;
ngpios = <80>;
bus-frequency = <12000000>;
};

--
2.39.2


2024-05-30 16:32:33

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: gpio: aspeed,sgpio: Specify #interrupt-cells

On Thu, May 30, 2024 at 11:09:49AM +0930, Andrew Jeffery wrote:
> Squash warnings such as:
>
> arch/arm/boot/dts/aspeed/aspeed-ast2500-evb.dtb: sgpio@1e780200: '#interrupt-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
>
> Also, mark #interrupt-cells as required. The kernel devicetrees already
> specified it where compatible nodes were defined, and u-boot pulls in
> the kernel devicetrees, so this should have minimal practical impact.
>
> Signed-off-by: Andrew Jeffery <[email protected]>

Acked-by: Conor Dooley <[email protected]>

Thanks,
Conor.


Attachments:
(No filename) (606.00 B)
signature.asc (235.00 B)
Download all attachments

2024-06-03 08:35:14

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] dt-bindings: gpio: aspeed,sgpio: Miscellaneous cleanups

From: Bartosz Golaszewski <[email protected]>


On Thu, 30 May 2024 11:09:47 +0930, Andrew Jeffery wrote:
> This short series fixes some SGPIO-related devicetree warnings currently
> emitted by `make dtbs_check` for Aspeed devicetrees.
>
> Please review!
>
> Andrew
>
> [...]

Applied, thanks!

[1/2] dt-bindings: gpio: aspeed,sgpio: Specify gpio-line-names
commit: a31517b11bd188527b2f8a4b8fd3e91a10f44d04
[2/2] dt-bindings: gpio: aspeed,sgpio: Specify #interrupt-cells
commit: 3a40985960bcab918da23f8945ab0cd3be12d716

Best regards,
--
Bartosz Golaszewski <[email protected]>