From a53dd5c553da41eb6836cd5bb557d96768013d0f Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Thu, 15 Jul 2021 23:10:25 +0800 Subject: [PATCH] ipq806x: m520: enable pic support from chilau --- target/linux/ipq806x/config-4.14 | 2 ++ target/linux/ipq806x/config-4.19 | 2 ++ .../arm/boot/dts/qcom-ipq8064-mtfi-m520.dts | 25 ++++++++++++++----- .../arm/boot/dts/qcom-ipq8064-mtfi-m520.dts | 25 ++++++++++++++----- 4 files changed, 42 insertions(+), 12 deletions(-) diff --git a/target/linux/ipq806x/config-4.14 b/target/linux/ipq806x/config-4.14 index 6f477c17e6..13b08ba7f4 100644 --- a/target/linux/ipq806x/config-4.14 +++ b/target/linux/ipq806x/config-4.14 @@ -175,6 +175,8 @@ CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_WATCHDOG=y +CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y diff --git a/target/linux/ipq806x/config-4.19 b/target/linux/ipq806x/config-4.19 index 9ea74df644..5466117ea8 100644 --- a/target/linux/ipq806x/config-4.19 +++ b/target/linux/ipq806x/config-4.19 @@ -183,6 +183,8 @@ CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_WATCHDOG=y +CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y diff --git a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts index a552a52c8e..6720e31936 100644 --- a/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts +++ b/target/linux/ipq806x/files-4.14/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts @@ -137,6 +137,15 @@ drive-strength = <12>; }; }; + + wdt0_pins: wdt0_pins { + mux { + pins = "gpio17"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + }; }; gsbi2: gsbi@12480000 { @@ -356,8 +365,6 @@ pinctrl-0 = <&rgmii2_pins>; pinctrl-names = "default"; - mtd-mac-address-ascii = <&PRODUCTINFO 0x86a>; - fixed-link { speed = <1000>; full-duplex; @@ -369,10 +376,6 @@ phy-mode = "sgmii"; qcom,id = <2>; - mtd-mac-address-ascii = <&PRODUCTINFO 0x86a>; - mtd-mac-address-increment = <1>; - mtd-mac-address-increment-byte = <0>; - fixed-link { speed = <1000>; full-duplex; @@ -386,6 +389,16 @@ pinctrl-names = "default"; }; }; + + watchdog { + compatible = "linux,wdt-gpio"; + pinctrl-0 = <&wdt0_pins>; + pinctrl-names = "default"; + gpios = <&qcom_pinmux 17 GPIO_ACTIVE_LOW>; + hw_algo = "toggle"; + hw_margin_ms = <500>; + always-running; + }; }; keys { diff --git a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts index 0ef4b60be6..6638e511a7 100644 --- a/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts +++ b/target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-mtfi-m520.dts @@ -137,6 +137,15 @@ drive-strength = <12>; }; }; + + wdt0_pins: wdt0_pins { + mux { + pins = "gpio17"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + }; }; gsbi2: gsbi@12480000 { @@ -341,8 +350,6 @@ pinctrl-0 = <&rgmii2_pins>; pinctrl-names = "default"; - mtd-mac-address-ascii = <&PRODUCTINFO 0x86a>; - fixed-link { speed = <1000>; full-duplex; @@ -354,10 +361,6 @@ phy-mode = "sgmii"; qcom,id = <2>; - mtd-mac-address-ascii = <&PRODUCTINFO 0x86a>; - mtd-mac-address-increment = <1>; - mtd-mac-address-increment-byte = <0>; - fixed-link { speed = <1000>; full-duplex; @@ -371,6 +374,16 @@ pinctrl-names = "default"; }; }; + + watchdog { + compatible = "linux,wdt-gpio"; + pinctrl-0 = <&wdt0_pins>; + pinctrl-names = "default"; + gpios = <&qcom_pinmux 17 GPIO_ACTIVE_LOW>; + hw_algo = "toggle"; + hw_margin_ms = <500>; + always-running; + }; }; keys {