Jump to content

Orange Pi Zero 3


ag123

Recommended Posts

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?

Link to comment
Share on other sites

@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.

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Posted (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 by sasa
Link to comment
Share on other sites

Posted (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 by jimg
Link to comment
Share on other sites

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:

 

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

Posted (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 by D
Link to comment
Share on other sites

@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

 

Link to comment
Share on other sites

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>;
        };
    };
};

 

Link to comment
Share on other sites

@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.

 

Link to comment
Share on other sites

Hi

 

How to disable HDMI audio and audiocodec 

 

 0 [audiocodec     ]: audiocodec - audiocodec
                      audiocodec
 1 [SoundCard      ]: USB-Audio - USB PnP Sound Device
                      C-Media Electronics Inc. USB PnP Sound Device at usb-5200400.usb-1, full speed
 2 [HDMI           ]: HDMI - HDMI
                      HDMI

 

I don't need this because I use external sound card on USB and I would like prefer USB Sound card on index number  0

 

I try use /etc/modprobe.d/alsa.conf with

 

options snd_usb_audio index=0

 

but don't work

 

 

Link to comment
Share on other sites

20 hours ago, Stephen Graf said:

The community images from June 7 have analog and HDMI sound.  The analog sound needs

to be unmuted which can be done with alsamixer.

This is incredible news, so glad to hear this! I won't be able to test this out for a while but will give any useful feedback once I do, hope to hear reports from others as well. Thanks to all who keep working on improving support for this board.

Link to comment
Share on other sites

Hi!

 

Thanks for all the work on this board!

 

I noticed that a reboot do a power cycle on the usb peripheral connected on the usb type A port. But not if I use the usb pins on the 13 pins header.

Is there a way to enable a power cycle too ?

 

I'm afraid it's not possible because the 5V pin is a in/out pin, but I prefer to ask.

Link to comment
Share on other sites

well h618 isn't a 'high performing' cpu, so don't expect too much in terms of opencl etc, probably nil.

and even GPU support is probably sketchy

https://docs.mesa3d.org/drivers/panfrost.html

https://bakhi.github.io/mobileGPU/panfrost/

https://en.opensuse.org/ARM_Mali_GPU

GPU is a most undocumented aspects of these socs, many time you are left with 'you are on your own', no docs, no help, no hints, no nothing

 

you can try plain old NEON

https://developer.arm.com/Architectures/Neon

https://developer.arm.com/documentation/dht0002/a/Introducing-NEON/Developing-for-NEON/Automatic-vectorization

this would probably  'just works'

 

Link to comment
Share on other sites

Hello, first post here.

 

I have recently bought an Orange Pi Zero 3 4gb (its my first approach to any IoT so im quite noob), and i cannot make it work using armbian. Ive read a lot of users having troubels regarding the 4gb one, but I couldnt even make it reboot by following the "chinese" github. Generally, it boots the first time fine, but from then it has errors.

 

I was wondering if you could please help me. Ive tried different armbian versions but nothing seems to work.

Thanks.

Link to comment
Share on other sites

On 6/16/2024 at 2:56 AM, burger242 said:

I have recently bought an Orange Pi Zero 3 4gb (its my first approach to any IoT so im quite noob), and i cannot make it work using armbian. Ive read a lot of users having troubels regarding the 4gb one, but I couldnt even make it reboot by following the "chinese" github. Generally, it boots the first time fine, but from then it has errors.

 

I was wondering if you could please help me. Ive tried different armbian versions but nothing seems to work.

Thanks.

What exactly have you tried so far?  How are you determining it's not working?

 

What kind of SD card are you using, and how are you installing Armbian on it?

 

What are you using for a power supply and USB cable for power?  What's the behavior of the status LEDs?

 

Are you using a keyboard and monitor, or are you connecting to the board via SSH?  Have you tried attaching a serial cable to it and reading the output over a serial terminal?

Link to comment
Share on other sites

  • At first I thought I was having troubles installing Armbian in my Orange Pi Zero 3 4Gb. However, I have also tried Ubuntu, Debian and Orange Pi OS and none of them work. This is what I mean by not working, also including the process I usually follow:
    • Format my 2tb Lenovo SD card, recently using SD Card Formatter
    • Try to install the SO both using Balena Etcher and Win32DiskImager
    • Insert and boot the Orange Pi. First and second/third boots work, usually after that it gives different errors when not booting, usually: "/dev/mmcblk0p1 does not exist"
    • The only thing I did on those boots was "sudo apt update && sudo apt ugrade -y". Also, "sudo dpkg-reconfigure keyboard-configuration" to change the keyboard layout to Spanish.
  • I am using a 5V 3A power supply.
  • Leds are red when starting and then turn green; blinking.
  • Im using a keyboard and a monitor
  • I am not able to try a serial cable.

PS:

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines