From 19c8f11d92f386a5237a21ec257da7f961c17aca Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Fri, 3 Jul 2020 01:38:09 +0900 Subject: [PATCH 01/14] ipq806x: move common pinmux nodes to SoC DTSI As almost same pinmux nodes are repeated in each device dts, let's define them once in the ipq8064 dtsi and remove the rest. * uart0_pins : Did not touch. * i2c4_pins : This node seems to be not used at all in dts. Added the most common form in the dtsi. Did not touch rpm_pins. * spi_pins : The common mux node is already present in the dtsi. Removed the duplicate nodes from dts. * nand_pins : Moved the entire node. * mdio0_pins : Moved the common mux node. * rgmii2_pins: Moved the common mux node. "pins" property is overrided in ap161. Signed-off-by: Sungbo Eo --- .../arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 53 ---------------- .../arch/arm/boot/dts/qcom-ipq8064-ap161.dts | 62 ++----------------- .../arch/arm/boot/dts/qcom-ipq8064-c2600.dts | 28 --------- .../arch/arm/boot/dts/qcom-ipq8064-d7800.dts | 54 ---------------- .../arch/arm/boot/dts/qcom-ipq8064-db149.dts | 24 ------- .../arch/arm/boot/dts/qcom-ipq8064-ea8500.dts | 54 ---------------- .../arch/arm/boot/dts/qcom-ipq8064-r7500.dts | 54 ---------------- .../arm/boot/dts/qcom-ipq8064-r7500v2.dts | 54 ---------------- .../arm/boot/dts/qcom-ipq8064-vr2600v.dts | 28 --------- .../arm/boot/dts/qcom-ipq8064-wg2600hp.dts | 28 --------- .../arch/arm/boot/dts/qcom-ipq8064-wpq864.dts | 45 -------------- .../arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts | 45 -------------- .../arch/arm/boot/dts/qcom-ipq8064.dtsi | 56 +++++++++++++++++ .../arm/boot/dts/qcom-ipq8065-nbg6817.dts | 31 ---------- .../arch/arm/boot/dts/qcom-ipq8065-r7800.dts | 48 -------------- 15 files changed, 61 insertions(+), 603 deletions(-) diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts index d55379380d..1db75a062a 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts @@ -29,59 +29,6 @@ }; }; -&qcom_pinmux { - i2c4_pins: i2c4_pinmux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - bias-disable; - }; - - nand_pins: nand_pins { - disable { - pins = "gpio34", "gpio35", "gpio36", - "gpio37", "gpio38"; - function = "nand"; - drive-strength = <10>; - bias-disable; - }; - - pullups { - pins = "gpio39"; - function = "nand"; - drive-strength = <10>; - bias-pull-up; - }; - - hold { - pins = "gpio40", "gpio41", "gpio42", - "gpio43", "gpio44", "gpio45", - "gpio46", "gpio47"; - function = "nand"; - drive-strength = <10>; - bias-bus-hold; - }; - }; - - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - - rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", - "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - }; -}; - &adm_dma { status = "okay"; }; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts index d6e6e000ca..e8de2c3519 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts @@ -30,65 +30,13 @@ }; &qcom_pinmux { - i2c4_pins: i2c4_pinmux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - bias-disable; - }; - - spi_pins: spi_pins { - mux { - pins = "gpio18", "gpio19", "gpio21"; - function = "gsbi5"; - drive-strength = <10>; - bias-none; - }; - }; - nand_pins: nand_pins { - disable { - pins = "gpio34", "gpio35", "gpio36", - "gpio37", "gpio38"; - function = "nand"; - drive-strength = <10>; - bias-disable; - }; - - pullups { - pins = "gpio39"; - function = "nand"; - drive-strength = <10>; - bias-pull-up; - }; - - hold { - pins = "gpio40", "gpio41", "gpio42", - "gpio43", "gpio44", "gpio45", - "gpio46", "gpio47"; - function = "nand"; - drive-strength = <10>; - bias-bus-hold; - }; - }; - - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - rgmii2_pins: rgmii2_pins { mux { - pins = "gpio2", "gpio27", "gpio28", - "gpio29", "gpio30", "gpio31", - "gpio32", "gpio51", "gpio52", - "gpio59", "gpio60", "gpio61", - "gpio62" , "gpio66"; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; + pins = "gpio27", "gpio28", "gpio29", + "gpio30", "gpio31", "gpio32", + "gpio51", "gpio52", "gpio59", + "gpio60", "gpio61", "gpio62", + "gpio2", "gpio66"; }; }; }; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts index abe712ba3d..31354a2f0f 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts @@ -124,15 +124,6 @@ }; }; - i2c4_pins: i2c4_pinmux { - mux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - drive-strength = <12>; - bias-disable; - }; - }; - led_pins: led_pins { mux { pins = "gpio6", "gpio7", "gpio8", "gpio9", "gpio26", "gpio33", @@ -168,25 +159,6 @@ }; }; - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - - rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", - "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - }; - usb0_pwr_en_pin: usb0_pwr_en_pin { mux { pins = "gpio25"; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts index c272f34b2c..723c75b503 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts @@ -123,15 +123,6 @@ }; }; - i2c4_pins: i2c4_pinmux { - mux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - drive-strength = <12>; - bias-disable; - }; - }; - led_pins: led_pins { mux { pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23", @@ -142,51 +133,6 @@ }; }; - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - - nand_pins: nand_pins { - disable { - pins = "gpio34", "gpio35", "gpio36", - "gpio37", "gpio38"; - function = "nand"; - drive-strength = <10>; - bias-disable; - }; - - pullups { - pins = "gpio39"; - function = "nand"; - drive-strength = <10>; - bias-pull-up; - }; - - hold { - pins = "gpio40", "gpio41", "gpio42", - "gpio43", "gpio44", "gpio45", - "gpio46", "gpio47"; - function = "nand"; - drive-strength = <10>; - bias-bus-hold; - }; - }; - - rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", - "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - }; - usb0_pwr_en_pins: usb0_pwr_en_pins { mux { pins = "gpio15"; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-db149.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-db149.dts index d003a8a5d3..2e50cca56a 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-db149.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-db149.dts @@ -25,30 +25,6 @@ }; &qcom_pinmux { - i2c4_pins: i2c4_pinmux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - bias-disable; - }; - - spi_pins: spi_pins { - mux { - pins = "gpio18", "gpio19", "gpio21"; - function = "gsbi5"; - drive-strength = <10>; - bias-none; - }; - }; - - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - rgmii0_pins: rgmii0_pins { mux { pins = "gpio2", "gpio66"; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts index 92dbd9b626..0242b5e767 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts @@ -94,15 +94,6 @@ }; }; - i2c4_pins: i2c4_pinmux { - mux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - drive-strength = <12>; - bias-disable; - }; - }; - led_pins: led_pins { mux { pins = "gpio6", "gpio53", "gpio54"; @@ -111,51 +102,6 @@ bias-pull-up; }; }; - - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - - nand_pins: nand_pins { - disable { - pins = "gpio34", "gpio35", "gpio36", - "gpio37", "gpio38"; - function = "nand"; - drive-strength = <10>; - bias-disable; - }; - - pullups { - pins = "gpio39"; - function = "nand"; - drive-strength = <10>; - bias-pull-up; - }; - - hold { - pins = "gpio40", "gpio41", "gpio42", - "gpio43", "gpio44", "gpio45", - "gpio46", "gpio47"; - function = "nand"; - drive-strength = <10>; - bias-bus-hold; - }; - }; - - rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", - "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - }; }; &gsbi4 { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts index 02fbc37b23..45cd6e0477 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts @@ -124,15 +124,6 @@ }; }; - i2c4_pins: i2c4_pinmux { - mux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - drive-strength = <12>; - bias-disable; - }; - }; - led_pins: led_pins { mux { pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23", @@ -142,51 +133,6 @@ bias-pull-up; }; }; - - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - - nand_pins: nand_pins { - disable { - pins = "gpio34", "gpio35", "gpio36", - "gpio37", "gpio38"; - function = "nand"; - drive-strength = <10>; - bias-disable; - }; - - pullups { - pins = "gpio39"; - function = "nand"; - drive-strength = <10>; - bias-pull-up; - }; - - hold { - pins = "gpio40", "gpio41", "gpio42", - "gpio43", "gpio44", "gpio45", - "gpio46", "gpio47"; - function = "nand"; - drive-strength = <10>; - bias-bus-hold; - }; - }; - - rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", - "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - }; }; &gsbi4 { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts index 1fdf99e603..dfd71bb4e7 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts @@ -132,15 +132,6 @@ }; }; - i2c4_pins: i2c4_pinmux { - mux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - drive-strength = <12>; - bias-disable; - }; - }; - led_pins: led_pins { mux { pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23", @@ -151,51 +142,6 @@ }; }; - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - - nand_pins: nand_pins { - disable { - pins = "gpio34", "gpio35", "gpio36", - "gpio37", "gpio38"; - function = "nand"; - drive-strength = <10>; - bias-disable; - }; - - pullups { - pins = "gpio39"; - function = "nand"; - drive-strength = <10>; - bias-pull-up; - }; - - hold { - pins = "gpio40", "gpio41", "gpio42", - "gpio43", "gpio44", "gpio45", - "gpio46", "gpio47"; - function = "nand"; - drive-strength = <10>; - bias-bus-hold; - }; - }; - - rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", - "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - }; - usb0_pwr_en_pins: usb0_pwr_en_pins { mux { pins = "gpio15"; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts index 5e73b533d4..48d3041480 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts @@ -135,15 +135,6 @@ }; }; - i2c4_pins: i2c4_pinmux { - mux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - drive-strength = <12>; - bias-disable; - }; - }; - button_pins: button_pins { mux { pins = "gpio54", "gpio64", "gpio65", "gpio67", "gpio68"; @@ -176,25 +167,6 @@ drive-strength = <12>; }; }; - - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - - rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", - "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - }; }; &gsbi4 { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts index a9325b4462..07909831ed 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts @@ -347,15 +347,6 @@ }; }; - i2c4_pins: i2c4_pinmux { - mux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - drive-strength = <12>; - bias-disable; - }; - }; - led_pins: led_pins { mux { pins = "gpio6", "gpio7", "gpio8", "gpio9", "gpio14", @@ -391,25 +382,6 @@ }; }; - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - - rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", - "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - }; - usb_pwr_en_pins: usb_pwr_en_pins { mux { pins = "gpio22"; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts index 8be54804ea..29928312e5 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts @@ -494,51 +494,6 @@ bias-pull-up; }; }; - - nand_pins: nand_pins { - disable { - pins = "gpio34", "gpio35", "gpio36", "gpio37", - "gpio38"; - function = "nand"; - drive-strength = <10>; - bias-disable; - }; - - pullups { - pins = "gpio39"; - function = "nand"; - drive-strength = <10>; - bias-pull-up; - }; - - hold { - pins = "gpio40", "gpio41", "gpio42", "gpio43", - "gpio44", "gpio45", "gpio46", "gpio47"; - function = "nand"; - drive-strength = <10>; - bias-bus-hold; - }; - }; - - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - - rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", - "gpio31", "gpio32", "gpio51", "gpio52", - "gpio59", "gpio60", "gpio61", "gpio62"; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - }; }; &usb3_0 { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts index a93a796583..6571aa4b92 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts @@ -458,51 +458,6 @@ }; }; - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - }; - - nand_pins: nand_pins { - disable { - pins = "gpio34", "gpio35", "gpio36", - "gpio37", "gpio38"; - function = "nand"; - drive-strength = <10>; - bias-disable; - }; - - pullups { - pins = "gpio39"; - function = "nand"; - drive-strength = <10>; - bias-pull-up; - }; - - hold { - pins = "gpio40", "gpio41", "gpio42", - "gpio43", "gpio44", "gpio45", - "gpio46", "gpio47"; - function = "nand"; - drive-strength = <10>; - bias-bus-hold; - }; - }; - - rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", - "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - }; - usb_pwr_en_pins: usb_pwr_en_pins { mux{ pins = "gpio68"; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064.dtsi b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064.dtsi index f986169a6f..7a84970a14 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -704,6 +704,15 @@ }; }; + i2c4_pins: i2c4_pinmux { + mux { + pins = "gpio12", "gpio13"; + function = "gsbi4"; + drive-strength = <12>; + bias-disable; + }; + }; + spi_pins: spi_pins { mux { pins = "gpio18", "gpio19", "gpio21"; @@ -713,6 +722,53 @@ }; }; + nand_pins: nand_pins { + disable { + pins = "gpio34", "gpio35", "gpio36", + "gpio37", "gpio38"; + function = "nand"; + drive-strength = <10>; + bias-disable; + }; + + pullups { + pins = "gpio39"; + function = "nand"; + drive-strength = <10>; + bias-pull-up; + }; + + hold { + pins = "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; + function = "nand"; + drive-strength = <10>; + bias-bus-hold; + }; + }; + + mdio0_pins: mdio0_pins { + mux { + pins = "gpio0", "gpio1"; + function = "mdio"; + drive-strength = <8>; + bias-disable; + }; + }; + + rgmii2_pins: rgmii2_pins { + mux { + pins = "gpio27", "gpio28", "gpio29", + "gpio30", "gpio31", "gpio32", + "gpio51", "gpio52", "gpio59", + "gpio60", "gpio61", "gpio62"; + function = "rgmii2"; + drive-strength = <8>; + bias-disable; + }; + }; + leds_pins: leds_pins { mux { pins = "gpio7", "gpio8", "gpio9", diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts index a2ee3f8bf7..6c21ae5e24 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts @@ -105,15 +105,6 @@ }; }; - i2c4_pins: i2c4_pinmux { - mux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - drive-strength = <12>; - bias-disable; - }; - }; - led_pins: led_pins { mux { pins = "gpio9", "gpio26", "gpio33", "gpio64"; @@ -124,13 +115,6 @@ }; mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - clk { pins = "gpio1"; input-disable; @@ -138,14 +122,6 @@ }; rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", - "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - tx { pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ; input-disable; @@ -153,13 +129,6 @@ }; spi_pins: spi_pins { - mux { - pins = "gpio18", "gpio19", "gpio21"; - function = "gsbi5"; - drive-strength = <10>; - bias-none; - }; - cs { pins = "gpio20"; drive-strength = <12>; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts index 76834be21f..611015f191 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts @@ -134,15 +134,6 @@ }; }; - i2c4_pins: i2c4_pinmux { - mux { - pins = "gpio12", "gpio13"; - function = "gsbi4"; - drive-strength = <12>; - bias-disable; - }; - }; - led_pins: led_pins { mux { pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23", @@ -153,38 +144,7 @@ }; }; - nand_pins: nand_pins { - disable { - pins = "gpio34", "gpio35", "gpio36", - "gpio37", "gpio38"; - function = "nand"; - drive-strength = <10>; - bias-disable; - }; - pullups { - pins = "gpio39"; - function = "nand"; - drive-strength = <10>; - bias-pull-up; - }; - hold { - pins = "gpio40", "gpio41", "gpio42", - "gpio43", "gpio44", "gpio45", - "gpio46", "gpio47"; - function = "nand"; - drive-strength = <10>; - bias-bus-hold; - }; - }; - mdio0_pins: mdio0_pins { - mux { - pins = "gpio0", "gpio1"; - function = "mdio"; - drive-strength = <8>; - bias-disable; - }; - clk { pins = "gpio1"; input-disable; @@ -192,14 +152,6 @@ }; rgmii2_pins: rgmii2_pins { - mux { - pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", - "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; - function = "rgmii2"; - drive-strength = <8>; - bias-disable; - }; - tx { pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ; input-disable; From ed761344d2fb013f9a44fefc6a37e2d073144cf4 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 3 Jul 2020 15:00:58 +0200 Subject: [PATCH 02/14] ipq806x: disentangle and clean up SoC DTSI files So far, the DTSI files on ipq806x had a linear inheritance: qcom-ipq8064.dtsi v qcom-ipq8064-v1.0.dtsi v qcom-ipq8064-v2.0.dtsi v qcom-ipq8065.dtsi This poses problems when one wants to set something that is specific to an architecture closer to the top of the tree. In this patch, we remove the chain-like inheritance and have all other files derived from qcom-ipq8064.dtsi (changing this name to something more generic is not possible due to upstream use). The removal of inheritance will require a few entries to be copied from qcom-ipq8064-v2.0.dtsi to qcom-ipq8065.dtsi. However, it also opens an opportunity for some clean-up: - Many definitions can be improved by just using the innermost labels. - Instead of disabling the CPU_SPC node for ipq8065, it is now off by default and enabled where needed. - Instead of patching phy-tx0-term-offset into qcom-ipq8064.dtsi and then having it changed for qcom-ipq8064-v2.0/qcom-ipq8065, just have the appropriate settings done in the lower DTSI files directly. - For the opp_table0 adjustments for ipq8065, just redefine what's changed, but don't add all the untouched properties again. Signed-off-by: Adrian Schmutzler --- .../arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi | 16 ++++ .../arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi | 25 +++--- .../arch/arm/boot/dts/qcom-ipq8064.dtsi | 8 +- .../arch/arm/boot/dts/qcom-ipq8065.dtsi | 79 ++++++++----------- 4 files changed, 64 insertions(+), 64 deletions(-) diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi index 7093b075e4..cd8f4635cb 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi @@ -1 +1,17 @@ #include "qcom-ipq8064.dtsi" + +&CPU_SPC { + status = "okay"; +}; + +&pcie0 { + phy-tx0-term-offset = <7>; +}; + +&pcie1 { + phy-tx0-term-offset = <7>; +}; + +&pcie2 { + phy-tx0-term-offset = <7>; +}; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi index dd272c7fc7..467c43590b 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi @@ -1,20 +1,19 @@ -#include "qcom-ipq8064-v1.0.dtsi" +#include "qcom-ipq8064.dtsi" -/ { - soc: soc { +&CPU_SPC { + status = "okay"; +}; - pcie0: pci@1b500000 { - phy-tx0-term-offset = <0>; - }; +&pcie0 { + phy-tx0-term-offset = <0>; +}; - pcie1: pci@1b700000 { - phy-tx0-term-offset = <0>; - }; +&pcie1 { + phy-tx0-term-offset = <0>; +}; - pcie2: pci@1b900000 { - phy-tx0-term-offset = <0>; - }; - }; +&pcie2 { + phy-tx0-term-offset = <0>; }; &ss_phy_0 { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064.dtsi b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064.dtsi index 7a84970a14..1c08b44535 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064.dtsi @@ -79,7 +79,7 @@ CPU_SPC: spc { compatible = "qcom,idle-state-spc", "arm,idle-state"; - status = "okay"; + status = "disabled"; entry-latency-us = <400>; exit-latency-us = <900>; min-residency-us = <3000>; @@ -1219,8 +1219,6 @@ perst-gpios = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>; - phy-tx0-term-offset = <7>; - status = "disabled"; }; @@ -1273,8 +1271,6 @@ perst-gpios = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>; - phy-tx0-term-offset = <7>; - status = "disabled"; }; @@ -1327,8 +1323,6 @@ perst-gpios = <&qcom_pinmux 63 GPIO_ACTIVE_LOW>; - phy-tx0-term-offset = <7>; - status = "disabled"; }; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi index fdd4697887..a95f4a12e0 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi @@ -1,45 +1,51 @@ -#include "qcom-ipq8064-v2.0.dtsi" +#include "qcom-ipq8064.dtsi" / { model = "Qualcomm IPQ8065"; compatible = "qcom,ipq8065", "qcom,ipq8064"; - soc: soc { - - rpm@108000 { - - regulators { - - smb208_s2a: s2a { - regulator-min-microvolt = <775000>; - regulator-max-microvolt = <1275000>; - }; - - smb208_s2b: s2b { - regulator-min-microvolt = <775000>; - regulator-max-microvolt = <1275000>; - }; - }; - }; - }; - cpus { qcom,l2 { qcom,l2-cpufreq = <384000000 600000000 1400000000>; }; - - idle-states { - CPU_SPC: spc { - status = "disabled"; - }; - }; }; }; -&opp_table0 { - compatible = "operating-points-v2-qcom-cpu"; - nvmem-cells = <&speedbin_efuse>; +&pcie0 { + phy-tx0-term-offset = <0>; +}; +&pcie1 { + phy-tx0-term-offset = <0>; +}; + +&pcie2 { + phy-tx0-term-offset = <0>; +}; + +&smb208_s2a { + regulator-min-microvolt = <775000>; + regulator-max-microvolt = <1275000>; +}; + +&smb208_s2b { + regulator-min-microvolt = <775000>; + regulator-max-microvolt = <1275000>; +}; + +&ss_phy_0 { + rx_eq = <2>; + tx_deamp_3_5db = <32>; + mpll = <0xa0>; +}; + +&ss_phy_1 { + rx_eq = <2>; + tx_deamp_3_5db = <32>; + mpll = <0xa0>; +}; + +&opp_table0 { /* * On ipq8065 1.2 ghz freq is not present * Remove it to make cpufreq work and not @@ -49,7 +55,6 @@ /delete-node/opp-1200000000; opp-384000000 { - opp-hz = /bits/ 64 <384000000>; opp-microvolt-speed0-pvs0-v0 = <975000>; opp-microvolt-speed0-pvs1-v0 = <950000>; opp-microvolt-speed0-pvs2-v0 = <925000>; @@ -57,12 +62,9 @@ opp-microvolt-speed0-pvs4-v0 = <875000>; opp-microvolt-speed0-pvs5-v0 = <825000>; opp-microvolt-speed0-pvs6-v0 = <775000>; - opp-supported-hw = <0x1>; - clock-latency-ns = <100000>; }; opp-600000000 { - opp-hz = /bits/ 64 <600000000>; opp-microvolt-speed0-pvs0-v0 = <1000000>; opp-microvolt-speed0-pvs1-v0 = <975000>; opp-microvolt-speed0-pvs2-v0 = <950000>; @@ -70,12 +72,9 @@ opp-microvolt-speed0-pvs4-v0 = <900000>; opp-microvolt-speed0-pvs5-v0 = <850000>; opp-microvolt-speed0-pvs6-v0 = <800000>; - opp-supported-hw = <0x1>; - clock-latency-ns = <100000>; }; opp-800000000 { - opp-hz = /bits/ 64 <800000000>; opp-microvolt-speed0-pvs0-v0 = <1050000>; opp-microvolt-speed0-pvs1-v0 = <1025000>; opp-microvolt-speed0-pvs2-v0 = <1000000>; @@ -83,12 +82,9 @@ opp-microvolt-speed0-pvs4-v0 = <950000>; opp-microvolt-speed0-pvs5-v0 = <900000>; opp-microvolt-speed0-pvs6-v0 = <850000>; - opp-supported-hw = <0x1>; - clock-latency-ns = <100000>; }; opp-1000000000 { - opp-hz = /bits/ 64 <1000000000>; opp-microvolt-speed0-pvs0-v0 = <1100000>; opp-microvolt-speed0-pvs1-v0 = <1075000>; opp-microvolt-speed0-pvs2-v0 = <1050000>; @@ -96,12 +92,9 @@ opp-microvolt-speed0-pvs4-v0 = <1000000>; opp-microvolt-speed0-pvs5-v0 = <950000>; opp-microvolt-speed0-pvs6-v0 = <900000>; - opp-supported-hw = <0x1>; - clock-latency-ns = <100000>; }; opp-1400000000 { - opp-hz = /bits/ 64 <1400000000>; opp-microvolt-speed0-pvs0-v0 = <1175000>; opp-microvolt-speed0-pvs1-v0 = <1150000>; opp-microvolt-speed0-pvs2-v0 = <1125000>; @@ -109,8 +102,6 @@ opp-microvolt-speed0-pvs4-v0 = <1075000>; opp-microvolt-speed0-pvs5-v0 = <1025000>; opp-microvolt-speed0-pvs6-v0 = <975000>; - opp-supported-hw = <0x1>; - clock-latency-ns = <100000>; }; opp-1725000000 { From 74e339f118e600f2169965989ec3618a39e69759 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 3 Jul 2020 15:35:03 +0200 Subject: [PATCH 03/14] ipq806x: move stdout-path to DTSI files All device DTS files in the target set the stdout-path to the same value. So, let's move the definitions to the DTSI files. That's also where the kernel defines it (qcom-ipq8064-v1.0.dtsi). Signed-off-by: Adrian Schmutzler --- .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 4 ---- .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts | 4 ---- .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts | 4 ---- .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-db149.dts | 4 ---- .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi | 6 ++++++ .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi | 6 ++++++ .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts | 4 ---- .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts | 4 ---- .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts | 4 ---- .../arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts | 4 ---- .../ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi | 4 ++++ 17 files changed, 16 insertions(+), 38 deletions(-) diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts index 1db75a062a..005087dc8a 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts @@ -23,10 +23,6 @@ serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; }; - - chosen { - stdout-path = "serial0:115200n8"; - }; }; &adm_dma { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts index e8de2c3519..1a259e1e9b 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts @@ -23,10 +23,6 @@ serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; }; - - chosen { - stdout-path = "serial0:115200n8"; - }; }; &qcom_pinmux { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts index 31354a2f0f..2b4c6c961c 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts @@ -32,10 +32,6 @@ label-mac-device = &gmac2; }; - chosen { - stdout-path = "serial0:115200n8"; - }; - keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts index 723c75b503..e1d35d7c65 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts @@ -33,7 +33,6 @@ chosen { bootargs = "rootfstype=squashfs noinitrd"; - stdout-path = "serial0:115200n8"; }; keys { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-db149.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-db149.dts index 2e50cca56a..e29084d8a9 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-db149.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-db149.dts @@ -18,10 +18,6 @@ serial0 = &uart2; mdio-gpio0 = &mdio0; }; - - chosen { - stdout-path = "serial0:115200n8"; - }; }; &qcom_pinmux { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts index 0242b5e767..2bc356c7ac 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts @@ -33,7 +33,6 @@ chosen { bootargs = "console=ttyMSM0,115200n8"; - stdout-path = "serial0:115200n8"; append-rootblock = "ubi.mtd="; /* append to bootargs adding the root deviceblock nbr from bootloader */ }; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts index 45cd6e0477..e8833247db 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts @@ -34,7 +34,6 @@ chosen { bootargs = "rootfstype=squashfs noinitrd"; - stdout-path = "serial0:115200n8"; }; keys { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts index dfd71bb4e7..3381bc9477 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts @@ -38,7 +38,6 @@ chosen { bootargs = "rootfstype=squashfs noinitrd"; - stdout-path = "serial0:115200n8"; }; keys { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi index cd8f4635cb..07b8143f1a 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi @@ -1,5 +1,11 @@ #include "qcom-ipq8064.dtsi" +/ { + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + &CPU_SPC { status = "okay"; }; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi index 467c43590b..f36ca33818 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi @@ -1,5 +1,11 @@ #include "qcom-ipq8064.dtsi" +/ { + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + &CPU_SPC { status = "okay"; }; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts index 48d3041480..2c3aa2b8b8 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts @@ -31,10 +31,6 @@ led-upgrade = &general; }; - chosen { - stdout-path = "serial0:115200n8"; - }; - keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts index 07909831ed..383fe762ca 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts @@ -31,10 +31,6 @@ led-upgrade = &power_green; }; - chosen { - stdout-path = "serial0:115200n8"; - }; - keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts index 29928312e5..07201adf6d 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts @@ -52,10 +52,6 @@ led-upgrade = &led_pass; }; - chosen { - stdout-path = "serial0:115200n8"; - }; - leds { compatible = "gpio-leds"; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts index 6571aa4b92..297a8c5306 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts @@ -34,7 +34,6 @@ chosen { /* use "ubi_rootfs" volume in "ubi" partition as rootfs */ bootargs = "ubi.block=0,1 root=/dev/ubiblock0_1 rootfstype=squashfs"; - stdout-path = "serial0:115200n8"; }; leds { diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts index 6c21ae5e24..a1966578ee 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts @@ -34,7 +34,6 @@ chosen { bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd"; - stdout-path = "serial0:115200n8"; append-rootblock = "root=/dev/mmcblk0p"; }; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts index 611015f191..7e30db26d8 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts @@ -37,10 +37,6 @@ label-mac-device = &gmac2; }; - chosen { - stdout-path = "serial0:115200n8"; - }; - keys { compatible = "gpio-keys"; pinctrl-0 = <&button_pins>; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi index a95f4a12e0..7610ce8889 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi @@ -4,6 +4,10 @@ model = "Qualcomm IPQ8065"; compatible = "qcom,ipq8065", "qcom,ipq8064"; + chosen { + stdout-path = "serial0:115200n8"; + }; + cpus { qcom,l2 { qcom,l2-cpufreq = <384000000 600000000 1400000000>; From 883250014daad1f1cc802ca1c23bb8f0eded9489 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 3 Jul 2020 15:46:31 +0200 Subject: [PATCH 04/14] ipq806x: move serial0 to DTSI files All device DTS files in the target set the serial0 property to the same value (*). So, let's move the definitions to the DTSI files. That's also where the kernel defines it (qcom-ipq8064-v1.0.dtsi). * The only exception is ipq8064-db149, which defines "serial0 = &uart2;", but inside a block called "alias" instead of "aliases". It must be assumed that this is broken anyway, so we don't touch it here. Signed-off-by: Adrian Schmutzler --- .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi | 4 ++++ .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi | 4 ++++ .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts | 2 -- .../files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts | 1 - .../files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts | 1 - .../ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi | 4 ++++ 16 files changed, 12 insertions(+), 14 deletions(-) diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts index 005087dc8a..6c3410bf35 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap148.dts @@ -20,7 +20,6 @@ }; aliases { - serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; }; }; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts index 1a259e1e9b..41a2bf116e 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ap161.dts @@ -20,7 +20,6 @@ }; aliases { - serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; }; }; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts index 2b4c6c961c..c6d7da3917 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-c2600.dts @@ -22,7 +22,6 @@ }; aliases { - serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; led-boot = &power; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts index e1d35d7c65..5bd195955a 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-d7800.dts @@ -22,7 +22,6 @@ }; aliases { - serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; led-boot = &power_white; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts index 2bc356c7ac..0e4563a961 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts @@ -22,7 +22,6 @@ }; aliases { - serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; led-boot = &power; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts index e8833247db..49b34a32c6 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts @@ -23,7 +23,6 @@ }; aliases { - serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; led-boot = &power_white; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts index 3381bc9477..015de3d2b1 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts @@ -27,7 +27,6 @@ }; aliases { - serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; led-boot = &power; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi index 07b8143f1a..40cae75746 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi @@ -1,6 +1,10 @@ #include "qcom-ipq8064.dtsi" / { + aliases { + serial0 = &gsbi4_serial; + }; + chosen { stdout-path = "serial0:115200n8"; }; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi index f36ca33818..3a2bb6aebc 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-v2.0.dtsi @@ -1,6 +1,10 @@ #include "qcom-ipq8064.dtsi" / { + aliases { + serial0 = &gsbi4_serial; + }; + chosen { stdout-path = "serial0:115200n8"; }; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts index 2c3aa2b8b8..5de089eab4 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts @@ -22,7 +22,6 @@ }; aliases { - serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; led-boot = &power; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts index 383fe762ca..f8a0d07016 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts @@ -22,7 +22,6 @@ }; aliases { - serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; led-boot = &power_green; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts index 07201adf6d..6dc1f92751 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts @@ -42,7 +42,6 @@ aliases { mdio-gpio0 = &mdio0; - serial0 = &gsbi4_serial; ethernet0 = &gmac1; ethernet1 = &gmac0; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts index 297a8c5306..557ea61452 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts @@ -23,8 +23,6 @@ }; aliases { - serial0 = &gsbi4_serial; - led-boot = &power; led-failsafe = &diag; led-running = &power; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts index a1966578ee..02cb4dc7e8 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts @@ -22,7 +22,6 @@ }; aliases { - serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; sdcc1 = &sdcc1; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts index 7e30db26d8..f7cc8643f1 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065-r7800.dts @@ -27,7 +27,6 @@ }; aliases { - serial0 = &gsbi4_serial; mdio-gpio0 = &mdio0; led-boot = &power_white; diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi index 7610ce8889..a478c3c764 100644 --- a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8065.dtsi @@ -4,6 +4,10 @@ model = "Qualcomm IPQ8065"; compatible = "qcom,ipq8065", "qcom,ipq8064"; + aliases { + serial0 = &gsbi4_serial; + }; + chosen { stdout-path = "serial0:115200n8"; }; From 2d378703f13f51da89edc4b24c0bb51f415dc88f Mon Sep 17 00:00:00 2001 From: Sunguk Lee Date: Thu, 2 Jul 2020 18:32:43 +0900 Subject: [PATCH 05/14] ramips: reduce spi-max-frequency for ipTIME A8004T Reduce spi-max-frequency for ipTIME A8004T and disable m25p,fast-read option. A8004T uses `en25qh128` for the MTD. This flash memory would allow 80MHz, sometimes kernel received wrong id value in initramfs installed router. (kernel expected `1c 70 18 1c 70 18`, but one of cases, it was `9c 70 18 1c 70 18`) In this case, openwrt can't detect the partition information, it would write the inccorect data to the firmware partition and also it would occur the bootlooping after sysupgrade. Signed-off-by: Sunguk Lee [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler --- target/linux/ramips/dts/mt7621_iptime_a8004t.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts index b948236c15..e96a5d660e 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts @@ -65,8 +65,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; - m25p,fast-read; + spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; From dfe0bc860f67a53a9c9de6d7810c0bffa3bbdd6c Mon Sep 17 00:00:00 2001 From: Jan Hoffmann Date: Fri, 3 Jul 2020 13:53:47 +0200 Subject: [PATCH 06/14] mac80211: allow ACS restriction with fixed channel This can be useful when a DFS channel is configured, as the ACS channel list is taken into account when switching channels after a radar event. For example, this allows to prevent the SRD channels from being used in that case. Signed-off-by: Jan Hoffmann [reorder structure] Signed-off-by: David Bauer --- package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index de003e3d23..a131992f26 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -101,7 +101,6 @@ mac80211_hostapd_setup_base() { json_select config [ "$auto_channel" -gt 0 ] && channel=acs_survey - [ "$auto_channel" -gt 0 ] && json_get_values channel_list channels [ "$auto_channel" -gt 0 ] && json_get_vars acs_exclude_dfs [ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] && @@ -109,6 +108,7 @@ mac80211_hostapd_setup_base() { json_get_vars noscan ht_coex json_get_values ht_capab_list ht_capab tx_burst + json_get_values channel_list channels set_default noscan 0 From 702366a30b8443964a3ad80287a09ddc4cc6f8e9 Mon Sep 17 00:00:00 2001 From: Lars Wessels Date: Sat, 4 Jul 2020 13:59:17 +0200 Subject: [PATCH 07/14] lantiq: wifi mac fix for ARV752DPW Set wifi mac from flash partition 'board_config' to match the label on the device (Easybox 802). Currently the wifi mac is always set to 00:0c:43:28:60:00. eth0 and WiFi will now share the same mac (as in original firmware). Signed-off-by: Lars Wessels [improve commit message] Signed-off-by: David Bauer --- .../arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts | 5 ++++- .../arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts index 069b1b1ed6..7c51f31bad 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts @@ -21,6 +21,8 @@ led-dsl = &internet_red; led-usb = &umts; led-wifi = &wifi; + + label-mac-device = &wifi0; }; memory@0 { @@ -217,9 +219,10 @@ interrupt-map = <0x7000 0 0 1 &icu0 135>; req-mask = <0x3>; - wifi@1814,0601 { + wifi0: wifi@1814,0601 { compatible = "pci1814,0601"; reg = <0x7000 0 0 0 0>; + mtd-mac-address = <&boardconfig 0x16>; ralink,mtd-eeprom = <&boardconfig 0x410>; ralink,mtd-eeprom-swap; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts index 069b1b1ed6..7c51f31bad 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts @@ -21,6 +21,8 @@ led-dsl = &internet_red; led-usb = &umts; led-wifi = &wifi; + + label-mac-device = &wifi0; }; memory@0 { @@ -217,9 +219,10 @@ interrupt-map = <0x7000 0 0 1 &icu0 135>; req-mask = <0x3>; - wifi@1814,0601 { + wifi0: wifi@1814,0601 { compatible = "pci1814,0601"; reg = <0x7000 0 0 0 0>; + mtd-mac-address = <&boardconfig 0x16>; ralink,mtd-eeprom = <&boardconfig 0x410>; ralink,mtd-eeprom-swap; }; From f855eb91b3a075ba6849ba0c0139e30ed78820b5 Mon Sep 17 00:00:00 2001 From: Lars Wessels Date: Sat, 4 Jul 2020 14:05:18 +0200 Subject: [PATCH 08/14] lantiq: added switch-config for ARV752DPW Add missing switch config (4 LAN-Ports + CPU). Grey WAN port (used for ADSL) is not part of the switch. Signed-off-by: Lars Wessels [rework commit message] Signed-off-by: David Bauer --- target/linux/lantiq/xway/base-files/etc/board.d/02_network | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/lantiq/xway/base-files/etc/board.d/02_network b/target/linux/lantiq/xway/base-files/etc/board.d/02_network index 89368d8bfb..54ace3989c 100755 --- a/target/linux/lantiq/xway/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/xway/base-files/etc/board.d/02_network @@ -36,6 +36,7 @@ lantiq_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0" ;; + arcadyan,arv752dpw|\ bt,homehub-v2b) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5t@eth0" From bb14d44039f0504331c894d837a1b60a90eb27e3 Mon Sep 17 00:00:00 2001 From: Matthew Gyurgyik Date: Fri, 3 Jul 2020 14:08:25 -0700 Subject: [PATCH 09/14] kernel/pcengines-apu2: detect apuv4 board Upstream commit 3d00da1de3 ("platform/x86: pcengines-apuv2: detect apuv4 board") On 5.4, this module fails on APUv4 due to non-matching DMI data. With this patch, the module will match DMI data for the APUv4. Signed-off-by: Matthew Gyurgyik [include upstream patch description] Signed-off-by: David Bauer --- ...12-pcengines-apu2-detect-apuv4-board.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 target/linux/x86/patches-5.4/012-pcengines-apu2-detect-apuv4-board.patch diff --git a/target/linux/x86/patches-5.4/012-pcengines-apu2-detect-apuv4-board.patch b/target/linux/x86/patches-5.4/012-pcengines-apu2-detect-apuv4-board.patch new file mode 100644 index 0000000000..1be9a60229 --- /dev/null +++ b/target/linux/x86/patches-5.4/012-pcengines-apu2-detect-apuv4-board.patch @@ -0,0 +1,50 @@ +From 3d00da1de3ea36ba44f4a7ba76c8c8b16f98204b Mon Sep 17 00:00:00 2001 +From: "Enrico Weigelt, metux IT consult" +Date: Thu, 12 Dec 2019 14:27:56 +0100 +Subject: [PATCH] platform/x86: pcengines-apuv2: detect apuv4 board + +GPIO stuff on APUv4 seems to be the same as on APUv2, so we just +need to match on DMI data. + +Signed-off-by: Enrico Weigelt, metux IT consult +Signed-off-by: Andy Shevchenko +--- + drivers/platform/x86/pcengines-apuv2.c | 27 ++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +--- a/drivers/platform/x86/pcengines-apuv2.c ++++ b/drivers/platform/x86/pcengines-apuv2.c +@@ -186,6 +186,33 @@ static const struct dmi_system_id apu_gp + }, + .driver_data = (void *)&board_apu2, + }, ++ /* APU4 w/ legacy bios < 4.0.8 */ ++ { ++ .ident = "apu4", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"), ++ DMI_MATCH(DMI_BOARD_NAME, "APU4") ++ }, ++ .driver_data = (void *)&board_apu2, ++ }, ++ /* APU4 w/ legacy bios >= 4.0.8 */ ++ { ++ .ident = "apu4", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"), ++ DMI_MATCH(DMI_BOARD_NAME, "apu4") ++ }, ++ .driver_data = (void *)&board_apu2, ++ }, ++ /* APU4 w/ mainline bios */ ++ { ++ .ident = "apu4", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"), ++ DMI_MATCH(DMI_BOARD_NAME, "PC Engines apu4") ++ }, ++ .driver_data = (void *)&board_apu2, ++ }, + {} + }; + From 4c8eb4ad9eea29707b377c987b6f3be927d8e741 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 6 Jul 2020 16:02:15 +0200 Subject: [PATCH 10/14] ravpower-mcu: add missing PKG_RELEASE This fixes the imagebuilder for this device. Signed-off-by: David Bauer --- package/utils/ravpower-mcu/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/utils/ravpower-mcu/Makefile b/package/utils/ravpower-mcu/Makefile index 435445fcc5..b5bdfa56df 100644 --- a/package/utils/ravpower-mcu/Makefile +++ b/package/utils/ravpower-mcu/Makefile @@ -1,6 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ravpower-mcu +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/blocktrron/ravpower-mcu.git From 982468de35d499f85470b7b547d2b27cea53bae0 Mon Sep 17 00:00:00 2001 From: Martin Blumenstingl Date: Mon, 6 Jul 2020 19:46:34 +0200 Subject: [PATCH 11/14] lantiq: dts: Move the &usb_vbus nodes out of &gpio Move the USB VBUS regulator nodes out of the GPIO controller node. This fixes a problem where the "regulator-fixed" driver wasn't probed for these regulators because the GPIO driver doesn't scan the child-nodes and based on the dt-bindings documentation it's not supposed to. This fixed the following error reported by Luca Olivetti: ... dwc2 1e101000.usb: DWC OTG Controller dwc2 1e101000.usb: new USB bus registered, assigned bus number 1 dwc2 1e101000.usb: irq 62, io mem 0x1e101000 dwc2 1e101000.usb: startup error -517 dwc2 1e101000.usb: USB bus 1 deregistered dwc2 1e101000.usb: dwc2_hcd_init() FAILED, returning -517 Fixes: FS#1634 Cc: Luca Olivetti Signed-off-by: Martin Blumenstingl --- .../boot/dts/lantiq/ar9_zyxel_p-2601hn.dts | 24 +++++++++---------- .../lantiq/danube_arcadyan_arv7510pw22.dts | 24 +++++++++---------- .../dts/lantiq/danube_arcadyan_arv7518pw.dts | 24 +++++++++---------- .../dts/lantiq/danube_arcadyan_arv752dpw.dts | 24 +++++++++---------- .../boot/dts/lantiq/ar9_zyxel_p-2601hn.dts | 24 +++++++++---------- .../lantiq/danube_arcadyan_arv7510pw22.dts | 24 +++++++++---------- .../dts/lantiq/danube_arcadyan_arv7518pw.dts | 24 +++++++++---------- .../dts/lantiq/danube_arcadyan_arv752dpw.dts | 24 +++++++++---------- 8 files changed, 96 insertions(+), 96 deletions(-) diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts index 79896c6478..267788319c 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts @@ -96,18 +96,6 @@ gpios = <&gpio 50 GPIO_ACTIVE_HIGH>; }; }; -}; - -&gpio { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - exin { - lantiq,groups = "exin1"; - lantiq,function = "exin"; - }; - }; usb_vbus: regulator-usb-vbus { compatible = "regulator-fixed"; @@ -122,6 +110,18 @@ }; }; +&gpio { + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinmux { + exin { + lantiq,groups = "exin1"; + lantiq,function = "exin"; + }; + }; +}; + &gsw { phy-mode = "rmii"; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts index e5fd05fe40..063be778d4 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts @@ -73,6 +73,18 @@ gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; }; + + usb_vbus: regulator-usb-vbus { + compatible = "regulator-fixed"; + + regulator-name = "USB_VBUS"; + + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; &gpio { @@ -102,18 +114,6 @@ lantiq,output = <0>; }; }; - - usb_vbus: regulator-usb-vbus { - compatible = "regulator-fixed"; - - regulator-name = "USB_VBUS"; - - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - - gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; }; &gsw { diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts index ae0d27a042..b5e8845576 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts @@ -105,6 +105,18 @@ gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>; }; }; + + usb_vbus: regulator-usb-vbus { + compatible = "regulator-fixed"; + + regulator-name = "USB_VBUS"; + + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpio 14 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; &gpio { @@ -132,18 +144,6 @@ lantiq,open-drain = <1>; }; }; - - usb_vbus: regulator-usb-vbus { - compatible = "regulator-fixed"; - - regulator-name = "USB_VBUS"; - - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - - gpio = <&gpio 14 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; }; /* diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts index 7c51f31bad..5db5f314d9 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts @@ -108,6 +108,18 @@ gpios = <&gpiomm 9 GPIO_ACTIVE_LOW>; }; }; + + usb_vbus: regulator-usb-vbus { + compatible = "regulator-fixed"; + + regulator-name = "USB_VBUS"; + + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpiomm 0 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; &gpio { @@ -142,18 +154,6 @@ lantiq,open-drain = <1>; }; }; - - usb_vbus: regulator-usb-vbus { - compatible = "regulator-fixed"; - - regulator-name = "USB_VBUS"; - - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - - gpio = <&gpiomm 0 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; }; &gsw { diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts index 79896c6478..267788319c 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts @@ -96,18 +96,6 @@ gpios = <&gpio 50 GPIO_ACTIVE_HIGH>; }; }; -}; - -&gpio { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - exin { - lantiq,groups = "exin1"; - lantiq,function = "exin"; - }; - }; usb_vbus: regulator-usb-vbus { compatible = "regulator-fixed"; @@ -122,6 +110,18 @@ }; }; +&gpio { + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinmux { + exin { + lantiq,groups = "exin1"; + lantiq,function = "exin"; + }; + }; +}; + &gsw { phy-mode = "rmii"; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts index e5fd05fe40..063be778d4 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts @@ -73,6 +73,18 @@ gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; }; + + usb_vbus: regulator-usb-vbus { + compatible = "regulator-fixed"; + + regulator-name = "USB_VBUS"; + + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; &gpio { @@ -102,18 +114,6 @@ lantiq,output = <0>; }; }; - - usb_vbus: regulator-usb-vbus { - compatible = "regulator-fixed"; - - regulator-name = "USB_VBUS"; - - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - - gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; }; &gsw { diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts index ae0d27a042..b5e8845576 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts @@ -105,6 +105,18 @@ gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>; }; }; + + usb_vbus: regulator-usb-vbus { + compatible = "regulator-fixed"; + + regulator-name = "USB_VBUS"; + + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpio 14 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; &gpio { @@ -132,18 +144,6 @@ lantiq,open-drain = <1>; }; }; - - usb_vbus: regulator-usb-vbus { - compatible = "regulator-fixed"; - - regulator-name = "USB_VBUS"; - - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - - gpio = <&gpio 14 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; }; /* diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts index 7c51f31bad..5db5f314d9 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts @@ -108,6 +108,18 @@ gpios = <&gpiomm 9 GPIO_ACTIVE_LOW>; }; }; + + usb_vbus: regulator-usb-vbus { + compatible = "regulator-fixed"; + + regulator-name = "USB_VBUS"; + + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpiomm 0 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; &gpio { @@ -142,18 +154,6 @@ lantiq,open-drain = <1>; }; }; - - usb_vbus: regulator-usb-vbus { - compatible = "regulator-fixed"; - - regulator-name = "USB_VBUS"; - - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - - gpio = <&gpiomm 0 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; }; &gsw { From ba0f4f0cfddc6f1152273565ec35f2a0bda1e95d Mon Sep 17 00:00:00 2001 From: Christoph Krapp Date: Mon, 6 Jul 2020 23:05:25 +0200 Subject: [PATCH 12/14] ramips: add support for TP-Link RE500 v1 This device uses the same hardware as RE650 v1 which got supported in 8c51dde. Hardware specification: - SoC 880 MHz - MediaTek MT7621AT - 128 MB of DDR3 RAM - 16 MB - Winbond 25Q128FVSG - 4T4R 2.4 GHz - MediaTek MT7615E - 4T4R 5 GHz - MediaTek MT7615E - 1x 1 Gbps Ethernet - MT7621AT integrated - 7x LEDs (Power, 2G, 5G, WPS(x2), Lan(x2)) - 4x buttons (Reset, Power, WPS, LED) - UART header (J1) - 2:GND, 3:RX, 4:TX Serial console @ 57600,8n1 Flash instructions: Upload openwrt-ramips-mt7621-tplink_re500-v1-squashfs-factory.bin from the RE500 web interface. TFTP recovery to stock firmware: Unfortunately, I can't find an easy way to recover the RE without opening the device and using modified binaries. The TFTP upload will only work if selected from u-boot, which means you have to open the device and attach to the serial console. The TFTP update procedure does *not* accept the published vendor firmware binaries. However, it allows to flash kernel + rootfs binaries, and this works if you have a backup of the original contents of the flash. It's probably possible to create special image out of the vendor binaries and use that as recovery image. Signed-off-by: Christoph Krapp [remove dts-v1 in DTSI, do not touch WiFi LEDs for RE650, keep state_default in DTS files, fix label-mac-device, use lower case for WiFi LEDs] Signed-off-by: Adrian Schmutzler --- .../ramips/dts/mt7621_tplink_re500-v1.dts | 64 +++++++++ .../ramips/dts/mt7621_tplink_re650-v1.dts | 126 +---------------- .../ramips/dts/mt7621_tplink_rexx0-v1.dtsi | 131 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 10 ++ .../mt7621/base-files/etc/board.d/01_leds | 4 + .../mt7621/base-files/etc/board.d/02_network | 1 + tools/firmware-utils/src/tplink-safeloader.c | 37 +++++ 7 files changed, 248 insertions(+), 125 deletions(-) create mode 100644 target/linux/ramips/dts/mt7621_tplink_re500-v1.dts create mode 100644 target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi diff --git a/target/linux/ramips/dts/mt7621_tplink_re500-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re500-v1.dts new file mode 100644 index 0000000000..600342a822 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_tplink_re500-v1.dts @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7621_tplink_rexx0-v1.dtsi" + +/ { + compatible = "tplink,re500-v1", "mediatek,mt7621-soc"; + model = "TP-Link RE500 v1"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "re500-v1:blue:power"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + }; + + wifi2g { + label = "re500-v1:blue:wifi2g"; + gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wifi5g { + label = "re500-v1:blue:wifi5g"; + gpios = <&gpio 24 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wps_red { + label = "re500-v1:red:wps"; + gpios = <&gpio 26 GPIO_ACTIVE_HIGH>; + }; + + wps_blue { + label = "re500-v1:blue:wps"; + gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; + }; + + eth_act { + label = "re500-v1:green:eth_act"; + gpios = <&gpio 28 GPIO_ACTIVE_LOW>; + }; + + eth_link { + label = "re500-v1:green:eth_link"; + gpios = <&gpio 29 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&state_default { + gpio { + groups = "rgmii2", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_re650-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re650-v1.dts index d5ae954189..ab8805f163 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re650-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re650-v1.dts @@ -1,10 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "mt7621.dtsi" - -#include -#include +#include "mt7621_tplink_rexx0-v1.dtsi" / { compatible = "tplink,re650-v1", "mediatek,mt7621-soc"; @@ -15,11 +12,6 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; - label-mac-device = &gmac0; - }; - - chosen { - bootargs = "console=ttyS0,57600"; }; leds { @@ -60,124 +52,8 @@ gpios = <&gpio 29 GPIO_ACTIVE_LOW>; }; }; - - keys { - compatible = "gpio-keys"; - - wps { - label = "wps"; - gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - linux,code = ; - }; - - power { - label = "power"; - gpios = <&gpio 25 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - linux,code = ; - }; - - led { - label = "led"; - gpios = <&gpio 30 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - linux,code = ; - }; - - reset { - label = "reset"; - gpios = <&gpio 31 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - linux,code = ; - }; - }; }; -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <40000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x20000>; - read-only; - }; - - partition@20000 { - compatible = "tplink,firmware"; - label = "firmware"; - reg = <0x20000 0xde0000>; - }; - - config: partition@e00000 { - label = "config"; - reg = <0xe00000 0x50000>; - read-only; - }; - - /* range 0xe50000 to 0xff0000 is empty in vendor - * firmware, so we do not use it either - */ - - radio: partition@ff0000 { - label = "radio"; - reg = <0xff0000 0x10000>; - read-only; - }; - }; - }; -}; - -&pcie { - status = "okay"; -}; - -&pcie0 { - wifi@0,0 { - compatible = "mediatek,mt76"; - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x10008>; - mtd-mac-address-increment = <1>; - ieee80211-freq-limit = <2400000 2500000>; - }; -}; - -&pcie1 { - wifi@0,0 { - compatible = "mediatek,mt76"; - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&config 0x10008>; - mtd-mac-address-increment = <2>; - ieee80211-freq-limit = <5000000 6000000>; - }; -}; - -&gmac0 { - mtd-mac-address = <&config 0x10008>; -}; - -&switch0 { - ports { - port@0 { - status = "okay"; - label = "lan"; - }; - }; -}; - - &state_default { gpio { groups = "rgmii2", "wdt"; diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi new file mode 100644 index 0000000000..fa9d16a55a --- /dev/null +++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + aliases { + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + linux,code = ; + }; + + power { + label = "power"; + gpios = <&gpio 25 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + linux,code = ; + }; + + led { + label = "led"; + gpios = <&gpio 30 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio 31 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x20000>; + read-only; + }; + + partition@20000 { + compatible = "tplink,firmware"; + label = "firmware"; + reg = <0x20000 0xde0000>; + }; + + config: partition@e00000 { + label = "config"; + reg = <0xe00000 0x50000>; + read-only; + }; + + /* range 0xe50000 to 0xff0000 is empty in vendor + * firmware, so we do not use it either + */ + + radio: partition@ff0000 { + label = "radio"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&radio 0x0>; + mtd-mac-address = <&config 0x10008>; + mtd-mac-address-increment = <1>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&radio 0x8000>; + mtd-mac-address = <&config 0x10008>; + mtd-mac-address-increment = <2>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&gmac0 { + mtd-mac-address = <&config 0x10008>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan"; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index de20934598..d7a4b9fa7c 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -842,6 +842,16 @@ define Device/tplink_re350-v1 endef TARGET_DEVICES += tplink_re350-v1 +define Device/tplink_re500-v1 + $(Device/tplink-safeloader) + DEVICE_MODEL := RE500 + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := kmod-mt7615e wpad-basic + TPLINK_BOARD_ID := RE500-V1 + IMAGE_SIZE := 14208k +endef +TARGET_DEVICES += tplink_re500-v1 + define Device/tplink_re650-v1 $(Device/tplink-safeloader) DEVICE_MODEL := RE650 diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 716bc6e462..2e3dca7901 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -75,6 +75,10 @@ tplink,re650-v1) ucidef_set_led_netdev "eth_act" "LAN act" "$boardname:green:eth_act" "lan" "tx rx" ucidef_set_led_netdev "eth_link" "LAN link" "$boardname:green:eth_link" "lan" "link" ;; +tplink,re500-v1) + ucidef_set_led_netdev "eth_act" "LAN act" "$boardname:green:eth_act" "lan" "tx rx" + ucidef_set_led_netdev "eth_link" "LAN link" "$boardname:green:eth_link" "lan" "link" + ;; xzwifi,creativebox-v1) ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "wan" ;; diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 03cc921be3..a276d082e9 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -37,6 +37,7 @@ ramips_setup_interfaces() netgear,ex6150|\ thunder,timecloud|\ tplink,re350-v1|\ + tplink,re500-v1|\ tplink,re650-v1|\ ubnt,unifi-nanohd) ucidef_set_interface_lan "lan" diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index a97f329a87..6cd2a45247 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -1858,6 +1858,43 @@ static struct device_info boards[] = { .last_sysupgrade_partition = "file-system" }, + /** Firmware layout for the RE500 */ + { + .id = "RE500-V1", + .vendor = "", + .support_list = + "SupportList:\r\n" + "{product_name:RE500,product_ver:1.0.0,special_id:00000000}\r\n" + "{product_name:RE500,product_ver:1.0.0,special_id:55530000}\r\n" + "{product_name:RE500,product_ver:1.0.0,special_id:45550000}\r\n" + "{product_name:RE500,product_ver:1.0.0,special_id:4A500000}\r\n" + "{product_name:RE500,product_ver:1.0.0,special_id:43410000}\r\n" + "{product_name:RE500,product_ver:1.0.0,special_id:41550000}\r\n" + "{product_name:RE500,product_ver:1.0.0,special_id:41530000}\r\n", + .support_trail = '\x00', + .soft_ver = NULL, + + /* We're using a dynamic kernel/rootfs split here */ + .partitions = { + {"fs-uboot", 0x00000, 0x20000}, + {"firmware", 0x20000, 0xde0000}, + {"partition-table", 0xe00000, 0x02000}, + {"default-mac", 0xe10000, 0x00020}, + {"pin", 0xe10100, 0x00020}, + {"product-info", 0xe11100, 0x01000}, + {"soft-version", 0xe20000, 0x01000}, + {"support-list", 0xe21000, 0x01000}, + {"profile", 0xe22000, 0x08000}, + {"user-config", 0xe30000, 0x10000}, + {"default-config", 0xe40000, 0x10000}, + {"radio", 0xff0000, 0x10000}, + {NULL, 0, 0} + }, + + .first_sysupgrade_partition = "os-image", + .last_sysupgrade_partition = "file-system" + }, + /** Firmware layout for the RE650 */ { .id = "RE650-V1", From 3866fefa38bf102380d9e308689e8bd8ab10c2f9 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Sun, 17 May 2020 12:32:07 +0200 Subject: [PATCH 13/14] lantiq: remove redundant includes from fritz736x DTS files The removed lines are already included in vr9_avm_fritz736x.dtsi Signed-off-by: Aleksander Jan Bajkowski [rephrase commit title/message] Signed-off-by: Adrian Schmutzler --- .../arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts | 3 --- .../arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts | 3 --- .../arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts | 3 --- 3 files changed, 9 deletions(-) diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts index 9129ef1f70..a2e4bc9292 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts @@ -3,9 +3,6 @@ #include "vr9_avm_fritz736x.dtsi" -#include -#include - / { compatible = "avm,fritz7360-v2", "avm,fritz736x", "lantiq,xway", "lantiq,vr9"; model = "AVM FRITZ!Box 7360 V2"; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts index 012300ec57..e4c74d443f 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts @@ -3,9 +3,6 @@ #include "vr9_avm_fritz736x.dtsi" -#include -#include - / { compatible = "avm,fritz7360sl", "avm,fritz736x", "lantiq,xway", "lantiq,vr9"; model = "AVM FRITZ!Box 7360 SL"; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts index a061a482da..0cfdb802e2 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts @@ -3,9 +3,6 @@ #include "vr9_avm_fritz736x.dtsi" -#include -#include - / { compatible = "avm,fritz7362sl", "avm,fritz736x", "lantiq,xway", "lantiq,vr9"; model = "AVM FRITZ!Box 7362 SL"; From f496939f15b07c3386769491f7e4beb16b072240 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Sun, 17 May 2020 12:33:56 +0200 Subject: [PATCH 14/14] lantiq: set port numbers corresponding to reg value Fix inconsistencies found in DTS files and sort ethernet ports based on updated names. Signed-off-by: Aleksander Jan Bajkowski [squash two separate patches, rephrase commit title/message] Signed-off-by: Adrian Schmutzler --- .../dts/lantiq/vr9_arcadyan_arv7519rw22.dts | 26 ++++++++--------- .../boot/dts/lantiq/vr9_avm_fritz736x.dtsi | 2 +- .../dts/lantiq/vr9_buffalo_wbmr-300hpd.dts | 26 ++++++++--------- .../boot/dts/lantiq/vr9_lantiq_easy80920.dtsi | 28 +++++++++---------- .../boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi | 14 +++++----- .../boot/dts/lantiq/vr9_tplink_vr200.dtsi | 14 +++++----- 6 files changed, 55 insertions(+), 55 deletions(-) diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts index d6c521cfe7..7938184719 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts @@ -110,30 +110,30 @@ phy-mode = "rgmii"; phy-handle = <&phy0>; }; - ethernet@1 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <4>; - phy-mode = "mii"; - phy-handle = <&phy13>; - }; ethernet@2 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <5>; - phy-mode = "mii"; - phy-handle = <&phy14>; - }; - ethernet@3 { compatible = "lantiq,xrx200-pdi-port"; reg = <2>; phy-mode = "mii"; phy-handle = <&phy11>; }; - ethernet@4 { + ethernet@3 { compatible = "lantiq,xrx200-pdi-port"; reg = <3>; phy-mode = "mii"; phy-handle = <&phy12>; }; + ethernet@4 { + compatible = "lantiq,xrx200-pdi-port"; + reg = <4>; + phy-mode = "mii"; + phy-handle = <&phy13>; + }; + ethernet@5 { + compatible = "lantiq,xrx200-pdi-port"; + reg = <5>; + phy-mode = "mii"; + phy-handle = <&phy14>; + }; }; mdio { diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi index 1553d2f7f4..70dff97ec1 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi @@ -105,7 +105,7 @@ phy-handle = <&phy11>; }; - ethernet@3 { + ethernet@4 { compatible = "lantiq,xrx200-pdi-port"; reg = <4>; phy-mode = "gmii"; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts index 4631ad4ffe..7709a86e55 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts @@ -162,30 +162,30 @@ reg = <0>; lantiq,switch; - ethernet@1 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <4>; - phy-mode = "mii"; - phy-handle = <&phy13>; - }; ethernet@2 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <5>; - phy-mode = "mii"; - phy-handle = <&phy14>; - }; - ethernet@3 { compatible = "lantiq,xrx200-pdi-port"; reg = <2>; phy-mode = "mii"; phy-handle = <&phy11>; }; - ethernet@4 { + ethernet@3 { compatible = "lantiq,xrx200-pdi-port"; reg = <3>; phy-mode = "mii"; phy-handle = <&phy12>; }; + ethernet@4 { + compatible = "lantiq,xrx200-pdi-port"; + reg = <4>; + phy-mode = "mii"; + phy-handle = <&phy13>; + }; + ethernet@5 { + compatible = "lantiq,xrx200-pdi-port"; + reg = <5>; + phy-mode = "mii"; + phy-handle = <&phy14>; + }; }; mdio { diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi index 4fbc1ac496..f5ea12b7e2 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi @@ -103,17 +103,11 @@ reg = <0>; lantiq,switch; - ethernet@4 { + ethernet@0 { compatible = "lantiq,xrx200-pdi-port"; - reg = <4>; - phy-mode = "gmii"; - phy-handle = <&phy13>; - }; - ethernet@2 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <2>; - phy-mode = "gmii"; - phy-handle = <&phy11>; + reg = <0>; + phy-mode = "rgmii"; + phy-handle = <&phy0>; }; ethernet@1 { compatible = "lantiq,xrx200-pdi-port"; @@ -121,11 +115,17 @@ phy-mode = "rgmii"; phy-handle = <&phy1>; }; - ethernet@0 { + ethernet@2 { compatible = "lantiq,xrx200-pdi-port"; - reg = <0>; - phy-mode = "rgmii"; - phy-handle = <&phy0>; + reg = <2>; + phy-mode = "gmii"; + phy-handle = <&phy11>; + }; + ethernet@4 { + compatible = "lantiq,xrx200-pdi-port"; + reg = <4>; + phy-mode = "gmii"; + phy-handle = <&phy13>; }; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi index eabbc0257f..c4ccac8932 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi @@ -121,24 +121,24 @@ phy-handle = <&phy0>; // gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; - ethernet@5 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <5>; - phy-mode = "rgmii"; - phy-handle = <&phy5>; - }; ethernet@2 { compatible = "lantiq,xrx200-pdi-port"; reg = <2>; phy-mode = "gmii"; phy-handle = <&phy11>; }; - ethernet@3 { + ethernet@4 { compatible = "lantiq,xrx200-pdi-port"; reg = <4>; phy-mode = "gmii"; phy-handle = <&phy13>; }; + ethernet@5 { + compatible = "lantiq,xrx200-pdi-port"; + reg = <5>; + phy-mode = "rgmii"; + phy-handle = <&phy5>; + }; }; mdio { diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi index 77b4f0defb..46b699a93e 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi @@ -41,24 +41,24 @@ phy-handle = <&phy0>; // gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; - ethernet@5 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <5>; - phy-mode = "rgmii"; - phy-handle = <&phy5>; - }; ethernet@2 { compatible = "lantiq,xrx200-pdi-port"; reg = <2>; phy-mode = "gmii"; phy-handle = <&phy11>; }; - ethernet@3 { + ethernet@4 { compatible = "lantiq,xrx200-pdi-port"; reg = <4>; phy-mode = "gmii"; phy-handle = <&phy13>; }; + ethernet@5 { + compatible = "lantiq,xrx200-pdi-port"; + reg = <5>; + phy-mode = "rgmii"; + phy-handle = <&phy5>; + }; }; mdio {