Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey. I'm trying to install Home Assistant through "softy" in the armbian-config tool on my nanopi neo plus 2. The process seems like it goes through, but I can't connect to the interface (ip-address:8123). Would someone be able to point me to the script that softy uses for this installation, so I can try to do the steps manually? (I wish to install with Home Assistant with "supervision", and haven't been able to do it with their guides, so now I'm trying throuhg armbian-config). Regards Anders
  2. Hey. I'm working on an olimex A13-SOM board that is connected to some pcb board, that has a 4.3" lcd with capacitive touch panel connected to it. After a looong while, I've finaly managed to get the touch panel to work. Hooray. The display itself actually worked right away without me having to do anything...... well... almost. The display is initially off, so I have to run the 3 following commands, to turn it on: echo 35 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio35/direction echo 5 > /sys/class/gpio/gpio35/value After that the display works just fine. (so basicly I enable the PB3 pin, change it's direction to out, and set it's value to 5 - this is the backlight level - it takes values from 0 to 10). I can of course have those commands run through scripts during boot, but I would very much like to have it done through a dts overlay. Can anyone help point me in the right direction of how to do that? So far I've managed to turn it on during boot by adding a fragment targeted at <&panel> with the following line: enable-gpios = <&pio 1 3 0>; and this does seem to turn the display on - however, it just stays completely white/blank. Here's the dts that I've gotten to work so far (mainly the touch panel): // Device tree overlay for I2C connected Goodix gt911 - (Brewie beer brewing machine) /dts-v1/; /plugin/; /{ compatible = "allwinner,sun5i-a13"; // disable rtp - resistive touch. fragment@0 { target = <&rtp>; __overlay__ { status = "disabled"; }; }; fragment@1 { target = <&pio>; __overlay__ { goodix_irq: goodix_irq { allwinner,pins = "PG11"; allwinner,function = "gpio_in"; }; goodix_reset: goodix_reset { allwinner,pins = "PC3"; allwinner,function = "gpio_out"; }; }; }; fragment@2 { target = <&i2c2>; __overlay__ { #address-cells = <0x1>; #size-cells = <0x0>; gt911: gt911@14 { compatible = "goodix,gt911"; reg = <0x14>; pinctrl-names = "default"; pinctrl-0 = <&goodix_irq &goodix_reset>; interrupt-parent = <&pio>; interrupts = <6 11 0>; irq-gpios = <&pio 6 11 0>; reset-gpios = <&pio 2 3 0>; }; }; }; };
  3. Hey. I'm trying to set up a 3.5" spi touch display with my orange pi zero +2 (H5). I've gotten the display to work - console is displaying fine, and the same with Xorg. However, getting the touch panel to work, seems quite difficult. (I tested it on a pi, so I know the hardware works). I've been running through all the threads I could find in here, regarding these setups, but I haven't been able to crack it. I have tried a lot of different variations of using spi-spidev, spi-add-cs1, customized spi-double-spidev, setting the param_spidev_spi_bus etc. I have a suspicion that something is off with the second cs channel, as this seems to be where I get my error regarding the touch panel: anders@orangepizeroplus2-h5:~$ dmesg | grep spi [ 5.412056] ads7846: probe of spi1.1 failed with error -22 [ 5.425241] [drm] Initialized ili9486 1.0.0 20200118 for spi1.0 on minor 2 [ 7.345854] ili9486 spi1.0: [drm] fb0: ili9486drmfb frame buffer device anders@orangepizeroplus2-h5:~$ For now I'm trying to collect it all into one dts, since I pretty much had to edit all the others, to account for the pin naming on this board (https://linux-sunxi.org/Xunlong_Orange_Pi_Zero_Plus_2). Here's my armbianEnv.txt: verbosity=1 bootlogo=false console=both disp_mode=1920x1080p60 overlay_prefix=sun50i-h5 overlays=gpio-regulator-1.3v usbhost2 usbhost3 rootdev=UUID=9f2bef22-f83b-49fd-a7a8-02b905c6d123 rootfstype=ext4 user_overlays= tft35-4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u and the tft35-4.dts I've put together so far: /dts-v1/; /plugin/; / { compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target-path = "/aliases"; __overlay__ { spi0 = "/soc/spi@01c68000"; spi1 = "/soc/spi@01c69000"; }; }; fragment@1 { target = <&pio>; __overlay__ { tft35a_pins: tft35a_pins { allwinner,pins = "PA18", "PA2"; allwinner,function = "gpio_out"; }; ads7846_pins: ads7846_pins { pins = "PD11"; function = "irq"; pull = <0>; }; spi1_cs1: spi1_cs1 { pins = "PD14"; function = "gpio_out"; output-high; }; }; }; fragment@2 { target = <&spi1>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; pinctrl-names = "default", "default"; pinctrl-1 = <&spi1_cs1>; cs-gpios = <1>, <&pio 3 14 0>; // PD14 tft35a: tft35a@0 { reg = <0>; /* Chip Select 0 */ compatible = "ilitek,ili9486"; spi-max-frequency = <16000000>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&tft35a_pins>; txbuflen = <32768>; rotation = <180>; bgr = <0>; fps = <25>; buswidth = <8>; regwidth = <16>; reset-gpios = <&pio 0 2 0>; //PA2 dc-gpios = <&pio 0 18 0>; //PA18 debug = <1>; }; ads7846@1 { reg = <1>; /* Chip Select 1 */ compatible = "ti,ads7846"; spi-max-frequency = <2000000>; status = "okay"; pinctrl-names = "default"; interrupt-parent = <&pio>; interrupts = <3 11 2>; //PD11 pendown-gpio = <&pio 3 11 0>; /* driver defaults, optional */ ti,x-min = /bits/ 16 <0>; ti,y-min = /bits/ 16 <0>; ti,x-max = /bits/ 16 <0x0FFF>; ti,y-max = /bits/ 16 <0x0FFF>; ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <0xFFFF>; ti,x-plate-ohms = /bits/ 16 <400>; }; }; }; }; Any help? Regards Anders
  4. Hey. I'm working on setting up octoprint on my opi zero +2(H5), aiming at running octodash on a small 3.5" spi waveshare clone display. So far I've got the display working fine, as in showing the console text, and also working in xorg. However, I have a bit of trouble with the touch part. I've combed through the forum and followed the guides I could find, and have a fairly good working DTS file, however, I can't seem to get pin number 11 to work. In the overlay files, it seems to be named PA1, but I couldn't get that to work, and there were a bit of oddities with what pins seemed to be enabled, in relation to the various overlays. However, I found different info here: https://linux-sunxi.org/Xunlong_Orange_Pi_Zero_Plus_2#Variants suggesting that it's named PL0. Here, also pin 26 seems to be named PD14, which actually seems to be correct. But dmesg reports an error: sun50i-h5-pinctrl 1c20800.pinctrl: unknown pin PL0 when I use that pin-name in the dts file. Here's the DTS file I'm using: /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h5"; fragment@0 { target = <&spi1>; __overlay__ { status = "okay"; spidev@0{ status = "disabled"; }; spidev@1{ status = "disabled"; }; }; }; fragment@1 { target = <&pio>; __overlay__ { tft35a_pins: tft35a_pins { allwinner,pins = "PA18", "PA2"; allwinner,function = "gpio_out"; }; ads7846_pins: ads7846_pins { pins = "PL0"; function = "irq"; }; }; }; fragment@2 { target = <&spi1>; __overlay__ { #address-cells = <1>; #size-cells = <0>; // extra m.m.. // status = "okay"; tft35a: tft35a@0 { compatible = "ilitek,ili9486"; reg = <0>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&tft35a_pins>; spi-max-frequency = <16000000>; txbuflen = <32768>; rotation = <180>; // rotate eller rotation? bgr = <0>; fps = <25>; buswidth = <8>; regwidth = <16>; reset-gpios = <&pio 0 2 0>; /* PA2 */ dc-gpios = <&pio 0 18 0>; /* PA18 */ debug = <1>; init = <0x10000b0 0x00 0x1000011 0x20000ff 0x100003a 0x55 0x1000036 0x28 0x10000c2 0x44 0x10000c5 0x00 0x00 0x00 0x00 0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00 0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 /* piscreen -> waveshare35a */ 0x1000036 0x28 0x1000011 0x1000029>; }; tft35a_ts: tft35a-ts@1 { compatible = "ti,ads7846"; reg = <1>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&ads7846_pins>; spi-max-frequency = <2000000>; interrupts = <11 0 2>; /* PA1 IRQ_TYPE_EDGE_FALLING */ // PL0 interrupt-parent = <&pio>; pendown-gpio = <&pio 11 0 0>; // PL0 ti,x-min = /bits/ 16 <0>; ti,y-min = /bits/ 16 <0>; ti,x-max = /bits/ 16 <0x0FFF>; ti,y-max = /bits/ 16 <0x0FFF>; ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <0xFFFF>; ti,x-plate-ohms = /bits/ 16 <400>; }; }; }; __overrides__ { speed = <&tft35a>,"spi-max-frquency:0"; txbuflen = <&tft35a>,"txbuflen:0"; rotate = <&tft35a>,"rotate:0"; fps = <&tft35a>,"fps:0"; bgr = <&tft35a>,"bgr:0"; debug = <&tft35a>,"debug:0"; swapxy = <&tft35a_ts>,"ti,swap-xy?"; }; }; Does anyone know the specific name to be used there? Regards Anders
  5. That's the point - the edid is not correct. On the raspberry pi it is overriden to 480x272@60 by these lines in config.txt: hdmi_group=2 hdmi_mode=87 hdmi_cvt 480 272 60 6 0 0 0 But this does not work in armbianEnv.txt I have been trying to override the edid , but have so far not been successful in making one that doesn't throw errors on boot, and it is stuck at 800x480.
  6. Here's the summary. I'm a bit uncertain about whether "cat /sys/class/drm/card0-HDMI-A-1/edid" is what you want - I've been messing with it quite a bit in various edid editors, so I also attach a bin file I got from one of them here. edidblob clk_summary edid.bin
  7. this one: https://www.waveshare.com/wiki/4.3inch_HDMI_LCD V2 in my case.
  8. Hey. I have a waveshare 4.3" 480x272 screen, that I'm trying to get to work with my orange pi zero +2, or nanopi M1 plus. However, I can't get the screen to show the right resolution - that only seems possible on my raspberry pi (which I don't want to use for this project). I've been running over all the (little) info I can find, and it seems to be a general problem to get hdmi working if the screen edid is a bit flaky - is this still the case, or is it possible to get this combination of opi/nanopi to work on this display? Regards. Anders
  9. Hey. I'm working on getting a small touch screen working on my OPiZ+2. It's a Waveshare 4.3 with a resistive touchpanel (using HDMI for displaying). I've had some issues getting the touch panel to work, and just wanted to share my findings, and ask whether I have misunderstood something. The waveshare wiki does provide a script for setting up the panel, but I think it's more aimed at a raspberry pi, and it didn't get the touch panel working. I manually added spi-spidev and spi-add-cs1 to to armbianEnv.txt. I also added the parameters: param_spidev_spi_bus=1 param_spidev_spi_cs=1 (took me a bit to figure out that I had to use spi1 instead of spi0, but so far so good). I also made a dts for the touchpanel chip - ads7846.dts: (using PA2 - never mind where it says PA7) /dts-v1/; /plugin/; / { compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target = <&pio>; __overlay__ { ads7846_pins: ads7846_pins { pins= "PA2"; function = "irq"; }; }; }; fragment@1 { target = <&spi1>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; ads7846@0 { compatible = "ti,ads7846"; reg = <0>; /* Chip Select 0 */ // vi prøver med 1 status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&ads7846_pins>; spi-max-frequency = <2000000>; 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,y-min = /bits/ 16 <0>; ti,x-max = /bits/ 16 <0x0FFF>; ti,y-max = /bits/ 16 <0x0FFF>; ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <0xFFFF>; ti,x-plate-ohms = /bits/ 16 <400>; }; }; }; }; Anyways, I still could not get the touch to work. After many hours of messing around, I found an image of the pins on the orange pi zero here: which seems to indicate that SPI_CS is on pin PA13 - not PA10....... The connector on the display has the CS connection on pin nr. 26..... So I tried using wires between the OPi and the display connector, using pin nr. 24 (PA13) instead, and touch came to life! So far so good - but does this mean I'm doing something wrong? Looking through the dts overlays, it seems that it SHOULD be PA10 for the SPI_CS....?? IS it possible to get the board to use PA10 instead of PA13, so I can connect the display directly on the board?? Regards Anders.
  10. Will check again, but I think I waited something like 10 minutes without any advance.... :-) Checked it again - still no advance after 10 mintes.
  11. I'm trying to build an image for an Olimex A13-Som board. So far it starts booting, but halts when it gets to: "Starting Raise network interface...". I've tried all the available distribution in the builder, (Bionic, Buster, Stretch, Focal etc.) and it's the same for all of them. I quite can't figure out how to get it to move past that point - anyone got a suggestion? Regards.
  12. Again a big thanks for you help. Unfortunately this one seems difficult to crack. I've been looking over the boards, and it seems that the irq pin is connected to a small chip, that again - among other things - connect to pin PG2. I also tried to trace pin PG12, and that actually didn't seem to go anywhere near the connector to the touchpanel.... So I tried using PG2 instead - but the only result was that now the usb wifi didn't work. So it seems on the schematic of the board, that both PG2 and PG12 are doing something with usb. I find it very confusing because the script.fex file I attached which is from the old installation that works, clearly shows PG12 as being assigned for the irq connection. I'm at a loss here. Particularly since loading the driver module doesn't give any errors (or confirmations for that matter). I've tried with both PG2 and PG12, but no difference.
  13. Ok, thanks, I'll try that. a few more questions: forgive my noobiness, I might be wrong here, but shouldn't I be looking at this file instead: https://github.com/torvalds/linux/blob/master/drivers/pinctrl/sunxi/pinctrl-sun5i.c ? Looking over the file you mention, I see the values listed like (0x1) etc. Looking over my dts file, I see a lot of values written like that too. Should I write the values like that instead, like: interrupts = <0x6 0x1b 0x0>; instead of interrupts = <6 12 0> ? Also, I'm trying to figure out what is what in that file. I think I located pin PG12, where it states: SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12), SUNXI_FUNCTION(0x0, "gpio_in"), SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "spi1"), /* MISO */ SUNXI_FUNCTION(0x3, "uart3"), /* RTS */ SUNXI_FUNCTION_IRQ(0x6, 12)), /* EINT12 */ when it lists: (G, 12), is this how I should write, instead of <6, 12>? Also, it mentions an irq function at the bottom - does that mean I can desribe the pin function as (0x6, 12) or am I completely off there...? (huge thanks for your help so far!)
  14. ok, thanks for the info so far! Another question: in the dts tree, under pinctrl@1c20800 the pin definitions include a property called "function". I haven't been able to decipher whether this needs to be something specific, or whether it's more of a general label thing. Particularly in my setup of PG12 and PC3, I've written "irq" and "reset" as their function respectivly. Does this matter, or?
  • Create New...