Skip to content

Commit

Permalink
Add a memory node to the MangoPi MQ-Pro device tree
Browse files Browse the repository at this point in the history
I'm not sure why the original device tree doesn't include this - a mystery
for the future because Seed needs one to boot, and we can easily just add
it here?

There are actually multiple models of the MQ-Pro that have different amounts
of RAM, so we could support that in the future.
  • Loading branch information
IsaacWoods committed Nov 12, 2023
1 parent 0012b2d commit 077cff7
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions bundled/device_tree/d1_mangopi_mq_pro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@
/dts-v1/;

/ {
#address-cells = <1>;
#size-cells = <1>;

model = "MangoPi MQ Pro";
compatible = "widora,mangopi-mq-pro", "allwinner,sun20i-d1";

Expand All @@ -273,6 +276,13 @@
stdout-path = "serial0:115200n8";
};

// TODO: this was added by us. I have no idea where it's supposed to come from yet (ie. why it's not in the original DT?)
// TODO: I think we should be able to tell it there are multiple models (512MiB vs 1GiB). This just hardcodes 1GiB for now.
memory@40000000 {
device_type = "memory";
reg = <0x40000000 0x40000000>; // 1GiB starting at 0x4000_0000
};

leds {
compatible = "gpio-leds";

Expand Down Expand Up @@ -619,18 +629,18 @@
status = "reserved";
};

uart0: serial@2500000 {
compatible = "snps,dw-apb-uart";
reg = <0x2500000 0x400>;
reg-io-width = <4>;
reg-shift = <2>;
interrupts = <SOC_PERIPHERAL_IRQ(2) IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_UART0>;
resets = <&ccu RST_BUS_UART0>;
dmas = <&dma 14>, <&dma 14>;
dma-names = "tx", "rx";
status = "disabled";
};
uart0: serial@2500000 {
compatible = "snps,dw-apb-uart";
reg = <0x2500000 0x400>;
reg-io-width = <4>;
reg-shift = <2>;
interrupts = <SOC_PERIPHERAL_IRQ(2) IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_UART0>;
resets = <&ccu RST_BUS_UART0>;
dmas = <&dma 14>, <&dma 14>;
dma-names = "tx", "rx";
status = "disabled";
};

uart1: serial@2500400 {
compatible = "snps,dw-apb-uart";
Expand Down

0 comments on commit 077cff7

Please sign in to comment.