Skip to content

Commit

Permalink
Fill in more pins for PB2
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Dec 11, 2024
1 parent 6363b11 commit 56829fe
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 87 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.buildpath
*.gch
*.gch.sum
*.dtb
build/
SD/*.xz
lib/librgbmatrix.so
Expand Down
9 changes: 7 additions & 2 deletions capes/drivers/bb64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@
%.o: %.cpp
ccache g++ -O3 -std=gnu++23 -c $(SRCDIR)$< -o $@

all: pinctrl fpp-reserve-memory.dtb

pinctrl: src/AM6232.o src/Ball.o src/PocketBeagle2.o src/ConfigPin.o src/Pin.o
g++ -o pinctrl src/AM6232.o src/Ball.o src/PocketBeagle2.o src/ConfigPin.o src/Pin.o
chmod +s pinctrl

install: pinctrl
fpp-reserve-memory.dtb: fpp-reserve-memory.dts
dtc -O dtb -o fpp-reserve-memory.dtb fpp-reserve-memory.dts

install: pinctrl fpp-reserve-memory.dtb
cp -f pinctrl /usr/bin
chmod +s /usr/bin/pinctrl
cp fpp-reserve-memory.dtb /boot/firmware/overlays

clean:
rm -f pinctrl src/*.o

all: pinctrl
26 changes: 26 additions & 0 deletions capes/drivers/bb64/fpp-reserve-memory.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/dts-v1/;
/plugin/;

/* Reserve 4M DDR memory for the pixel buffers */
/ {


// identification
part-number = "FPP-RESERVED-MEMORY";
version = "00A0";

fragment@0 {
target-path = "/";
__overlay__ {
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;

fpp_reserved: fpp_reserved@8f000000 {
reg = <0x00 0x8f000000 0x00 0x00400000>;
};
};
};
};
};

98 changes: 49 additions & 49 deletions capes/drivers/bb64/src/AM6232.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static Ball& addBall(const std::string& n, uint32_t d, uint32_t o, bool addGPIO
}

void InitAM6232Balls() {
addBall("A18", MAIN_DOMAIN, 0x1F0);
addBall("A18", MAIN_DOMAIN, 0x1F0, true);
addBall("L23", MAIN_DOMAIN, 0x084);
addBall("P25", MAIN_DOMAIN, 0x07C);
addBall("M22", MAIN_DOMAIN, 0x0A4, true, 4);
Expand All @@ -72,82 +72,82 @@ void InitAM6232Balls() {
addBall("U25", MAIN_DOMAIN, 0x074);
addBall("U24", MAIN_DOMAIN, 0x078);
addBall("M24", MAIN_DOMAIN, 0x090);
addBall("N20", MAIN_DOMAIN, 0x094);
addBall("N20", MAIN_DOMAIN, 0x094, true, 4);
addBall("M21", MAIN_DOMAIN, 0x0A8);
addBall("L21", MAIN_DOMAIN, 0x0AC);
addBall("K22", MAIN_DOMAIN, 0x0B0);
addBall("K24", MAIN_DOMAIN, 0x0B4);
addBall("K22", MAIN_DOMAIN, 0x0B0, true, 4).addMode("uart4_rx", { PIN_INPUT | 3 });
addBall("K24", MAIN_DOMAIN, 0x0B4, true).addMode("uart4_tx", { PIN_OUTPUT | 3 });
addBall("U23", MAIN_DOMAIN, 0x098);
addBall("V25", MAIN_DOMAIN, 0x09C);
addBall("B16", MAIN_DOMAIN, 0x1E0);
addBall("A16", MAIN_DOMAIN, 0x1E4);
addBall("B17", MAIN_DOMAIN, 0x1E8);
addBall("A17", MAIN_DOMAIN, 0x1EC);
addBall("B17", MAIN_DOMAIN, 0x1E8, true).addMode("uart1_rx", { PIN_INPUT | 1 });
addBall("A17", MAIN_DOMAIN, 0x1EC, true).addMode("uart1_tx", { PIN_OUTPUT | 1 });
addBall("E15", MAIN_DOMAIN, 0x1DC, true).addMode("uart5_tx", { PIN_OUTPUT | 1 }).addMode("can0_rx", { PIN_INPUT | 0 });
addBall("C15", MAIN_DOMAIN, 0x1D8, true).addMode("uart5_rx", { PIN_INPUT | 1 }).addMode("can0_tx", { PIN_OUTPUT | 0 });
addBall("A20", MAIN_DOMAIN, 0x1B0);
addBall("B20", MAIN_DOMAIN, 0x1A4);
addBall("E19", MAIN_DOMAIN, 0x1AC);
addBall("D20", MAIN_DOMAIN, 0x1A8);
addBall("E18", MAIN_DOMAIN, 0x1A0);
addBall("B18", MAIN_DOMAIN, 0x19C);
addBall("A19", MAIN_DOMAIN, 0x198);
addBall("B19", MAIN_DOMAIN, 0x194);
addBall("A20", MAIN_DOMAIN, 0x1B0, true).addMode("uart1_tx", { PIN_OUTPUT | 2 });
addBall("B20", MAIN_DOMAIN, 0x1A4, true);
addBall("E19", MAIN_DOMAIN, 0x1AC, true).addMode("uart1_rx", { PIN_INPUT | 2 });
addBall("D20", MAIN_DOMAIN, 0x1A8, true);
addBall("E18", MAIN_DOMAIN, 0x1A0, true);
addBall("B18", MAIN_DOMAIN, 0x19C, true);
addBall("A19", MAIN_DOMAIN, 0x198, true).addMode("uart6_tx", { PIN_OUTPUT | 3 });
addBall("B19", MAIN_DOMAIN, 0x194, true).addMode("uart6_rx", { PIN_INPUT | 3 });
addBall("D1", MCU_DOMAIN, 0x060);
addBall("A8", MCU_DOMAIN, 0x044);
addBall("D10", MCU_DOMAIN, 0x048);
addBall("B3", MCU_DOMAIN, 0x038);
addBall("D6", MCU_DOMAIN, 0x034);
addBall("B3", MCU_DOMAIN, 0x038, true);
addBall("D6", MCU_DOMAIN, 0x034, true);
addBall("D4", MCU_DOMAIN, 0x040);
addBall("E5", MCU_DOMAIN, 0x03C);
addBall("B5", MCU_DOMAIN, 0x014);
addBall("A5", MCU_DOMAIN, 0x018);
addBall("AD24", MAIN_DOMAIN, 0x160);
addBall("AB22", MAIN_DOMAIN, 0x15C);
addBall("AD23", MAIN_DOMAIN, 0x180);
addBall("AD22", MAIN_DOMAIN, 0x17C);
addBall("AE21", MAIN_DOMAIN, 0x168);
addBall("AA19", MAIN_DOMAIN, 0x164);
addBall("AE23", MAIN_DOMAIN, 0x184);
addBall("AB20", MAIN_DOMAIN, 0x188);
addBall("AC21", MAIN_DOMAIN, 0x18C);
addBall("AE22", MAIN_DOMAIN, 0x190);
addBall("Y18", MAIN_DOMAIN, 0x16C);
addBall("AD24", MAIN_DOMAIN, 0x160, true);
addBall("AB22", MAIN_DOMAIN, 0x15C, true);
addBall("AD23", MAIN_DOMAIN, 0x180, true, 3);
addBall("AD22", MAIN_DOMAIN, 0x17C, true, 3);
addBall("AE21", MAIN_DOMAIN, 0x168, true, 3);
addBall("AA19", MAIN_DOMAIN, 0x164, true);
addBall("AE23", MAIN_DOMAIN, 0x184, true, 3);
addBall("AB20", MAIN_DOMAIN, 0x188, true, 3);
addBall("AC21", MAIN_DOMAIN, 0x18C, true, 3);
addBall("AE22", MAIN_DOMAIN, 0x190, true, 3);
addBall("Y18", MAIN_DOMAIN, 0x16C, true, 0xFFFF, 3);
addBall("AA18", MAIN_DOMAIN, 0x170, true, 0xFFFF, 3);
addBall("AD21", MAIN_DOMAIN, 0x174, true, 0xFFFF, 3);
addBall("AC20", MAIN_DOMAIN, 0x178);
addBall("A14", MAIN_DOMAIN, 0x1BC);
addBall("A13", MAIN_DOMAIN, 0x1B4);
addBall("C13", MAIN_DOMAIN, 0x1B8);
addBall("B13", MAIN_DOMAIN, 0x1C0);
addBall("B14", MAIN_DOMAIN, 0x1C4);
addBall("AC20", MAIN_DOMAIN, 0x178, true, 0xFFFF, 3);
addBall("A14", MAIN_DOMAIN, 0x1BC, true);
addBall("A13", MAIN_DOMAIN, 0x1B4, true);
addBall("C13", MAIN_DOMAIN, 0x1B8, true);
addBall("B13", MAIN_DOMAIN, 0x1C0, true);
addBall("B14", MAIN_DOMAIN, 0x1C4, true);
addBall("A15", MAIN_DOMAIN, 0x1D0, true).addMode("uart2_rx", { PIN_INPUT | 3 });
addBall("B15", MAIN_DOMAIN, 0x1D4, true).addMode("uart3_tx", { PIN_OUTPUT | 3 });
addBall("D14", MAIN_DOMAIN, 0x1C8);
addBall("E14", MAIN_DOMAIN, 0x1CC);
addBall("F18", MAIN_DOMAIN, 0x258);
addBall("Y20", MAIN_DOMAIN, 0x0FC);
addBall("AB24", MAIN_DOMAIN, 0x0F8);
addBall("D14", MAIN_DOMAIN, 0x1C8, true).addMode("uart0_rx", { PIN_INPUT | 0 });
addBall("E14", MAIN_DOMAIN, 0x1CC, true).addMode("uart0_tx", { PIN_OUTPUT | 0 });
addBall("F18", MAIN_DOMAIN, 0x258, true);
addBall("Y20", MAIN_DOMAIN, 0x0FC, true, 5, 2);
addBall("AB24", MAIN_DOMAIN, 0x0F8, true, 0, 2);
addBall("AC24", MAIN_DOMAIN, 0x104, true, 5, 2);
addBall("AC25", MAIN_DOMAIN, 0x100, true, 5, 2);
addBall("U22", MAIN_DOMAIN, 0x0B8);
addBall("V24", MAIN_DOMAIN, 0x0BC);
addBall("U22", MAIN_DOMAIN, 0x0B8, true, 5, 2).addMode("uart2_rx", { PIN_INPUT | 4 });
addBall("V24", MAIN_DOMAIN, 0x0BC, true, 5, 2).addMode("uart2_tx", { PIN_OUTPUT | 4 });
addBall("W25", MAIN_DOMAIN, 0xC0, true, 5, 2).addMode("uart3_rx", { PIN_INPUT | 4 });
addBall("W24", MAIN_DOMAIN, 0x0C4, true, 5, 2);
addBall("Y25", MAIN_DOMAIN, 0x0C8);
addBall("Y24", MAIN_DOMAIN, 0x0CC);
addBall("Y23", MAIN_DOMAIN, 0x0D0);
addBall("Y25", MAIN_DOMAIN, 0x0C8, true, 5, 2).addMode("uart4_rx", { PIN_INPUT | 4 });
addBall("Y24", MAIN_DOMAIN, 0x0CC, true, 5, 2).addMode("uart4_tx", { PIN_OUTPUT | 4 });
addBall("Y23", MAIN_DOMAIN, 0x0D0, true, 5, 2).addMode("uart5_rx", { PIN_INPUT | 4 });
addBall("AA25", MAIN_DOMAIN, 0x0D4, true, 5, 2).addMode("uart5_tx", { PIN_OUTPUT | 4 });
addBall("V21", MAIN_DOMAIN, 0x0D8, true, 5, 2).addMode("uart6_rx", { PIN_INPUT | 4 });
addBall("W21", MAIN_DOMAIN, 0x0DC, true, 5, 2);
addBall("V20", MAIN_DOMAIN, 0x0E0);
addBall("AA23", MAIN_DOMAIN, 0x0E4);
addBall("AB25", MAIN_DOMAIN, 0x0E8);
addBall("V20", MAIN_DOMAIN, 0x0E0, true, 5, 2);
addBall("AA23", MAIN_DOMAIN, 0x0E4, true, 5, 2);
addBall("AB25", MAIN_DOMAIN, 0x0E8, true, 5, 2);
addBall("AA24", MAIN_DOMAIN, 0x0EC, true, 5, 2);
addBall("Y22", MAIN_DOMAIN, 0x0F0);
addBall("Y22", MAIN_DOMAIN, 0x0F0, true, 5, 2);
addBall("AA21", MAIN_DOMAIN, 0x0F4, true, 5, 2);
addBall("AE18", MAIN_DOMAIN, 0x13C);
addBall("AD18", MAIN_DOMAIN, 0x140);
addBall("AE18", MAIN_DOMAIN, 0x13C, true);
addBall("AD18", MAIN_DOMAIN, 0x140, true);

addBall("B9", MCU_DOMAIN, 0x04C);
addBall("A9", MCU_DOMAIN, 0x050);
Expand Down
72 changes: 36 additions & 36 deletions capes/drivers/bb64/src/PocketBeagle2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,35 @@ extern void InitAM6232Balls();
void InitPocketBeagle2() {
InitAM6232Balls();

Pin::addPin("P1_02").addBall("E18").addBall("E18").addBall("AA19");
Pin::addPin("P1_03").addBall("F18");
Pin::addPin("P1_04").addBall("Y18").addBall("D20");
Pin::addPin("P1_06").addBall("E19").addBall("AD18");
Pin::addPin("P1_08").addBall("A20");
Pin::addPin("P1_10").addBall("A18").addBall("B19");
Pin::addPin("P1_12").addBall("A19").addBall("AE18");
Pin::addPin("P1_13").addBall("N20");
Pin::addPin("P1_19").addBall("AD22");
Pin::addPin("P1_20").addBall("Y24");
Pin::addPin("P1_21").addBall("AE22");
Pin::addPin("P1_23").addBall("AC21");
Pin::addPin("P1_25").addBall("AB20");
Pin::addPin("P1_26").addBall("D6").addBall("K24");
Pin::addPin("P1_27").addBall("AE23");
Pin::addPin("P1_28").addBall("B3").addBall("K22");
Pin::addPin("P1_29").addBall("Y20");
Pin::addPin("P1_30").addBall("E14");
Pin::addPin("P1_31").addBall("Y22");
Pin::addPin("P1_32").addBall("D14");
Pin::addPin("P1_33").addBall("A17").addBall("AA23");
Pin::addPin("P1_34").addBall("AD23");
Pin::addPin("P1_35").addBall("AE21");
Pin::addPin("P1_36").addBall("V20").addBall("B17");
Pin::addPin("P1_02").addBall("E18").addBall("AA19").modesFromBall("E18"); // e18
Pin::addPin("P1_03").addBall("F18").modesFromBall();
Pin::addPin("P1_04").addBall("Y18").addBall("D20").modesFromBall("Y18"); // d20
Pin::addPin("P1_06").addBall("E19").addBall("AD18").modesFromBall("E19").addMode("uart", "E19", "uart1_rx");
Pin::addPin("P1_08").addBall("A20").modesFromBall().addMode("uart", "A20", "uart1_tx"); //
Pin::addPin("P1_10").addBall("B19").addBall("A18").modesFromBall("B19").addMode("uart", "B19", "uart6_rx"); // b19
Pin::addPin("P1_12").addBall("A19").addBall("AE18").modesFromBall("A19").addMode("uart", "A19", "uart6_tx"); // a19
Pin::addPin("P1_13").addBall("N20").modesFromBall();
Pin::addPin("P1_19").addBall("AD22").modesFromBall();
Pin::addPin("P1_20").addBall("Y24").modesFromBall().addMode("uart", "Y24", "uart4_tx");
Pin::addPin("P1_21").addBall("AE22").modesFromBall();
Pin::addPin("P1_23").addBall("AC21").modesFromBall();
Pin::addPin("P1_25").addBall("AB20").modesFromBall();
Pin::addPin("P1_26").addBall("K24").addBall("D6").modesFromBall("K24").addMode("uart", "K24", "uart4_tx");
Pin::addPin("P1_27").addBall("AE23").modesFromBall();
Pin::addPin("P1_28").addBall("K22").addBall("B3").modesFromBall("K22").addMode("uart", "K22", "uart4_rx");
Pin::addPin("P1_29").addBall("Y20").modesFromBall();
Pin::addPin("P1_30").addBall("E14").modesFromBall().addMode("uart", "E14", "uart0_tx");
Pin::addPin("P1_31").addBall("Y22").modesFromBall();
Pin::addPin("P1_32").addBall("D14").modesFromBall().addMode("uart", "D14", "uart0_rx");
Pin::addPin("P1_33").addBall("AA23").addBall("A17").modesFromBall("AA23").addMode("uart", "A17", "uart1_tx");
Pin::addPin("P1_34").addBall("AD23").modesFromBall();
Pin::addPin("P1_35").addBall("AE21").modesFromBall();
Pin::addPin("P1_36").addBall("V20").addBall("B17").modesFromBall("V20").addMode("uart", "AB17", "uart1_rx");

Pin::addPin("P2_01").addBall("AD24").addBall("B20");
Pin::addPin("P2_02").addBall("U22");
Pin::addPin("P2_03").addBall("AB22").addBall("B18");
Pin::addPin("P2_04").addBall("V24");
Pin::addPin("P2_01").addBall("B20").addBall("AD24").modesFromBall("B20"); // b20
Pin::addPin("P2_02").addBall("U22").modesFromBall().addMode("uart", "U22", "uart2_rx");
Pin::addPin("P2_03").addBall("B18").addBall("AB22").modesFromBall("B18"); // b18
Pin::addPin("P2_04").addBall("V24").modesFromBall().addMode("uart", "V24", "uart2_tx");
Pin::addPin("P2_05").addBall("C15").addBall("B5").modesFromBall("C15").addMode("uart", "C15", "uart5_rx");
Pin::addPin("P2_06").addBall("W25").modesFromBall();
Pin::addPin("P2_07").addBall("E15").addBall("A5").modesFromBall("E15").addMode("uart", "E15", "uart5_tx");
Expand All @@ -46,21 +46,21 @@ void InitPocketBeagle2() {
Pin::addPin("P2_11").addBall("B15").addBall("E5").modesFromBall("B15");
Pin::addPin("P2_17").addBall("AC24").modesFromBall();
Pin::addPin("P2_18").addBall("V21").modesFromBall();
Pin::addPin("P2_19").addBall("AC20");
Pin::addPin("P2_20").addBall("Y25");
Pin::addPin("P2_19").addBall("AC20").modesFromBall();
Pin::addPin("P2_20").addBall("Y25").modesFromBall().addMode("uart", "Y25", "uart4_rx");
Pin::addPin("P2_22").addBall("AC25").modesFromBall();
Pin::addPin("P2_24").addBall("Y23");
Pin::addPin("P2_25").addBall("B14");
Pin::addPin("P2_27").addBall("B13");
Pin::addPin("P2_28").addBall("AB24");
Pin::addPin("P2_24").addBall("Y23").modesFromBall().addMode("uart", "Y23", "uart5_rx");
Pin::addPin("P2_25").addBall("B14").modesFromBall();
Pin::addPin("P2_27").addBall("B13").modesFromBall();
Pin::addPin("P2_28").addBall("AB24").modesFromBall();
Pin::addPin("P2_29").addBall("M22").addBall("A14").modesFromBall("M22");
Pin::addPin("P2_30").addBall("AA24").modesFromBall();
Pin::addPin("P2_31").addBall("AA18").addBall("A13").modesFromBall("AA18");
Pin::addPin("P2_32").addBall("AB25");
Pin::addPin("P2_32").addBall("AB25").modesFromBall();
Pin::addPin("P2_33").addBall("AA25").modesFromBall().addMode("uart", "AA25", "uart5_tx");
Pin::addPin("P2_34").addBall("AA21").modesFromBall();
Pin::addPin("P2_35").addBall("W21").modesFromBall();
Pin::addPin("P2_36").addBall("C13");
Pin::addPin("P2_36").addBall("C13").modesFromBall();

/*
Pin::addPin("I2C0_SCL").addBall("B16");
Expand Down

0 comments on commit 56829fe

Please sign in to comment.