[OpenWrt-Devel] [PATCH 00/12] lantiq: switch to devicename:colour:function naming scheme

Mathias Kresin openwrt at kresin.me
Wed Dec 23 11:29:07 EST 2015

I chose to use Device Tree Source files to define some common used
leds. This way it's possible to prevent the bloating (as it can be seen
on other tragets) of the led board.d file as well as the diag.sh file.
No need to carry dozen of - unrelated - board specific led definitions
with each board.

The devicename is the same for all boards: "soc". Using for example the
TDW8970. The leds of this board are defined in the TDW89x0.dtsi include
file and shared with the TWD8980. Therefore I would name the device
part of the led label "TWD89x0". When it comes to the situation that
for these boards a led mapping needs to be added to board.d led file,
the $board approach wouldn't work. This is unnecessary error prone and
therefore I used "soc".

The colours where matched to the names used in the board manual. The
function names are either the led lable printed on the board cases or
the name used in the manual. If I found a led missing, I left a comment
in the dts file.

Due to missing board manuals or insufficient informations in the board
manual, I wasn't able to rename the leds of the following boards:
ARV7519PW, ARV7510PW22, ARV4510PW and ARV4518PWR01*.

The ARV4518PWR01* boards are somehow special, since the leds doesn't
match the leds from the manual or pictures I found (e.g. there
shouldn't be a wps led).

If someone can provide the required informations for the mentioned
boards, feel free to contact me.

The first few patches are only for cleaning up some of the dts files,
which made it easier for me to rename the leds later on. Patch 11 "Add
support for indicating the boot state using three leds" doesn't match
directly the purpose of the series, but it allows me to remove even
more leds form the board.d led file before renaming.


In addition, I tried to allow dsl_notify.sh to control a shared
dsl/internet LED as well. But I missed that dsl_notify.sh assigns a
timer trigger to the LED and therefore replaces the netdev trigger.

Till now, I couldn't figure out, how to reload the configuration of a
single led (here at the dsl_notify UP event to re-add the netdev

Did I missed something or does this functionality need to be


Since I have to had a look at all dts files, I noticed the following

- ARV4525PW: doesn't have bootargs
- GIGASX76X: doesn't have leds defined, where the old mach file had

This series has been runtime tested on BTHOMEHUBV5A, TDW8980,
VGV7510KW22 and ARV752DPW22.

All other boards are compile tested.

Mathias Kresin (12):
  lantiq: P2812HNUFX - move leds to dtsi
  lantiq: BTHOMEHUBV2B - remove missing usb led workaround
  lantiq: ARV4518PWR01* move redundant parts to dtsi
  lantiq: DGN1000B - fix typo in dts file
  lantiq: ARV752DPW22 - fix dts file
  lantiq: ARV752DPW - fix dts file
  lantiq: define default leds in dts files
  lantiq: use default leds defined in DTS
  lantiq: use power leds defined in DTS
  lantiq: use dsl led defined in DTS
  lantiq: add support for indicating the boot state using three leds
  lantiq: use soc:colour:function led naming scheme

 target/linux/lantiq/base-files/etc/board.d/01_leds |  63 ++-----
 target/linux/lantiq/base-files/etc/diag.sh         |  50 ++----
 .../lantiq/base-files/lib/functions/lantiq.sh      |  16 ++
 target/linux/lantiq/base-files/sbin/dsl_notify.sh  |  14 +-
 target/linux/lantiq/dts/ARV4510PW.dts              |  27 ++-
 target/linux/lantiq/dts/ARV4518PWR01.dts           | 179 +------------------
 target/linux/lantiq/dts/ARV4518PWR01.dtsi          | 196 +++++++++++++++++++++
 target/linux/lantiq/dts/ARV4518PWR01A.dts          | 179 +------------------
 target/linux/lantiq/dts/ARV4519PW.dts              |  60 ++++---
 target/linux/lantiq/dts/ARV4520PW.dts              |  56 ++++--
 target/linux/lantiq/dts/ARV4525PW.dts              |  29 ++-
 target/linux/lantiq/dts/ARV452CQW.dts              |  55 +++---
 target/linux/lantiq/dts/ARV7510PW22.dts            |  16 +-
 target/linux/lantiq/dts/ARV7518PW.dts              |  54 +++---
 target/linux/lantiq/dts/ARV7519PW.dts              |  24 ++-
 target/linux/lantiq/dts/ARV7519RW22.dts            |  30 ++--
 target/linux/lantiq/dts/ARV7525PW.dts              |  31 ++--
 target/linux/lantiq/dts/ARV752DPW.dts              |  47 +++--
 target/linux/lantiq/dts/ARV752DPW22.dts            |  67 ++++---
 target/linux/lantiq/dts/ARV8539PW22.dts            |  30 +++-
 target/linux/lantiq/dts/BTHOMEHUBV2B.dts           |  21 ++-
 target/linux/lantiq/dts/BTHOMEHUBV3A.dts           |  21 ++-
 target/linux/lantiq/dts/BTHOMEHUBV5A.dts           |  23 ++-
 target/linux/lantiq/dts/DGN1000B.dts               |  32 ++--
 target/linux/lantiq/dts/DGN3500.dtsi               |  44 +++--
 target/linux/lantiq/dts/EASY80920.dtsi             |  35 ++--
 target/linux/lantiq/dts/FRITZ3370.dts              |  35 ++--
 target/linux/lantiq/dts/FRITZ7320.dts              |  31 ++--
 target/linux/lantiq/dts/GR7000.dts                 |  28 +--
 target/linux/lantiq/dts/H201L.dts                  |  37 ++--
 target/linux/lantiq/dts/P2601HNFX.dts              |  40 +++--
 target/linux/lantiq/dts/P2812HNUF1.dts             |  61 -------
 target/linux/lantiq/dts/P2812HNUF3.dts             |  53 ------
 target/linux/lantiq/dts/P2812HNUFX.dtsi            |  76 +++++++-
 target/linux/lantiq/dts/TDW8980.dts                |   2 +-
 target/linux/lantiq/dts/TDW89X0.dtsi               |  35 ++--
 target/linux/lantiq/dts/VG3503J.dtsi               |  21 ++-
 target/linux/lantiq/dts/VGV7510KW22.dtsi           |  41 +++--
 target/linux/lantiq/dts/VGV7519.dtsi               |  70 ++++----
 target/linux/lantiq/dts/WBMR.dts                   |  42 +++--
 40 files changed, 1034 insertions(+), 937 deletions(-)
 create mode 100644 target/linux/lantiq/dts/ARV4518PWR01.dtsi

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list