Jump to content

Vicentiu Ciorbaru

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Vicentiu Ciorbaru

  1. After further debugging, the DTS from above is not enough. Crosschecking between Armbian's banana-pi-m5.dtb and the one provided by Sinovo's Armbian, I noticed the following change in "serial@24000" node.

     

    -                               phandle = <0x128>;
    +                               pinctrl-0 = <0x27 0x28>;
    +                               pinctrl-names = "default";
    +                               uart-has-rtscts;
    +                               phandle = <0x12a>;

     

     

    I'm not an expert in DTS definitions, but as far as I understand, the phandle is a reference. The reference doesn't seem to be used anywhere in the main DTS, so I haven't changed it.

    Instead I've modified the overlay to add the other changes:

     

    /dts-v1/;
    
    / {
    	compatible = "amlogic,sm1";
    
    	fragment@0 {
    		target-path = "/aliases";
    
    		__overlay__ {
    			serial1 = "/soc/bus@ffd00000/serial@24000";
    		};
    	};
    
    	fragment@1 {
    		target-path = "/soc/bus@ffd00000/serial@24000";
    
    		__overlay__ {
    			pinctrl-0 = <0x27 0x28>;
    			pinctrl-names = "default";
    			uart-has-rtscts;
    			status = "okay";
    		};
    	};
    };

     

     

    I confirm that after these changes, UART finally works. Hope this helps anyone in search of a solution. I hope the Armbian maintainers can address these problems related to the Banana Pi M5 board.

     

     

    EDIT:

    After reverting the previous DTS, as I pasted in the previous post and doing a full power cycle, the UART works still. So it's likely that I didn't power cycle the board properly. I just kept pressing the reset button, but that doesn't seem to be enough apparently?

  2. After decompiling the meson-uartA.dtbo, it seems like the addresses are wrong:

     

    /dts-v1/;
    
    / {
    	compatible = "amlogic,meson-gxbb";
    
    	fragment@0 {
    		target-path = "/soc/bus@c1100000/serial@84c0";
    
    		__overlay__ {
    			status = "okay";
    		};
    	};
    };

    Looking at the CPUs datasheet https://dn.odroid.com/S905X3/ODROID-C4/Docs/S905X3_Public_Datasheet_Hardkernel.pdf, the memory map is:

    Start    End      Peripheral
    FFD24000 FFD24FFF uart0
    FFD23000 FFD23FFF uart1
    FFD22000 FFD22FFF uart2

     

    Thus, I have changed the DTS like so:

     

    /dts-v1/;
    
    / {
    	compatible = "amlogic,sm1";
    
    	fragment@0 {
    		target-path = "/aliases";
    
    		__overlay__ {
    			serial1 = "/soc/bus@ffd00000/serial@24000";
    		};
    	};
    
    	fragment@1 {
    		target-path = "/soc/bus@ffd00000/serial@24000";
    
    		__overlay__ {
    			status = "okay";
    		};
    	};
    };

     

    This DTS is the one used by Sinovo's Armbian release and now I have two devices /dev/ttyAML0 and /dev/ttyAML1

     

    I suspect that none of the "enablea-ble" DTBs from armbian-config are actually functional. Additionally, armbian doesn't come with SPI dtbo overlay in order to enable the HW. I recommend for the maintainers to add that to the images. If there is a guide for how to do this, I might be able to give it a shot to update it myself.

  3. Hi!

     

    Using the vanilla ARMBIAN image 23.02.2_Bananapim5_bullseye_current_6.1.11_minimal

    Enabling the provided uartA and uartC dtbos fails.

    Here is the output from the boot process, as captured via the Serial Debug interface:

     

    238 bytes read in 3 ms (77.1 KiB/s)
    Applying kernel provided DT overlay meson-uartA.dtbo
    failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
    238 bytes read in 3 ms (77.1 KiB/s)
    Applying kernel provided DT overlay meson-uartC.dtbo
    failed on fdt_overlay_apply(): FDT_ERR_BADMAGIC

     

    It seems that this image provides invalid dtbos, likely not properly built alongside the same kernel image.

     

    I'm happy to help debug this as I have a system at the ready.

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines