You can try libgpiod from kernel.org.
Posts by vitalogy
-
-
-
Works here.
Build a new image with the patch from chewitt for the Tanix TX5max rc-keymap and patched the sun50i-h6-tanix-tx6.dts with linux,rc-map-name = "rc-tanix-tx5max". I would welcome it, if you can send the patch.
-
Hi,
here is the config for the remote, running ir-keytable -p nec -t
on my device:
Code
Display More# table tanix_tx6, type: nec 0x40404d KEY_POWER 0x404043 KEY_MUTE 0x404017 KEY_VOLUMEDOWN 0x404018 KEY_VOLUMEUP 0x40400b KEY_UP 0x40400e KEY_DOWN 0x404010 KEY_LEFT 0x404011 KEY_RIGHT 0x40400d KEY_OK 0x40401a KEY_HOME 0x404045 KEY_MENU 0x404042 KEY_BACK 0x404001 KEY_1 0x404002 KEY_2 0x404003 KEY_3 0x404004 KEY_4 0x404005 KEY_5 0x404006 KEY_6 0x404007 KEY_7 0x404008 KEY_8 0x404009 KEY_9 0x404047 KEY_SUBTITLE 0x404000 KEY_0 0x40400c KEY_DELETE
However, i searched and found the Tanix TX6 has the same remote as Tanix TX5max (Amlogic S905...).
The next kernel release will have support for this remote: rc-tanix-tx5max.c\keymaps\rc\media\drivers - kernel/git/torvalds/linux.git - Linux kernel source tree
Does this mean, a simple entry in the dts with linux,rc-map-name = "rc-tanix-tx5max" under ir and the remote will work ootb?
-
Similar to this device on linux-sunxi. See the section "Also known as". But no Support in LibreELEC yet.
-
Yes, if a bootable SD card is present, the system starts from this SD card. You can boot Android if you power off the device, eject the SD card and power on the device again.
-
ClementP Could test BT next week.
-
Image for Tanix TX6 64GB with WIFI: LibreELEC-H6.arm-9.80-devel-20190829143650-9d68e4b-tanix-tx6.img.gz
Changes: github
Note: I'm not the developer of the driver RTL8822BS and so, I can not give support for it.
-
Yeah, I saw this in the rtw -driver in mainline, that sdio should supported soon.
But for now i have wifi ...
I will pubish a build here, so other can use it, till its in mainline.
-
The "post-power-on-delay-ms = <500>" could be removed ... will test this tomorrow.
-
Here is a patch to support WIFI on the Tanix TX6 64GB version with the builitin Cdtech 47822BS (Realtek 8822BS) chip.
Diff
Display Morediff --git a/packages/linux-drivers/RTL8822BS/package.mk b/packages/linux-drivers/RTL8822BS/package.mk new file mode 100644 index 0000000000..73c78d4df6 --- /dev/null +++ b/packages/linux-drivers/RTL8822BS/package.mk @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2009-2016 Stephan Raue ([email protected]) +# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) + +PKG_NAME="RTL8822BS" +PKG_VERSION="38e702c9049f10f1cfa1f9a50d12fd21e08e306c" +PKG_SHA256="9f966d67e332bf1fc20c1bde6c2e8083aa62904805615b361ec6bbfe44b42709" +PKG_LICENSE="GPL" +PKG_SITE="" +PKG_URL="https://github.com/ChalesYu/rtl8822bs-aml/archive/$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain linux" +PKG_NEED_UNPACK="$LINUX_DEPENDS" +PKG_LONGDESC="Realtek RTL8822BS Linux driver" +PKG_IS_KERNEL_PKG="yes" + +pre_make_target() { + unset LDFLAGS +} + +make_target() { + make V=1 \ + ARCH=$TARGET_KERNEL_ARCH \ + KSRC=$(kernel_path) \ + CROSS_COMPILE=$TARGET_KERNEL_PREFIX \ + CONFIG_POWER_SAVING=n \ + USER_EXTRA_CFLAGS="-Wno-error=date-time" +} + +makeinstall_target() { + mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME + cp *.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME +} diff --git a/projects/Allwinner/devices/H6/options b/projects/Allwinner/devices/H6/options index 82487625c2..54fee0e91f 100644 --- a/projects/Allwinner/devices/H6/options +++ b/projects/Allwinner/devices/H6/options @@ -33,3 +33,6 @@ # Mali GPU family MALI_FAMILY="t720" + + # Additional drivers + ADDITIONAL_DRIVERS="${ADDITIONAL_DRIVERS} RTL8822BS" diff --git a/projects/Allwinner/devices/H6/patches/linux/16-Tanix-TX6-RTL8822BS.patch b/projects/Allwinner/devices/H6/patches/linux/16-Tanix-TX6-RTL8822BS.patch new file mode 100644 index 0000000000..8f173ede0c --- /dev/null +++ b/projects/Allwinner/devices/H6/patches/linux/16-Tanix-TX6-RTL8822BS.patch @@ -0,0 +1,75 @@ +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts +@@ -34,12 +34,49 @@ + }; + }; + ++ reg_vcc5v: vcc5v { ++ /* board wide 5V supply directly from the DC jack */ ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc-5v"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ regulator-always-on; ++ }; ++ + reg_vcc3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; ++ ++ reg_vcc33_wifi: vcc33-wifi { ++ /* Always on 3.3V regulator for WiFi and BT */ ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc33-wifi"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ vin-supply = <®_vcc5v>; ++ }; ++ ++ reg_vcc_wifi_io: vcc-wifi-io { ++ /* Always on 1.8V/300mA regulator for WiFi and BT IO */ ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc-wifi-io"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-always-on; ++ vin-supply = <®_vcc33_wifi>; ++ }; ++ ++ wifi_pwrseq: wifi-pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ clocks = <&rtc 1>; ++ clock-names = "ext_clock"; ++ reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */ ++ post-power-on-delay-ms = <500>; ++ }; + }; + + &ac200_pwm_clk { +@@ -100,6 +137,22 @@ + status = "okay"; + }; + ++&mmc1 { ++ vmmc-supply = <®_vcc33_wifi>; ++ vqmmc-supply = <®_vcc_wifi_io>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ rtl8822bs: sdio-wifi@1 { ++ reg = <1>; ++ interrupt-parent = <&r_pio>; ++ interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>; /* PM0 */ ++ interrupt-names = "host-wake"; ++ }; ++}; ++ + &mmc2 { + vmmc-supply = <®_vcc3v3>; + non-removable;
jernej - please have a look at this, it is working for me
So bluetooth could be on the horizon, because it should be supported by the driver.
-
I can also confirm eMMC is working ... here are two screenshots:
CodeLibreELEC:~ # dd if=LibreELEC-H6.arm-9.80-devel-20190824143152-5c3df44-tanix-tx6.img of=/dev/mmcblk1 bs=4M 137+1 records in 137+1 records out 575668224 bytes (549.0MB) copied, 2.173960 seconds, 252.5MB/s
But do not forget to "sync", else you will see this dmesg:
Code[ 23.342332] SQUASHFS error: zstd decompression error: 14 [ 23.342358] SQUASHFS error: zstd decompression failed, data probably corrupt
great work
-
-
these changes are not in any public git
Yes, I realized this, when I had looked into /dev with my image, build from LibreELEC git repo.
With your image the device shows only these two blocks. So mmcblk0 is the sdcard and mmcblk1 should be the eMMC.
LibreELEC:~ # ls /dev/mmc*
Code/dev/mmcblk0 /dev/mmcblk1p1 /dev/mmcblk1p15 /dev/mmcblk1p4 /dev/mmcblk0p1 /dev/mmcblk1p10 /dev/mmcblk1p16 /dev/mmcblk1p5 /dev/mmcblk0p2 /dev/mmcblk1p11 /dev/mmcblk1p17 /dev/mmcblk1p6 /dev/mmcblk1 /dev/mmcblk1p12 /dev/mmcblk1p18 /dev/mmcblk1p7 /dev/mmcblk1boot0 /dev/mmcblk1p13 /dev/mmcblk1p2 /dev/mmcblk1p8 /dev/mmcblk1boot1 /dev/mmcblk1p14 /dev/mmcblk1p3 /dev/mmcblk1p9
-
uhm ...
I saw the changes in git and build an image yesterday ... I could have saved myself
Installed the image from jernej:
CEC - is working, here with a Denon AVR
eMMC - put the image on /dev/mmcblk1, remove sdcard and reboot?
jernej thanks for your work
-
I have found some time, to look into lcdd addon and its dependencies:
libugpio
A builded and installed linux is not neccessarry to build libugpio. Libugpio deals direct with the sysfs gpio interface and no kernel functions are used.
I think we can safely remove linux form libugpio package.mk.
Has someone tested the hd44780 gpio driver from lcdd?lcdd
Sofar if you build lcdd by hand in a clean environment (make clean, scripts/create_addon lcdd), lirc is not builded before and configure gives a warningCodechecking for main in -llirc_client... no configure: WARNING: The lirc driver needs the lirc client library
When lirc is set as dependency or it is simple installed by another package, lcdd fails to build.
CodeIn file included from /home/michael/workspace/LibreELEC.tv/build.LibreELEC-imx6.arm-8.0-devel/toolchain/armv7a-libreelec-linux-gnueabi/sysroot/usr/include/lirc/lirc_client.h:124:0, from /home/michael/workspace/LibreELEC.tv/build.LibreELEC-imx6.arm-8.0-devel/lcdd-c05a7de/server/drivers/lircin.c:39: /home/michael/workspace/LibreELEC.tv/build.LibreELEC-imx6.arm-8.0-devel/toolchain/armv7a-libreelec-linux-gnueabi/sysroot/usr/include/lirc/curl_poll.h:36:29: error: array type has incomplete element type 'struct pollfd' int curl_poll(struct pollfd ufds, unsigned int nfds, int timeout_ms);
vpeter had give a workaround for this: thread-3793-post-28178.html#pid28178
Is lirc needed as a dependency for lcdd?
-
-
Okay a workaround is "make image" first, but when I will build only one addon for a project I have to build the whole image first? Hmm ...
I got this error from building lcdd too. For two days all was fine, but now it won't build ...?
I decided to make a clean build, but stumble about the fakeroot error.