- May 12, 2020
-
-
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>
-
Dave Stevenson authored
BSC0 serves either the HAT EEPROM pins on the 40pin connector, or the display and camera on a board specific pairing of either GPIO 28&29, or 44&45. Use I2C_MUX_PINCTRL to allow exposing both pairs of pins as I2C busses. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
To be used to switch between the camera/display pins, and the HAT pins for i2c-0. (arm64/bcmrpi3_defconfig was missing all the I2C mux support, so enable it all) Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Phil Elwell authored
Limit mappings to the permitted range, but don't map more than asked for otherwise we walk off the end of the allocated VMA. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Although 0xfc000000 looks like an inaccessible RAM address (due to the peripheral mappings), with RAM mapped at 0xc0000000 (as it is on the 30/32-bit VPU bus) this is actually 0x3c000000 in the ARM memory space, which is fine. This difference is potentially the cause of some warnings seen in sdhci_send_command. Fixes: "dts: bcm2711: Move emmc2 to its own 'bus'" Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Naushir Patuck authored
This commit updates the imx219 driver to adverise support for embedded data streams. This can then be used by the bcm2835-unicam driver, which has recently been updated to expose the embedded data stream to userland. The imx219 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: Naushir Patuck <naush@raspberrypi.com>
-
Phil Elwell authored
This reverts commit 91f2cf4a. Revert this because the clock driver won't probe without a DT node, and creating it as a platform device won't give it one. Doing so avoids the following error message: raspberrypi-clk raspberrypi-clk: Missing firmware node Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
popcornmix authored
We actually use the 64-bit 2711 kernel on Pi3 too. It still uses the downstream cpufreq driver in DT. See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769&start=100#p1644752 Signed-off-by: popcornmix <popcornmix@gmail.com>
-
Laurent Pinchart authored
The FRAME_SYNC event is useful for userspace image processing algorithms to program the camera sensor as early as possible after frame start. Support it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
-
Laurent Pinchart authored
The unicam driver supports both the SOURCE_CHANGE and CTRL events. Both events are only generated on the image video node, so the event-related ioctls are useless on the medatada node. Disable them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
-
Dafna Hirschfeld authored
https://patchwork.linuxtv.org/patch/62740/ When enumerating the frame sizes, the value sent to imx219_get_format_code should be fse->code (the code from the ioctl) and not imx219->fmt.code which is the code set currently in the driver. Fixes: 22da1d56 ("media: i2c: imx219: Add support for RAW8 bit bayer format") Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Reviewed-by: Helen Koike <helen.koike@collabora.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
-
Lad Prabhakar authored
Commit 25130b8a upstream. This patch adds mode table entry for capturing cropped 640x480 resolution Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Acked-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Lad Prabhakar authored
Commit 22da1d56 upstream. IMX219 sensor is capable for RAW8/RAW10 modes. This commit adds support for RAW8 bayer format. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Lad Prabhakar authored
Commit ca45448a upstream. When supporting Rpi Camera v2 Module on the RZ/G2E, found the driver had some issues with rcar mipi-csi driver. The sensor never entered into LP-11 state. The powerup sequence in the datasheet[1] shows the sensor entering into LP-11 in streaming mode, so to fix this issue transitions are performed from "streaming -> standby" in the probe() after power up. With this commit the sensor is able to enter LP-11 mode during power up, as expected by some CSI-2 controllers. [1] https://publiclab.org/system/images/photos/000/023/294/original/ RASPBERRY_PI_CAMERA_V2_DATASHEET_IMX219PQH5_7.0.0_Datasheet_XXX.PDF Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Acked-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Phil Elwell authored
Commit f3186dd8 ("spi: Optionally use GPIO descriptors for CS GPIOs") amended of_spi_parse_dt() to always set SPI_CS_HIGH for SPI slaves whose Chip Select is defined by a "cs-gpios" devicetree property. This change breaks drivers whose probe functions set the mode field of the spi_device because in doing so they clear the SPI_CS_HIGH flag. Fix by setting SPI_CS_HIGH in spi_setup (under the same conditions as in of_spi_parse_dt()). See also: 83b2a8fe ("spi: spidev: Fix CS polarity if GPIO descriptors are used") Fixes: f3186dd8 ("spi: Optionally use GPIO descriptors for CS GPIOs") Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Naushir Patuck authored
If no buffer has been queued by a userland application, we use an internal dummy buffer for the hardware to spin in. This will allow the driver to release the existing userland buffer back to the application for processing. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
This patch adds a new node in the bcm2835-unicam driver to support CSI-2 embedded data streams. The subdevice is queried to see if embedded data is available from the sensor. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
Move device node specific state out of the device state structure and into a new node structure. This separation will be needed for future changes where we will add an embedded data node to the driver to work alongside the existing image data node. Currently only use a single image node, so this commit does not add any functional changes. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
This patch adds MEDIA_BUS_FMT_SENSOR_DATA used by the bcm2835-unicam driver to support CSI-2 embedded data streams from camera sensors. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
Add V4L2_META_FMT_SENSOR_DATA format 4CC. This new format will be used by the BCM2835 Unicam device to return out camera sensor embedded data. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
This commit enables the bcm2835-unicam driver in the following defconfigs: bcm2709_defconfig bcm2711_defconfig bcmrpi_defconfig Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
Add driver for the Unicam camera receiver block on BCM283x processors. This commit is made up of a series of changes cherry-picked from the rpi-4.19.y branch. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Jacopo Mondi authored
Add to the V4L2 core a function to register device nodes for video subdevices in read-only mode. Registering a device node in read-only mode is useful to expose to userspace the current sub-device configuration, without allowing application to change it by using the V4L2 subdevice ioctls. Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
-
Jacopo Mondi authored
Document a new kAPI function to register subdev device nodes in read only mode and for each affected ioctl report how access is restricted. Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
-
Jacopo Mondi authored
Update the V4L2 sub-device userspace API introduction to provide more details on why complex devices might want to register devnodes for the connected subdevices. Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
-
Jörg Schambacher authored
This patch fixes a problem of the re-calculation of i2s-clock and -parameter settings when only the ADC is activated. Signed-off-by: Joerg Schambacher <joerg@i2audio.com>
-
James Hilliard authored
If a component fails to bind due to -EPROBE_DEFER we should not log an error as this is not a real failure. Fixes: vc4-drm soc:gpu: failed to bind 3f902000.hdmi (ops vc4_hdmi_ops): -517 vc4-drm soc:gpu: master bind failed: -517 Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
-
James Hilliard authored
If the vc4 hdmi driver loads before the pixel clock is available we see a spurious "*ERROR* Failed to get pixel clock" error. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
-
Phil Elwell authored
Moving the EMMC2 controller under a dedicated bus allows the firmware to patch the dma-ranges property for different memory sizes without affecting anything else. Signed-off-by: Phil Elwell <phil@raspberrypi.org>
-
Phil Elwell authored
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-