[PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver

Mauro Carvalho Chehab mchehab at s-opensource.com
Wed Mar 22 10:10:19 PDT 2017


Hi Michael,

Em Mon, 20 Mar 2017 08:40:11 -0700
Michael Zoran <mzoran at crowfest.net> escreveu:

> > > Are you using Eric Anholt's HDMI Audio driver that's included in
> > > VC4? 
> > > That could well be incompatible with the firmware driver. Or are
> > > you
> > > using a half mode of VC4 for audio and VCHIQ for video?  
> > 
> > I'm using vanilla staging Kernel, from Greg's tree:
> > 	https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.
> > git/commit/?h=staging-
> > next&id=7bc49cb9b9b8bad32536c4b6d1aff1824c1adc6c
> > 
> > Plus the DWC2 fixup I wrote and DT changes you pointed
> > (see enclosed).
> > 
> > I can disable the audio overlay here, as I don't have anything 
> > connected to audio inputs/outputs.
> > 
> > Regards,
> > Mauro
> >   
> 
> Why is the vchiq node in the tree twice? For me to even respond anymore
> you you going to have to include your entire dtb(whatever you are
> using) run through dtc -I dtb -O dts.  You are also going to have to
> include your exact .config file you used for building, and exactly what
> these DWC2 fixeups are.
> 
> You don't even state exactly what platform you are using, Is it even an
> RPI of some kind.

It is a RPi3 board. The exact procedure that I took is described here:
	https://blogs.s-osg.org/use-v4l2-cameras-raspberry-pi-3-upstream-kernel/

After it, I updated the firmware to the newest one, from:
	https://github.com/raspberrypi/firmware.git

	commit 384559354762f36aa55584560d8749fc66a4cfd0
	Author: popcornmix <popcornmix at gmail.com>
	Date:   Sat Mar 18 17:48:59 2017 +0000
	    kernel: Bump to 4.9.16

Then I applied two patches on the top of it:

	https://patchwork.linuxtv.org/patch/40093/
	https://patchwork.linuxtv.org/patch/40146/

As the second patch has entries for vchiq, I ended by having it
duplicated (although the DTB has it only once, as you can see below).

Regards,
Mauro

----

Output of:
$ dtc -I dtb -O dts /devel/arm_rootdir/install/bcm2837-rpi-3-b.dtb

/dts-v1/;

/ {
	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
	model = "Raspberry Pi 3 Model B";
	interrupt-parent = <0x1>;
	#address-cells = <0x1>;
	#size-cells = <0x1>;

	chosen {
		bootargs = "earlyprintk console=ttyAMA0";
	};

	soc {
		compatible = "simple-bus";
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		ranges = <0x7e000000 0x3f000000 0x1000000 0x40000000 0x40000000 0x1000>;
		dma-ranges = <0xc0000000 0x0 0x3f000000>;

		timer at 7e003000 {
			compatible = "brcm,bcm2835-system-timer";
			reg = <0x7e003000 0x1000>;
			interrupts = <0x1 0x0 0x1 0x1 0x1 0x2 0x1 0x3>;
			clock-frequency = <0xf4240>;
		};

		dma at 7e007000 {
			compatible = "brcm,bcm2835-dma";
			reg = <0x7e007000 0xf00>;
			interrupts = <0x1 0x10 0x1 0x11 0x1 0x12 0x1 0x13 0x1 0x14 0x1 0x15 0x1 0x16 0x1 0x17 0x1 0x18 0x1 0x19 0x1 0x1a 0x1 0x1b 0x1 0x1b 0x1 0x1b 0x1 0x1b 0x1 0x1c>;
			interrupt-names = "dma0", "dma1", "dma2", "dma3", "dma4", "dma5", "dma6", "dma7", "dma8", "dma9", "dma10", "dma11", "dma12", "dma13", "dma14", "dma-shared-all";
			#dma-cells = <0x1>;
			brcm,dma-channel-mask = <0x7f35>;
			linux,phandle = <0x5>;
			phandle = <0x5>;
		};

		interrupt-controller at 7e00b200 {
			compatible = "brcm,bcm2836-armctrl-ic";
			reg = <0x7e00b200 0x200>;
			interrupt-controller;
			#interrupt-cells = <0x2>;
			interrupt-parent = <0x2>;
			interrupts = <0x8>;
			linux,phandle = <0x1>;
			phandle = <0x1>;
		};

		watchdog at 7e100000 {
			compatible = "brcm,bcm2835-pm-wdt";
			reg = <0x7e100000 0x28>;
		};

		cprman at 7e101000 {
			compatible = "brcm,bcm2835-cprman";
			#clock-cells = <0x1>;
			reg = <0x7e101000 0x2000>;
			clocks = <0x3>;
			linux,phandle = <0x4>;
			phandle = <0x4>;
		};

		rng at 7e104000 {
			compatible = "brcm,bcm2835-rng";
			reg = <0x7e104000 0x10>;
		};

		mailbox at 7e00b880 {
			compatible = "brcm,bcm2835-mbox";
			reg = <0x7e00b880 0x40>;
			interrupts = <0x0 0x1>;
			#mbox-cells = <0x0>;
			linux,phandle = <0xf>;
			phandle = <0xf>;
		};

		gpio at 7e200000 {
			compatible = "brcm,bcm2835-gpio";
			reg = <0x7e200000 0xb4>;
			interrupts = <0x2 0x11 0x2 0x12 0x2 0x13 0x2 0x14>;
			gpio-controller;
			#gpio-cells = <0x2>;
			interrupt-controller;
			#interrupt-cells = <0x2>;
			pinctrl-names = "default";
			linux,phandle = <0x11>;
			phandle = <0x11>;

			dpi_gpio0 {
				brcm,pins = <0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b>;
				brcm,function = <0x6>;
			};

			emmc_gpio22 {
				brcm,pins = <0x16 0x17 0x18 0x19 0x1a 0x1b>;
				brcm,function = <0x7>;
			};

			emmc_gpio34 {
				brcm,pins = <0x22 0x23 0x24 0x25 0x26 0x27>;
				brcm,function = <0x7>;
				brcm,pull = <0x0 0x2 0x2 0x2 0x2 0x2>;
			};

			emmc_gpio48 {
				brcm,pins = <0x30 0x31 0x32 0x33 0x34 0x35>;
				brcm,function = <0x7>;
				linux,phandle = <0xa>;
				phandle = <0xa>;
			};

			gpclk0_gpio4 {
				brcm,pins = <0x4>;
				brcm,function = <0x4>;
			};

			gpclk1_gpio5 {
				brcm,pins = <0x5>;
				brcm,function = <0x4>;
			};

			gpclk1_gpio42 {
				brcm,pins = <0x2a>;
				brcm,function = <0x4>;
			};

			gpclk1_gpio44 {
				brcm,pins = <0x2c>;
				brcm,function = <0x4>;
			};

			gpclk2_gpio6 {
				brcm,pins = <0x6>;
				brcm,function = <0x4>;
			};

			gpclk2_gpio43 {
				brcm,pins = <0x2b>;
				brcm,function = <0x4>;
			};

			i2c0_gpio0 {
				brcm,pins = <0x0 0x1>;
				brcm,function = <0x4>;
				linux,phandle = <0x6>;
				phandle = <0x6>;
			};

			i2c0_gpio32 {
				brcm,pins = <0x20 0x22>;
				brcm,function = <0x4>;
			};

			i2c0_gpio44 {
				brcm,pins = <0x2c 0x2d>;
				brcm,function = <0x5>;
			};

			i2c1_gpio2 {
				brcm,pins = <0x2 0x3>;
				brcm,function = <0x4>;
				linux,phandle = <0xb>;
				phandle = <0xb>;
			};

			i2c1_gpio44 {
				brcm,pins = <0x2c 0x2d>;
				brcm,function = <0x6>;
			};

			i2c_slave_gpio18 {
				brcm,pins = <0x12 0x13 0x14 0x15>;
				brcm,function = <0x7>;
			};

			jtag_gpio4 {
				brcm,pins = <0x4 0x5 0x6 0xc 0xd>;
				brcm,function = <0x3>;
			};

			jtag_gpio22 {
				brcm,pins = <0x16 0x17 0x18 0x19 0x1a 0x1b>;
				brcm,function = <0x3>;
			};

			pcm_gpio18 {
				brcm,pins = <0x12 0x13 0x14 0x15>;
				brcm,function = <0x4>;
			};

			pcm_gpio28 {
				brcm,pins = <0x1c 0x1d 0x1e 0x1f>;
				brcm,function = <0x6>;
			};

			pwm0_gpio12 {
				brcm,pins = <0xc>;
				brcm,function = <0x4>;
			};

			pwm0_gpio18 {
				brcm,pins = <0x12>;
				brcm,function = <0x2>;
			};

			pwm0_gpio40 {
				brcm,pins = <0x28>;
				brcm,function = <0x4>;
				linux,phandle = <0x8>;
				phandle = <0x8>;
			};

			pwm1_gpio13 {
				brcm,pins = <0xd>;
				brcm,function = <0x4>;
			};

			pwm1_gpio19 {
				brcm,pins = <0x13>;
				brcm,function = <0x2>;
			};

			pwm1_gpio41 {
				brcm,pins = <0x29>;
				brcm,function = <0x4>;
			};

			pwm1_gpio45 {
				brcm,pins = <0x2d>;
				brcm,function = <0x4>;
				linux,phandle = <0x9>;
				phandle = <0x9>;
			};

			sdhost_gpio48 {
				brcm,pins = <0x30 0x31 0x32 0x33 0x34 0x35>;
				brcm,function = <0x4>;
			};

			spi0_gpio7 {
				brcm,pins = <0x7 0x8 0x9 0xa 0xb>;
				brcm,function = <0x4>;
			};

			spi0_gpio35 {
				brcm,pins = <0x23 0x24 0x25 0x26 0x27>;
				brcm,function = <0x4>;
			};

			spi1_gpio16 {
				brcm,pins = <0x10 0x11 0x12 0x13 0x14 0x15>;
				brcm,function = <0x3>;
			};

			spi2_gpio40 {
				brcm,pins = <0x28 0x29 0x2a 0x2b 0x2c 0x2d>;
				brcm,function = <0x3>;
			};

			uart0_gpio14 {
				brcm,pins = <0xe 0xf>;
				brcm,function = <0x4>;
			};

			uart0_ctsrts_gpio16 {
				brcm,pins = <0x10 0x11>;
				brcm,function = <0x7>;
			};

			uart0_gpio30 {
				brcm,pins = <0x1e 0x1f>;
				brcm,function = <0x7>;
			};

			uart0_ctsrts_gpio32 {
				brcm,pins = <0x20 0x21>;
				brcm,function = <0x7>;
			};

			uart1_gpio14 {
				brcm,pins = <0xe 0xf>;
				brcm,function = <0x2>;
			};

			uart1_ctsrts_gpio16 {
				brcm,pins = <0x10 0x11>;
				brcm,function = <0x2>;
			};

			uart1_gpio32 {
				brcm,pins = <0x20 0x21>;
				brcm,function = <0x2>;
			};

			uart1_ctsrts_gpio30 {
				brcm,pins = <0x1e 0x1f>;
				brcm,function = <0x2>;
			};

			uart1_gpio36 {
				brcm,pins = <0x24 0x25 0x26 0x27>;
				brcm,function = <0x6>;
			};

			uart1_gpio40 {
				brcm,pins = <0x28 0x29>;
				brcm,function = <0x2>;
			};

			uart1_ctsrts_gpio42 {
				brcm,pins = <0x2a 0x2b>;
				brcm,function = <0x2>;
			};

			gpioout {
				brcm,pins = <0x6>;
				brcm,function = <0x1>;
			};

			alt0 {
				brcm,pins = <0x4 0x5 0x7 0x8 0x9 0xa 0xb 0xe 0xf>;
				brcm,function = <0x4>;
			};
		};

		serial at 7e201000 {
			compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
			reg = <0x7e201000 0x1000>;
			interrupts = <0x2 0x19>;
			clocks = <0x4 0x13 0x4 0x14>;
			clock-names = "uartclk", "apb_pclk";
			arm,primecell-periphid = <0x241011>;
		};

		i2s at 7e203000 {
			compatible = "brcm,bcm2835-i2s";
			reg = <0x7e203000 0x20 0x7e101098 0x2>;
			dmas = <0x5 0x2 0x5 0x3>;
			dma-names = "tx", "rx";
			status = "disabled";
		};

		spi at 7e204000 {
			compatible = "brcm,bcm2835-spi";
			reg = <0x7e204000 0x1000>;
			interrupts = <0x2 0x16>;
			clocks = <0x4 0x14>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "disabled";
		};

		i2c at 7e205000 {
			compatible = "brcm,bcm2835-i2c";
			reg = <0x7e205000 0x1000>;
			interrupts = <0x2 0x15>;
			clocks = <0x4 0x14>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0x6>;
			clock-frequency = <0x186a0>;
		};

		pixelvalve at 7e206000 {
			compatible = "brcm,bcm2835-pixelvalve0";
			reg = <0x7e206000 0x100>;
			interrupts = <0x2 0xd>;
		};

		pixelvalve at 7e207000 {
			compatible = "brcm,bcm2835-pixelvalve1";
			reg = <0x7e207000 0x100>;
			interrupts = <0x2 0xe>;
		};

		thermal at 7e212000 {
			compatible = "brcm,bcm2837-thermal";
			reg = <0x7e212000 0x8>;
			clocks = <0x4 0x1b>;
			status = "okay";
		};

		aux at 0x7e215000 {
			compatible = "brcm,bcm2835-aux";
			#clock-cells = <0x1>;
			reg = <0x7e215000 0x8>;
			clocks = <0x4 0x14>;
			linux,phandle = <0x7>;
			phandle = <0x7>;
		};

		serial at 7e215040 {
			compatible = "brcm,bcm2835-aux-uart";
			reg = <0x7e215040 0x40>;
			interrupts = <0x1 0x1d>;
			clocks = <0x7 0x0>;
			status = "okay";
		};

		spi at 7e215080 {
			compatible = "brcm,bcm2835-aux-spi";
			reg = <0x7e215080 0x40>;
			interrupts = <0x1 0x1d>;
			clocks = <0x7 0x1>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "disabled";
		};

		spi at 7e2150c0 {
			compatible = "brcm,bcm2835-aux-spi";
			reg = <0x7e2150c0 0x40>;
			interrupts = <0x1 0x1d>;
			clocks = <0x7 0x2>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "disabled";
		};

		pwm at 7e20c000 {
			compatible = "brcm,bcm2835-pwm";
			reg = <0x7e20c000 0x28>;
			clocks = <0x4 0x1e>;
			assigned-clocks = <0x4 0x1e>;
			assigned-clock-rates = <0x989680>;
			#pwm-cells = <0x2>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0x8 0x9>;
		};

		sdhci at 7e300000 {
			compatible = "brcm,bcm2835-sdhci";
			reg = <0x7e300000 0x100>;
			interrupts = <0x2 0x1e>;
			clocks = <0x4 0x1c>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0xa>;
			bus-width = <0x4>;
		};

		hvs at 7e400000 {
			compatible = "brcm,bcm2835-hvs";
			reg = <0x7e400000 0x6000>;
			interrupts = <0x2 0x1>;
		};

		i2c at 7e804000 {
			compatible = "brcm,bcm2835-i2c";
			reg = <0x7e804000 0x1000>;
			interrupts = <0x2 0x15>;
			clocks = <0x4 0x14>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0xb>;
			clock-frequency = <0x186a0>;
		};

		i2c at 7e805000 {
			compatible = "brcm,bcm2835-i2c";
			reg = <0x7e805000 0x1000>;
			interrupts = <0x2 0x15>;
			clocks = <0x4 0x14>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "okay";
			linux,phandle = <0xd>;
			phandle = <0xd>;
		};

		vec at 7e806000 {
			compatible = "brcm,bcm2835-vec";
			reg = <0x7e806000 0x1000>;
			clocks = <0x4 0x18>;
			interrupts = <0x2 0x1b>;
			status = "okay";
			power-domains = <0xc 0x7>;
		};

		pixelvalve at 7e807000 {
			compatible = "brcm,bcm2835-pixelvalve2";
			reg = <0x7e807000 0x100>;
			interrupts = <0x2 0xa>;
		};

		hdmi at 7e902000 {
			compatible = "brcm,bcm2835-hdmi";
			reg = <0x7e902000 0x600 0x7e808000 0x100>;
			interrupts = <0x2 0x8 0x2 0x9>;
			ddc = <0xd>;
			clocks = <0x4 0x10 0x4 0x19>;
			clock-names = "pixel", "hdmi";
			status = "okay";
			power-domains = <0xc 0x5>;
		};

		usb at 7e980000 {
			compatible = "brcm,bcm2835-usb";
			reg = <0x7e980000 0x10000>;
			interrupts = <0x1 0x9>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			clocks = <0xe>;
			clock-names = "otg";
			power-domains = <0xc 0x6>;
			dr_mode = "host";

			usb1 at 1 {
				compatible = "usb424,9514";
				reg = <0x1>;
				#address-cells = <0x1>;
				#size-cells = <0x0>;

				usbether at 1 {
					compatible = "usb424,ec00";
					reg = <0x1>;
				};
			};
		};

		v3d at 7ec00000 {
			compatible = "brcm,bcm2835-v3d";
			reg = <0x7ec00000 0x1000>;
			interrupts = <0x1 0xa>;
			power-domains = <0xc 0xa>;
		};

		gpu {
			compatible = "brcm,bcm2835-vc4";
			status = "disabled";
		};

		local_intc {
			compatible = "brcm,bcm2836-l1-intc";
			reg = <0x40000000 0x100>;
			interrupt-controller;
			#interrupt-cells = <0x1>;
			interrupt-parent = <0x2>;
			linux,phandle = <0x2>;
			phandle = <0x2>;
		};

		firmware {
			compatible = "raspberrypi,bcm2835-firmware";
			mboxes = <0xf>;
			linux,phandle = <0x10>;
			phandle = <0x10>;
		};

		power {
			compatible = "raspberrypi,bcm2835-power";
			firmware = <0x10>;
			#power-domain-cells = <0x1>;
			linux,phandle = <0xc>;
			phandle = <0xc>;
		};

		vchiq {
			compatible = "brcm,bcm2835-vchiq";
			reg = <0x7e00b840 0xf>;
			interrupts = <0x0 0x2>;
			cache-line-size = <0x20>;
			firmware = <0x10>;
			linux,phandle = <0x12>;
			phandle = <0x12>;
		};

		fb {
			status = "disabled";
		};

		audio {
			compatible = "brcm,bcm2835-audio";
			brcm,pwm-channels = <0x8>;
		};
	};

	clocks {
		compatible = "simple-bus";
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		clock at 3 {
			compatible = "fixed-clock";
			reg = <0x3>;
			#clock-cells = <0x0>;
			clock-output-names = "osc";
			clock-frequency = <0x124f800>;
			linux,phandle = <0x3>;
			phandle = <0x3>;
		};

		clock at 4 {
			compatible = "fixed-clock";
			reg = <0x4>;
			#clock-cells = <0x0>;
			clock-output-names = "otg";
			clock-frequency = <0x1c9c3800>;
			linux,phandle = <0xe>;
			phandle = <0xe>;
		};
	};

	timer {
		compatible = "arm,armv7-timer";
		interrupt-parent = <0x2>;
		interrupts = <0x0 0x1 0x3 0x2>;
		always-on;
	};

	cpus {
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		cpu at 0 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			reg = <0x0>;
			enable-method = "spin-table";
			cpu-release-addr = <0x0 0xd8>;
		};

		cpu at 1 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			reg = <0x1>;
			enable-method = "spin-table";
			cpu-release-addr = <0x0 0xe0>;
		};

		cpu at 2 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			reg = <0x2>;
			enable-method = "spin-table";
			cpu-release-addr = <0x0 0xe8>;
		};

		cpu at 3 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			reg = <0x3>;
			enable-method = "spin-table";
			cpu-release-addr = <0x0 0xf0>;
		};
	};

	memory {
		device_type = "memory";
		reg = <0x0 0x40000000>;
	};

	leds {
		compatible = "gpio-leds";

		act {
			label = "ACT";
			default-state = "keep";
			linux,default-trigger = "heartbeat";
			gpios = <0x11 0x2f 0x0>;
		};
	};

	aliases {
		ethernet = "/soc/usb at 7e980000/usb1 at 1/usbether at 1";
	};

	__overrides__ {
		cache_line_size = [00 00 00 12 63 61 63 68 65 2d 6c 69 6e 65 2d 73 69 7a 65 3a 30 00];
	};
};




More information about the linux-rpi-kernel mailing list