From c37b1121e8b04f0692ff8a1d830f1cb89c916d10 Mon Sep 17 00:00:00 2001 From: immortal71 Date: Wed, 10 Dec 2025 03:51:51 -0800 Subject: [PATCH 1/2] arm64: dts: k3-j721e: Add BBAI64 CSI1 IMX219 camera overlay Add device tree overlay for IMX219 camera on CSI1 interface of BeagleBone AI-64 board. Enables GPIO0_101 (pin V25) as camera enable signal. The overlay configures: - Sony IMX219 camera sensor on main_i2c6 (I2C1) - Fixed 24MHz clock for camera - Enable GPIO using existing csi1_gpio_pins_default pinmux - CSI2 RX bridge and DPHY1 configuration - 2-lane MIPI CSI-2 interface at 456 MHz link frequency Fixes: #66 Signed-off-by: immortal71 --- src/arm64/overlays/BBAI64-CSI1-imx219.dts | 90 +++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 src/arm64/overlays/BBAI64-CSI1-imx219.dts diff --git a/src/arm64/overlays/BBAI64-CSI1-imx219.dts b/src/arm64/overlays/BBAI64-CSI1-imx219.dts new file mode 100644 index 00000000..35df7a38 --- /dev/null +++ b/src/arm64/overlays/BBAI64-CSI1-imx219.dts @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * DT Overlay for RPi Camera V2.1 (IMX219) on CSI1 connector + * of BeagleBone AI-64 board. + * + * Copyright (C) 2025 BeagleBoard.org Foundation + * + * Camera Schematics: https://datasheets.raspberrypi.com/camera/camera-v2-schematics.pdf + */ + +/dts-v1/; +/plugin/; + +#include + +/* + * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ + */ +&{/chosen} { + overlays { + BBAI64-CSI1-imx219.kernel = __TIMESTAMP__; + }; +}; + +&{/} { + clk_csi1_imx219_fixed: csi1-imx219-xclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; +}; + +&main_gpio0 { + status = "okay"; +}; + +&main_i2c6 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + imx219_1: sensor@10 { + compatible = "sony,imx219"; + reg = <0x10>; + + clocks = <&clk_csi1_imx219_fixed>; + clock-names = "xclk"; + + pinctrl-names = "default"; + pinctrl-0 = <&csi1_gpio_pins_default>; + + enable-gpios = <&main_gpio0 101 GPIO_ACTIVE_HIGH>; + + port { + csi2_cam1: endpoint { + remote-endpoint = <&csi2rx1_in_sensor>; + link-frequencies = /bits/ 64 <456000000>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&cdns_csi2rx1 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + csi1_port0: port@0 { + reg = <0>; + status = "okay"; + + csi2rx1_in_sensor: endpoint { + remote-endpoint = <&csi2_cam1>; + bus-type = <4>; /* CSI2 DPHY */ + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&ti_csi2rx1 { + status = "okay"; +}; + +&dphy1 { + status = "okay"; +}; From 944b548ae1878d260e919dad7f82847ca8e6e3ce Mon Sep 17 00:00:00 2001 From: immortal71 Date: Wed, 10 Dec 2025 06:19:28 -0800 Subject: [PATCH 2/2] ARM: dts: am335x: Enable PMIC shutdown controller for BeagleBone Blue Enable ti,pmic-shutdown-controller property for BeagleBone Blue to allow proper system shutdown. Without this property, the board does not shut down completely - 3V3 rail stays powered and the power LED remains on, requiring a manual reset button press to fully power off. The property was previously deleted, but this causes incomplete shutdown as reported in issue #68. The TPS65217 PMIC needs the shutdown-controller property to properly sequence power-off and cut power to all rails. With this change, the shutdown sequence works correctly: - All USR LEDs turn off - Power LED turns off - 3V3 rail is powered down - Board fully powers off without requiring reset button This aligns BBBlue behavior with other BeagleBone variants that use ti,pmic-shutdown-controller for proper power management. Fixes: #68 Signed-off-by: immortal71 --- src/arm/ti/omap/am335x-boneblue.dts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/arm/ti/omap/am335x-boneblue.dts b/src/arm/ti/omap/am335x-boneblue.dts index 18a3aebf..ce70daad 100644 --- a/src/arm/ti/omap/am335x-boneblue.dts +++ b/src/arm/ti/omap/am335x-boneblue.dts @@ -362,8 +362,6 @@ /include/ "../../tps65217.dtsi" &tps { - /delete-property/ ti,pmic-shutdown-controller; - charger { interrupts = <0>, <1>; interrupt-names = "USB", "AC";