OttawaHacker Posted May 8 Share Posted May 8 12 hours ago, voapilro said: I already did it, you can find it attached here I tried the uboot with the same image you mentioned. Something is definitely happening, I see red and green lights flashing however there is nothing on my hdmi output, no shell or nothing else. Am I missing something? 0 Quote Link to comment Share on other sites More sharing options...
ag123 Posted May 8 Author Share Posted May 8 @OttawaHacker connect to the board using a usb-uart (debug) serial dongle. the boot messages would normally show up there, or that if it booted to the prompt, you could login as root and run dmesg to see what goes wrong try also the other u-boot https://github.com/ag88/1.5GB_Fix_for_Armbian_on_OrangePiZero3/ to see if that helps. there is a sequence of patches that needs to be applied and I've done that with my implementation. Unfortunately, in my case I hardcoded the 1.5GB memory as I found that for 1.5GB boards, the mainline u-boot incorrectly detected memory as 2GB or 4GB inconsistently. For once it says 2GB, then 4GB, then 2GB, and the algorithm would probe into the wrong memory size. so 'hardcoding' it ensures that it is 1.5GB no more / no less. you can use the distributed Armbian images https://www.armbian.com/orange-pi-zero-3/ and subsequently apply the u-boot patch from my repository. If you don't use dd , you can try using the python script that I've provided in my respository to patch u-boot into the image. Checkout instructions in my repository. 0 Quote Link to comment Share on other sites More sharing options...
voapilro Posted May 8 Share Posted May 8 4 hours ago, OttawaHacker said: I tried the uboot with the same image you mentioned. Something is definitely happening, I see red and green lights flashing however there is nothing on my hdmi output, no shell or nothing else. Am I missing something? @OttawaHacker This is a minimal build, probably it has no HDMI output. As @ag123 said, you need a serial cable to see output. Or you could access via SSH, looking at your router for DHCP address. Other option would be to use a build with desktop like this one, and apply patch the same way. Any way, pull request was already merged, so you can wait for next community release in a few days. 0 Quote Link to comment Share on other sites More sharing options...
voapilro Posted May 8 Share Posted May 8 @ag123 @OttawaHacker I saw community builds already generated here. I could check that they have u-boot DRAM patch, so I tried both of them in my board, and they boot normally 🙂 also minimal one having HDMI output. 1 Quote Link to comment Share on other sites More sharing options...
OttawaHacker Posted May 9 Share Posted May 9 13 hours ago, voapilro said: they boot normally 🙂 also minimal one having HDMI output. OMG Thank you!!! Yes this works. This is very exciting, so glad to have a recent image working on the opiz3 0 Quote Link to comment Share on other sites More sharing options...
bjorn Posted May 11 Share Posted May 11 It works, thanks @ag123, good work ! For some reason the Armbian Image is far slower than the Orange Pi Debian image in UI mode. I am guessing its maybe because the Armbian Image comes only with Gnome which is probably heavier UI framework to run. 0 Quote Link to comment Share on other sites More sharing options...
wanasta Posted May 11 Share Posted May 11 I have a tp link wn722n wifi adapter on the rtl8188eus chipset and I need to build a driver for the monitoring meter, but I don’t have the kernel headers, how and where can I download and install them? 0 Quote Link to comment Share on other sites More sharing options...
ag123 Posted May 12 Author Share Posted May 12 @wanasta orange pi zero 3 (and zero 2w) has on board wifi, have you tried them 1st? usb wifi dongles normally if the drivers are built into the kernel, plug them in and check dmesg if they are detected 0 Quote Link to comment Share on other sites More sharing options...
OttawaHacker Posted May 12 Share Posted May 12 5 hours ago, wanasta said: I have a tp link wn722n wifi adapter on the rtl8188eus chipset and I need to build a driver for the monitoring meter, but I don’t have the kernel headers, how and where can I download and install them? Wifi works flawlessly with recent image. Includes Link Quality and Signal Level 0 Quote Link to comment Share on other sites More sharing options...
TRay Posted May 13 Share Posted May 13 I would like to ask about the entry in armbiaEnv.txt in the ArmBian distribution for Orange Pi Zero 3 overlay_prefix=sun50i-h616 does it have anything to do with the file in the directory? /boot/dtb-6.6.30-current-sunxi64/allwinner/sun50i-h618-orangepi-zero3.dtb For OZPI version 3 there is a prefix sun50i-h618 and in armbianEnv.txt there is overlay_prefix=sun50i-h616 shouldn't it be sun50i-h618 ?? I'm asking about this because I have a problem with using overlay for w1-gpio for OZPI v3, so I am looking for the source of the problem in various places 0 Quote Link to comment Share on other sites More sharing options...
sasa Posted May 17 Share Posted May 17 (edited) 31.03.2024 в 15:02, 8p8c сказал: [ 7.132367] sun50i-h616-pinctrl 300b000.pinctrl: pin PA7 already requested by spi1.0; cannot claim for 300b000.pinctrl:7 [ 7.132399] ads7846 spi1.0: failed to request pendown GPIO [ 7.132405] ads7846: probe of spi1.0 failed with error -22 Hello, to avoid this error, you can disable strict mode in the pin controller driver https://elixir.bootlin.com/linux/v6.7.12/source/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c Цитата --- linux-6.6.23-sk/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c 2024-03-28 15:31:05.000000000 +0300 +++ linux-custom/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c 2024-05-17 10:48:01.796628355 +0300 @@ -877,6 +877,7 @@ static const struct sunxi_pinctrl_desc h .irq_bank_map = h616_irq_bank_map, .irq_read_needs_mux = true, .io_bias_cfg_variant = BIAS_VOLTAGE_PIO_POW_MODE_CTL, + .disable_strict_mode = true, }; But I'm not sure that the driver for this touchscreen can work on allwinner processors without changes, because their "gpio_in" and "irq" are different multiplexer states Цитата SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7), >>> SUNXI_FUNCTION(0x0, "gpio_in"), SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "emac1"), /* ETXEN */ SUNXI_FUNCTION(0x3, "i2s0"), /* BCLK */ >>> SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 7)), /* PA_EINT7 */ I think they cannot work simultaneously, so something similar is needed Цитата static int get_pendown_state(struct ads7846 *ts) { + int val; + if (ts->get_pendown_state) return ts->get_pendown_state(); - return gpiod_get_value(ts->gpio_pendown); + pinctrl_select_state(ts->pinctrl, ts->pinctrl_pins_gpio); + val = gpiod_get_value(ts->gpio_pendown); + pinctrl_select_state(ts->pinctrl, ts->pinctrl_pins_default); + + return val; } PS Of course you can use different pins for interrupts and gpio and then everything should work out of the box. Edited May 17 by sasa 1 Quote Link to comment Share on other sites More sharing options...
jimg Posted May 20 Share Posted May 20 (edited) On 5/13/2024 at 5:04 AM, TRay said: I'm asking about this because I have a problem with using overlay for w1-gpio for OZPI v3, so I am looking for the source of the problem in various places I don't think the Orange Pi Zero 3 supports w1-gpio. The only 1-wire overlay that I know of is for H5-equipped boards. Edited May 20 by jimg 0 Quote Link to comment Share on other sites More sharing options...
TRay Posted May 20 Share Posted May 20 3 hours ago, jimg said: don't think the Orange Pi Zero 3 supports w1-gpio. The only 1-wire overlay that I know of is for H5-equipped boards. Hi, for me w1-gpio on OZPI v3 working now very well via overlay dts file please read my last post in: 0 Quote Link to comment Share on other sites More sharing options...
TRay Posted May 20 Share Posted May 20 The only thing I haven't been able to eliminate is this message [ 5.019754] gpio-74 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file I tried setting the GPIO flag for GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN but unfortunately, it doesn't work but it doesn't affect the operation of w1-gpio It seems that the GPIO pins do not have an "open drain" mode, they do outputs and inputs. It is a warning about what something sees as an invalid or incomplete configuration in Device Tree, rather than a real problem with the hardware. 0 Quote Link to comment Share on other sites More sharing options...
D Posted Saturday at 06:23 AM Share Posted Saturday at 06:23 AM (edited) Hi! OrangePi Zero 2w user here: I'm trying to understand why there is no `pwmchip0` in `/sys/class/pwm`. I'm using the latest kernel 6.6.31 with an extra dts overlay. I noticed that there is uart5 enabled by default, so I should see `pwmchip0`, right? Was there any regression reported? EDIT: also, why is there a definition for pwm5 when it does not exist? Edited Saturday at 06:35 AM by D 0 Quote Link to comment Share on other sites More sharing options...
ag123 Posted Saturday at 07:35 AM Author Share Posted Saturday at 07:35 AM @D answer to that question is 'complicated', there are a bunch of DTS patches https://github.com/armbian/build/tree/main/patch/kernel/archive/sunxi-6.6/patches.armbian which are laid on top of mainline H616 DTS https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi you can try to decompile the dtb file back to its source to examine it dtc -I dtb -O dts -o ~/devtree.dts /boot/dtb/allwinner/sun50i-h618-orangepi-zero3.dtb 0 Quote Link to comment Share on other sites More sharing options...
D Posted Saturday at 01:37 PM Share Posted Saturday at 01:37 PM Thanks for replying @ag123. I don't negate the fact that my dts might be broken (review below), but why can't see `pwmchip0` in `/sys/class/pwm`? That indicates a release bug as arm64-dts-sun50i-h618-orangepi-zero2w-add-dtb.patch enables `pwm` and `pwm5`. /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&pio>; __overlay__ { pwm4_pin: pwm4-pin { pins = "PI14"; function = "pwm4"; }; }; }; fragment@1 { target-path = "/"; __overlay__ { backlight_pwm: backlight_pwm { compatible = "pwm-backlight"; brightness-levels = <0 25 50 75 100 125 150 175 200 225 255>; default-brightness-level = <6>; pwms = <&pwm 4 25000 0>; pwm_names = "backlight"; status = "okay"; }; }; }; fragment@2 { target-path = "/soc"; __overlay__ { pwm4: pwm4@0300a000 { compatible = "allwinner,sunxi-pwm4"; pinctrl-names = "default"; pinctrl-0 = <&pwm4_pin>; status = "okay"; }; }; }; fragment@3 { target = <&spi1>; __overlay__ { status = "okay"; cs-gpios = <&pio 7 5 0>; /*PH5=CS0 PH9=CS1*/ ili9341: ili9341@0 { compatible = "adafruit,yx240qv29", "ilitek,ili9341"; reg = <0>; pinctrl-names = "default"; spi-max-frequency = <48000000>; rotation = <270>; reset-gpios = <&pio 8 6 0>; /* PI6 */ dc-gpios = <&pio 7 4 0>; /* PH4 */ backlight = <&backlight_pwm>; }; ads7846: ads7846@0 { compatible = "ti,ads7846"; reg = <1>; pinctrl-names = "default"; spi-max-frequency = <2000000>; interrupts = <8 5 1>; /* PI5 - IRQ */ interrupt-parent = <&pio>; pendown-gpio = <&pio 8 5 1>; /* PI5 */ ti,swap-xy = <1>; ti,keep_vref_on = /bits/ 16 <1>; ti,x-min = /bits/ 16 <280>; ti,y-min = /bits/ 16 <350>; ti,x-max = /bits/ 16 <3850>; ti,y-max = /bits/ 16 <3850>; ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <255>; ti,x-plate-ohms = /bits/ 16 <133>; ti,debounce-max = /bits/ 16 <50>; ti,debounce-tol = /bits/ 16 <30>; ti,debounce-rep = /bits/ 16 <1>; wakeup-source; }; }; }; fragment@4 { target = <&pwm>; __overlay__ { sunxi-pwms = <&pwm4>, <&pwm5>; }; }; }; 0 Quote Link to comment Share on other sites More sharing options...
ag123 Posted Sunday at 12:55 PM Author Share Posted Sunday at 12:55 PM @D I'm really unfamiliar with DTS and such, hence there isn't much I'd help. But that are there any hints in dmesg etc? And as I suggested, try to decompile the dtb for your board and review that. In my case, I tried that for Orange Pi Zero 3 and did not see pwm devices listed. Hence, I'd guess those would need to be added by applying a .dtbo (device tree overlay binary). Accordingly, you may be able to check the same thing in a running system by checking them under /proc/device-tree as well. e.g. if you don't find them in /proc/device-tree, maybe that overlay isn't loaded. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.