mbox series

[v2,0/8] Arm boards syscon 'unit_address_format' clean-ups

Message ID 20210913192816.1225025-1-robh@kernel.org
Headers show
Series Arm boards syscon 'unit_address_format' clean-ups | expand

Message

Rob Herring Sept. 13, 2021, 7:28 p.m. UTC
This series addresses the last of the dtc 'unit_address_format'
warnings in the tree.

The remaining issue was dealing with the node names on 2 bindings for
Arm Ltd boards syscon child nodes: register-bit-led and Versatile ICST.
Both of these used an offset property for register address rather than
'reg' which is the preference nowadays. With a 'reg' property, then we
can have a proper node name and unit-address. This series adds support
for using 'reg' instead and updates the node names and unit-addresses.

The dts file changes have inter-dependencies, but the clock and led
changes can go via each subsystem.

Rob


Rob Herring (8):
  dt-bindings: leds: Convert register-bit-led binding to DT schema
  dt-bindings: leds: register-bit-led: Use 'reg' instead of 'offset'
  leds: syscon: Support 'reg' in addition to 'offset' for register
    address
  dt-bindings: clock: arm,syscon-icst: Use 'reg' instead of 'vco-offset'
    for VCO register address
  clk: versatile: clk-icst: Support 'reg' in addition to 'vco-offset'
    for register address
  ARM: dts: arm: Update register-bit-led nodes 'reg' and node names
  ARM: dts: arm: Update ICST clock nodes 'reg' and node names
  kbuild: Enable dtc 'unit_address_format' warning by default

 .../bindings/clock/arm,syscon-icst.yaml       |  5 +
 .../bindings/leds/register-bit-led.txt        | 94 ------------------
 .../bindings/leds/register-bit-led.yaml       | 95 +++++++++++++++++++
 arch/arm/boot/dts/arm-realview-eb.dtsi        | 42 +++++---
 arch/arm/boot/dts/arm-realview-pb1176.dts     | 42 +++++---
 arch/arm/boot/dts/arm-realview-pb11mp.dts     | 48 +++++++---
 arch/arm/boot/dts/arm-realview-pbx.dtsi       | 42 +++++---
 arch/arm/boot/dts/integrator.dtsi             | 23 +++--
 arch/arm/boot/dts/integratorap-im-pd1.dts     |  9 +-
 arch/arm/boot/dts/integratorap.dts            | 15 ++-
 arch/arm/boot/dts/integratorcp.dts            |  9 +-
 arch/arm/boot/dts/mps2.dtsi                   | 10 +-
 arch/arm/boot/dts/versatile-ab-ib2.dts        |  6 +-
 arch/arm/boot/dts/versatile-ab.dts            | 27 ++++--
 arch/arm64/boot/dts/arm/juno-motherboard.dtsi | 27 ++++--
 drivers/clk/versatile/clk-icst.c              |  3 +-
 drivers/leds/leds-syscon.c                    |  3 +-
 scripts/Makefile.lib                          |  1 -
 18 files changed, 316 insertions(+), 185 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/leds/register-bit-led.txt
 create mode 100644 Documentation/devicetree/bindings/leds/register-bit-led.yaml

Comments

Rob Herring Sept. 14, 2021, 4:22 p.m. UTC | #1
On Tue, Sep 14, 2021 at 12:41:31AM +0200, Linus Walleij wrote:
> On Mon, Sep 13, 2021 at 9:28 PM Rob Herring <robh@kernel.org> wrote:
> 
> > Convert the register-bit-led binding to DT schema format.
> >
> > As the example just repeats nearly identical nodes, trim it down to a
> > few nodes and use some documented values for 'linux,default-trigger'.
> >
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Pavel Machek <pavel@ucw.cz>
> > Cc: linux-leds@vger.kernel.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> 
> Thanks for doing this!
> 
> > v2:
> >  - Drop undocumented linux,default-trigger values
> 
> Will this lead to warnings? People tend to want to use these.

Yes. The list for linux,default-trigger was purposely limited rather 
than just throw in all the occurrences we could find. It's kind of a 
mess with similar or overlapping names.

There's other and better ways to do this now. There's the 'function' 
property and you can link to another device. 

> 
> (Possibly we could actually create operating-system independent
> triggers that make sense on any system. But it's another can
> of worms we don't need to open today.)
> 
> > +    enum:
> > +      [ 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800,
> > +        0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, 0x40000, 0x80000,
> > +        0x100000, 0x200000, 0x400000, 0x800000, 0x1000000, 0x2000000, 0x4000000,
> > +        0x8000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000 ]
> 
> That's an interesting looking enum :D
> 
> But I can't think of anything better, so:

We could define our own type, but I can't say I recall the need for this 
elsewhere.

> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Thanks.

Rob
Stephen Boyd Sept. 14, 2021, 7:59 p.m. UTC | #2
Quoting Rob Herring (2021-09-13 12:28:13)
> The ICST binding now also supports 'reg' in addition to 'vco-offset' for

> the VCO register address. Add support to the driver to get the VCO

> address from 'reg'.

> 

> Cc: Linus Walleij <linus.walleij@linaro.org>

> Cc: Stephen Boyd <sboyd@kernel.org>

> Cc: linux-arm-kernel@lists.infradead.org

> Cc: linux-clk@vger.kernel.org

> Signed-off-by: Rob Herring <robh@kernel.org>

> ---


Reviewed-by: Stephen Boyd <sboyd@kernel.org>


I don't think this driver is changing much so you can take it through DT
tree if you prefer.
Rob Herring Sept. 14, 2021, 10 p.m. UTC | #3
On Tue, Sep 14, 2021 at 12:59:48PM -0700, Stephen Boyd wrote:
> Quoting Rob Herring (2021-09-13 12:28:13)
> > The ICST binding now also supports 'reg' in addition to 'vco-offset' for
> > the VCO register address. Add support to the driver to get the VCO
> > address from 'reg'.
> > 
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Stephen Boyd <sboyd@kernel.org>
> > Cc: linux-arm-kernel@lists.infradead.org
> > Cc: linux-clk@vger.kernel.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> 
> Reviewed-by: Stephen Boyd <sboyd@kernel.org>
> 
> I don't think this driver is changing much so you can take it through DT
> tree if you prefer.

clk tree is fine. :)

Rob
Linus Walleij Sept. 14, 2021, 10:13 p.m. UTC | #4
On Mon, Sep 13, 2021 at 9:28 PM Rob Herring <robh@kernel.org> wrote:

> The ICST binding now also supports 'reg' in addition to 'vco-offset' for
> the VCO register address. Add support to the driver to get the VCO
> address from 'reg'.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-clk@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>

This is nice.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Stephen Boyd Sept. 15, 2021, 1:10 a.m. UTC | #5
Quoting Rob Herring (2021-09-14 15:00:08)
> On Tue, Sep 14, 2021 at 12:59:48PM -0700, Stephen Boyd wrote:
> > Quoting Rob Herring (2021-09-13 12:28:13)
> > > The ICST binding now also supports 'reg' in addition to 'vco-offset' for
> > > the VCO register address. Add support to the driver to get the VCO
> > > address from 'reg'.
> > > 
> > > Cc: Linus Walleij <linus.walleij@linaro.org>
> > > Cc: Stephen Boyd <sboyd@kernel.org>
> > > Cc: linux-arm-kernel@lists.infradead.org
> > > Cc: linux-clk@vger.kernel.org
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > ---
> > 
> > Reviewed-by: Stephen Boyd <sboyd@kernel.org>
> > 
> > I don't think this driver is changing much so you can take it through DT
> > tree if you prefer.
> 
> clk tree is fine. :)
> 

Alright alright