From patchwork Fri Aug 2 09:53:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Birger Koblitz X-Patchwork-Id: 1141057 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=birger-koblitz.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="miWcRtA8"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 460Mts6VZXz9sND for ; Fri, 2 Aug 2019 19:53:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Date:Message-ID: From:To:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9axzHOhZs1n9YzGrxpLIsTHfooWbZxBdXnsc0S+XYCk=; b=miWcRtA8ClQbtX 061OggHm1gDrp1SHy7Mcn7lcV7YQpYaiKVRjp2yiMLVk/fQ9kQj+ovvbcTjEqq98hiTD2LVmzK4vK OXbQpOIZ0YRU4SAvOKyrx7Im47taVG4Bp3u6m3IkmTZddpNDMy1Q49OYakNalm7HtrLjY3jET7L1S PAMBRsnqTclg9kGFVBZz3kw78J+0/wMBlgnmMVYenhVolAdQ2d8sslnvZiBgqIF9v/MHFVMut+NER BsZy0M8aMLZXevS+uBtJuK1ZwrSbmqU0hwSawxKNOHH/GXzb0XoAlGVziaSjZ0yCuW3txzap3r3XM fikHVE3LFX9D4Pu4yrlg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1htUFv-0001AZ-8R; Fri, 02 Aug 2019 09:53:47 +0000 Received: from wp175.webpack.hosteurope.de ([2a01:488:42:1000:50ed:84b6::]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1htUFq-00019S-K0 for openwrt-devel@lists.openwrt.org; Fri, 02 Aug 2019 09:53:45 +0000 Received: from p4fcf952c.dip0.t-ipconnect.de ([79.207.149.44] helo=[192.168.2.103]); authenticated by wp175.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1htUFl-0008Gs-O6; Fri, 02 Aug 2019 11:53:38 +0200 To: openwrt-devel@lists.openwrt.org From: Birger Koblitz Openpgp: preference=signencrypt Autocrypt: addr=mail@birger-koblitz.de; prefer-encrypt=mutual; keydata= mQGiBELb9iURBAD7URWZY2HQ38IvWh1pUBiOJMoMi3/qImwhh2hWCgfVPP2FsKD+84zNqJgi bIgCWeiHeyQ5fcUnpnn2aPNwMznRxmwjCfb4a6AUPKjZIETGREaWathA9kVAkIlnrZI16QpY cz9gWXenVe2bPTny723pQNhLKNhmTQySjQikSMiSAwCgvLxjtDu3gckDzjmA8qs25c6nxRsE ANZI7xZqR7wcvzs5/UxNd43UsAN8NYLaOd7E5jgjfaDUu6fxUgmZmWdM+F1Xkp91a4ZHQpMC NSAF+vPWiGEGJLhpNYDME/UhqQMDx95v6VvOiH2n4MC0ReW2YkhSCCP1uXVt2/Z7d7jmNtD9 G8oRE1e/fdRmDMYsdcqN6DmkoJdGBADrr4sVPd6mywEL8kZVfwwPw1i3xMXk5GiAEHj+awo+ eFTkS6F0K7IAuixm/qizf8zsUob0TRn4VCmFoyT3fkNLxjbi94g9koVQ2cUTCwmkRZkH3fUR /jX5ybnKUKO+jyAL2loVnYcC1I3EVzt0NFNx4siG3uzgfAdBF0bNEXjwOrQxQmlyZ2VyIEtv YmxpdHogKHByaXZhdGUpIDxtYWlsQGJpcmdlci1rb2JsaXR6LmRlPohaBBMRAgAaBQJMo3rM ApsPBosJCAcDAgSVAggDBJYCAwEACgkQ0SJkb/ufpr4lRQCgukvkUqWZ6FbRa6bPdutUcW08 PacAn0rBrMyYzdUo/cvD7LTjOBH8eW6RuQENBELb9igQBAD//o2rYN5fVDYLPTWyRJj9di9e Cwp3T9s+AnY9R7s6U6MDaLfFSzCwpJZTeYkN8V/n5C2iTIQomUkhrc8v4YMlI71XHs+qoSsu lvzjlu9eRHysSWbtmeNjGPRKrJHfQCywifrSgY3xJzteY1Ks9JAnW4QKhZQvgHi920f3KL63 5wADBQP6AuAqbvBdXAoxLuJmiCojzsqF+J4ZBMFvuXd8md2EYtQV74ZqxbAcDo9ELNh+2VNd vnsn05NswHNBpaSnhTNzr0TkNkRRQAhZ8rwNbNh0iVuT4PADlyDkEWdNfBl1MUfs8OyCj1tB l2UGeJ+DNp1+X8AiNyGmdEicozb90I7UBVyISQQYEQIACQUCTKN6zAKbDAAKCRDRImRv+5+m vg64AJwISUIlauuw6sMaWhGtqGzBc96pAACeKH15f9ssxrnwYSzk1spOsw8ejpM= Message-ID: <1d85f1b0-7cdb-68d6-3535-72666de254c3@birger-koblitz.de> Date: Fri, 2 Aug 2019 11:53:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Language: en-US X-bounce-key: webpack.hosteurope.de; mail@birger-koblitz.de; 1564739622; 8fb218da; X-HE-SMSGID: 1htUFl-0008Gs-O6 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190802_025342_961203_3C1B7568 X-CRM114-Status: UNSURE ( 7.59 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record Subject: [OpenWrt-Devel] [PATCH] ath79: use gpio_hog instead of gpio-export X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org ath79: use gpio_hog instead of gpio-export The `gpio-export` functionality is a hack for missing kernel functionality, which was rejected in upstream kernel long time ago, for details see this email http://lists.infradead.org/pipermail/openwrt-devel/2019-February/015772.html, discussion in PR#1366 or https://github.com/openwrt/openwrt/pull/1814#issuecomment-462942022. This patch converts all remaining ath79 .dts files which were using export-gpio to using gpio_hog instead Signed-off-by: Birger Koblitz diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts index df22eb8dc4..822858aab7 100644 --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts @@ -121,16 +121,6 @@          };      };   -    gpio-export { -        compatible = "gpio-export"; - -        gpio_usb_power { -            gpio-export,name = "buffalo:power:usb"; -            gpio-export,output = <1>; -            gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; -        }; -    }; -      flash {          compatible = "mtd-concat";   @@ -173,6 +163,17 @@      };  };   +&gpio { +    status = "okay"; + +    usb { +        gpio-hog; +        line-name = "buffalo:power:usb"; +        gpios = <2 GPIO_ACTIVE_HIGH>; +        output-high; +    }; +}; +  &usb_phy {      status = "okay";  }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi b/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi index 04403637b6..de0deb3f3c 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi +++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi @@ -3,15 +3,16 @@  #include "ar7241_tplink.dtsi"    / { -    gpio-export { -        compatible = "gpio-export"; -        #size-cells = <0>; - -        gpio_usb_power { -            gpio-export,name = "tp-link:power:usb"; -            gpio-export,output = <1>; -            gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; -        }; +}; + +&gpio { +    status = "okay"; + +    usb { +        gpio-hog; +        line-name = "tp-link:power:usb"; +        gpios = <6 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts index 282446b1e1..829f1fe0e7 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts @@ -66,15 +66,16 @@              linux,default-trigger = "phy0tpt";          };      }; +};   -    gpio-export { -        compatible = "gpio-export"; +&gpio { +    status = "okay";   -        gpio_usb_power { -            gpio-export,name = "tp-link:power:usb"; -            gpio-export,output = <1>; -            gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; -        }; +    usb { +        gpio-hog; +        line-name = "tp-link:power:usb"; +        gpios = <6 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   @@ -155,10 +156,6 @@      mtd-mac-address-increment = <1>;  };   -&gpio { -    status = "okay"; -}; -  &uart {      status = "okay";  }; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi b/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi index 70ce41b84d..aee37729b1 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi @@ -58,17 +58,6 @@          };      };   -    gpio-export { -        compatible = "gpio-export"; -        #size-cells = <0>; - -        gpio_usb_power { -            gpio-export,name = "buffalo:usb-power"; -            gpio-export,output = <1>; -            gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; -        }; -    }; -      virtual_flash {          compatible = "mtd-concat";          devices = <&flash0 &flash1>; @@ -110,6 +99,17 @@      };  };   +&gpio { +    status = "okay"; + +    usb-power { +        gpio-hog; +        line-name = "buffalo:usb-power"; +        gpios = <16 GPIO_ACTIVE_HIGH>; +        output-high; +    }; +}; +  &spi {      status = "okay";      cs-gpios = <0>, <0>; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts index 97bfd0f842..9f04025598 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts @@ -110,17 +110,6 @@          };      };   -    gpio-export { -        compatible = "gpio-export"; -        #size-cells = <0>; - -        gpio_usb_power { -            gpio-export,name = "buffalo:usb-power"; -            gpio-export,output = <1>; -            gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; -        }; -    }; -      virtual_flash {          compatible = "mtd-concat";          devices = <&flash0 &flash1>; @@ -162,6 +151,17 @@      };  };   +&gpio { +    status = "okay"; + +    usb-power { +        gpio-hog; +        line-name = "buffalo:usb-power"; +        gpios = <13 GPIO_ACTIVE_HIGH>; +        output-high; +    }; +}; +  &spi {      status = "okay";      cs-gpios = <0>, <0>; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts index c7a251cbf1..f91f092d37 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts @@ -92,15 +92,16 @@              linux,default-trigger = "usbport";          };      }; +};   -    gpio-export { -        compatible = "gpio-export"; +&gpio { +    status = "okay";   -        gpio_usb_power { -            gpio-export,name = "tp-link:power:usb"; -            gpio-export,output = <1>; -            gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; -        }; +    usb { +        gpio-hog; +        line-name = "tp-link:power:usb"; +        gpios = <4 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   @@ -112,10 +113,6 @@      status = "okay";  };   -&gpio { -    status = "okay"; -}; -  &spi {      num-cs = <1>;   diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi index 6be197c0cf..a4659a9ec1 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi @@ -75,33 +75,37 @@              debounce-interval = <60>;          };      }; +};   -    gpio-export { -        compatible = "gpio-export"; +&gpio { +    status = "okay";   -        gpio_usb1_power { -            gpio-export,name = "tp-link:power:usb1"; -            gpio-export,output = <1>; -            gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; -        }; +    usb1 { +        gpio-hog; +        line-name = "tp-link:power:usb1"; +        gpios = <22 GPIO_ACTIVE_HIGH>; +        output-high; +    };   -        gpio_usb2_power { -            gpio-export,name = "tp-link:power:usb2"; -            gpio-export,output = <1>; -            gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; -        }; +    usb2 { +        gpio-hog; +        line-name = "tp-link:power:usb2"; +        gpios = <21 GPIO_ACTIVE_HIGH>; +        output-high; +    };   -        gpio_ext_lna0 { -            gpio-export,name = "tp-link:ext:lna0"; -            gpio-export,output = <1>; -            gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; -        }; +    lna0 { +        gpio-hog; +        line-name = "tp-link:ext:lna0"; +        gpios = <18 GPIO_ACTIVE_HIGH>; +        output-high; +    };   -        gpio_ext_lna1 { -            gpio-export,name = "tp-link:ext:lna1"; -            gpio-export,output = <1>; -            gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; -        }; +    lna1 { +        gpio-hog; +        line-name = "tp-link:ext:lna1"; +        gpios = <19 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   @@ -113,10 +117,6 @@      status = "okay";  };   -&gpio { -    status = "okay"; -}; -  &spi {      num-cs = <1>;   diff --git a/target/linux/ath79/dts/qca9531_yuncore_a770.dts b/target/linux/ath79/dts/qca9531_yuncore_a770.dts index da5b6dc7db..18ad6307a1 100644 --- a/target/linux/ath79/dts/qca9531_yuncore_a770.dts +++ b/target/linux/ath79/dts/qca9531_yuncore_a770.dts @@ -8,7 +8,7 @@    / {      model = "YunCore A770"; -    compatible = "yuncore,a770", "qca,qca9531"; +    compatible = "yuncore,a770", "qca,qca9533";        aliases {          led-boot = &status; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts index 2570eb7cea..0e4c97bd41 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts @@ -53,16 +53,16 @@          compatible = "gpio-beeper";          gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;      }; +};   +&gpio { +    status = "okay";   -    gpio_export { -        compatible = "gpio-export"; - -        gpio_usb_power { -            gpio-export,name = "devolo:power:usb"; -            gpio-export,output = <1>; -            gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; -        }; +    usb { +        gpio-hog; +        line-name = "devolo:power:usb"; +        gpios = <11 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   diff --git a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts index b6dc43fbfc..38b2d2750c 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts +++ b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts @@ -51,21 +51,23 @@              gpios = <&gpio 1 GPIO_ACTIVE_LOW>;          };      }; +};   -    gpio-export { -        compatible = "gpio-export"; -        #size-cells = <0>; +&gpio { +    status = "okay";   -        gpio_pa_dcdc { -            gpio-export,name = "om5pac:pa_dcdc"; -            gpio-export,output = <1>; -            gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; -        }; -        gpio_pa_high { -            gpio-export,name = "om5pac:pa_high"; -            gpio-export,output = <1>; -            gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; -        }; +    pa_dcdc { +        gpio-hog; +        line-name = "om5pac:pa_dcdc"; +        gpios = <2 GPIO_ACTIVE_HIGH>; +        output-high; +    }; + +    pa_high { +        gpio-hog; +        line-name = "om5pac:pa_high"; +        gpios = <16 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi b/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi index 343d318e0b..095d7d759f 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi @@ -63,22 +63,23 @@              debounce-interval = <60>;          };      }; +};   -    gpio-export { -        compatible = "gpio-export"; - -        gpio_usb1_power { -            gpio-export,name = "tp-link:power:usb1"; -            gpio-export,output = <1>; -            gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; -        }; +&gpio { +    status = "okay";   -        gpio_usb2_power { -            gpio-export,name = "tp-link:power:usb2"; -            gpio-export,output = <1>; -            gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; -        }; +    usb1 { +        gpio-hog; +        line-name = "tp-link:power:usb1"; +        gpios = <21 GPIO_ACTIVE_HIGH>; +        output-high; +    };   +    usb2 { +        gpio-hog; +        line-name = "tp-link:power:usb2"; +        gpios = <22 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   @@ -90,10 +91,6 @@      status = "okay";  };   -&gpio { -    status = "okay"; -}; -  &usb_phy0 {      status = "okay";  }; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts index 3cc2d790d4..e1b6c6036c 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts @@ -76,21 +76,23 @@              debounce-interval = <60>;          };      }; +};   -    gpio-export { -        compatible = "gpio-export"; +&gpio { +    status = "okay";   -        gpio_usb1_power { -            gpio-export,name = "tp-link:power:usb1"; -            gpio-export,output = <1>; -            gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; -        }; +    usb1 { +        gpio-hog; +        line-name = "tp-link:power:usb1"; +        gpios = <21 GPIO_ACTIVE_HIGH>; +        output-high; +    };   -        gpio_usb2_power { -            gpio-export,name = "tp-link:power:usb2"; -            gpio-export,output = <1>; -            gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; -        }; +    usb2 { +        gpio-hog; +        line-name = "tp-link:power:usb2"; +        gpios = <22 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi index 61d4aec624..6977869271 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi @@ -63,16 +63,16 @@              debounce-interval = <60>;          };      }; +};   -    gpio-export { -        compatible = "gpio-export"; -        #size-cells = <0>; +&gpio { +    status = "okay";   -        gpio_usb_power { -            gpio-export,name = "tp-link:power:usb"; -            gpio-export,output = <1>; -            gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; -        }; +    usb { +        gpio-hog; +        line-name = "tp-link:power:usb"; +        gpios = <21 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   @@ -80,10 +80,6 @@      status = "okay";  };   -&gpio { -    status = "okay"; -}; -  &usb_phy0 {      status = "okay";  }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi index 6d32fa3fc4..378c87c9ee 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi @@ -54,22 +54,23 @@              gpios = <&gpio 21 GPIO_ACTIVE_LOW>;          };      }; +};   -    gpio-export { -        compatible = "gpio-export"; - -        gpio_shift_register_oe { -            gpio-export,name = "tp-link:oe:sr"; -            gpio-export,output = <0>; -            gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; -        }; +&gpio { +    status = "okay";   -        gpio_shift_register_reset { -            gpio-export,name = "tp-link:reset:sr"; -            gpio-export,output = <1>; -            gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; -        }; +    sr { +        gpio-hog; +        line-name = "tp-link:oe:sr"; +        gpios = <16 GPIO_ACTIVE_HIGH>; +        output-low; +    };   +    sr { +        gpio-hog; +        line-name = "tp-link:reset:sr"; +        gpios = <19 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   @@ -77,10 +78,6 @@      status = "okay";  };   -&gpio { -    status = "okay"; -}; -  &pcie {      status = "okay";  }; diff --git a/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts b/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts index 8bd9067afa..43f5b900ff 100644 --- a/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts +++ b/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts @@ -62,16 +62,16 @@              debounce-interval = <60>;          };      }; +};   -    gpio-export { -        compatible = "gpio-export"; -        #size-cells = <0>; +&gpio { +    status = "okay";   -        gpio_switch_reset { -            gpio-export,name = "dir-859-a1:reset:switch"; -            gpio-export,output = <1>; -            gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; -        }; +    switch { +        gpio-hog; +        line-name = "dir-859-a1:reset:switch"; +        gpios = <11 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   @@ -79,10 +79,6 @@      status = "okay";  };   -&gpio { -    status = "okay"; -}; -  &pcie {      status = "okay";  }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts index f4add2fe31..d892d0e960 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts @@ -41,22 +41,6 @@          };      };   -    gpio-export { -        compatible = "gpio-export"; - -        gpio_shift_register_oe { -            gpio-export,name = "tp-link:oe:sr"; -            gpio-export,output = <0>; -            gpios = <&gpio 1 GPIO_ACTIVE_LOW>;    // 74HC595 /OE (Output Enable) -        }; - -        gpio_shift_register_reset { -            gpio-export,name = "tp-link:reset:sr"; -            gpio-export,output = <1>; -            gpios = <&gpio 21 GPIO_ACTIVE_LOW>;    // 74HC595 /SRCLR (Serial Clear) -        }; -    }; -      leds {          compatible = "gpio-leds";   @@ -148,15 +132,29 @@    };   -&pcie { +&gpio {      status = "okay"; + +    sr { +        gpio-hog; +        line-name = "tp-link:oe:sr"; +        gpios = <1 GPIO_ACTIVE_LOW>; +        output-low; +    }; + +    sr { +        gpio-hog; +        line-name = "tp-link:reset:sr"; +        gpios = <21 GPIO_ACTIVE_LOW>; +        output-high; +    };  };   -&uart { +&pcie {      status = "okay";  };   -&gpio { +&uart {      status = "okay";  };   diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi index 324d831249..70313d7ce8 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi @@ -92,15 +92,16 @@              debounce-interval = <60>;          };      }; +};   -    gpio-export { -        compatible = "gpio-export"; +&gpio { +    status = "okay";   -        gpio_usb_power { -            gpio-export,name = "tp-link:power:usb"; -            gpio-export,output = <1>; -            gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; -        }; +    usb { +        gpio-hog; +        line-name = "tp-link:power:usb"; +        gpios = <19 GPIO_ACTIVE_HIGH>; +        output-high;      };  };   @@ -112,10 +113,6 @@      status = "okay";  };   -&gpio { -    status = "okay"; -}; -  &usb_phy0 {      status = "okay";  }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts index 07a7409886..bd7299362c 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts @@ -6,16 +6,16 @@  / {      compatible = "tplink,tl-wr1043nd-v4", "qca,qca9563";      model = "TP-Link TL-WR1043ND v4"; +};   -    gpio-export { -        compatible = "gpio-export"; -        #size-cells = <0>; +&gpio { +    status = "okay";   -        gpio_usb_power { -            gpio-export,name = "tp-link:power:usb"; -            gpio-export,output = <1>; -            gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; -        }; +    usb { +        gpio-hog; +        line-name = "tp-link:power:usb"; +        gpios = <8 GPIO_ACTIVE_HIGH>; +        output-high;      };  };