Compare commits

...

14 Commits

Author SHA1 Message Date
Phil Elwell
7136c8f9c8 ARM: dts: Add Pi Zero 2 support
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2021-11-18 15:52:35 +00:00
Jonathan Bell
abff5012ab dwc_otg: pay attention to qh->interval when rescheduling periodic queues
A regression introduced in https://github.com/raspberrypi/linux/pull/3887
meant that if the newly scheduled transfer immediately returned data, and
the driver resubmitted a single URB after every transfer, then the effective
polling interval would end up being approx 1ms.

Use the larger of SCHEDULE_SLOP or the configured endpoint interval.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
2021-10-06 16:30:47 +01:00
Dave Stevenson
6237d09759 dtoverlays: Add overlay for ST7735R (160x128) TinyDRM driver
Adds an overlay to configure the TinyDRM driver for ST7735R
based 160x128 and 128x128 (untested) displays such as the
Adafruit 1.8" display.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
2021-10-04 16:30:53 +01:00
Lee Jackson
1faafd963e overlays: Add imx519-overlay.dts
Added overlays for enabling IMX519 and add the
relevant information to the README.

Signed-off-by: Lee Jackson <info@arducam.com>
2021-09-30 16:47:22 +01:00
Lee Jackson
e19e774ee6 configs: Add CONFIG_VIDEO_IMX519=m
Include the driver module for the IMX519.

Signed-off-by: Lee Jackson <info@arducam.com>
2021-09-30 16:47:22 +01:00
Arducam
7ef59137fe media: i2c: imx519: Advertise embedded data node on media pad 1
This commit updates the imx519 driver to adverise support for embedded
data streams.

The imx519 sensor subdevice overloads the media pad to differentiate
between image stream (pad 0) and embedded data stream (pad 1) when
performing the v4l2_subdev_pad_ops functions.

Signed-off-by: Lee Jackson <info@arducam.com>
2021-09-30 16:47:22 +01:00
Lee Jackson
61b7a5240c media: i2c: Add driver for IMX519 sensor
Adds a driver for the 16MPix IMX519 CSI2 sensor.
Whilst the sensor supports 2 or 4 CSI2 data lanes, this driver
currently only supports 2 lanes.

The following Bayer modes are currently available:

4656x3496 10-bit @ 10fps
3840x2160 10-bit (cropped) @ 21fps
2328x1748 10-bit (binned) @ 30fps
1920x1080 10-bit (cropped/binned) @ 60fps
1280x720 10-bit (cropped/binned) @ 120fps

Signed-off-by: Lee Jackson <info@arducam.com>
2021-09-30 16:47:22 +01:00
Lee Jackson
dd23e9e071 media: dt-bindings: media: i2c: Add IMX519 CMOS sensor binding
Add YAML device tree binding for IMX519 CMOS image sensor, and
the relevant MAINTAINERS entries.

Signed-off-by: Lee Jackson <info@arducam.com>
2021-09-30 16:47:22 +01:00
Juerg Haefliger
5ab0b197d5 mmc: sdhci-iproc: Fix vmmc regulators (pre-bcm2711)
The Linux support for controlling card power via regulators appears to
be contentious. I would argue that the default behaviour is contrary to
the SDHCI spec - turning off the power writes a reserved value to the
SD Bus Voltage Select field of the Power Control Register, which
seems to kill the Arasan/iProc controller - but fortunately there is a
hook in sdhci_ops to override the behaviour.

Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
2021-09-29 11:20:23 +01:00
Juerg Haefliger
00e7121838 Revert "mmc: sdhci-iproc: Fix vmmc regulators on iProc"
This reverts commit aed19399a0.

Commit 6c92ae1e45 ("mmc: sdhci: Introduce sdhci_set_power_and_bus_voltage()")
introduced a generic helper that does the same thing so use that instead in
the following commit.

Signed-off-by: Juerg Haefliger <juergh@canonical.com>
2021-09-29 11:20:23 +01:00
Juerg Haefliger
7c9c402b0c drm/vc4: hdmi: Fix bvb clock enable error checking
Check for errors only if we actually tried to enable the bvb clock.

Fixes: 01a6d727b4 ("vc4/drm: hdmi: Handle case when bvb clock is null")
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
2021-09-29 11:20:23 +01:00
Maxime Ripard
f694d1cfee drm/vc4: Fix out of order frames during asynchronous page flips
When doing an asynchronous page flip (PAGE_FLIP ioctl with the
DRM_MODE_PAGE_FLIP_ASYNC flag set), the current code waits for the
possible GPU buffer being rendered through a call to
vc4_queue_seqno_cb().

On the BCM2835-37, the GPU driver is part of the vc4 driver and that
function is defined in vc4_gem.c to wait for the buffer to be rendered,
and once it's done, call a callback.

However, on the BCM2711 used on the RaspberryPi4, the GPU driver is
separate (v3d) and that function won't do anything. This was working
because we were going into a path, due to uninitialized variables, that
was always scheduling the callback.

However, we were never actually waiting for the buffer to be rendered
which was resulting in frames being displayed out of order.

The generic API to signal those kind of completion in the kernel are the
DMA fences, and fortunately the v3d drivers supports them and signal
when its job is done. That API also provides an equivalent function that
allows to have a callback being executed when the fence is signalled as
done.

Let's change our driver a bit to rely on the previous function for the
older SoCs, and on DMA fences for the BCM2711.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2021-09-28 15:05:51 +01:00
Dom Cobley
6fc5285c39 Revert "firmware: Updated mailbox header"
This reverts commit 02038a75fb.
2021-09-28 13:49:52 +01:00
Dom Cobley
2b33debb8b Revert "raspberrypi-firmware: Export the general transaction function."
This reverts commit 121592a1f507d2b5900db5f7c6510b532563dc09.
2021-09-28 13:49:52 +01:00
24 changed files with 2677 additions and 24 deletions

View File

@@ -0,0 +1,113 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/imx519.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Sony 1/2.5-Inch 16Mpixel CMOS Digital Image Sensor
maintainers:
- Lee Jackson <info@arducam.com>
description: |-
The Sony IMX519 is a 1/2.5-inch CMOS active pixel digital image sensor
with an active array size of 4656H x 3496V. It is programmable through
I2C interface. The I2C address is fixed to 0x1A as per sensor data sheet.
Image data is sent through MIPI CSI-2, which is configured as either 2 or
4 data lanes.
properties:
compatible:
const: sony,imx519
reg:
description: I2C device address
maxItems: 1
clocks:
maxItems: 1
VDIG-supply:
description:
Digital I/O voltage supply, 1.05 volts
VANA-supply:
description:
Analog voltage supply, 2.8 volts
VDDL-supply:
description:
Digital core voltage supply, 1.8 volts
reset-gpios:
description: |-
Reference to the GPIO connected to the xclr pin, if any.
Must be released (set high) after all supplies and INCK are applied.
# See ../video-interfaces.txt for more details
port:
type: object
properties:
endpoint:
type: object
properties:
data-lanes:
description: |-
The sensor supports either two-lane, or four-lane operation.
For two-lane operation the property must be set to <1 2>.
items:
- const: 1
- const: 2
clock-noncontinuous:
type: boolean
description: |-
MIPI CSI-2 clock is non-continuous if this property is present,
otherwise it's continuous.
link-frequencies:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint64-array
description:
Allowed data bus frequencies.
required:
- link-frequencies
required:
- compatible
- reg
- clocks
- VANA-supply
- VDIG-supply
- VDDL-supply
- port
additionalProperties: false
examples:
- |
i2c0 {
#address-cells = <1>;
#size-cells = <0>;
imx519: sensor@1a {
compatible = "sony,imx519";
reg = <0x1a>;
clocks = <&imx519_clk>;
VANA-supply = <&imx519_vana>; /* 2.8v */
VDIG-supply = <&imx519_vdig>; /* 1.05v */
VDDL-supply = <&imx519_vddl>; /* 1.8v */
port {
imx519_0: endpoint {
remote-endpoint = <&csi1_ep>;
data-lanes = <1 2>;
clock-noncontinuous;
link-frequencies = /bits/ 64 <493500000>;
};
};
};
};
...

View File

@@ -16372,6 +16372,14 @@ F: Documentation/devicetree/bindings/media/i2c/imx378.yaml
F: Documentation/devicetree/bindings/media/i2c/imx477.yaml
F: drivers/media/i2c/imx477.c
SONY IMX519 SENSOR DRIVER
M: Arducam Kernel Maintenance <info@arducam.com>
L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/imx519.yaml
F: drivers/media/i2c/imx519.c
SONY MEMORYSTICK SUBSYSTEM
M: Maxim Levitsky <maximlevitsky@gmail.com>
M: Alex Dubov <oakad@yahoo.com>

View File

@@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
bcm2708-rpi-cm.dtb \
bcm2708-rpi-zero.dtb \
bcm2708-rpi-zero-w.dtb \
bcm2710-rpi-zero-2.dtb \
bcm2709-rpi-2-b.dtb \
bcm2710-rpi-2-b.dtb \
bcm2710-rpi-3-b.dtb \

View File

@@ -0,0 +1,177 @@
/dts-v1/;
#include "bcm2710.dtsi"
#include "bcm2709-rpi.dtsi"
#include "bcm283x-rpi-csi1-2lane.dtsi"
#include "bcm283x-rpi-i2c0mux_0_44.dtsi"
#include "bcm2708-rpi-bt.dtsi"
#include "bcm283x-rpi-cam1-regulator.dtsi"
/ {
compatible = "raspberrypi,model-zero-2", "brcm,bcm2837";
model = "Raspberry Pi Zero 2";
chosen {
bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
};
aliases {
serial0 = &uart1;
serial1 = &uart0;
mmc1 = &mmcnr;
};
};
&gpio {
spi0_pins: spi0_pins {
brcm,pins = <9 10 11>;
brcm,function = <4>; /* alt0 */
};
spi0_cs_pins: spi0_cs_pins {
brcm,pins = <8 7>;
brcm,function = <1>; /* output */
};
i2c0_pins: i2c0 {
brcm,pins = <0 1>;
brcm,function = <4>;
};
i2c1_pins: i2c1 {
brcm,pins = <2 3>;
brcm,function = <4>;
};
i2s_pins: i2s {
brcm,pins = <18 19 20 21>;
brcm,function = <4>; /* alt0 */
};
sdio_pins: sdio_pins {
brcm,pins = <34 35 36 37 38 39>;
brcm,function = <7>; // alt3 = SD1
brcm,pull = <0 2 2 2 2 2>;
};
bt_pins: bt_pins {
brcm,pins = <43>;
brcm,function = <4>; /* alt0:GPCLK2 */
brcm,pull = <0>;
};
uart0_pins: uart0_pins {
brcm,pins = <30 31 32 33>;
brcm,function = <7>; /* alt3=UART0 */
brcm,pull = <2 0 0 2>; /* up none none up */
};
uart1_pins: uart1_pins {
brcm,pins;
brcm,function;
brcm,pull;
};
audio_pins: audio_pins {
brcm,pins = <>;
brcm,function = <>;
};
};
&mmcnr {
pinctrl-names = "default";
pinctrl-0 = <&sdio_pins>;
bus-width = <4>;
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins &bt_pins>;
status = "okay";
};
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
status = "okay";
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
spidev0: spidev@0{
compatible = "spidev";
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <125000000>;
};
spidev1: spidev@1{
compatible = "spidev";
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <125000000>;
};
};
&i2c0if {
clock-frequency = <100000>;
};
&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
clock-frequency = <100000>;
};
&i2c2 {
clock-frequency = <100000>;
};
&i2s {
pinctrl-names = "default";
pinctrl-0 = <&i2s_pins>;
};
&leds {
act_led: led-act {
label = "led0";
linux,default-trigger = "actpwr";
gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
};
};
&hdmi {
hpd-gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
};
&audio {
pinctrl-names = "default";
pinctrl-0 = <&audio_pins>;
brcm,disable-headphones = <1>;
};
&bt {
shutdown-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
};
&minibt {
shutdown-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
};
&cam1_reg {
gpio = <&gpio 40 GPIO_ACTIVE_HIGH>;
};
/ {
__overrides__ {
act_led_gpio = <&act_led>,"gpios:4";
act_led_activelow = <&act_led>,"gpios:8";
act_led_trigger = <&act_led>,"linux,default-trigger";
};
};

View File

@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += overlay_map.dtb
dtbo-$(CONFIG_ARCH_BCM2835) += \
act-led.dtbo \
adafruit-st7735r.dtbo \
adafruit18.dtbo \
adau1977-adc.dtbo \
adau7002-simple.dtbo \
@@ -98,6 +99,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
imx290.dtbo \
imx378.dtbo \
imx477.dtbo \
imx519.dtbo \
iqaudio-codec.dtbo \
iqaudio-dac.dtbo \
iqaudio-dacplus.dtbo \

View File

@@ -299,9 +299,23 @@ Params: activelow Set to "on" to invert the sense of the LED
REQUIRED
Name: adafruit-st7735r
Info: Overlay for the SPI-connected Adafruit 1.8" 160x128 or 128x128 displays,
based on the ST7735R chip.
This overlay uses the newer DRM/KMS "Tiny" driver.
Load: dtoverlay=adafruit-st7735r,<param>=<val>
Params: 128x128 Select the 128x128 driver (default 160x128)
rotate Display rotation {0,90,180,270} (default 90)
speed SPI bus speed in Hz (default 4000000)
dc_pin GPIO pin for D/C (default 24)
reset_pin GPIO pin for RESET (default 25)
led_pin GPIO used to control backlight (default 18)
Name: adafruit18
Info: Overlay for the SPI-connected Adafruit 1.8" display (based on the
ST7735R chip). It includes support for the "green tab" version.
This overlay uses the older fbtft driver.
Load: dtoverlay=adafruit18,<param>=<val>
Params: green Use the adafruit18_green variant.
rotate Display rotation {0,90,180,270}
@@ -1738,6 +1752,17 @@ Params: rotation Mounting rotation of the camera sensor (0 or
2 = external, default external)
Name: imx519
Info: Sony IMX519 camera module.
Uses Unicam 1, which is the standard camera connector on most Pi
variants.
Load: dtoverlay=imx519,<param>=<val>
Params: rotation Mounting rotation of the camera sensor (0 or
180, default 0)
orientation Sensor orientation (0 = front, 1 = rear,
2 = external, default external)
Name: iqaudio-codec
Info: Configures the IQaudio Codec audio card
Load: dtoverlay=iqaudio-codec

View File

@@ -0,0 +1,83 @@
/*
* adafruit-st7735r-overlay.dts
*
* ST7735R based SPI LCD displays. Either
* Adafruit 1.8" 160x128
* or
* Okaya 1.44" 128x128
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&spidev0>;
__overlay__ {
status = "disabled";
};
};
fragment@1 {
target = <&gpio>;
__overlay__ {
adafruit_pins: adafruit_pins {
brcm,pins = <25 24>;
brcm,function = <1>; /* out */
};
backlight_pins: backlight_pins {
brcm,pins = <18>;
brcm,function = <1>; /* out */
};
};
};
fragment@2 {
target-path = "/";
__overlay__ {
af18_backlight: backlight {
compatible = "gpio-backlight";
gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&backlight_pins>;
};
};
};
fragment@3 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
af18: adafruit18@0 {
compatible = "jianda,jd-t18003-t01";
reg = <0>;
spi-max-frequency = <32000000>;
dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
rotate = <90>;
pinctrl-names = "default";
pinctrl-0 = <&adafruit_pins>;
backlight = <&af18_backlight>;
};
};
};
__overrides__ {
128x128 = <&af18>, "compatible=okaya,rh128128t";
speed = <&af18>,"spi-max-frequency:0";
rotate = <&af18>,"rotate:0";
dc_pin = <&af18>,"dc-gpios:4", <&adafruit_pins>,"brcm,pins:4";
reset_pin = <&af18>,"reset-gpios:4",
<&adafruit_pins>,"brcm,pins:0";
led_pin = <&af18_backlight>,"gpios:4",
<&backlight_pins>,"brcm,pins:0";
};
};

View File

@@ -0,0 +1,115 @@
// SPDX-License-Identifier: GPL-2.0-only
// Definitions for imx519 camera module on VC I2C bus
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
/{
compatible = "brcm,bcm2835";
fragment@0 {
target = <&i2c_csi_dsi>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
imx519: imx519@1a {
compatible = "sony,imx519";
reg = <0x1a>;
status = "okay";
clocks = <&imx519_clk>;
clock-names = "xclk";
VANA-supply = <&cam1_reg>; /* 2.8v */
VDIG-supply = <&imx519_vdig>; /* 1.8v */
VDDL-supply = <&imx519_vddl>; /* 1.2v */
rotation = <0>;
orientation = <2>;
port {
imx519_0: endpoint {
remote-endpoint = <&csi1_ep>;
clock-lanes = <0>;
data-lanes = <1 2>;
clock-noncontinuous;
link-frequencies =
/bits/ 64 <493500000>;
};
};
};
};
};
fragment@1 {
target = <&csi1>;
__overlay__ {
status = "okay";
port{
csi1_ep: endpoint{
remote-endpoint = <&imx519_0>;
clock-lanes = <0>;
data-lanes = <1 2>;
clock-noncontinuous;
};
};
};
};
fragment@2 {
target = <&i2c0if>;
__overlay__ {
status = "okay";
};
};
fragment@3 {
target-path="/";
__overlay__ {
imx519_vdig: fixedregulator@1 {
compatible = "regulator-fixed";
regulator-name = "imx519_vdig";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
imx519_vddl: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "imx519_vddl";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
};
imx519_clk: camera-clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
};
};
};
fragment@4 {
target = <&i2c0mux>;
__overlay__ {
status = "okay";
};
};
fragment@5 {
target = <&cam1_reg>;
__overlay__ {
status = "okay";
regulator-name = "imx519_vana";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};
};
__overrides__ {
rotation = <&imx519>,"rotation:0";
orientation = <&imx519>,"orientation:0";
};
};

View File

@@ -925,6 +925,7 @@ CONFIG_VIDEO_TW9906=m
CONFIG_VIDEO_IMX219=m
CONFIG_VIDEO_IMX290=m
CONFIG_VIDEO_IMX477=m
CONFIG_VIDEO_IMX519=m
CONFIG_VIDEO_OV5647=m
CONFIG_VIDEO_OV7251=m
CONFIG_VIDEO_OV7640=m

View File

@@ -939,6 +939,7 @@ CONFIG_VIDEO_TW9906=m
CONFIG_VIDEO_IMX219=m
CONFIG_VIDEO_IMX290=m
CONFIG_VIDEO_IMX477=m
CONFIG_VIDEO_IMX519=m
CONFIG_VIDEO_OV5647=m
CONFIG_VIDEO_OV7251=m
CONFIG_VIDEO_OV7640=m

View File

@@ -918,6 +918,7 @@ CONFIG_VIDEO_TW9906=m
CONFIG_VIDEO_IMX219=m
CONFIG_VIDEO_IMX290=m
CONFIG_VIDEO_IMX477=m
CONFIG_VIDEO_IMX519=m
CONFIG_VIDEO_OV5647=m
CONFIG_VIDEO_OV7251=m
CONFIG_VIDEO_OV7640=m

View File

@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-a-plus.dtb \
bcm2837-rpi-3-b.dtb \
bcm2837-rpi-3-b-plus.dtb \
bcm2837-rpi-cm3-io3.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-zero-2.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-2-b.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b-plus.dtb

View File

@@ -0,0 +1 @@
#include "../../../../arm/boot/dts/bcm2710-rpi-zero-2.dts"

View File

@@ -940,6 +940,7 @@ CONFIG_VIDEO_TW9906=m
CONFIG_VIDEO_IMX219=m
CONFIG_VIDEO_IMX290=m
CONFIG_VIDEO_IMX477=m
CONFIG_VIDEO_IMX519=m
CONFIG_VIDEO_OV5647=m
CONFIG_VIDEO_OV7251=m
CONFIG_VIDEO_OV7640=m

View File

@@ -863,6 +863,7 @@ CONFIG_VIDEO_TW9906=m
CONFIG_VIDEO_IMX219=m
CONFIG_VIDEO_IMX290=m
CONFIG_VIDEO_IMX477=m
CONFIG_VIDEO_IMX519=m
CONFIG_VIDEO_OV5647=m
CONFIG_VIDEO_OV7251=m
CONFIG_VIDEO_OV7640=m

View File

@@ -45,7 +45,7 @@ static void response_callback(struct mbox_client *cl, void *msg)
* Sends a request to the firmware through the BCM2835 mailbox driver,
* and synchronously waits for the reply.
*/
int
static int
rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data)
{
u32 message = MBOX_MSG(chan, data);
@@ -70,7 +70,6 @@ rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data)
return ret;
}
EXPORT_SYMBOL_GPL(rpi_firmware_transaction);
/**
* rpi_firmware_property_list - Submit firmware property list

View File

@@ -769,6 +769,7 @@ struct vc4_async_flip_state {
struct drm_pending_vblank_event *event;
struct vc4_seqno_cb cb;
struct dma_fence_cb fence_cb;
};
/* Called when the V3D execution for the BO being flipped to is done, so that
@@ -817,6 +818,39 @@ vc4_async_page_flip_complete(struct vc4_seqno_cb *cb)
up(&vc4->async_modeset);
}
static void vc4_async_page_flip_fence_complete(struct dma_fence *fence,
struct dma_fence_cb *cb)
{
struct vc4_async_flip_state *flip_state =
container_of(cb, struct vc4_async_flip_state, fence_cb);
vc4_async_page_flip_complete(&flip_state->cb);
dma_fence_put(fence);
}
static int vc4_async_set_fence_cb(struct drm_device *dev,
struct vc4_async_flip_state *flip_state)
{
struct drm_framebuffer *fb = flip_state->fb;
struct drm_gem_cma_object *cma_bo = drm_fb_cma_get_gem_obj(fb, 0);
struct vc4_dev *vc4 = to_vc4_dev(dev);
struct dma_fence *fence;
if (!vc4->hvs->hvs5) {
struct vc4_bo *bo = to_vc4_bo(&cma_bo->base);
return vc4_queue_seqno_cb(dev, &flip_state->cb, bo->seqno,
vc4_async_page_flip_complete);
}
fence = dma_fence_get(dma_resv_get_excl(cma_bo->base.resv));
if (dma_fence_add_callback(fence, &flip_state->fence_cb,
vc4_async_page_flip_fence_complete))
vc4_async_page_flip_fence_complete(fence, &flip_state->fence_cb);
return 0;
}
/* Implements async (non-vblank-synced) page flips.
*
* The page flip ioctl needs to return immediately, so we grab the
@@ -887,8 +921,7 @@ static int vc4_async_page_flip(struct drm_crtc *crtc,
*/
drm_atomic_set_fb_for_plane(plane->state, fb);
vc4_queue_seqno_cb(dev, &flip_state->cb, bo->seqno,
vc4_async_page_flip_complete);
vc4_async_set_fence_cb(dev, flip_state);
/* Driver takes ownership of state on successful async commit. */
return 0;

View File

@@ -958,11 +958,12 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
else
bvb_rate = 75000000;
if (vc4_hdmi->pixel_bvb_clock)
if (vc4_hdmi->pixel_bvb_clock) {
vc4_hdmi->bvb_req = clk_request_start(vc4_hdmi->pixel_bvb_clock, bvb_rate);
if (IS_ERR(vc4_hdmi->bvb_req)) {
DRM_ERROR("Failed to set pixel bvb clock rate: %ld\n", PTR_ERR(vc4_hdmi->bvb_req));
goto err_remove_hsm_req;
if (IS_ERR(vc4_hdmi->bvb_req)) {
DRM_ERROR("Failed to set pixel bvb clock rate: %ld\n", PTR_ERR(vc4_hdmi->bvb_req));
goto err_remove_hsm_req;
}
}
ret = clk_prepare_enable(vc4_hdmi->pixel_bvb_clock);

View File

@@ -836,6 +836,17 @@ config VIDEO_IMX355
To compile this driver as a module, choose M here: the
module will be called imx355.
config VIDEO_IMX519
tristate "Arducam IMX519 sensor support"
depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
depends on MEDIA_CAMERA_SUPPORT
help
This is a Video4Linux2 sensor driver for the Arducam
IMX519 camera.
To compile this driver as a module, choose M here: the
module will be called IMX519.
config VIDEO_OV2640
tristate "OmniVision OV2640 sensor support"
depends on VIDEO_V4L2 && I2C

View File

@@ -122,6 +122,7 @@ obj-$(CONFIG_VIDEO_IMX290) += imx290.o
obj-$(CONFIG_VIDEO_IMX477) += imx477.o
obj-$(CONFIG_VIDEO_IMX319) += imx319.o
obj-$(CONFIG_VIDEO_IMX355) += imx355.o
obj-$(CONFIG_VIDEO_IMX519) += imx519.o
obj-$(CONFIG_VIDEO_MAX9286) += max9286.o
rdacm20-camera_module-objs := rdacm20.o max9271.o
obj-$(CONFIG_VIDEO_RDACM20) += rdacm20-camera_module.o

2091
drivers/media/i2c/imx519.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -173,17 +173,6 @@ static unsigned int sdhci_iproc_get_max_clock(struct sdhci_host *host)
return pltfm_host->clock;
}
static void sdhci_iproc_set_power(struct sdhci_host *host, unsigned char mode,
unsigned short vdd)
{
if (!IS_ERR(host->mmc->supply.vmmc)) {
struct mmc_host *mmc = host->mmc;
mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
}
sdhci_set_power_noreg(host, mode, vdd);
}
/*
* There is a known bug on BCM2711's SDHCI core integration where the
* controller will hang when the difference between the core clock and the bus
@@ -218,7 +207,7 @@ static const struct sdhci_ops sdhci_iproc_32only_ops = {
.write_b = sdhci_iproc_writeb,
.set_clock = sdhci_set_clock,
.get_max_clock = sdhci_iproc_get_max_clock,
.set_power = sdhci_iproc_set_power,
.set_power = sdhci_set_power_and_bus_voltage,
.set_bus_width = sdhci_set_bus_width,
.reset = sdhci_reset,
.set_uhs_signaling = sdhci_set_uhs_signaling,

View File

@@ -691,7 +691,7 @@ int dwc_otg_hcd_qh_add(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh)
} else {
/* If the QH wasn't in a schedule, then sched_frame is stale. */
qh->sched_frame = dwc_frame_num_inc(dwc_otg_hcd_get_frame_number(hcd),
SCHEDULE_SLOP);
max_t(uint32_t, qh->interval, SCHEDULE_SLOP));
status = schedule_periodic(hcd, qh);
qh->start_split_frame = qh->sched_frame;
if ( !hcd->periodic_qh_count ) {

View File

@@ -9,8 +9,6 @@
#include <linux/types.h>
#include <linux/of_device.h>
#define RPI_FIRMWARE_CHAN_FB 1
struct rpi_firmware;
enum rpi_firmware_property_status {
@@ -188,6 +186,5 @@ static inline struct rpi_firmware *rpi_firmware_get(struct device_node *firmware
return NULL;
}
#endif
int rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data);
#endif /* __SOC_RASPBERRY_FIRMWARE_H__ */