[OpenWrt-Devel] [openwrt/telephony 2/2] asterisk16-chan-lantiq: Move menu item into the asterisk16 menu
This is now the same behaviour as used by the external asterisk packages asterisk-chan-dongle and asterisk-chan-sccp. Signed-off-by: Arnold Schulz --- net/asterisk-16.x-chan-lantiq/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/asterisk-16.x-chan-lantiq/Makefile b/net/asterisk-16.x-chan-lantiq/Makefile index 8210c07..55c1c35 100644 --- a/net/asterisk-16.x-chan-lantiq/Makefile +++ b/net/asterisk-16.x-chan-lantiq/Makefile @@ -27,12 +27,12 @@ PKG_FLAGS:=nonshared include $(INCLUDE_DIR)/package.mk define Package/$(PKG_NAME) - SUBMENU:=Telephony Lantiq + SUBMENU:=Telephony SECTION:=net CATEGORY:=Network TITLE:=Lantiq channel driver URL:=https://github.com/kochstefan/asterisk_channel_lantiq - DEPENDS:=+asterisk16 +kmod-ltq-vmmc + DEPENDS:=asterisk16 +kmod-ltq-vmmc endef define Package/$(PKG_NAME)/description -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [openwrt/telephony 1/2] asterisk16-chan-lantiq: Use upstream sources from 2019-09-03
This solves: - Fix build failure due to missing telephony.h in kernel 4.19 sources - OpenWrt specific patch+file removed; this stuff is now in upstream Signed-off-by: Arnold Schulz --- net/asterisk-16.x-chan-lantiq/Makefile| 16 +++ .../files/default.exports | 8 ...-ast_free-instead-of-malloc-and-free.patch | 43 --- 3 files changed, 5 insertions(+), 62 deletions(-) delete mode 100644 net/asterisk-16.x-chan-lantiq/files/default.exports delete mode 100644 net/asterisk-16.x-chan-lantiq/patches/01-Use-ast_malloc-and-ast_free-instead-of-malloc-and-free.patch diff --git a/net/asterisk-16.x-chan-lantiq/Makefile b/net/asterisk-16.x-chan-lantiq/Makefile index 5884673..8210c07 100644 --- a/net/asterisk-16.x-chan-lantiq/Makefile +++ b/net/asterisk-16.x-chan-lantiq/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2018 OpenWrt.org +# Copyright (C) 2018-2019 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk16-chan-lantiq -PKG_VERSION:=20180215 -PKG_RELEASE:=2 +PKG_VERSION:=20190803 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/kochstefan/asterisk_channel_lantiq.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=c9d68dd06fcd46ac7985df45f8c2b8833e658f8e -PKG_MIRROR_HASH:=8666c18b24adf9da3ddf12306fcf0a8b4f56860c256b172bd0ba5c2a7a3ab25e +PKG_SOURCE_VERSION:=1d940b38cde0348dfe129d2b764e6faee440c45b +PKG_MIRROR_HASH:=ff838ff2a4c5353fadd73806e1513f59f224914582b6ba004165712268bc94e5 PKG_SOURCE_PROTO:=git PKG_LICENSE:=GPL-2.0 @@ -43,12 +43,6 @@ define Package/$(PKG_NAME)/conffiles /etc/asterisk/lantiq.conf endef -define Build/Prepare - $(call Build/Prepare/Default) - $(INSTALL_DATA) ./files/default.exports \ - $(PKG_BUILD_DIR)/src/channels/chan_lantiq.exports -endef - define Build/Compile cd $(PKG_BUILD_DIR)/src/channels && \ $(TARGET_CC) -o chan_lantiq.o -c chan_lantiq.c -MD -MT chan_lantiq.o \ diff --git a/net/asterisk-16.x-chan-lantiq/files/default.exports b/net/asterisk-16.x-chan-lantiq/files/default.exports deleted file mode 100644 index 6d9344d..000 --- a/net/asterisk-16.x-chan-lantiq/files/default.exports +++ /dev/null @@ -1,8 +0,0 @@ -{ - global: - /* See main/asterisk.exports.in for an explanation why this is -* needed. */ - _IO_stdin_used; - local: - *; -}; diff --git a/net/asterisk-16.x-chan-lantiq/patches/01-Use-ast_malloc-and-ast_free-instead-of-malloc-and-free.patch b/net/asterisk-16.x-chan-lantiq/patches/01-Use-ast_malloc-and-ast_free-instead-of-malloc-and-free.patch deleted file mode 100644 index f913b18..000 --- a/net/asterisk-16.x-chan-lantiq/patches/01-Use-ast_malloc-and-ast_free-instead-of-malloc-and-free.patch +++ /dev/null @@ -1,43 +0,0 @@ -commit 30f9a094c1c60e0d68e4ea189f48ecb47aebb485 -Author: arny -Date: Thu May 2 20:07:28 2019 +0200 - -Use ast_malloc and ast_free instead of malloc and free -in order to get rid of build errors with asterisk16 in OpenWrt - -Signed-off-by: arny - -diff --git a/src/channels/chan_lantiq.c b/src/channels/chan_lantiq.c -index a8fc869..90002ab 100644 a/src/channels/chan_lantiq.c -+++ b/src/channels/chan_lantiq.c -@@ -563,9 +563,9 @@ lantiq_dev_binary_buffer_create(const char *path, uint8_t **ppBuf, uint32_t *pBu - goto on_exit; - } - -- *ppBuf = malloc(file_stat.st_size); -+ *ppBuf = ast_malloc(file_stat.st_size); - if (*ppBuf == NULL) { -- ast_log(LOG_ERROR, "binary file %s memory allocation failed\n", path); -+ // Message already logged by ast_malloc - goto on_exit; - } - -@@ -583,7 +583,7 @@ on_exit: - fclose(fd); - - if (*ppBuf != NULL && status) -- free(*ppBuf); -+ ast_free(*ppBuf); - - return status; - } -@@ -609,7 +609,7 @@ static int32_t lantiq_dev_firmware_download(int32_t fd, const char *path) - } - - if (firmware != NULL) -- free(firmware); -+ ast_free(firmware); - - return 0; - } -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [openwrt/telephony 0/2] asterisk16-chan-lantiq: Two independent patches
Most important is patch 1/2, which fixes a current compiler error with the OpenWrt master branch. This got corrected in the upstream Github repo, so we simple refer to today's version in the master branch. We can also get rid of the OpenWrt specific patch (incorporated in upstream since long ago), and some linker data file (also added in upstream). Patch 2/2 moves the chan-lantiq package selection item into the asterisk16 submenu. Before there was a "Telephony Lantiq" parallel to the "Telephony" submenu, which I _feel_ is unfortunate. Now behaviour is same one as that of other external asterisk16 packages. arny (2): asterisk16-chan-lantiq: Use upstream sources from 2019-09-03 asterisk16-chan-lantiq: Move menu item into the asterisk16 menu net/asterisk-16.x-chan-lantiq/Makefile| 20 +++-- .../files/default.exports | 8 ...-ast_free-instead-of-malloc-and-free.patch | 43 --- 3 files changed, 7 insertions(+), 64 deletions(-) delete mode 100644 net/asterisk-16.x-chan-lantiq/files/default.exports delete mode 100644 net/asterisk-16.x-chan-lantiq/patches/01-Use-ast_malloc-and-ast_free-instead-of-malloc-and-free.patch -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] rt3883 iNIC subsystem - any chance to get this running (Easybox 904 xDSL, Zyxel NBG5715)
Hi everyone, there is a wlan subsystem called rt3883 iNIC used in the EasyBox 904 and in the Zyxel NBG5715. The RT3883 SoC is supported by the OpenWrt ramips target. But here this chip is dedicated to WLAN and has own firmware (main SoC in the Easybox is of type Lantiq VR9). Problem: - No documentation found about interface and protocols for communicating with the RT3883 iNIC subsystem. - Proprietary driver rt3883_iNIC.ko provides iNIC control, but no source code found for this driver. Question: Any chances to get this subsystem running and controlled in OpenWrt? E.g. any docs or source code somewhere? Anyone with Mediatek/Ralink connections? Arnold -- Excerpt from http://arny.tjps.eu/OpenWrt/EasyBox904xDSL/research/Findings.txt - Main subsystem chips are from Mediatek/Ralink: * RT3883F. 802.11n 2.4/5GHz 3T3R (450/450Mbps) Single Chip AP/Router SoC * RT5392L. For 2.4GHz only. Almost no infos found on web - RT3883 contains i.a. a CPU core MIPS32 74Kc and wlan logic - Many wireless functions are implemented via proprietary firmware in SoC RT3883. - Firmware uses uC/OS, see https://en.wikipedia.org/wiki/Micro-Controller_Operating_Systems_(MicroC/OS) - At boot time firmware is loaded from /etc/Wireless/RT3883/iNIC_ap.bin (size 576kB). Initial config data is loaded from files in /etc/Wireless/RT3883/ and from /dev/mtd7 (part. fwdiag) - RT3883 is connected via ethernet to either Lantiq xrx200 internal switch or to extra RTL8367RB switch - Control communication and firmware loading is done via proprietary linux driver rt3883_iNIC.ko possibly using ethernet connection between main system and RT3883 SoC - Driver rt3883_iNIC.ko reads some configuration parameters from files (eg. iNIC_ap.dat, iNIC_e2p.bin) - Driver provides regular linux wlan network interfaces, so wlan can be set up by normal userspace wlan utilities (eg. iwconfig, iwpriv). - 2.4 GHz band is covered by RT5392L, 5 GHz band covered by RT3883F - RT5392L probably connected to and driven by RT3883 - Possibly wlan traffic to ext. ethernet connectors bridged via switches, so main cpu is not involved (?) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Lantiq xrx200 - switch rtl8367rb controlled via builtin mdio (not gpio sck/sda!) in EasyBox 904xDSL
Hi everyone, for fun I have put efforts to solve some mysteries of the EasyBox 904xDSL. (here thank you Sylwester and Martin B. for feedback). Currently code in driver/net/phy/rtl8366_smi.c is used to control rtl836x chips via bitbanging two gpio lines. This does not work for the 904 xDSL. Disassembling code from the rtl8367rb.ko (oem firmware) shows that the rtl8367rb is controlled via mdio registers at 0xBE10B120~128. I'm pretty sure I identified all gpio usage in rt8367rb.ko. There is one switch hw reset line (io41). Pin io42 and io43 are setup once (AltSel1/0:=1/0; no open drain; Dir:=output for io43) and then left alone, I guess to be driven by internal mdio logic responding to 0xBE10B120~128. Access to the switch' registers looks somehow cumbersome, e.g. u32 RTL83XX_SMI_READ(u32 addr) { ifx_vr9_mdio_write(0, 0x1D, 0x); ifx_vr9_mdio_write(0, 0x1F, 0xE); ifx_vr9_mdio_write(0, 0x1D, 0x); ifx_vr9_mdio_write(0, 0x17, addr 0x) ifx_vr9_mdio_write(0, 0x1D, 0x); ifx_vr9_mdio_write(0, 0x15, 1); ifx_vr9_mdio_write(0, 0x1D, 0x); return ifx_vr9_mdio_read(0, 0x19); } So many more bits are banged over the bus as the code in rtl8366_smi.c does. Me wondering: there must be a chip between, which relays control info to the rtl8367rb? Some more laboriously disassembled and pretty formatted functions are listed in file disass_rtl8367rb.ko_mdio-smi.txt here: http://arny.tjps.eu/OpenWrt/EasyBox904xDSL/oem-firmware-info/research/ Of course ifx_vr9_mdio_read/write() looks similar to xrx200_mdio_rd/wr() in drivers/net/ethernet/lantiq_xrx200.c of current OpenWrt kernel code. Guess I won't be able to provide a patch which utilizes these finding. If this is of use for anyone, I would be glad to hear about it. Arnold ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Suggestions anyone - EasyBox 904 xDSL (Lantiq xrx200)
I am trying to port OpenWrt to the EasyBox 904xDSL. As I got the impression that OpenWrt developers rely mainly on this mailing list, I humbly dare to point to this location, where there are more infos and links to details like a patch for OpenWrt trunk: https://forum.openwrt.org/viewtopic.php?id=57649 My current questions center on the .dts settings: 1. How to access WLAN hardware 2. Recommended settings for this phy-thingy Thanks in advance for feedback, Arnold ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Suggestions anyone - EasyBox 904 xDSL (Lantiq xrx200)
Hi Martin, On Fri, May 29, 2015 at 5:50 PM, Arnold Schulz arny...@gmx.net wrote: My current questions center on the .dts settings: 1. How to access WLAN hardware Do you know if wifi is connected via PCI or PCIe? You then need to configure the corresponding pins in the pinmux section. Of course you also need to set up the bus in the dts. I don't know. According to console output PCI seems to be recognized, for PCIe there are error messages (pcie_rc_initialize link up failed!). The lspci command shows nothing. Console output from a dts trial is here: http://arny.tjps.eu/OpenWrt/EasyBox904xDSL/devel/v0.1-console.log which corresponds to my dts file in http://arny.tjps.eu/OpenWrt/EasyBox904xDSL/devel/v0.1-EasyBox904xDSL.patch BTW, console output from orig. firmware is here: http://arny.tjps.eu/OpenWrt/EasyBox904xDSL/oem-firmware-info/ (concatenate bootlog-part1-console.txt and bootlog-part2-netlog.txt) There I find only the following PCI or PCIe related messages: [0.346000] === ifx_gpio_register (10,PCI) === kernel init [0.354000] === ifx_gpio_register (11,PCIE) === kernel init [ 121.742000] setUsbPciInfo() cpu_to_usb_addr_shift[5]:0x, usb_to_cpu_addr_shift[5]:0x [ 121.751000] usb_pci_probe() Found Synopsis OTG-1, baseAddr:0xbe101000, IRQ:54 [ 121.758000] setUsbPciInfo() cpu_to_usb_addr_shift[6]:0x, usb_to_cpu_addr_shift[6]:0x [ 121.767000] usb_pci_probe() Found Synopsis OTG-2, baseAddr:0xbe106000, IRQ:48 [ 121.774000] usb_hcd_init() probe PCI function:2 !! This leads to the assumption, that USB is connected via PCI. But lspci shows nothing, while USB seems to work. lsusb shows two busses and I could mount a vfat USB stick. I played around with pinmux settings, inspired by looking at other dtsi and dts files, but could not recognize any effects. If you suggest changes of the dts file, I will try them and report the results. 2. Recommended settings for this phy-thingy There are no recommended settings. Let's start at the top: vr9_phy11g_a2x.bin - used if you have 1gbit ports, otherwise you need to load vr9_phy22f_a2x.bin. I understand. The EasyBox 904 xDSL has 1Gb Ethernet, so vr9_phy11g_a2x.bin is the right one. Have you already figured out which phys are connected (your dts states that you get a reply on 0x11 and 0x13 (those are *probably* LAN 3 and 4). There should be two more, possible addresses are: 0x0, 0x1, 0x5 and 0x14. Here I had made many tests and I think I tried all or allmost all combinations of reg = X; // X = 0, *1, *2, 3, 4, 5 used in other profiles phy-handle = phyY; // Y = *0, 1, 5, *11, 12, *13, 14 *=most use in other profiles Console msgs told about successfull attachment only for values phy11 or phy13, but then networking via ethernet did not work any longer. BTW: Which phy-mode (gmii, rgmii or even mii) to use in 'phy-mode = ...' lines? Is this also a variable I should play with? If the LEDs are directly connected (the other option is they are connected via STP) then it's pretty easy to find their GPIOs by taking the script from [0] and modifying it a bit. Same for the buttons, only that you configure the GPIOs in in (input) mode and read the value instead of writing it. [0] http://wiki.openwrt.org/doc/hardware/port.gpio I keep these good hints in mind for later. Cheers, Arnold ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel