diff mbox series

[v7,1/5] ARM: dts: aspeed: Drop reg-io-width from LPC nodes

Message ID 20210927023053.6728-2-chiawei_wang@aspeedtech.com (mailing list archive)
State New, archived
Headers show
Series arm: aspeed: Add UART routing support | expand

Commit Message

ChiaWei Wang Sept. 27, 2021, 2:30 a.m. UTC
The 'reg-io-width' properties are not used by LPC drivers
nor documented as part of bindings. Therefore drop them.

This is in preparation to move aspeed-lpc.txt to YAML schema.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
---
 arch/arm/boot/dts/aspeed-g4.dtsi | 1 -
 arch/arm/boot/dts/aspeed-g5.dtsi | 1 -
 arch/arm/boot/dts/aspeed-g6.dtsi | 1 -
 3 files changed, 3 deletions(-)

Comments

Joel Stanley Oct. 8, 2021, 4:35 a.m. UTC | #1
On Mon, 27 Sept 2021 at 02:31, Chia-Wei Wang
<chiawei_wang@aspeedtech.com> wrote:
>
> The 'reg-io-width' properties are not used by LPC drivers
> nor documented as part of bindings. Therefore drop them.

I assume they are there due to the lpc having a 'syscon' compatible.
THey are documented in the syscon bindings:

Documentation/devicetree/bindings/mfd/syscon.yaml

Andrew, do you have any comments?

>
> This is in preparation to move aspeed-lpc.txt to YAML schema.
>
> Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
> ---
>  arch/arm/boot/dts/aspeed-g4.dtsi | 1 -
>  arch/arm/boot/dts/aspeed-g5.dtsi | 1 -
>  arch/arm/boot/dts/aspeed-g6.dtsi | 1 -
>  3 files changed, 3 deletions(-)
>
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
> index c5aeb3cf3a09..45a25eb4baa4 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -345,7 +345,6 @@
>                         lpc: lpc@1e789000 {
>                                 compatible = "aspeed,ast2400-lpc-v2", "simple-mfd", "syscon";
>                                 reg = <0x1e789000 0x1000>;
> -                               reg-io-width = <4>;
>
>                                 #address-cells = <1>;
>                                 #size-cells = <1>;
> diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> index 73ca1ec6fc24..8e1d00d8445e 100644
> --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> @@ -436,7 +436,6 @@
>                         lpc: lpc@1e789000 {
>                                 compatible = "aspeed,ast2500-lpc-v2", "simple-mfd", "syscon";
>                                 reg = <0x1e789000 0x1000>;
> -                               reg-io-width = <4>;
>
>                                 #address-cells = <1>;
>                                 #size-cells = <1>;
> diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
> index 1b47be1704f8..0d1aae6887cd 100644
> --- a/arch/arm/boot/dts/aspeed-g6.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g6.dtsi
> @@ -490,7 +490,6 @@
>                         lpc: lpc@1e789000 {
>                                 compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon";
>                                 reg = <0x1e789000 0x1000>;
> -                               reg-io-width = <4>;
>
>                                 #address-cells = <1>;
>                                 #size-cells = <1>;
> --
> 2.17.1
>
Joel Stanley Oct. 21, 2021, 6:28 a.m. UTC | #2
On Fri, 8 Oct 2021 at 04:35, Joel Stanley <joel@jms.id.au> wrote:
>
> On Mon, 27 Sept 2021 at 02:31, Chia-Wei Wang
> <chiawei_wang@aspeedtech.com> wrote:
> >
> > The 'reg-io-width' properties are not used by LPC drivers
> > nor documented as part of bindings. Therefore drop them.
>
> I assume they are there due to the lpc having a 'syscon' compatible.
> THey are documented in the syscon bindings:
>
> Documentation/devicetree/bindings/mfd/syscon.yaml
>
> Andrew, do you have any comments?

Andrew indicated to me that he agreed with my observation: the
properties should be present as they are used by the regmap/syscon.

>
> >
> > This is in preparation to move aspeed-lpc.txt to YAML schema.
> >
> > Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
> > ---
> >  arch/arm/boot/dts/aspeed-g4.dtsi | 1 -
> >  arch/arm/boot/dts/aspeed-g5.dtsi | 1 -
> >  arch/arm/boot/dts/aspeed-g6.dtsi | 1 -
> >  3 files changed, 3 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
> > index c5aeb3cf3a09..45a25eb4baa4 100644
> > --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> > +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> > @@ -345,7 +345,6 @@
> >                         lpc: lpc@1e789000 {
> >                                 compatible = "aspeed,ast2400-lpc-v2", "simple-mfd", "syscon";
> >                                 reg = <0x1e789000 0x1000>;
> > -                               reg-io-width = <4>;
> >
> >                                 #address-cells = <1>;
> >                                 #size-cells = <1>;
> > diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> > index 73ca1ec6fc24..8e1d00d8445e 100644
> > --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> > @@ -436,7 +436,6 @@
> >                         lpc: lpc@1e789000 {
> >                                 compatible = "aspeed,ast2500-lpc-v2", "simple-mfd", "syscon";
> >                                 reg = <0x1e789000 0x1000>;
> > -                               reg-io-width = <4>;
> >
> >                                 #address-cells = <1>;
> >                                 #size-cells = <1>;
> > diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
> > index 1b47be1704f8..0d1aae6887cd 100644
> > --- a/arch/arm/boot/dts/aspeed-g6.dtsi
> > +++ b/arch/arm/boot/dts/aspeed-g6.dtsi
> > @@ -490,7 +490,6 @@
> >                         lpc: lpc@1e789000 {
> >                                 compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon";
> >                                 reg = <0x1e789000 0x1000>;
> > -                               reg-io-width = <4>;
> >
> >                                 #address-cells = <1>;
> >                                 #size-cells = <1>;
> > --
> > 2.17.1
> >
ChiaWei Wang Oct. 21, 2021, 6:37 a.m. UTC | #3
> From: Joel Stanley <joel@jms.id.au>
> Sent: Thursday, October 21, 2021 2:29 PM
> 
> On Fri, 8 Oct 2021 at 04:35, Joel Stanley <joel@jms.id.au> wrote:
> >
> > On Mon, 27 Sept 2021 at 02:31, Chia-Wei Wang
> > <chiawei_wang@aspeedtech.com> wrote:
> > >
> > > The 'reg-io-width' properties are not used by LPC drivers nor
> > > documented as part of bindings. Therefore drop them.
> >
> > I assume they are there due to the lpc having a 'syscon' compatible.
> > THey are documented in the syscon bindings:
> >
> > Documentation/devicetree/bindings/mfd/syscon.yaml
> >
> > Andrew, do you have any comments?
> 
> Andrew indicated to me that he agreed with my observation: the properties
> should be present as they are used by the regmap/syscon.

Thanks. Shall we just drop this one and move on with the rest patches?
However, like Rob mentioned, when doing 'make dtbs_check', there is a warning:

/builds/robherring/linux-dt-review/arch/arm/boot/dts/aspeed-ast2500-evb.dt.yaml:
lpc@1e789000: 'ibt@140', 'kcs@114', 'kcs@24', 'kcs@28', 'kcs@2c', 'lhc@a0', 'reg-io-width' do not match any of the regexes:
'^lpc-ctrl@[0-9a-f]+$', '^lpc-snoop@[0-9a-f]+$', '^reset-controller@[0-9a-f]+$', 'pinctrl-[0-9]+'
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml

As part of this series has been applied, maybe we can fix this later?

Regards,
Chiawei

> 
> >
> > >
> > > This is in preparation to move aspeed-lpc.txt to YAML schema.
> > >
> > > Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
> > > ---
> > >  arch/arm/boot/dts/aspeed-g4.dtsi | 1 -
> > > arch/arm/boot/dts/aspeed-g5.dtsi | 1 -
> > > arch/arm/boot/dts/aspeed-g6.dtsi | 1 -
> > >  3 files changed, 3 deletions(-)
> > >
> > > diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi
> > > b/arch/arm/boot/dts/aspeed-g4.dtsi
> > > index c5aeb3cf3a09..45a25eb4baa4 100644
> > > --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> > > +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> > > @@ -345,7 +345,6 @@
> > >                         lpc: lpc@1e789000 {
> > >                                 compatible =
> "aspeed,ast2400-lpc-v2", "simple-mfd", "syscon";
> > >                                 reg = <0x1e789000 0x1000>;
> > > -                               reg-io-width = <4>;
> > >
> > >                                 #address-cells = <1>;
> > >                                 #size-cells = <1>; diff --git
> > > a/arch/arm/boot/dts/aspeed-g5.dtsi
> > > b/arch/arm/boot/dts/aspeed-g5.dtsi
> > > index 73ca1ec6fc24..8e1d00d8445e 100644
> > > --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> > > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> > > @@ -436,7 +436,6 @@
> > >                         lpc: lpc@1e789000 {
> > >                                 compatible =
> "aspeed,ast2500-lpc-v2", "simple-mfd", "syscon";
> > >                                 reg = <0x1e789000 0x1000>;
> > > -                               reg-io-width = <4>;
> > >
> > >                                 #address-cells = <1>;
> > >                                 #size-cells = <1>; diff --git
> > > a/arch/arm/boot/dts/aspeed-g6.dtsi
> > > b/arch/arm/boot/dts/aspeed-g6.dtsi
> > > index 1b47be1704f8..0d1aae6887cd 100644
> > > --- a/arch/arm/boot/dts/aspeed-g6.dtsi
> > > +++ b/arch/arm/boot/dts/aspeed-g6.dtsi
> > > @@ -490,7 +490,6 @@
> > >                         lpc: lpc@1e789000 {
> > >                                 compatible =
> "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon";
> > >                                 reg = <0x1e789000 0x1000>;
> > > -                               reg-io-width = <4>;
> > >
> > >                                 #address-cells = <1>;
> > >                                 #size-cells = <1>;
> > > --
> > > 2.17.1
> > >
Joel Stanley Oct. 21, 2021, 6:48 a.m. UTC | #4
On Thu, 21 Oct 2021 at 06:37, ChiaWei Wang <chiawei_wang@aspeedtech.com> wrote:
>
> > From: Joel Stanley <joel@jms.id.au>
> > Sent: Thursday, October 21, 2021 2:29 PM
> >
> > On Fri, 8 Oct 2021 at 04:35, Joel Stanley <joel@jms.id.au> wrote:
> > >
> > > On Mon, 27 Sept 2021 at 02:31, Chia-Wei Wang
> > > <chiawei_wang@aspeedtech.com> wrote:
> > > >
> > > > The 'reg-io-width' properties are not used by LPC drivers nor
> > > > documented as part of bindings. Therefore drop them.
> > >
> > > I assume they are there due to the lpc having a 'syscon' compatible.
> > > THey are documented in the syscon bindings:
> > >
> > > Documentation/devicetree/bindings/mfd/syscon.yaml
> > >
> > > Andrew, do you have any comments?
> >
> > Andrew indicated to me that he agreed with my observation: the properties
> > should be present as they are used by the regmap/syscon.
>
> Thanks. Shall we just drop this one and move on with the rest patches?
> However, like Rob mentioned, when doing 'make dtbs_check', there is a warning:
>
> /builds/robherring/linux-dt-review/arch/arm/boot/dts/aspeed-ast2500-evb.dt.yaml:
> lpc@1e789000: 'ibt@140', 'kcs@114', 'kcs@24', 'kcs@28', 'kcs@2c', 'lhc@a0', 'reg-io-width' do not match any of the regexes:
> '^lpc-ctrl@[0-9a-f]+$', '^lpc-snoop@[0-9a-f]+$', '^reset-controller@[0-9a-f]+$', 'pinctrl-[0-9]+'
> From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml
>
> As part of this series has been applied, maybe we can fix this later?

Yes, that's a good idea.

I will send a pull request with your driver to the soc maintainers.

Cheers,

Joel

>
> Regards,
> Chiawei
>
> >
> > >
> > > >
> > > > This is in preparation to move aspeed-lpc.txt to YAML schema.
> > > >
> > > > Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
> > > > ---
> > > >  arch/arm/boot/dts/aspeed-g4.dtsi | 1 -
> > > > arch/arm/boot/dts/aspeed-g5.dtsi | 1 -
> > > > arch/arm/boot/dts/aspeed-g6.dtsi | 1 -
> > > >  3 files changed, 3 deletions(-)
> > > >
> > > > diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi
> > > > b/arch/arm/boot/dts/aspeed-g4.dtsi
> > > > index c5aeb3cf3a09..45a25eb4baa4 100644
> > > > --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> > > > +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> > > > @@ -345,7 +345,6 @@
> > > >                         lpc: lpc@1e789000 {
> > > >                                 compatible =
> > "aspeed,ast2400-lpc-v2", "simple-mfd", "syscon";
> > > >                                 reg = <0x1e789000 0x1000>;
> > > > -                               reg-io-width = <4>;
> > > >
> > > >                                 #address-cells = <1>;
> > > >                                 #size-cells = <1>; diff --git
> > > > a/arch/arm/boot/dts/aspeed-g5.dtsi
> > > > b/arch/arm/boot/dts/aspeed-g5.dtsi
> > > > index 73ca1ec6fc24..8e1d00d8445e 100644
> > > > --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> > > > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> > > > @@ -436,7 +436,6 @@
> > > >                         lpc: lpc@1e789000 {
> > > >                                 compatible =
> > "aspeed,ast2500-lpc-v2", "simple-mfd", "syscon";
> > > >                                 reg = <0x1e789000 0x1000>;
> > > > -                               reg-io-width = <4>;
> > > >
> > > >                                 #address-cells = <1>;
> > > >                                 #size-cells = <1>; diff --git
> > > > a/arch/arm/boot/dts/aspeed-g6.dtsi
> > > > b/arch/arm/boot/dts/aspeed-g6.dtsi
> > > > index 1b47be1704f8..0d1aae6887cd 100644
> > > > --- a/arch/arm/boot/dts/aspeed-g6.dtsi
> > > > +++ b/arch/arm/boot/dts/aspeed-g6.dtsi
> > > > @@ -490,7 +490,6 @@
> > > >                         lpc: lpc@1e789000 {
> > > >                                 compatible =
> > "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon";
> > > >                                 reg = <0x1e789000 0x1000>;
> > > > -                               reg-io-width = <4>;
> > > >
> > > >                                 #address-cells = <1>;
> > > >                                 #size-cells = <1>;
> > > > --
> > > > 2.17.1
> > > >
Joel Stanley Oct. 21, 2021, 6:54 a.m. UTC | #5
On Thu, 21 Oct 2021 at 06:48, Joel Stanley <joel@jms.id.au> wrote:
>
> On Thu, 21 Oct 2021 at 06:37, ChiaWei Wang <chiawei_wang@aspeedtech.com> wrote:
> > However, like Rob mentioned, when doing 'make dtbs_check', there is a warning:
> >
> > /builds/robherring/linux-dt-review/arch/arm/boot/dts/aspeed-ast2500-evb.dt.yaml:
> > lpc@1e789000: 'ibt@140', 'kcs@114', 'kcs@24', 'kcs@28', 'kcs@2c', 'lhc@a0', 'reg-io-width' do not match any of the regexes:
> > '^lpc-ctrl@[0-9a-f]+$', '^lpc-snoop@[0-9a-f]+$', '^reset-controller@[0-9a-f]+$', 'pinctrl-[0-9]+'
> > From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml
> >
> > As part of this series has been applied, maybe we can fix this later?

FWIW, this fixes the warnings for me;

--- a/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml
+++ b/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml
@@ -56,6 +56,9 @@ properties:

   ranges: true

+  reg-io-width:
+    const: 4
+
 patternProperties:
   "^lpc-ctrl@[0-9a-f]+$":
     type: object
@@ -144,6 +147,9 @@ patternProperties:
         $ref: /schemas/types.yaml#/definitions/uint32-array
         description: The LPC I/O ports to snoop

+      clocks:
+        maxItems: 1
+
     required:
       - compatible
       - interrupts

make ARCH=arm CROSS_COMPILE="arm-linux-gnueabi-" dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml

If you are able to test this and send a patch that would be appreciated.

Cheers,

Joel
ChiaWei Wang Oct. 21, 2021, 6:59 a.m. UTC | #6
> From: Joel Stanley <joel@jms.id.au>
> Sent: Thursday, October 21, 2021 2:54 PM
> 
> On Thu, 21 Oct 2021 at 06:48, Joel Stanley <joel@jms.id.au> wrote:
> >
> > On Thu, 21 Oct 2021 at 06:37, ChiaWei Wang
> <chiawei_wang@aspeedtech.com> wrote:
> > > However, like Rob mentioned, when doing 'make dtbs_check', there is a
> warning:
> > >
> > >
> /builds/robherring/linux-dt-review/arch/arm/boot/dts/aspeed-ast2500-evb.dt.y
> aml:
> > > lpc@1e789000: 'ibt@140', 'kcs@114', 'kcs@24', 'kcs@28', 'kcs@2c',
> 'lhc@a0', 'reg-io-width' do not match any of the regexes:
> > > '^lpc-ctrl@[0-9a-f]+$', '^lpc-snoop@[0-9a-f]+$',
> '^reset-controller@[0-9a-f]+$', 'pinctrl-[0-9]+'
> > > From schema:
> > > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings
> > > /mfd/aspeed-lpc.yaml
> > >
> > > As part of this series has been applied, maybe we can fix this later?
> 
> FWIW, this fixes the warnings for me;
> 
> --- a/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml
> +++ b/Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml
> @@ -56,6 +56,9 @@ properties:
> 
>    ranges: true
> 
> +  reg-io-width:
> +    const: 4
> +
>  patternProperties:
>    "^lpc-ctrl@[0-9a-f]+$":
>      type: object
> @@ -144,6 +147,9 @@ patternProperties:
>          $ref: /schemas/types.yaml#/definitions/uint32-array
>          description: The LPC I/O ports to snoop
> 
> +      clocks:
> +        maxItems: 1
> +
>      required:
>        - compatible
>        - interrupts
> 
> make ARCH=arm CROSS_COMPILE="arm-linux-gnueabi-" dtbs_check
> DT_SCHEMA_FILES=Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml
> 
> If you are able to test this and send a patch that would be appreciated.

Sure. I will test it and send a standalone patch to fix the warning.
Thanks!

Regards,
Chiawei
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index c5aeb3cf3a09..45a25eb4baa4 100644
--- a/arch/arm/boot/dts/aspeed-g4.dtsi
+++ b/arch/arm/boot/dts/aspeed-g4.dtsi
@@ -345,7 +345,6 @@ 
 			lpc: lpc@1e789000 {
 				compatible = "aspeed,ast2400-lpc-v2", "simple-mfd", "syscon";
 				reg = <0x1e789000 0x1000>;
-				reg-io-width = <4>;
 
 				#address-cells = <1>;
 				#size-cells = <1>;
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 73ca1ec6fc24..8e1d00d8445e 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -436,7 +436,6 @@ 
 			lpc: lpc@1e789000 {
 				compatible = "aspeed,ast2500-lpc-v2", "simple-mfd", "syscon";
 				reg = <0x1e789000 0x1000>;
-				reg-io-width = <4>;
 
 				#address-cells = <1>;
 				#size-cells = <1>;
diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi
index 1b47be1704f8..0d1aae6887cd 100644
--- a/arch/arm/boot/dts/aspeed-g6.dtsi
+++ b/arch/arm/boot/dts/aspeed-g6.dtsi
@@ -490,7 +490,6 @@ 
 			lpc: lpc@1e789000 {
 				compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon";
 				reg = <0x1e789000 0x1000>;
-				reg-io-width = <4>;
 
 				#address-cells = <1>;
 				#size-cells = <1>;