Commit Graph

24 Commits (be2b61e4f1ec1e351733bebb7105629599034639)

Author SHA1 Message Date
Petr Štetiar dd3ec40d3d ramips: dts: Unify naming of gpio-led nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Petr Štetiar e8eaf794ec ramips: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Mathias Kresin f5e61350e7 ramips: fix firmware splitter for edimax based boards
Use the correct splitter for board with the edimax header.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
INAGAKI Hiroshi d70ec3008d ramips: specify "firmware" partition format
Specify firmware partition format by compatible string.

formats in ramips:

- denx,uimage
- tplink,firmware
- seama

It's unlikely but the firmware splitting might not work any longer for
the following boards, due to a custom header:

- EX2700: two uImage headers
- BR-6478AC-V2: edimax-header
- 3G-6200N: edimax-header
- 3G-6200NL: edimax-header
- BR-6475ND: edimax-header
- TEW-638APB-V2: umedia-header
- RT-N56U: mkrtn56uimg

But it rather looks like the uImage splitter is fine with the extra
header.

The following dts are not touched, due to lack of a compatible string in
the matching firmware splitter submodule:

- CONFIG_MTD_SPLIT_JIMAGE_FW
    DWR-116-A1.dts
    DWR-118-A2.dts
    DWR-512-B.dts
    DWR-921-C1.dts
    LR-25G001.dts
- CONFIG_MTD_SPLIT_TRX_FW
    WCR-1166DS.dts
    WSR-1166.dts
- CONFIG_MTD_SPLIT_MINOR_FW
    RBM11G.dts
    RBM33G.dts
- CONFIG_MTD_SPLIT_LZMA_FW
    AR670W.dts
- CONFIG_MTD_SPLIT_WRGG_FW
    DAP-1522-A1.dts

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Mathias Kresin 8f4dfadd5a ramips: add support for indicating the boot state using multiple leds
Use diag.sh version used for other targets supporting different leds
for the different boot states.

The existing led sequences should be the same as before.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Alex Maclean 6031ab345d ramips: move partitions into partition table node
Starting with kernel 4.4, the use of partitions as direct subnodes of the
mtd device is discouraged and only supported for backward compatiblity
reasons.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years ago
Mathias Kresin bfd65fc4ab ramips: fix whitespace and comment issues in dts
Fix space vs. tabs issue and trainling whitespaces. Use C style
comments or drop the comments if they explain what is already to see in
the devicetree parameters.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 53624c1702 ramips: fix dtc warnings
Fix individual boards dtc warnings or obvious mistakes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin f9b8328d79 ramips: fix pci/pcie related dtc warnings
Add the ranges property to the PCI bridges where missing. Add the unit
address to PCI bridge where missing.

Rework the complete rt3883 pci node. Drop the PCI unit nodes from the
dtsi. They are not used by any dts file and should be rather in the dts
than in the SoC dtsi. Express the PCI-PCI bridge in a clean devicetree
syntax. The ralink,pci-slot isn't used by any driver, drop it. Move the
pci interrupt controller out of the pci node. It doesn't share the same
reg and therefore should be an independent/SoC child node.

Move the pci related rt3883 pinctrl setting to the dtsi instead of
defining the very same for each rt3883 board.

If the device_type property is used for PCI units, the unit is treated
as pci bridge which it isn't. Drop it for PCI units.

Reference pci-bridges or the pci node defined in the dtsi instead of
recreating the whole node hierarchy. It allows to change the referenced
node in the dtsi without the need to touch all dts.

Fix the PCI(e) wireless unit addresses. All our PCI(e) wireless chips
are the first device on the bus. The unit address has to be the bus
address instead of the PCI vendor/device id.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Chuanhong Guo c9c4b2116c ramips: Use dts alias based status led
Also fix several typos in led node name.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Mathias Kresin 95fe3c51e5 ramips: fix polarity in gpio-export node
If we need to set the initial output value to GPIOF_OUT_INIT_HIGH (1) to
enable something, the pin is ACTIVE_HIGH. The same applies to
GPIOF_OUT_INIT_LOW (0) and ACTIVE_LOW.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
L. D. Pinney 70b192f573 ramips: update device tree source files
Use the GPIO dt-bindings macros and add compatible strings in the
ramips device tree source files.

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 2b55c83e68 treewide: dts: use keycode defines from input dt-binding
All compiled device tree files not mentioned are binary identical to the
former ones.

Fix the obvious decimal/hex confusion for the power key of ramips/M2M.dts.

Due to the include of the input binding header, the BTN_* node names in:

  - ramips/GL-MT300A.dts
  - ramips/GL-MT300N.dts
  - ramips/GL-MT750.dts
  - ramips/Timecloud.dts

will be changed by the compiler to the numerical equivalent.

Move the binding include of lantiq boards to the file where they are
used the first time to hint the user where the values do come from.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Mathias Kresin d8dd207ea6 ramips: use the ralink,mtd-eeprom device tree property
Use the ralink,mtd-eeprom instead of invoking the userspace firmware
loader.

Set the label and compatible string according to the the PCI binding
documentation.

Use the wifi@0,0 label and the pci0,0 compatible string in case the
PCI vendor and device id is unknown. It should work anyway since the
compatible string isn't evaluated (yet).

This commit might fixes the PCIe wireless for the Buffalo WHR-600D.
This board was mentioned in the board 10-rt2x00-eeprom firmware hotplug
script but never had the correct eeprom name set to trigger the
firmware from flash extraction.

Use the usual eeprom for the soc wmac of the Dovado Tiny AC.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Mathias Kresin 0a219c8dfb ramips: use rootfs splitter and new image build code for BR-6475ND
Use the edimax uImage splitter instead of the fixed size rootfs
partition.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Stanislav Galabov 9195d8da35 ramips: DTS rework
Add node aliases to dtsi files.
Reword dts files so they're more in-line with upstream.
Fix some more warnings and errors reported by dtc

Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
8 years ago
Stanislav Galabov f8b6c9d825 ramips: Change all '/include/' clauses to '#include' so preprocessing can
be done properly for the entire device trees.

Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
8 years ago
John Crispin 651e620de5 ralink: fixup devicetree files to work with new ethernet driver
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47900
9 years ago
John Crispin 1a392636a5 ramips: use consistent naming scheme for LEDs
The upstream LED naming convention is "device:color:led-name", but it seems that many of supported boards in OpenWrt don't follow this approach.
The following patch fixes this inconsistency in dts{,i} files and updates base-files scripts for ramips target:
 * fixes wrong indentation
 * keeps case statements structure in same convention as in other scripts (no empty line after ";;", no indentation for case...esac body)
 * fixes wrong LED names for some of boards (makes them the same as in dts{,i} files)
 * combines boards with same configuration (ex. set_wifi_led "rt2800pci-phy0::radio" in 01_leds)

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>

SVN-Revision: 46664
9 years ago
John Crispin 553fea9f19 ramips: fix indentation and other mistakes in .dts{, i} files
The following patch fixes:
 * wrong indentations
 * doubled gpio-keys-polled nodes (DIR-300-B7, DIR-320-B1, DIR-610-A1)
 * duplicate spacings
 * empty lines at end of files and after last child nodes
 * trailing and leading whitespace
 * unnecessary and commented-out code
 * missing empty lines between nodes and between properties and nodes
 * unnecessary empty lines between nodes properties [1]

in .dts{,i} files, for ramips target.

[1] Some of empty lines in SOCs dtsi files were left untouched, because they seem to be there for a reason (readability?).

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>

SVN-Revision: 46613
9 years ago
John Crispin 2ea64717e2 ramips: update BR-6475ND dts
Update firmware location for 2.4GHz radio on the Edimax BR-6475nD.

Signed-off-by: Christopher Lais <chris+openwrt@zenthought.org>

SVN-Revision: 43881
9 years ago
John Crispin b77e92e020 ramips: ethernet mac cleanup
Compile tested all subtargets and profiles.
Unfortunately I don't own any board affected by these changes, so no run tests.

Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 41839
10 years ago
John Crispin f44d3f9980 ramips: soc wmac eeprom cleanup
Move eeprom extraction from scripts to dts files.
Additionally there are few other changes like:
- whitespace fixes
- add partition labels where needed
- BR6524N board doesn't exist (lost in translation?)
- fix Edimax 3g-6200nl model
- add wmac eeprom to dts for Asus RT-N14U board

Compile tested all subtargets and their profiles.
Run tested on:
- Asus RT-N15
- Asus RT-N14U
- Buffalo WHR-600D
- Argus ATP52B
- Sparklan WCR-150GN

Few problems noted:
- many boards didn't have wmac eeprom information defined at all
- several boards don't have any patitions defined (see FIXME comments in dts)

Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 41680
10 years ago
John Crispin f3a243c3dd ramips: Add profile for the Edimax BR-6475nD
Signed-off-by: Christopher Lais <chris+openwrt@zenthought.org>

SVN-Revision: 39299
10 years ago