From 223124e43d8cf15b83b2ab3640062f18dbe42314 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Wed, 19 Feb 2020 21:29:47 +0800 Subject: [PATCH] ipq40xx: fix build error for cm520-79f (#30) This commit fix 94a743ea531b4c10e91c17dc17535471e95f308b Signed-off-by: AmadeusGhost --- .../ipq40xx/base-files/etc/board.d/02_network | 2 +- .../arm/boot/dts/qcom-ipq4019-cm520-79f.dts | 42 ++++++++++++------- .../arm/boot/dts/qcom-ipq4019-cm520-79f.dts | 42 ++++++++++++------- 3 files changed, 53 insertions(+), 33 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 19cd277f46..7331dfc4c3 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -55,7 +55,7 @@ ipq40xx_setup_interfaces() ;; mobipromo,cm520-79f) ucidef_add_switch "switch0" \ - "0u@eth0" "3:lan:2" "4:lan:1" + "0t@eth0" "3:lan:2" "4:lan:1" ucidef_set_interface_wan "eth1" ;; *) diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts index 8a86fcc553..cf00db76ce 100644 --- a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts +++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts @@ -1,5 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2019 LGA1150 + * Copyright (C) 2020 Mleaf + */ + #include "qcom-ipq4019.dtsi" #include #include @@ -14,6 +19,7 @@ led-failsafe = &led_sys; led-running = &led_sys; led-upgrade = &led_sys; + serial0 = &blsp1_uart1; }; chosen { @@ -30,7 +36,7 @@ pinctrl-0 = <&mdio_pins>; pinctrl-names = "default"; reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>; - reset-delay-us = <1000>; + reset-delay-us = <5000>; }; ess-psgmii@98000 { @@ -133,15 +139,15 @@ leds { compatible = "gpio-leds"; - usb { + led_usb: usb { label = "cm520-79f:blue:usb"; gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>; linux,default-trigger = "usbport"; trigger-sources = <&usb3_port1>, <&usb3_port2>, <&usb2_port1>; }; - led_sys: can { - label = "cm520-79f:blue:can"; + led_sys: sys { + label = "cm520-79f:blue:sys"; gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>; }; @@ -190,10 +196,8 @@ &blsp1_uart1 { status = "okay"; -}; - -&blsp1_uart2 { - status = "okay"; + pinctrl-0 = <&serial_0_pins>; + pinctrl-names = "default"; }; &cryptobam { @@ -220,7 +224,7 @@ #size-cells = <1>; partition@0 { - label = "bootloader"; + label = "Bootloader"; reg = <0x0 0xb00000>; }; @@ -243,6 +247,12 @@ }; &tlmm { + serial_0_pins: serial0-pinmux { + pins = "gpio16", "gpio17"; + function = "blsp_uart0"; + bias-disable; + }; + mdio_pins: mdio_pinmux { mux_1 { pins = "gpio6"; @@ -259,18 +269,18 @@ nand_pins: nand_pins { pullups { - pins = "gpio52", "gpio53", "gpio58", - "gpio59"; + pins = "gpio53", "gpio58", "gpio59"; function = "qpic"; bias-pull-up; }; + // gpio61 controls led_usb + pulldowns { - pins = "gpio54", "gpio55", "gpio56", - "gpio57", "gpio60", "gpio61", - "gpio62", "gpio63", "gpio64", - "gpio65", "gpio66", "gpio67", - "gpio68", "gpio69"; + pins = "gpio55", "gpio56", "gpio57", + "gpio60", "gpio62", "gpio63", + "gpio64", "gpio65", "gpio66", + "gpio67", "gpio68", "gpio69"; function = "qpic"; bias-pull-down; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts index 8a86fcc553..cf00db76ce 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts @@ -1,5 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2019 LGA1150 + * Copyright (C) 2020 Mleaf + */ + #include "qcom-ipq4019.dtsi" #include #include @@ -14,6 +19,7 @@ led-failsafe = &led_sys; led-running = &led_sys; led-upgrade = &led_sys; + serial0 = &blsp1_uart1; }; chosen { @@ -30,7 +36,7 @@ pinctrl-0 = <&mdio_pins>; pinctrl-names = "default"; reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>; - reset-delay-us = <1000>; + reset-delay-us = <5000>; }; ess-psgmii@98000 { @@ -133,15 +139,15 @@ leds { compatible = "gpio-leds"; - usb { + led_usb: usb { label = "cm520-79f:blue:usb"; gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>; linux,default-trigger = "usbport"; trigger-sources = <&usb3_port1>, <&usb3_port2>, <&usb2_port1>; }; - led_sys: can { - label = "cm520-79f:blue:can"; + led_sys: sys { + label = "cm520-79f:blue:sys"; gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>; }; @@ -190,10 +196,8 @@ &blsp1_uart1 { status = "okay"; -}; - -&blsp1_uart2 { - status = "okay"; + pinctrl-0 = <&serial_0_pins>; + pinctrl-names = "default"; }; &cryptobam { @@ -220,7 +224,7 @@ #size-cells = <1>; partition@0 { - label = "bootloader"; + label = "Bootloader"; reg = <0x0 0xb00000>; }; @@ -243,6 +247,12 @@ }; &tlmm { + serial_0_pins: serial0-pinmux { + pins = "gpio16", "gpio17"; + function = "blsp_uart0"; + bias-disable; + }; + mdio_pins: mdio_pinmux { mux_1 { pins = "gpio6"; @@ -259,18 +269,18 @@ nand_pins: nand_pins { pullups { - pins = "gpio52", "gpio53", "gpio58", - "gpio59"; + pins = "gpio53", "gpio58", "gpio59"; function = "qpic"; bias-pull-up; }; + // gpio61 controls led_usb + pulldowns { - pins = "gpio54", "gpio55", "gpio56", - "gpio57", "gpio60", "gpio61", - "gpio62", "gpio63", "gpio64", - "gpio65", "gpio66", "gpio67", - "gpio68", "gpio69"; + pins = "gpio55", "gpio56", "gpio57", + "gpio60", "gpio62", "gpio63", + "gpio64", "gpio65", "gpio66", + "gpio67", "gpio68", "gpio69"; function = "qpic"; bias-pull-down; };