feat: Ported original cape overlay to Linux 6.18.8/DTC 1.7.2
This commit is contained in:
94
README.md
Normal file
94
README.md
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
## Building
|
||||||
|
|
||||||
|
Steps:
|
||||||
|
* Clone this repository: https://github.com/beagleboard/BeagleBoard-DeviceTrees
|
||||||
|
* Copy the .dtso source file into src/arm/overlays/
|
||||||
|
* Run `make -j4 all_arm`
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
Steps:
|
||||||
|
* Grab the .dtbo file built earlier from src/arm/overlays/
|
||||||
|
* Copy it to /lib/firmare
|
||||||
|
<br>
|
||||||
|
Notice the following options:
|
||||||
|
* uboot_overlay_addr4=/lib/firmware/cape-bone-ibb-00A0.dtbo
|
||||||
|
* enable_uboot_overlays=1
|
||||||
|
* enable_uboot_cape_universal=0
|
||||||
|
* cmdline=fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100
|
||||||
|
|
||||||
|
These were needed to get it to load correctly.
|
||||||
|
|
||||||
|
<br>
|
||||||
|
Disable and/or remove all options and cmdline entries referencing cape manager, universal capes or other capes that are incompatible. You can check if the cape overlay was applied successfully by looking in `/proc/device-tree/chosen/overlays/`. Run `beagle-version` to get any pinmux issue logs.
|
||||||
|
<br>
|
||||||
|
|
||||||
|
A minimal working /boot/uEnv.txt (**DO NOT** copy and paste):
|
||||||
|
```
|
||||||
|
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0
|
||||||
|
|
||||||
|
uname_r=6.18.8-bone18
|
||||||
|
#uuid=
|
||||||
|
#dtb=
|
||||||
|
|
||||||
|
###U-Boot Overlays###
|
||||||
|
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
|
||||||
|
###Master Enable
|
||||||
|
enable_uboot_overlays=1
|
||||||
|
###
|
||||||
|
###Overide capes with eeprom
|
||||||
|
#uboot_overlay_addr0=/lib/firmware/cape-bone-ibb-00A0.dtbo
|
||||||
|
#uboot_overlay_addr1=<file1>.dtbo
|
||||||
|
#uboot_overlay_addr2=<file2>.dtbo
|
||||||
|
#uboot_overlay_addr3=<file3>.dtbo
|
||||||
|
###
|
||||||
|
###Additional custom capes
|
||||||
|
uboot_overlay_addr4=/lib/firmware/cape-bone-ibb-00A0.dtbo
|
||||||
|
#uboot_overlay_addr4=<file4>.dtbo
|
||||||
|
#uboot_overlay_addr5=<file5>.dtbo
|
||||||
|
#uboot_overlay_addr6=<file6>.dtbo
|
||||||
|
#uboot_overlay_addr7=<file7>.dtbo
|
||||||
|
###
|
||||||
|
###Custom Cape
|
||||||
|
#dtb_overlay=<file8>.dtbo
|
||||||
|
###
|
||||||
|
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
|
||||||
|
#disable_uboot_overlay_emmc=1
|
||||||
|
#disable_uboot_overlay_video=1
|
||||||
|
#disable_uboot_overlay_audio=1
|
||||||
|
#disable_uboot_overlay_wireless=1
|
||||||
|
#disable_uboot_overlay_adc=1
|
||||||
|
###
|
||||||
|
###PRUSS OPTIONS
|
||||||
|
###pru_rproc (4.14.x-ti kernel)
|
||||||
|
#uboot_overlay_pru=AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
|
||||||
|
###pru_rproc (4.19.x-ti kernel)
|
||||||
|
#uboot_overlay_pru=AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
|
||||||
|
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
|
||||||
|
uboot_overlay_pru=AM335X-PRU-UIO-00A0.dtbo
|
||||||
|
###
|
||||||
|
###Cape Universal Enable
|
||||||
|
enable_uboot_cape_universal=0
|
||||||
|
###
|
||||||
|
###Debug: disable uboot autoload of Cape
|
||||||
|
#disable_uboot_overlay_addr0=1
|
||||||
|
#disable_uboot_overlay_addr1=1
|
||||||
|
#disable_uboot_overlay_addr2=1
|
||||||
|
#disable_uboot_overlay_addr3=1
|
||||||
|
###
|
||||||
|
###U-Boot fdt tweaks... (60000 = 384KB)
|
||||||
|
#uboot_fdt_buffer=0x60000
|
||||||
|
###U-Boot Overlays###
|
||||||
|
|
||||||
|
console=ttyS0,115200n8
|
||||||
|
cmdline=fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100
|
||||||
|
#cape_universal=enable
|
||||||
|
|
||||||
|
#In the event of edid real failures, uncomment this next line:
|
||||||
|
#cmdline=fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 video=HDMI-A-1:1024x768@60e
|
||||||
|
|
||||||
|
#Use an overlayfs on top of a read-only root filesystem:
|
||||||
|
#cmdline=fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 overlayroot=tmpfs
|
||||||
|
|
||||||
|
##enable Generic eMMC Flasher:
|
||||||
|
#cmdline=init=/usr/sbin/init-beagle-flasher
|
||||||
|
```
|
||||||
151
cape-bone-ibb-00A0.dtso
Normal file
151
cape-bone-ibb-00A0.dtso
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
/*
|
||||||
|
* This is the Device Tree overlay for the IBB Home Automation Cape
|
||||||
|
* for BeagleBone, BeagleBone Black and Beaglebone Green.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015 - Ingenieurbuero Budde
|
||||||
|
* Copyright (c) 2026 - Vincent Schweiger <vincent.schweiger@getcom.de>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
/plugin/;
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/pinctrl/am33xx.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
|
||||||
|
*/
|
||||||
|
&{/chosen} {
|
||||||
|
overlays {
|
||||||
|
cape-bone-ibb-00A0.kernel = __TIMESTAMP__;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Free up the pins used by the cape from the pinmux helpers.
|
||||||
|
*/
|
||||||
|
&ocp {
|
||||||
|
P9_24_pinmux { status = "disabled"; }; /* uart1_txd.uart1_txd */
|
||||||
|
P9_26_pinmux { status = "disabled"; }; /* uart1_rxd.uart1_rxd */
|
||||||
|
P9_21_pinmux { status = "disabled"; }; /* spi0_d0.uart2_txd */
|
||||||
|
P9_22_pinmux { status = "disabled"; }; /* spi0_sclk.uart2_rxd */
|
||||||
|
P9_11_pinmux { status = "disabled"; }; /* gpmc_wait0.uart4_rxd_mux2 */
|
||||||
|
P9_13_pinmux { status = "disabled"; }; /* gpmc_wpn.uart4_txd_mux2 */
|
||||||
|
P9_15_pinmux { status = "disabled"; }; /* gpmc_a0.gpio1_16 */
|
||||||
|
};
|
||||||
|
|
||||||
|
&am33xx_pinmux {
|
||||||
|
bb_uart1_pins: pinmux_uart1_pins {
|
||||||
|
pinctrl-single,pins = <
|
||||||
|
AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0) /* P9_24: uart1_txd.uart1_txd */
|
||||||
|
AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT_PULLUP, MUX_MODE0) /* P9_26: uart1_rxd.uart1_rxd */
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
bb_uart2_pins: pinmux_uart2_pins {
|
||||||
|
pinctrl-single,pins = <
|
||||||
|
AM33XX_PADCONF(AM335X_PIN_SPI0_D0, PIN_OUTPUT_PULLDOWN, MUX_MODE1) /* P9_21: spi0_d0.uart2_txd */
|
||||||
|
AM33XX_PADCONF(AM335X_PIN_SPI0_SCLK, PIN_INPUT_PULLUP, MUX_MODE1) /* P9_22: spi0_sclk.uart2_rxd */
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
bb_uart4_pins: pinmux_uart4_pins {
|
||||||
|
pinctrl-single,pins = <
|
||||||
|
AM33XX_PADCONF(AM335X_PIN_GPMC_WAIT0, PIN_INPUT_PULLUP, MUX_MODE6) /* P9_11: gpmc_wait0.uart4_rxd_mux2 */
|
||||||
|
AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_INPUT_PULLDOWN, MUX_MODE6) /* P9_13: gpmc_wait0.uart4_txd_mux2 */
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
bb_gpio1_16_pins: pinmux_gpio1_16_pins {
|
||||||
|
pinctrl-single,pins = <
|
||||||
|
AM33XX_PADCONF(AM335X_PIN_GPMC_A0, PIN_INPUT, MUX_MODE7) /* P9_15: gpmc_a0.gpio1_16 */
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart1 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&bb_uart1_pins>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart2 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&bb_uart2_pins>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart4 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&bb_uart4_pins>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c2 {
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <400000>;
|
||||||
|
|
||||||
|
/* shut up DTC warnings */
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
rtc@68 {
|
||||||
|
compatible = "maxim,ds3231";
|
||||||
|
reg = <0x68>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* PCA9546 I2C multiplexer */
|
||||||
|
i2cmux@70 {
|
||||||
|
compatible = "nxp,pca9546";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x70>;
|
||||||
|
|
||||||
|
im0: bus@0 {
|
||||||
|
compatible = "nxp,pca954x-bus";
|
||||||
|
reg = <0>;
|
||||||
|
};
|
||||||
|
im1: bus@1 {
|
||||||
|
compatible = "nxp,pca954x-bus";
|
||||||
|
reg = <1>;
|
||||||
|
};
|
||||||
|
im2: bus@2 {
|
||||||
|
compatible = "nxp,pca954x-bus";
|
||||||
|
reg = <2>;
|
||||||
|
};
|
||||||
|
im3: bus@3 {
|
||||||
|
compatible = "nxp,pca954x-bus";
|
||||||
|
reg = <3>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&{/} {
|
||||||
|
gpio_keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&bb_gpio1_16_pins>;
|
||||||
|
|
||||||
|
/* avoid stupid warning */
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-celss = <0>;
|
||||||
|
|
||||||
|
rtc_mfp@1 {
|
||||||
|
label = "rtc_mfp";
|
||||||
|
gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,code = <143>; /* System Wake Up */
|
||||||
|
gpio-key,wakeup;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
i2c3 = &im0;
|
||||||
|
i2c4 = &im1;
|
||||||
|
i2c5 = &im2;
|
||||||
|
i2c6 = &im3;
|
||||||
|
};
|
||||||
|
};
|
||||||
4174
original/base.dts
Normal file
4174
original/base.dts
Normal file
File diff suppressed because it is too large
Load Diff
168
original/cape-bone-ibb-00A0.dts
Normal file
168
original/cape-bone-ibb-00A0.dts
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
/*
|
||||||
|
* This is the Device Tree overlay for the IBB Home Automation Cape
|
||||||
|
* for BeagleBone, BeagleBone Black and Beaglebone Green.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015 - Ingenieurbuero Budde (http://ing-budde.de)
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*/
|
||||||
|
/dts-v1/;
|
||||||
|
/plugin/;
|
||||||
|
|
||||||
|
#include <dt-bindings/board/am335x-bbw-bbb-base.h>
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/pinctrl/am33xx.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green";
|
||||||
|
|
||||||
|
/* identification */
|
||||||
|
part-number = "cape-bone-ibb";
|
||||||
|
version = "00A0";
|
||||||
|
|
||||||
|
/* state the resources this cape uses */
|
||||||
|
exclusive-use =
|
||||||
|
/* the pin header uses */
|
||||||
|
"P9.24", /* uart1_txd */
|
||||||
|
"P9.26", /* uart1_rxd */
|
||||||
|
"P9.21", /* uart2_txd */
|
||||||
|
"P9.22", /* uart2_rxd */
|
||||||
|
"P9.13", /* uart4_txd */
|
||||||
|
"P9.11", /* uart4_rxd */
|
||||||
|
"P9.15", /* rtc-int */
|
||||||
|
|
||||||
|
/* the hardware ip uses */
|
||||||
|
"uart1",
|
||||||
|
"uart2",
|
||||||
|
"uart4",
|
||||||
|
"gpio1_16";
|
||||||
|
|
||||||
|
fragment@0 {
|
||||||
|
target = <&am33xx_pinmux>;
|
||||||
|
__overlay__ {
|
||||||
|
bb_uart1_pins: pinmux_bb_uart1_pins {
|
||||||
|
pinctrl-single,pins = <
|
||||||
|
BONE_P9_24 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_txd.uart1_txd */
|
||||||
|
BONE_P9_26 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart1_rxd.uart1_rxd */
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
bb_uart2_pins: pinmux_bb_uart2_pins {
|
||||||
|
pinctrl-single,pins = <
|
||||||
|
BONE_P9_21 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* spi0_d0.uart2_txd */
|
||||||
|
BONE_P9_22 (PIN_INPUT_PULLUP | MUX_MODE1) /* spi0_sclk.uart2_rxd */
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
bb_uart4_pins: pinmux_bb_uart4_pins {
|
||||||
|
pinctrl-single,pins = <
|
||||||
|
BONE_P9_11 (PIN_INPUT_PULLUP | MUX_MODE6) /* gpmc_wait0.uart4_rxd_mux2 */
|
||||||
|
BONE_P9_13 (PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* gpmc_wpn.uart4_txd_mux2 */
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
bb_gpio1_16_pins: pinmux_bb_gpio1_16_pins {
|
||||||
|
pinctrl-single,pins = <
|
||||||
|
BONE_P9_15 (PIN_INPUT | MUX_MODE7) /* gpmc_a0.gpio1_16 */
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@1 {
|
||||||
|
target = <&uart1>;
|
||||||
|
__overlay__ {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&bb_uart1_pins>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@2 {
|
||||||
|
target = <&uart2>;
|
||||||
|
__overlay__ {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&bb_uart2_pins>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@3 {
|
||||||
|
target = <&uart4>;
|
||||||
|
__overlay__ {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&bb_uart4_pins>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@4 {
|
||||||
|
target = <&i2c2>;
|
||||||
|
__overlay__ {
|
||||||
|
/* overwrite clock freq */
|
||||||
|
clock-frequency = <400000>;
|
||||||
|
|
||||||
|
/* shut up DTC warnings */
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
/* RTC */
|
||||||
|
rtc@68 {
|
||||||
|
compatible = "maxim,ds3231";
|
||||||
|
reg = <0x68>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* PCA9546 I2C multiplexer */
|
||||||
|
i2cmux@70 {
|
||||||
|
compatible = "nxp,pca9546";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x70>;
|
||||||
|
|
||||||
|
im0: bus@0 {
|
||||||
|
compatible = "nxp,pca954x-bus";
|
||||||
|
reg = <0>;
|
||||||
|
};
|
||||||
|
im1: bus@1 {
|
||||||
|
compatible = "nxp,pca954x-bus";
|
||||||
|
reg = <1>;
|
||||||
|
};
|
||||||
|
im2: bus@2 {
|
||||||
|
compatible = "nxp,pca954x-bus";
|
||||||
|
reg = <2>;
|
||||||
|
};
|
||||||
|
im3: bus@3 {
|
||||||
|
compatible = "nxp,pca954x-bus";
|
||||||
|
reg = <3>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@5 {
|
||||||
|
target-path="/";
|
||||||
|
__overlay__ {
|
||||||
|
gpio_keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&bb_gpio1_16_pins>;
|
||||||
|
|
||||||
|
/* avoid stupid warning */
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
rtc_mfp@1 {
|
||||||
|
label = "rtc_mfp";
|
||||||
|
gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,code = <143>; /* System Wake Up */
|
||||||
|
gpio-key,wakeup;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
i2c3 = &im0;
|
||||||
|
i2c4 = &im1;
|
||||||
|
i2c5 = &im2;
|
||||||
|
i2c6 = &im3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user