[openwrt/openwrt] ath79: add LAN LEDs control bits for AR724x GPIO function pinmux

LEDE Commits lede-commits at lists.infradead.org
Mon Aug 17 12:29:37 EDT 2020


adrian pushed a commit to openwrt/openwrt.git, branch openwrt-19.07:
https://git.openwrt.org/fba9a8882119c4e5fd82095d7ddcfdcfaaf144b8

commit fba9a8882119c4e5fd82095d7ddcfdcfaaf144b8
Author: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
AuthorDate: Wed Oct 16 12:38:43 2019 +0200

    ath79: add LAN LEDs control bits for AR724x GPIO function pinmux
    
    Currently AR724x pinmux for register 0x18040028 controls only JTAG disable bit.
    This patch adds new DTS settings to control LAN LEDs and CLKs that allow
    full software control over these diodes - exactly the same is done by ar71xx
    target in device setup phase for many routers (WNR2000v3 for example).
    
    'switch_led_disable_pins' clears AR724X_GPIO_FUNC_ETH_SWITCH_LED[0-4]_EN bits.
    'clks_disable_pins' clears AR724X_GPIO_FUNC_CLK_OBS[1-5]_EN and
    AR724X_GPIO_FUNC_GE0_MII_CLK_EN bits. These all should be used together, along
    with 'jtag_disable_pins', to allow OS to control all GPIO-connected LEDs and
    buttons on device.
    
    Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
    (cherry picked from commit 69df7eb73d9922e5e717b004aae06f93fe692dba)
---
 target/linux/ath79/dts/ar724x.dtsi | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/target/linux/ath79/dts/ar724x.dtsi b/target/linux/ath79/dts/ar724x.dtsi
index b2844bf179..95832d998a 100644
--- a/target/linux/ath79/dts/ar724x.dtsi
+++ b/target/linux/ath79/dts/ar724x.dtsi
@@ -75,7 +75,15 @@
 				#pinctrl-cells = <2>;
 
 				jtag_disable_pins: pinmux_jtag_disable_pins {
-				pinctrl-single,bits = <0x0 0x1 0x1>;
+					pinctrl-single,bits = <0x0 0x1 0x1>;
+				};
+
+				switch_led_disable_pins: pinmux_switch_led_disable_pins {
+					pinctrl-single,bits = <0x0 0x0 0xf8>;
+				};
+
+				clks_disable_pins: pinmux_clks_disable_pins {
+					pinctrl-single,bits = <0x0 0x0 0x81f00>;
 				};
 			};
 



More information about the lede-commits mailing list