

Mike R9FT
Members-
Posts
19 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
I really hope I did everything right https://github.com/armbian/build/pull/1270
-
Just for information, I have tested ADS7846 touchscreen on new 4.19.y Bionic Orangepi one. What I did to get it work: 1. Upgrade dtc to version 1.4.7. By default it was dtc version 1.4.5 and I have get errors while trying to do " armbian-add-overlay sun8i-h3-spi-ads7846.dts" 2. There is missing driver in kernel by default, so I have installed ubuntu bionic 18.04.1 LTS on PC. After that use this guide https://docs.armbian.com/Developer-Guide_Build-Preparation/ Switch on ADS7846 module, then install new compiled package linux-image-next-sunxi_5.74_armhf.deb on OrangePi-one.
-
Hi, I am using rtc ds1307 on mainline with the following way, works correrctly: add to armbianEnv.txt: overlays=i2c0 next from shell do : echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device rm /dev/rtc ln -s /dev/rtc1 /dev/rtc hwclock -s -f /dev/rtc But it is really more correct to use ds1307.dts. Thank you for sharing.
-
Hi I am using ADM2483 RS-485 Transceiver. Now I am control RX/TX switch with GPIO pin from userspace. Can anyone tell, what is the best way to control RX/TX switch from mainline ? Thanks.
-
I need to count frequency about 1 Khz on GPIO input pin. Is it possible and what is the best way to do this? Tried WrinigOP isr.c but no luck. Thanks.
-
Hi First of all you should build kernel from source. Here is a good guide https://docs.armbian.com/Developer-Guide_Build-Preparation/ I suggest you to use virtualbox with ubuntu 16.04 x64 Another quick way is to use already compiled https://forum.armbian.com/applications/core/interface/file/attachment.php?id=1209 Put it to /lib/modules/3.4.113-sun8i/kernel/drivers/input/touchscreen Also you should update your configuration by using bin2fex and fex2bin utilities. See here https://docs.armbian.com/Hardware_Allwinner/. Here is fex config adds: [spi0] spi_used = 1 spi_cs_bitmap = 1 spi_mosi = port:PC00<3><default><default><default> spi_miso = port:PC01<3><default><default><default> spi_sclk = port:PC02<3><default><default><default> spi_cs0 = port:PA21<1><1><default><default> [spi_devices] spi_dev_num = 1 [spi_board0] modalias = "ads7846" max_speed_hz = 1500000 bus_num = 0 chip_select = 0 mode = 0 full_duplex = 1 manual_cs = 0 reboot, load driver with modprobe ads7846.ko -f calibrate with xinput_calibrator
-
if somebody have dificulties with running touch here is related topics. I am confirm that it is working with orange pi one legacy kernel mainline kernel 5" display, see sun8i-h3-spi-ads7846.dts mainline 7" display from waveshare, see sun8i-h3-spi-ads7846.dts here is also original dts for mainline https://github.com/armbian/sunxi-DT-overlays/blob/master/examples/spi-ads7846.dts For now, I am using mainline, and I don't found any stability problems or glithes.
-
Touch screen is also working with following tune up sun8i-h3-spi-ads7846.dts /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target = <&pio>; __overlay__ { ads7846_pins: ads7846_pins { pins= "PA2"; function = "irq"; }; }; }; fragment@1 { target = <&spi0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; ads7846@0 { compatible = "ti,ads7846"; reg = <1>; /* Chip Select 0 */ status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&ads7846_pins>; spi-max-frequency = <500000>; interrupt-parent = <&pio>; interrupts = <0 2 2>; /* PA7 IRQ_TYPE_EDGE_FALLING */ pendown-gpio = <&pio 0 2 0>; /* PA7 */ /* driver defaults, optional */ ti,x-min = /bits/ 16 <0>; ti,x-max = /bits/ 16 <4095>; ti,y-min = /bits/ 16 <0>; ti,y-max = /bits/ 16 <4095>; ti,swap-xy = <1>; ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <255>; /* ti,x-plate-ohms = /bits/ 16 <180>; */ ti,x-plate-ohms = /bits/ 16 <100>; ti,debounce_max = /bits/ 16 <15000>; ti,debounce_tol = /bits/ 16 <65535>; ti,debounce_rep = /bits/ 16 <100>; ti,vref-delay-usecs = /bits/ 16 <450>; ti,keep_vref_on = <1>; ti,settle_delay_usecs = /bits/ 16 <100>; ti,penirq-recheck-delay-usecs = /bits/ 16 <100>; }; }; }; }; /etc/X11/xorg.conf.d/99-calibr.conf Section "InputClass" Identifier "calibration" MatchProduct "ADS7846 Touchscreen" Option "Calibration" "154 3975 3933 66" Option "SwapAxes" "0" EndSection
-
Thank you. It is working now with this patch: diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c index 33920a2..9ae547a 100644 --- a/drivers/video/sunxi/sunxi_dw_hdmi.c +++ b/drivers/video/sunxi/sunxi_dw_hdmi.c @@ -122,13 +122,14 @@ static int sunxi_dw_hdmi_get_plug_in_status(void) static int sunxi_dw_hdmi_wait_for_hpd(void) { ulong start; + mdelay(3000); start = get_timer(0); do { if (sunxi_dw_hdmi_get_plug_in_status()) return 0; udelay(100); - } while (get_timer(start) < 300); + } while (get_timer(start) < 5000); return -1; } Is it possible to set timeouts from environment variable?
-
I am not get it working. Now I am switching gpio from user-space side.
-
Hi I connect 7" hdmi display from waveshare to orange pi one on mainline dev kernel. http://www.waveshare.com/wiki/7inch_HDMI_LCD When it is powered before orange, it works ok. But it don't work if it is powered at the same time. I am tried to add hpd_delay at the top of boot.cmd: setenv video-mode sunxi:1024x768-24@60,monitor=hdmi,hpd=1,hpd_delay=20000,edid=1 saveenv the do mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr But still no lack, display shows "no cable connected" Also when board start up, u-boot show on serial console this if display powered up before board: CPU: Allwinner H3 (SUN8I 1680) Model: Xunlong Orange Pi One DRAM: 512 MiB MMC: SUNXI SD/MMC: 0 In: serial Out: vidconsole Err: vidconsole And this if display powered same time with board: CPU: Allwinner H3 (SUN8I 1680) Model: Xunlong Orange Pi One DRAM: 512 MiB MMC: SUNXI SD/MMC: 0 In: serial Out: serial Err: serial How can I debug this? Also I tried another 5" hdmi display, that is working correctly (it have another hdmi chip, so it starts more quickly)
-
I need it because of hardware 40pin connector compatibility with another board. Tried the following overlay, but no luck /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target-path = "/aliases"; __overlay__ { serial3 = "/soc/serial@01c28c00"; }; }; fragment@1 { target = <&uart3>; __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&uart3_pins>; uart-has-rtscts; rts-gpios = <&pio 3 14 0>; /* PD14 */ status = "okay"; }; }; }; Overlay applied: ls -l /sys/devices/platform/serial8250/subsystem/devices/1c28c00.serial/of_node/ total 0 -r--r--r-- 1 root root 8 May 22 04:57 clocks -r--r--r-- 1 root root 17 May 22 04:57 compatible -r--r--r-- 1 root root 6 May 22 04:57 dma-names -r--r--r-- 1 root root 16 May 22 04:57 dmas -r--r--r-- 1 root root 12 May 22 04:57 interrupts -r--r--r-- 1 root root 4 May 22 04:57 linux,phandle -r--r--r-- 1 root root 7 May 22 04:57 name -r--r--r-- 1 root root 4 May 22 04:57 phandle -r--r--r-- 1 root root 4 May 22 04:57 pinctrl-0 -r--r--r-- 1 root root 8 May 22 04:57 pinctrl-names -r--r--r-- 1 root root 8 May 22 04:57 reg -r--r--r-- 1 root root 4 May 22 04:57 reg-io-width -r--r--r-- 1 root root 4 May 22 04:57 reg-shift -r--r--r-- 1 root root 8 May 22 04:57 resets -r--r--r-- 1 root root 16 May 22 04:57 rts-gpios -r--r--r-- 1 root root 5 May 22 04:57 status -r--r--r-- 1 root root 0 May 22 04:57 uart-has-rtscts May be it needs pin mux setup
-
I guess it needs modification in drivers/tty/serial/8250/ For example it is done in the omap-serial.c, here is some chunk of code: static void serial_omap_start_tx(struct uart_port *port) { struct uart_omap_port *up = to_uart_omap_port(port); int res; pm_runtime_get_sync(up->dev); /* Handle RS-485 */ if (port->rs485.flags & SER_RS485_ENABLED) { /* Fire THR interrupts when FIFO is below trigger level */ up->scr &= ~OMAP_UART_SCR_TX_EMPTY; serial_out(up, UART_OMAP_SCR, up->scr); /* if rts not already enabled */ res = (port->rs485.flags & SER_RS485_RTS_ON_SEND) ? 1 : 0; if (gpio_get_value(up->rts_gpio) != res) { gpio_set_value(up->rts_gpio, res); if (port->rs485.delay_rts_before_send > 0) mdelay(port->rs485.delay_rts_before_send); } } if ((port->rs485.flags & SER_RS485_ENABLED) && !(port->rs485.flags & SER_RS485_RX_DURING_TX)) serial_omap_stop_rx(port); serial_omap_enable_ier_thri(up); pm_runtime_mark_last_busy(up->dev); pm_runtime_put_autosuspend(up->dev); }
-
It's ok, but what about software RTS on another gpio pin using "rts-gpios" statement?
-
Is it possible to use uart rts gpio on mainline? May be like discribed here https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next/+/refs/heads/akpm-base/Documentation/devicetree/bindings/serial/serial.txt