Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5169

Camera board • Re: RPI Zero - Baremetal Unicam / CSI-2 Camera

$
0
0
of note, there is a mailbox call to turn on the power for the analog side of the unicam

https://github.com/raspberrypi/linux/bl ... m270x.dtsi

Code:

csi0: csi@7e800000 {compatible = "brcm,bcm2835-unicam";reg = <0x7e800000 0x800>,      <0x7e802000 0x4>;interrupts = <2 6>;clocks = <&clocks BCM2835_CLOCK_CAM0>, <&firmware_clocks 4>;clock-names = "lp", "vpu";power-domains = <&power RPI_POWER_DOMAIN_UNICAM0>;#address-cells = <1>;#size-cells = <0>;#clock-cells = <1>;status = "disabled";};
that says to contact the power node, and turn on RPI_POWER_DOMAIN_UNICAM0 (or RPI_POWER_DOMAIN_UNICAM1)
https://github.com/raspberrypi/linux/bl ... 5-rpi.dtsi

Code:

power: power {compatible = "raspberrypi,bcm2835-power";firmware = <&firmware>;#power-domain-cells = <1>;};
which details which driver to use
https://github.com/raspberrypi/linux/bl ... pi-power.c

Code:

rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_UNICAM0, "UNICAM0");rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_UNICAM1, "UNICAM1");.../* The DT binding index is the firmware's domain index minus one. */dom->domain = xlate_index + 1;
so it just takes the enum from DT, adds one, and then passes it off to the existing mailbox stuff for enabling power

Statistics: Posted by cleverca22 — Fri Mar 29, 2024 6:53 am



Viewing all articles
Browse latest Browse all 5169

Trending Articles