- Jun 03, 2020
-
-
Phil Elwell authored
The i2c-gpio driver expects to use a GPIO in open-drain mode. Failure to configure it in that way causes alarming warnings in the kernel log. The BCM283x and BCM2711 GPIO blocks don't support open-drain mode, but i2c-gpio works anyway. Silence the warning by declaring that open-drain mode has been enabled by other means. See: https://github.com/raspberrypi/firmware/issues/1381 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Dave Stevenson authored
The array of potential formats and their configuration should be const. Rework all accesses so that this is possible. The list of supported formats was taking a copy of entries from this table. This is unnecessary, therefore allocate an array of pointers instead of an array of entries. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
With the codec code from which this was derived, the driver had to get the supported formats for both input and output ports. This had been copied across, however here we have independent nodes for each port, but the code had been left in to do the same thing twice. Remove the duplicate. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Phil Elwell authored
Like many overlays, the i2c-gpio overlay goes to efforts to avoid generating warnings about #address-cells and #size-cells not being defined, which it does by defining them. Unfortunately this is fatal if they don't match what the system requires, and the recent switch to #size-cells = 2 on 2711 made i2c-gpio very dangerous. In the absence of the knowledge of a clean way to fix this, just delete the declarations and suffer the warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Add the spi_dma4 DT parameter to enable use of the 40-bit DMA channels to drive SPI. Note that there are only 3-4 40-bit channels available, and using this parameter claims 2 of them. Usage: dtparam=spi_dma4 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
BCM2711 has 4 DMA channels with a 40-bit address range, allowing them to access the full 4GB of memory on a Pi 4. Signed-off-by: Phil Elwell <phil@raspberrypi.org>
-
Phil Elwell authored
This warning is unavoidable from a client's perspective and doesn't indicate anything wrong (just surprising). SQUASH with "spi: use_gpio_descriptor fixup moved to spi_setup" Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Naushir Patuck authored
This is used to enumerate available frame sizes on all nodes apart from statistics output. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Dave Stevenson authored
The reference counting of node->open was only incremented after a check that the node was v4l2_fh_is_singular_file, which resulted in the counting going wrong and s_power not being called at an appropriate time. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
unicam_release calls _vb2_fop_release, which will call stop_streaming if that particular node was streaming. Calling it unconditionally (as the code was) means that if a second handle was opened eg to alter a setting, on closing that connection it also stopped Unicam. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Sensors are now reflecting cropping and scaling parameters through the selection API, therefore Unicam needs to forward the requests through to the subdev. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
The flag V4L2_SUBDEV_FL_HAS_EVENTS is required if the subdev can generate events. It can create events from the ctrl handler, therefore this is required. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Exposure is clipped by the VTS of the mode, so needs to be updated as and when this is changed. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
To make adding new members to the mode structures easier, use the member names in the initialisers. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
The controls for analogue gain and exposure were defined with V4L2_CTRL_FLAG_EXECUTE_ON_WRITE. This is not required as we only need to send changes to the sensor. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Adds vblank control to allow for frame rate control. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
The ov5647 subdev can generate control events, therefore set the V4L2_SUBDEV_FL_HAS_EVENTS flag. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Clients need to know the pixel rate in order to compute exposure and frame rate values. Advertise it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
"87f3ab94 media: ov5647: Add basic support for multiple sensor modes." added a return path ov5647_set_fmt that didn't release the device mutex that it had claimed. Release the mutex. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
In order to apply lens shading correctly the client needs to know how each mode crops or scales the image compared to the full sensor array. Implement this (based on the imx219 equivalent). Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Jacopo Mondi authored
Implement the get_selection pad operation for the IMX219 sensor driver. The supported targets report the sensor's native size, the crop default rectangle and the crop rectangle. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
-
popcornmix authored
Signed-off-by: popcornmix <popcornmix@gmail.com>
-
popcornmix authored
Signed-off-by: popcornmix <popcornmix@gmail.com>
-
popcornmix authored
This isn't required on Pi3, so don't treat as an error Signed-off-by: popcornmix <popcornmix@gmail.com>
-
Naushir Patuck authored
This commit enables the bcm2835-isp driver in the following defconfigs: bcm2709_defconfig bcm2711_defconfig bcmrpi_defconfig bcmrpi3_defconfig Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
bcmn2835_isp is a platform driver dependent on vchiq, therefore add the load/unload functions for it to vchiq. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
Driver for the BCM2835 ISP hardware block. This driver uses the MMAL component to program the ISP hardware through the VC firmware. The ISP component can produce two video stream outputs, and Bayer image statistics. This can't be encompassed in a simple V4L2 M2M device, so create a new device that registers 4 video nodes. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
No functional changes in this commit. - Remove erroneous whitespace. - Remove _t postfix label on structs and enums. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
We are reserving controls for the new bcm2835-isp driver. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
Add V4L2_META_FMT_BCM2835_ISP_STATS V4L2 format type. This new format will be used by the BCM2835 ISP device to return out ISP statistics for 3A. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
This file defines the userland interface to the bcm2835-isp driver that will follow in a separate commit. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
The sensor subdevice may change the Bayer order if a H/V flip is requested after a s_fmt call. Unicam g_fmt must call the subdev get_fmt in case this has happened and return out the correct format 4cc. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Phil Elwell authored
Fixes: "dts: bcm2711: set #size-cells = <2>" Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Commits [1] and [2] including code that forces SPI_CS_HIGH for SPI controllers that use GPIO descriptors, the SPI_CS_HIGH flag being there to avoid a double-negation (since SPI CS is usually active-low). The motivation for pushing the knowledge of the required polarity into the GPIO descriptor allows the switch to an output to request the correct inactive level, avoiding a needless glitch. The problem with setting the flag early as [1] does is that it appears in the mode field that is passed to client drivers during their probing, when they may want to choose SPI_POL, SPI_PHA and (just possibly) SPI_CS_HIGH. Since SPI_CS_HIGH is the exception, most drivers won't set it and the anti-negation negation is lost. [2] acknowledges that problem and patches things up for the case of users of spidev, but omits regular kernel-mode drivers. Downstream commit [3] moves the forcing of SPI_CS_HIGH to spi_setup, after the driver probing. Since this code is called before any CS manipulation it is early enough to be effective, but late enough that clients have already had their chance to change the mode field. This is a partial reversion of [1], and is accompanied by a complete reversion of [2], neither of which is needed any longer. [1] f3186dd8 ("spi: Optionally use GPIO descriptors for CS GPIOs") [2] 83b2a8fe ("spi: spidev: Fix CS polarity if GPIO descriptors are used") [3] <varies> ("spi: Force CS_HIGH if GPIO descriptors are used") Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
This reverts commit 83b2a8fe.
-
Hristo Venev authored
The following addresses change: - 0xfc00_0000 -> 0x4_7c00_0000 - 0xff80_0000 -> 0x4_c000_0000 The range 0xfc00_0000-0xffff_ffff becomes available as system RAM on devices with >= 4 GiB of RAM. Firmware should initialize the memory node appropriately. Signed-off-by: Hristo Venev <hristo@venev.name>
-
Hristo Venev authored
There already is one 4 GiB range, and one more will appear when high peripheral mode is enabled. Signed-off-by: Hristo Venev <hristo@venev.name>
-
Phil Elwell authored
The first revision of the Pi Model B used I2C0 to address the camera and I2C0 was available for user applications on the 26-pin header. The second revision switched the roles, kept I2C0 on the 26-pin header and added I2C1 on a new 8-way header (P5). Up to now, downstream DTS has used a single file for both revisions of the board, with a small amount of patching from the firmware. With the introduction of an I2C mux to share I2C0 between the camera/display connectors and the IDC headers, the difference between the two versions becomes too great to comfortably manage with tweaking, hence this split. Upstream DTS files already have bcm2835-rpi-b.dts and bcm2835-rpi-b-rev2.dts, but for backwards compatibility the new file is being added as bcm2708-rpi-b-rev1.dts, rather than renaming the old shared version to bcm2708-rpi-b-rev2.dts. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Dave Stevenson authored
BSC0 (aka i2c0) can me muxed via pinctrl to GPIOs 0&1, 28&29, or 44&45. These have different uses based on the platform (40pin header, and CSI/DSI connectors), so add a pinctrl I2C mux between the different options. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Update all overlays that were using i2c_vc for talking to CSI source devices to use the new i2c_csi_dsi node via i2c_mux_pinctrl. Remove the pins overrides as well. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-