Re: [PATCH 02/13] ltq-vdsl-app: fix -Wundef warnings
12/11/20 1:05 PM, Andre Heider: Shut up these warnings: /usr/include/vdsl/cmv_message_format.h:33:6: warning: "MEI_SUPPORT_DEBUG_STREAMS" is not defined, evaluates to 0 [-Wundef] #if (MEI_SUPPORT_DEBUG_STREAMS == 1) ^ /usr/include/vdsl/drv_mei_cpe_interface.h:2256:6: warning: "MEI_SUPPORT_OPTIMIZED_FW_DL" is not defined, evaluates to 0 [-Wundef] #if (MEI_SUPPORT_OPTIMIZED_FW_DL == 1) ^~~ Signed-off-by: Andre Heider --- package/network/config/ltq-vdsl-app/Makefile | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/network/config/ltq-vdsl-app/Makefile b/package/network/config/ltq-vdsl-app/Makefile index 5e2db1d5c6..ef81f7c8d7 100644 --- a/package/network/config/ltq-vdsl-app/Makefile +++ b/package/network/config/ltq-vdsl-app/Makefile @@ -35,6 +35,11 @@ define Package/ltq-vdsl-app/description Userland tool needed to control Lantiq VDSL CPE endef +APPL_CFLAGS= \ + -DMAX_CLI_PIPES=1 \ + -DMEI_SUPPORT_DEBUG_STREAMS=0 \ + -DMEI_SUPPORT_OPTIMIZED_FW_DL=0 Hey Andre, optimized firmware download is enabled in the MEI driver by default: drv_mei_cpe-1.5.17.6/src/drv_mei_cpe_config.h #ifndef MEI_SUPPORT_OPTIMIZED_FW_DL # define MEI_SUPPORT_OPTIMIZED_FW_DL1 #else cat /proc/driver/mei_cpe/status/00 shows the FwDownlOpt counter, which confirms the above. MEI_SUPPORT_OPTIMIZED_FW_DL should be rather defined as 1 to be on safe side, even if the IOCTL_MEI_statistic_t struct isn't used at all in the vdsl-app. regards Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH 02/13] ltq-vdsl-app: fix -Wundef warnings
12/11/20 7:44 PM, Andre Heider: On 11/12/2020 18:59, Mathias Kresin wrote: 12/11/20 1:05 PM, Andre Heider: Shut up these warnings: /usr/include/vdsl/cmv_message_format.h:33:6: warning: "MEI_SUPPORT_DEBUG_STREAMS" is not defined, evaluates to 0 [-Wundef] #if (MEI_SUPPORT_DEBUG_STREAMS == 1) ^ /usr/include/vdsl/drv_mei_cpe_interface.h:2256:6: warning: "MEI_SUPPORT_OPTIMIZED_FW_DL" is not defined, evaluates to 0 [-Wundef] #if (MEI_SUPPORT_OPTIMIZED_FW_DL == 1) ^~~ Signed-off-by: Andre Heider --- package/network/config/ltq-vdsl-app/Makefile | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/network/config/ltq-vdsl-app/Makefile b/package/network/config/ltq-vdsl-app/Makefile index 5e2db1d5c6..ef81f7c8d7 100644 --- a/package/network/config/ltq-vdsl-app/Makefile +++ b/package/network/config/ltq-vdsl-app/Makefile @@ -35,6 +35,11 @@ define Package/ltq-vdsl-app/description Userland tool needed to control Lantiq VDSL CPE endef +APPL_CFLAGS= \ + -DMAX_CLI_PIPES=1 \ + -DMEI_SUPPORT_DEBUG_STREAMS=0 \ + -DMEI_SUPPORT_OPTIMIZED_FW_DL=0 Hey Andre, optimized firmware download is enabled in the MEI driver by default: drv_mei_cpe-1.5.17.6/src/drv_mei_cpe_config.h #ifndef MEI_SUPPORT_OPTIMIZED_FW_DL # define MEI_SUPPORT_OPTIMIZED_FW_DL 1 #else cat /proc/driver/mei_cpe/status/00 shows the FwDownlOpt counter, which confirms the above. MEI_SUPPORT_OPTIMIZED_FW_DL should be rather defined as 1 to be on safe side, even if the IOCTL_MEI_statistic_t struct isn't used at all in the vdsl-app. fishy... Maybe drv_mei_cpe_config.h should be included before drv_mei_cpe_interface.h then? Would only kind of work, since drv_mei_cpe_config.h isn't auto generated and might miss compile flags. As far as I can see, MEI_SUPPORT_OPTIMIZED_FW_DL can be only defined via compile flags. Different story for MEI_SUPPORT_DEBUG_STREAMS. It's a configure option for the MEI driver, but passed as compile flag as well. Right now, it seems to me that there is no way around keeping the flags manually synchronized between the MEI driver and the vdsl-app. Maybe we should pass them in the MEI driver as CFLAGS as well. Just to have the same config and make it more obvious that they need to be changed for both packages as the same time. Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH v2 0/12] add ubus support to ltq-[v|a]dsl-app
1/13/21 3:00 PM, Martin Schiller: On 2021-01-09 09:40, Andre Heider wrote: Hi, (cc'ed some recent commiters for lantiq) On 15/12/2020 10:35, Andre Heider wrote: v2: - drop 0002-ltq-vdsl-app-fix-Wundef-warnings.patch - use "/dev/dsl_cpe_api" without the "0" suffix for the adsl daemon: package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch:+ device_create(dsl_class, NULL, MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0), NULL, "dsl_cpe_api"); package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch:+ device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api0"); - use callDSLMetrics() for luci, per jo - add Tested-by tags This is to significantly speed up the generation of the metrics. The motivation comes from the fact that ~2.6s is just way too ineffcient for interval based metric collectors like prometheus or collectd. The luci status page also loads/refreshes alot faster. $ time /etc/init.d/dsl_control dslstat real 0m 2.66s user 0m 0.90s sys 0m 1.76s $ time ubus call dsl metrics real 0m 0.02s user 0m 0.00s sys 0m 0.01s The ltq-adsl-app changes are only compile time tested. who do I need to convince to review this? ;) I would also like this great work to be merged. Martin Sending a reviewed-by and/or tested-by (with devices it was tested on) might help to push this forward. best regards Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH] lantiq: set maximum kernel size
These boards have a fixed size kernel partition but do not limit the kernel size during image building. Disable image building for both boards as well, since the kernel of the last release as well as master are to big to fit into the 2 MByte kernel partition. Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/ar9.mk| 2 ++ target/linux/lantiq/image/danube.mk | 2 ++ 2 files changed, 4 insertions(+) diff --git a/target/linux/lantiq/image/ar9.mk b/target/linux/lantiq/image/ar9.mk index ad061b2776..a973c90beb 100644 --- a/target/linux/lantiq/image/ar9.mk +++ b/target/linux/lantiq/image/ar9.mk @@ -34,6 +34,7 @@ define Device/bt_homehub-v3a DEVICE_VARIANT := Type A BOARD_NAME := BTHOMEHUBV3A SOC := ar9 + KERNEL_SIZE := 2048k DEVICE_PACKAGES := kmod-usb-dwc2 \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ @@ -42,6 +43,7 @@ define Device/bt_homehub-v3a kmod-ath9k kmod-owl-loader wpad-basic-wolfssl \ uboot-envtools SUPPORTED_DEVICES += BTHOMEHUBV3A + DEFAULT := n endef TARGET_DEVICES += bt_homehub-v3a diff --git a/target/linux/lantiq/image/danube.mk b/target/linux/lantiq/image/danube.mk index ea22081d65..73ec27222a 100644 --- a/target/linux/lantiq/image/danube.mk +++ b/target/linux/lantiq/image/danube.mk @@ -188,6 +188,7 @@ define Device/bt_homehub-v2b DEVICE_VARIANT := Type B BOARD_NAME := BTHOMEHUBV2B SOC := danube + KERNEL_SIZE := 2048k DEVICE_PACKAGES := kmod-usb-dwc2 \ kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \ kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \ @@ -195,6 +196,7 @@ define Device/bt_homehub-v2b ltq-adsl-app ppp-mod-pppoa \ kmod-ath9k kmod-owl-loader wpad-basic-wolfssl SUPPORTED_DEVICES += BTHOMEHUBV2B + DEFAULT := n endef TARGET_DEVICES += bt_homehub-v2b -- 2.25.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH] lantiq: ltq-tapi: disable KPI and QOS
The QOS feature depends on KPI2UDP which was removed from the tree with commit a95775e4b2a9 ("drop unmaintained packages") in 2012. Since QOS was the last user of the KPI, the feature can be disabled by default. Signed-off-by: Mathias Kresin --- package/kernel/lantiq/ltq-tapi/Config.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/lantiq/ltq-tapi/Config.in b/package/kernel/lantiq/ltq-tapi/Config.in index 84dbef2397..13ca388ad8 100644 --- a/package/kernel/lantiq/ltq-tapi/Config.in +++ b/package/kernel/lantiq/ltq-tapi/Config.in @@ -32,7 +32,7 @@ config VOICE_CPE_TAPI_DECT config VOICE_CPE_TAPI_KPI bool "KPI (Kernel Packet Interface)" depends on PACKAGE_kmod-ltq-tapi - default y + default n help Option to enable the generic kernel level packet interface which allows accelerated packet transfer for various purposes. @@ -43,7 +43,7 @@ config VOICE_CPE_TAPI_KPI config VOICE_CPE_TAPI_QOS bool "QOS for accelerated RTP packet handling" depends on PACKAGE_kmod-ltq-tapi - default y + default n help Option to enable an accelerated RTP packet transfer inside the LINUX kernel space. This option requires the KPI2UDP -- 2.25.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH] ltq-vdsl-app: fix -Wundef warnings
The following warnings are shown during build: /usr/include/vdsl/cmv_message_format.h:33:6: warning: "MEI_SUPPORT_DEBUG_STREAMS" is not defined, evaluates to 0 [-Wundef] #if (MEI_SUPPORT_DEBUG_STREAMS == 1) ^ /usr/include/vdsl/drv_mei_cpe_interface.h:2256:6: warning: "MEI_SUPPORT_OPTIMIZED_FW_DL" is not defined, evaluates to 0 [-Wundef] #if (MEI_SUPPORT_OPTIMIZED_FW_DL == 1) ^~~ The headers are provided by the MEI driver, but the defines are never set by the vdsl app. While the struct with the MEI_SUPPORT_OPTIMIZED_FW_DL conditional isn't used by the vdsl app, however CMV_USED_PAYLOAD_8BIT_SIZE which value depends on MEI_SUPPORT_DEBUG_STREAMS is. Since the MEI driver doesn't provide an autogenerated header with compile flags, the flags are hardcoded for the vdsl app. Set them for the MEI driver as well, to indicate a relation to the values used for the vdsl app and to be not surprised by a changed default in case the MEI driver gets updated. Use the current default values defined in the MEI driver. Signed-off-by: Mathias Kresin --- package/kernel/lantiq/ltq-vdsl-mei/Makefile | 11 ++- package/network/config/ltq-vdsl-app/Makefile | 16 ++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/package/kernel/lantiq/ltq-vdsl-mei/Makefile b/package/kernel/lantiq/ltq-vdsl-mei/Makefile index 4a305d9c27..a15d0c931c 100644 --- a/package/kernel/lantiq/ltq-vdsl-mei/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-mei/Makefile @@ -54,6 +54,15 @@ endef MAKE_FLAGS += \ SHELL="$(BASH)" +# ltq-vdsl-app uses a header provided by the MEI driver which has some +# conditionals. +# Define the conditionals here to have the same view on both sides. If you +# change them, you need to change them for the ltq-vdsl-app as well +MEI_DRV_CFLAGS = \ + -DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 \ + -DMEI_SUPPORT_DEBUG_STREAMS=1 \ + -DMEI_SUPPORT_OPTIMIZED_FW_DL=1 + CONFIGURE_ARGS += \ --enable-kernelincl="$(LINUX_DIR)/include" \ --enable-device=vr9 \ @@ -63,7 +72,7 @@ CONFIGURE_ARGS += \ --enable-error_print \ --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos/" \ --enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \ - --enable-add_drv_cflags="-DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1" \ + --enable-add_drv_cflags="$(MEI_DRV_CFLAGS)" \ --enable-linux-26 \ --enable-kernelbuild="$(LINUX_DIR)" \ --enable-drv_test_appl=yes \ diff --git a/package/network/config/ltq-vdsl-app/Makefile b/package/network/config/ltq-vdsl-app/Makefile index 0968811984..7665f37514 100644 --- a/package/network/config/ltq-vdsl-app/Makefile +++ b/package/network/config/ltq-vdsl-app/Makefile @@ -36,6 +36,18 @@ define Package/ltq-vdsl-app/description Userland tool needed to control Lantiq VDSL CPE endef +# ltq-vdsl-app uses a header provided by the MEI driver which has some +# conditionals. +# +# Define them here with the default values they would get in the MEI driver, +# have the same view on both sides. +# +# If you change them, you need to change them for the ltq-vdsl-app as well +VDSL_APP_CFLAGS = \ + -DMAX_CLI_PIPES=1 \ + -DMEI_SUPPORT_DEBUG_STREAMS=1 \ + -DMEI_SUPPORT_OPTIMIZED_FW_DL=1 + CONFIGURE_ARGS += \ --enable-vrx \ --enable-vrx-device=vr9 \ @@ -44,10 +56,10 @@ CONFIGURE_ARGS += \ --enable-ifxos \ --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos" \ --enable-ifxos-library="-I$(STAGING_DIR)/usr/lib" \ - --enable-add-appl-cflags="-DMAX_CLI_PIPES=1" \ + --enable-add-appl-cflags="$(VDSL_APP_CFLAGS)" \ --enable-debug \ --disable-dti \ - --with-channels-per-line="1" \ + --with-channels-per-line="1" #CONFIGURE_ARGS += --enable-model=full #CONFIGURE_ARGS += --enable-model=lite -- 2.25.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH] lantiq: vr9: set the usb led trigger via devicetree
Assign the usbdev trigger via devicetree and drop the userspace handling of the usb leds. Signed-off-by: Mathias Kresin --- .../files/arch/mips/boot/dts/lantiq/vr9.dtsi | 14 ++ .../mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi | 12 +++- .../mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi | 10 ++ .../mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi | 7 +++ .../boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts | 13 ++--- 5 files changed, 36 insertions(+), 20 deletions(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi index 60f7f7a4c0..85c584c1f1 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi @@ -409,6 +409,8 @@ }; usb0: usb@e101000 { + #address-cells = <1>; + #size-cells = <0>; status = "disabled"; compatible = "lantiq,xrx200-usb"; reg = <0xe101000 0x1000 @@ -418,9 +420,16 @@ dr_mode = "host"; phys = <&usb_phy0>; phy-names = "usb2-phy"; + + ehci_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; usb1: usb@e106000 { + #address-cells = <1>; + #size-cells = <0>; status = "disabled"; compatible = "lantiq,xrx200-usb"; reg = <0xe106000 0x1000>; @@ -429,6 +438,11 @@ dr_mode = "host"; phys = <&usb_phy1>; phy-names = "usb2-phy"; + + ehci_port2: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; eth0: eth@e108000 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi index f5b0b4f2a1..9cac3e6ec0 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi @@ -15,9 +15,6 @@ led-failsafe = &power; led-running = &power; led-upgrade = &power; - - led-usb = &led_usb1; - led-usb2 = &led_usb2; }; memory@0 { @@ -64,13 +61,18 @@ label = "green:fxo"; gpios = <&stp 19 GPIO_ACTIVE_HIGH>; }; - led_usb1: usb1 { + usb1 { label = "green:usb1"; gpios = <&stp 18 GPIO_ACTIVE_HIGH>; + trigger-sources = <&ehci_port1>; + linux,default-trigger = "usbport"; }; - led_usb2: usb2 { + + usb2 { label = "green:usb2"; gpios = <&stp 15 GPIO_ACTIVE_HIGH>; + trigger-sources = <&ehci_port2>; + linux,default-trigger = "usbport"; }; sd { label = "green:sd"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi index aa6c308ffe..d33b817f2d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi @@ -18,8 +18,6 @@ led-dsl = &led_dsl; led-internet = &led_internet; led-wifi = &led_wifi; - led-usb = &led_usb0; - led-usb2 = &led_usb2; }; memory@0 { @@ -67,14 +65,18 @@ gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; }; - led_usb0: usb0 { + usb0 { label = "green:usb"; gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; + trigger-sources = <&ehci_port1>; + linux,default-trigger = "usbport"; }; - led_usb
[PATCH] lantiq: ARV752DPW22: set the usb led trigger via devicetree
Assign the usbdev trigger via devicetree and drop the userspace handling of the usb leds Add the PCI attached usb controller as trigger sources for the usb led as well. Signed-off-by: Mathias Kresin --- .../arch/mips/boot/dts/lantiq/danube.dtsi | 7 + .../lantiq/danube_arcadyan_arv752dpw22.dts| 28 ++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi index ced3e3bcb4..bb3e9fb188 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi @@ -254,6 +254,8 @@ }; usb: usb@e101000 { + #address-cells = <1>; + #size-cells = <0>; compatible = "lantiq,danube-usb"; reg = <0xe101000 0x1000 0xe12 0x3f000>; @@ -263,6 +265,11 @@ phys = <&usb_phy>; phy-names = "usb2-phy"; status = "disabled"; + + ehci_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; deu@e103100 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts index 72483e4749..00ac016a42 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts @@ -17,7 +17,6 @@ led-upgrade = &power_red; led-dsl = &internet_red; - led-usb = &umts; led-wifi = &wifi; }; @@ -78,6 +77,9 @@ umts: umts { label = "red:umts"; gpios = <&gpiomm 3 GPIO_ACTIVE_LOW>; + trigger-sources = <&ehci_port1>, + <&ehci_port2>, <&uhci_port2>; + linux,default-trigger = "usbport"; }; wifi: wifi { label = "red:wifi"; @@ -242,6 +244,30 @@ ralink,mtd-eeprom-swap; mtd-mac-address = <&boardconfig 0x16>; }; + + usb@0f,0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "pci1106,3038"; + reg = <0x7800 0 0 0 0>; /* :00:0f.0: UHCI Host Controller */ + + uhci_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; + }; + }; + + usb@0f,2 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "pci1106,3038"; + reg = <0x7a00 0 0 0 0>; /* :00:0f.2: EHCI Host Controller*/ + + ehci_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; + }; + }; }; &usb_phy { -- 2.25.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH] lantiq: vr9: set the usb led trigger via devicetree
2/16/21 10:51 PM, Adrian Schmutzler: Hi, -Original Message- From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf Of Mathias Kresin Sent: Dienstag, 16. Februar 2021 19:35 To: openwrt-devel@lists.openwrt.org Subject: [PATCH] lantiq: vr9: set the usb led trigger via devicetree Assign the usbdev trigger via devicetree and drop the userspace handling of the usb leds. Nice. This should allow to drop the relevant lines from xrx200/base-files/etc/board.d/01_leds as well. Best Adrian Good point. Will send a v2. Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH v2] lantiq: vr9: set the usb led trigger via devicetree
Assign the usbdev trigger via devicetree and drop the userspace handling of the usb leds. Drop the now unused userspace helper code as well. Signed-off-by: Mathias Kresin --- Changes in v2: - drop the now unused userspace helper code .../files/arch/mips/boot/dts/lantiq/vr9.dtsi | 14 ++ .../mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi | 12 +++- .../mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi | 10 ++ .../mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi | 7 +++ .../boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts | 13 ++--- .../lantiq/xrx200/base-files/etc/board.d/01_leds | 6 -- 6 files changed, 36 insertions(+), 26 deletions(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi index 60f7f7a4c0..85c584c1f1 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi @@ -409,6 +409,8 @@ }; usb0: usb@e101000 { + #address-cells = <1>; + #size-cells = <0>; status = "disabled"; compatible = "lantiq,xrx200-usb"; reg = <0xe101000 0x1000 @@ -418,9 +420,16 @@ dr_mode = "host"; phys = <&usb_phy0>; phy-names = "usb2-phy"; + + ehci_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; usb1: usb@e106000 { + #address-cells = <1>; + #size-cells = <0>; status = "disabled"; compatible = "lantiq,xrx200-usb"; reg = <0xe106000 0x1000>; @@ -429,6 +438,11 @@ dr_mode = "host"; phys = <&usb_phy1>; phy-names = "usb2-phy"; + + ehci_port2: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; }; eth0: eth@e108000 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi index f5b0b4f2a1..9cac3e6ec0 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi @@ -15,9 +15,6 @@ led-failsafe = &power; led-running = &power; led-upgrade = &power; - - led-usb = &led_usb1; - led-usb2 = &led_usb2; }; memory@0 { @@ -64,13 +61,18 @@ label = "green:fxo"; gpios = <&stp 19 GPIO_ACTIVE_HIGH>; }; - led_usb1: usb1 { + usb1 { label = "green:usb1"; gpios = <&stp 18 GPIO_ACTIVE_HIGH>; + trigger-sources = <&ehci_port1>; + linux,default-trigger = "usbport"; }; - led_usb2: usb2 { + + usb2 { label = "green:usb2"; gpios = <&stp 15 GPIO_ACTIVE_HIGH>; + trigger-sources = <&ehci_port2>; + linux,default-trigger = "usbport"; }; sd { label = "green:sd"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi index aa6c308ffe..d33b817f2d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi @@ -18,8 +18,6 @@ led-dsl = &led_dsl; led-internet = &led_internet; led-wifi = &led_wifi; - led-usb = &led_usb0; - led-usb2 = &led_usb2; }; memory@0 { @@ -67,14 +65,18 @@ gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; }; - led_usb0: usb0 { + usb0 { label = "green:usb"; gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; +
Re: [PATCH] ltq-vdsl-app: fix -Wundef warnings
2/16/21 10:54 PM, Adrian Schmutzler: Hi, -Original Message- From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf Of Mathias Kresin Sent: Dienstag, 16. Februar 2021 19:35 To: openwrt-devel@lists.openwrt.org Subject: [PATCH] ltq-vdsl-app: fix -Wundef warnings The following warnings are shown during build: /usr/include/vdsl/cmv_message_format.h:33:6: warning: "MEI_SUPPORT_DEBUG_STREAMS" is not defined, evaluates to 0 [-Wundef] #if (MEI_SUPPORT_DEBUG_STREAMS == 1) ^ /usr/include/vdsl/drv_mei_cpe_interface.h:2256:6: warning: "MEI_SUPPORT_OPTIMIZED_FW_DL" is not defined, evaluates to 0 [- Wundef] #if (MEI_SUPPORT_OPTIMIZED_FW_DL == 1) ^~~ The headers are provided by the MEI driver, but the defines are never set by the vdsl app. While the struct with the MEI_SUPPORT_OPTIMIZED_FW_DL conditional isn't used by the vdsl app, however CMV_USED_PAYLOAD_8BIT_SIZE which value depends on MEI_SUPPORT_DEBUG_STREAMS is. Since the MEI driver doesn't provide an autogenerated header with compile flags, the flags are hardcoded for the vdsl app. Set them for the MEI driver as well, to indicate a relation to the values used for the vdsl app and to be not surprised by a changed default in case the MEI driver gets updated. Use the current default values defined in the MEI driver. does this need PKG_RELEASE bump or is it really limited to altering compilation parameters? The change is limited to compile parameters without an intended change. But due to > ... isn't used by the vdsl app, however CMV_USED_PAYLOAD_8BIT_SIZE > which value depends on MEI_SUPPORT_DEBUG_STREAMS is a different binary is produced. I still tend to not bump the PKG_RELEASE but let me hear what you think about it. Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH] lantiq: ARV752DPW22: set the usb led trigger via devicetree
2/19/21 2:17 PM, Adrian Schmutzler: -Original Message- From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf Of Mathias Kresin Sent: Dienstag, 16. Februar 2021 19:35 To: openwrt-devel@lists.openwrt.org Subject: [PATCH] lantiq: ARV752DPW22: set the usb led trigger via devicetree Assign the usbdev trigger via devicetree and drop the userspace handling of the usb leds Add the PCI attached usb controller as trigger sources for the usb led as well. Any chance to convert the other danube devices as well, so we get rid of all userspace usb LEDs here as well? I decided against touching the other danube boards. I only have one danube board exposing the usb port and no idea whether the hardware configuration used by my board is common for all danube boards. Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH v2 2/2] ramips: use partition parser on Netgear CHJ/BZV
2/25/21 9:18 PM, Jan Hoffmann: This patch makes use of the Sercomm partition table parser on some Netgear routers. This applies to the boards CHJ (R6260, R6350, R6850, WAC124) and BZV (R6800, R6700-v2, R7200, Nighthawk AC2400). On these models, each device has an individual partition table that takes into account bad blocks that existed during manufacturing. Thus the partition table needs to be parsed for the device to work correctly. A typical issue that occurs otherwise is degraded wireless performance, when the calibration data cannot be found at the expected offset. Signed-off-by: Jan Hoffmann --- .../dts/mt7621_netgear_sercomm_bzv.dtsi | 169 +- .../dts/mt7621_netgear_sercomm_chj.dtsi | 169 +- target/linux/ramips/mt7621/config-5.4 | 1 + 3 files changed, 331 insertions(+), 8 deletions(-) diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi index 71c95e75bd..044f6e9696 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -213,47 +213,208 @@ status = "okay"; partitions { - compatible = "fixed-partitions"; + compatible = "sercomm,sc-partitions", "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "u-boot"; reg = <0x0 0x10>; + scpart-id = <0>; read-only; }; partition@10 { label = "SC PART_MAP"; reg = <0x10 0x10>; + scpart-id = <1>; read-only; }; partition@20 { label = "kernel"; reg = <0x20 0x40>; + scpart-id = <2>; }; partition@60 { label = "ubi"; reg = <0x60 0x280>; + scpart-id = <3>; }; partition@2e0 { - label = "reserved0"; - reg = <0x2e0 0x180>; + label = "English UI"; + reg = <0x2e0 0x20>; + scpart-id = <4>; + read-only; + }; + + partition@300 { + label = "ML1"; + reg = <0x300 0x20>; + scpart-id = <5>; + read-only; + }; + + partition@320 { + label = "ML2"; + reg = <0x320 0x20>; + scpart-id = <6>; + read-only; + }; + + partition@340 { + label = "ML3"; + reg = <0x340 0x20>; + scpart-id = <7>; + read-only; + }; + + partition@360 { + label = "ML4"; + reg = <0x360 0x20>; + scpart-id = <8>; + read-only; + }; + + partition@380 { + label = "ML5"; + reg = <0x380 0x20>; + scpart-id = <9>; + read-only; + }; + + partition@3a0 { + label = "ML6"; + reg = <0x3a0 0x20>; + scpart-id = <10>; + read-only; + }; + + partition@3c0 { + label = "ML7"; + reg = <0x3c0 0x20>; + scpart-id = <11>; + read-only; + }; + + partition@3e0 { + label = "ML8"; + reg = <0x3e0 0x20>; + scpart-id = <12>; + read-only; + }; + + partition@400 { + label = "ML9"; + reg = <0x400 0x20>; + scpart-id = <13>; + read-only; + }; + + partition@420 { + label = "ML10"; + reg = <0x420 0x20>; + scpart-id = <14>; + read-only; + }; + + partition@440 { + label = "ML11"; + reg = <0x440 0x20>; + scpart-id = <15>; read-only; };
[OpenWrt-Devel] TP-Link v3 header format description
Hey Weijie Gao, 2015-08-05 20:07 GMT+02:00 Weijie Gao : > This patch adds header version 2 option for mktplinkfw. As long as we talk about the same, the new header version is v3. The v2 header is already covered by mktplinkfw2.c. Currently, I'm working on the same topic. Everything that is known so far about the new v3 header is documented in Martins repository: https://github.com/xdarklight/mktplinkfw3/blob/master/README.md (please take care of the not yet merged pull request). Maybe you can confirm/deny what I figured out so far or add missing informations. It would be nice, if you (or anyone else) can extend your v3 header creation patch, using the provided informations. It should be possible the write the complete verification part (-i option). For the creation part, (only) the private key from tp-link is missing. > The version 2 header is used for AR/QCA firmwares and is not the same as > the header generated by mktplinkfw2. > Instead, it is nearly the same as version 1 header except for the header > version and the RSA signature. > > The header version 2 support is used for newer TP-Link routers which have > only a 64kb bootloader part, e.g. TL-WDR6500 v2. > --- > tools/firmware-utils/src/mktplinkfw.c | 25 + > 1 file changed, 21 insertions(+), 4 deletions(-) IMHO the v3 header is an extension of the v2 header, since TP-Link switched from v2 to v3 on already deployed devices like the TD-W8980v1. That's why *I* would prefer to either create a mktplinkfw3.c or add the required the changes to mktplinkfw2.c. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] TP-Link v3 header format description
Am 14.08.2015 um 04:39 schrieb Yousong Zhou: Never played with tplink's v3 header. But I found on other devices that the RSA2048-SHA1 implementation there was flawed in that it used pubkeys from firmwares to verifying signatures. Hmm, is it possible that this v3 header from tplink also has such vulnerability? Unfortunately, the pubkey isn't stored along with the signature in the firmware update file. The pubkey is read from the file lib/libcmm.so of the running firmware during image validation. Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq DSL drivers / firmware info
Am 24.07.2015 um 01:20 schrieb Martin Blumenstingl: On Fri, Jul 24, 2015 at 1:00 AM, Aleksander Wałęski wrote: Actually, it just dawned on me that they can be doing just that. In the bootloader. This is the only part of firmware we are not changing. If PCBs turn out to be identical we might want to check this. That was my first guess, but I am using the open source u-boot version on the BT Home Hub 5A (= Annex A device) and it still refuses to connect to Annex B (at least back when I tried last, I switched to VDSL like two months ago). I can confirm that it is unrelated to the bootloader. I crossflashed my Annex A W8980v1 with the W9980B (Annex B) firmware. During crossflash, the bootloader is updated as well. Afterwards, I do get exactly the same error message as Andre: xDSL Leave SHOWTIME!! DSL_CPE: Wrong combination of DSL PHY Firmware and hybrid type used! Please change one of it. nReturn=0 nData="E843 0003 0001 0009 " nReturn=0 nData="5048 0001 " nReturn=0 nData="1762 0001 " I did not connected the device to an Annex B ADSL line yet, but I guess the result will be the same. Furthermore, I replaced the content of mtd4@f200 (@f100 is the device mac address stored) and mtd5 with a bunch of 0x11, to test for a magic value, that is read from there. U-boot replaces the content of mtd5 with the ddr params right after reboot and neither the error message changes if a W9980B firmware is booted, nor an error message appears if a W9980 firmware is booted. The content of mtd6 seams to be unrelated to me, since it contains the ath calibration data. I share Daniels guess, that there could be a resistor, which locks the VRX208 to Annex A/Annex B ADSL mode. As already mentioned, it's unrelated to VDSL. My Annex B VDSL line works with the W9980B (and properly W9980) firmware out of the box. If you can figure out where the boot_sel pins are (similar to [0] or [1]) to get it into CFG04 mode (= boot via UART) then I can add a patch for Daniel Schwierzeck's open source lantiq u-boot. But be aware: you need to pull some of them HIGH (= 3.3V, *NOT* 5V) - you could damage your device by pulling the wrong pin HIGH. I found the location of the boot_sel pin and have updated the W8980v1 wiki page. Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: fix wrong parameter order in xway_nand driver
Signed-off-by: Mathias Kresin --- .../linux/lantiq/patches-4.4/0018-MTD-nand-lots-of-xrx200-fixes.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/patches-4.4/0018-MTD-nand-lots-of-xrx200-fixes.patch b/target/linux/lantiq/patches-4.4/0018-MTD-nand-lots-of-xrx200-fixes.patch index 5500861..31682bc 100644 --- a/target/linux/lantiq/patches-4.4/0018-MTD-nand-lots-of-xrx200-fixes.patch +++ b/target/linux/lantiq/patches-4.4/0018-MTD-nand-lots-of-xrx200-fixes.patch @@ -69,7 +69,7 @@ Signed-off-by: John Crispin + if (req_mask) { + if (cmd != NAND_CMD_STATUS) -+ ltq_ebu_w32(EBU_NAND_WAIT, 0); /* Clear nand ready */ ++ ltq_ebu_w32(0, EBU_NAND_WAIT); /* Clear nand ready */ + } + + -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: BTHOMEHUBV5A - explicit select the flash device
The stock u-boot doesn't disable unused flash banks. Therefore, the nand driver tries to initialize a not connected NOR flash and the device hangs on boot. Workaround the issue by selecting the second flash bank (NAND). Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts index 414d4bb..9283f62 100644 --- a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts +++ b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts @@ -28,7 +28,7 @@ compatible = "gen_nand", "lantiq,nand-xway"; lantiq,cs = <1>; bank-width = <2>; - reg = <0 0x0 0x200>; + reg = <0x1 0x0 0x200>; #address-cells = <1>; #size-cells = <1>; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: VGV7510KW22/VGV7519 update spi pinmux group
With the backport of the kernel 4.5 pinctrl-xway patches (3551609d & 826bca29) the pinmux group "spi" was splitted into "spi_di", "spi_do" & "spi_clk". But the no longer existing group "spi" is still used by some device tree source files. This fixes the detection of the wireless chipset of the VGV7510KW22. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/VGV7510KW22.dtsi | 2 +- target/linux/lantiq/dts/VGV7519.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/dts/VGV7510KW22.dtsi b/target/linux/lantiq/dts/VGV7510KW22.dtsi index c3722e9..e504dc2 100644 --- a/target/linux/lantiq/dts/VGV7510KW22.dtsi +++ b/target/linux/lantiq/dts/VGV7510KW22.dtsi @@ -74,7 +74,7 @@ lantiq,output = <1>; }; spi { - lantiq,groups = "spi"; + lantiq,groups = "spi_di", "spi_do", "spi_clk"; lantiq,function = "spi"; }; }; diff --git a/target/linux/lantiq/dts/VGV7519.dtsi b/target/linux/lantiq/dts/VGV7519.dtsi index 4a56114..95de6e5 100644 --- a/target/linux/lantiq/dts/VGV7519.dtsi +++ b/target/linux/lantiq/dts/VGV7519.dtsi @@ -53,7 +53,7 @@ lantiq,function = "stp"; }; spi { - lantiq,groups = "spi"; + lantiq,groups = "spi_di", "spi_do", "spi_clk"; lantiq,function = "spi"; }; mdio { -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed.
Am 21.04.2016 um 23:43 schrieb Vittorio Gambaletta (VittGam): After recent patches, the status LED on this router would stay switched off after boot is completed. A switched off status LED often indicates a boot failure (eg. kernel panic), so fix this and get back to the previous behaviour. NAK This change was intentional. Personally, I don't like the idea of using the WPS led as permanent (running) status led. I've never tried it, but I may be possible to use WPS with hostapd and show the status of the WPS action using the WPS led. I like to prevent such a double use of leds. The basic idea was to let the WPS led blink as long as the device boots and switch it off at the time the boot has finished. Which means an unsuccessful boot is indicated by a still blinking WPS led. Mathias Signed-off-by: Vittorio Gambaletta --- --- a/target/linux/lantiq/dts/TDW89X0.dtsi +++ b/target/linux/lantiq/dts/TDW89X0.dtsi @@ -8,6 +8,7 @@ /* the power led can't be controlled, use the wps led instead */ boot = &wps; failsafe = &wps; + running = &wps; dsl = &dsl; internet = &internet; ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/2] lantiq: Fix typo in LED diag script.
Am 21.04.2016 um 23:43 schrieb Vittorio Gambaletta (VittGam): Signed-off-by: Vittorio Gambaletta Acked-by: Mathias Kresin --- --- a/target/linux/lantiq/base-files/etc/diag.sh +++ b/target/linux/lantiq/base-files/etc/diag.sh @@ -25,7 +25,7 @@ ;; done) status_led_off - [ -n "$running" ] & { + [ -n "$running" ] && { status_led="$running" status_led_on } ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: fix brnImage build
Use the kernel with the appended dtb as base, otherwise the kernel will panic with "no dtb found". Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index c3cb48a..e63c134 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -37,7 +37,7 @@ define PatchKernelLzma endef define MkBrnImage - mkbrncmdline -i $(KDIR)/vmlinux-$(5) -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7) + mkbrncmdline -i $(KDIR)/vmlinux-$(5).tmp -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7) $(call CompressLzma,$(KDIR)/vmlinux-$(5)-brn,$(KDIR)/vmlinux-$(5)-brn.lzma) mkbrnimg -s $(1) -m $(2) -p $(3) -o $(4) $(KDIR)/vmlinux-$(5)-brn.lzma $(KDIR)/root.$(6) endef -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/5] lantiq: new image build process - fix kernel entry address
Set the kernel entry address to the same value as it is used for the old image build build process. Fixes boot of uImages on VGV7510KW22NOR and others. Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index d863a91..4a358b5 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -11,7 +11,7 @@ JFFS2_BLOCKSIZE = 64k 128k 256k KERNEL_LOADADDR = 0x80002000 -KERNEL_ENTRY = 0x80a0 +KERNEL_ENTRY = 0x80002000 include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/5] lantiq: remove orphaned tp-link image build steps
Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 22 -- 1 file changed, 22 deletions(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index d78c035..6bad91b 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -51,11 +51,6 @@ define MkImageLzma -d $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/uImage-$(1)$(2) endef -define TPLinkImageLzma - mktplinkfw2 -c -B $(2) -s \ - -k $(KDIR)/vmlinux$(3)-$(1).lzma -o $(KDIR)/uImage-$(1)$(3) -endef - define MkImageEVA lzma2eva 0x80002000 0x80002000 $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/$(1)$(2).eva.prealign dd if=$(KDIR)/$(1)$(2).eva.prealign of=$(KDIR)/$(1)$(2).eva.align.64k bs=64k conv=sync @@ -115,12 +110,6 @@ define Image/BuildDGN3500B/squashfs endef -define Image/BuildTPLink/squashfs - mktplinkfw2 -B $(3) -s -a 0x4 -j \ - -k $(KDIR)/vmlinux-$(2).lzma -r $(KDIR)/root.$(1) \ - -o $(BIN_DIR)/$(IMG_PREFIX)-$(2)-sysupgrade.image -endef - define Image/BuildEVA/squashfs cat $(KDIR)/$(2).eva.align.64k $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva) @@ -247,17 +236,6 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) endif endef -define Image/BuildKernelTPLink/Template - $(call PatchKernelLzma,$(1)) - $(call TPLinkImageLzma,$(1),$(2)) - $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) - $(call PatchKernelLzma,$(1),-initramfs) - $(call TPLinkImageLzma,$(1),$(2),-initramfs) - $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs -endif -endef - define Image/BuildKernelEVA/Template $(call PatchKernelLzma,$(1)) $(call MkImageEVA,$(1)) -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/5] lantiq: build sysupgrade images for lantiqImage
Tested with VGV7510KW22NOR. Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 4a358b5..d78c035 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -301,6 +301,8 @@ define Device/Default FILESYSTEMS := squashfs DEVICE_PROFILE := DEVICE_DTS := + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs endef DEVICE_VARS += BOARD_ID DEVICE_PROFILE DEVICE_DTS -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/5] add a no dict version of lzma to new image build code
Required to compress kernels in a brnboot compatible way. Signed-off-by: Mathias Kresin --- include/image.mk | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/image.mk b/include/image.mk index 7c11aa1..bc383e6 100644 --- a/include/image.mk +++ b/include/image.mk @@ -336,7 +336,11 @@ define Build/fit endef define Build/lzma - $(STAGING_DIR_HOST)/bin/lzma e $@ -lc1 -lp2 -pb2 $(1) $@.new + $(call Build/lzma-no-dict,-lc1 -lp2 -pb2 $(1)) +endef + +define Build/lzma-no-dict + $(STAGING_DIR_HOST)/bin/lzma e $@ $(1) $@.new @mv $@.new $@ endef -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 5/5] lantiq: use new image build process for brnImages
LZMA compress the kernel without dictionary, otherwise brnboot fails to uncompress the kernel. The filesystem parameter of mkbrncmdline was dropped since the used filesystem isn't exported in the kernel build step and at least in my tests everything works without the parameter. If the parameter is required for some reason, the static keyword "squashfs" can be used. Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 42 +- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 6bad91b..f779a1b 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -39,12 +39,6 @@ define PatchKernelLzma $(call CompressLzma,$(KDIR)/vmlinux$(2)-$(1).tmp,$(KDIR)/vmlinux$(2)-$(1).lzma) endef -define MkBrnImage - mkbrncmdline -i $(KDIR)/vmlinux-$(5) -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7) - $(call CompressLzma,$(KDIR)/vmlinux-$(5)-brn,$(KDIR)/vmlinux-$(5)-brn.lzma) - mkbrnimg -s $(1) -m $(2) -p $(3) -o $(4) $(KDIR)/vmlinux-$(5)-brn.lzma $(KDIR)/root.$(6) -endef - define MkImageLzma mkimage -A mips -O linux -T kernel -a 0x80002000 -C lzma \ -e 0x80002000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \ @@ -61,7 +55,6 @@ endef define Image/Build/squashfs cat $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image) - $(if $(3),$(call MkBrnImage,$(3),$(4),$(5),$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-brnImage,$(2),$(1),$(6))) endef define Image/BuildNAND/squashfs @@ -268,6 +261,14 @@ define Build/mktplinkfw2 -o $@ endef +define Build/mkbrncmdline + mkbrncmdline -i $@ -o $@.new BRN-BOOT + mv $@.new $@ +endef + +define Build/mkbrnimg + mkbrnimg -s $(SIGNATURE) -m $(MAGIC) -p $(CRC32_POLY) -o $@ $(word 1,$^) $(word 2,$^) +endef # Shared device definition: applies to every defined device define Device/Default @@ -291,6 +292,13 @@ define Device/lantiqTpLink IMAGE/tplink := mktplinkfw2 endef +define Device/lantiqBrnImage + KERNEL := kernel-bin | append-dtb | mkbrncmdline | lzma-no-dict + IMAGES := factory.bin + IMAGE/factory.bin := mkbrnimg +endef +DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY + define lantiqTpLink define Device/$(1) $$(Device/lantiqTpLink) @@ -310,6 +318,17 @@ define lantiqImage TARGET_DEVICES += $(1) endef +define lantiqBrnImage + define Device/$(1) +$$(Device/lantiqBrnImage) +DEVICE_PROFILE := $(1) +DEVICE_DTS := $(1) +SIGNATURE := $(2) +MAGIC := $(3) +CRC32_POLY := $(4) + endef + TARGET_DEVICES += $(1) +endef ifeq ($(CONFIG_TARGET_lantiq_falcon),y) @@ -404,14 +423,9 @@ $(eval $(call lantiqTpLink,TDW8970,TD-W8970v1)) $(eval $(call lantiqTpLink,TDW8980,TD-W8980v1)) $(eval $(call lantiqTpLink,VR200v,ArcherVR200V)) $(eval $(call lantiqImage,VGV7510KW22NOR)) - -Image/BuildKernel/Profile/VGV7510KW22BRN=$(call Image/BuildKernel/Template,VGV7510KW22BRN,$(1)) -Image/Build/Profile/VGV7510KW22BRN=$(call Image/Build/$(1),$(1),VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7,$(1)) - +$(eval $(call lantiqBrnImage,VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7)) $(eval $(call lantiqImage,VGV7519NOR)) - -Image/BuildKernel/Profile/VGV7519BRN=$(call Image/BuildKernel/Template,VGV7519BRN,$(1)) -Image/Build/Profile/VGV7519BRN=$(call Image/Build/$(1),$(1),VGV7519BRN,5D8000,0x12345678,0x2083b8ed,$(1)) +$(eval $(call lantiqBrnImage,VGV7519BRN,5D8000,0x12345678,0x2083b8ed)) define Image/Prepare $(call Image/Prepare/Profile,$(PROFILE)) -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] lantiq: use the same functionality for all ethernet phys led
The VGV7510KW22 has the leds for LAN1-3 connected to pin1 of the phys and the led for LAN4 connect to pin0 of the phy. This results with the current configuration in a fast flashing LAN4 led as soon as a network cable is connected. Something similar was reported in the forum[1] for the VGV7519 as well. Since it isn't predicable to which pin a (single) phy led is connected, use the (default) pin1 functionality Constant On: 10/100/1000MBit Blink Fast: None Blink Slow: None Pulse: TX/RX for all ethernet phy leds. After checking pictures of all vr9 boards, it looks like only the VG3503J has more than one led connected per phy. Using the phy led device tree bindings to assign the functionality to the "additional" leds, the VG3503J phy leds should behave as before. Signed-off-by: Mathias Kresin [1] https://forum.openwrt.org/viewtopic.php?pid=321523 --- I know there is a fourth led functionality register (led3h/led3l), but to my knowledge only three pins to connect leds to. Can someone (with access to the datasheets) enlighten me whats the registered is used for? target/linux/lantiq/dts/VG3503J.dtsi | 8 .../0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch | 12 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/target/linux/lantiq/dts/VG3503J.dtsi b/target/linux/lantiq/dts/VG3503J.dtsi index a45e90b..5ee0a5e 100644 --- a/target/linux/lantiq/dts/VG3503J.dtsi +++ b/target/linux/lantiq/dts/VG3503J.dtsi @@ -153,10 +153,18 @@ phy11: ethernet-phy@11 { reg = <0x11>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; + lantiq,led0h = <0x42> + lantiq,led0l = <0x10> + lantiq,led2h = <0x20> + lantiq,led2l = <0x00> }; phy13: ethernet-phy@13 { reg = <0x13>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; + lantiq,led0h = <0x42> + lantiq,led0l = <0x10> + lantiq,led2h = <0x20> + lantiq,led2l = <0x00> }; }; }; diff --git a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch index 738a248..93bb427 100644 --- a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch +++ b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch @@ -165,14 +165,14 @@ Signed-off-by: John Crispin + + vr9_gphy_mmd_write(phydev, 0x1e0, 0xc5); + vr9_gphy_mmd_write(phydev, 0x1e1, 0x67); -+ vr9_gphy_mmd_write(phydev, 0x1e2, 0x42); -+ vr9_gphy_mmd_write(phydev, 0x1e3, 0x10); ++ vr9_gphy_mmd_write(phydev, 0x1e2, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e3, 0x03); + vr9_gphy_mmd_write(phydev, 0x1e4, 0x70); + vr9_gphy_mmd_write(phydev, 0x1e5, 0x03); -+ vr9_gphy_mmd_write(phydev, 0x1e6, 0x20); -+ vr9_gphy_mmd_write(phydev, 0x1e7, 0x00); -+ vr9_gphy_mmd_write(phydev, 0x1e8, 0x40); -+ vr9_gphy_mmd_write(phydev, 0x1e9, 0x20); ++ vr9_gphy_mmd_write(phydev, 0x1e6, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e7, 0x03); ++ vr9_gphy_mmd_write(phydev, 0x1e8, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e9, 0x03); + + vr9_gphy_of_reg_init(phydev); + -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] lantiq: fix minor typos in 11G/22F phy driver
Signed-off-by: Mathias Kresin --- .../patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch index 191ccf2..738a248 100644 --- a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch +++ b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch @@ -20,7 +20,7 @@ Signed-off-by: John Crispin +config LANTIQ_PHY + tristate "Driver for Lantiq PHYs" + ---help--- -+Supports the 11G and 22E PHYs. ++Supports the 11G and 22F PHYs. + config FIXED_PHY tristate "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" @@ -378,7 +378,7 @@ Signed-off-by: John Crispin += + +Field BitsTypeDescription -+FBC 7:6 RW Fast Blink Frequency ++FBF 7:6 RW Fast Blink Frequency + --- + 0x0 (00b) F02HZ 2 Hz blinking frequency + 0x1 (01b) F04HZ 4 Hz blinking frequency -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 2/2] lantiq: use the same functionality for all ethernet phys led
The VGV7510KW22 has the leds for LAN1-3 connected to pin1 of the phys and the led for LAN4 connect to pin0 of the phy. This results with the current configuration in a fast flashing LAN4 led as soon as a network cable is connected. Something similar was reported on the forum[1] for the VGV7519 as well. Since it isn't predicable to which pin a (single) phy led is connected, use the (default) pin1 functionality Constant On: 10/100/1000MBit Blink Fast: None Blink Slow: None Pulse: TX/RX for all ethernet phy leds. After checking pictures of all vr9 boards, it looks like only the VG3503J has more than one led connected per phy. Using the phy led device tree bindings to assign the functionality to the "additional" leds, the VG3503J phy leds should behave as before. Signed-off-by: Mathias Kresin [1] https://forum.openwrt.org/viewtopic.php?pid=321523 --- Changes in v2: - fix syntax error in VG3503J.dtsi I know there is a fourth led functionality register (led3h/led3l), but to my knowledge only three pins to connect leds to. Can someone (with access to the datasheets) enlighten me what's the register is used for? --- target/linux/lantiq/dts/VG3503J.dtsi | 8 .../0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch | 12 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/target/linux/lantiq/dts/VG3503J.dtsi b/target/linux/lantiq/dts/VG3503J.dtsi index a45e90b..780d838 100644 --- a/target/linux/lantiq/dts/VG3503J.dtsi +++ b/target/linux/lantiq/dts/VG3503J.dtsi @@ -153,10 +153,18 @@ phy11: ethernet-phy@11 { reg = <0x11>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; + lantiq,led0h = <0x42>; + lantiq,led0l = <0x10>; + lantiq,led2h = <0x20>; + lantiq,led2l = <0x00>; }; phy13: ethernet-phy@13 { reg = <0x13>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; + lantiq,led0h = <0x42>; + lantiq,led0l = <0x10>; + lantiq,led2h = <0x20>; + lantiq,led2l = <0x00>; }; }; }; diff --git a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch index 738a248..93bb427 100644 --- a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch +++ b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch @@ -165,14 +165,14 @@ Signed-off-by: John Crispin + + vr9_gphy_mmd_write(phydev, 0x1e0, 0xc5); + vr9_gphy_mmd_write(phydev, 0x1e1, 0x67); -+ vr9_gphy_mmd_write(phydev, 0x1e2, 0x42); -+ vr9_gphy_mmd_write(phydev, 0x1e3, 0x10); ++ vr9_gphy_mmd_write(phydev, 0x1e2, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e3, 0x03); + vr9_gphy_mmd_write(phydev, 0x1e4, 0x70); + vr9_gphy_mmd_write(phydev, 0x1e5, 0x03); -+ vr9_gphy_mmd_write(phydev, 0x1e6, 0x20); -+ vr9_gphy_mmd_write(phydev, 0x1e7, 0x00); -+ vr9_gphy_mmd_write(phydev, 0x1e8, 0x40); -+ vr9_gphy_mmd_write(phydev, 0x1e9, 0x20); ++ vr9_gphy_mmd_write(phydev, 0x1e6, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e7, 0x03); ++ vr9_gphy_mmd_write(phydev, 0x1e8, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e9, 0x03); + + vr9_gphy_of_reg_init(phydev); + -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 1/2] lantiq: fix minor typos in 11G/22F phy driver
Signed-off-by: Mathias Kresin --- .../patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch index 191ccf2..738a248 100644 --- a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch +++ b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch @@ -20,7 +20,7 @@ Signed-off-by: John Crispin +config LANTIQ_PHY + tristate "Driver for Lantiq PHYs" + ---help--- -+Supports the 11G and 22E PHYs. ++Supports the 11G and 22F PHYs. + config FIXED_PHY tristate "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" @@ -378,7 +378,7 @@ Signed-off-by: John Crispin += + +Field BitsTypeDescription -+FBC 7:6 RW Fast Blink Frequency ++FBF 7:6 RW Fast Blink Frequency + --- + 0x0 (00b) F02HZ 2 Hz blinking frequency + 0x1 (01b) F04HZ 4 Hz blinking frequency -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: VG3503J - use the same PHY led functionality as the OEM firmware
Based on the vg3503j_gphy_led.sh script published in the VG3503J wiki article, the OEM Firmware uses the following PHY led functionality: gphy led 0: LINK/ACTIVITY gphy led 1: LINK gphy led 2: ACTIVITY Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/VG3503J.dtsi | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/linux/lantiq/dts/VG3503J.dtsi b/target/linux/lantiq/dts/VG3503J.dtsi index 780d838..62a336c 100644 --- a/target/linux/lantiq/dts/VG3503J.dtsi +++ b/target/linux/lantiq/dts/VG3503J.dtsi @@ -153,18 +153,18 @@ phy11: ethernet-phy@11 { reg = <0x11>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; - lantiq,led0h = <0x42>; - lantiq,led0l = <0x10>; - lantiq,led2h = <0x20>; - lantiq,led2l = <0x00>; + lantiq,led1h = <0x70>; + lantiq,led1l = <0x00>; + lantiq,led2h = <0x00>; + lantiq,led2l = <0x03>; }; phy13: ethernet-phy@13 { reg = <0x13>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; - lantiq,led0h = <0x42>; - lantiq,led0l = <0x10>; - lantiq,led2h = <0x20>; - lantiq,led2l = <0x00>; + lantiq,led1h = <0x70>; + lantiq,led1l = <0x00>; + lantiq,led2h = <0x00>; + lantiq,led2l = <0x03>; }; }; }; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] lantiq: VGV7510KW22BRN - set the phy clock source
VGV7510KW2 with VRX288 v1.2 has brnboot 1.8 installed. Starting with this brnboot version, the "GPHY Clock Source" isn't set anymore by brnboot, with the result that xrx200-net fails to probe/initialize the phys. Use the phy clock source device tree binding to specify the clock source. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/VGV7510KW22BRN.dts | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/linux/lantiq/dts/VGV7510KW22BRN.dts b/target/linux/lantiq/dts/VGV7510KW22BRN.dts index 1880c8c..d7c6b51 100644 --- a/target/linux/lantiq/dts/VGV7510KW22BRN.dts +++ b/target/linux/lantiq/dts/VGV7510KW22BRN.dts @@ -3,6 +3,12 @@ /include/ "VGV7510KW22.dtsi" / { + sram@1F00 { + cgu@103000 { + lantiq,phy-clk-src = <0x2>; + }; + }; + fpi@1000 { localbus@0 { nor-boot@0 { -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] lantiq: add device tree binding for the phy clock source
Signed-off-by: Mathias Kresin --- ...x200-add-gphy-clk-src-device-tree-binding.patch | 26 ++ 1 file changed, 26 insertions(+) create mode 100644 target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch diff --git a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch new file mode 100644 index 000..7a4d239 --- /dev/null +++ b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch @@ -0,0 +1,26 @@ +--- a/arch/mips/lantiq/xway/sysctrl.c b/arch/mips/lantiq/xway/sysctrl.c +@@ -426,6 +426,8 @@ static void clkdev_add_clkout(void) + /* bring up all register ranges that we need for basic system control */ + void __init ltq_soc_init(void) + { ++ int ret; ++ u32 phy_clk_src, ifcc; + struct resource res_pmu, res_cgu, res_ebu; + struct device_node *np_pmu = + of_find_compatible_node(NULL, NULL, "lantiq,pmu-xway"); +@@ -608,4 +610,14 @@ void __init ltq_soc_init(void) + + if (of_machine_is_compatible("lantiq,vr9")) + xbar_fpi_burst_disable(); ++ ++ if (np_cgu) { ++ ret = of_property_read_u32(np_cgu, "lantiq,phy-clk-src", ++ &phy_clk_src); ++ ++ if (!ret) { ++ ifcc = ltq_cgu_r32(ifccr) & ~(0x1c); ++ ltq_cgu_w32(ifcc | (phy_clk_src << 2), ifccr); ++ } ++ } + } -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: use sysupgrade.bin postfix for tplink images
Use the same name for TP-Link images as it was with the old image build code. Move the BOARD_ID export to the TP-Link image build recipe, to indicate that the variable is only related in this context. Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index f779a1b..033dcc3 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -283,14 +283,15 @@ define Device/Default IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs endef -DEVICE_VARS += BOARD_ID DEVICE_PROFILE DEVICE_DTS +DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS define Device/lantiqTpLink KERNEL := kernel-bin | append-dtb | lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-fw - IMAGES := tplink - IMAGE/tplink := mktplinkfw2 + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := mktplinkfw2 endef +DEVICE_VARS += BOARD_ID define Device/lantiqBrnImage KERNEL := kernel-bin | append-dtb | mkbrncmdline | lzma-no-dict -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/3] lantiq: move partitions into partion table node
Starting with kernel 4.4, the use of partitions as direct subnodes of the mtd device is discouraged and only supported for backward compatiblity reasons. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ACMP252.dts| 67 +++--- target/linux/lantiq/dts/ARV4510PW.dts | 36 +-- target/linux/lantiq/dts/ARV4518PWR01.dtsi | 48 ++-- target/linux/lantiq/dts/ARV4519PW.dts | 46 ++-- target/linux/lantiq/dts/ARV4520PW.dts | 48 ++-- target/linux/lantiq/dts/ARV4525PW.dts | 48 ++-- target/linux/lantiq/dts/ARV452CQW.dts | 48 ++-- target/linux/lantiq/dts/ARV7510PW22.dts| 48 ++-- target/linux/lantiq/dts/ARV7518PW.dts | 46 ++-- target/linux/lantiq/dts/ARV7519PW.dts | 46 ++-- target/linux/lantiq/dts/ARV7519RW22.dts| 48 ++-- target/linux/lantiq/dts/ARV7525PW.dts | 48 ++-- target/linux/lantiq/dts/ARV752DPW.dts | 48 ++-- target/linux/lantiq/dts/ARV752DPW22.dts| 42 ++-- target/linux/lantiq/dts/ARV8539PW22.dts| 345 +++-- target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 87 target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 56 ++--- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 48 ++-- target/linux/lantiq/dts/DGN1000B.dts | 60 ++--- target/linux/lantiq/dts/DGN3500.dtsi | 42 ++-- target/linux/lantiq/dts/EASY50712.dts | 42 ++-- target/linux/lantiq/dts/EASY50810.dts | 42 ++-- target/linux/lantiq/dts/EASY80920.dtsi | 52 +++-- target/linux/lantiq/dts/EASY80920NAND.dts | 28 ++- target/linux/lantiq/dts/EASY80920NOR.dts | 28 ++- target/linux/lantiq/dts/FRITZ3370.dts | 52 +++-- target/linux/lantiq/dts/FRITZ7320.dts | 48 ++-- target/linux/lantiq/dts/GIGASX76X.dts | 32 +-- target/linux/lantiq/dts/GR7000.dts | 36 +-- target/linux/lantiq/dts/H201L.dts | 36 +-- target/linux/lantiq/dts/P2601HNFX.dts | 36 +-- target/linux/lantiq/dts/P2812HNUF1.dts | 36 +-- target/linux/lantiq/dts/P2812HNUF3.dts | 30 ++- target/linux/lantiq/dts/TDW89X0.dtsi | 42 ++-- target/linux/lantiq/dts/VG3503J.dtsi | 82 +++ target/linux/lantiq/dts/VGV7510KW22.dtsi | 14 +- target/linux/lantiq/dts/VGV7510KW22BRN.dts | 82 +++ target/linux/lantiq/dts/VGV7510KW22NOR.dts | 28 +-- target/linux/lantiq/dts/VGV7519BRN.dts | 32 +-- target/linux/lantiq/dts/VGV7519NOR.dts | 44 ++-- target/linux/lantiq/dts/VR200v.dts | 72 +++--- target/linux/lantiq/dts/WBMR.dts | 60 ++--- 42 files changed, 1253 insertions(+), 1006 deletions(-) diff --git a/target/linux/lantiq/dts/ACMP252.dts b/target/linux/lantiq/dts/ACMP252.dts index d7d5b32..06b21b6 100644 --- a/target/linux/lantiq/dts/ACMP252.dts +++ b/target/linux/lantiq/dts/ACMP252.dts @@ -29,38 +29,43 @@ #address-cells = <1>; #size-cells = <1>; - partition@0 { - label = "uboot"; - reg = <0x0 0x2>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "uboot"; + reg = <0x0 0x2>; + read-only; + }; + + partition@2 { + label = "uboot_env"; + reg = <0x2 0x2>; + }; + + partition@4 { + label = "boardconfig"; + reg = <0x4 0x6>; + read-only; + }; + + partition@a { + label = "firmware"; + reg = <0xa 0xf2>; + }; + + partition@fc { + label = "sysconfig"; + reg = <0xfc 0x4>; + }; + + partition@0x100 { +
[OpenWrt-Devel] [PATCH 3/3] lantiq: VGV7510KW22BRN - support dual-image
Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/VGV7510KW22BRN.dts | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/linux/lantiq/dts/VGV7510KW22BRN.dts b/target/linux/lantiq/dts/VGV7510KW22BRN.dts index 5f48323..f93249b 100644 --- a/target/linux/lantiq/dts/VGV7510KW22BRN.dts +++ b/target/linux/lantiq/dts/VGV7510KW22BRN.dts @@ -38,20 +38,23 @@ }; partition@c { + compatible = "brnboot,root-selector"; label = "Primary_Setting"; reg = <0xc 0x2>; read-only; }; partition@e { - label = "firmware"; /* "Code Image 0" in OFW */ + label = "Code_Image_0"; reg = <0xe 0x78>; + brnboot,root-id = <0x00>; read-only; }; partition@86 { label = "Code_Image_1"; reg = <0x86 0x78>; + brnboot,root-id = <0x01>; read-only; }; }; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/3] lantiq: handle the dual-firmware layout of brnboot
brnboot based devices can have two Image partitions. When flashing images via the brnboot recovery web interface, the Image partitions are written alternating. The current active Image partition is stored in the first byte of the Primary_Setting partition by using 0x00 for Code_Image_0 and 0x01 for Code_Image_1. By using the information about the active "Code Image", it is possible to ensure that the rootfs belongs to the current booted Image/Kernel. Signed-off-by: Mathias Kresin --- .../lantiq/patches-4.4/0101-find_active_root.patch | 93 ++ 1 file changed, 93 insertions(+) create mode 100644 target/linux/lantiq/patches-4.4/0101-find_active_root.patch diff --git a/target/linux/lantiq/patches-4.4/0101-find_active_root.patch b/target/linux/lantiq/patches-4.4/0101-find_active_root.patch new file mode 100644 index 000..978def3 --- /dev/null +++ b/target/linux/lantiq/patches-4.4/0101-find_active_root.patch @@ -0,0 +1,93 @@ +--- a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c +@@ -25,6 +25,38 @@ static bool node_has_compatible(struct d + return of_get_property(pp, "compatible", NULL); + } + ++static uint8_t * brnboot_get_selected_root_part(struct mtd_info *master, ++ loff_t offset) ++{ ++ static uint8_t root_id; ++ int err, len; ++ ++ err = mtd_read(master, offset, 0x01, &len, &root_id); ++ ++ if (mtd_is_bitflip(err) || !err) ++ return &root_id; ++ ++ return NULL; ++} ++ ++static void brnboot_set_active_root_part(struct mtd_partition *pparts, ++ struct device_node **part_nodes, ++ int nr_parts, ++ uint8_t *root_id) ++{ ++ int i; ++ ++ for (i = 0; i < nr_parts; i++) { ++ int part_root_id; ++ ++ if (!of_property_read_u32(part_nodes[i], "brnboot,root-id", &part_root_id) ++ && part_root_id == *root_id) { ++ pparts[i].name = "firmware"; ++ break; ++ } ++ } ++} ++ + static int parse_ofpart_partitions(struct mtd_info *master, + struct mtd_partition **pparts, + struct mtd_part_parser_data *data) +@@ -35,7 +67,8 @@ static int parse_ofpart_partitions(struc + struct device_node *pp; + int nr_parts, i, ret = 0; + bool dedicated = true; +- ++ uint8_t *proot_id = NULL; ++ struct device_node **part_nodes; + + if (!data) + return 0; +@@ -73,7 +106,9 @@ static int parse_ofpart_partitions(struc + return 0; + + *pparts = kzalloc(nr_parts * sizeof(**pparts), GFP_KERNEL); +- if (!*pparts) ++ part_nodes = kzalloc(nr_parts * sizeof(*part_nodes), GFP_KERNEL); ++ ++ if (!*pparts || !part_nodes) + return -ENOMEM; + + i = 0; +@@ -121,12 +156,22 @@ static int parse_ofpart_partitions(struc + if (of_get_property(pp, "lock", &len)) + (*pparts)[i].mask_flags |= MTD_POWERUP_LOCK; + ++ if (!proot_id && of_device_is_compatible(pp, "brnboot,root-selector")) ++ proot_id = brnboot_get_selected_root_part(master, (*pparts)[i].offset); ++ ++ part_nodes[i] = pp; ++ + i++; + } + + if (!nr_parts) + goto ofpart_none; + ++ if (proot_id) ++ brnboot_set_active_root_part(*pparts, part_nodes, nr_parts, proot_id); ++ ++ kfree(part_nodes); ++ + return nr_parts; + + ofpart_fail: +@@ -136,6 +181,7 @@ ofpart_fail: + ofpart_none: + of_node_put(pp); + kfree(*pparts); ++ kfree(part_nodes); + *pparts = NULL; + return ret; + } -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] lantiq: add device tree binding for the phy clock source
Signed-off-by: Mathias Kresin --- Changes in v2: - moved logic into its own function (no functional change) ...x200-add-gphy-clk-src-device-tree-binding.patch | 30 ++ 1 file changed, 30 insertions(+) create mode 100644 target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch diff --git a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch new file mode 100644 index 000..227d1cf --- /dev/null +++ b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch @@ -0,0 +1,30 @@ +--- a/arch/mips/lantiq/xway/sysctrl.c b/arch/mips/lantiq/xway/sysctrl.c +@@ -423,6 +423,20 @@ static void clkdev_add_clkout(void) + } + } + ++static void set_phy_clock_source(struct device_node *np_cgu) ++{ ++ u32 phy_clk_src, ifcc; ++ ++ if (!np_cgu) ++ return; ++ ++ if (of_property_read_u32(np_cgu, "lantiq,phy-clk-src", &phy_clk_src)) ++ return; ++ ++ ifcc = ltq_cgu_r32(ifccr) & ~(0x1c); ++ ltq_cgu_w32(ifcc | (phy_clk_src << 2), ifccr); ++} ++ + /* bring up all register ranges that we need for basic system control */ + void __init ltq_soc_init(void) + { +@@ -608,4 +622,6 @@ void __init ltq_soc_init(void) + + if (of_machine_is_compatible("lantiq,vr9")) + xbar_fpi_burst_disable(); ++ ++ set_phy_clock_source(np_cgu); + } -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] lantiq: VGV7510KW22BRN - set the phy clock source
VGV7510KW2 with VRX288 v1.2 has brnboot 1.8 installed. Starting with this brnboot version, the "GPHY Clock Source" isn't set anymore by brnboot, with the result that xrx200-net fails to probe/initialize the phys. Use the phy clock source device tree binding to specify the clock source. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/VGV7510KW22BRN.dts | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/linux/lantiq/dts/VGV7510KW22BRN.dts b/target/linux/lantiq/dts/VGV7510KW22BRN.dts index 1880c8c..d7c6b51 100644 --- a/target/linux/lantiq/dts/VGV7510KW22BRN.dts +++ b/target/linux/lantiq/dts/VGV7510KW22BRN.dts @@ -3,6 +3,12 @@ /include/ "VGV7510KW22.dtsi" / { + sram@1F00 { + cgu@103000 { + lantiq,phy-clk-src = <0x2>; + }; + }; + fpi@1000 { localbus@0 { nor-boot@0 { -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq: add support for ARV7506PW11 (Alice/O2 IAD 4421)
I got the same device last Weekend and planned to add support for this device during the next days. Glad to see that most of the work is already done. Find my remarks in-line. 2016-05-18 9:37 GMT+02:00 Oswald Buddenhagen : > Ethernet, WiFi, ADSL2+, and LEDS are fully functional. > > The RFkill switch doesn't appear to be correctly configured. > > Supporting the two TAE ports and SIP gateway was not attempted. > > The firmware image needs to be kept below ~3.6MiB due to brnboot's dual > image magic. This is just enough for the above configuration plus > dropbear. Luci and other non-critical packages must be installed into > the jffs2 once the device has booted. > > U-boot support was not attempted. I'll give it a try. Lately, I worked a lot with u-boot, so I'm confident that it shouldn't be that problem. But I need to identify the boot_sel pins first. I have looked at it only briefly and was only able to identify one of the boot_sel pins: R77. Unfortunately this pin alone doesn't switch the SoC to UART mode. Did you found already the other pins? > Signed-off-by: Oswald Buddenhagen > --- > .../linux/lantiq/base-files/etc/board.d/02_network | 8 + > .../etc/hotplug.d/firmware/10-rt2x00-eeprom| 2 +- > target/linux/lantiq/dts/ARV7506PW11.dts| 213 > + > target/linux/lantiq/image/Makefile | 2 + > target/linux/lantiq/xway/profiles/arv.mk | 12 ++ > 5 files changed, 236 insertions(+), 1 deletion(-) > create mode 100644 target/linux/lantiq/dts/ARV7506PW11.dts > > diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network > b/target/linux/lantiq/base-files/etc/board.d/02_network > index b27b802..1f06c26 100755 > --- a/target/linux/lantiq/base-files/etc/board.d/02_network > +++ b/target/linux/lantiq/base-files/etc/board.d/02_network > @@ -39,6 +39,14 @@ ACMP252|GIGASX76X) > "4:lan:1" "3:lan:2" "2:lan:3" "1:lan:4" "5t@eth0" > ;; > > +# rtl8306g > +ARV7506PW11) > + lan_mac=$(mtd_get_mac_binary board_config 22) > + wan_mac=$(macaddr_add "$lan_mac" 1) > + ucidef_add_switch "switch0" \ > + "4:lan:1" "3:lan:2" "2:lan:3" "1:lan:4" "5t@eth0" > + ;; > + > # ar8316 > ARV4519PW|ARV7510PW22|ARV7518PW|ARV752DPW22|ARV8539PW22) > ucidef_add_switch "switch0" \ > diff --git > a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom > b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom > index 5f1cb00..da10797 100644 > --- a/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom > +++ b/target/linux/lantiq/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom > @@ -35,7 +35,7 @@ case "$FIRMWARE" in > "RT2860.eeprom" ) > local board=$(lantiq_board_name) > case $board in > - ARV7510PW22|ARV7519PW|ARV752DPW|ARV752DPW22|VGV7519) > + ARV7506PW11|ARV7510PW22|ARV7519PW|ARV752DPW|ARV752DPW22|VGV7519) > rt2x00_eeprom_extract "board_config" 520 256 1 > ;; > ARV7525PW) > diff --git a/target/linux/lantiq/dts/ARV7506PW11.dts > b/target/linux/lantiq/dts/ARV7506PW11.dts > new file mode 100644 > index 000..bb9ffd4 > --- /dev/null > +++ b/target/linux/lantiq/dts/ARV7506PW11.dts > @@ -0,0 +1,213 @@ > +/dts-v1/; > + > +/include/ "danube.dtsi" > + > +/ { > + model = "ARV7506PW11 - Alice/O2 IAD 4421"; > + > + chosen { > + leds { > + boot = &power; > + failsafe = &power_red; > + running = &power; > + > + dsl = &dsl; > + internet = &internet; > + wifi = &wlan; > + }; > + }; > + > + memory@0 { > + reg = <0x0 0x400>; > + }; > + > + sram@1F00 { > + vmmc@107000 { > + status = "okay"; > + gpios = <&gpiomm 1 0>; > + }; > + }; > + > + fpi@1000 { > + localbus@0 { > + nor-boot@0 { > + compatible = "lantiq,nor"; > + bank-width = <2>; > + reg = <0 0x0 0x80>; > + > + partitions { > + compatible = "fixed-partitions"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + partition@0 { > + label = "brnboot"; > + reg = <0x0 0x2>; > + read-only; > + }; > + > + partition@2 { > + label = "stuff"; > +
Re: [OpenWrt-Devel] [PATCH] lantiq: add support for ARV7506PW11 (Alice/O2 IAD 4421)
2016-05-18 23:00 GMT+02:00 Oswald Buddenhagen : > On Wed, May 18, 2016 at 01:19:59PM +0200, Mathias Kresin wrote: >> But I need to identify the boot_sel pins first. I have looked at it >> only briefly and was only able to identify one of the boot_sel pins: >> R77. Unfortunately this pin alone doesn't switch the SoC to UART mode. >> Did you found already the other pins? >> > no, i didn't bother with analyzing the hardware beyond soft-probing the > gpios to find some led and button pins. the dts is a copy&paste job from > the wiki (which in turn is "derived" from another dts), with a lot of > studying and trial and error to get the bogus parts out of it, and some > polishing and adjustments to recent changes. I found the pins to enter UART boot mode. Apply 3,3V to the right side of R65 and GND to the right side of R80. R80 is partially hidden under the heatsink of the SoC. > i'll do that if you don't beat me to it (which you can easily do if you > plan to seriously work on this - beyond email, this is a limited weekend > project for me). From zero to working image in just a weekend. That is indeed amazing. > i think i also know why rfkill doesn't work: i forgot to change the > keycode when i decided to switch the key's usage from wps to rfkill. > (facepalm) That's something where I've a lack of knowledge. Where does the keycodes come from? In the meantime I've added support for this board to u-boot, switched from brnboot to uImage and to a custom partitions layout with a firmware partition of 8128 KByte. Means, your image shrinking patches aren't required any more. I've pushed all my patches to my github repro: https://github.com/mkresin/lede. All outlined ways to install u-boot in https://wiki.openwrt.org/toh/arcadyan/vgv7510kw22#booting_via_uart should work for this device as well. Neither the u-boot nor the partition layout should considered as final versions. I've noticed that danube u-boots are tripple the size as they were with OpenWrt 12.09. I need to check this first. I haven't had a closer look to the OpenWrt image, but what I've noticed so far, is a not lit up WLAN led when the wireless is enabled. Does it work for you? Do you plan to work further on this patch or do you consider your weekend project as finished. Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH package mountd] uci config for mountd fileystem options
Hi Oliver, 2016-06-10 11:37 GMT+02:00 : > Signed-off-by: Olivier Hardouin > --- Your patch doesn't have a commit message, which explains why these options are required by default. I've used mountd recently with ext4 and was able to read/write the mounted filesystem out of the box. Mathias > package/system/mountd/files/mountd.config | 28 > 1 file changed, 28 insertions(+) > > diff --git a/package/system/mountd/files/mountd.config > b/package/system/mountd/files/mountd.config > index 5610129..c105606 100644 > --- a/package/system/mountd/files/mountd.config > +++ b/package/system/mountd/files/mountd.config > @@ -1,3 +1,31 @@ > config mountd mountd > option timeout 60 > option path/tmp/mounts/ > + > +config filesystem ext2 > + option options 'rw,defaults' > + option fstype 'ext2' > + > +config filesystem ext3 > + option options 'rw,defaults' > + option fstype 'ext3' > + > +config filesystem ext4 > + option options 'rw,defaults' > + option fstype 'ext4' > + > +config filesystem fat > + option options 'rw,uid=1000,gid=1000' > + option fstype 'vfat' > + > +config filesystem exfat > + option options 'rw,uid=1000,gid=1000' > + option fstype 'exfat' > + > +config filesystem hfsplus > + option options 'rw,defaults,uid=1000,gid=1000' > + option fstype 'hfsplus' > + > +config filesystem ntfs > + option options 'force' > + option fstype 'ntfs' > -- > 1.9.1 > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] imports from LEDE to OpenWrt github repo
Hi Zoltan, I've noticed that you have imported a lot of patches from the LEDE repo into the OpenWrt github repo. I'm concerted about the fact that you have omitted at least a few of my Signed-off-bys[1][2], so that it isn't any longer noticeable that the changes are my work. Even though it may not be legally problematic, but from my point of view this is unnecessarily rude. But where I'm getting really pissed is if someone removes/omits my copyright line as it was done in [3] vs. [4]. You might know how much work it is to disassemble a bootloader and find what you are looking for in the assembler code. Albeit the patch changes only two lines, it wasn't a 5 minute job. Same as above, might be legally fine but it's rude. Would you be please so kind to keep an eye on this in the future and fix at least my patches in the OpenWrt github repo! Mathias [1] https://github.com/openwrt/openwrt/commit/1ea639b8d081bf7ace93e1c4e130615d1684ad5e [2] https://github.com/openwrt/openwrt/commit/e71983fca5fc9eed5e73a33e678ffcf2a2f9a8e9 [3] https://github.com/openwrt/openwrt/commit/e496316324925a978037f298c7b978ef97e13e7e [4] https://git.lede-project.org/?p=source.git;a=blobdiff;f=package/boot/uboot-lantiq/patches/0112-MIPS-add-board-support-for-Arcadyan-VGV7510KW22.patch;h=ccc3505a968edec70d334d68bc46802afd696da6;hp=e46d374dc0e9791c43bcaffee6a86a48a0c19a93;hb=a22feb4c78f51716772738af84180d58bd877c45;hpb=382282eca922e106f5b01597e4676bab8c7176db ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] latency on PPPoA ADSL Annex A on using Lantiq
Am 10.08.2016 um 22:41 schrieb Daniel Niasoff: Hi Mathias, ADSL works fine on chaos calmer and I cannot reproduce the issue, so it looks like it's a recently introduced issue. Thanks for the idea, it should make it easier to pinpoint Any idea's where the issue might be? Nope, no idea yet. Might be a kernel update or something completely unexpected. Without knowing the commit that introduced the regression it's more or less crystal ball reading. Using 'git bisect' it should be easy to identify the faulty commit. It has to be somewhere between the last commit before chaos calmer was branched (git hash 6c9b1a278e484a9c7c5ff36f91da90f725776d00) and HEAD. git bisect tells me that you have to build and test circa 12 images to find the faulty commit: git clone "https://github.com/openwrt/openwrt.git"; git checkout master git bisect start HEAD 6c9b1a278e484a9c7c5ff36f91da90f725776d00 Bisecting: 1688 revisions left to test after this (roughly 11 steps) It might be a good idea to verify that 6c9b1a278e484a9c7c5ff36f91da90f725776d00 is not affected by the bug before starting the bisect. Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] latency on PPPoA ADSL Annex A on using Lantiq
Am 11.08.2016 um 00:15 schrieb John Crispin: try reverting 8333a6d0bab913285770449f5100597b691b544f aswell please Had this commit in mind as well. According to Daniels initial mail to openwrt-devel, he is using a TP-LINK TD-W8980 (xrx200) and the kmod-ltq-adsl isn't build for xrx200. I suppose that this commit is a red herring. Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] latency on PPPoA ADSL Annex A on using Lantiq
2016-08-11 13:38 GMT+02:00 joerg jungermann : > Hi, > > I have an instance on a W8970/ADSL/Annex B running from build around th > 24th of March. > That time I build from GIT. I cannot name the git hash but > > # cat /etc/openwrt_version > r49081 > > I tested remotely that it suffers from the same regression. > Routed traffic is fine, but local terminated traffic is jumpy and sometimes > slow. > > The refered 6c9b1a278e484a9c7c5ff36f91da90f725776d00 is far later. > > $ git log > commit 6c9b1a278e484a9c7c5ff36f91da90f725776d00 > [...] > Date: Sun Jun 14 17:47:16 2015 + > [...] Uhm yes. 6c9b1a278e484a9c7c5ff36f91da90f725776d00 is last known good commit: git bisect start > After a clean clone from github, I wonder were are the commits > 8333a6d0bab913285770449f5100597b691b544f > and 45b52d458168adc31b15248380419c17d0586c63? > > $ git clone "https://github.com/openwrt/openwrt.git"; owrt > $ cd owrt/ > $ git checkput master > > $ git log 45b52d458168adc31b15248380419c17d0586c63 > fatal: bad object 45b52d458168adc31b15248380419c17d0586c63 > $ git log 8333a6d0bab913285770449f5100597b691b544f > fatal: bad object 8333a6d0bab913285770449f5100597b691b544f Well, these are the https://www.lede-project.org/ commit ids. The commits were merged from LEDE into OpenWrt and therefore have a different commit id in OpenWrt. The same applies to the r49081 commit. OMG! Even https://git.openwrt.org/openwrt.git and https://github.com/openwrt/openwrt are out of sync. r49081 lede: 98a01048b816167a6f7a1b60f3207c46c6e662dd git.openwrt.org/openwrt.git: 9e28ffe247c0936255fe0ed8be91f8b5367c9484 github.com/openwrt/openwrt: 0865c11c7b4fd92bd9cb6ac44aed0b2dbb680003 45b52d458168adc31b15248380419c17d0586c63 (kernel: remove lantiq specific ATM API hacks...) lede: 45b52d458168adc31b15248380419c17d0586c63 git.openwrt.org/openwrt.git: aaca255f379ecbfe9624296fdb4ac1b64f7b1d1d github.com/openwrt/openwrt: 04a495c918871803ce9a70c02ab27dca71dc9948 Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] lantiq: Add target TP-Link TD-W8980
The device is similar to the TD-W8970, beside a different Atheros 2.4 GHz wireless chip and the additional, PCI connected, WAVE300 5 GHz wireless. Signed-off-by: Mathias Kresin --- The DTS should work for a TD-W9980 as well. But due to lack of the appropriate hardware, it has not been tested. .../lantiq/base-files/etc/uci-defaults/02_network | 2 +- target/linux/lantiq/dts/TDW8970.dts| 251 +--- target/linux/lantiq/dts/TDW8980.dts| 31 +++ target/linux/lantiq/dts/TDW89X0.dtsi | 252 + target/linux/lantiq/image/Makefile | 3 + target/linux/lantiq/xrx200/profiles/tplink.mk | 7 + tools/firmware-utils/src/mktplinkfw2.c | 5 + 7 files changed, 300 insertions(+), 251 deletions(-) create mode 100644 target/linux/lantiq/dts/TDW8980.dts create mode 100644 target/linux/lantiq/dts/TDW89X0.dtsi diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network b/target/linux/lantiq/base-files/etc/uci-defaults/02_network index ff21e02..85d0eba 100644 --- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network @@ -151,7 +151,7 @@ P2812HNUF*) ucidef_add_switch_vlan "switch0" "1" "0 1 2 4 5 6t" ;; -TDW8970) +TDW8970|TDW8980) lan_mac=$(mtd_get_mac_binary boardconfig 61696) wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_set_interface_lan 'eth0.1' diff --git a/target/linux/lantiq/dts/TDW8970.dts b/target/linux/lantiq/dts/TDW8970.dts index d8dcb5d..172c46c 100644 --- a/target/linux/lantiq/dts/TDW8970.dts +++ b/target/linux/lantiq/dts/TDW8970.dts @@ -1,256 +1,7 @@ /dts-v1/; -/include/ "vr9.dtsi" +/include/ "TDW89X0.dtsi" / { model = "TDW8970 - TP-LINK TD-W8970"; - - chosen { - bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; - }; - - memory@0 { - reg = <0x0 0x400>; - }; - - fpi@1000 { - gpio: pinmux@E100B10 { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - mdio { - lantiq,groups = "mdio"; - lantiq,function = "mdio"; - }; - gphy-leds { - lantiq,groups = "gphy0 led1", "gphy1 led1"; - lantiq,function = "gphy"; - lantiq,pull = <2>; - lantiq,open-drain = <0>; - lantiq,output = <1>; - }; - phy-rst { - lantiq,pins = "io42"; - lantiq,pull = <0>; - lantiq,open-drain = <0>; - lantiq,output = <1>; - }; - spi-in { - lantiq,pins = "io16"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - }; - spi-out { - lantiq,pins = "io10", "io17", "io18", "io21"; - lantiq,open-drain = <0>; - lantiq,pull = <2>; - }; - pcie-rst { - lantiq,pins = "io38"; - lantiq,pull = <0>; - lantiq,output = <1>; - }; - }; - }; - - eth@E108000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "lantiq,xrx200-net"; - reg = < 0xE108000 0x3000 /* switch */ - 0xE10B100 0x70 /* mdio */ - 0xE10B1D8 0x30 /* mii */ - 0xE10B308 0x30 /* pmac */ - >; - interrupt-parent = <&icu0>; - interrupts = <73 72>; - - lan: interface@0 { -
[OpenWrt-Devel] [PATCH 1/2] lantiq: fix ath_pci_fixup hang on bridged devices
Port of r41856. In contrast to the brcm63xx target, it isn't sufficient to enable/disable the bridge. The device needs to be enabled/disabled to fix the hang. The bridge will be automatically enabled by the time the connected device is enabled. Fixes boot on TD-W8980. Signed-off-by: Mathias Kresin Signed-off-by: Martin Blumenstingl --- .../0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch | 11 ++- .../0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch | 11 ++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch index ec769ccf..2fc4db3 100644 --- a/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch +++ b/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch @@ -415,7 +415,7 @@ Signed-off-by: John Crispin +device_initcall(of_eth_mac_init); --- /dev/null +++ b/arch/mips/lantiq/xway/pci-ath-fixup.c -@@ -0,0 +1,109 @@ +@@ -0,0 +1,118 @@ +/* + * Atheros AP94 reference board PCI initialization + * @@ -442,6 +442,7 @@ Signed-off-by: John Crispin +static void ath_pci_fixup(struct pci_dev *dev) +{ + void __iomem *mem; ++ struct pci_dev *bridge = pci_upstream_bridge(dev); + u16 *cal_data = NULL; + u16 cmd; + u32 bar0; @@ -477,6 +478,10 @@ Signed-off-by: John Crispin + return; + } + ++ if (bridge) { ++ pci_enable_device(dev); ++ } ++ + pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0); + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, base); + pci_read_config_word(dev, PCI_COMMAND, &cmd); @@ -512,6 +517,10 @@ Signed-off-by: John Crispin + + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, bar0); + ++ if (bridge) { ++ pci_disable_device(dev); ++ } ++ + iounmap(mem); +} +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath_pci_fixup); diff --git a/target/linux/lantiq/patches-4.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-4.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch index 72ae1c9..6d53cd9 100644 --- a/target/linux/lantiq/patches-4.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch +++ b/target/linux/lantiq/patches-4.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch @@ -415,7 +415,7 @@ Signed-off-by: John Crispin +device_initcall(of_eth_mac_init); --- /dev/null +++ b/arch/mips/lantiq/xway/pci-ath-fixup.c -@@ -0,0 +1,109 @@ +@@ -0,0 +1,118 @@ +/* + * Atheros AP94 reference board PCI initialization + * @@ -442,6 +442,7 @@ Signed-off-by: John Crispin +static void ath_pci_fixup(struct pci_dev *dev) +{ + void __iomem *mem; ++ struct pci_dev *bridge = pci_upstream_bridge(dev); + u16 *cal_data = NULL; + u16 cmd; + u32 bar0; @@ -477,6 +478,10 @@ Signed-off-by: John Crispin + return; + } + ++ if (bridge) { ++ pci_enable_device(dev); ++ } ++ + pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0); + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, base); + pci_read_config_word(dev, PCI_COMMAND, &cmd); @@ -512,6 +517,10 @@ Signed-off-by: John Crispin + + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, bar0); + ++ if (bridge) { ++ pci_disable_device(dev); ++ } ++ + iounmap(mem); +} +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath_pci_fixup); -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] kernel: update 4.1 to 4.1.9
Fixes a regression on spi flash devices (upstream commit 1583eaece6fa). Changelogs: * https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.7 * https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.8 * https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.9 096-ipv4-off-by-one-in-continuation-handling-in-proc-net.patch was applied upstream and dropped. Signed-off-by: Mathias Kresin --- Runtime tested on lantiq. Compile tested on ar7, ar71xx, arm64, bcm53xx, brcm47xx, brcm63xx, brcm2708 (brcm2708 & brcm2709), gemini (raidsonic & wiligear), ipq806x, ixp4xx, mxs, omap, oxnas, sunxi and uml. include/kernel-version.mk | 4 +- .../ar7/patches-4.1/320-ac49x-mtd-partitions.patch | 2 +- .../patches-4.1/404-mtd-cybertan-trx-parser.patch | 2 +- .../405-mtd-tp-link-partition-parser.patch | 2 +- ...IPS-ath79-UBNT-add-airGateway-pro-support.patch | 4 +- ...MIPS-ath79-ar724x-clock-calculation-fixes.patch | 2 +- .../815-MIPS-ath79-add-ap152-support.patch | 2 +- .../815-MIPS-ath79-add-mr1750-support.patch| 6 +-- .../816-MIPS-ath79-add-tl-wdr3320-v2-support.patch | 6 +-- .../patches-4.1/910-unaligned_access_hacks.patch | 4 +- target/linux/arm64/config-default | 1 + .../110-firmware-backport-NVRAM-driver.patch | 2 +- ...ARM-BCM5301X-Add-DT-for-Linksys-EA6300-V1.patch | 3 -- .../0001-Main-bcm2708-bcm2709-linux-port.patch | 4 +- ...le-CONFIG_MEMCG-but-leave-it-disabled-due.patch | 2 +- ...cm2835-Support-pin-groups-other-than-7-11.patch | 4 +- ...-enable-dma-modes-for-transfers-meeting-c.patch | 7 ++-- ...-fixed-compile-issues-due-to-embedded-com.patch | 6 +-- ...m2835-Fix-buld-error-from-previous-commit.patch | 6 +-- ...-one-in-continuation-handling-in-proc-net.patch | 46 -- .../patches-4.1/320-ppc4xx_optimization.patch | 2 +- .../patches-4.1/630-packet_socket_type.patch | 6 +-- .../patches-4.1/642-bridge_port_isolate.patch | 8 ++-- .../645-bridge_multicast_to_unicast.patch | 6 +-- .../patches-4.1/653-disable_netlink_trim.patch | 2 +- .../generic/patches-4.1/655-increase_skb_pad.patch | 2 +- .../656-skb_reduce_truesize-helper.patch | 2 +- ...jecting-with-source-address-failed-policy.patch | 2 +- ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch | 10 ++--- .../generic/patches-4.1/721-phy_packets.patch | 6 +-- .../810-pci_disable_common_quirks.patch| 6 +-- .../generic/patches-4.1/834-ledtrig-libata.patch | 10 ++--- .../generic/patches-4.1/902-debloat_proc.patch | 4 +- .../patches-4.1/960-decompress_unlzo_fix.patch | 2 +- ...37-mtd-add-SMEM-parser-for-QCOM-platforms.patch | 2 +- ...-phy-handle-support-to-the-platform-layer.patch | 2 +- ...stmmac-add-fixed-link-device-tree-support.patch | 2 +- .../0001-MIPS-lantiq-add-pcie-driver.patch | 2 +- .../linux/lantiq/patches-4.1/0101-mtd-split.patch | 2 +- .../patches-4.1/300-introduce-oxnas-platform.patch | 4 +- .../linux/oxnas/patches-4.1/999-libata-hacks.patch | 4 +- 41 files changed, 77 insertions(+), 124 deletions(-) delete mode 100644 target/linux/generic/patches-4.1/096-ipv4-off-by-one-in-continuation-handling-in-proc-net.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index afc0e65..e41ddf0 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -4,11 +4,11 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .21 LINUX_VERSION-4.0 = .9 -LINUX_VERSION-4.1 = .6 +LINUX_VERSION-4.1 = .9 LINUX_KERNEL_MD5SUM-3.18.21 = e4248caaa4cef318c04657e971b37298 LINUX_KERNEL_MD5SUM-4.0.9 = 40fc5f6e2d718e539b45e6601c71985b -LINUX_KERNEL_MD5SUM-4.1.6 = 1dae0c808e34164cab3dfd57be88bd53 +LINUX_KERNEL_MD5SUM-4.1.9 = bb35066bb5fb997177fb95c7c511af1d ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) diff --git a/target/linux/ar7/patches-4.1/320-ac49x-mtd-partitions.patch b/target/linux/ar7/patches-4.1/320-ac49x-mtd-partitions.patch index 475104e..2330493 100644 --- a/target/linux/ar7/patches-4.1/320-ac49x-mtd-partitions.patch +++ b/target/linux/ar7/patches-4.1/320-ac49x-mtd-partitions.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig -@@ -164,6 +164,11 @@ config MTD_OF_PARTS +@@ -159,6 +159,11 @@ config MTD_OF_PARTS the partition map from the children of the flash node, as described in Documentation/devicetree/bindings/mtd/partition.txt. diff --git a/target/linux/ar71xx/patches-4.1/404-mtd-cybertan-trx-parser.patch b/target/linux/ar71xx/patches-4.1/404-mtd-cybertan-trx-parser.patch index f4dbb92..8809256 100644 --- a/target/linux/ar71xx/patches-4.1/404-mtd-cybertan-trx-parser.patch +++ b/target/linux/ar71xx/patches-4.1/404-mtd-cybertan-trx-parser.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig -@@ -184,6 +184,12 @@ config MTD_BCM47XX_PARTS +@@ -179,6
[OpenWrt-Devel] [PATCH] lantiq: fix use of IRQF_DISABLED in lantiq kmods
The IRQF_DISABLED flag was removed in kernel 4.1 with commit "genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely" [1]. Therefore the compilation of ltq-hcd and ltq-vmmc kmods fails. [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d8bf368d0631d4bc2612d8bf2e4e8e74e620d0cc Signed-off-by: Mathias Kresin --- The issue was reported in https://dev.openwrt.org/ticket/20679 and the patch was successfully test by an affected user. package/kernel/lantiq/ltq-hcd/src/ifxhcd.c | 2 + package/kernel/lantiq/ltq-hcd/src/ifxusb_cif_h.c | 8 +++ .../lantiq/ltq-vmmc/patches/200-compat.patch | 65 ++ .../lantiq/ltq-vmmc/patches/200-linux-310.patch| 33 --- .../lantiq/ltq-vmmc/patches/400-falcon.patch | 12 ++-- ...2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch | 8 +-- 6 files changed, 85 insertions(+), 43 deletions(-) create mode 100644 package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch delete mode 100644 package/kernel/lantiq/ltq-vmmc/patches/200-linux-310.patch diff --git a/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c b/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c index be0a91d..14dc7a1 100644 --- a/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c +++ b/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c @@ -702,7 +702,9 @@ int ifxhcd_init(ifxhcd_hcd_t *_ifxhcd) * IRQ line, and calls ifxusb_hcd_start method. */ retval = usb_add_hcd(syshcd, _ifxhcd->core_if.irq, 0 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) |IRQF_DISABLED +#endif |IRQF_SHARED ); if (retval < 0) diff --git a/package/kernel/lantiq/ltq-hcd/src/ifxusb_cif_h.c b/package/kernel/lantiq/ltq-hcd/src/ifxusb_cif_h.c index e9e67bf..0219fff 100644 --- a/package/kernel/lantiq/ltq-hcd/src/ifxusb_cif_h.c +++ b/package/kernel/lantiq/ltq-hcd/src/ifxusb_cif_h.c @@ -778,7 +778,9 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if) // | IRQF_TRIGGER_HIGH // | IRQF_TRIGGER_LOW // | IRQF_TRIGGER_PROBE +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) | IRQF_DISABLED +#endif // | IRQF_SAMPLE_RANDOM // | IRQF_SHARED | IRQF_PROBE_SHARED @@ -806,7 +808,9 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if) // | IRQF_TRIGGER_HIGH // | IRQF_TRIGGER_LOW // | IRQF_TRIGGER_PROBE +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) | IRQF_DISABLED +#endif // | IRQF_SAMPLE_RANDOM // | IRQF_SHARED | IRQF_PROBE_SHARED @@ -1009,7 +1013,9 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if) //| IRQF_TRIGGER_HIGH //| IRQF_TRIGGER_LOW //| IRQF_TRIGGER_PROBE +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) | IRQF_DISABLED +#endif //| IRQF_SAMPLE_RANDOM //| IRQF_SHARED | IRQF_PROBE_SHARED @@ -1174,7 +1180,9 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if) //| IRQF_TRIGGER_HIGH //| IRQF_TRIGGER_LOW //| IRQF_TRIGGER_PROBE +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) | IRQF_DISABLED +#endif //| IRQF_SAMPLE_RANDOM //| IRQF_SHARED //| IRQF_PROBE_SHARED diff --git a/package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch b/package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch new file mo
Re: [OpenWrt-Devel] [PATCH] lantiq: fix use of IRQF_DISABLED in lantiq kmods
Am 11.10.2015 um 10:50 schrieb Arjen de Korte: Citeren Mathias Kresin : diff --git a/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c b/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c index be0a91d..14dc7a1 100644 --- a/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c +++ b/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c @@ -702,7 +702,9 @@ int ifxhcd_init(ifxhcd_hcd_t *_ifxhcd) * IRQ line, and calls ifxusb_hcd_start method. */ retval = usb_add_hcd(syshcd, _ifxhcd->core_if.irq, 0 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) |IRQF_DISABLED +#endif Why the conditional compile statement? The IRQF_DISABLED has been a NOOP since kernel 2.6.35, so it should be safe to remove for all current versions of OpenWRT. So this really should be - |IRQF_DISABLED instead. Arjen Generally, I totally agree with your remarks. The same applies to the changes of ifxusb_cif_h.c as well. Albeit the lines around the touched ones of ifxusb_cif_h.c are in a really bad condition. Most if the IRQF_ flags are simply commented out. But in case of external supplied code, I'm trying to limit removals to a minimum. At least for me, it's annoying to find not obvious changes on my local version when comparing two versions of vendor supplied code. That's maybe specific to me and not necessary here. I'll send an updated patch as soon as the patchwork status of this patch changes to "changes requested" or similar. Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] lantiq: fix use of IRQF_DISABLED in lantiq kmods
The IRQF_DISABLED flag was removed in kernel 4.1 with commit "genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely" [1]. Therefore the compilation of ltq-hcd and ltq-vmmc kmods fails. [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d8bf368d0631d4bc2612d8bf2e4e8e74e620d0cc Signed-off-by: Mathias Kresin --- The issue was reported in https://dev.openwrt.org/ticket/20679 and the v1 patch was successfully test by an affected user. v2: Remove IRQF_DISABLED flags or replace them with 0x0 instead of using conditional compile statements. IRQF_DISABLED has been a NOOP since kernel 2.6.35, so this approach should be safe for all kernel versions supported by OpenWrt at the moment. Due to lack of hardware and testers, v2 is only compile tested with kernel 4.1 and 3.18. package/kernel/lantiq/ltq-hcd/src/ifxhcd.c | 5 +- package/kernel/lantiq/ltq-hcd/src/ifxusb_cif_h.c | 4 -- .../lantiq/ltq-vmmc/patches/200-compat.patch | 56 ++ .../lantiq/ltq-vmmc/patches/200-linux-310.patch| 33 - .../lantiq/ltq-vmmc/patches/400-falcon.patch | 10 ++-- ...2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch | 8 ++-- 6 files changed, 66 insertions(+), 50 deletions(-) create mode 100644 package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch delete mode 100644 package/kernel/lantiq/ltq-vmmc/patches/200-linux-310.patch diff --git a/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c b/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c index be0a91d..3fb00e0 100644 --- a/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c +++ b/package/kernel/lantiq/ltq-hcd/src/ifxhcd.c @@ -701,10 +701,7 @@ int ifxhcd_init(ifxhcd_hcd_t *_ifxhcd) * allocates the DMA buffer pool, registers the USB bus, requests the * IRQ line, and calls ifxusb_hcd_start method. */ - retval = usb_add_hcd(syshcd, _ifxhcd->core_if.irq, 0 - |IRQF_DISABLED - |IRQF_SHARED - ); + retval = usb_add_hcd(syshcd, _ifxhcd->core_if.irq, 0 | IRQF_SHARED); if (retval < 0) goto error2; diff --git a/package/kernel/lantiq/ltq-hcd/src/ifxusb_cif_h.c b/package/kernel/lantiq/ltq-hcd/src/ifxusb_cif_h.c index e9e67bf..1fcdebf 100644 --- a/package/kernel/lantiq/ltq-hcd/src/ifxusb_cif_h.c +++ b/package/kernel/lantiq/ltq-hcd/src/ifxusb_cif_h.c @@ -778,7 +778,6 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if) // | IRQF_TRIGGER_HIGH // | IRQF_TRIGGER_LOW // | IRQF_TRIGGER_PROBE -| IRQF_DISABLED // | IRQF_SAMPLE_RANDOM // | IRQF_SHARED | IRQF_PROBE_SHARED @@ -806,7 +805,6 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if) // | IRQF_TRIGGER_HIGH // | IRQF_TRIGGER_LOW // | IRQF_TRIGGER_PROBE -| IRQF_DISABLED // | IRQF_SAMPLE_RANDOM // | IRQF_SHARED | IRQF_PROBE_SHARED @@ -1009,7 +1007,6 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if) //| IRQF_TRIGGER_HIGH //| IRQF_TRIGGER_LOW //| IRQF_TRIGGER_PROBE - | IRQF_DISABLED //| IRQF_SAMPLE_RANDOM //| IRQF_SHARED | IRQF_PROBE_SHARED @@ -1174,7 +1171,6 @@ void ifxusb_vbus_free(ifxusb_core_if_t *_core_if) //| IRQF_TRIGGER_HIGH //| IRQF_TRIGGER_LOW //| IRQF_TRIGGER_PROBE - | IRQF_DISABLED //| IRQF_SAMPLE_RANDOM //
[OpenWrt-Devel] [PATCH 1/2] lantiq: ltq-vdsl-mei: enable vectoring support
Dynamic Spectrum Management is a precondition for G.993.5 (VDSL2 vectoring). Signed-off-by: Mathias Kresin --- It has been sucessfully tested by a user with a german 1&1 VDSL2 vectoring line, who could only get the ADSL2+ fallback speed[1] without this patch (regardless of vectoring support in firmware). Vectoring requires a firmware with vectoring support, otherwise the line is limited to the ADSL2+ fallback speed. The user reported that he could only get stable connections with firmware versions 7.3.3+[2]. It has been tested by my self with a "normal" VDSL2 line. [1] http://paste.debian.net/hidden/78edfca4/ [2] http://paste.debian.net/hidden/04381d10/ package/kernel/lantiq/ltq-vdsl-mei/Makefile | 2 +- package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch | 11 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/package/kernel/lantiq/ltq-vdsl-mei/Makefile b/package/kernel/lantiq/ltq-vdsl-mei/Makefile index 5ff1321..64a7cf3 100644 --- a/package/kernel/lantiq/ltq-vdsl-mei/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-mei/Makefile @@ -62,7 +62,7 @@ CONFIGURE_ARGS += \ --enable-error_print \ --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos/" \ --enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \ - --enable-add_drv_cflags="-DMEI_SUPPORT_DSM=0 -DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 -fno-pic -mlong-calls -O2 -g0" \ + --enable-add_drv_cflags="-DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 -fno-pic -mlong-calls -O2 -g0" \ --enable-linux-26 \ --enable-kernelbuild="$(LINUX_DIR)" \ --enable-drv_test_appl=yes \ diff --git a/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch b/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch index 0273d19..c401378 100644 --- a/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch +++ b/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch @@ -308,3 +308,14 @@ } IFX_int32_t MEI_PLL_ConfigInit(MEI_DEV_T *pMeiDev) +--- a/src/drv_mei_cpe_dsm.c b/src/drv_mei_cpe_dsm.c +@@ -138,7 +138,7 @@ IFX_void_t MEI_VRX_DSM_DataInit(MEI_DEV_ +memset((IFX_uint8_t *)&pMeiDev->firmwareFeatures, 0x00, sizeof(IOCTL_MEI_firmwareFeatures_t)); +pMeiDev->meiFwDlCount = 0; + +- pMeiDev->meiERBbuf.pCallBackFunc = mei_dsm_cb_func_hook; ++ pMeiDev->meiERBbuf.pCallBackFunc = NULL; + +PRN_DBG_USR_NL( MEI_DRV, MEI_DRV_PRN_LEVEL_NORMAL, + ("MEI_DRV: PP callback function addr = 0x%08X" MEI_DRV_CRLF, -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] lantiq: add VDSL2 vectoring status information
Signed-off-by: Mathias Kresin --- Tested by my self with a "normal" VDSL2 line and by a user with a german 1&1 VDSL2 vectoring line: /etc/init.d/dsl_control status ATU-C Vendor ID: B5,00,42,44,43,4D,A4,61 ATU-C System Vendor ID: B5,00,42,44,43,4D,00,00 Chipset: Lantiq-VRX200 Unknown Firmware Version: 5.7.3.3.0.7 API Version: 4.16.6.3 XTSE Capabilities:0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2 Annex:B Line Mode:G.993.5 (VDSL2 with down- and upstream vectoring) Line State: UP [0x801: showtime_tc_sync] Forward Error Correction Seconds (FECS): Near: 0 / Far: 1479 Errored seconds (ES): Near: 0 / Far: 89 Severely Errored Seconds (SES): Near: 0 / Far: 0 Loss of Signal Seconds (LOSS):Near: 0 / Far: 0 Unavailable Seconds (UAS):Near: 96 / Far: 96 Header Error Code Errors (HEC): Near: 0 / Far: 0 Non Pre-emtive CRC errors (CRC_P):Near: 0 / Far: 0 Pre-emtive CRC errors (CRCP_P): Near: 0 / Far: 0 Power Management Mode:L0 - Synchronized Latency / Interleave Delay: Down: Interleave (0.15 ms) / Up: Interleave (1.0 ms) Data Rate:Down: 51.392 Mb/s / Up: 10.047 Mb/s Line Attenuation (LATN): Down: 13.0dB / Up: 12.8dB Signal Attenuation (SATN):Down: 13.0dB / Up: 12.6dB Noise Margin (SNR): Down: 22.9dB / Up: 30.3dB Aggregate Transmit Power(ACTATP): Down: 1.3dB / Up: 12.5dB Max. Attainable Data Rate (ATTNDR): Down: 113.494 Mb/s / Up: 46.306 Mb/s Line Uptime Seconds: 341 Line Uptime: 5m 41s target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh index 22e65cb..c6996e8 100755 --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh @@ -160,6 +160,9 @@ xtse() { local annex_s="" local line_mode_s="" + local vector_s="" + + local dsmsg="" local cmd="" xtusesg=$(dsl_cmd g997xtusesg) @@ -256,7 +259,15 @@ xtse() { fi if [ $((xtse8 & 7)) != 0 ]; then - line_mode_s="$line_mode_s G.993.2 (VDSL2)," + dsmsg=$(dsl_cmd dsmsg) + vector_s=$(dsl_val "$dsmsg" eVectorStatus) + + case "$vector_s" in + "0")line_mode_s="$line_mode_s G.993.2 (VDSL2)," ;; + "1")line_mode_s="$line_mode_s G.993.5 (VDSL2 with downstream vectoring)," ;; + "2")line_mode_s="$line_mode_s G.993.5 (VDSL2 with down- and upstream vectoring)," ;; + *) line_mode_s="$line_mode_s unknown," ;; + esac fi #!!! PROPRIETARY & INTERMEDIATE USE !!! -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: fix logic error in dsl board.d code
Starting with r47755 the pppoe wan interface section isn't any longer added to the network config on firstboot, using the default configuration. Since the commit message does not mention such a change, I assume that this wasn't intentionally. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/02_network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network index 039f57b..08a143f 100755 --- a/target/linux/lantiq/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/base-files/etc/board.d/02_network @@ -130,7 +130,7 @@ VGV7510KW22) esac -if [ -z "$(ls /lib/modules/`uname -r`/ltq_atm*)" ]; then +if [ -n "$(ls /lib/modules/`uname -r`/ltq_atm*)" ]; then ucidef_add_atm_bridge "$vpi" "$vci" "$encaps" "$payload" ucidef_set_interface_wan "nas0" "pppoe" fi -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] uboot-lantiq: fix build with gcc5
Signed-off-by: Mathias Kresin --- .../patches/0045-no_extern_inline.patch| 101 + .../uboot-lantiq/patches/0046-no_weak_alias.patch | 28 ++ .../patches/0047-add-gcc5-support.patch| 93 +++ 3 files changed, 222 insertions(+) create mode 100644 package/boot/uboot-lantiq/patches/0045-no_extern_inline.patch create mode 100644 package/boot/uboot-lantiq/patches/0046-no_weak_alias.patch create mode 100644 package/boot/uboot-lantiq/patches/0047-add-gcc5-support.patch diff --git a/package/boot/uboot-lantiq/patches/0045-no_extern_inline.patch b/package/boot/uboot-lantiq/patches/0045-no_extern_inline.patch new file mode 100644 index 000..45e8b7d --- /dev/null +++ b/package/boot/uboot-lantiq/patches/0045-no_extern_inline.patch @@ -0,0 +1,101 @@ +From b11c5d1dc29e81326d1215011d19377737082aeb Mon Sep 17 00:00:00 2001 +From: Daniel Schwierzeck +Date: Wed, 1 Jul 2015 16:36:43 +0200 +Subject: [PATCH] MIPS: change 'extern inline' to 'static inline' + +The kernel changed it a long time ago. Also this is now broken +on gcc-5.x. + +Reported-by: Andy Kennedy +Signed-off-by: Daniel Schwierzeck +--- + arch/mips/include/asm/io.h | 12 ++-- + arch/mips/include/asm/system.h | 6 +++--- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h +index 3fa37f5..a7ab087 100644 +--- a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h +@@ -117,7 +117,7 @@ static inline void set_io_port_base(unsigned long base) + * Change virtual addresses to physical addresses and vv. + * These are trivial on the 1:1 Linux/MIPS mapping + */ +-extern inline phys_addr_t virt_to_phys(volatile void * address) ++static inline phys_addr_t virt_to_phys(volatile void * address) + { + #ifndef CONFIG_64BIT + return CPHYSADDR(address); +@@ -126,7 +126,7 @@ extern inline phys_addr_t virt_to_phys(volatile void * address) + #endif + } + +-extern inline void * phys_to_virt(unsigned long address) ++static inline void * phys_to_virt(unsigned long address) + { + #ifndef CONFIG_64BIT + return (void *)KSEG0ADDR(address); +@@ -138,7 +138,7 @@ extern inline void * phys_to_virt(unsigned long address) + /* + * IO bus memory addresses are also 1:1 with the physical address + */ +-extern inline unsigned long virt_to_bus(volatile void * address) ++static inline unsigned long virt_to_bus(volatile void * address) + { + #ifndef CONFIG_64BIT + return CPHYSADDR(address); +@@ -147,7 +147,7 @@ extern inline unsigned long virt_to_bus(volatile void * address) + #endif + } + +-extern inline void * bus_to_virt(unsigned long address) ++static inline void * bus_to_virt(unsigned long address) + { + #ifndef CONFIG_64BIT + return (void *)KSEG0ADDR(address); +@@ -165,12 +165,12 @@ extern unsigned long isa_slot_offset; + extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); + + #if 0 +-extern inline void *ioremap(unsigned long offset, unsigned long size) ++static inline void *ioremap(unsigned long offset, unsigned long size) + { + return __ioremap(offset, size, _CACHE_UNCACHED); + } + +-extern inline void *ioremap_nocache(unsigned long offset, unsigned long size) ++static inline void *ioremap_nocache(unsigned long offset, unsigned long size) + { + return __ioremap(offset, size, _CACHE_UNCACHED); + } +diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h +index 7a28952..d56f73b 100644 +--- a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h +@@ -22,7 +22,7 @@ + #include + #endif + +-extern __inline__ void ++static __inline__ void + __sti(void) + { + __asm__ __volatile__( +@@ -46,7 +46,7 @@ __sti(void) + * R4000/R4400 need three nops, the R4600 two nops and the R1 needs + * no nops at all. + */ +-extern __inline__ void ++static __inline__ void + __cli(void) + { + __asm__ __volatile__( +@@ -207,7 +207,7 @@ do { \ + * For 32 and 64 bit operands we can take advantage of ll and sc. + * FIXME: This doesn't work for R3000 machines. + */ +-extern __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val) ++static __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val) + { + #ifdef CONFIG_CPU_HAS_LLSC + unsigned long dummy; diff --git a/package/boot/uboot-lantiq/patches/0046-no_weak_alias.patch b/package/boot/uboot-lantiq/patches/0046-no_weak_alias.patch new file mode 100644 index 000..4701ab1 --- /dev/null +++ b/package/boot/uboot-lantiq/patches/0046-no_weak_alias.patch @@ -0,0 +1,28 @@ +From 3422299dc28fa8257677d03cc1253e3c9bf17e9f Mon Sep 17 00:00:00 2001 +From: Jeroen Hofstee +Date: Thu, 26 Jun 2014 20:18:31 +0200 +Subject: [PATCH] common: main.c: make show_boot_progress __weak + +This not only looks a bit better it also prevents a +warning with W=1 (no previous prototype). + +Signed-off-by: Jeroen Hofstee +Acked-by: Simon Gl
[OpenWrt-Devel] [PATCH] lantiq: fix led setup after switch to uci-defaults-new.sh
The switch to uci-defaults-new.sh revealed a bug in the former used uci-defaults.sh, which failed to add leds with colons in the led name. This bug isn't any longer present in uci-defaults-new.sh and therefore all via DT defined leds will be added to /etc/config/system with their initial on/off state, regardless whether they are already added by the board specific led mappings. This results for a BTHOMEHUBV5A into the following led configuration: - soc:blue:power is added as led_power with the initial state "switched on" - soc:blue:power is added as led_soc_blue_power with the initial state "switched off" With the final result of a switched off power led after boot. The only led that needs to be added is the BTHOMEHUBV5A specific dimmed led. Signed-off-by: Mathias Kresin --- The loop was introduced with r34698 to compact the leds file. The mentioned bug of uci-defaults.sh can be seen in paste [1]. Based on the commit diff and the current device tree files of the boards that where removed with r34698 from the leds file, I'm sure the ucidef_set_led_default calls where used to initially switch off active_low leds. Nowdays this isn't needed, as GPIO active_low/active_high is set via DT and the default state for leds is "switched off". The "default" leds power, power1, power2 and dsl do not have to be added. They are hardcoded in the platform specific scripts. I will fix this hardcoding after this patch is merged. [1] http://paste.debian.net/hidden/13e5218b/ target/linux/lantiq/base-files/etc/board.d/01_leds | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index 2dc641e..74d74c4 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -27,11 +27,17 @@ BTHOMEHUBV2B) ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ucidef_set_led_usbdev "usb" "usb" "soc:blue:phone" "1-1" ;; -BTHOMEHUBV3A|BTHOMEHUBV5A) +BTHOMEHUBV3A) ucidef_set_led_default "power" "power" "soc:blue:power" "1" ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ;; +BTHOMEHUBV5A) + ucidef_set_led_default "power" "power" "soc:blue:power" "1" + ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" + ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" + ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" + ;; VGV7510KW22) ucidef_set_led_default "power" "power" "power" "1" ucidef_set_led_default "power2" "power2" "power2" "0" @@ -69,11 +75,6 @@ ARV8539PW22) ;; esac -for a in `ls /sys/class/leds/`; do - grep -q "\[none\]" /sys/class/leds/$a/trigger - [ $? -eq 0 ] && ucidef_set_led_default $a $a $a `cat /sys/class/leds/$a/brightness` -done - board_config_flush exit 0 -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] lantiq: ltq-vdsl-app: re-add showtime counters support
The typicial feature set doesn't include "DSL PM showtime counters support" (INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS). This feature provides the vdsl_cpe_control command 'pmccsg', which is used by 'dsl_control status' to get the line uptime. The binary size increases to 103912 byte (+4256 byte) uncompressed. Signed-off-by: Mathias Kresin --- package/network/config/ltq-vdsl-app/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/network/config/ltq-vdsl-app/Makefile b/package/network/config/ltq-vdsl-app/Makefile index da2451b..fffe894 100644 --- a/package/network/config/ltq-vdsl-app/Makefile +++ b/package/network/config/ltq-vdsl-app/Makefile @@ -47,7 +47,8 @@ CONFIGURE_ARGS += \ --enable-dsl-ceoc=no \ --enable-vrx-device=vr9 \ --disable-dti \ - --enable-debug + --enable-debug \ + --enable-dsl-pm-showtime ifeq ($(CONFIG_IFX_CLI),y) CONFIGURE_ARGS += \ -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] lantiq: ltq-vdsl-app: cleanup Makefile
- CONFIG_IFX_CLI is unused, couldn't find any reference to this config variable - use disable-feature instead of enable-feature=no - reorder configure args to have depending args together - remove configure args which set the default value - group enable-model and configure args which enable or disable features that are covered by the feature set The config.log contains the same values as before. The vdsl_cpe_control binary has the same checksum as before. Signed-off-by: Mathias Kresin --- package/network/config/ltq-vdsl-app/Makefile | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/package/network/config/ltq-vdsl-app/Makefile b/package/network/config/ltq-vdsl-app/Makefile index fffe894..bfacccd 100644 --- a/package/network/config/ltq-vdsl-app/Makefile +++ b/package/network/config/ltq-vdsl-app/Makefile @@ -34,31 +34,25 @@ define Package/ltq-vdsl-app/description endef CONFIGURE_ARGS += \ - --with-max-device="1" \ - --with-lines-per-device="1" \ - --with-channels-per-line="1" \ --enable-vrx \ + --enable-vrx-device=vr9 \ --enable-driver-include="-I$(STAGING_DIR)/usr/include/drv_vdsl_cpe_api" \ --enable-device-driver-include="-I$(STAGING_DIR)/usr/include/vdsl/" \ - --enable-add-appl-cflags="-DMAX_CLI_PIPES=1" \ --enable-ifxos \ --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos" \ --enable-ifxos-library="-I$(STAGING_DIR)/usr/lib" \ - --enable-dsl-ceoc=no \ - --enable-vrx-device=vr9 \ - --disable-dti \ + --enable-add-appl-cflags="-DMAX_CLI_PIPES=1" \ --enable-debug \ - --enable-dsl-pm-showtime - -ifeq ($(CONFIG_IFX_CLI),y) -CONFIGURE_ARGS += \ - --enable-cli-support -endif + --disable-dti \ + --with-channels-per-line="1" \ #CONFIGURE_ARGS += --enable-model=full #CONFIGURE_ARGS += --enable-model=lite #CONFIGURE_ARGS += --enable-model=footprint -CONFIGURE_ARGS += --enable-model=typical +CONFIGURE_ARGS += \ + --enable-model=typical \ + --enable-dsl-pm-showtime \ + --disable-dsl-ceoc #CONFIGURE_ARGS += --enable-model=debug define Package/ltq-vdsl-app/install -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: ltq-ptm: set carrier status
Principal purpose is to prevent the error message ifxmips_ptm_vdsl.c:281:ptm_hard_start_xmit: not in showtime which is printed at least once per second to the serial console, if the ptm interface is not in showtime, but a processes already sends packages over that interface. This happens for adsl as well as vdsl over ptm. It's pppd which sends packages over the ptm device before in showtime. As far as I can see, pppd is started unconditionally since netif can not gather the link status of the ptm network interface. Signed-off-by: Mathias Kresin --- Test with a VDSL line. It has not been tested with ADSL over PTM! package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c | 14 ++ package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c | 13 + 2 files changed, 27 insertions(+) diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c index 38001c3..dc75b12 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c @@ -43,6 +43,7 @@ #include #include #include +#include #include /* @@ -277,6 +278,10 @@ static int g_showtime = 0; static void ptm_setup(struct net_device *dev, int ndev) { +#if defined(CONFIG_IFXMIPS_DSL_CPE_MEI) || defined(CONFIG_IFXMIPS_DSL_CPE_MEI_MODULE) +netif_carrier_off(dev); +#endif + /* hook network operations */ dev->netdev_ops = &g_ptm_netdev_ops; netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 25); @@ -1384,9 +1389,13 @@ static INLINE void init_tables(void) static int ptm_showtime_enter(struct port_cell_info *port_cell, void *xdata_addr) { +int i; g_showtime = 1; +for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ ) +netif_carrier_on(g_net_dev[i]); + printk("enter showtime\n"); return 0; @@ -1394,9 +1403,14 @@ static int ptm_showtime_enter(struct port_cell_info *port_cell, void *xdata_addr static int ptm_showtime_exit(void) { +int i; + if ( !g_showtime ) return -1; +for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ ) +netif_carrier_off(g_net_dev[i]); + g_showtime = 0; printk("leave showtime\n"); diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c index 9adeba4..41464e6 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "ifxmips_ptm_vdsl.h" #include @@ -136,6 +137,8 @@ unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR; static void ptm_setup(struct net_device *dev, int ndev) { +netif_carrier_off(dev); + dev->netdev_ops = &g_ptm_netdev_ops; netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16); dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT; @@ -888,6 +891,8 @@ static inline void clear_tables(void) static int ptm_showtime_enter(struct port_cell_info *port_cell, void *xdata_addr) { + int i; + ASSERT(port_cell != NULL, "port_cell is NULL"); ASSERT(xdata_addr != NULL, "xdata_addr is NULL"); @@ -896,6 +901,9 @@ static int ptm_showtime_enter(struct port_cell_info *port_cell, void *xdata_addr g_showtime = 1; + for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ ) + netif_carrier_on(g_net_dev[i]); + IFX_REG_W32(0x0F, UTP_CFG); //#ifdef CONFIG_VR9 @@ -909,6 +917,8 @@ static int ptm_showtime_enter(struct port_cell_info *port_cell, void *xdata_addr static int ptm_showtime_exit(void) { + int i; + if ( !g_showtime ) return -1; @@ -918,6 +928,9 @@ static int ptm_showtime_exit(void) IFX_REG_W32(0x00, UTP_CFG); + for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ ) + netif_carrier_off(g_net_dev[i]); + g_showtime = 0; // TODO: ReTX clean state -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: ltq-atm: set carrier status
This prevents the unconditionally start of pppd since netifd will be triggered if the device goes into showtime. The same applies to lost showtime as well. In compare to the ptm driver, this changeset isn't strictly required, since the "not in showtime" message is limited to the debug loglevel. But it reduces the amount of ppp related messages significant. Signed-off-by: Mathias Kresin --- Tested with an ADSL line. package/kernel/lantiq/ltq-atm/src/ltq_atm.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c index 658dfdc..1208dd8 100644 --- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c +++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c @@ -1715,7 +1715,7 @@ static inline void init_tx_tables(void) static int atm_showtime_enter(struct port_cell_info *port_cell, void *xdata_addr) { - int i, j; + int i, j, port_num; ASSERT(port_cell != NULL, "port_cell is NULL"); ASSERT(xdata_addr != NULL, "xdata_addr is NULL"); @@ -1738,6 +1738,9 @@ static int atm_showtime_enter(struct port_cell_info *port_cell, void *xdata_addr g_showtime = 1; + for ( port_num = 0; port_num < ATM_PORT_NUMBER; port_num++ ) + atm_dev_signal_change(g_atm_priv_data.port[port_num].dev, ATM_PHY_SIG_FOUND); + #if defined(CONFIG_VR9) IFX_REG_W32(0x0F, UTP_CFG); #endif @@ -1752,12 +1755,18 @@ static int atm_showtime_enter(struct port_cell_info *port_cell, void *xdata_addr static int atm_showtime_exit(void) { + int port_num; + if ( !g_showtime ) return -1; #if defined(CONFIG_VR9) IFX_REG_W32(0x00, UTP_CFG); #endif + + for ( port_num = 0; port_num < ATM_PORT_NUMBER; port_num++ ) + atm_dev_signal_change(g_atm_priv_data.port[port_num].dev, ATM_PHY_SIG_LOST); + g_showtime = 0; g_xdata_addr = NULL; printk("leave showtime\n"); @@ -1824,6 +1833,10 @@ static int ltq_atm_probe(struct platform_device *pdev) g_atm_priv_data.port[port_num].dev->ci_range.vci_bits = 16; g_atm_priv_data.port[port_num].dev->link_rate = g_atm_priv_data.port[port_num].tx_max_cell_rate; g_atm_priv_data.port[port_num].dev->dev_data = (void*)port_num; + +#if defined(CONFIG_IFXMIPS_DSL_CPE_MEI) || defined(CONFIG_IFXMIPS_DSL_CPE_MEI_MODULE) + atm_dev_signal_change(g_atm_priv_data.port[port_num].dev, ATM_PHY_SIG_LOST); +#endif } } -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 5/5] lantiq: Configure LED polarity for TDW8970.
Am 16.12.2015 um 05:42 schrieb Vittorio G (VittGam): This patch configures the correct ath9k WLAN LED polarity for the TDW8970. Signed-off-by: Vittorio Gambaletta --- The TDW8970 LED is active high, but I'm not sure about the TDW8980 as I don't have one. If the TDW8980 LED is active high as well, this can be added to TDW89X0.dtsi instead of TDW8970.dts. The TDW8980 2.4 GHz Wireless LED is active high as well and your patch fixed the inverse lighting. Would you please move the definition to the dtsi! --- a/target/linux/lantiq/dts/TDW8970.dts +++ b/target/linux/lantiq/dts/TDW8970.dts @@ -4,4 +4,8 @@ / { model = "TDW8970 - TP-LINK TD-W8970"; + + ath9k_eep { + ath,led-active-high; + }; }; ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] lantiq: Add default LED configuration for TDW89X0.
Am 16.12.2015 um 05:42 schrieb Vittorio G (VittGam): Signed-off-by: Vittorio Gambaletta --- --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -38,6 +38,10 @@ BTHOMEHUBV5A) ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; +TDW8970|TDW8980) + ucidef_set_led_wlan "wifi" "wifi" "ath9k-phy0" "phy0tpt" + ucidef_set_led_netdev "internet" "internet" "internet" "pppoe-wan" + ;; VGV7510KW22) ucidef_set_led_default "power" "power" "power" "1" ucidef_set_led_default "power2" "power2" "power2" "0" ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel This look unnecessary to me. The default internet led configuration a few lines above, already adds an internet led with exactly the same values. The same applies to the wifi led. I can not yet explain why, but the ath9k-phy0 led has the phy0tpt trigger configured without having the wifi led defined in 01_led on my TDW8980. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: add the TDW8980 5GHz led
Still unused, but u-boot doesn't take care of the led, which results in a permanent switched on 5GHz LED. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/TDW8980.dts | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/linux/lantiq/dts/TDW8980.dts b/target/linux/lantiq/dts/TDW8980.dts index ad3d182..ca8fc80 100644 --- a/target/linux/lantiq/dts/TDW8980.dts +++ b/target/linux/lantiq/dts/TDW8980.dts @@ -28,4 +28,11 @@ ath9k_eep { ath,pci-slot = <0>; }; + + gpio-leds { + wifi2 { + label = "wifi2"; + gpios = <&gpio 24 1>; + }; + }; }; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/3] lantiq: use the configured dsl led instead of a hardcoded one
Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 1 + target/linux/lantiq/base-files/sbin/dsl_notify.sh | 14 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index b5801ca..8422ec0 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -12,6 +12,7 @@ board_config_update [ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tpt" [ -e "/sys/class/leds/usb" ] && ucidef_set_led_usbdev "usb" "usb" "usb" "1-1" [ -e "/sys/class/leds/usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "usb2" "2-1" +[ -e "/sys/class/leds/dsl" ] && ucidef_set_led_default "dsl" "dsl" "dsl" "0" [ -e "/sys/class/leds/internet" ] && ucidef_set_led_netdev "internet" "internet" "internet" "pppoe-wan" board=$(lantiq_board_name) diff --git a/target/linux/lantiq/base-files/sbin/dsl_notify.sh b/target/linux/lantiq/base-files/sbin/dsl_notify.sh index b514e25..01d0488 100755 --- a/target/linux/lantiq/base-files/sbin/dsl_notify.sh +++ b/target/linux/lantiq/base-files/sbin/dsl_notify.sh @@ -16,15 +16,15 @@ include /lib/network scan_interfaces -local default +local led config_load system -config_get default led_adsl default -if [ "$default" != 1 ]; then +config_get led led_dsl sysfs +if [ -n "$led" ]; then case "$DSL_INTERFACE_STATUS" in - "HANDSHAKE") led_timer dsl 500 500;; - "TRAINING") led_timer dsl 200 200;; - "UP") led_on dsl;; - *)led_off dsl + "HANDSHAKE") led_timer $led 500 500;; + "TRAINING") led_timer $led 200 200;; + "UP") led_on $led;; + *)led_off $led esac fi -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/3] lantiq: unify dsl led names
Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV4510PW.dts | 2 +- target/linux/lantiq/dts/ARV4520PW.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/dts/ARV4510PW.dts b/target/linux/lantiq/dts/ARV4510PW.dts index 4772495..67c 100644 --- a/target/linux/lantiq/dts/ARV4510PW.dts +++ b/target/linux/lantiq/dts/ARV4510PW.dts @@ -168,7 +168,7 @@ gpios = <&gpios 15 0>; }; adsl { - label = "adsl"; + label = "dsl"; gpios = <&gpios 14 0>; }; internet { diff --git a/target/linux/lantiq/dts/ARV4520PW.dts b/target/linux/lantiq/dts/ARV4520PW.dts index 8a5b797..3aa06a9 100644 --- a/target/linux/lantiq/dts/ARV4520PW.dts +++ b/target/linux/lantiq/dts/ARV4520PW.dts @@ -145,7 +145,7 @@ gpios = <&gpio 3 1>; }; adsl { - label = "adsl"; + label = "dsl"; gpios = <&gpio 4 1>; }; internet { -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/3] lantiq: let dsl_notify.sh exclusive handle the dsl led
dsl_control (dsl_notify.sh) is the only process which is aware of the state of the atm/ptm interface. Use the dsl led exclusive for the dsl line state. All touched boards have a distinct internet led set, which is perfect fine for indicating the ppp status. No need to add another netdev trigger to the ptm/atm device. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index 8422ec0..9787d2d 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -43,7 +43,6 @@ VGV7510KW22) ucidef_set_led_default "power" "power" "power" "1" ucidef_set_led_default "power2" "power2" "power2" "0" ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" - ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" ucidef_set_led_netdev "internet_green" "internet_green" "internet_green" "pppoe-wan" ;; VGV7519) @@ -57,7 +56,6 @@ P2812HNUF*) ucidef_set_led_default "power" "power" "power" "0" ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wireless_green" "wireless_green" "wireless_green" "phy0radio" - ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" ucidef_set_led_netdev "internet_green" "internet_green" "internet_green" "pppoe-wan" ;; ARV7519RW22) @@ -69,7 +67,7 @@ ARV8539PW22) ucidef_set_led_default "power" "power" "soc:green:power" "1" ucidef_set_led_default "power2" "power2" "soc:red:power" "0" ucidef_set_led_wlan "wifi" "wifi" "soc:green:wireless" "phy0tpt" -ucidef_set_led_netdev "dsl" "dsl" "soc:green:dsl" "nas0" +ucidef_set_led_default "dsl" "dsl" "soc:green:dsl" "0" ucidef_set_led_netdev "online" "online" "soc:green:online" "pppoe-wan" ;; *) -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/3] lantiq: unify dsl led names
2015-12-17 7:52 GMT+01:00 John Crispin : > Hi, > > we had a discussion yesterday with a few people and agreed to cleanup > the led names on for the lantiq target to match the format expected by > the kernel. i like this patch however we need to do the led renaming > first i guess. >From my point of view, a configurable DSL led is a precondition for renaming the leds. but I'm sure you have a better general view than I. I'm fine to skip this patch of the series and fix the DSL led of the affected boards after renaming the leds. I totally agree with you, that the led naming is suboptimal. I'm currently working on adding support for systems which are using three leds for boot state indication. I had to rewrite the whole diag.sh, with the benefit that we can get rid of the static power[0-2] naming as well. With having led names like power[0-2] without any indication which colour the led has, it's a mess to ensure that I don't break existing power led setups. Am I right that you are talking about a naming scheme like "devicename:colour:function" as it's suggested by https://www.kernel.org/doc/Documentation/leds/leds-class.txt? Are there any known limitations for the led node names, which are available at /sys/class/leds/*/device/of_node/? Maybe we can use node names according to the intended (OpenWrt) use and prevent bloating the board.d led file this way after switching to the devicename:colour:function naming. Are you working on renaming the leds or are you wait for patches? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 00/12] lantiq: switch to devicename:colour:function naming scheme
I chose to use Device Tree Source files to define some common used leds. This way it's possible to prevent the bloating (as it can be seen on other tragets) of the led board.d file as well as the diag.sh file. No need to carry dozen of - unrelated - board specific led definitions with each board. The devicename is the same for all boards: "soc". Using for example the TDW8970. The leds of this board are defined in the TDW89x0.dtsi include file and shared with the TWD8980. Therefore I would name the device part of the led label "TWD89x0". When it comes to the situation that for these boards a led mapping needs to be added to board.d led file, the $board approach wouldn't work. This is unnecessary error prone and therefore I used "soc". The colours where matched to the names used in the board manual. The function names are either the led lable printed on the board cases or the name used in the manual. If I found a led missing, I left a comment in the dts file. Due to missing board manuals or insufficient informations in the board manual, I wasn't able to rename the leds of the following boards: ARV7519PW, ARV7510PW22, ARV4510PW and ARV4518PWR01*. The ARV4518PWR01* boards are somehow special, since the leds doesn't match the leds from the manual or pictures I found (e.g. there shouldn't be a wps led). If someone can provide the required informations for the mentioned boards, feel free to contact me. The first few patches are only for cleaning up some of the dts files, which made it easier for me to rename the leds later on. Patch 11 "Add support for indicating the boot state using three leds" doesn't match directly the purpose of the series, but it allows me to remove even more leds form the board.d led file before renaming. HELP: In addition, I tried to allow dsl_notify.sh to control a shared dsl/internet LED as well. But I missed that dsl_notify.sh assigns a timer trigger to the LED and therefore replaces the netdev trigger. Till now, I couldn't figure out, how to reload the configuration of a single led (here at the dsl_notify UP event to re-add the netdev trigger). Did I missed something or does this functionality need to be implemented. GENERAL NOTE: Since I have to had a look at all dts files, I noticed the following oddness: - ARV4525PW: doesn't have bootargs - GIGASX76X: doesn't have leds defined, where the old mach file had This series has been runtime tested on BTHOMEHUBV5A, TDW8980, VGV7510KW22 and ARV752DPW22. All other boards are compile tested. Mathias Kresin (12): lantiq: P2812HNUFX - move leds to dtsi lantiq: BTHOMEHUBV2B - remove missing usb led workaround lantiq: ARV4518PWR01* move redundant parts to dtsi lantiq: DGN1000B - fix typo in dts file lantiq: ARV752DPW22 - fix dts file lantiq: ARV752DPW - fix dts file lantiq: define default leds in dts files lantiq: use default leds defined in DTS lantiq: use power leds defined in DTS lantiq: use dsl led defined in DTS lantiq: add support for indicating the boot state using three leds lantiq: use soc:colour:function led naming scheme target/linux/lantiq/base-files/etc/board.d/01_leds | 63 ++- target/linux/lantiq/base-files/etc/diag.sh | 50 ++ .../lantiq/base-files/lib/functions/lantiq.sh | 16 ++ target/linux/lantiq/base-files/sbin/dsl_notify.sh | 14 +- target/linux/lantiq/dts/ARV4510PW.dts | 27 ++- target/linux/lantiq/dts/ARV4518PWR01.dts | 179 +-- target/linux/lantiq/dts/ARV4518PWR01.dtsi | 196 + target/linux/lantiq/dts/ARV4518PWR01A.dts | 179 +-- target/linux/lantiq/dts/ARV4519PW.dts | 60 --- target/linux/lantiq/dts/ARV4520PW.dts | 56 -- target/linux/lantiq/dts/ARV4525PW.dts | 29 ++- target/linux/lantiq/dts/ARV452CQW.dts | 55 +++--- target/linux/lantiq/dts/ARV7510PW22.dts| 16 +- target/linux/lantiq/dts/ARV7518PW.dts | 54 +++--- target/linux/lantiq/dts/ARV7519PW.dts | 24 ++- target/linux/lantiq/dts/ARV7519RW22.dts| 30 ++-- target/linux/lantiq/dts/ARV7525PW.dts | 31 ++-- target/linux/lantiq/dts/ARV752DPW.dts | 47 +++-- target/linux/lantiq/dts/ARV752DPW22.dts| 67 --- target/linux/lantiq/dts/ARV8539PW22.dts| 30 +++- target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 21 ++- target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 21 ++- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 23 ++- target/linux/lantiq/dts/DGN1000B.dts | 32 ++-- target/linux/lantiq/dts/DGN3500.dtsi | 44 +++-- target/linux/lantiq/dts/EASY80920.dtsi | 35 ++-- target/linux/lantiq/dts/FRITZ3370.dts | 35 ++-- target/linux/lantiq/dts/FRITZ7320.dts | 31 ++--
[OpenWrt-Devel] [PATCH 01/12] lantiq: P2812HNUFX - move leds to dtsi
Beside the used labels, they are the same on both boards. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/P2812HNUF1.dts | 61 - target/linux/lantiq/dts/P2812HNUF3.dts | 53 target/linux/lantiq/dts/P2812HNUFX.dtsi | 61 + 3 files changed, 61 insertions(+), 114 deletions(-) diff --git a/target/linux/lantiq/dts/P2812HNUF1.dts b/target/linux/lantiq/dts/P2812HNUF1.dts index 24ded3e..4dcaf27 100644 --- a/target/linux/lantiq/dts/P2812HNUF1.dts +++ b/target/linux/lantiq/dts/P2812HNUF1.dts @@ -42,65 +42,4 @@ compatible = "ralink,eeprom"; ralink,eeprom = "RT3062.eeprom"; }; - - gpio-leds { - compatible = "gpio-leds"; - - internet_red { /* red */ - label = "internet_red"; - gpios = <&stp 16 1>; - }; - internet_green { - label = "internet_green"; /* green */ - gpios = <&stp 17 1>; - }; - dsl { - label = "dsl"; - gpios = <&stp 18 1>; - }; - dsl2 { - label = "dsl2"; - gpios = <&stp 19 1>; - }; - wireless_red { /* red */ - label = "wireless_red"; - gpios = <&stp 20 1>; - }; - wireless_green {/* green */ - label = "wireless_green"; - gpios = <&stp 21 1>; - }; - power { /* red */ - label = "power"; - gpios = <&stp 22 1>; - }; - power2 {/* green */ - label = "power2"; - gpios = <&stp 23 1>; - }; - usb1 { /* green */ - label = "usb1"; - gpios = <&gpio 38 1>; - }; - usb2 { /* green */ - label = "usb2"; - gpios = <&gpio 44 1>; - }; - phone1 {/* green */ - label = "phone1"; - gpios = <&gpio 11 1>; - }; - phone1warn {/* red */ - label = "phone1warn"; - gpios = <&gpio 12 1>; - }; - phone2warn {/* red */ - label = "phone2warn"; - gpios = <&gpio 26 1>; - }; - phone2 {/* green */ - label = "phone2"; - gpios = <&gpio 28 1>; - }; - }; }; diff --git a/target/linux/lantiq/dts/P2812HNUF3.dts b/target/linux/lantiq/dts/P2812HNUF3.dts index 5d25c3c..a293f59 100644 --- a/target/linux/lantiq/dts/P2812HNUF3.dts +++ b/target/linux/lantiq/dts/P2812HNUF3.dts @@ -53,57 +53,4 @@ compatible = "ralink,eeprom"; ralink,eeprom = "RT3092.eeprom"; }; - - gpio-leds { - compatible = "gpio-leds"; - - internet2 { - label = "internet2"; - gpios = <&stp 16 1>; - }; - internet { - label = "internet"; - gpios = <&stp 17 1>; - }; - dsl { - label = "dsl"; - gpios = <&stp 18 1>; - }; - dsl2 { - label = "dsl2"; - gpios = <&stp 19 1>; - }; - wireless_red { - label = "wireless_red"; - gpios = <&stp 20 1>; - }; - wireless_green { - label = "wireless_green"; - gpios = <&stp 21 1>; - }; - power2 { - label = "power2"; - gpios = <&stp 22 1>; -
[OpenWrt-Devel] [PATCH 03/12] lantiq: ARV4518PWR01* move redundant parts to dtsi
Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV4518PWR01.dts | 179 + target/linux/lantiq/dts/ARV4518PWR01.dtsi | 184 ++ target/linux/lantiq/dts/ARV4518PWR01A.dts | 179 + 3 files changed, 186 insertions(+), 356 deletions(-) create mode 100644 target/linux/lantiq/dts/ARV4518PWR01.dtsi diff --git a/target/linux/lantiq/dts/ARV4518PWR01.dts b/target/linux/lantiq/dts/ARV4518PWR01.dts index f2a2e18..7dfdb6f 100644 --- a/target/linux/lantiq/dts/ARV4518PWR01.dts +++ b/target/linux/lantiq/dts/ARV4518PWR01.dts @@ -1,192 +1,15 @@ /dts-v1/; -/include/ "danube.dtsi" +/include/ "ARV4518PWR01.dtsi" / { model = "ARV4518PWR01 - SMC7908A-ISP"; - chosen { - bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; - }; - - memory@0 { - reg = <0x0 0x400>; - }; - - sram@1F00 { - vmmc@107000 { - status = "okay"; - gpios = <&gpio 31 0>; - }; - }; - fpi@1000 { - localbus@0 { - nor-boot@0 { - compatible = "lantiq,nor"; - bank-width = <2>; - reg = <0 0x0 0x200>; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "uboot"; - reg = <0x0 0x1>; /* 64 KB */ - read-only; - }; - - partition@1 { - label = "uboot_env"; - reg = <0x1 0x1>; /* 64 KB */ - read-only; - }; - - partition@2 { - label = "firmware"; - reg = <0x2 0x3d>; - }; - - partition@40 { - label = "boardconfig"; - reg = <0x3f 0x1>; - read-only; - }; - }; - - gpiomm: gpiomm@400 { - compatible = "lantiq,gpio-mm"; - reg = <1 0x0 0x10 >; - #address-cells = <1>; - #size-cells = <1>; - #gpio-cells = <2>; - gpio-controller; - lantiq,shadow = <0x0>; - }; - - mac_addr { - compatible = "lantiq,eth-mac"; - reg = <0 0x3f0016 0x6>; - mac-increment = <2>; - }; - - ath5k_eep { - compatible = "ath5k,eeprom"; - reg = <0 0x3f0400 0x1000 - 0 0x3f0016 0x6>; - ath,mac-increment = <1>; - ath,eep-swap; - }; - }; - - gpio: pinmux@E100B10 { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - ebu { - lantiq,groups = "ebu cs1"; - lantiq,function = "ebu"; - }; - pci_in { - lantiq,groups = "req1", "req2"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1", "gnt2"; - lantiq,function = "pci"; - lantiq,p
[OpenWrt-Devel] [PATCH 02/12] lantiq: BTHOMEHUBV2B - remove missing usb led workaround
The workaround shouldn't be in the default configuration. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 1 - 1 file changed, 1 deletion(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index b5801ca..9d57cf3 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -25,7 +25,6 @@ BTHOMEHUBV2B) # ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0radio" ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" - ucidef_set_led_usbdev "usb" "usb" "soc:blue:phone" "1-1" ;; BTHOMEHUBV3A) ucidef_set_led_default "power" "power" "soc:blue:power" "1" -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 05/12] lantiq: ARV752DPW22 - fix dts file
No need to switch (and keep) on all leds at boot. Use the same led logic and labels as the OEM firmware (red = okay, blue = failure). Add the red internet led. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV752DPW22.dts | 34 - 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/target/linux/lantiq/dts/ARV752DPW22.dts b/target/linux/lantiq/dts/ARV752DPW22.dts index ec4a3ab..168dc66 100644 --- a/target/linux/lantiq/dts/ARV752DPW22.dts +++ b/target/linux/lantiq/dts/ARV752DPW22.dts @@ -174,80 +174,70 @@ gpio-leds { compatible = "gpio-leds"; - power { - label = "power"; + power1 { + label = "power1"; gpios = <&gpio 3 1>; - default-state = "on"; + }; + internet { + label = "internet"; + gpios = <&gpio 4 1>; }; message { label = "message"; gpios = <&gpio 5 1>; - default-state = "on"; }; - power1 { - label = "power1"; + power { + label = "power"; gpios = <&gpio 6 1>; - default-state = "on"; + default-state = "keep"; }; voice1 { label = "voice1"; gpios = <&gpio 8 1>; - default-state = "on"; }; microphone { - label = "microphone"; + label = "umts"; gpios = <&gpiomm 3 1>; - default-state = "on"; }; wifi { label = "wifi_rt"; gpios = <&gpiomm 4 1>; - default-state = "on"; }; fxs1 { label = "fxs1"; gpios = <&gpiomm 5 1>; - default-state = "on"; }; fxs2 { label = "fxs2"; gpios = <&gpiomm 6 1>; - default-state = "on"; }; fxo { label = "fxo"; gpios = <&gpiomm 7 1>; - default-state = "on"; }; - dsl { - label = "dsl"; + internet2 { + label = "internet2"; gpios = <&gpiomm 8 1>; - default-state = "on"; }; voice2 { label = "voice2"; gpios = <&gpiomm 9 1>; - default-state = "on"; }; eth1 { label = "eth1"; gpios = <&gpiomm 11 1>; -default-state = "on"; }; eth2 { label = "eth2"; gpios = <&gpiomm 12 1>; - default-state = "on"; }; eth3 { label = "eth3"; gpios = <&gpiomm 13 1>; - default-state = "on"; }; eth4 { label = "eth4"; gpios = <&gpiomm 14 1>; - default-state = "on"; }; }; }; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 04/12] lantiq: DGN1000B - fix typo in dts file
Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/DGN1000B.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/dts/DGN1000B.dts b/target/linux/lantiq/dts/DGN1000B.dts index 4ccab93..199d3a9 100644 --- a/target/linux/lantiq/dts/DGN1000B.dts +++ b/target/linux/lantiq/dts/DGN1000B.dts @@ -107,7 +107,7 @@ }; gpio-leds { - cmpatible = "gpio-leds"; + compatible = "gpio-leds"; dsl { label = "dsl"; gpios = <&gpio 1 1>; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 08/12] lantiq: use default leds defined in DTS
Remove all now double defined leds from the led board file. Use pppoe as default for all broadband connections, since it's the default in OpenWrt now. Rename the the wifi leds to make sure, the not applicable default values get overwritten. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 27 ++ .../lantiq/base-files/lib/functions/lantiq.sh | 16 + 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index 9d57cf3..7a25b6d 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -9,10 +9,10 @@ board_config_update -[ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tpt" -[ -e "/sys/class/leds/usb" ] && ucidef_set_led_usbdev "usb" "usb" "usb" "1-1" -[ -e "/sys/class/leds/usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "usb2" "2-1" -[ -e "/sys/class/leds/internet" ] && ucidef_set_led_netdev "internet" "internet" "internet" "pppoe-wan" +[ -n "$(lantiq_is_dt_led_chosen wifi)" ] && ucidef_set_led_wlan "wifi" "wifi" "$(lantiq_get_dt_led_chosen wifi)" "phy0tpt" +[ -n "$(lantiq_is_dt_led_chosen usb)" ] && ucidef_set_led_usbdev "usb" "usb" "$(lantiq_get_dt_led_chosen usb)" "1-1" +[ -n "$(lantiq_is_dt_led_chosen usb2)" ] && ucidef_set_led_usbdev "usb2" "usb2" "$(lantiq_get_dt_led_chosen usb2)" "2-1" +[ -n "$(lantiq_is_dt_led_chosen internet)" ] && ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "pppoe-wan" board=$(lantiq_board_name) @@ -22,19 +22,12 @@ VG3503J) ;; BTHOMEHUBV2B) ucidef_set_led_default "power" "power" "soc:blue:power" "1" -# ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0radio" - ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" - ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ;; BTHOMEHUBV3A) ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" - ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ;; BTHOMEHUBV5A) ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" - ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; VGV7510KW22) @@ -42,33 +35,27 @@ VGV7510KW22) ucidef_set_led_default "power2" "power2" "power2" "0" ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" - ucidef_set_led_netdev "internet_green" "internet_green" "internet_green" "pppoe-wan" ;; VGV7519) ucidef_set_led_default "power" "power" "power" "0" ucidef_set_led_default "power2" "power2" "power2" "1" - ucidef_set_led_wlan "wireless_yellow" "wireless_yellow" "wireless_yellow" "phy0radio" - ucidef_set_led_netdev "internet_yellow" "internet_yellow" "internet_yellow" "nas0" - ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "pppoe-wan" + ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" + ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "nas0" ;; P2812HNUF*) ucidef_set_led_default "power" "power" &quo
[OpenWrt-Devel] [PATCH 07/12] lantiq: define default leds in dts files
- ARV7525PW: use the power led as dsl led as done by the stock firmware - FRITZ3370: use the info led as internet led - FRITZ7320: use the power led as dsl led as done by the stock firmware Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV4510PW.dts | 24 +--- target/linux/lantiq/dts/ARV4518PWR01.dtsi | 18 +- target/linux/lantiq/dts/ARV4519PW.dts | 21 +++-- target/linux/lantiq/dts/ARV4520PW.dts | 21 +++-- target/linux/lantiq/dts/ARV4525PW.dts | 16 +--- target/linux/lantiq/dts/ARV452CQW.dts | 15 +++ target/linux/lantiq/dts/ARV7510PW22.dts | 12 +--- target/linux/lantiq/dts/ARV7518PW.dts | 21 +++-- target/linux/lantiq/dts/ARV7519PW.dts | 18 +- target/linux/lantiq/dts/ARV7519RW22.dts | 9 +++-- target/linux/lantiq/dts/ARV7525PW.dts | 16 target/linux/lantiq/dts/ARV752DPW.dts | 15 +++ target/linux/lantiq/dts/ARV752DPW22.dts | 15 +++ target/linux/lantiq/dts/ARV8539PW22.dts | 17 + target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 9 +++-- target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 11 --- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 9 +++-- target/linux/lantiq/dts/DGN1000B.dts | 12 +--- target/linux/lantiq/dts/DGN3500.dtsi | 21 +++-- target/linux/lantiq/dts/EASY80920.dtsi| 12 +--- target/linux/lantiq/dts/FRITZ3370.dts | 18 +- target/linux/lantiq/dts/FRITZ7320.dts | 13 ++--- target/linux/lantiq/dts/GR7000.dts| 15 +++ target/linux/lantiq/dts/H201L.dts | 18 +- target/linux/lantiq/dts/P2601HNFX.dts | 18 +- target/linux/lantiq/dts/P2812HNUFX.dtsi | 24 +--- target/linux/lantiq/dts/TDW89X0.dtsi | 19 ++- target/linux/lantiq/dts/VG3503J.dtsi | 12 +--- target/linux/lantiq/dts/VGV7510KW22.dtsi | 18 +- target/linux/lantiq/dts/VGV7519.dtsi | 18 +- target/linux/lantiq/dts/WBMR.dts | 21 +++-- 31 files changed, 371 insertions(+), 135 deletions(-) diff --git a/target/linux/lantiq/dts/ARV4510PW.dts b/target/linux/lantiq/dts/ARV4510PW.dts index 4772495..427cd54 100644 --- a/target/linux/lantiq/dts/ARV4510PW.dts +++ b/target/linux/lantiq/dts/ARV4510PW.dts @@ -7,6 +7,16 @@ chosen { bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; + + leds { + dsl = &adsl; + internet = &internet; + power = &power; + power2 = &power2; + usb = &usb; + usb2 = &usb2; + wifi = &wifi; + }; }; memory@0 { @@ -139,11 +149,11 @@ gpio-leds { compatible = "gpio-leds"; - power { + power: power { label = "power"; gpios = <&gpios 21 0>; }; - power2 { + power2: power2 { label = "power2"; gpios = <&gpios 20 0>; }; @@ -163,15 +173,15 @@ label = "lan4"; gpios = <&gpios 16 0>; }; - wifi { + wifi: wifi { label = "wifi"; gpios = <&gpios 15 0>; }; - adsl { + adsl: adsl { label = "adsl"; gpios = <&gpios 14 0>; }; - internet { + internet: internet { label = "internet"; gpios = <&gpios 13 0>; }; @@ -191,11 +201,11 @@ label = "phone2"; gpios = <&gpios 9 0>; }; - usb { + usb: usb { label = "usb"; gpios = <&gpios 8 0>; }; - usb2 { + usb2: usb2 { label = "usb2"; gpios = <&gpios 7 0>; }; diff --git a/target/linux/lantiq/dts/ARV4518PWR01.dtsi b/target/linux/lantiq/dts/ARV4518PWR01.dtsi index 0699707..41d17de 100644 --- a/target/linux/lantiq/dts/ARV4518PWR01.dtsi +++ b/target/linux/lantiq/dts/ARV4518PWR01.dtsi @@ -3,6 +3,14 @@ / { chosen { bootargs = "console=ttyLTQ0,115
[OpenWrt-Devel] [PATCH 10/12] lantiq: use dsl led defined in DTS
dsl_control (dsl_notify.sh) is the only process which is aware of the state of the atm/ptm interface. Use the dsl led exclusive for the dsl line state. On boards which don't have a distinct internet and a dsl led, let the netdev status of the atm interface trigger the shared led. Triggering the shared led according to the status of the ppp interface isn't suitable, since the led would be switched of if the ppp connection goes down, but the line is still in sync. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 19 +++ target/linux/lantiq/base-files/sbin/dsl_notify.sh | 14 +++--- target/linux/lantiq/dts/ARV452CQW.dts | 2 +- target/linux/lantiq/dts/VG3503J.dtsi | 2 +- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index 7a25b6d..a95c72c 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -12,14 +12,21 @@ board_config_update [ -n "$(lantiq_is_dt_led_chosen wifi)" ] && ucidef_set_led_wlan "wifi" "wifi" "$(lantiq_get_dt_led_chosen wifi)" "phy0tpt" [ -n "$(lantiq_is_dt_led_chosen usb)" ] && ucidef_set_led_usbdev "usb" "usb" "$(lantiq_get_dt_led_chosen usb)" "1-1" [ -n "$(lantiq_is_dt_led_chosen usb2)" ] && ucidef_set_led_usbdev "usb2" "usb2" "$(lantiq_get_dt_led_chosen usb2)" "2-1" -[ -n "$(lantiq_is_dt_led_chosen internet)" ] && ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "pppoe-wan" + +[ -n "$(lantiq_is_dt_led_chosen internet)" ] && { + interface="nas0" + + [ -n "$(lantiq_is_dt_led_chosen dsl)" ] && { + interface="pppoe-wan" + ucidef_set_led_default "dsl" "dsl" "$(lantiq_get_dt_led_chosen dsl)" "0" + } + + ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "$interface" +} board=$(lantiq_board_name) case "$board" in -VG3503J) - ucidef_set_led_netdev "vdsl" "vdsl" "bt:green:dsl" "ptm0" - ;; BTHOMEHUBV2B) ucidef_set_led_default "power" "power" "soc:blue:power" "1" ;; @@ -34,19 +41,16 @@ VGV7510KW22) ucidef_set_led_default "power" "power" "power" "1" ucidef_set_led_default "power2" "power2" "power2" "0" ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" - ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" ;; VGV7519) ucidef_set_led_default "power" "power" "power" "0" ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" - ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "nas0" ;; P2812HNUF*) ucidef_set_led_default "power" "power" "power" "0" ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio" - ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" ;; ARV7519RW22) ucidef_set_led_default "power" "power" "power" "1" @@ -55,7 +59,6 @@ ARV7519RW22) ARV8539PW22) ucidef_set_led_default "power" "power" "soc:green:power" "1" ucidef_set_led_default "power2" "power2" "soc:red:power" "0" -ucidef_set_led_netdev "dsl" "dsl" "soc:green:dsl" "nas0" ;; *) ;; diff --git a/target/linux/lantiq/base-files/sbin/dsl_notify.sh b/target/linux/lantiq/base-files/sbin/dsl_notify.sh index b514e25..01d0488 100755 --- a/target/linux/lantiq/base-files/sbin/dsl_notify.sh +++ b/target/linux/lantiq/base-files/sbin/dsl_notify.sh @@ -16,15 +16,15 @@ include /lib/network scan_interfaces -local default +local led config_load system -config_get default led_adsl default -if [ "$defa
[OpenWrt-Devel] [PATCH 06/12] lantiq: ARV752DPW - fix dts file
Use the same led logic and labels as the OEM firmware (red = okay, blue = failure). Add the red internet led. Remove missing usb led workaround. The workaround shouldn't be in the default configuration. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV752DPW.dts | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/target/linux/lantiq/dts/ARV752DPW.dts b/target/linux/lantiq/dts/ARV752DPW.dts index fe478e1..8848c71 100644 --- a/target/linux/lantiq/dts/ARV752DPW.dts +++ b/target/linux/lantiq/dts/ARV752DPW.dts @@ -170,25 +170,29 @@ gpio-leds { compatible = "gpio-leds"; - power { - label = "power"; + power1 { + label = "power1"; gpios = <&gpio 3 1>; }; + internet { + label = "internet"; + gpios = <&gpio 4 1>; + }; message { label = "message"; gpios = <&gpio 5 1>; }; - power1 { - label = "power1"; + power { + label = "power"; gpios = <&gpio 6 1>; + default-state = "keep"; }; voice1 { label = "voice1"; gpios = <&gpio 8 1>; }; microphone { - /* use this led as te usb led */ - label = "usb"; + label = "umts"; gpios = <&gpiomm 3 1>; }; wifi { @@ -199,7 +203,7 @@ label = "fxs1"; gpios = <&gpiomm 5 1>; }; - fx2 { + fxs2 { label = "fxs2"; gpios = <&gpiomm 6 1>; }; @@ -207,8 +211,8 @@ label = "fxo"; gpios = <&gpiomm 7 1>; }; - internet { - label = "internet"; + internet2 { + label = "internet2"; gpios = <&gpiomm 8 1>; }; voice2 { -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 09/12] lantiq: use power leds defined in DTS
Use the power leds defined in the dts file instead of hardcoded led names. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/diag.sh | 34 +- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh index 57a7055..0e65e61 100644 --- a/target/linux/lantiq/base-files/etc/diag.sh +++ b/target/linux/lantiq/base-files/etc/diag.sh @@ -2,49 +2,53 @@ # Copyright (C) 2012-2013 OpenWrt.org . /lib/functions/leds.sh +. /lib/functions/lantiq.sh -status_led=power -[ ! -d /sys/class/leds/power/ ] && [ ! -d /sys/class/leds/power1/ ] && [ ! -d /sys/class/leds/power2/ ] && [ -d /sys/class/leds/wps/ ] && status_led=wps +power="$(lantiq_get_dt_led_chosen power)" +power1="$(lantiq_get_dt_led_chosen power1)" +power2="$(lantiq_get_dt_led_chosen power2)" + +status_led="$power" set_state() { case "$1" in preinit) - if [ -d /sys/class/leds/power2/ ]; then + if [ -n "$power2" ]; then status_led_on - status_led=power2 + status_led="$power2" status_led_blink_preinit - status_led=power + status_led="$power" else status_led_blink_preinit fi ;; failsafe) - if [ -d /sys/class/leds/power2/ ]; then - led_off power2 + if [ -n "$power2" ]; then + led_off "$power2" status_led_blink_failsafe - elif [ -d /sys/class/leds/power1/ ]; then + elif [ -n "$power1" ]; then status_led_off - status_led=power1 + status_led="$power1" status_led_blink_failsafe - status_led=power + status_led="$power" else status_led_blink_failsafe fi ;; preinit_regular) - if [ -d /sys/class/leds/power2/ ]; then + if [ -n "$power2" ]; then status_led_on - status_led=power2 + status_led="$power2" status_led_blink_preinit_regular - status_led=power + status_led="$power" else status_led_blink_preinit_regular fi ;; done) status_led_on - led_off power1 - led_off power2 + led_off "$power1" + led_off "$power2" ;; esac } -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 12/12] lantiq: use soc:colour:function led naming scheme
The leds of the following boards are not renamed due to lack of manuals/informations: - ARV7519PW - ARV7510PW22 - ARV4510PW The leds of the ARV4518PWR01* boards are unchanged, since the leds doesn't match the leds from the manual or pictures (e.g. there shouldn't be a wps led). Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 6 +- target/linux/lantiq/dts/ARV4519PW.dts | 50 target/linux/lantiq/dts/ARV4520PW.dts | 40 +++-- target/linux/lantiq/dts/ARV4525PW.dts | 10 ++-- target/linux/lantiq/dts/ARV452CQW.dts | 48 --- target/linux/lantiq/dts/ARV7518PW.dts | 44 +++--- target/linux/lantiq/dts/ARV7519PW.dts | 2 +- target/linux/lantiq/dts/ARV7519RW22.dts| 14 ++--- target/linux/lantiq/dts/ARV7525PW.dts | 24 target/linux/lantiq/dts/ARV752DPW.dts | 38 ++-- target/linux/lantiq/dts/ARV752DPW22.dts| 46 +++--- target/linux/lantiq/dts/ARV8539PW22.dts| 7 ++- target/linux/lantiq/dts/DGN1000B.dts | 17 +++--- target/linux/lantiq/dts/DGN3500.dtsi | 20 --- target/linux/lantiq/dts/EASY80920.dtsi | 18 +++--- target/linux/lantiq/dts/FRITZ3370.dts | 14 ++--- target/linux/lantiq/dts/FRITZ7320.dts | 18 +++--- target/linux/lantiq/dts/GR7000.dts | 14 ++--- target/linux/lantiq/dts/H201L.dts | 14 ++--- target/linux/lantiq/dts/P2601HNFX.dts | 28 - target/linux/lantiq/dts/P2812HNUFX.dtsi| 64 ++-- target/linux/lantiq/dts/TDW8980.dts| 2 +- target/linux/lantiq/dts/TDW89X0.dtsi | 14 +++-- target/linux/lantiq/dts/VG3503J.dtsi | 16 ++--- target/linux/lantiq/dts/VGV7510KW22.dtsi | 30 +- target/linux/lantiq/dts/VGV7519.dtsi | 70 +++--- target/linux/lantiq/dts/WBMR.dts | 32 +- 27 files changed, 362 insertions(+), 338 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index ac9e14e..08200e3 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -31,13 +31,13 @@ BTHOMEHUBV5A) ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; VGV7510KW22) - ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" + ucidef_set_led_wlan "wifi" "wifi" "soc:green:wlan" "phy0radio" ;; VGV7519) - ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" + ucidef_set_led_wlan "wifi" "wifi" "soc:green:wireless" "phy0radio" ;; P2812HNUF*) - ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio" + ucidef_set_led_wlan "wifi" "wifi" "soc:green:wlan" "phy0radio" ;; ARV7519RW22) ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1" diff --git a/target/linux/lantiq/dts/ARV4519PW.dts b/target/linux/lantiq/dts/ARV4519PW.dts index be65337..07768a4 100644 --- a/target/linux/lantiq/dts/ARV4519PW.dts +++ b/target/linux/lantiq/dts/ARV4519PW.dts @@ -3,18 +3,18 @@ /include/ "danube.dtsi" / { - model = "ARV4519PW - Vodafone, Pirelli"; + model = "ARV4519PW - Vodafone Netfaster IAD 2, Pirelli P.RG A4201G"; chosen { bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; leds { - boot = &power; - failsafe = &power2; - running = &power; + boot = &power_green; + failsafe = &power_red; + running = &power_green; dsl = &dsl; - internet = &online; + internet = &internet_green; usb = &usb; wifi = &wifi; }; @@ -129,61 +129,61 @@ gpio-leds { compatible = "gpio-leds"; - power: power { - label = "power"; + power_green: power { + label = "soc:green:power"; gpios = <&gpio 2 1>; default-state = "keep"; }; - power2: power2 { -
[OpenWrt-Devel] [PATCH 11/12] lantiq: add support for indicating the boot state using three leds
The BTHOMEHUBV5A has a RGB power led, where every colour is perfect to indicate the current boot state. This patch adds support for such cases. The existing led sequences should be the same as before. Boards which are using a led different from power (like TDW89x0) are changed to switch of the led after boot Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 18 target/linux/lantiq/base-files/etc/diag.sh | 52 +++--- target/linux/lantiq/dts/ARV4510PW.dts | 7 ++- target/linux/lantiq/dts/ARV4518PWR01.dtsi | 6 ++- target/linux/lantiq/dts/ARV4519PW.dts | 7 ++- target/linux/lantiq/dts/ARV4520PW.dts | 11 +++-- target/linux/lantiq/dts/ARV4525PW.dts | 9 ++-- target/linux/lantiq/dts/ARV452CQW.dts | 8 +++- target/linux/lantiq/dts/ARV7510PW22.dts| 6 ++- target/linux/lantiq/dts/ARV7518PW.dts | 7 ++- target/linux/lantiq/dts/ARV7519PW.dts | 8 ++-- target/linux/lantiq/dts/ARV7519RW22.dts| 9 ++-- target/linux/lantiq/dts/ARV7525PW.dts | 7 ++- target/linux/lantiq/dts/ARV752DPW.dts | 6 ++- target/linux/lantiq/dts/ARV752DPW22.dts| 6 ++- target/linux/lantiq/dts/ARV8539PW22.dts| 8 +++- target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 12 +++-- target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 12 +++-- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 14 -- target/linux/lantiq/dts/DGN1000B.dts | 7 ++- target/linux/lantiq/dts/DGN3500.dtsi | 11 +++-- target/linux/lantiq/dts/EASY80920.dtsi | 7 ++- target/linux/lantiq/dts/FRITZ3370.dts | 11 +++-- target/linux/lantiq/dts/FRITZ7320.dts | 6 ++- target/linux/lantiq/dts/GR7000.dts | 7 +-- target/linux/lantiq/dts/H201L.dts | 9 ++-- target/linux/lantiq/dts/P2601HNFX.dts | 8 ++-- target/linux/lantiq/dts/P2812HNUFX.dtsi| 7 ++- target/linux/lantiq/dts/TDW89X0.dtsi | 6 ++- target/linux/lantiq/dts/VG3503J.dtsi | 7 ++- target/linux/lantiq/dts/VGV7510KW22.dtsi | 7 ++- target/linux/lantiq/dts/VGV7519.dtsi | 8 ++-- target/linux/lantiq/dts/WBMR.dts | 7 ++- 33 files changed, 189 insertions(+), 132 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index a95c72c..ac9e14e 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -27,39 +27,21 @@ board_config_update board=$(lantiq_board_name) case "$board" in -BTHOMEHUBV2B) - ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ;; -BTHOMEHUBV3A) - ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ;; BTHOMEHUBV5A) - ucidef_set_led_default "power" "power" "soc:blue:power" "1" ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; VGV7510KW22) - ucidef_set_led_default "power" "power" "power" "1" - ucidef_set_led_default "power2" "power2" "power2" "0" ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" ;; VGV7519) - ucidef_set_led_default "power" "power" "power" "0" - ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" ;; P2812HNUF*) - ucidef_set_led_default "power" "power" "power" "0" - ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio" ;; ARV7519RW22) - ucidef_set_led_default "power" "power" "power" "1" ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1" ;; -ARV8539PW22) -ucidef_set_led_default "power" "power" "soc:green:power" "1" -ucidef_set_led_default "power2" "power2" "soc:red:power" "0" -;; *) ;; esac diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh index 0e65e61..8356bcd 100644 --- a/target/linux/lantiq/
[OpenWrt-Devel] [PATCH] lantiq: TDW89x0 - increase spi frequency
Use the same max spi frequency as set in u-boot. According to the datasheets, the Q64-104HIP as well as the Winbond 25Q64FVSIG support spi frequencies up to 50 MHz. During my tests, the Q64-104HIP couldn't be recognized/initialized if the frequency was > 40MHz. Both chips do support fast read as well. While touching the dts file, I fixed the dtc compiler warnings. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/TDW89X0.dtsi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/dts/TDW89X0.dtsi b/target/linux/lantiq/dts/TDW89X0.dtsi index b2dbb21..734f618 100644 --- a/target/linux/lantiq/dts/TDW89X0.dtsi +++ b/target/linux/lantiq/dts/TDW89X0.dtsi @@ -27,12 +27,14 @@ interrupt-parent = <&icu0>; interrupts = <22 23 24>; #address-cells = <1>; + #size-cells = <1>; m25p80@0 { #address-cells = <1>; #size-cells = <1>; compatible = "jedec,spi-nor"; - reg = <3>; - spi-max-frequency = <2000>; + reg = <3 0>; + spi-max-frequency = <3325>; + m25p,fast-read; partition@0 { reg = <0x0 0x2>; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: ltq-adsl-mei: fix typo
Signed-off-by: Mathias Kresin --- package/kernel/lantiq/ltq-adsl-mei/patches/100_no-date-time.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/lantiq/ltq-adsl-mei/patches/100_no-date-time.patch b/package/kernel/lantiq/ltq-adsl-mei/patches/100_no-date-time.patch index 741c5b7..219243f 100644 --- a/package/kernel/lantiq/ltq-adsl-mei/patches/100_no-date-time.patch +++ b/package/kernel/lantiq/ltq-adsl-mei/patches/100_no-date-time.patch @@ -6,7 +6,7 @@ seq_printf(s, "%s" MEI_DRV_CRLF, &MEI_WHATVERSION[4]); - seq_printf(s, "Compiled on %s, %s for Linux kernel %s (jiffies: %ld)" MEI_DRV_CRLF, -__DATE__, __TIME__, UTS_RELEASE, jiffies); -+ seq_printf(s, "Compiled on for Linux kernel %s (jiffies: %ld)" MEI_DRV_CRLF, ++ seq_printf(s, "Compiled for Linux kernel %s (jiffies: %ld)" MEI_DRV_CRLF, +UTS_RELEASE, jiffies); } -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: fix PCI_DEVICE_ID_LANTIQ_PCIE
It's not necessary to define PCI_* if pci_ids.h is included a few lines above. The change to pci_ids.h doesn't look intentional to me, especially since the former value is added to the top of ifxmips_fixup_pcie.c. Both changes were introduced with the kernel 4.1 support patches and were not present in the 3.18 patches. Signed-off-by: Mathias Kresin --- .../patches-4.1/0001-MIPS-lantiq-add-pcie-driver.patch | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/target/linux/lantiq/patches-4.1/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-4.1/0001-MIPS-lantiq-add-pcie-driver.patch index e65e982..1b78acd 100644 --- a/target/linux/lantiq/patches-4.1/0001-MIPS-lantiq-add-pcie-driver.patch +++ b/target/linux/lantiq/patches-4.1/0001-MIPS-lantiq-add-pcie-driver.patch @@ -89,7 +89,7 @@ Signed-off-by: John Crispin obj-$(CONFIG_TANBAC_TB0287) += fixup-tb0287.o --- /dev/null +++ b/arch/mips/pci/fixup-lantiq-pcie.c -@@ -0,0 +1,82 @@ +@@ -0,0 +1,74 @@ +/** +** +** FILE NAME: ifxmips_fixup_pcie.c @@ -124,14 +124,6 @@ Signed-off-by: John Crispin + +#include "pcie-lantiq.h" + -+#define PCI_VENDOR_ID_INFINEON 0x15D1 -+#define PCI_DEVICE_ID_INFINEON_DANUBE 0x000F -+#define PCI_DEVICE_ID_INFINEON_PCIE0x0011 -+#define PCI_VENDOR_ID_LANTIQ0x1BEF -+#define PCI_DEVICE_ID_LANTIQ_PCIE 0x0011 -+ -+ -+ +static void +ifx_pcie_fixup_resource(struct pci_dev *dev) +{ @@ -5533,7 +5525,7 @@ Signed-off-by: John Crispin +#define PCI_DEVICE_ID_INFINEON_DANUBE 0x000F +#define PCI_DEVICE_ID_INFINEON_PCIE 0x0011 +#define PCI_VENDOR_ID_LANTIQ 0x1BEF -+#define PCI_DEVICE_ID_LANTIQ_PCIE 0x00 ++#define PCI_DEVICE_ID_LANTIQ_PCIE 0x0011 + #define PCI_VENDOR_ID_WINBOND 0x10ad #define PCI_DEVICE_ID_WINBOND_82C105 0x0105 -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: fix Image Builder
Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 686cb6d..553bdc1 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -426,8 +426,7 @@ Image/BuildKernel/Profile/VGV7519BRN=$(call Image/BuildKernel/Template,VGV7519BR Image/Build/Profile/VGV7519BRN=$(call Image/Build/$(1),$(1),VGV7519BRN,5D8000,0x12345678,0x2083b8ed,$(1)) define Image/Prepare - $(call Image/Prepare/Profile,VG3503J) - $(call Image/Prepare/Profile,VG3503J_V2) + $(call Image/Prepare/Profile,$(PROFILE)) endef endif -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 01/12] lantiq: P2812HNUFX - move leds to dtsi
Beside the used labels, they are the same on both boards. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/P2812HNUF1.dts | 61 - target/linux/lantiq/dts/P2812HNUF3.dts | 53 target/linux/lantiq/dts/P2812HNUFX.dtsi | 61 + 3 files changed, 61 insertions(+), 114 deletions(-) diff --git a/target/linux/lantiq/dts/P2812HNUF1.dts b/target/linux/lantiq/dts/P2812HNUF1.dts index 24ded3e..4dcaf27 100644 --- a/target/linux/lantiq/dts/P2812HNUF1.dts +++ b/target/linux/lantiq/dts/P2812HNUF1.dts @@ -42,65 +42,4 @@ compatible = "ralink,eeprom"; ralink,eeprom = "RT3062.eeprom"; }; - - gpio-leds { - compatible = "gpio-leds"; - - internet_red { /* red */ - label = "internet_red"; - gpios = <&stp 16 1>; - }; - internet_green { - label = "internet_green"; /* green */ - gpios = <&stp 17 1>; - }; - dsl { - label = "dsl"; - gpios = <&stp 18 1>; - }; - dsl2 { - label = "dsl2"; - gpios = <&stp 19 1>; - }; - wireless_red { /* red */ - label = "wireless_red"; - gpios = <&stp 20 1>; - }; - wireless_green {/* green */ - label = "wireless_green"; - gpios = <&stp 21 1>; - }; - power { /* red */ - label = "power"; - gpios = <&stp 22 1>; - }; - power2 {/* green */ - label = "power2"; - gpios = <&stp 23 1>; - }; - usb1 { /* green */ - label = "usb1"; - gpios = <&gpio 38 1>; - }; - usb2 { /* green */ - label = "usb2"; - gpios = <&gpio 44 1>; - }; - phone1 {/* green */ - label = "phone1"; - gpios = <&gpio 11 1>; - }; - phone1warn {/* red */ - label = "phone1warn"; - gpios = <&gpio 12 1>; - }; - phone2warn {/* red */ - label = "phone2warn"; - gpios = <&gpio 26 1>; - }; - phone2 {/* green */ - label = "phone2"; - gpios = <&gpio 28 1>; - }; - }; }; diff --git a/target/linux/lantiq/dts/P2812HNUF3.dts b/target/linux/lantiq/dts/P2812HNUF3.dts index 5d25c3c..a293f59 100644 --- a/target/linux/lantiq/dts/P2812HNUF3.dts +++ b/target/linux/lantiq/dts/P2812HNUF3.dts @@ -53,57 +53,4 @@ compatible = "ralink,eeprom"; ralink,eeprom = "RT3092.eeprom"; }; - - gpio-leds { - compatible = "gpio-leds"; - - internet2 { - label = "internet2"; - gpios = <&stp 16 1>; - }; - internet { - label = "internet"; - gpios = <&stp 17 1>; - }; - dsl { - label = "dsl"; - gpios = <&stp 18 1>; - }; - dsl2 { - label = "dsl2"; - gpios = <&stp 19 1>; - }; - wireless_red { - label = "wireless_red"; - gpios = <&stp 20 1>; - }; - wireless_green { - label = "wireless_green"; - gpios = <&stp 21 1>; - }; - power2 { - label = "power2"; - gpios = <&stp 22 1>; -
[OpenWrt-Devel] [PATCH v2 03/12] lantiq: ARV4518PWR01* move redundant parts to dtsi
Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV4518PWR01.dts | 179 + target/linux/lantiq/dts/ARV4518PWR01.dtsi | 184 ++ target/linux/lantiq/dts/ARV4518PWR01A.dts | 179 + 3 files changed, 186 insertions(+), 356 deletions(-) create mode 100644 target/linux/lantiq/dts/ARV4518PWR01.dtsi diff --git a/target/linux/lantiq/dts/ARV4518PWR01.dts b/target/linux/lantiq/dts/ARV4518PWR01.dts index f2a2e18..7dfdb6f 100644 --- a/target/linux/lantiq/dts/ARV4518PWR01.dts +++ b/target/linux/lantiq/dts/ARV4518PWR01.dts @@ -1,192 +1,15 @@ /dts-v1/; -/include/ "danube.dtsi" +/include/ "ARV4518PWR01.dtsi" / { model = "ARV4518PWR01 - SMC7908A-ISP"; - chosen { - bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; - }; - - memory@0 { - reg = <0x0 0x400>; - }; - - sram@1F00 { - vmmc@107000 { - status = "okay"; - gpios = <&gpio 31 0>; - }; - }; - fpi@1000 { - localbus@0 { - nor-boot@0 { - compatible = "lantiq,nor"; - bank-width = <2>; - reg = <0 0x0 0x200>; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "uboot"; - reg = <0x0 0x1>; /* 64 KB */ - read-only; - }; - - partition@1 { - label = "uboot_env"; - reg = <0x1 0x1>; /* 64 KB */ - read-only; - }; - - partition@2 { - label = "firmware"; - reg = <0x2 0x3d>; - }; - - partition@40 { - label = "boardconfig"; - reg = <0x3f 0x1>; - read-only; - }; - }; - - gpiomm: gpiomm@400 { - compatible = "lantiq,gpio-mm"; - reg = <1 0x0 0x10 >; - #address-cells = <1>; - #size-cells = <1>; - #gpio-cells = <2>; - gpio-controller; - lantiq,shadow = <0x0>; - }; - - mac_addr { - compatible = "lantiq,eth-mac"; - reg = <0 0x3f0016 0x6>; - mac-increment = <2>; - }; - - ath5k_eep { - compatible = "ath5k,eeprom"; - reg = <0 0x3f0400 0x1000 - 0 0x3f0016 0x6>; - ath,mac-increment = <1>; - ath,eep-swap; - }; - }; - - gpio: pinmux@E100B10 { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - ebu { - lantiq,groups = "ebu cs1"; - lantiq,function = "ebu"; - }; - pci_in { - lantiq,groups = "req1", "req2"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1", "gnt2"; - lantiq,function = "pci"; - lantiq,p
[OpenWrt-Devel] [PATCH v2 04/12] lantiq: DGN1000B - fix typo in dts file
Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/DGN1000B.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/dts/DGN1000B.dts b/target/linux/lantiq/dts/DGN1000B.dts index 4ccab93..199d3a9 100644 --- a/target/linux/lantiq/dts/DGN1000B.dts +++ b/target/linux/lantiq/dts/DGN1000B.dts @@ -107,7 +107,7 @@ }; gpio-leds { - cmpatible = "gpio-leds"; + compatible = "gpio-leds"; dsl { label = "dsl"; gpios = <&gpio 1 1>; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 02/12] lantiq: BTHOMEHUBV2B - remove missing usb led workaround
The workaround shouldn't be in the default configuration. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 1 - 1 file changed, 1 deletion(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index b5801ca..9d57cf3 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -25,7 +25,6 @@ BTHOMEHUBV2B) # ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0radio" ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" - ucidef_set_led_usbdev "usb" "usb" "soc:blue:phone" "1-1" ;; BTHOMEHUBV3A) ucidef_set_led_default "power" "power" "soc:blue:power" "1" -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 00/12] lantiq: switch to devicename:colour:function naming scheme
I chose to use Device Tree Source files to define some common used leds. This way it's possible to prevent the bloating (as it can be seen on other tragets) of the led board.d file as well as the diag.sh file. No need to carry dozen of - unrelated - board specific led definitions with each board. The colours where matched to the names used in the board manual. The function names are either the led lable printed on the board cases or the name used in the manual. If I found a led missing, I left a comment in the dts file. Due to missing board manuals or insufficient informations in the board manual, I wasn't able to rename the leds of the following boards: ARV7519PW, ARV7510PW22, ARV4510PW and ARV4518PWR01*. The ARV4518PWR01* boards are somehow special, since the leds doesn't match the leds from the manual or pictures I found (e.g. there shouldn't be a wps led). If someone can provide the required informations for the mentioned boards, feel free to contact me. The first few patches are only for cleaning up some of the dts files, which made it easier for me to rename the leds later on. Patch 11 "Add support for indicating the boot state using three leds" doesn't match directly the purpose of the series, but it allows me to remove even more leds form the board.d led file before renaming. HELP: In addition, I tried to allow dsl_notify.sh to control a shared dsl/internet LED as well. But I missed that dsl_notify.sh assigns a timer trigger to the LED and therefore replaces the netdev trigger. Till now, I couldn't figure out, how to reload the configuration of a single led (here at the dsl_notify UP event to re-add the netdev trigger). Did I missed something or does this functionality need to be implemented. GENERAL NOTE: Since I have to had a look at all dts files, I noticed the following oddness: - ARV4525PW: doesn't have bootargs - GIGASX76X: doesn't have leds defined, where the old mach file had This series has been runtime tested on BTHOMEHUBV5A, TDW8980, VGV7510KW22 and ARV752DPW22. All other boards are compile tested. V2: - fix not updated lan led name in the leds file (ARV7519RW22) - fix not renamed ISDN led (ARV4520PW) - fix spaces vs. tabs issue in diag.sh - use boardname instead of the generic soc Mathias Kresin (12): lantiq: P2812HNUFX - move leds to dtsi lantiq: BTHOMEHUBV2B - remove missing usb led workaround lantiq: ARV4518PWR01* move redundant parts to dtsi lantiq: DGN1000B - fix typo in dts file lantiq: ARV752DPW22 - fix dts file lantiq: ARV752DPW - fix dts file lantiq: define default leds in dts files lantiq: use default leds defined in DTS lantiq: use power leds defined in DTS lantiq: use dsl led defined in DTS lantiq: add support for indicating the boot state using three leds lantiq: use devicename:colour:function led naming scheme target/linux/lantiq/base-files/etc/board.d/01_leds | 65 ++- target/linux/lantiq/base-files/etc/diag.sh | 50 ++ .../lantiq/base-files/lib/functions/lantiq.sh | 16 ++ target/linux/lantiq/base-files/sbin/dsl_notify.sh | 14 +- target/linux/lantiq/dts/ARV4510PW.dts | 27 ++- target/linux/lantiq/dts/ARV4518PWR01.dts | 179 +-- target/linux/lantiq/dts/ARV4518PWR01.dtsi | 196 + target/linux/lantiq/dts/ARV4518PWR01A.dts | 179 +-- target/linux/lantiq/dts/ARV4519PW.dts | 60 --- target/linux/lantiq/dts/ARV4520PW.dts | 58 +++--- target/linux/lantiq/dts/ARV4525PW.dts | 29 ++- target/linux/lantiq/dts/ARV452CQW.dts | 55 +++--- target/linux/lantiq/dts/ARV7510PW22.dts| 16 +- target/linux/lantiq/dts/ARV7518PW.dts | 54 +++--- target/linux/lantiq/dts/ARV7519PW.dts | 24 ++- target/linux/lantiq/dts/ARV7519RW22.dts| 30 ++-- target/linux/lantiq/dts/ARV7525PW.dts | 31 ++-- target/linux/lantiq/dts/ARV752DPW.dts | 47 +++-- target/linux/lantiq/dts/ARV752DPW22.dts| 67 --- target/linux/lantiq/dts/ARV8539PW22.dts| 36 ++-- target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 43 +++-- target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 39 ++-- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 41 +++-- target/linux/lantiq/dts/DGN1000B.dts | 32 ++-- target/linux/lantiq/dts/DGN3500.dtsi | 44 +++-- target/linux/lantiq/dts/EASY80920.dtsi | 35 ++-- target/linux/lantiq/dts/FRITZ3370.dts | 35 ++-- target/linux/lantiq/dts/FRITZ7320.dts | 31 ++-- target/linux/lantiq/dts/GR7000.dts | 28 +-- target/linux/lantiq/dts/H201L.dts | 37 ++-- target/linux/lantiq/dts/P2601HNFX.dts | 40 +++-- target/linux/lantiq/dts/P2812HNUF1.dts | 61 --- target
[OpenWrt-Devel] [PATCH v2 05/12] lantiq: ARV752DPW22 - fix dts file
No need to switch (and keep) on all leds at boot. Use the same led logic and labels as the OEM firmware (red = okay, blue = failure). Add the red internet led. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV752DPW22.dts | 34 - 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/target/linux/lantiq/dts/ARV752DPW22.dts b/target/linux/lantiq/dts/ARV752DPW22.dts index ec4a3ab..168dc66 100644 --- a/target/linux/lantiq/dts/ARV752DPW22.dts +++ b/target/linux/lantiq/dts/ARV752DPW22.dts @@ -174,80 +174,70 @@ gpio-leds { compatible = "gpio-leds"; - power { - label = "power"; + power1 { + label = "power1"; gpios = <&gpio 3 1>; - default-state = "on"; + }; + internet { + label = "internet"; + gpios = <&gpio 4 1>; }; message { label = "message"; gpios = <&gpio 5 1>; - default-state = "on"; }; - power1 { - label = "power1"; + power { + label = "power"; gpios = <&gpio 6 1>; - default-state = "on"; + default-state = "keep"; }; voice1 { label = "voice1"; gpios = <&gpio 8 1>; - default-state = "on"; }; microphone { - label = "microphone"; + label = "umts"; gpios = <&gpiomm 3 1>; - default-state = "on"; }; wifi { label = "wifi_rt"; gpios = <&gpiomm 4 1>; - default-state = "on"; }; fxs1 { label = "fxs1"; gpios = <&gpiomm 5 1>; - default-state = "on"; }; fxs2 { label = "fxs2"; gpios = <&gpiomm 6 1>; - default-state = "on"; }; fxo { label = "fxo"; gpios = <&gpiomm 7 1>; - default-state = "on"; }; - dsl { - label = "dsl"; + internet2 { + label = "internet2"; gpios = <&gpiomm 8 1>; - default-state = "on"; }; voice2 { label = "voice2"; gpios = <&gpiomm 9 1>; - default-state = "on"; }; eth1 { label = "eth1"; gpios = <&gpiomm 11 1>; -default-state = "on"; }; eth2 { label = "eth2"; gpios = <&gpiomm 12 1>; - default-state = "on"; }; eth3 { label = "eth3"; gpios = <&gpiomm 13 1>; - default-state = "on"; }; eth4 { label = "eth4"; gpios = <&gpiomm 14 1>; - default-state = "on"; }; }; }; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 09/12] lantiq: use power leds defined in DTS
Use the power leds defined in the dts file instead of hardcoded led names. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/diag.sh | 34 +- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh index 57a7055..0e65e61 100644 --- a/target/linux/lantiq/base-files/etc/diag.sh +++ b/target/linux/lantiq/base-files/etc/diag.sh @@ -2,49 +2,53 @@ # Copyright (C) 2012-2013 OpenWrt.org . /lib/functions/leds.sh +. /lib/functions/lantiq.sh -status_led=power -[ ! -d /sys/class/leds/power/ ] && [ ! -d /sys/class/leds/power1/ ] && [ ! -d /sys/class/leds/power2/ ] && [ -d /sys/class/leds/wps/ ] && status_led=wps +power="$(lantiq_get_dt_led_chosen power)" +power1="$(lantiq_get_dt_led_chosen power1)" +power2="$(lantiq_get_dt_led_chosen power2)" + +status_led="$power" set_state() { case "$1" in preinit) - if [ -d /sys/class/leds/power2/ ]; then + if [ -n "$power2" ]; then status_led_on - status_led=power2 + status_led="$power2" status_led_blink_preinit - status_led=power + status_led="$power" else status_led_blink_preinit fi ;; failsafe) - if [ -d /sys/class/leds/power2/ ]; then - led_off power2 + if [ -n "$power2" ]; then + led_off "$power2" status_led_blink_failsafe - elif [ -d /sys/class/leds/power1/ ]; then + elif [ -n "$power1" ]; then status_led_off - status_led=power1 + status_led="$power1" status_led_blink_failsafe - status_led=power + status_led="$power" else status_led_blink_failsafe fi ;; preinit_regular) - if [ -d /sys/class/leds/power2/ ]; then + if [ -n "$power2" ]; then status_led_on - status_led=power2 + status_led="$power2" status_led_blink_preinit_regular - status_led=power + status_led="$power" else status_led_blink_preinit_regular fi ;; done) status_led_on - led_off power1 - led_off power2 + led_off "$power1" + led_off "$power2" ;; esac } -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 08/12] lantiq: use default leds defined in DTS
Remove all now double defined leds from the led board file. Use pppoe as default for all broadband connections, since it's the default in OpenWrt now. Rename the the wifi leds to make sure, the not applicable default values get overwritten. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 27 ++ .../lantiq/base-files/lib/functions/lantiq.sh | 16 + 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index 9d57cf3..7a25b6d 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -9,10 +9,10 @@ board_config_update -[ -e "/sys/class/leds/wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0tpt" -[ -e "/sys/class/leds/usb" ] && ucidef_set_led_usbdev "usb" "usb" "usb" "1-1" -[ -e "/sys/class/leds/usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "usb2" "2-1" -[ -e "/sys/class/leds/internet" ] && ucidef_set_led_netdev "internet" "internet" "internet" "pppoe-wan" +[ -n "$(lantiq_is_dt_led_chosen wifi)" ] && ucidef_set_led_wlan "wifi" "wifi" "$(lantiq_get_dt_led_chosen wifi)" "phy0tpt" +[ -n "$(lantiq_is_dt_led_chosen usb)" ] && ucidef_set_led_usbdev "usb" "usb" "$(lantiq_get_dt_led_chosen usb)" "1-1" +[ -n "$(lantiq_is_dt_led_chosen usb2)" ] && ucidef_set_led_usbdev "usb2" "usb2" "$(lantiq_get_dt_led_chosen usb2)" "2-1" +[ -n "$(lantiq_is_dt_led_chosen internet)" ] && ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "pppoe-wan" board=$(lantiq_board_name) @@ -22,19 +22,12 @@ VG3503J) ;; BTHOMEHUBV2B) ucidef_set_led_default "power" "power" "soc:blue:power" "1" -# ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0radio" - ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" - ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ;; BTHOMEHUBV3A) ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" - ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ;; BTHOMEHUBV5A) ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" - ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; VGV7510KW22) @@ -42,33 +35,27 @@ VGV7510KW22) ucidef_set_led_default "power2" "power2" "power2" "0" ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" - ucidef_set_led_netdev "internet_green" "internet_green" "internet_green" "pppoe-wan" ;; VGV7519) ucidef_set_led_default "power" "power" "power" "0" ucidef_set_led_default "power2" "power2" "power2" "1" - ucidef_set_led_wlan "wireless_yellow" "wireless_yellow" "wireless_yellow" "phy0radio" - ucidef_set_led_netdev "internet_yellow" "internet_yellow" "internet_yellow" "nas0" - ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "pppoe-wan" + ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" + ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "nas0" ;; P2812HNUF*) ucidef_set_led_default "power" "power" &quo
[OpenWrt-Devel] [PATCH v2 10/12] lantiq: use dsl led defined in DTS
dsl_control (dsl_notify.sh) is the only process which is aware of the state of the atm/ptm interface. Use the dsl led exclusive for the dsl line state. On boards which don't have a distinct internet and a dsl led, let the netdev status of the atm interface trigger the shared led. Triggering the shared led according to the status of the ppp interface isn't suitable, since the led would be switched of if the ppp connection goes down, but the line is still in sync. Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 19 +++ target/linux/lantiq/base-files/sbin/dsl_notify.sh | 14 +++--- target/linux/lantiq/dts/ARV452CQW.dts | 2 +- target/linux/lantiq/dts/VG3503J.dtsi | 2 +- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index 7a25b6d..a95c72c 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -12,14 +12,21 @@ board_config_update [ -n "$(lantiq_is_dt_led_chosen wifi)" ] && ucidef_set_led_wlan "wifi" "wifi" "$(lantiq_get_dt_led_chosen wifi)" "phy0tpt" [ -n "$(lantiq_is_dt_led_chosen usb)" ] && ucidef_set_led_usbdev "usb" "usb" "$(lantiq_get_dt_led_chosen usb)" "1-1" [ -n "$(lantiq_is_dt_led_chosen usb2)" ] && ucidef_set_led_usbdev "usb2" "usb2" "$(lantiq_get_dt_led_chosen usb2)" "2-1" -[ -n "$(lantiq_is_dt_led_chosen internet)" ] && ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "pppoe-wan" + +[ -n "$(lantiq_is_dt_led_chosen internet)" ] && { + interface="nas0" + + [ -n "$(lantiq_is_dt_led_chosen dsl)" ] && { + interface="pppoe-wan" + ucidef_set_led_default "dsl" "dsl" "$(lantiq_get_dt_led_chosen dsl)" "0" + } + + ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "$interface" +} board=$(lantiq_board_name) case "$board" in -VG3503J) - ucidef_set_led_netdev "vdsl" "vdsl" "bt:green:dsl" "ptm0" - ;; BTHOMEHUBV2B) ucidef_set_led_default "power" "power" "soc:blue:power" "1" ;; @@ -34,19 +41,16 @@ VGV7510KW22) ucidef_set_led_default "power" "power" "power" "1" ucidef_set_led_default "power2" "power2" "power2" "0" ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" - ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" ;; VGV7519) ucidef_set_led_default "power" "power" "power" "0" ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" - ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "nas0" ;; P2812HNUF*) ucidef_set_led_default "power" "power" "power" "0" ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio" - ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" ;; ARV7519RW22) ucidef_set_led_default "power" "power" "power" "1" @@ -55,7 +59,6 @@ ARV7519RW22) ARV8539PW22) ucidef_set_led_default "power" "power" "soc:green:power" "1" ucidef_set_led_default "power2" "power2" "soc:red:power" "0" -ucidef_set_led_netdev "dsl" "dsl" "soc:green:dsl" "nas0" ;; *) ;; diff --git a/target/linux/lantiq/base-files/sbin/dsl_notify.sh b/target/linux/lantiq/base-files/sbin/dsl_notify.sh index b514e25..01d0488 100755 --- a/target/linux/lantiq/base-files/sbin/dsl_notify.sh +++ b/target/linux/lantiq/base-files/sbin/dsl_notify.sh @@ -16,15 +16,15 @@ include /lib/network scan_interfaces -local default +local led config_load system -config_get default led_adsl default -if [ "$defa
[OpenWrt-Devel] [PATCH v2 07/12] lantiq: define default leds in dts files
- ARV7525PW: use the power led as dsl led as done by the stock firmware - FRITZ3370: use the info led as internet led - FRITZ7320: use the power led as dsl led as done by the stock firmware Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV4510PW.dts | 24 +--- target/linux/lantiq/dts/ARV4518PWR01.dtsi | 18 +- target/linux/lantiq/dts/ARV4519PW.dts | 21 +++-- target/linux/lantiq/dts/ARV4520PW.dts | 21 +++-- target/linux/lantiq/dts/ARV4525PW.dts | 16 +--- target/linux/lantiq/dts/ARV452CQW.dts | 15 +++ target/linux/lantiq/dts/ARV7510PW22.dts | 12 +--- target/linux/lantiq/dts/ARV7518PW.dts | 21 +++-- target/linux/lantiq/dts/ARV7519PW.dts | 18 +- target/linux/lantiq/dts/ARV7519RW22.dts | 9 +++-- target/linux/lantiq/dts/ARV7525PW.dts | 16 target/linux/lantiq/dts/ARV752DPW.dts | 15 +++ target/linux/lantiq/dts/ARV752DPW22.dts | 15 +++ target/linux/lantiq/dts/ARV8539PW22.dts | 17 + target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 9 +++-- target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 11 --- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 9 +++-- target/linux/lantiq/dts/DGN1000B.dts | 12 +--- target/linux/lantiq/dts/DGN3500.dtsi | 21 +++-- target/linux/lantiq/dts/EASY80920.dtsi| 12 +--- target/linux/lantiq/dts/FRITZ3370.dts | 18 +- target/linux/lantiq/dts/FRITZ7320.dts | 13 ++--- target/linux/lantiq/dts/GR7000.dts| 15 +++ target/linux/lantiq/dts/H201L.dts | 18 +- target/linux/lantiq/dts/P2601HNFX.dts | 18 +- target/linux/lantiq/dts/P2812HNUFX.dtsi | 24 +--- target/linux/lantiq/dts/TDW89X0.dtsi | 19 ++- target/linux/lantiq/dts/VG3503J.dtsi | 12 +--- target/linux/lantiq/dts/VGV7510KW22.dtsi | 18 +- target/linux/lantiq/dts/VGV7519.dtsi | 18 +- target/linux/lantiq/dts/WBMR.dts | 21 +++-- 31 files changed, 371 insertions(+), 135 deletions(-) diff --git a/target/linux/lantiq/dts/ARV4510PW.dts b/target/linux/lantiq/dts/ARV4510PW.dts index 4772495..427cd54 100644 --- a/target/linux/lantiq/dts/ARV4510PW.dts +++ b/target/linux/lantiq/dts/ARV4510PW.dts @@ -7,6 +7,16 @@ chosen { bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; + + leds { + dsl = &adsl; + internet = &internet; + power = &power; + power2 = &power2; + usb = &usb; + usb2 = &usb2; + wifi = &wifi; + }; }; memory@0 { @@ -139,11 +149,11 @@ gpio-leds { compatible = "gpio-leds"; - power { + power: power { label = "power"; gpios = <&gpios 21 0>; }; - power2 { + power2: power2 { label = "power2"; gpios = <&gpios 20 0>; }; @@ -163,15 +173,15 @@ label = "lan4"; gpios = <&gpios 16 0>; }; - wifi { + wifi: wifi { label = "wifi"; gpios = <&gpios 15 0>; }; - adsl { + adsl: adsl { label = "adsl"; gpios = <&gpios 14 0>; }; - internet { + internet: internet { label = "internet"; gpios = <&gpios 13 0>; }; @@ -191,11 +201,11 @@ label = "phone2"; gpios = <&gpios 9 0>; }; - usb { + usb: usb { label = "usb"; gpios = <&gpios 8 0>; }; - usb2 { + usb2: usb2 { label = "usb2"; gpios = <&gpios 7 0>; }; diff --git a/target/linux/lantiq/dts/ARV4518PWR01.dtsi b/target/linux/lantiq/dts/ARV4518PWR01.dtsi index 0699707..41d17de 100644 --- a/target/linux/lantiq/dts/ARV4518PWR01.dtsi +++ b/target/linux/lantiq/dts/ARV4518PWR01.dtsi @@ -3,6 +3,14 @@ / { chosen { bootargs = "console=ttyLTQ0,115
[OpenWrt-Devel] [PATCH v2 06/12] lantiq: ARV752DPW - fix dts file
Use the same led logic and labels as the OEM firmware (red = okay, blue = failure). Add the red internet led. Remove missing usb led workaround. The workaround shouldn't be in the default configuration. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ARV752DPW.dts | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/target/linux/lantiq/dts/ARV752DPW.dts b/target/linux/lantiq/dts/ARV752DPW.dts index fe478e1..8848c71 100644 --- a/target/linux/lantiq/dts/ARV752DPW.dts +++ b/target/linux/lantiq/dts/ARV752DPW.dts @@ -170,25 +170,29 @@ gpio-leds { compatible = "gpio-leds"; - power { - label = "power"; + power1 { + label = "power1"; gpios = <&gpio 3 1>; }; + internet { + label = "internet"; + gpios = <&gpio 4 1>; + }; message { label = "message"; gpios = <&gpio 5 1>; }; - power1 { - label = "power1"; + power { + label = "power"; gpios = <&gpio 6 1>; + default-state = "keep"; }; voice1 { label = "voice1"; gpios = <&gpio 8 1>; }; microphone { - /* use this led as te usb led */ - label = "usb"; + label = "umts"; gpios = <&gpiomm 3 1>; }; wifi { @@ -199,7 +203,7 @@ label = "fxs1"; gpios = <&gpiomm 5 1>; }; - fx2 { + fxs2 { label = "fxs2"; gpios = <&gpiomm 6 1>; }; @@ -207,8 +211,8 @@ label = "fxo"; gpios = <&gpiomm 7 1>; }; - internet { - label = "internet"; + internet2 { + label = "internet2"; gpios = <&gpiomm 8 1>; }; voice2 { -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 11/12] lantiq: add support for indicating the boot state using three leds
The BTHOMEHUBV5A has a RGB power led, where every colour is perfect to indicate the current boot state. This patch adds support for such cases. The existing led sequences should be the same as before. Boards which are using a led different from power (like TDW89x0) are changed to switch of the led after boot Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 18 target/linux/lantiq/base-files/etc/diag.sh | 52 +++--- target/linux/lantiq/dts/ARV4510PW.dts | 7 ++- target/linux/lantiq/dts/ARV4518PWR01.dtsi | 6 ++- target/linux/lantiq/dts/ARV4519PW.dts | 7 ++- target/linux/lantiq/dts/ARV4520PW.dts | 11 +++-- target/linux/lantiq/dts/ARV4525PW.dts | 9 ++-- target/linux/lantiq/dts/ARV452CQW.dts | 8 +++- target/linux/lantiq/dts/ARV7510PW22.dts| 6 ++- target/linux/lantiq/dts/ARV7518PW.dts | 7 ++- target/linux/lantiq/dts/ARV7519PW.dts | 8 ++-- target/linux/lantiq/dts/ARV7519RW22.dts| 9 ++-- target/linux/lantiq/dts/ARV7525PW.dts | 7 ++- target/linux/lantiq/dts/ARV752DPW.dts | 6 ++- target/linux/lantiq/dts/ARV752DPW22.dts| 6 ++- target/linux/lantiq/dts/ARV8539PW22.dts| 8 +++- target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 12 +++-- target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 12 +++-- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 14 -- target/linux/lantiq/dts/DGN1000B.dts | 7 ++- target/linux/lantiq/dts/DGN3500.dtsi | 11 +++-- target/linux/lantiq/dts/EASY80920.dtsi | 7 ++- target/linux/lantiq/dts/FRITZ3370.dts | 11 +++-- target/linux/lantiq/dts/FRITZ7320.dts | 6 ++- target/linux/lantiq/dts/GR7000.dts | 7 +-- target/linux/lantiq/dts/H201L.dts | 9 ++-- target/linux/lantiq/dts/P2601HNFX.dts | 8 ++-- target/linux/lantiq/dts/P2812HNUFX.dtsi| 7 ++- target/linux/lantiq/dts/TDW89X0.dtsi | 6 ++- target/linux/lantiq/dts/VG3503J.dtsi | 7 ++- target/linux/lantiq/dts/VGV7510KW22.dtsi | 7 ++- target/linux/lantiq/dts/VGV7519.dtsi | 8 ++-- target/linux/lantiq/dts/WBMR.dts | 7 ++- 33 files changed, 189 insertions(+), 132 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index a95c72c..ac9e14e 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -27,39 +27,21 @@ board_config_update board=$(lantiq_board_name) case "$board" in -BTHOMEHUBV2B) - ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ;; -BTHOMEHUBV3A) - ucidef_set_led_default "power" "power" "soc:blue:power" "1" - ;; BTHOMEHUBV5A) - ucidef_set_led_default "power" "power" "soc:blue:power" "1" ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; VGV7510KW22) - ucidef_set_led_default "power" "power" "power" "1" - ucidef_set_led_default "power2" "power2" "power2" "0" ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" ;; VGV7519) - ucidef_set_led_default "power" "power" "power" "0" - ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" ;; P2812HNUF*) - ucidef_set_led_default "power" "power" "power" "0" - ucidef_set_led_default "power2" "power2" "power2" "1" ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio" ;; ARV7519RW22) - ucidef_set_led_default "power" "power" "power" "1" ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1" ;; -ARV8539PW22) -ucidef_set_led_default "power" "power" "soc:green:power" "1" -ucidef_set_led_default "power2" "power2" "soc:red:power" "0" -;; *) ;; esac diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh index 0e65e61..8356bcd 100644 --- a/target/linux/lantiq/
[OpenWrt-Devel] [PATCH v2 12/12] lantiq: use devicename:colour:function led naming scheme
The leds of the following boards are not renamed due to lack of manuals/informations: - ARV7519PW - ARV7510PW22 - ARV4510PW The leds of the ARV4518PWR01* boards are unchanged, since the leds doesn't match the leds from the manual or pictures (e.g. there shouldn't be a wps led). Signed-off-by: Mathias Kresin --- target/linux/lantiq/base-files/etc/board.d/01_leds | 8 +-- target/linux/lantiq/dts/ARV4519PW.dts | 50 target/linux/lantiq/dts/ARV4520PW.dts | 42 +++-- target/linux/lantiq/dts/ARV4525PW.dts | 10 ++-- target/linux/lantiq/dts/ARV452CQW.dts | 48 --- target/linux/lantiq/dts/ARV7518PW.dts | 44 +++--- target/linux/lantiq/dts/ARV7519PW.dts | 2 +- target/linux/lantiq/dts/ARV7519RW22.dts| 14 ++--- target/linux/lantiq/dts/ARV7525PW.dts | 24 target/linux/lantiq/dts/ARV752DPW.dts | 38 ++-- target/linux/lantiq/dts/ARV752DPW22.dts| 46 +++--- target/linux/lantiq/dts/ARV8539PW22.dts| 13 ++-- target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 22 +++ target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 18 +++--- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 18 +++--- target/linux/lantiq/dts/DGN1000B.dts | 17 +++--- target/linux/lantiq/dts/DGN3500.dtsi | 20 --- target/linux/lantiq/dts/EASY80920.dtsi | 18 +++--- target/linux/lantiq/dts/FRITZ3370.dts | 14 ++--- target/linux/lantiq/dts/FRITZ7320.dts | 18 +++--- target/linux/lantiq/dts/GR7000.dts | 14 ++--- target/linux/lantiq/dts/H201L.dts | 14 ++--- target/linux/lantiq/dts/P2601HNFX.dts | 28 - target/linux/lantiq/dts/P2812HNUFX.dtsi| 64 ++-- target/linux/lantiq/dts/TDW8980.dts| 2 +- target/linux/lantiq/dts/TDW89X0.dtsi | 14 +++-- target/linux/lantiq/dts/VG3503J.dtsi | 16 ++--- target/linux/lantiq/dts/VGV7510KW22.dtsi | 30 +- target/linux/lantiq/dts/VGV7519.dtsi | 70 +++--- target/linux/lantiq/dts/WBMR.dts | 32 +- 30 files changed, 396 insertions(+), 372 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds index ac9e14e..39b693a 100755 --- a/target/linux/lantiq/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/base-files/etc/board.d/01_leds @@ -31,16 +31,16 @@ BTHOMEHUBV5A) ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0" ;; VGV7510KW22) - ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio" + ucidef_set_led_wlan "wifi" "wifi" "vgv7510kw22:green:wlan" "phy0radio" ;; VGV7519) - ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio" + ucidef_set_led_wlan "wifi" "wifi" "vgv7519:green:wireless" "phy0radio" ;; P2812HNUF*) - ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio" + ucidef_set_led_wlan "wifi" "wifi" "p2812hnufx:green:wlan" "phy0radio" ;; ARV7519RW22) - ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1" + ucidef_set_led_netdev "lan" "lan" "arv7519rw22:green:lan" "eth0.1" ;; *) ;; diff --git a/target/linux/lantiq/dts/ARV4519PW.dts b/target/linux/lantiq/dts/ARV4519PW.dts index be65337..5e0b846 100644 --- a/target/linux/lantiq/dts/ARV4519PW.dts +++ b/target/linux/lantiq/dts/ARV4519PW.dts @@ -3,18 +3,18 @@ /include/ "danube.dtsi" / { - model = "ARV4519PW - Vodafone, Pirelli"; + model = "ARV4519PW - Vodafone Netfaster IAD 2, Pirelli P.RG A4201G"; chosen { bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; leds { - boot = &power; - failsafe = &power2; - running = &power; + boot = &power_green; + failsafe = &power_red; + running = &power_green; dsl = &dsl; - internet = &online; + internet = &internet_green; usb = &usb; wifi = &wifi; }; @@ -129,61 +129,61 @@ gpio-leds { compatible = "gpio-leds"; - power:
[OpenWrt-Devel] [PATCH] ledtrig-netdev: add support for renamed devices
The ppp0 interface is renamed after the connection is established. Due to a missing NETDEV_REGISTER event, the ledtrig-netdev isn't aware of the renamed interface and literally ignores the device (no tx/rx indication, led isn't switched off with 'ifdown wan'). Signed-off-by: Mathias Kresin --- This issue is at least reported in #7946, #11006 and #11761. target/linux/generic/files/drivers/leds/ledtrig-netdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c index 4e0fd66..5d0f954 100644 --- a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c +++ b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c @@ -265,7 +265,7 @@ static int netdev_trig_notify(struct notifier_block *nb, struct net_device *dev = netdev_notifier_info_to_dev((struct netdev_notifier_info *) dv); struct led_netdev_data *trigger_data = container_of(nb, struct led_netdev_data, notifier); - if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE && evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER) + if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE && evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER && evt != NETDEV_CHANGENAME) return NOTIFY_DONE; spin_lock_bh(&trigger_data->lock); @@ -274,9 +274,10 @@ static int netdev_trig_notify(struct notifier_block *nb, if (strcmp(dev->name, trigger_data->device_name)) goto done; - if (evt == NETDEV_REGISTER) { + if (evt == NETDEV_REGISTER || evt == NETDEV_CHANGENAME) { if (trigger_data->net_dev != NULL) dev_put(trigger_data->net_dev); + dev_hold(dev); trigger_data->net_dev = dev; trigger_data->link_up = 0; -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel