Re: [PATCH v16 0/2] rcar-csi2: add Renesas R-Car MIPI CSI-2
On Tue, May 15, 2018 at 07:50:45AM +0300, Laurent Pinchart wrote: > Hi Niklas, > > On Tuesday, 15 May 2018 03:56:33 EEST Niklas Söderlund wrote: > > Hi, > > > > This is the latest incarnation of R-Car MIPI CSI-2 receiver driver. It's > > based on top of the media-tree and are tested on Renesas Salvator-X and > > Salvator-XS together with adv7482 and the now in tree rcar-vin driver :-) > > > > I hope this is the last incarnation of this patch-set, I do think it is > > ready for upstream consumption :-) > > So do I. Even though you dropped Hans' reviewed-by tag due to changes in the > hardware initialization code, I think the part that Hans cares about the most > is the V4L2 API implementation, so I believe his review still applies. In my > opinion the series has received the necessary review. > > Hans, would you like to take this through your tree, or should we send a pull > request directly to Mauro ? I'd like the two patches to be merged in v4.18 if > possible. I've applied the patches to my tree as discussed with Hans previously. -- Sakari Ailus sakari.ai...@linux.intel.com
Re: [PATCH v16 0/2] rcar-csi2: add Renesas R-Car MIPI CSI-2
Hi Niklas, On Tuesday, 15 May 2018 03:56:33 EEST Niklas Söderlund wrote: > Hi, > > This is the latest incarnation of R-Car MIPI CSI-2 receiver driver. It's > based on top of the media-tree and are tested on Renesas Salvator-X and > Salvator-XS together with adv7482 and the now in tree rcar-vin driver :-) > > I hope this is the last incarnation of this patch-set, I do think it is > ready for upstream consumption :-) So do I. Even though you dropped Hans' reviewed-by tag due to changes in the hardware initialization code, I think the part that Hans cares about the most is the V4L2 API implementation, so I believe his review still applies. In my opinion the series has received the necessary review. Hans, would you like to take this through your tree, or should we send a pull request directly to Mauro ? I'd like the two patches to be merged in v4.18 if possible. > * Changes since v15 > - Merge struct phtw_mbps and struct phypll_hsfreqrange into a new struct > which maps a mpbs value to a register value, struct rcsi2_mbps_reg. > - Reduced number of loops and delay when waiting for LP-11 and > confirmation of PHTW write as suggested by Laurent. > - Dropped dev_dbg() printouts of the requested link speed. > - Fix small issues in comments. > - Remove unneeded () in for-loop condition in rcsi2_phtw_write_array(). > - Remove __refdata from declaration of 'static struct platform_driver > rcar_csi2_pdrv'. > - Update MODULE_DESCRIPTION to 'Renesas R-Car MIPI CSI-2 receiver > driver'. > - Fixed two erroneous values in hsfreqrange_h3_v3h_m3n[]. Thanks Jacopo > for spotting this! > - Max link speed for V3M and E3 are 1.125Gbps remove settings above that > limit in phtw_mbps_v3m_e3. This also changed in datasheet v1.0. > - Add review tags from Laurent and Maxime. > > * Changes since v14. > - Data sheet update changed init sequence for PHY forcing a restructure > of the driver. The restructure was so big I felt compel to drop all > review tags :-( > - The change was that the Renesas H3 procedure was aligned with other > SoC in the Gen3 family procedure. I had kept the rework as separate > patches and was planing to post once original driver with H3 and M3-W > support where merged. As review tags are dropped I chosen to squash > those patches into 2/2. > - Add support for Gen3 M3-N. > - Add support for Gen3 V3M. > - Set PHTC_TESTCLR when stopping the PHY. > - Revert back to the v12 and earlier phypll calculation as it turns out > it was correct after all. > - Added compatible string for R8A77965 and R8A77970. > - s/Port 0/port@0/ > - s/Port 1/port@1/ > - s/Endpoint 0/endpoint@0/ > > * Changes since v13 > - Change return rcar_csi2_formats + i to return &rcar_csi2_formats[i]. > - Add define for PHCLM_STOPSTATECKL. > - Update spelling in comments. > - Update calculation in rcar_csi2_calc_phypll() according to > https://linuxtv.org/downloads/v4l-dvb-apis/kapi/csi2.html. The one > before v14 did not take into account that 2 bits per sample is > transmitted. > - Use Geert's suggestion of (1 << priv->lanes) - 1 instead of switch > statement to set correct number of lanes to enable. > - Change hex constants in hsfreqrange_m3w_h3es1[] to lower case to match > style of rest of file. > - Switch to %u instead of 0x%x when printing bus type. > - Switch to %u instead of %d for priv->lanes which is unsigned. > - Add MEDIA_BUS_FMT_YUYV8_1X16 to the list of supported formats in > rcar_csi2_formats[]. > - Fixed bps for MEDIA_BUS_FMT_YUYV10_2X10 to 20 and not 16. > - Set INTSTATE after PL-11 is confirmed to match flow chart in > datasheet. > - Change priv->notifier.subdevs == NULL to !priv->notifier.subdevs. > - Add Maxime's and laurent's tags. > > * Changes since v12 > - Fixed spelling mistakes in commit messages and documentation patch, > thanks Laurent. > - Mark endpoints in port 1 as optional as it is allowed to not connect a > VIN to the CSI-2 and instead have it only use its parallel input > source (for those VIN that have one). > - Added Ack from Sakari, thanks! > - Media bus codes are u32 not unsigned int. > - Ignore error check for v4l2_subdev_call(sd, video, s_stream, 0) > - Do not set subdev host data as it's not used, > v4l2_set_subdev_hostdata(). > - Fixed spelling errors in commit message. > - Add SPDX header > - Rename badly named variable tmp to vcdt_part. > - Cache subdevice in bound callback instead of looking it up in the > media graph. By doing this rcar_csi2_sd_info() can be removed. > - Print unsigned using %u not %d. > - Call pm_runtime_enable() before calling v4l2_async_register_subdev(). > - Dropped of_match_ptr() as OF is required. > > * Changes since v11 > - Added missing call to v4l2_async_notifier_unregister(). > - Fixed missing reg popery in bindings documentation. > - Add Rob's ack to 01/02. > - Dropped 'media:' prefix from patch subjects as it seems they are added > first when a patch is picked up by the maintainer. > - Fixed typo in comment enpo
[PATCH v16 0/2] rcar-csi2: add Renesas R-Car MIPI CSI-2
Hi, This is the latest incarnation of R-Car MIPI CSI-2 receiver driver. It's based on top of the media-tree and are tested on Renesas Salvator-X and Salvator-XS together with adv7482 and the now in tree rcar-vin driver :-) I hope this is the last incarnation of this patch-set, I do think it is ready for upstream consumption :-) * Changes since v15 - Merge struct phtw_mbps and struct phypll_hsfreqrange into a new struct which maps a mpbs value to a register value, struct rcsi2_mbps_reg. - Reduced number of loops and delay when waiting for LP-11 and confirmation of PHTW write as suggested by Laurent. - Dropped dev_dbg() printouts of the requested link speed. - Fix small issues in comments. - Remove unneeded () in for-loop condition in rcsi2_phtw_write_array(). - Remove __refdata from declaration of 'static struct platform_driver rcar_csi2_pdrv'. - Update MODULE_DESCRIPTION to 'Renesas R-Car MIPI CSI-2 receiver driver'. - Fixed two erroneous values in hsfreqrange_h3_v3h_m3n[]. Thanks Jacopo for spotting this! - Max link speed for V3M and E3 are 1.125Gbps remove settings above that limit in phtw_mbps_v3m_e3. This also changed in datasheet v1.0. - Add review tags from Laurent and Maxime. * Changes since v14. - Data sheet update changed init sequence for PHY forcing a restructure of the driver. The restructure was so big I felt compel to drop all review tags :-( - The change was that the Renesas H3 procedure was aligned with other SoC in the Gen3 family procedure. I had kept the rework as separate patches and was planing to post once original driver with H3 and M3-W support where merged. As review tags are dropped I chosen to squash those patches into 2/2. - Add support for Gen3 M3-N. - Add support for Gen3 V3M. - Set PHTC_TESTCLR when stopping the PHY. - Revert back to the v12 and earlier phypll calculation as it turns out it was correct after all. - Added compatible string for R8A77965 and R8A77970. - s/Port 0/port@0/ - s/Port 1/port@1/ - s/Endpoint 0/endpoint@0/ * Changes since v13 - Change return rcar_csi2_formats + i to return &rcar_csi2_formats[i]. - Add define for PHCLM_STOPSTATECKL. - Update spelling in comments. - Update calculation in rcar_csi2_calc_phypll() according to https://linuxtv.org/downloads/v4l-dvb-apis/kapi/csi2.html. The one before v14 did not take into account that 2 bits per sample is transmitted. - Use Geert's suggestion of (1 << priv->lanes) - 1 instead of switch statement to set correct number of lanes to enable. - Change hex constants in hsfreqrange_m3w_h3es1[] to lower case to match style of rest of file. - Switch to %u instead of 0x%x when printing bus type. - Switch to %u instead of %d for priv->lanes which is unsigned. - Add MEDIA_BUS_FMT_YUYV8_1X16 to the list of supported formats in rcar_csi2_formats[]. - Fixed bps for MEDIA_BUS_FMT_YUYV10_2X10 to 20 and not 16. - Set INTSTATE after PL-11 is confirmed to match flow chart in datasheet. - Change priv->notifier.subdevs == NULL to !priv->notifier.subdevs. - Add Maxime's and laurent's tags. * Changes since v12 - Fixed spelling mistakes in commit messages and documentation patch, thanks Laurent. - Mark endpoints in port 1 as optional as it is allowed to not connect a VIN to the CSI-2 and instead have it only use its parallel input source (for those VIN that have one). - Added Ack from Sakari, thanks! - Media bus codes are u32 not unsigned int. - Ignore error check for v4l2_subdev_call(sd, video, s_stream, 0) - Do not set subdev host data as it's not used, v4l2_set_subdev_hostdata(). - Fixed spelling errors in commit message. - Add SPDX header - Rename badly named variable tmp to vcdt_part. - Cache subdevice in bound callback instead of looking it up in the media graph. By doing this rcar_csi2_sd_info() can be removed. - Print unsigned using %u not %d. - Call pm_runtime_enable() before calling v4l2_async_register_subdev(). - Dropped of_match_ptr() as OF is required. * Changes since v11 - Added missing call to v4l2_async_notifier_unregister(). - Fixed missing reg popery in bindings documentation. - Add Rob's ack to 01/02. - Dropped 'media:' prefix from patch subjects as it seems they are added first when a patch is picked up by the maintainer. - Fixed typo in comment enpoint -> endpoint, thanks Hans. - Added Hans Reviewed-by to driver. * Changes since v10 - Renamed Documentation/devicetree/bindings/media/rcar-csi2.txt to Documentation/devicetree/bindings/media/renesas,rcar-csi2.txt - Add extra newline in rcar_csi2_code_to_fmt() - Use locally stored format information instead of reading it from the remote subdevice, Sakari pointed out that the pipeline is validated before .s_stream() is called so this is safe. - Do not check return from media_entity_to_v4l2_subdev() in rcar_csi2_start(), Sakari pointed out it can't fail. Also move logic to find the remote subdevice is moved to the only user of it, rcar_csi2_calc_phypll(). - Move pm_runtime_get_sync() and pm_run