diff --git a/target/linux/ipq806x/config-4.14 b/target/linux/ipq806x/config-4.14 index 38f5c94507..19f5f8ff7f 100644 --- a/target/linux/ipq806x/config-4.14 +++ b/target/linux/ipq806x/config-4.14 @@ -172,6 +172,8 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GPIO_SYSFS=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y diff --git a/target/linux/ipq806x/config-4.19 b/target/linux/ipq806x/config-4.19 index f4c27d7ae8..9ea74df644 100644 --- a/target/linux/ipq806x/config-4.19 +++ b/target/linux/ipq806x/config-4.19 @@ -180,6 +180,8 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GPIO_SYSFS=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=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 98ea681614..a552a52c8e 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 @@ -27,6 +27,11 @@ serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; sdcc1 = &sdcc1; + + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_sys; + led-upgrade = &led_sys; }; chosen { @@ -34,6 +39,15 @@ stdout-path = "serial0:115200n8"; }; + leds { + compatible = "gpio-leds"; + + led_sys: sys { + label = "m520:green:sys"; + gpios = <&gpio_ext 15 GPIO_ACTIVE_LOW>; + }; + }; + soc { pinmux@800000 { button_pins: button_pins { @@ -54,15 +68,6 @@ }; }; - led_pins: led_pins { - mux { - pins = "gpio7", "gpio8", "gpio9", "gpio53"; - function = "gpio"; - drive-strength = <2>; - bias-pull-down; - }; - }; - mdio0_pins: mdio0_pins { mux { pins = "gpio0", "gpio1"; @@ -142,21 +147,21 @@ status = "ok"; lm75@48 { - status = "okay"; compatible = "lm75"; reg = <0x48>; }; pcf8563: rtc@51 { - status = "okay"; compatible = "nxp,pcf8563"; reg = <0x51>; }; - tca9539@74 { - status = "okay"; + gpio_ext: tca9539@74 { compatible = "ti,tca9539"; reg = <0x74>; + + gpio-controller; + #gpio-cells = <2>; }; }; }; @@ -377,8 +382,8 @@ amba { sdcc1: sdcc@12400000 { status = "okay"; - pinctrl-0 = <&sdcc1_pins>; - pinctrl-names = "default"; + pinctrl-0 = <&sdcc1_pins>; + pinctrl-names = "default"; }; }; }; 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 d757cd8085..0ef4b60be6 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 @@ -27,6 +27,11 @@ serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; sdcc1 = &sdcc1; + + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_sys; + led-upgrade = &led_sys; }; chosen { @@ -34,6 +39,15 @@ stdout-path = "serial0:115200n8"; }; + leds { + compatible = "gpio-leds"; + + led_sys: sys { + label = "m520:green:sys"; + gpios = <&gpio_ext 15 GPIO_ACTIVE_LOW>; + }; + }; + soc { pinmux@800000 { button_pins: button_pins { @@ -54,15 +68,6 @@ }; }; - led_pins: led_pins { - mux { - pins = "gpio7", "gpio8", "gpio9", "gpio53"; - function = "gpio"; - drive-strength = <2>; - bias-pull-down; - }; - }; - mdio0_pins: mdio0_pins { mux { pins = "gpio0", "gpio1"; @@ -142,21 +147,21 @@ status = "okay"; lm75@48 { - status = "okay"; compatible = "lm75"; reg = <0x48>; }; pcf8563: rtc@51 { - status = "okay"; compatible = "nxp,pcf8563"; reg = <0x51>; }; - tca9539@74 { - status = "okay"; + gpio_ext: tca9539@74 { compatible = "ti,tca9539"; reg = <0x74>; + + gpio-controller; + #gpio-cells = <2>; }; }; }; @@ -362,8 +367,8 @@ amba { sdcc1: sdcc@12400000 { status = "okay"; - pinctrl-0 = <&sdcc1_pins>; - pinctrl-names = "default"; + pinctrl-0 = <&sdcc1_pins>; + pinctrl-names = "default"; }; }; }; @@ -384,3 +389,7 @@ &adm_dma { status = "okay"; }; + +&CPU_SPC { + status = "disabled"; +}; diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 4540a5736f..4943627c48 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -275,7 +275,7 @@ define Device/ruijie_rg-mtfi-m520 IMAGE/mmcblk0p2-kernel.bin := append-kernel | pad-to $$$${KERNEL_SIZE} IMAGE/mmcblk0p3-rootfs.bin := append-rootfs | pad-rootfs DEVICE_PACKAGES := ath10k-firmware-qca988x-ct e2fsprogs f2fs-tools \ - kmod-gpio-pca953x kmod-hwmon-lm75 kmod-fs-ext4 kmod-fs-f2fs kmod-rtc-pcf8563 losetup + kmod-hwmon-lm75 kmod-fs-ext4 kmod-fs-f2fs kmod-rtc-pcf8563 losetup endef TARGET_DEVICES += ruijie_rg-mtfi-m520