ipq806x: more dts cleanup

Remove the wifi5g LED from the the d7800, r7500 and r7800. Albeit this
GPIO is mentioned in the GPL tarball, it doesn't do anything. The
2.4/5 GHz LEDs are connected to the wifi chips and not be controlled
from the the userspace.

Use the LEDs names/colours as they are used in the board manuals. Merge
redundant LED configurations. Use the phy[0|1]tpt trigger for the
wireless LEDs. Remove the workarounds for the not controllable wireless
LEDs.

Fix spi compatible strings and remove superfluous spi-max-frequency
parameters.

If there are two power leds, use one for indicating normal operation and
one for failsafe/upgrade. Keep the on/off state of the main power led
during boot.

Use the usb pinmux settings from the nbg6817 gpl sources.

Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
Mathias Kresin 2016-11-26 10:20:03 +01:00
parent e3caadc69d
commit 3228c2a682
8 changed files with 85 additions and 115 deletions

View file

@ -16,40 +16,26 @@ c2600)
ucidef_set_led_usbport "usb2" "USB 2" "${board}:white:usb_4" "usb3-port1" "usb4-port1"
ucidef_set_led_switch "wan" "wan" "${board}:white:wan" "switch0" "0x20"
ucidef_set_led_switch "lan" "lan" "${board}:white:lan" "switch0" "0x1e"
ucidef_set_led_default "general" "general" "${board}:white:general" "1"
;;
d7800 |\
r7500 |\
r7500v2)
ucidef_set_led_usbdev "usb1" "USB 1" "${board}:white:usb1" "1-1"
ucidef_set_led_usbdev "usb2" "USB 2" "${board}:white:usb3" "3-1"
ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
ucidef_set_led_ide "esata" "eSATA" "${board}:amber:esata"
ucidef_set_led_default "wps" "WPS" "${board}:white:wps" "0"
ucidef_set_led_default "rfkill" "rfkill" "${board}:white:rfkill" "0"
;;
r7500v2 |\
r7800)
ucidef_set_led_usbport "usb1" "USB 1" "${board}:white:usb1" "usb1-port1" "usb2-port1"
ucidef_set_led_usbport "usb2" "USB 2" "${board}:white:usb2" "usb3-port1" "usb4-port1"
ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
ucidef_set_led_ide "esata" "eSATA" "${board}:white:esata"
ucidef_set_led_wlan "wps" "WPS" "${board}:white:wps" "phy0tpt"
ucidef_set_led_wlan "rfkill" "rfkill" "${board}:white:rfkill" "phy1tpt"
;;
ea8500)
ucidef_set_led_wlan "wifi" "WIFI" "ea8500:green:wifi" "phy0radio"
ucidef_set_led_default "wps" "WPS" "ea8500:green:wps" "0"
;;
nbg6817)
ucidef_set_led_wlan "wlan2g" "WLAN2g" "$board:amber:wifi" "phy1radio"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:amber:wifi5" "phy0radio"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:amber:wifi2g" "phy1tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:amber:wifi5g" "phy0tpt"
ucidef_set_led_netdev "wan" "WAN" "$board:white:internet" "eth1"
;;
vr2600v)
ucidef_set_led_usbport "usb" "USB" "${board}:white:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
ucidef_set_led_switch "lan" "lan" "${board}:white:lan" "switch0" "0x1e"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${board}:white:wlan2g" "phy0radio"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${board}:white:wlan5g" "phy1radio"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${board}:white:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${board}:white:wlan5g" "phy1tpt"
ucidef_set_led_switch "wan" "wan" "${board}:white:wan" "switch0" "0x20"
;;
*)

View file

@ -150,7 +150,6 @@
spi5: spi@1a280000 {
status = "ok";
spi-max-frequency = <50000000>;
pinctrl-0 = <&spi_pins>;
pinctrl-names = "default";
@ -474,18 +473,18 @@
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
};
wan_red {
label = "c2600:orange:wan";
wan_amber {
label = "c2600:amber:wan";
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
};
wan_blue {
wan_white {
label = "c2600:white:wan";
gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
};
power: status {
label = "c2600:white:status";
power: power {
label = "c2600:white:power";
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};

View file

@ -25,10 +25,10 @@
serial0 = &uart4;
mdio-gpio0 = &mdio0;
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
led-boot = &power_white;
led-failsafe = &power_amber;
led-running = &power_white;
led-upgrade = &power_amber;
};
chosen {
@ -59,7 +59,7 @@
led_pins: led_pins {
mux {
pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
"gpio24","gpio26", "gpio53", "gpio64", "gpio67";
"gpio24","gpio26", "gpio53", "gpio64";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
@ -354,27 +354,27 @@
pinctrl-names = "default";
usb1 {
label = "d7800:amber:usb1";
label = "d7800:white:usb1";
gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
};
usb3 {
label = "d7800:amber:usb3";
usb2 {
label = "d7800:white:usb2";
gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
};
status {
label = "d7800:amber:status";
power_amber: power_amber {
label = "d7800:amber:power";
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
};
internet {
label = "d7800:white:internet";
wan_white {
label = "d7800:white:wan";
gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
};
wan {
label = "d7800:white:wan";
wan_amber {
label = "d7800:amber:wan";
gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
};
@ -388,21 +388,16 @@
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
};
power: power {
power_white: power_white {
label = "d7800:white:power";
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};
rfkill {
label = "d7800:white:rfkill";
wifi {
label = "d7800:white:wifi";
gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
};
wifi5g {
label = "d7800:white:wifi5g";
gpios = <&qcom_pinmux 67 GPIO_ACTIVE_HIGH>;
};
};
};

View file

@ -25,10 +25,10 @@
serial0 = &uart4;
mdio-gpio0 = &mdio0;
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
led-boot = &power_white;
led-failsafe = &power_amber;
led-running = &power_white;
led-upgrade = &power_amber;
};
chosen {
@ -59,7 +59,7 @@
led_pins: led_pins {
mux {
pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
"gpio24","gpio26", "gpio53", "gpio64", "gpio67";
"gpio24","gpio26", "gpio53", "gpio64";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
@ -321,27 +321,27 @@
pinctrl-names = "default";
usb1 {
label = "r7500:amber:usb1";
label = "r7500:white:usb1";
gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
};
usb3 {
label = "r7500:amber:usb3";
usb2 {
label = "r7500:white:usb2";
gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
};
status {
label = "r7500:amber:status";
power_amber: power_amber {
label = "r7500:amber:power";
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
};
internet {
label = "r7500:white:internet";
wan_white {
label = "r7500:white:wan";
gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
};
wan {
label = "r7500:white:wan";
wan_amber {
label = "r7500:amber:wan";
gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
};
@ -355,21 +355,16 @@
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
};
power: power {
power_white: power_white {
label = "r7500:white:power";
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};
rfkill {
label = "r7500:white:rfkill";
wifi {
label = "r7500:white:wifi";
gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
};
wifi5g {
label = "r7500:white:wifi5g";
gpios = <&qcom_pinmux 67 GPIO_ACTIVE_HIGH>;
};
};
};

View file

@ -404,8 +404,8 @@
default-state = "keep";
};
rfkill {
label = "r7500v2:white:rfkill";
wifi {
label = "r7500v2:white:wifi";
gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
};
};

View file

@ -129,7 +129,6 @@
spi4: spi@1a280000 {
status = "ok";
spi-max-frequency = <50000000>;
pinctrl-0 = <&spi_pins>;
pinctrl-names = "default";
@ -401,6 +400,7 @@
power: power {
label = "vr2600v:white:power";
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};
phone {

View file

@ -58,19 +58,12 @@
};
led_pins: led_pins {
off {
pins = "gpio26", "gpio33", "gpio64";
mux {
pins = "gpio9", "gpio26", "gpio33", "gpio64";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
};
on {
pins = "gpio9";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
mdio0_pins: mdio0_pins {
@ -117,39 +110,41 @@
};
usb0_pwr_en_pins: usb0_pwr_en_pins {
pwr {
pins = "gpio14";
mux {
pins = "gpio16", "gpio17";
function = "gpio";
drive-strength = <12>;
bias-pull-down;
output-high;
};
ovc {
pins = "gpio15";
function = "gpio";
drive-strength = <12>;
bias-pull-up;
output-high;
};
};
usb1_pwr_en_pins: usb1_pwr_en_pins {
pwr {
pins = "gpio17";
function = "gpio";
drive-strength = <12>;
bias-pull-down;
output-high;
};
ovc {
pins = "gpio16";
bias-pull-up;
};
};
usb1_pwr_en_pins: usb1_pwr_en_pins {
mux {
pins = "gpio14", "gpio15";
function = "gpio";
drive-strength = <12>;
bias-pull-up;
};
pwr {
pins = "gpio14";
bias-pull-down;
output-high;
};
ovc {
pins = "gpio15";
bias-pull-up;
};
};
};
@ -173,14 +168,14 @@
spi4: spi@1a280000 {
status = "ok";
spi-max-frequency = <50000000>;
pinctrl-0 = <&spi_pins>;
pinctrl-names = "default";
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
flash: m25p80@0 {
compatible = "s25fl512s";
compatible = "jedec,spi-nor";
#address-cells = <1>;
#size-cells = <1>;
spi-max-frequency = <51200000>;
@ -371,17 +366,22 @@
power: power {
label = "nbg6817:white:power";
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};
wifi {
label = "nbg6817:amber:wifi";
wifi2g {
label = "nbg6817:amber:wifi2g";
gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
};
/* wifi2g amber from the manual is missing */
wifi5g {
label = "nbg6817:amber:wifi5g";
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
};
/* wifi5g amber from the manual is missing */
};
};

View file

@ -31,7 +31,7 @@
mdio-gpio0 = &mdio0;
led-boot = &power_white;
led-failsafe = &power_white;
led-failsafe = &power_amber;
led-running = &power_white;
led-upgrade = &power_amber;
};
@ -62,7 +62,7 @@
led_pins: led_pins {
pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
"gpio24","gpio26", "gpio53", "gpio64", "gpio67";
"gpio24","gpio26", "gpio53", "gpio64";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
@ -221,7 +221,7 @@
spi5: spi@1a280000 {
status = "ok";
spi-max-frequency = <50000000>;
pinctrl-0 = <&spi_pins>;
pinctrl-names = "default";
@ -244,14 +244,14 @@
status = "ok";
spi6: spi@16580000 {
status = "ok";
spi-max-frequency = <6000000>;
pinctrl-0 = <&spi6_pins>;
pinctrl-names = "default";
cs-gpios = <&qcom_pinmux 57 GPIO_ACTIVE_HIGH>;
spi-nor@0 {
compatible = "spi-nor";
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <6000000>;
};
@ -516,7 +516,7 @@
power_white: power_white {
label = "r7800:white:power";
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
default-state = "on";
default-state = "keep";
};
power_amber: power_amber {
@ -549,8 +549,8 @@
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
};
rfkill {
label = "r7800:white:rfkill";
wifi {
label = "r7800:white:wifi";
gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
};
@ -558,11 +558,6 @@
label = "r7800:white:wps";
gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
};
wifi {
label = "r7800:white:wifi";
gpios = <&qcom_pinmux 67 GPIO_ACTIVE_HIGH>;
};
};
};