

going
Members-
Posts
806 -
Joined
-
Last visited
Content Type
Forums
Store
Crowdfunding
Applications
Events
Raffles
Community Map
Everything posted by going
-
If I understood this code correctly, drivers/input/touchscreen/ads7846.c#L985 which returns your error, it believes that the touch is not connected. This pin must be configured <1> gpio active low. When the touch of the display is connected, there should be a voltage on the IRQ pin and when a touch occurs, the touch lowers the voltage, thereby signaling an event.
-
@lalakii is In Armbian for chips, allwinner uses only a branch with kernel.org . There is no special branch for a separate chip. There is a series of patches that were taken from different places or made by different users and added to the series file. The binary files that you kindly provided are useless for the build system. Links to download from Google drive are also not useful. All you need is to apply a series of patches to the corresponding kernel branch as a "git am" command. Then make your comments on top with explanations and an indication of the author. Then extract these last commits using a script. cp armbian/build/tools/mk_format_patch $USER/bin; chmod +x $USER/bin mkdir -p $USER/tmpwork/patches.armbian cd /path/to/linux-stable mk_format_patch . HEAD~7..HEAD $USER/tmpwork/patches.armbian I think that you have guessed where they need to be placed, make a commit in the build system itself and make a pull request.
-
Only after the "Apple" is renamed. It has nothing to do with the production of agricultural products.
- 1 reply
-
2
-
In your version of the dts overlay, this pin is not described. In this case, you must explicitly register it here. Must be /dev/fb0 Check whether the SPI interface has been created in the /sys file system and the status of the pin that is connected to the LED display. Or simply connect the pin of the LED display with 3.3v for the duration of the experiments. P.S. Other variables that drivers can accept are not known to me for certain. This remains for your experiments. A similar device is just coming to my address. I will post my working version upon arrival.
-
Here I have intentionally divided the description of the pins. In your connection configuration, multiple devices connect to a single SPI interface. This means that the MOSI, MISO, CLK contacts are shared and connected in parallel for all devices and are described in the SPI node. And CS pins should be different and should be registered for each device separately in the corresponding node for this device. In the existing DTS, the pin description looks like:
-
For OrangePI pins: and Pinout for the SPI display <==> OrangePi PC : 1 - VCC (1) 3.3v 2 - GND (6) GND 3 - CS (24 PC3) SPI0 CS0 4 - RESET (29 PA7) ILI9341-RST 5 - DC (31 PA8) ILI9341-DC 6 - SDI (MOSI) (19 PC0) SPI0 MOSI 7 - SCLK (23 PC2) SPI0 CLK 8 - LED (33 PA9) Backlight (optional) or 3.3v(17) 9 - SDO (MISO) (21 PC1) SPI0 MISO 10 - T_CLK (23 PC2) SPI0 CLK 11 - T_CS (26 PA21) SPI0 CS1 12 - T_DIN (19 PC0) SPI0 MOSI 13 - T_DO (21 PC1) SPI0 MISO 14 - T_IRQ (35 PA10) TS IRQ The overlay file template may look like this: /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target-path = "/aliases"; __overlay__ { spi0 = "/soc/spi@1c68000"; }; }; fragment@1 { target = <&pio>; __overlay__ { spi0_pins: spi0-pins { pins = "PC0", "PC1", "PC2"; function = "spi0"; }; spi0_cs0_pin: spi0-cs0-pin { pins = "PC3"; function = "spi0"; }; }; spi0_cs1_pin: spi0-cs1-pin { pins = "PA21"; function = "spi0"; }; }; ili9341_rst: ili9341-rst { pins = "PA7"; function = "gpio_out"; }; }; ili9341_dc: ili9341-dc { pins = "PA8"; function = "gpio_out"; }; }; /* optional ili9341_led: ili9341-led { pins = "PA9"; function = "gpio_out"; }; }; */ ads7846_pin: ads7846-pin { pins = "PA10"; function = "irq"; }; }; }; fragment@2 { target = <&spi0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; status = "okay"; ili9341: ili9341@0 { compatible = "ilitek,ili9341"; reg = <0>; pinctrl-names = "default"; pinctrl-0 = <&spi0_cs0_pin>; status = "okay"; spi-max-frequency = <16000000>; rotate = <90>; bgr; fps = <25>; buswidth = <8>; regwidth = <16>; reset-gpios = <&pio &ili9341_rst 0>; dc-gpios = <&pio &ili9341_dc 0>; /*led-gpios = <&pio &ili9341_led 0>; */ }; xpt2046: xpt2046@1 { compatible = "ti,ads7846"; reg = <1>; pinctrl-names = "default"; pinctrl-0 = <&spi0_cs1_pin>; interrupts = <&ads7846_pin>; interrupt-parent = <&pio>; status = "okay"; spi-max-frequency = <1000000>; }; }; }; };
-
drivers/pinctrl/sunxi/pinctrl-sun8i-h3-r.c as r-pio - PL pin's. drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c as pio - PA, PC, PD, PE, PF, PG pin's. Invalid: &r_pio -> &pio Invalid: For your device, you have printed this information: pinctrl@1c20800 { spi0-pins { pins = "PC0\0PC1\0PC2\0PC3"; function = "spi0"; phandle = < 0x16 >; }; spi1-pins { pins = "PA15\0PA16\0PA14\0PA13"; function = "spi1"; phandle = < 0x17 >; }; }; spi@1c68000 { compatible = "allwinner,sun8i-h3-spi"; reg = < 0x1c68000 0x1000 >; interrupts = < 0x00 0x41 0x04 >; clocks = < 0x03 0x1e 0x03 0x52 >; clock-names = "ahb\0mod"; dmas = < 0x15 0x17 0x15 0x17 >; dma-names = "rx\0tx"; pinctrl-names = "default"; pinctrl-0 = < 0x16 >; resets = < 0x03 0x0f >; status = "disabled"; #address-cells = < 0x01 >; #size-cells = < 0x00 >; phandle = < 0x5c >; }; spi@1c69000 { compatible = "allwinner,sun8i-h3-spi"; reg = < 0x1c69000 0x1000 >; interrupts = < 0x00 0x42 0x04 >; clocks = < 0x03 0x1f 0x03 0x53 >; clock-names = "ahb\0mod"; dmas = < 0x15 0x18 0x15 0x18 >; dma-names = "rx\0tx"; pinctrl-names = "default"; pinctrl-0 = < 0x17 >; resets = < 0x03 0x10 >; status = "disabled"; #address-cells = < 0x01 >; #size-cells = < 0x00 >; phandle = < 0x5d >; }; __symbols__ { pio = "/soc/pinctrl@1c20800"; spi0_pins = "/soc/pinctrl@1c20800/spi0-pins"; spi1_pins = "/soc/pinctrl@1c20800/spi1-pins"; spi0 = "/soc/spi@1c68000"; spi1 = "/soc/spi@1c69000"; };
-
For this display, you need to compile and register it yourself. Please publish a successful, correct overlay file here and paste it as a code (button <>). For this display, I looked at Aliexpress. There are many varieties of them. What is the pinout on yours? You can look through a magnifying glass at the names of the chips to be sure of the correct driver selection for the touch panel.
-
Very good. Now I understand what you need. Just take my core for sunxi. Both required modules are included. DTB package is not required. Everything is included in the kernel image file. In fact, you need one overlay file in which two nodes for the two drivers used "fb_ili9341" and "ads7846" will be registered for the purpose of spi0.
-
It will be very good if you publish the solution here or print a link to the source. To be honest, I think you don't need the spidev driver and the interfaces it creates. Instead, rely entirely on two dedicated the adc7846, fbtft drivers. Modules that are included in the Armbian core: config/kernel/linux-sunxi-current.config:6333:CONFIG_FB_TFT=m config/kernel/linux-sunxi-current.config:6334:CONFIG_FB_TFT_AGM1264K_FL=m config/kernel/linux-sunxi-current.config:6335:CONFIG_FB_TFT_BD663474=m config/kernel/linux-sunxi-current.config:6336:CONFIG_FB_TFT_HX8340BN=m config/kernel/linux-sunxi-current.config:6337:CONFIG_FB_TFT_HX8347D=m config/kernel/linux-sunxi-current.config:6338:CONFIG_FB_TFT_HX8353D=m config/kernel/linux-sunxi-current.config:6339:CONFIG_FB_TFT_HX8357D=m config/kernel/linux-sunxi-current.config:6340:CONFIG_FB_TFT_ILI9163=m config/kernel/linux-sunxi-current.config:6341:CONFIG_FB_TFT_ILI9320=m config/kernel/linux-sunxi-current.config:6342:CONFIG_FB_TFT_ILI9325=m config/kernel/linux-sunxi-current.config:6343:CONFIG_FB_TFT_ILI9340=m config/kernel/linux-sunxi-current.config:6344:CONFIG_FB_TFT_ILI9341=m config/kernel/linux-sunxi-current.config:6345:CONFIG_FB_TFT_ILI9481=m config/kernel/linux-sunxi-current.config:6346:CONFIG_FB_TFT_ILI9486=m config/kernel/linux-sunxi-current.config:6347:CONFIG_FB_TFT_PCD8544=m config/kernel/linux-sunxi-current.config:6348:CONFIG_FB_TFT_RA8875=m config/kernel/linux-sunxi-current.config:6349:CONFIG_FB_TFT_S6D02A1=m config/kernel/linux-sunxi-current.config:6350:CONFIG_FB_TFT_S6D1121=m config/kernel/linux-sunxi-current.config:6352:CONFIG_FB_TFT_SH1106=m config/kernel/linux-sunxi-current.config:6353:CONFIG_FB_TFT_SSD1289=m config/kernel/linux-sunxi-current.config:6354:CONFIG_FB_TFT_SSD1305=m config/kernel/linux-sunxi-current.config:6355:CONFIG_FB_TFT_SSD1306=m config/kernel/linux-sunxi-current.config:6356:CONFIG_FB_TFT_SSD1331=m config/kernel/linux-sunxi-current.config:6357:CONFIG_FB_TFT_SSD1351=m config/kernel/linux-sunxi-current.config:6358:CONFIG_FB_TFT_ST7735R=m config/kernel/linux-sunxi-current.config:6359:CONFIG_FB_TFT_ST7789V=m config/kernel/linux-sunxi-current.config:6361:CONFIG_FB_TFT_TINYLCD=m config/kernel/linux-sunxi-current.config:6362:CONFIG_FB_TFT_TLS8204=m config/kernel/linux-sunxi-current.config:6363:CONFIG_FB_TFT_UC1611=m config/kernel/linux-sunxi-current.config:6364:CONFIG_FB_TFT_UC1701=m config/kernel/linux-sunxi-current.config:6365:CONFIG_FB_TFT_UPD161704=m
-
I have already hinted at this. But here there is some general problem of writing an overlay file for an already running system. We can help the user by luring him to Armbian OS if we get the user's @Peter Gregory consent. We find "compatible" in the source code of the driver : compatible = "ti,ads7846" Check the presence of the driver module in the Armbian kernel for sunxi: armbian/build> grep -nr TOUCHSCREEN_ADS7846 config/kernel/linux-sunxi* config/kernel/linux-sunxi64-current.config:2965:CONFIG_TOUCHSCREEN_ADS7846=m config/kernel/linux-sunxi64-edge.config:2978:CONFIG_TOUCHSCREEN_ADS7846=m config/kernel/linux-sunxi64-legacy.config:2902:CONFIG_TOUCHSCREEN_ADS7846=m config/kernel/linux-sunxi-current.config:2865:CONFIG_TOUCHSCREEN_ADS7846=m config/kernel/linux-sunxi-edge.config:2966:CONFIG_TOUCHSCREEN_ADS7846=m config/kernel/linux-sunxi-legacy.config:2890:CONFIG_TOUCHSCREEN_ADS7846=m I wanted to write something as a template, but I found it on this forum. Look at the example: examples/spi-ads7846.dts sun8i-h3-spi-ads7846.dts Please write questions and errors here. Let's try to figure this out for a modern kernel (>=6.1)
-
Don't rush to say goodbye. Try to provide more information
-
Try setting the verbose parameter to 7 in armbianEnv.txt verbosity=7 The final DTS with the applied overlay can be obtained directly on the working device: dtc --sort -I fs -O dts /sys/firmware/devicetree/base > dts-out.txt Check the existence of the spi object in the sys file system: find /sys/ -name '*spi*' Check dmesg command. dmesg | grep spi dmesg | grep -i err dmesg | grep -i warn This processor has not been tested for a long time. Perhaps changes in the upstream of the u-boot, kernel sources somehow affected the situation. Feel free to experiment. The device is in your hands. I'm just trying to guide you along some path. And the code I wrote is not necessarily working. Just do your own by analogy. The errors that you will get as a result are posted here in text form.
-
That's exactly what you need to do and combine both overlays: sun7i-a20-spi0-spidev.dts fragment2 is taken from the sun7i-a20.dtsi
-
It is ok. This entry says that an overlay will be accepted: sun7i-a20-spi-spidev.dtbo /_/-/ Replace the underscore with a dash Let's look at the source file: compatible = "armbian,spi-dev"; - This line will cause the spidev module to load into the kernel. But the /dev/spidev0.X interface will not be present because it is not enabled (status = "disabled"). It is necessary to register more overlays to include the necessary nodes spi0, spi1 or spi2. The source text of the file "sun7i-a20-spi0.dts": To include spi1 and spi2, the lines must be: ... fdtfile=sun7i-a20-bananapi-m1-plus.dtb overlay_prefix=sun7i-a20 overlays=spi-spidev spi1 spi2 ... In this case, three nodes will be added for control via the spidev driver and only two will be enabled. This can be bad if, for example, spi0 is planned to be used in some other way and another driver must be connected. You will have to rewrite the overlay yourself for a specific task and compile it. You can find all the source texts of the overlays in the kernel folder after all the patches have been applied before compiling. build/cache/sources/linux-kernel-worktree/6.1__sunxi__armhf/arch/arm/boot/dts/overlay/*
-
😢! What is the banana version? bananapim1plus - A20 SOC. The native reassembly of the kernel turns into eternity. Check the configuration: grep -nr CONFIG_SPI_SPIDEV /boot/conf* Maybe some details from you? What is connected via SPI?
-
Please show the link in the code: drivers/spi/spi-sun6i.c which deadlines do you think are working incorrectly. And please check the dtb on the working board. It may need to be fixed.
-
Check the git status in this repository if this folder is under git control. Add all the files and commit. Assign a tag to it. Step by step make your changes and commit git for each step. Extract all your commits in one move: mkdir userpatches/patch/kernel/sunxi-6.1/patches.spi KERNEL="cache/sources/linux-kernel-worktree/6.1__sunxi__armhf" ./tools/mk_format_patch $KERNEL Tag..HEAD userpatches/patch/kernel/sunxi-6.1/patches.spi I do not know how patches are applied today in the current version of the build system. But they will be applied every time the build system starts assembling the kernel. The order of assembly is determined by a single file: patch/kernel/archive/sunxi-6.1/series.conf Just add them to this place and write them in this file.
-
I think I misunderstood the translation of this. Will you be able to portray this as a flowchart?