platform/kernel/linux-rpi.git
3 months agomedia: i2c: adv7180: Add support for V4L2_CID_LINK_FREQ
Dave Stevenson [Thu, 21 Dec 2023 18:03:34 +0000 (18:03 +0000)]
media: i2c: adv7180: Add support for V4L2_CID_LINK_FREQ

For CSI2 receivers that need to know the link frequency,
add it as a control to the driver.
Interlaced modes are 216Mbp/s or 108MHz, whilst going through
the I2P to deinterlace gives 432Mb/s or 216MHz.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agomedia: i2c: adv7180: Use MEDIA_BUS_FMT_UYVY8_1X16 for CSI2 output
Dave Stevenson [Thu, 21 Dec 2023 18:01:59 +0000 (18:01 +0000)]
media: i2c: adv7180: Use MEDIA_BUS_FMT_UYVY8_1X16 for CSI2 output

CSI2 devices are meant to use the 1Xnn formats rather than 2Xnn
such as MEDIA_BUS_FMT_UYVY8_2X8.

For devices with ADV7180_FLAG_MIPI_CSI2 set, use
MEDIA_BUS_FMT_UYVY8_1X16.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agomedia: rp1: cfe: Fix error paths in cfe_start_streaming
Dave Stevenson [Thu, 21 Dec 2023 17:59:15 +0000 (17:59 +0000)]
media: rp1: cfe: Fix error paths in cfe_start_streaming

Noted that if we get "node link is not enabled", then we also
get the videobuf2 splat for the driver not cleaning up correctly
on a failed start_streaming, and indeed we weren't returning the
buffers.

Checking the other error paths, noted that the "FE enabled, but
FE_CONFIG node is not" path was not calling pm_runtime_put.

Fix both paths.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodrm/vc4: Fixup of patches adding debugfs functions
Dave Stevenson [Tue, 2 Jan 2024 19:32:25 +0000 (19:32 +0000)]
drm/vc4: Fixup of patches adding debugfs functions

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodrm/vc4: Fix reading of frame count on GEN5 / Pi4
Dave Stevenson [Thu, 4 Jan 2024 12:02:43 +0000 (12:02 +0000)]
drm/vc4: Fix reading of frame count on GEN5 / Pi4

The frame count values moved within registers DISPSTAT1 and
DISPSTAT2 with GEN5, so update the accessor function to
accommodate that.

Fixes: b51cd7ad143d ("drm/vc4: hvs: Fix frame count register readout")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agoASoC: dwc: Defer bclk_ratio handling to hw_params
Phil Elwell [Wed, 3 Jan 2024 14:43:43 +0000 (14:43 +0000)]
ASoC: dwc: Defer bclk_ratio handling to hw_params

bclk_ratio is only a factor in clock producer mode, and needs to
override the default value of num_channels * sample_size.
Move the bclk_ratio handling into the hw_params method, only latching
the value in set_bclk_ratio, to address both of those matters.

See: https://github.com/raspberrypi/linux/issues/5817

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoconfigs: rpi: Disable CONFIG_IRQSOFF_TRACER by default
Yangyu Chen [Mon, 18 Dec 2023 15:26:59 +0000 (23:26 +0800)]
configs: rpi: Disable CONFIG_IRQSOFF_TRACER by default

This configuration hindered performance by ~74% measured from RPI 4B
from ~680Mbps to ~390Mbps when benchmarking wireguard locally using
netns and iperf3. Remove it by default for better performance.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
3 months agodts: rp1: Add I2C timings
Phil Elwell [Tue, 19 Dec 2023 11:27:20 +0000 (11:27 +0000)]
dts: rp1: Add I2C timings

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoi2c: designware: Look for *CNT values in DT
Phil Elwell [Tue, 19 Dec 2023 11:16:25 +0000 (11:16 +0000)]
i2c: designware: Look for *CNT values in DT

The i2c-designware driver supports reading precise timing values from
ACPI, but the Device Tree support relies on a combination of standard
rise and fall times and hard-coded minimum timings. The result of this
is that it is difficult to get optimum timings, particularly given that
the values are bus speed-specific and only one set can be stored in
DT at a time.

Add support for initialisation from DT that is similar to that for
ACPI.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoARM: dts: bcm2712-rpi-5-b: Allow RTC to be disabled
Phil Elwell [Tue, 19 Dec 2023 14:55:21 +0000 (14:55 +0000)]
ARM: dts: bcm2712-rpi-5-b: Allow RTC to be disabled

Add a dtparam "rtc", so that "dtparam=rtc=off" can be used to disable
the Pi 5's onboard RTC.

See: https://forums.raspberrypi.com/viewtopic.php?t=361813

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agofixup downstream patch post driver conversion to CCI_REG
Dave Stevenson [Wed, 27 Dec 2023 19:51:45 +0000 (19:51 +0000)]
fixup downstream patch post driver conversion to CCI_REG

HTS was still using the raw register ID.

Fixes: dd26d43ddb7f ("media: i2c: imx219: make HBLANK r/w to allow longer exposures")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodts: bcm271-rpi-3-b: Make brcmvirt-gpio a firmware child
Phil Elwell [Thu, 21 Dec 2023 15:52:42 +0000 (15:52 +0000)]
dts: bcm271-rpi-3-b: Make brcmvirt-gpio a firmware child

The driver makes use of the fact that the firmware node is its parent,
so we'd better make it so.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agobcm2835-virtgpio: Update for Linux 6.6
Phil Elwell [Thu, 21 Dec 2023 15:13:37 +0000 (15:13 +0000)]
bcm2835-virtgpio: Update for Linux 6.6

The gpio subsystem is happier if the gpiochip is given a parent, and
if it doesn't have a fixed base gpio number. While we're in here,
use the fact that the firmware node is the parent to locate it,
and use the devm_ version of rpi_firmware_get.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agodrivers: media: cfe: Add more robust ISR handlers
Naushir Patuck [Mon, 18 Dec 2023 09:52:45 +0000 (09:52 +0000)]
drivers: media: cfe: Add more robust ISR handlers

Update the ISR logic to be more robust to sensors in problematic states
where interrupts may start arriving overlapped and/or missing.

1) Test for cur_frame in the FE handler, and if present, dequeue it in
an error state so that it does not get orphaned.

2) Move the sequence counter and timestamp variables to the node
structures.  This allows the ISR to track channels running ahead when
interrupts arrive unordered.

3) Add a test to ensure we don't have a spurios (but harmlesS) call to
the FE handler in some circumstances.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
3 months agodrivers: media: pisp_be: pisp_fe: Update UAPI header licenses
Naushir Patuck [Wed, 29 Nov 2023 13:09:05 +0000 (13:09 +0000)]
drivers: media: pisp_be: pisp_fe: Update UAPI header licenses

Update the license tags on the pisp UAPI header files with the
"Linux-syscall-note" clause.  Also replace the "GPL-2.0" tag with the
preferred "GPL-2.0-only" tag.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
3 months agoinput: edt-ft5x06: Correct prefix length in snprintf
Dave Stevenson [Mon, 18 Dec 2023 11:49:36 +0000 (11:49 +0000)]
input: edt-ft5x06: Correct prefix length in snprintf

snprintf takes the length of the array that we can print into,
and has to fit the NULL terminator in there too.
Printing the prefix is generally "12-3456 " which is 8 desired
characters (the length of EDT_NAME_PREFIX_LEN) and the NULL.
The space is therefore being truncated to fit the NULL in.

Increase the length snprintf is allowed to use.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agooverlays: Add "always-on" parameter to imx477 and imx296
Nick Hollinghurst [Wed, 6 Dec 2023 14:38:03 +0000 (14:38 +0000)]
overlays: Add "always-on" parameter to imx477 and imx296

Leave the camera's power supplies up, to prevent the camera
clamping its 1.8V digital I/Os to ground. This may be useful
when synchronizing multiple camera systems using XVS or XTRIG.

Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
3 months agodrivers: media: i2c: imx296,imx477: Configure tigger_mode every time
Nick Hollinghurst [Wed, 6 Dec 2023 14:27:57 +0000 (14:27 +0000)]
drivers: media: i2c: imx296,imx477: Configure tigger_mode every time

Don't assume the camera has been reset each time we start streaming,
but always write registers relating to trigger_mode, even in mode 0.

IMX477: Stop driving XVS on stop streaming, to avoid spurious pulses.

Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
3 months agodts: rp1: add SNPS quirk to USB3 host controllers
Jonathan Bell [Wed, 13 Dec 2023 14:28:22 +0000 (14:28 +0000)]
dts: rp1: add SNPS quirk to USB3 host controllers

Set snps,parkmode-disable-ss-quirk for usb0 and usb1.

Enabling this test/debug feature seems to prevent controller lockups
with bidirectional SS bulk endpoints active.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
3 months agoARM: dts: bcm2711-rpi-400: Don't delete the ACT LED
Phil Elwell [Wed, 13 Dec 2023 10:26:19 +0000 (10:26 +0000)]
ARM: dts: bcm2711-rpi-400: Don't delete the ACT LED

The Pi 400 only has one user-accessible LED (green), which is intended
to be used as a power indication. Therefore there is no activity LED.
However, a user may wish to remap the activity LED functionality to a
GPIO in the 40-way header, so preserve the led-act node in a disabled
state.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agodts: bcm2712-rpi-5-b: Enable warm reboot mode
Phil Elwell [Mon, 11 Dec 2023 17:00:56 +0000 (17:00 +0000)]
dts: bcm2712-rpi-5-b: Enable warm reboot mode

Switch to warm reboot mode so that the partition number is preserved.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agofirmware/psci: Pass given partition number through
Phil Elwell [Mon, 11 Dec 2023 16:58:07 +0000 (16:58 +0000)]
firmware/psci: Pass given partition number through

Pi 5 uses BL31 as its armstub file, so the reset goes via PSCI. Parse
any "reboot" parameter as a partition number to reboot into.
N.B. This code path is only used if reboot mode has been set to warm
or soft.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agodrivers/gpu/drm/panel:fix waveshare panel software restart/shutdown display is abnormal
eng33 [Mon, 11 Dec 2023 07:06:45 +0000 (15:06 +0800)]
drivers/gpu/drm/panel:fix waveshare panel software restart/shutdown display is abnormal
Fixed the screen stays white when the user restarts or shuts down

Signed-off-by: eng33 <eng33@waveshare.com>
3 months agoconfigs: Add XILLYBUS support modules
Phil Elwell [Tue, 12 Dec 2023 13:45:20 +0000 (13:45 +0000)]
configs: Add XILLYBUS support modules

See: https://github.com/raspberrypi/linux/issues/5786

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agodrivers/pinctrl/bcm/Kconfig: Fix BCM2712 help
Leon Anavi [Tue, 12 Dec 2023 11:53:37 +0000 (13:53 +0200)]
drivers/pinctrl/bcm/Kconfig: Fix BCM2712 help

Replace "Broadcom BCM2835 GPIO" with "Broadcom BCM2712 PINCONF"
in the help message. This work was sponsored by GOVCERT.LU.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
3 months agobcm2835-sdhost: Fail gracefully with bad dtb
Phil Elwell [Mon, 11 Dec 2023 11:20:28 +0000 (11:20 +0000)]
bcm2835-sdhost: Fail gracefully with bad dtb

The logging timestamps depend on the existence of a bcm2835-system-timer
node. If this node doesn't exist, leave the logging disabled rather than
crashing.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoARM: dts: bcm2712: PWM references include polarity
Phil Elwell [Fri, 8 Dec 2023 15:29:38 +0000 (15:29 +0000)]
ARM: dts: bcm2712: PWM references include polarity

Increase #pwm-cells to 3 to allow for the extra polarity word.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agooverlays: rpi-poe: Add PWM polarity value
Phil Elwell [Fri, 8 Dec 2023 15:16:39 +0000 (15:16 +0000)]
overlays: rpi-poe: Add PWM polarity value

Newer kernels expect PWM references to include a polarity value as the
third parameter.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agodwc_otg: Avoid the use of align_buf for short packets
Dom Cobley [Thu, 7 Dec 2023 17:30:53 +0000 (17:30 +0000)]
dwc_otg: Avoid the use of align_buf for short packets

Recent kernels (from 6.5) fail to boot on Pi0-3.

This has been tracked down to the call to:
ret = usb_get_std_status(hdev, USB_RECIP_DEVICE, 0, &hubstatus);

returning garbage in hubstatus (it gets the uninitialised contents of
a kmalloc buffer that is not overwritten as expected).

As we don't have strong evidence that this code path has ever worked,
and it is causing a clear problem currently, lets disable it to
allow wider use of newer kernels.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
3 months agoconfigs: rpi: Compile TSC2007 as module
Timon [Thu, 7 Dec 2023 21:31:52 +0000 (22:31 +0100)]
configs: rpi: Compile TSC2007 as module

Compile the TSC2007 touchscreen driver as a module
and enable the optional IIO module.

Signed-off-by: Timon Skerutsch <kernel@diodes-delight.com>
3 months agomedia: rp1: cfe: Improve link validation for metadata
Tomi Valkeinen [Tue, 3 Oct 2023 11:29:44 +0000 (14:29 +0300)]
media: rp1: cfe: Improve link validation for metadata

Improve the link validation for metadata by:
- Allowing capture buffers that are larger than the incoming frame
  (instead of requiring exact match).

- Instead of assuming that a metadata unit ("pixel") is 8 bits, use
  find_format_by_code() to get the format and use the bit depth from
  there. E.g. bit depth for RAW10 metadata will be 10 bits, when we
  move to the upstream metadata formats.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: fe: Use standard link_validate
Tomi Valkeinen [Tue, 3 Oct 2023 11:34:43 +0000 (14:34 +0300)]
media: rp1: fe: Use standard link_validate

The current pisp_fe_link_validate() skips some important checks. Let's
rather use the standard v4l2_subdev_link_validate_default() as the
link_validate hook.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: csi2: Use standard link_validate
Tomi Valkeinen [Tue, 3 Oct 2023 10:59:02 +0000 (13:59 +0300)]
media: rp1: csi2: Use standard link_validate

The current csi2_link_validate() skips some important checks. Let's
rather use the standard v4l2_subdev_link_validate_default() as the
link_validate hook.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: Drop LE handling
Tomi Valkeinen [Tue, 16 May 2023 12:51:54 +0000 (15:51 +0300)]
media: rp1: Drop LE handling

The driver registers for line-end interrupts, but never uses them. This
just causes extra interrupt load, with more complexity in the driver.

Drop the LE handling. It can easily be added back if later needed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: cfe: Dual purpose video nodes
Tomi Valkeinen [Wed, 27 Sep 2023 14:18:09 +0000 (17:18 +0300)]
media: rp1: cfe: Dual purpose video nodes

The RP1 CSI-2 DMA can capture both video and metadata just fine, but at
the moment the video nodes are only set to support either video or
metadata.

Make the changes to support both video and metadata. This mostly means
tracking both video format and metadata format separately for each video
node, and using vb2_queue_change_type() to change the vb2 queue type
when needed.

Briefly, this means that the user can get/set both video and meta
formats to a single video node. The vb2 queue buffer type will be
changed when the user calls REQBUFS or CREATE_BUFS ioctls. This buffer
type will be then used as the "mode" for the video node when the user
starts the streaming, and based on that either the video or the meta
format will be used.

A bunch of macros are added (node_supports_xxx()), which tell if a node
can support a particular mode, whereas the existing macros
(is_xxx_node()) will tell if the node is currently in a particular mode.
Note that the latter will only work correctly between the start of the
streaming and the end of the streaming, and thus should be only used in
those code paths.

However, as the userspace (libcamera) does not support dual purpose
video nodes, for the time being let's keep the second video node as
V4L2_CAP_META_CAPTURE only to keep the userspace working.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: cfe: Add is_image_node()
Tomi Valkeinen [Fri, 22 Sep 2023 10:47:10 +0000 (13:47 +0300)]
media: rp1: cfe: Add is_image_node()

The hardware supports streaming from memory (in addition to streaming
from the CSI-2 RX), but the driver does not support this at the moment.

There are multiple places in the driver which uses
is_image_output_node(), even if the "output" part is not relevant. Thus,
in a minor preparation for the possible support for streaming from
memory, and to make it more obvious that the pieces of code are not
about the "output", add is_image_node() which will return true for both
input and output video nodes.

While at it, reformat also the metadata related macros to fit inside 80
columns.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: csi2: Use get_frame_desc to get CSI-2 VC and DT
Tomi Valkeinen [Thu, 21 Sep 2023 12:28:20 +0000 (15:28 +0300)]
media: rp1: csi2: Use get_frame_desc to get CSI-2 VC and DT

Use get_frame_desc pad op for asking the CSI-2 VC and DT from the source
device driver, instead of hardcoding to VC 0, and getting the DT from a
formats table. To keep backward compatibility with sources that do not
implement get_frame_desc, implement a fallback mechanism that always
uses VC 0, and gets the DT from the formats table, based on the CSI2's
sink pad's format.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: fe: Fix pisp_fe_pad_set_fmt()
Tomi Valkeinen [Fri, 29 Sep 2023 14:15:20 +0000 (17:15 +0300)]
media: rp1: fe: Fix pisp_fe_pad_set_fmt()

pisp_fe_pad_set_fmt() allows setting the pad formats quite freely. This
is not correct, and the function should only allow formats as supported
by the hardware. Fix this by:

Allow no format changes for FE_CONFIG_PAD and FE_STATS_PAD. They should
always be the hardcoded initial ones.

Allow setting FE_STREAM_PAD freely (but the mbus code must be
supported), and propagate the format to the FE_OUTPUT0_PAD and
FE_OUTPUT1_PAD pads.

Allow changing the mbus code for FE_OUTPUT0_PAD and FE_OUTPUT1_PAD pads
only if the mbus code is the compressed version of the sink side code.

TODO: FE supports scaling and cropping. This should be represented here
too?

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: csi2: Fix csi2_pad_set_fmt()
Tomi Valkeinen [Fri, 29 Sep 2023 13:25:10 +0000 (16:25 +0300)]
media: rp1: csi2: Fix csi2_pad_set_fmt()

The CSI-2 subdev's set_fmt currently allows setting the source and sink
pad formats quite freely. This is not right, as the CSI-2 block can only
do one of the following when processing the stream: 1) pass through as
is, 2) expand to 16-bits, 3) compress.

The csi2_pad_set_fmt() should take this into account, and only allow
changing the source side mbus code, compared to the sink side format.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: cfe: Add cfe_find_16bit_code() and cfe_find_compressed_code()
Tomi Valkeinen [Fri, 29 Sep 2023 14:14:11 +0000 (17:14 +0300)]
media: rp1: cfe: Add cfe_find_16bit_code() and cfe_find_compressed_code()

Add helper functions which, given an mbus code, return the 16-bit
remapped mbus code or the compressed mbus code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: cfe: Add missing compressed remaps
Tomi Valkeinen [Fri, 29 Sep 2023 14:14:31 +0000 (17:14 +0300)]
media: rp1: cfe: Add missing compressed remaps

16-bit bayer formats are missing compressed remap definitions. Add them.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: cfe: Add missing remaps
Tomi Valkeinen [Fri, 29 Sep 2023 13:24:14 +0000 (16:24 +0300)]
media: rp1: cfe: Add missing remaps

8-bit bayer formats are missing remap definitions. Add them.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agomedia: rp1: cfe: Expose find_format_by_pix()
Tomi Valkeinen [Fri, 29 Sep 2023 13:23:58 +0000 (16:23 +0300)]
media: rp1: cfe: Expose find_format_by_pix()

Make find_format_by_pix() accessible to other files in the driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 months agoconfigs: rpi: Compile OV64A40 and BU64754 as modules
Jacopo Mondi [Tue, 17 Oct 2023 12:41:56 +0000 (14:41 +0200)]
configs: rpi: Compile OV64A40 and BU64754 as modules

Compile both the OV64A40 and the BU64754 drivers used by the Arducam
64MP camera module based as modules in the defconfig files for

- rpi5
- rpi4
- rpi2/3
- rpi1/0

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
3 months agooverlays: Add overlay for the OV64A40 Arducam Camera Module
Jacopo Mondi [Thu, 20 Jul 2023 11:18:34 +0000 (13:18 +0200)]
overlays: Add overlay for the OV64A40 Arducam Camera Module

Arducam have integrated an Omnivision OV64A40 with a ROHM BU64754 VCM
with a Raspberry Pi compatible cable pinout.

Provide an overlay to support the module.

Also add support to the camera mux overlays.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
3 months agomedia: i2c: Add ROHM BU64754 Camera Autofocus Actuator
Kieran Bingham [Wed, 13 Sep 2023 16:53:54 +0000 (17:53 +0100)]
media: i2c: Add ROHM BU64754 Camera Autofocus Actuator

Add support for the ROHM BU64754 Motor Driver for Camera Autofocus. A
V4L2 Subdevice is registered and provides a single
V4L2_CID_FOCUS_ABSOLUTE control.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
3 months agomedia: i2c: Add driver for OmniVision OV64A40
Jacopo Mondi [Thu, 20 Jul 2023 09:44:40 +0000 (11:44 +0200)]
media: i2c: Add driver for OmniVision OV64A40

Add a driver for the OmniVision OV64A40 image sensor.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
3 months agomedia: dt-bindings: i2c: Add Rohm BU64754 bindings
Kieran Bingham [Thu, 14 Sep 2023 16:03:24 +0000 (17:03 +0100)]
media: dt-bindings: i2c: Add Rohm BU64754 bindings

Add YAML device tree bindings for the ROHM BU64754 VCM Motor Driver for
Camera Autofocus.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
3 months agomedia: dt-bindings: Add OmniVision OV64A40
Jacopo Mondi [Sun, 1 Oct 2023 11:20:12 +0000 (13:20 +0200)]
media: dt-bindings: Add OmniVision OV64A40

Add bindings for OmniVision OV64A40.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
3 months agoRevert "overlays: Add Pi 5 version of dwc2"
Phil Elwell [Tue, 5 Dec 2023 20:48:46 +0000 (20:48 +0000)]
Revert "overlays: Add Pi 5 version of dwc2"

This reverts commit 72cd5eef1825f9ab3502d0c5584b13c43ad4c840.

We don't need a special dwc2 overlay for Pi 5, with a node to limit the
DMA zone to the first 1GB, since it turns out that the USB2 controller
has a 4GB range after all.

See https://github.com/raspberrypi/linux/pull/5772

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoarm: dt: bcm2712: Correct the size of the register range for MOP
Dave Stevenson [Tue, 5 Dec 2023 18:31:25 +0000 (18:31 +0000)]
arm: dt: bcm2712: Correct the size of the register range for MOP

The Mop covers 0x28 bytes of registers, so ensure the range is
defined appropriately.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodrm/vc4: Mop and moplet have different register offsets for high addr
Dave Stevenson [Tue, 5 Dec 2023 18:29:34 +0000 (18:29 +0000)]
drm/vc4: Mop and moplet have different register offsets for high addr

MOP uses register offset 0x24 for the high bits of the address,
whilst Moplet uses 0x1c.

Handle this difference between the block types.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodrm/vc4: Correct HVS muxing setup for the moplet
Dave Stevenson [Tue, 5 Dec 2023 18:28:19 +0000 (18:28 +0000)]
drm/vc4: Correct HVS muxing setup for the moplet

The moplet registers as VC4_ENCODER_TYPE_TXP1 and can be
fed from mux output 2 of HVS channel 1.

Correct the option which checked for VC4_ENCODER_TYPE_TXP0

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodts: bcm2712: put usb under /axi not /soc
Jonathan Bell [Tue, 5 Dec 2023 16:55:17 +0000 (16:55 +0000)]
dts: bcm2712: put usb under /axi not /soc

On 2712, the DWC USB controller is no longer attached to the Videocore
30-bit bus with its associated aliases, and can see the bottom 4GB of
RAM directly.

Ideally it should make use of IOMMU6 but for now software bounce buffers
get it working.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
3 months agooverlays: ADS1115: allow specification of the i2c bus
JinShil [Tue, 28 Nov 2023 08:05:44 +0000 (17:05 +0900)]
overlays: ADS1115: allow specification of the i2c bus

3 months agooverlays: example overlay for using panel-dsi on RPi
Timon Skerutsch [Mon, 13 Nov 2023 21:52:35 +0000 (22:52 +0100)]
overlays: example overlay for using panel-dsi on RPi

Analog to the generic panel-dpi overlay to use panel-dsi with dtparam
to not require a panel specific overlay for simple use cases that
do not require setting more niche DSI modes.

Signed-off-by: Timon Skerutsch <kernel@diodes-delight.com>
3 months agodt-bindings: display: panel-dsi bindings
Timon Skerutsch [Mon, 13 Nov 2023 21:53:22 +0000 (22:53 +0100)]
dt-bindings: display: panel-dsi bindings

Bindings for the panel-dsi specific additions to panel-simple.
Allow for DSI specific bus settings and panel timing
to be define in devicetree. Very similar to panel-dpi.

Signed-off-by: Timon Skerutsch <kernel@diodes-delight.com>
3 months agodrm/panel: add panel-dsi
Timon Skerutsch [Mon, 13 Nov 2023 21:53:12 +0000 (22:53 +0100)]
drm/panel: add panel-dsi

Equivalent to panel-dpi for configuring a simple DSI panel with
device tree side timings and bus settings.
Motiviation is the same as for panel-dpi of wanting to support
new simple panels without needing to patch the kernel.

Signed-off-by: Timon Skerutsch <kernel@diodes-delight.com>
3 months agobcm270x.dtsi: Fix bad merge
Phil Elwell [Fri, 1 Dec 2023 16:09:05 +0000 (16:09 +0000)]
bcm270x.dtsi: Fix bad merge

This explains the complaints about alias names from dtc.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoASoC: Adds support for TAS575x to the pcm512x driver
Joerg Schambacher [Fri, 29 Sep 2023 15:07:20 +0000 (17:07 +0200)]
ASoC: Adds support for TAS575x to the pcm512x driver

commit 1f817805262c2c34142291da376d4932d3c493bc upstream.

Enables the existing pcm512x driver to control the almost
compatible TAS5754 and -76 amplifers. Both amplifiers support
only an I2C interface and the internal PLL must be always
on to provide necessary clocks to the amplifier section.
Tested on TAS5756 with support from Andreas Arbesser-Krasser
from Texas Instruments <a-krasser@ti.com>

Signed-off-by: Joerg Schambacher <joerg.hifiberry@gmail.com>
Link: https://lore.kernel.org/r/20230929150722.405415-1-joerg.hifiberry@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoASoC: pcm512x: Adds bindings for TAS575x devices
Joerg Schambacher [Fri, 29 Sep 2023 15:05:55 +0000 (17:05 +0200)]
ASoC: pcm512x: Adds bindings for TAS575x devices

commit 736b884a7b68c4eeb66dbf75b97c8ec9b9eeff7f upstream.

The TAS5754/6 power amplifiers use the same pcm512x driver with
only minor restictions described in the bindings document.

Signed-off-by: Joerg Schambacher <joerg.hifiberry@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230929150555.405388-1-joerg.hifiberry@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 months agoREADME: show rpi-6.6.y build status
Phil Elwell [Thu, 30 Nov 2023 17:16:40 +0000 (17:16 +0000)]
README: show rpi-6.6.y build status

Replace rpi-6.5.y with rpi-6.6.y in the build status list.

3 months agoASoC: dwc: Fix full-duplex mode
Phil Elwell [Tue, 28 Nov 2023 12:14:03 +0000 (12:14 +0000)]
ASoC: dwc: Fix full-duplex mode

Configuration of the DMA register was carelessly zeroing bits that may
used by a stream in the other direction. Preserve them instead.

See: https://github.com/raspberrypi/linux/issues/5741

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoarch: arm: configs: add HID_NINTENDO to rpi defconfigs
Ryan McClelland [Tue, 28 Nov 2023 00:55:08 +0000 (16:55 -0800)]
arch: arm: configs: add HID_NINTENDO to rpi defconfigs

Signed-off-by: Ryan McClelland <rymcclel@gmail.com>
3 months agoASoC: dwc: Permit sample rates up to 384kHz
Phil Elwell [Mon, 27 Nov 2023 12:16:04 +0000 (12:16 +0000)]
ASoC: dwc: Permit sample rates up to 384kHz

The BCM2835 I2S block advertises clock rates up to 384kHz, and there's
no reason why RP1's DWC I2S block shouldn't do the same.

See: https://github.com/raspberrypi/linux/issues/5748

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agodtoverlays: Add option for cam0 to camera-mux-Nport overlays
Dave Stevenson [Mon, 27 Nov 2023 14:50:58 +0000 (14:50 +0000)]
dtoverlays: Add option for cam0 to camera-mux-Nport overlays

Seeing as the mux can be connected to either CAM/DISP1 or
CAM/DISP0 on a Pi5, add a cam0 override to allow configuration
of which is used. Default (as with all camera overlays) is CAM/DISP1.

The overlay does NOT update the camera regulator used by all the
sensors as doing so would be a nightmare. The Arducam mulitplexer
boards these overlays are initially supporting seem to tie the
regulator GPIO for all the sensors high anyway.
If it was viewed as necessary, then creating an additional
regulator that listed cam[01]_reg as the parent should work.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodrivers: media: cfe: Find the source pads on the sensor entity
Dave Stevenson [Fri, 24 Nov 2023 14:29:57 +0000 (14:29 +0000)]
drivers: media: cfe: Find the source pads on the sensor entity

The driver was assuming that pad 0 on the sensor entity was the
appropriate source pad, but this isn't necessarily the case.
With video-mux, it has the sink pads first, and then the source
pad as the last one.

Iterate through the sensor pads to find the relevant source pads.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodrm: panel: jdi-lt070me05000: Add prepare_upstream_first flag
Dave Stevenson [Wed, 9 Aug 2023 20:04:40 +0000 (21:04 +0100)]
drm: panel: jdi-lt070me05000: Add prepare_upstream_first flag

The panel driver wants to send DCS commands from the prepare
hook, therefore the DSI host wants to be pre_enabled first.
Set the flag to achieve this.

https://forums.raspberrypi.com/viewtopic.php?t=354708

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agooverlays: hat_map: Add pisound mapping
Phil Elwell [Fri, 24 Nov 2023 13:57:09 +0000 (13:57 +0000)]
overlays: hat_map: Add pisound mapping

See: https://github.com/raspberrypi/linux/issues/5741

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agooverlays: i2c-sensor: Add adt7410 support
Kenny [Thu, 23 Nov 2023 00:22:37 +0000 (16:22 -0800)]
overlays: i2c-sensor: Add adt7410 support

See https://github.com/raspberrypi/linux/pull/5738

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoconfigs: Add the adt7410 module
Kenny [Thu, 23 Nov 2023 00:22:37 +0000 (16:22 -0800)]
configs: Add the adt7410 module

Signed-off-by: Kenny <aSmig+github@romhat.net>
3 months agodrm: vc4: Block swiotlb bounce buffers being imported as dmabuf
Dave Stevenson [Wed, 22 Nov 2023 19:17:44 +0000 (19:17 +0000)]
drm: vc4: Block swiotlb bounce buffers being imported as dmabuf

The dmabuf import already checks that the backing buffer is contiguous
and rejects it if it isn't. vc4 also requires that the buffer is
in the bottom 1GB of RAM, and this is all correctly defined via
dma-ranges.

However the kernel silently uses swiotlb to bounce dma buffers
around if they are in the wrong region. This relies on dma sync
functions to be called in order to copy the data to/from the
bounce buffer.

DRM is based on all memory allocations being coherent with the
GPU so that any updates to a framebuffer will be acted on without
the need for any additional update. This is fairly fundamentally
incompatible with needing to call dma_sync_ to handle the bounce
buffer copies, and therefore we have to detect and reject mappings
that use bounce buffers.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agoinput: goodix: Include I2C details in names for the devices
Dave Stevenson [Wed, 8 Nov 2023 16:20:27 +0000 (16:20 +0000)]
input: goodix: Include I2C details in names for the devices

libinput uses the input device name alone. If you have two
identical input devices, then there is no way to differentiate
between them, and in the case of touchscreens that means no
way to associate them with the appropriate display device.

Add the I2C bus and address to the start of the input device
name so that the name is always unique within the system.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agoinput: edt-ft5x06: Include I2C details in names for the devices
Dave Stevenson [Wed, 8 Nov 2023 15:50:39 +0000 (15:50 +0000)]
input: edt-ft5x06: Include I2C details in names for the devices

libinput uses the input device name alone. If you have two
identical input devices, then there is no way to differentiate
between them, and in the case of touchscreens that means no
way to associate them with the appropriate display device.

Add the I2C bus and address to the start of the input device
name so that the name is always unique within the system.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodrm: vc4: Free the dlist alloc immediately if it never hit the hw
Dave Stevenson [Wed, 22 Nov 2023 18:36:54 +0000 (18:36 +0000)]
drm: vc4: Free the dlist alloc immediately if it never hit the hw

atomic_check creates a state, and allocates the dlist memory for
it such that atomic_flush can not fail.

On destroy that dlist allocation was being put in the stale list,
even though it had never been programmed into the hardware,
therefore doing lots of atomic_checks could consume all the dlist
memory and fail.

If the dlist has never been programmed into the hardware, then
free it immediately.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodrm/bridge: display-connector: Select DRM_KMS_HELPER
Dave Stevenson [Fri, 17 Nov 2023 14:50:11 +0000 (14:50 +0000)]
drm/bridge: display-connector: Select DRM_KMS_HELPER

Commit 7cd70656d128 ("drm/bridge: display-connector: implement
bus fmts callbacks") added use of drm_atomic_helper_bridge_*
functions, but didn't select the dependency of DRM_KMS_HELPER.
If nothing else selected that dependency it resulted in a
build failure.

Select the missing dependency.

Fixes: 7cd70656d128 ("drm/bridge: display-connector: implement bus fmts callbacks")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodrm/vc4: Drop planes that are completely off-screen
Dave Stevenson [Fri, 17 Nov 2023 14:43:44 +0000 (14:43 +0000)]
drm/vc4: Drop planes that are completely off-screen

It is permitted for a plane to be configured such that none
of it is on-screen via either negative dest rectangle X,Y
offset, or just an offset that is greater than the crtc
dimensions.

These planes were resized via drm_atomic_helper_check_plane_state
such that the source rectangle had a zero width or height, but
they still created a dlist entry even though they contributed
no pixels. In the case of vc6_plane_mode_set, that it could result
in negative values being written into registers, which caused
incorrect behaviour.

Drop planes that result in a source width or height of 0 pixels
to avoid the incorrect rendering.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agomedia/i2c: ov7251: Switch from V4L2_CID_GAIN to V4L2_CID_ANALOGUE_GAIN
Dave Stevenson [Tue, 14 Nov 2023 18:36:19 +0000 (18:36 +0000)]
media/i2c: ov7251: Switch from V4L2_CID_GAIN to V4L2_CID_ANALOGUE_GAIN

The mainline driver has implemented analogue gain using the control
V4L2_CID_GAIN instead of V4L2_CID_ANALOGUE_GAIN.

libcamera requires V4L2_CID_ANALOGUE_GAIN, and therefore fails.

Update the driver to use V4L2_CID_ANALOGUE_GAIN.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agodrm/vc4: vec: Add the margin properties to the connector
Dave Stevenson [Fri, 24 Nov 2023 16:22:10 +0000 (16:22 +0000)]
drm/vc4: vec: Add the margin properties to the connector

All the handling for the properties was present, but they
were never attached to the connector to allow userspace
to change them.

Add them to the connector.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 months agooverlays: README: Fix cut-and-paste errors
Phil Elwell [Tue, 21 Nov 2023 15:08:38 +0000 (15:08 +0000)]
overlays: README: Fix cut-and-paste errors

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoconfigs: bcm2712_defconfig: Change LOCALVERSION
Phil Elwell [Tue, 21 Nov 2023 11:54:28 +0000 (11:54 +0000)]
configs: bcm2712_defconfig: Change LOCALVERSION

Debian seem to have rules about the content of the LOCALVERSION config
setting. Specifically, the underscore is not accepted.

Change it to a dash/hyphen.

See: https://github.com/raspberrypi/linux/issues/5719

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoRevert "hwrng: bcm2835 - sleep more intelligently"
Dom Cobley [Tue, 21 Nov 2023 12:55:03 +0000 (12:55 +0000)]
Revert "hwrng: bcm2835 - sleep more intelligently"

This reverts commit 6a825ed68f75bd768e31110ba825b75c5c09cf2d.

3 months agoASoC: dwc: Remove check in set_bclk_ratio handling
Phil Elwell [Mon, 20 Nov 2023 15:17:34 +0000 (15:17 +0000)]
ASoC: dwc: Remove check in set_bclk_ratio handling

A check added to dw_i2s_set_bclk_ratio that the data format is
consistent with the ratio seems reasonable but breaks when the
ratio is changed before the format. Remove the check - it is
unnecessary.

See: https://github.com/raspberrypi/linux/issues/5724
Fixes: 9c6694c24f26 ("ASOC: dwc: Fix 16-bit audio handling")

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agodrivers: media: pisp_be: Add mono and 48-bit RGB pixel format support
Naushir Patuck [Thu, 16 Nov 2023 14:29:47 +0000 (14:29 +0000)]
drivers: media: pisp_be: Add mono and 48-bit RGB pixel format support

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
3 months agodrivers: media: cfe: Add 16-bit and compressed mono format support
Naushir Patuck [Thu, 16 Nov 2023 14:28:55 +0000 (14:28 +0000)]
drivers: media: cfe: Add 16-bit and compressed mono format support

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
3 months agoinclude: uapi: v4l2: Add additional pixel formats for use with PiSP
Naushir Patuck [Thu, 16 Nov 2023 14:25:39 +0000 (14:25 +0000)]
include: uapi: v4l2: Add additional pixel formats for use with PiSP

Add the following formats:

- V4L2_PIX_FMT_RGB48/V4L2_PIX_FMT_BGR48
  48-bit RGB where each colour sample is 16-bits.

- V4L2_PIX_FMT_PISP_COMP1_MONO/V4L2_PIX_FMT_PISP_COMP2_MONO
  16-bit to 8-bit pisp compressed monochrome pixel format.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
3 months agow1: Disable kernel log spam
Phil Elwell [Mon, 20 Nov 2023 14:46:14 +0000 (14:46 +0000)]
w1: Disable kernel log spam

See: https://forums.raspberrypi.com/viewtopic.php?p=2159344

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agooverlays: ov5647: cam0 mode should use cam0_reg
Phil Elwell [Mon, 20 Nov 2023 10:16:10 +0000 (10:16 +0000)]
overlays: ov5647: cam0 mode should use cam0_reg

When the cam0 parameter is used, the vcm should be updated to refer to
the cam0 regulator.

See: https://github.com/raspberrypi/linux/issues/5722

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agooverlays: ov5647: Regularise vcm node label name
Phil Elwell [Mon, 20 Nov 2023 10:15:15 +0000 (10:15 +0000)]
overlays: ov5647: Regularise vcm node label name

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoconfigs: Add the drivetemp module
Phil Elwell [Fri, 17 Nov 2023 19:23:15 +0000 (19:23 +0000)]
configs: Add the drivetemp module

See: https://github.com/raspberrypi/linux/issues/5670

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agooverlays: imx296: Fix cam port override for regulators
Naushir Patuck [Wed, 15 Nov 2023 08:25:11 +0000 (08:25 +0000)]
overlays: imx296: Fix cam port override for regulators

The override was missing/incorrect for the regulator labels.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
3 months agodrivers: media: cfe: Don't confuse MHz and Mbps
Naushir Patuck [Wed, 8 Nov 2023 10:05:05 +0000 (10:05 +0000)]
drivers: media: cfe: Don't confuse MHz and Mbps

The driver was interchaning these units when talking about link rate.
Fix this to avoid confusion. Apart from the logging message change,
there is no function change in this commit.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
3 months agoRevert "media: i2c: imx296: Add 2ms delay after releasing standby"
Nick Hollinghurst [Tue, 14 Nov 2023 16:03:54 +0000 (16:03 +0000)]
Revert "media: i2c: imx296: Add 2ms delay after releasing standby"

This reverts commit ecbc04aa0c2e7c8879764c9d2c769ecc74fd9093
which duplicated 5fb3b300557d6a6902e7321f42fdabb8c09eef54

Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
3 months agodrivers: media: imx708: Adjust broken line correction parameter
Nick Hollinghurst [Wed, 8 Nov 2023 10:57:45 +0000 (10:57 +0000)]
drivers: media: imx708: Adjust broken line correction parameter

In full-resolution mode, the LPF_INTENSITY_EN and LPF_INTENSITY
registers control Quad Bayer Re-mosaic broken line correction.
Expose this as a module parameter "qbc_adjust": zero disables
the correction and values in the range 2 to 5 set its strength.

There is a trade-off between coloured and monochrome patterns.
The previous fixed value 4 could produce ladder/spots artefacts
in coloured textures. The new default value 2 may suit a wider
range of scenes.

Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
3 months agoASoC: bcm: audioinjector_octo: Add soundcard "owner"
Phil Elwell [Wed, 8 Nov 2023 19:17:33 +0000 (19:17 +0000)]
ASoC: bcm: audioinjector_octo: Add soundcard "owner"

See: https://github.com/raspberrypi/linux/issues/5697

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
3 months agoarm: dts: change RP1 SDHCI controller compatible string
Jonathan Bell [Wed, 8 Nov 2023 16:14:25 +0000 (16:14 +0000)]
arm: dts: change RP1 SDHCI controller compatible string

Also add a sdio-pi5 overlay which enables mmc0 on GPIOs 22-27, as was
possible with earlier models of Pi.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
3 months agodrivers: mmc: sdhci-of-dwcmshc: add RP1 dt ID and quirks
Jonathan Bell [Wed, 8 Nov 2023 16:12:59 +0000 (16:12 +0000)]
drivers: mmc: sdhci-of-dwcmshc: add RP1 dt ID and quirks

Differentiate the RP1 variant of the Designware MSHC controller(s).

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
3 months agodt-bindings: mmc: sdhci-of-dwcmhsc: Add Raspberry Pi RP1 support
Jonathan Bell [Wed, 8 Nov 2023 16:10:13 +0000 (16:10 +0000)]
dt-bindings: mmc: sdhci-of-dwcmhsc: Add Raspberry Pi RP1 support

The DWC MSHC controller on RP1 needs differentiating from the generic
version.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
3 months agodrivers: mmc: sdhci: add SPURIOUS_INT_RESP quirk
Jonathan Bell [Wed, 8 Nov 2023 11:52:16 +0000 (11:52 +0000)]
drivers: mmc: sdhci: add SPURIOUS_INT_RESP quirk

Certain controllers (dwc-mshc) generate timeout conditions separately to
command-completion conditions, where the end result is interrupts are
separated in time depending on the current SDCLK frequency.

This causes spurious interrupts if SDCLK is slow compared to the CPU's
ability to process and return from interrupt. This occurs during card
probe with an empty slot where all commands that would generate a
response time out.

Add a quirk to squelch command response interrupts when a command
timeout interrupt is received.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
3 months agodefconfigs: Drop FB_UDL from all Pi defconfigs
Dave Stevenson [Wed, 8 Nov 2023 12:04:20 +0000 (12:04 +0000)]
defconfigs: Drop FB_UDL from all Pi defconfigs

CONFIG_FB_UBL is the fbdev driver for DisplayLink USB displays.
CONFIG_UDL is the DRM driver for DisplayLink USB displays.

Both attach themselves to the same USB device alias, so both
get loaded for any attached display. You now have 2 drivers for
the same hardware, and a race as to which one will load.

DRM emulates the framebuffer interface, so disable the fbdev
driver.

https://github.com/raspberrypi/bookworm-feedback/issues/133

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>