- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.3k
 
hd44780-i2c-lcd: new driver and overlay #4286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: rpi-5.12.y
Are you sure you want to change the base?
Conversation
| 
           Dear RPI/Linux devs, I would like to offer a small new driver+overlay to work with the very common HD44780 LCD module over I2C. As I'm not a kernel developer, I'm certain there will be some needed changes - feedback and suggestions very welcomed.  | 
    
Possible fixed upstream by 'net: bcmgenet: keep MAC in reset until PHY is up' Signed-off-by: popcornmix <[email protected]>
Adds a format that is 3 10bit YUV 4:2:0 samples packed into a 32bit work (with 2 spare bits). Supported on Broadcom BCM2711 chips. Signed-off-by: Dave Stevenson <[email protected]>
Taken from https://patchwork.linuxtv.org/patch/60728/ Changes (mainly documentation) have been requested. HEVC has a scaling matrix concept. Add support for it. Signed-off-by: Jernej Skrabec <[email protected]>
From https://patchwork.linuxtv.org/patch/60725/ Changes requested, but mainly docs. If HEVC frame consists of multiple slices, segment address has to be known in order to properly decode it. Add segment address field to slice parameters. Signed-off-by: Jernej Skrabec <[email protected]>
Adds V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT define. Signed-off-by: Dave Stevenson <[email protected]>
WPP can allow greater parallelism within the decode, but needs offset information to be passed in. Adds num_entry_point_offsets and entry_point_offset_minus1 to v4l2_ctrl_hevc_slice_params. This is based on Jernej Skrabec's patches for cedrus which implement the same feature. Signed-off-by: Dave Stevenson <[email protected]>
Some of the Broadcom codec blocks use a column based YUV4:2:0 image format, so add the documentation and defines for both 8 and 10 bit versions. Signed-off-by: Dave Stevenson <[email protected]>
…nish Allow the capture buffer to be detached from a v4l2 request job such that another job can start before the capture buffer is returned. This allows h/w codecs that can process multiple requests at the same time to operate more efficiently. Signed-off-by: John Cox <[email protected]>
Adds a binding for the HEVC decoder found on the BCM2711 / Raspberry Pi 4. Signed-off-by: Dave Stevenson <[email protected]>
This driver is for the HEVC/H265 decoder block on the Raspberry Pi 4, and conforms to the V4L2 stateless decoder API. Signed-off-by: John Cox <[email protected]>
When the MMC isn't plugged in, the driver will spam the console which is pretty annoying when using NFS. Signed-off-by: Maxime Ripard <[email protected]>
The firmare running on the RPi VideoCore can be used to discover and change the various clocks running in the BCM2711. Since devices will need to use them through the DT, let's add a pretty simple binding. Cc: Michael Turquette <[email protected]> Cc: Stephen Boyd <[email protected]> Cc: Rob Herring <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Maxime Ripard <[email protected]>
The HDMI controllers found in the BCM2711 SoC need some adjustments to the bindings, especially since the registers have been shuffled around in more register ranges. Cc: Rob Herring <[email protected]> Cc: [email protected] Signed-off-by: Maxime Ripard <[email protected]>
framebuffer_check was computing a minimum pitch value and ensuring that the provided value was greater than this. That check is only valid if the format is linear. Signed-off-by: Dave Stevenson <[email protected]>
Signed-off-by: Phil Elwell <[email protected]>
Commit f3186dd ("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: 83b2a8f ("spi: spidev: Fix CS polarity if GPIO descriptors are used") Fixes: f3186dd ("spi: Optionally use GPIO descriptors for CS GPIOs") Signed-off-by: Phil Elwell <[email protected]> SQUASH: spi: Demote SPI_CS_HIGH warning to KERN_DEBUG 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 <[email protected]>
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 <[email protected]>
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 <[email protected]> Signed-off-by: Naushir Patuck <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]> Reviewed-by: Jacopo Mondi <[email protected]> Reviewed-by: Naushir Patuck <[email protected]>
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 <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Reviewed-by: Jacopo Mondi <[email protected]> Reviewed-by: Naushir Patuck <[email protected]>
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 <[email protected]>
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 <[email protected]>
We are reserving controls for the new bcm2835-isp driver. Signed-off-by: Naushir Patuck <[email protected]>
bcmn2835_isp is a platform driver dependent on vchiq, therefore add the load/unload functions for it to vchiq. Signed-off-by: Naushir Patuck <[email protected]>
1. Reduce the delay between RELAY1 and RELAY2 to 1000ms. 2. Rename the states to simplify LED control by an external script. 3. Claim all the required GPIOs, enabling pull-ups on the input. Signed-off-by: Phil Elwell <[email protected]>
Signed-off-by: Phil Elwell <[email protected]>
Neither CM4 nor Pi 400 have appeared upstream yet, and as a result they have missed out on improvements to the Pi 4B platform. Signed-off-by: Phil Elwell <[email protected]> ARM: dts: Bring bcm2711-rpi-400.dts up-to-date Pi 400 support has not appeared upstream yet, and as a result it has missed out on improvements to the other Pi 4 platforms. Signed-off-by: Phil Elwell <[email protected]>
This reverts commit 0b387d5.
warning: attribute declaration must precede definition
warning: variable 'retval' is used uninitialized whenever 'if' condition is false
warning: address of array 'desc->wMaxPacketSize' will always evaluate to 'true' The wMaxPacketSize field is actually a two element array which content should be accessed via the UGETW macro.
Add unique names to the individual dac coded drivers Remove some of the codec controls that are not used. Signed-off-by: Paul Hermann <[email protected]> # Conflicts: # sound/soc/bcm/allo-piano-dac-plus.c
Commit 158e800 upstream A test was added to the probe function to ensure the device was actually connected and working before successfully completing a probe. If the device was actually there, but the I2C bus was not ready yet for whatever reason, the probe fails permanently. Change the probe so that we defer the probe on a regmap read failure so that we try the probe again when the dependent drivers are potentially loaded. This should not affect the case where the device truly isn't present because the probe will never successfully complete. Fixes: 2aa916e ("sc16is7xx: Read the LSR register for basic device presence check") Cc: [email protected] Signed-off-by: Annaliese McDermond <[email protected]> Link: https://lore.kernel.org/r/010101787f9c3fd8-c1815c00-2d6b-4c85-a96a-a13e68597fda-000000@us-west-2.amazonses.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
Commit 1ca1156 upstream Clock registration must be performed before the component is registered. aic32x4_component_probe attempts to get all the clocks right off the bat. If the component is registered before the clocks there is a race condition where the clocks may not be registered by the time aic32x4_componet_probe actually runs. Fixes: d1c859d ("ASoC: codec: tlv3204: Increased maximum supported channels") Cc: [email protected] Signed-off-by: Annaliese McDermond <[email protected]> Link: https://lore.kernel.org/r/0101017889850206-dcac4cce-8cc8-4a21-80e9-4e4bef44b981-000000@us-west-2.amazonses.com Signed-off-by: Mark Brown <[email protected]>
Commit 29654ed upstream AIC32X4_REFPOWERUP was added as a register, but the maximum register value in the regmap and regmap range was not correspondingly increased. This caused an error when this register was attempted to be written. Fixes: ec96690 ("ASoC: tlv320aic32x4: Enable fast charge") Cc: [email protected] Signed-off-by: Annaliese McDermond <[email protected]> Link: https://lore.kernel.org/r/0101017889851cab-ce60cfdb-d88c-43d8-bbd2-7fbf34a0c912-000000@us-west-2.amazonses.com Signed-off-by: Mark Brown <[email protected]>
This small driver creates an LCD device (/dev/lcd) for HD44780 LCD over I2C. These modules typically use the PCF8574 chip to convert I2C input to HD44780's SPI protocol. signed-off-by: Assaf Gordon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The driver looks plausible, and apart from a few minor niggles with the README etc. the overlay looks good. The real problem is that this driver should be submitted upstream - it is not Pi-specific in any way, and we can't take on maintenance of random bits of code like this.
| display_width Width of the display in characters | ||
| 
               | 
          ||
| 
               | 
          ||
| Name: hd44780-i2c-lcd | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section should come before hd44780-lcd.
| 
               | 
          ||
| Name: hd44780-i2c-lcd | ||
| Info: Configures an HD44780 compatible LCD display over I2C bus. | ||
| These LCD module typically use the PCF8574D chip to convert I2C to | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line starts with a hard TAB character - it should be 8 spaces.
| @@ -0,0 +1,32 @@ | |||
| /dts-v1/; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overlay needs an entry in the Makefile, otherwise it won't be compiled.
| 
           checkpatch has a fair few complaints too. Best to fix those before considering submitting upstream. (Note that that was  But also isn't the HD44780 over I2C is actually just an HD44780 with a PCF8574 I2C GPIO chip strapped to the front? Rereading your overlay readme confirms that.  | 
    
| 
           Just noticed this and I've been planing on submitting this overlay someday, but just haven't had the time to dig into how to do that properly. As noted above, a separate driver is not needed as you can just plug into into the existing one.  | 
    
| 
           Thanks - that looks like a better solution since the PCF8574 driver exists and is more fully featured.  | 
    
496bd6f    to
    8f357c9      
    Compare
  
    7818498    to
    94535fc      
    Compare
  
    | 
           @agordon Are you happy to use the alternative overlay suggested above? Rename it to match your overlay and README entry, then drop your driver and the associated Kconfig and Makefile changes.  | 
    
| 
           Hi, 
 I could not get this overlay to work, but it could be just me. The  I would say, that kernel developers split the old hd44780 driver into two parts -  However, if you are able to make this alternative overlay work - then by all means, I'm happy to use it (perhaps adding some documentation could be useful?).  | 
    
58483d2    to
    cc33d27      
    Compare
  
    06ba288    to
    ed4c467      
    Compare
  
    
This small driver creates an LCD device (/dev/lcd)
for HD44780 LCD over I2C. These modules typically use the PCF8574 chip
to convert I2C input to HD44780's SPI protocol.
signed-off-by: Assaf Gordon [email protected]