mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-07 11:30:37 +00:00
realtek: Move GS1900 external GPIO to new DTSI
In order to be able to define the external GPIO controller on an emulated MDIO bus, move the controller definition outside of the main GS1900 include for RTL838x-based devices. Additionally, a new DTSI is provided defining the RTL8231 on the emulated MDIO bus. Signed-off-by: Sander Vanheule <sander@svanheule.net>
This commit is contained in:
parent
d4bf16a9e1
commit
a6a77896f4
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rtl8380_zyxel_gs1900.dtsi"
|
||||
#include "rtl8380_zyxel_gs1900_gpio.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,gs1900-10hp", "realtek,rtl838x-soc";
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rtl8380_zyxel_gs1900.dtsi"
|
||||
#include "rtl8380_zyxel_gs1900_gpio.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,gs1900-8", "realtek,rtl838x-soc";
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rtl8380_zyxel_gs1900.dtsi"
|
||||
#include "rtl8380_zyxel_gs1900_gpio.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,gs1900-8hp-v1", "realtek,rtl838x-soc";
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rtl8380_zyxel_gs1900.dtsi"
|
||||
#include "rtl8380_zyxel_gs1900_gpio.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,gs1900-8hp-v2", "realtek,rtl838x-soc";
|
||||
|
@ -42,34 +42,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&mdio_aux {
|
||||
status = "okay";
|
||||
|
||||
reset-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
|
||||
reset-delay-us = <1000>;
|
||||
reset-post-delay-us = <10000>;
|
||||
|
||||
gpio1: expander@0 {
|
||||
compatible = "realtek,rtl8231";
|
||||
reg = <0x0>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&gpio1 0 0 37>;
|
||||
|
||||
poe_enable {
|
||||
gpio-hog;
|
||||
gpios = <13 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
};
|
||||
|
||||
led-controller {
|
||||
compatible = "realtek,rtl8231-leds";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
|
31
target/linux/realtek/dts/rtl8380_zyxel_gs1900_gpio.dtsi
Normal file
31
target/linux/realtek/dts/rtl8380_zyxel_gs1900_gpio.dtsi
Normal file
@ -0,0 +1,31 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
&mdio_aux {
|
||||
status = "okay";
|
||||
|
||||
reset-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
|
||||
reset-delay-us = <1000>;
|
||||
reset-post-delay-us = <10000>;
|
||||
|
||||
gpio1: expander@0 {
|
||||
compatible = "realtek,rtl8231";
|
||||
reg = <0x0>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&gpio1 0 0 37>;
|
||||
|
||||
poe_enable {
|
||||
gpio-hog;
|
||||
gpios = <13 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
};
|
||||
|
||||
led-controller {
|
||||
compatible = "realtek,rtl8231-leds";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
@ -0,0 +1,31 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
&mdio_gpio {
|
||||
status = "okay";
|
||||
|
||||
reset-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
|
||||
reset-delay-us = <1000>;
|
||||
reset-post-delay-us = <10000>;
|
||||
|
||||
gpio1: expander@0 {
|
||||
compatible = "realtek,rtl8231";
|
||||
reg = <0x0>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&gpio1 0 0 37>;
|
||||
|
||||
poe_enable {
|
||||
gpio-hog;
|
||||
gpios = <13 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
};
|
||||
|
||||
led-controller {
|
||||
compatible = "realtek,rtl8231-leds";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rtl8380_zyxel_gs1900.dtsi"
|
||||
#include "rtl8380_zyxel_gs1900_gpio.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,gs1900-16", "realtek,rtl838x-soc";
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rtl8380_zyxel_gs1900.dtsi"
|
||||
#include "rtl8380_zyxel_gs1900_gpio.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,gs1900-24-v1", "realtek,rtl838x-soc";
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rtl8380_zyxel_gs1900.dtsi"
|
||||
#include "rtl8380_zyxel_gs1900_gpio.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,gs1900-24e", "realtek,rtl838x-soc";
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rtl8380_zyxel_gs1900.dtsi"
|
||||
#include "rtl8380_zyxel_gs1900_gpio.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,gs1900-24ep", "realtek,rtl838x-soc";
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rtl8380_zyxel_gs1900.dtsi"
|
||||
#include "rtl8380_zyxel_gs1900_gpio.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,gs1900-24hp-v1", "realtek,rtl838x-soc";
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rtl8380_zyxel_gs1900.dtsi"
|
||||
#include "rtl8380_zyxel_gs1900_gpio.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,gs1900-24hp-v2", "realtek,rtl838x-soc";
|
||||
|
Loading…
x
Reference in New Issue
Block a user