- Jan 28, 2021
-
-
Phil Elwell authored
A relatively recent commit ([1]) contained optimisation for the PIO SPI FIFO-filling functions. The commit message includes the phrase "[t]he blind and counted loops are always called with nonzero count". This is technically true, but it is still possible for count to become zero before the loop is entered - if tfr->len is zero. Moving the loop exit condition to the end of the loop saves a few cycles, but results in a near-infinite loop should the revised count be zero on entry. Strangely, zero-lengthed transfers aren't filtered by the SPI framework and, even more strangely, the Python3 spidev library is triggering them for no obvious reason. Avoid the problem completely by bailing out of the main transfer function early if trf->len is zero, although there may be a case for moving the mitigation into the framework. See: https://github.com/raspberrypi/linux/issues/4100 Signed-off-by: Phil Elwell <phil@raspberrypi.com> [1] 26751de2 ("spi: bcm2835: Micro-optimise FIFO loops")
-
Phil Elwell authored
See: https://github.com/raspberrypi/linux/issues/3648 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Nicolas Saenz Julienne authored
It'll be used by the RPi4 family of boards to access its bootloader configuration. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
-
Nicolas Saenz Julienne authored
It'll be used by the RPi4 family of boards to access its bootloader configuration. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
-
Nicolas Saenz Julienne authored
RPi4's co-processor will copy the board's bootloader[1] configuration into memory for the OS to consume. Specifically, for the bootloader configuration and upgrade user-space routines to query it through nvmem's sysfs interface. Introduce a reserved-memory area template for the co-processor to edit before booting the system so as for Linux not to overwrite that memory and to expose it as an nvmem device. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> [1] https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md --- Changes since v1: - Introduce compatible string - Change alias name to something more explicit
-
Nicolas Saenz Julienne authored
Firmware/co-processors might use reserved memory areas in order to pass data stemming from an nvmem device otherwise non accessible to Linux. For example an EEPROM memory only physically accessible to firmware, or data only accessible early at boot time. In order to expose this data to other drivers and user-space, the driver models the reserved memory area as an nvmem device. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> --- Changes since v1: - Remove reserved memory phandle indirection by directly creating a platform device from the reserved memory DT node - Only map memory upon reading it to avoid corruption - Small cosmetic cleanups
-
Nicolas Saenz Julienne authored
Firmware/co-processors might use reserved memory areas in order to pass data stemming from an nvmem device otherwise non accessible to Linux. For example an EEPROM memory only physically accessible to firmware, or data only accessible early at boot time. Introduce the dt-bindings to nvmem's rmem. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> --- Changes since v1: - Update schema to new driver design
-
Phil Elwell authored
See: https://github.com/raspberrypi/linux/pull/4086 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
popcornmix authored
Signed-off-by: popcornmix <popcornmix@gmail.com>
-
Naushir Patuck authored
Add colour denoise control to the bcm2835 driver through a new v4l2 control: V4L2_CID_USER_BCM2835_ISP_CDN. Add the accompanying MMAL configuration structure definitions as well. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Naushir Patuck authored
Add a configuration structure for colour denoise to the bcm2835_isp driver. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
-
Phil Elwell authored
The arm64 version of bcm2711_defconfig is intended for Pi 4, but the Raspberry Pi OS kernel8.img built from it is also used for Pi 3. It is therefore necessary to include some legacy drivers such as the BCM2835 thermal driver, otherwise there is no support for reading the CPU temperature on a Pi 3 in 64-bit mode. See: https://github.com/raspberrypi/linux/issues/4077 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Dom Cobley authored
Fixes failure with 4096x1080 resolutions [ 284.315379] WARNING: CPU: 1 PID: 901 at drivers/gpu/drm/vc4/vc4_plane.c:981 vc4_plane_mode_set+0x1374/0x13c4 [ 284.315385] Modules linked in: ir_rc5_decoder rpivid_hevc(C) bcm2835_codec(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) bcm2835_gpiomem v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc cdc_acm xpad ir_rc6_decoder rc_rc6_mce gpio_ir_recv fuse [ 284.315509] CPU: 1 PID: 901 Comm: kodi.bin Tainted: G C 5.10.7 #1 [ 284.315514] Hardware name: BCM2711 [ 284.315518] Backtrace: [ 284.315533] [<c0cc5ca0>] (dump_backtrace) from [<c0cc6014>] (show_stack+0x20/0x24) [ 284.315540] r7:ffffffff r6:00000000 r5:68000013 r4:c18ecf1c [ 284.315549] [<c0cc5ff4>] (show_stack) from [<c0cca638>] (dump_stack+0xc4/0xf0) [ 284.315558] [<c0cca574>] (dump_stack) from [<c022314c>] (__warn+0xfc/0x158) [ 284.315564] r9:00000000 r8:00000009 r7:000003d5 r6:00000009 r5:c08cc7dc r4:c0fd09b8 [ 284.315572] [<c0223050>] (__warn) from [<c0cc67ec>] (warn_slowpath_fmt+0x74/0xe4) [ 284.315577] r7:c08cc7dc r6:000003d5 r5:c0fd09b8 r4:00000000 [ 284.315584] [<c0cc677c>] (warn_slowpath_fmt) from [<c08cc7dc>] (vc4_plane_mode_set+0x1374/0x13c4) [ 284.315589] r8:00000000 r7:00000000 r6:00001000 r5:c404c600 r4:c2e34600 [ 284.315596] [<c08cb468>] (vc4_plane_mode_set) from [<c08cc984>] (vc4_plane_atomic_check+0x40/0x1c0) [ 284.315601] r10:00000001 r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 [ 284.315605] r4:c2e34600 [ 284.315614] [<c08cc944>] (vc4_plane_atomic_check) from [<c0860504>] (drm_atomic_helper_check_planes+0xec/0x1ec) [ 284.315620] r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 r4:00000006 [ 284.315627] [<c0860418>] (drm_atomic_helper_check_planes) from [<c0860658>] (drm_atomic_helper_check+0x54/0x9c) [ 284.315633] r9:c2e35400 r8:00000006 r7:00000000 r6:c2ba7800 r5:c3d636c0 r4:00000000 [ 284.315641] [<c0860604>] (drm_atomic_helper_check) from [<c08b7ca8>] (vc4_atomic_check+0x25c/0x454) [ 284.315645] r7:00000000 r6:c2ba7800 r5:00000001 r4:c3d636c0 [ 284.315652] [<c08b7a4c>] (vc4_atomic_check) from [<c0881278>] (drm_atomic_check_only+0x5cc/0x7e0) [ 284.315658] r10:c404c6c8 r9:ffffffff r8:c472c480 r7:00000003 r6:c3d636c0 r5:00000000 [ 284.315662] r4:0000003c r3:c08b7a4c [ 284.315670] [<c0880cac>] (drm_atomic_check_only) from [<c089ba60>] (drm_mode_atomic_ioctl+0x758/0xa7c) [ 284.315675] r10:c3d46000 r9:c3d636c0 r8:c2ce8a70 r7:027e3a54 r6:00000043 r5:c1fbb800 [ 284.315679] r4:0281a858 [ 284.315688] [<c089b308>] (drm_mode_atomic_ioctl) from [<c086e9f8>] (drm_ioctl_kernel+0xc4/0x108) [ 284.315693] r10:c03864bc r9:c1fbb800 r8:c3d47e64 r7:c089b308 r6:00000002 r5:c2ba7800 [ 284.315697] r4:00000000 [ 284.315705] [<c086e934>] (drm_ioctl_kernel) from [<c086ee28>] (drm_ioctl+0x1e8/0x3a0) [ 284.315711] r9:c1fbb800 r8:000000bc r7:c3d47e64 r6:00000038 r5:c0e59570 r4:00000038 [ 284.315719] [<c086ec40>] (drm_ioctl) from [<c041f354>] (sys_ioctl+0x35c/0x914) [ 284.315724] r10:c2d08200 r9:00000000 r8:c36fa300 r7:befdd870 r6:c03864bc r5:c36fa301 [ 284.315728] r4:c03864bc [ 284.315735] [<c041eff8>] (sys_ioctl) from [<c0200040>] (ret_fast_syscall+0x0/0x28) [ 284.315739] Exception stack(0xc3d47fa8 to 0xc3d47ff0) [ 284.315745] 7fa0: 027eb750 befdd870 00000000 c03864bc befdd870 00000000 [ 284.315750] 7fc0: 027eb750 befdd870 c03864bc 00000036 027e3948 0281a640 0281a850 027e3a50 [ 284.315756] 7fe0: b4b64100 befdd844 b4b5ba2c b49c994c [ 284.315762] r10:00000036 r9:c3d46000 r8:c0200204 r7:00000036 r6:c03864bc r5:befdd870 [ 284.315765] r4:027eb750 Fixes: c54619b0 Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dom Cobley authored
LBM base address is measured in units of pixels per cycle. That is 4 for 2711 (hvs5) and 2 for 2708. We are wasting 75% of lbm by indexing without the scaling. But we were also using too high a size for the lbm resulting in partial corruption (right hand side) of vertically scaled images, usually at 4K or lower resolutions with more layers. The physical RAM of LBM on 2711 is 8 * 1920 * 16 * 12-bit (pixels are stored 12-bits per component regardless of format). The LBM adress indexes work in units of pixels per clock, so for 4 pixels per clock that means we have 32 * 1920 = 60K Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Phil Elwell authored
This reverts commit 1c15edc0dca002c8536e9f1f5e1ec43017815018. This revert and its neighbour are opposites. When squashing, delete the original commits as well. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
This revert and its neighbour are opposites. When squashing, delete the original commits as well. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Marc Kleine-Budde authored
It turns out the used CAN SPI chip is not a good way to identify the version of the CAN HAT. There are two different board layouts of the Seeed Studio CAN BUS FD HAT. The v1 board doesn't have a battery holder, while the v2 board has. Update the overlay README accordinly. Link: https://github.com/Seeed-Studio/seeed-linux-dtoverlays/issues/13 Cc: Patrick Menschel <menschel.p@posteo.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Dave Stevenson authored
Update those overlays that use the regulator framework to use the new cam1_reg node to control the camera shutdown line, and remove the firmware workaround nodes. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
The current firmware fixup of camera sensor overlays is not particularly nice, and it stops you being able to load them dynamically. It's also incompatible with creating a simple DT that can be loaded for both CAM1 and CAM0 on a CM as they would both try to claim the one GPIO. Almost all sensors have a hook of some form for a regulator, so it's relatively straightforward to convert them all to use a fixed regulator with GPIO control. Add a fixed regulator node for each platform with the GPIO correctly configured for the camera shutdown line. (The LED line is ignored). Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Aaron Shaw authored
adds an override to the merus-amp overlay to turn the spi bus off Change-type: patch Signed-off-by: Aaron Shaw <shawaj@gmail.com>
-
Aaron Shaw authored
add overlay for waveshare wm8960 simple-audio-card Change-type: patch Signed-off-by: Aaron Shaw <shawaj@gmail.com>
-
Marc Kleine-Budde authored
This patch adds the overlay for the Seeed Studio CAN BUS FD HAT v1 with two CAN FD Channels (based on mcp2517fd). https://www.seeedstudio.com/2-Channel-CAN-BUS-FD-Shield-for-Raspberry-Pi-p-4072.html The overlay was generated by: ovmerge -c spi1-1cs-overlay.dts,cs0_pin=18,cs0_spidev=false \ mcp251xfd-overlay.dts,spi0-0,interrupt=25 \ mcp251xfd-overlay.dts,spi1-0,interrupt=24 Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Marc Kleine-Budde authored
There are several versions of the Seeed Studio CAN BUS FD HAT. This is the second version, based on the mcp2518fd, so give it a -v2 postfix. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-
Paul Elder authored
To comply with the intended usage of the V4L2 selection target when used to retrieve a sensor image properties, adjust the rectangles returned by the ov5647 driver. The top/left crop coordinates of the TGT_CROP rectangle were set to (0, 0) instead of (16, 16) which is the offset from the larger physical pixel array rectangle. This was also a mismatch with the default values crop rectangle value, so this is corrected. Found with v4l2-compliance. While at it, add V4L2_SEL_TGT_CROP_BOUNDS support: CROP_DEFAULT and CROP_BOUNDS have the same size as the non-active pixels are not readable using the selection API. Found with v4l2-compliance. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
-
Dom Cobley authored
Set panic priority to 15 and leave normal priority at 0 Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
popcornmix authored
Signed-off-by: popcornmix <popcornmix@gmail.com>
-
Dom Cobley authored
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
popcornmix authored
Questionable: Might want to drop Signed-off-by: popcornmix <popcornmix@gmail.com>
-
Dom Cobley authored
Use (reserved) bits 24 and 25 of the dreq value (the second cell of the DT DMA descriptor) to request that wide source reads or wide dest writes are required Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dave Stevenson authored
When logging that the firmware has provided more supported formats than we had allocated storage for, log the number allocated and returned. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Now that the firmware supports the unpacked (16bpp) variants of the MIPI raw formats, add the mappings. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
When logging that the firmware has provided more supported formats than we had allocated storage for, log the number allocated and returned. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Now that the firmware supports the unpacked (16bpp) variants of the MIPI raw formats, add the mappings. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Support has been added for the unpacked (16bpp) versions of the MIPI raw 10, 12, and 14 formats, so add the 4CCs for them. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
For some reason lost in history function vchiq_mmal_init used a static variable for storing the vchiq_instance. This value is retrieved from vchiq per instance, so worked fine until you try to call vchiq_mmal_init multiple times concurrently when things then go wrong. This seemed to happen quite frequently if using the cutdown firmware (no MMAL or VCSM services running) as the vchiq_connect then failed, and one or other vchiq_shutdown was working on an invalid handle. Remove the static so that each caller gets a unique vchiq_instance. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Dave Stevenson authored
Two issues identified with operator precedence in logical expressions. Fix them. https://github.com/raspberrypi/linux/issues/4040 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-
Phil Elwell authored
The recent change to the bulk transfer compat function missed the fact the relevant ioctl command is VCHIQ_IOC_QUEUE_BULK_TRANSMIT32, not VCHIQ_IOC_QUEUE_BULK_TRANSMIT, as any attempt to send a bulk block to the VPU would have shown. Fixes: a4367cd2 ("staging: vchiq: convert compat bulk transfer") Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
gesangtome authored
error logs: drivers/staging/vc04_services/vc-sm-cma/Kconfig:1:error: recursive dependency detected! drivers/staging/vc04_services/vc-sm-cma/Kconfig:1: symbol BCM_VC_SM_CMA is selected by BCM2835_VCHIQ_MMAL drivers/staging/vc04_services/vchiq-mmal/Kconfig:1: symbol BCM2835_VCHIQ_MMAL depends on BCM2835_VCHIQ drivers/staging/vc04_services/Kconfig:14: symbol BCM2835_VCHIQ is selected by BCM_VC_SM_CMA For a resolution refer to Documentation/kbuild/kconfig-language.rst subsection "Kconfig recursive dependency limitations" Tested-by: make ARCH=arm64 bcm2711_defconfig Test platform: fedora 33 Branch: rpi-5.10.y
-
menschel authored
This patch adds the overlay for the Seeed Studio CAN BUS FD HAT with two CAN FD Channels and an RTC. https://www.seeedstudio.com/CAN-BUS-FD-HAT-for-Raspberry-Pi-p-4742.html The overlay was generated by ovmerge -c mcp251xfd-overlay.dts,spi0-0,interrupt=25 \ mcp251xfd-overlay.dts,spi0-1,interrupt=24 \ i2c-rtc-overlay.dts,pcf85063 Also, add description on how to generate overlays Signed-off-by: Patrick Menschel <menschel.p@posteo.de>
-