Skip to content

Instantly share code, notes, and snippets.

@kallisti5
Last active January 23, 2023 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kallisti5/8d9b942b131ac93a8e60b9ee53de5f7e to your computer and use it in GitHub Desktop.
Save kallisti5/8d9b942b131ac93a8e60b9ee53de5f7e to your computer and use it in GitHub Desktop.

ARM64 - qemu-system-arm64 from u-boot

  • Driver: PL011
  • need reg-shift 2
=> fdt list /pl011  
pl011@9000000 {
	clock-names = "uartclk", "apb_pclk";
	clocks = <0x00008000 0x00008000>;
	interrupts = <0x00000000 0x00000001 0x00000004>;
	reg = <0x00000000 0x09000000 0x00000000 0x00001000>;
	compatible = "arm,pl011", "arm,primecell";
};

RISCV64 - SiFive Unmatched from u-boot

  • Driver: 8250 Compat
  • need reg-shift 2
fdt list /soc/serial@10010000
serial@10010000 {
        compatible = "sifive,fu740-c000-uart", "sifive,uart0";
        reg = <0x00000000 0x10010000 0x00000000 0x00001000>;
        interrupt-parent = <0x0000000a>;
        interrupts = <0x00000027>;
        clocks = <0x00000001 0x00000007>;
        status = "okay";
        u-boot,dm-spl;
};

RISCV64 - StarFive VisionFive 2 from u-boot

  • Driver: 8250 Compat
  • needed reg-shift: 2
StarFive # fdt list /soc/serial@10000000 
serial@10000000 {
        compatible = "snps,dw-apb-uart";
        reg = <0x00000000 0x10000000 0x00000000 0x00010000>;
        reg-io-width = <0x00000004>;
        reg-shift = <0x00000002>;
        clocks = <0x0000000f 0x00000092 0x0000000f 0x00000091>;
        clock-names = "baudclk", "apb_pclk";
        resets = <0x00000010 0x00000053 0x00000010 0x00000054>;
        interrupts = <0x00000020>;
        status = "okay";
        reg-offset = <0x00000000>;
        current-speed = <0x0001c200>;
        clock-frequency = <0x016e3600>;
        u-boot,dm-spl;
        phandle = <0x0000003b>;
};

RISCV64 - qemu-system-riscv64 from u-boot

  • Driver: 8250 Compat
  • need reg-shift: 0
=> fdt list /soc/serial
serial@10000000 {
	interrupts = <0x0000000a>;
	interrupt-parent = <0x00000003>;
	clock-frequency = "", "8@";
	reg = <0x00000000 0x10000000 0x00000000 0x00000100>;
	compatible = "ns16550a";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment