mediatek: separate dts/dtsi for Buffalo WSR series
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Sun, 27 Aug 2023 09:21:28 +0000 (18:21 +0900)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 24 Sep 2023 16:42:12 +0000 (18:42 +0200)
Separate dts/dtsi from the dts of Buffalo WSR-2533DHP2 to prepare adding
suppport for WSR-3200AX4S.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts
target/linux/mediatek/dts/mt7622-buffalo-wsr.dtsi [new file with mode: 0644]

index 8b0dc1aa98dfbba06d8ca63e5f6ca38a49210f50..a9f29591912c543c3d3c4c317d241829034a2403 100644 (file)
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 /dts-v1/;
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/leds/common.h>
 
-#include "mt7622.dtsi"
-#include "mt6380.dtsi"
+#include "mt7622-buffalo-wsr.dtsi"
 
 / {
        model = "Buffalo WSR-2533DHP2";
        compatible = "buffalo,wsr-2533dhp2", "mediatek,mt7622";
 
        aliases {
-               serial0 = &uart0;
-               led-boot = &power_green;
-               led-failsafe = &power_amber;
-               led-running = &power_green;
-               led-upgrade = &power_green;
                label-mac-device = &gmac0;
        };
 
-       chosen {
-               bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 swiotlb=512";
-       };
-
        memory {
                reg = <0 0x40000000 0 0x0F000000>;
        };
 
-       leds {
-               compatible = "gpio-leds";
-
-               led-0 {
-                       label = "amber:wireless";
-                       gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
-                       color = <LED_COLOR_ID_AMBER>;
-                       function = LED_FUNCTION_WLAN;
-               };
-
-               power_amber: led-1 {
-                       label = "amber:power";
-                       gpios = <&pio 3 GPIO_ACTIVE_LOW>;
-                       color = <LED_COLOR_ID_AMBER>;
-                       function = LED_FUNCTION_POWER;
-               };
-
-               power_green: led-2 {
-                       label = "green:power";
-                       gpios = <&pio 4 GPIO_ACTIVE_LOW>;
-                       color = <LED_COLOR_ID_GREEN>;
-                       function = LED_FUNCTION_POWER;
-               };
-
-               led-3 {
-                       label = "green:wireless";
-                       gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
-                       color = <LED_COLOR_ID_GREEN>;
-                       function = LED_FUNCTION_WLAN;
-               };
-
-               led-4 {
-                       label = "green:internet";
-                       gpios = <&pio 19 GPIO_ACTIVE_HIGH>;
-                       color = <LED_COLOR_ID_GREEN>;
-                       function = LED_FUNCTION_WAN;
-               };
-
-               led-5 {
-                       label = "green:router";
-                       gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
-                       color = <LED_COLOR_ID_GREEN>;
-                       function = LED_FUNCTION_INDICATOR;
-               };
-       };
-
-       keys {
-               compatible = "gpio-keys";
-
-               key-reset {
-                       label = "reset";
-                       gpios = <&pio 0 GPIO_ACTIVE_LOW>;
-                       linux,code = <KEY_RESTART>;
-               };
-
-               /* GPIO 1 and 16 are a tri-state switch button with
-                * ROUTER / AP / WB.
-                */
-               key-router {
-                       label = "router";
-                       gpios = <&pio 1 GPIO_ACTIVE_LOW>;
-                       linux,code = <BTN_0>;
-                       linux,input-type = <EV_SW>;
-               };
-
-               key-bridge {
-                       label = "wb";
-                       gpios = <&pio 16 GPIO_ACTIVE_LOW>;
-                       linux,code = <BTN_1>;
-                       linux,input-type = <EV_SW>;
-               };
-
-               /* GPIO 18 is a switch button with AUTO / MANUAL. */
-               key-manual {
-                       label = "manual";
-                       gpios = <&pio 18 GPIO_ACTIVE_LOW>;
-                       linux,code = <BTN_2>;
-                       linux,input-type = <EV_SW>;
-               };
-
-               key-wps {
-                       label = "wps";
-                       gpios = <&pio 102 GPIO_ACTIVE_LOW>;
-                       linux,code = <KEY_WPS_BUTTON>;
-               };
-       };
-
        rtkgsw: rtkgsw@0 {
                compatible = "mediatek,rtk-gsw";
                mediatek,ethsys = <&ethsys>;
        };
 };
 
-&cpu0 {
-       proc-supply = <&mt6380_vcpu_reg>;
-       sram-supply = <&mt6380_vm_reg>;
-};
-
-&cpu1 {
-       proc-supply = <&mt6380_vcpu_reg>;
-       sram-supply = <&mt6380_vm_reg>;
-};
-
-&pcie0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pcie0_pins>;
-       status = "okay";
-};
-
-&slot0 {
-       status = "okay";
-
-       wifi@0,0 {
-               compatible = "mediatek,mt76";
-               reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x5000>;
-               ieee80211-freq-limit = <5000000 6000000>;
-       };
-};
-
 &pio {
-       eth_pins: eth-pins {
-               mux {
-                       function = "eth";
-                       groups = "mdc_mdio", "rgmii_via_gmac2";
-               };
-       };
-
        /* Parallel nand is shared pin with eMMC */
        parallel_nand_pins: parallel-nand-pins {
                mux {
                        bias-pull-up;
                };
        };
-
-       pcie0_pins: pcie0-pins {
-               mux {
-                       function = "pcie";
-                       groups = "pcie0_pad_perst",
-                                "pcie0_1_waken",
-                                "pcie0_1_clkreq";
-               };
-       };
-
-       pmic_bus_pins: pmic-bus-pins {
-               mux {
-                       function = "pmic";
-                       groups = "pmic_bus";
-               };
-       };
-
-       uart0_pins: uart0-pins {
-               mux {
-                       function = "uart";
-                       groups = "uart0_0_tx_rx" ;
-               };
-       };
-
-       watchdog_pins: watchdog-pins {
-               mux {
-                       function = "watchdog";
-                       groups = "watchdog";
-               };
-       };
-};
-
-&bch {
-       status = "okay";
 };
 
-&eth {
-       pinctrl-names = "default";
-       pinctrl-0 = <&eth_pins>;
-       status = "okay";
-
-       gmac0: mac@0 {
-               compatible = "mediatek,eth-mac";
-               reg = <0>;
-
-               phy-connection-type = "2500base-x";
-
-               nvmem-cells = <&macaddr_factory_4 (-1)>;
-               nvmem-cell-names = "mac-address";
-
-               fixed-link {
-                       speed = <2500>;
-                       full-duplex;
-                       pause;
-               };
-       };
-
-       mdio: mdio-bus {
-               #address-cells = <1>;
-               #size-cells = <0>;
-       };
+&gmac0 {
+       nvmem-cells = <&macaddr_factory_4 (-1)>;
+       nvmem-cell-names = "mac-address";
 };
 
 &nandc {
                };
        };
 };
-
-&pwm {
-       status = "okay";
-};
-
-&pwrap {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pmic_bus_pins>;
-       status = "okay";
-};
-
-&uart0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins>;
-       status = "okay";
-};
-
-&watchdog {
-       pinctrl-names = "default";
-       pinctrl-0 = <&watchdog_pins>;
-       status = "okay";
-};
-
-&wmac {
-       status = "okay";
-
-       mediatek,mtd-eeprom = <&factory 0x0>;
-};
-
-&rtc {
-       status = "disabled";
-};
diff --git a/target/linux/mediatek/dts/mt7622-buffalo-wsr.dtsi b/target/linux/mediatek/dts/mt7622-buffalo-wsr.dtsi
new file mode 100644 (file)
index 0000000..e77f83d
--- /dev/null
@@ -0,0 +1,236 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+#include "mt7622.dtsi"
+#include "mt6380.dtsi"
+
+/ {
+       aliases {
+               serial0 = &uart0;
+               led-boot = &power_green;
+               led-failsafe = &power_amber;
+               led-running = &power_green;
+               led-upgrade = &power_green;
+       };
+
+       chosen {
+               bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 swiotlb=512";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led-0 {
+                       label = "amber:wireless";
+                       gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
+                       color = <LED_COLOR_ID_AMBER>;
+                       function = LED_FUNCTION_WLAN;
+               };
+
+               power_amber: led-1 {
+                       label = "amber:power";
+                       gpios = <&pio 3 GPIO_ACTIVE_LOW>;
+                       color = <LED_COLOR_ID_AMBER>;
+                       function = LED_FUNCTION_POWER;
+               };
+
+               power_green: led-2 {
+                       label = "green:power";
+                       gpios = <&pio 4 GPIO_ACTIVE_LOW>;
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_POWER;
+               };
+
+               led-3 {
+                       label = "green:wireless";
+                       gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_WLAN;
+               };
+
+               led-4 {
+                       label = "green:internet";
+                       gpios = <&pio 19 GPIO_ACTIVE_HIGH>;
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_WAN;
+               };
+
+               led-5 {
+                       label = "green:router";
+                       gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_INDICATOR;
+               };
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               key-reset {
+                       label = "reset";
+                       gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
+               };
+
+               /* GPIO 1 and 16 are a tri-state switch button with
+                * ROUTER / AP / WB.
+                */
+               key-router {
+                       label = "router";
+                       gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_0>;
+                       linux,input-type = <EV_SW>;
+               };
+
+               key-bridge {
+                       label = "wb";
+                       gpios = <&pio 16 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_1>;
+                       linux,input-type = <EV_SW>;
+               };
+
+               /* GPIO 18 is a switch button with AUTO / MANUAL. */
+               key-manual {
+                       label = "manual";
+                       gpios = <&pio 18 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_2>;
+                       linux,input-type = <EV_SW>;
+               };
+
+               key-wps {
+                       label = "wps";
+                       gpios = <&pio 102 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_WPS_BUTTON>;
+               };
+       };
+};
+
+&cpu0 {
+       proc-supply = <&mt6380_vcpu_reg>;
+       sram-supply = <&mt6380_vm_reg>;
+};
+
+&cpu1 {
+       proc-supply = <&mt6380_vcpu_reg>;
+       sram-supply = <&mt6380_vm_reg>;
+};
+
+&pcie0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pcie0_pins>;
+       status = "okay";
+};
+
+&slot0 {
+       status = "okay";
+
+       wifi@0,0 {
+               compatible = "mediatek,mt76";
+               reg = <0x0000 0 0 0 0>;
+               mediatek,mtd-eeprom = <&factory 0x5000>;
+               ieee80211-freq-limit = <5000000 6000000>;
+       };
+};
+
+&pio {
+       eth_pins: eth-pins {
+               mux {
+                       function = "eth";
+                       groups = "mdc_mdio", "rgmii_via_gmac2";
+               };
+       };
+
+       pcie0_pins: pcie0-pins {
+               mux {
+                       function = "pcie";
+                       groups = "pcie0_pad_perst",
+                                "pcie0_1_waken",
+                                "pcie0_1_clkreq";
+               };
+       };
+
+       pmic_bus_pins: pmic-bus-pins {
+               mux {
+                       function = "pmic";
+                       groups = "pmic_bus";
+               };
+       };
+
+       uart0_pins: uart0-pins {
+               mux {
+                       function = "uart";
+                       groups = "uart0_0_tx_rx" ;
+               };
+       };
+
+       watchdog_pins: watchdog-pins {
+               mux {
+                       function = "watchdog";
+                       groups = "watchdog";
+               };
+       };
+};
+
+&eth {
+       pinctrl-names = "default";
+       pinctrl-0 = <&eth_pins>;
+       status = "okay";
+
+       gmac0: mac@0 {
+               compatible = "mediatek,eth-mac";
+               reg = <0>;
+
+               phy-connection-type = "2500base-x";
+
+               fixed-link {
+                       speed = <2500>;
+                       full-duplex;
+                       pause;
+               };
+       };
+
+       mdio: mdio-bus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
+};
+
+&bch {
+       status = "okay";
+};
+
+&pwm {
+       status = "okay";
+};
+
+&pwrap {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pmic_bus_pins>;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
+       status = "okay";
+};
+
+&watchdog {
+       pinctrl-names = "default";
+       pinctrl-0 = <&watchdog_pins>;
+       status = "okay";
+};
+
+&wmac {
+       status = "okay";
+
+       mediatek,mtd-eeprom = <&factory 0x0>;
+};
+
+&rtc {
+       status = "disabled";
+};