Commit Graph

8 Commits

Author SHA1 Message Date
Adrian Schmutzler ba3d92c5a0 ramips: convert most mtd-mac-address cases in DTSI to nvmem
Convert most of the cases from mtd-mac-address to nvmem where
MAC addresses are set in the DTSI, but the partitions are only
located in the device DTS. This posed some problems earlier, since
in these cases we are using partitions before they are defined,
and the nvmem system did not seem to like that.

There have been a few different resolution approaches, based on
the different tradeoffs of deduplication vs. maintainability:

 1. In many cases, the partition tables were identical except for
    the firmware partition size, and the firmware partition was
    the last in the table.
    In these cases, the partition table has been moved to the
    DTSI, and only the firmware partition's "reg" property has
    been kept in the DTS files. So, the updated nvmem definition
    could stay in the DTSI files as well.

 2. For all other cases, splitting up the partition table would
    have introduced additional complexity. Thus, the nodes to be
    converted to nvmem have been moved to the DTS files where the
    partitioning was defined.

 3. For Netgear EX2700 and WN3000RP v3, the remaining DTSI file
    was completely dissolved, as it was quite small and the name
    was not really nice either.

 4. The D-Link DIR-853 A3 was converted to nvmem as well, though
    it is just a plain DTS file not taken care of in the first
    wave.

In addition, some minor rearrangements have been made for tidyness.

Not covered (yet) by this patch are:

 * Various unielec devices
 * The D-Link DIR-8xx family

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-18 23:46:02 +02:00
Adrian Schmutzler c846dd91f0 ramips: remove model name from LED labels
Like in the previous patch for ath79 target, this will remove the
"devicename" from LED labels in ramips as well.

The devicename is removed in DTS files and 01_leds, consolidation
of definitions into DTSI files is done where (easily) possible,
and migration scripts are updated.

For the latter, all existing definitions were actually just
devicename migrations anyway. Therefore, those are removed and
a common migration file is created in target base-files. This is
actually another example of how the devicename removal makes things
easier.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-02 14:51:57 +02:00
Adrian Schmutzler 621297e867 ramips: move dts-v1 statement to top-level DTSI files
The "/dts-v1/;" identifier is supposed to be present once at the
top of a device tree file after the includes have been processed.

In ramips, we therefore requested to have in the DTS files so far,
and omit it in the DTSI files. However, essentially the syntax of
the parent mtxxxx/rtxxxx DTSI files already determines the DTS
version, so putting it into the DTS files is just a useless repetition.

Consequently, this patch puts the dts-v1 statement into the top-level
SoC-based DTSI files, and removes all other occurences.
Since the dts-v1 statement needs to be before any other definitions,
this also moves the includes accordingly where necessary.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-25 23:26:40 +02:00
Adrian Schmutzler 0cfdc7d446 target: update SPDX license names
SPDX moved from GPL-2.0 to GPL-2.0-only and from GPL-2.0+ to
GPL-2.0-or-later. Reflect that in the SPDX license headers.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-22 20:58:26 +02:00
David Bauer 6a76ea359b ramips: reorganize NETGEAR sercomm boards
This re-organizes the device-tree files for the Sercomm-manufactured
NETGEAR routers. They are now split into two different base-boards,
from which the respective model is extended.

This partially reverts commit c7842ceaaa ("ramips: reorganize DTSI
files for Netgear R devices"), which introduced inheritance between two
completely unrelated base-boards.

Signed-off-by: David Bauer <mail@david-bauer.net>
2019-11-24 23:17:20 +01:00
David Bauer 3459013257 ramips: correct R6220 button flag
All buttons on the Netgear R6220 are active-low while they are flagged
as active-high.

The GPIO status reads the following for no buttons pressed:

root@64367-r6220:~# cat /sys/kernel/debug/gpio
gpio-7   (                    |wps                 ) in  hi
gpio-8   (                    |wifi                ) in  hi
gpio-14  (                    |reset               ) in  hi

Signed-off-by: David Bauer <mail@david-bauer.net>
2019-11-09 19:15:40 +01:00
Adrian Schmutzler c7842ceaaa ramips: reorganize DTSI files for Netgear R devices
This reorganizes DTSI files for the Netgear R devices in mt7621
(and the WNDR3700 v5). It creates a common DTSI for all R (sercomm)
devices and distributes the remaining code in r6220.dtsi to R6220
and WNDR3700 v5.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-11-06 14:43:04 +01:00
Adrian Schmutzler 7196ca1d49 ramips/mt7621: Name DTS files based on scheme
As introduced with ath79, DTS files for ramips will now be labelled
soc_vendor_device.dts(i). With this change, DTS files can be
selected automatically without further manual links.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-07-10 17:36:29 +02:00