Commit Graph

7 Commits (7c07a0f4c335bd79b0cac3d91192e76a42bc4e18)

Author SHA1 Message Date
Sungbo Eo 1eceab3fc0 ramips: dts: use generic node name for flash
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.

While at it, remove unused m25p80 label.

Tested on rt5350 (for spi-nor) and rt3662 (for cfi-flash).

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: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo 22a21b0c18 ramips: use hex notation for *-mtd-eeprom property
Change "0" to "0x0" for consistency. This is an extension of commit 34abfb6e91
("ramips: convert mediatek,mtd-eeprom from decimal to hex notation").

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Chuanhong Guo b756ea2a90 ramips: replace pinctrl property names
Upstream pinctrl driver in drivers/staging uses
groups/function/ralink,num-gpios instead of
ralink,group/ralink,function/ralink,nr-gpio
Replace these properties in dts as well as the pinctrl driver in
patches-4.14.
This commit is created using:
sed -i 's/ralink,group/groups/g'
sed -i 's/ralink,function/function/g'
sed -i 's/ralink,nr-gpio/ralink,num-gpios/g'

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Adrian Schmutzler e4ce3109f2 ramips: simplify state_default/pinctrl0 in device DTS files
The node pinctrl0 is already set up in the SOC DTSI files, but
defined again as member of pinctrl in most of the device DTS(I)
files. This patch removes this redundancy for the entire ramips
target.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 556ff09875 ramips/mt762x: convert devices to interrupt-driven gpio-keys
This converts all remaining devices to use interrupt-driven
gpio-keys compatible instead of gpio-keys-polled.
The poll-interval is removed.

While at it, add/remove newlines in keys and leds node where
necessary.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 6640e1c368 ramips: clean and improve MAC address setup in 02_network
This patch removes unnecessary MAC address setup statements in
ramips' 02_network by doing several optimizations:

1. For the following devices, lan_mac was set up with
   mtd_get_mac_binary although the same address was set in DTS.
   The lan_mac statement is removed in 02_network, but
   wan_mac is kept:
   - mercury,mac1200r-v2
   - phicomm,k2g
   - skylab,skw92a
   - wiznet,wizfi630a

2. For the following devices, wan_mac was set up with
   mtd_get_mac_binary although the same address was set in DTS.
   The wan_mac statement is removed in 02_network, no
   lan_mac is present:
   - buffalo,whr-g300n
   - glinet,gl-mt300n-v2
   - zyxel,keenetic-start

3. For the following device, lan_mac and wan_mac were set up
   with mtd_get_mac_binary to the same address as set in DTS.
   Both statements are removed in 02_network:
   - buffalo,whr-600d

4. For some devices, it was possible to move setup from 02_network
   to DTS by introducing previously missing mtd_mac_address:
   - buffalo,whr-1166d
   - buffalo,whr-300hp2
   - buffalo,wsr-600dhp
   - ohyeah,oy-0001
   - planex,vr500

5. For one device, mtd_mac_address was just wrong and overwritten
   by 02_network. Put the correct value in DTS and remove redundant
   statement in 02_network:
   - asus,rt-ac57u

6. For one device, MAC address defined in DTS is exchanged together
   with lan_mac/wan_mac setup in 02_network, so that cases in
   02_network can be merged:
   - phicomm,k2p

For some devices, an empty case has to be used to prevent them
from falling into the default case and have
WAN address = eth0 address + 1 set to them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 48047b3a5c ramips/mt7620: 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>
5 years ago