Commit Graph

36 Commits (be2b61e4f1ec1e351733bebb7105629599034639)

Author SHA1 Message Date
Mathias Kresin ffa55386f1 ramips: fix dtc compiler warnings
The latest dtc compiler considers nodes named i2c or spi as the
respective bus:

  /pinctrl/i2c: incorrect #address-cells for I2C bus
  /pinctrl/spi: incorrect #address-cells for SPI bus

Rename the node to fix the false positives.

Fix the spi node unit address for the DWR-512-B and UBNT-ER-e50 to get
rid of the following warning:

  SPI bus unit address format error, expected "n"

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 9ebce69611 ramips: revert fix rt3883 pci pinmux
This reverts commit dcdc6d9dad.

Even if described this way in the datasheet, it causes a bootloop on a
RT-N56U (v1):

  of-flash 1c000000.nor-flash: do_map_probe() failed for type cfi_probe
  of-flash 1c000000.nor-flash: do_map_probe() failed
  VFS: Cannot open root device “(null)” or unknown-block(0,0): error -6

Fixes: FS#1930

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin a58535771f ramips: set usb led trigger via devicetree
Assign the usbdev trigger via devicetree for all subtargets and drop
the userspace handling of the usb leds.

With the change all usb ports are triggering the usb led instead of
only usb 1.1 XOR usb 2.0 XOR usb 3.0 as it was before.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin a6e11ccb13 ramips: fix rt3883 pinmux for second SPI
The rt3883 doesn't have a pinmux group named spi_cs1. The cs1 is part
of the pci group. The function pci-func enables the second chip select.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin dcdc6d9dad ramips: fix rt3883 pci pinmux
The PCI pins need to be set to "PCI Host support one device" to allow
the use of one PCI device and flash memory.

The pci-fnc function is intended to be used if no PCI is used but
flash, nand or the codec functionality is.

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
Mathias Kresin d8e7a526a3 ramips: use ralink,nr-gpio instead of ralink,num-gpios
Since commit c1e7738988f5 ("checks: add gpio binding properties check")
dtc treats any *-gpios and *-gpio property as phandle at least during
checks. The only whitelisted property is nr-gpio.

Use ralink,nr-gpio in favour of ralink,num-gpios to get rid of false
positive warnings.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 1bad2b74ae ramips: fix cpu interrupt controller dtc warnings
The cpu interrupt controller doesn't have a reg property, hence we
can't use a unit address in the node name.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin b9dbf3f3c8 ramips: fix cpu related dtc warnings
We need a reg property if we are using a unit address.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Vianney le Clément de Saint-Marcq eda27d7557 ramips: fix usbphy DT nodes on linux 4.14
The Ralink USB PHY driver merged into mainline has a slightly different
device tree binding than the patch that was used with linux 4.9.
The new driver requires a `ralink,sysctl` node pointing to the `syscon`
node.

This patch also sets `#phy-cells` to 0, as recommended by the mainline
documentation [1].

[1] Documentation/devicetree/bindings/phy/ralink-usb-phy.txt

Signed-off-by: Vianney le Clément de Saint-Marcq <code@quartic.eu>
6 years ago
Mathias Kresin 05912a304c ramips: rt3883: fix dtc compiler warning
Fixes the following compiler warning:

Warning (reg_format): "reg" property in /ethernet@10100000/port@0 has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value for /ethernet@10100000/port@0
Warning (avoid_default_addr_size): Relying on default #size-cells value for /ethernet@10100000/port@0

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Michael Lee 921d782eb7 ramips: update i2s dtsi files
Signed-off-by: Michael Lee <igvtee@gmail.com>
8 years ago
Michael Lee 011ce1fad6 ramips: update i2c dtsi files
Signed-off-by: Michael Lee <igvtee@gmail.com>
8 years ago
Michael Lee f36d624d88 ramips: add gdma hsdma dts info
Signed-off-by: Michael Lee <igvtee@gmail.com>
8 years ago
Stanislav Galabov ffaaa6788a ramips: DTS modifications
This commit makes the following modifications to ramips dts files:
1. Add clkctrl node to all dtsi files (although not used for now)
2. Add clocks and clock-names properties to some nodes (usbphy, pci)
3. Add usbphy node for rt3050 (although not used for now)
4. Add clock-frequency to uart nodes in mt7621.dtsi and mt7628an.dtsi

These modifications, although not fully used at the moment, will make
it easier for FreeBSD to adopt and use LEDE ramips dts files with
minimal changes for easier maintenance.

Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
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 600c224213 ramips: Add hex prefix (0x) to dtsi reg properties where needed.
Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
8 years ago
Stanislav Galabov b8f73d7f0a ramips: introduce serial0 aliases
This patch introduces serial0 aliases in the ramips DTS files, which can
then be used to denote the active console instead of relying on bootargs.

Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
8 years ago
John Crispin eb9fccc440 ralink: update the usb phy driver to the version sent upstream
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 48114
8 years ago
John Crispin 9b675a2a33 ralink: fix USB compatible strings
switch to the upstream compatible strings for ehci and ohci support.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 48113
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 c550ad3d3a ramips: update dtsi files to support second spi device
Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47580
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 654bc380ec ralink: add 3.18 support
keep default as 3.14, mt7621 gic need to be ported to 3.18

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44349
9 years ago
Felix Fietkau 69ee1807ed ralink: add ethernet fe and esw reset control bit
Signed-off-by: michael lee <igvtee@gmail.com>

SVN-Revision: 44042
9 years ago
John Crispin 62dd252b86 ramips: rt3883: Fix a typo in rt3883.dtsi
Signed-off-by: Christopher Lais <chris+openwrt@zenthought.org>

SVN-Revision: 39297
10 years ago
John Crispin 8cd1c99707 ralink: add pinctrl driver
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38026
11 years ago
John Crispin 41f62983d3 ramips: dts file cleanup
cleanup some inconsistencies in the dts files

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37783
11 years ago
John Crispin dca18caa79 ramips: revert gpio regulator dts update
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37021
11 years ago
John Crispin 55fb6f3a05 ralink: update patches
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37016
11 years ago
John Crispin 338ff04cab ramips: add gpio base properties to dtsi files
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36560
11 years ago
John Crispin bc7b310959 move memory detect node to dtsi files
Signed-of-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36290
11 years ago
Gabor Juhos 909fabe574 ramips: add mdio-bus node to rt3883.dtsi
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36272
11 years ago
Gabor Juhos 474264f64c ramips: add PCI node for rt3883.dtsi
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36263
11 years ago
Gabor Juhos aedf05caa0 ramips: remove trailing whitespaces from dts files
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36246
11 years ago
John Crispin 770b28f146 add the dts files that describe the boards in future
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36168
11 years ago