PS8640 MIPI-to-eDP bridge
Subsystems (6)
v19 cover PS8640 MIPI-to-eDP bridge
Hi!
This driver seems to have fallen by the wayside because, while otherwise fine, it has a firmware update feature that requires a blob that is not in the linux-firmware repo.[1]
Whatever the cause for that may be, the update code is entirely optional (my chip works fine with whatever firmware is currently installed), so I have removed it in order to get this merged after all. I have also followed various trivial API changes that have piled up since 2016; see the individual patches for details.
I'm using this driver on an Acer Chromebook R13 ("Elm"); see
https://github.com/uli/kernel/tree/elm-working-5.4.
CU
Uli
[1] https://patchwork.kernel.org/patch/9427543/
Jitao Shi (2):
Documentation: bridge: Add documentation for ps8640 DT properties drm/bridge: Add I2C based driver for ps8640 bridge
.../devicetree/bindings/display/bridge/ps8640.txt | 44 ++ drivers/gpu/drm/bridge/Kconfig | 12 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/parade-ps8640.c | 672 +++++++++++++++++++++ 4 files changed, 729 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/ps8640.txt create mode 100644 drivers/gpu/drm/bridge/parade-ps8640.c
Signature · 1 line
2.7.4
A message that is not in the archive (sent off-list or not yet received): 1570216148-22802-1-git-send-email-uli-qwV78thtvt0@public.gmane.org
PATCH v19 1/2 Documentation: bridge: Add documentation for ps8640 DT properties
From: Jitao Shi <jitao.shi-NuS5LvNUpcJWk0Htik3J/[email protected]>
Add documentation for DT properties supported by
ps8640 DSI-eDP converter.
---
Changes since v18:
- No change.
Changes since v17:
- No change.
Changes since v16:
- No change.
Changes since v15:
- No change.
Changes since v14:
- change mode-sel-gpios as optional.
.../devicetree/bindings/display/bridge/ps8640.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/ps8640.txt
Documentation/devicetree/bindings/display/bridge/ps8640.txt new file +44 -0
@@ -0,0 +1,44 @@ +ps8640-bridge bindings + +Required properties: + - compatible: "parade,ps8640" + - reg: first page address of the bridge. + - sleep-gpios: OF device-tree gpio specification for PD pin. + - reset-gpios: OF device-tree gpio specification for reset pin. + - vdd12-supply: OF device-tree regulator specification for 1.2V power. + - vdd33-supply: OF device-tree regulator specification for 3.3V power. + - ports: The device node can contain video interface port nodes per + the video-interfaces bind[1]. For port@0,set the reg = <0> as + ps8640 dsi in and port@1,set the reg = <1> as ps8640 eDP out. + +Optional properties: + - mode-sel-gpios: OF device-tree gpio specification for mode-sel pin. +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt + +Example: + edp-bridge@18 { + compatible = "parade,ps8640"; + reg = <0x18>; + sleep-gpios = <&pio 116 GPIO_ACTIVE_LOW>; + reset-gpios = <&pio 115 GPIO_ACTIVE_LOW>; + mode-sel-gpios = <&pio 92 GPIO_ACTIVE_HIGH>; + vdd12-supply = <&ps8640_fixed_1v2>; + vdd33-supply = <&mt6397_vgp2_reg>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + ps8640_in: endpoint { + remote-endpoint = <&dsi0_out>; + }; + }; + port@1 { + reg = <1>; + ps8640_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + };
Signature · 1 line
2.7.4
PATCH v19 2/2 drm/bridge: Add I2C based driver for ps8640 bridge
In reply to a message not in the archiveFrom: Jitao Shi <jitao.shi-NuS5LvNUpcJWk0Htik3J/[email protected]>
This patch adds drm_bridge driver for parade DSI to eDP bridge chip.
---
Changes since v18:
- followed DRM API changes
- use DEVICE_ATTR_RO()
- remove firmware update code
- add SPDX identifier
Changes since v17:
- remove some unused head files.
- add macros for ps8640 pages.
- remove ddc_i2c client
- add mipi_dsi_device_register_full
- remove the manufacturer from the name and i2c_device_id
Changes since v16:
- Disable ps8640 DSI MCS Function.
- Rename gpios name more clearly.
- Tune the ps8640 power on sequence.
Changes since v15:
- Drop drm_connector_(un)register calls from parade ps8640. The main DRM driver mtk_drm_drv now calls drm_connector_register_all() after drm_dev_register() in the mtk_drm_bind() function. That function should iterate over all connectors and call drm_connector_register() for each of them. So, remove drm_connector_(un)register calls from parade ps8640.
Changes since v14:
- update copyright info.
- change bridge_to_ps8640 and connector_to_ps8640 to inline function.
- fix some coding style.
- use sizeof as array counter.
- use drm_get_edid when read edid.
- add mutex when firmware updating.
Changes since v13:
- add const on data, ps8640_write_bytes(struct i2c_client *client, const u8 *data, u16 data_len)
- fix PAGE2_SW_REST tyro.
- move the buf[3] init to entrance of the function.
Changes since v12:
- fix hw_chip_id build warning
Changes since v11:
- Remove depends on I2C, add DRM depends
- Reuse ps8640_write_bytes() in ps8640_write_byte()
- Use timer check for polling like the routines in <linux/iopoll.h>
- Fix no drm_connector_unregister/drm_connector_cleanup when ps8640_bridge_attach fail
- Check the ps8640 hardware id in ps8640_validate_firmware
- Remove fw_version check
- Move ps8640_validate_firmware before ps8640_enter_bl
- Add ddc_i2c unregister when probe fail and ps8640_remove
drivers/gpu/drm/bridge/Kconfig | 12 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/parade-ps8640.c | 672 +++++++++++++++++++++++++++++++++ 3 files changed, 685 insertions(+) create mode 100644 drivers/gpu/drm/bridge/parade-ps8640.c
drivers/gpu/drm/bridge/Kconfig +12 -0
@@ -82,6 +82,18 @@ config DRM_PARADE_PS8622 ---help--- Parade eDP-LVDS bridge chip driver. +config DRM_PARADE_PS8640 + tristate "Parade PS8640 MIPI DSI to eDP Converter" + depends on DRM + depends on OF + select DRM_KMS_HELPER + select DRM_MIPI_DSI + select DRM_PANEL + help + Choose this option if you have PS8640 for display + The PS8640 is a high-performance and low-power + MIPI DSI to eDP converter + config DRM_SIL_SII8620 tristate "Silicon Image SII8620 HDMI/MHL bridge" depends on OF
drivers/gpu/drm/bridge/Makefile +1 -0
@@ -6,6 +6,7 @@ obj-$(CONFIG_DRM_LVDS_ENCODER) += lvds-encoder.o obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v3-fw.o obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o +obj-$(CONFIG_DRM_PARADE_PS8640) += parade-ps8640.o obj-$(CONFIG_DRM_SIL_SII8620) += sil-sii8620.o obj-$(CONFIG_DRM_SII902X) += sii902x.o obj-$(CONFIG_DRM_SII9234) += sii9234.o
drivers/gpu/drm/bridge/parade-ps8640.c new file +672 -0
672 lines not on this page · raw message
Signature · 1 line
2.7.4
Matthias Brugger
maintainerHi Uli,
Quoted 6 lines · Ulrich Hecht
Hi!
This driver seems to have fallen by the wayside because, while otherwise fine, it has a firmware update feature that requires a blob that is not in the linux-firmware repo.[1]
Quoted 9 lines
Whatever the cause for that may be, the update code is entirely optional (my chip works fine with whatever firmware is currently installed), so I have removed it in order to get this merged after all. I have also followed various trivial API changes that have piled up since 2016; see the individual patches for details.
I'm using this driver on an Acer Chromebook R13 ("Elm"); see
https://github.com/uli/kernel/tree/elm-working-5.4.
Thanks for your effort to get things upstream.
I just tried your branch on my R13. I had to do a trivial config change I had to do, as I don't have and care about the bluetooth FW right now.
But after that my screen keeps black. I was able to build and boot elm-working-5.3 and elm-working-5.2.
Unfortunatley I don't have a serial console on the Chromebook, so it's difficult to find out where it hangs. Can you please double check if your new elm-working-5.4 actually really works?
Thanks,
Matthias
Quoted 9 lines
CU
Uli[1] https://patchwork.kernel.org/patch/9427543/
Jitao Shi (2):
Documentation: bridge: Add documentation for ps8640 DT properties drm/bridge: Add I2C based driver for ps8640 bridge
Quoted 8 lines
.../devicetree/bindings/display/bridge/ps8640.txt | 44 ++ drivers/gpu/drm/bridge/Kconfig | 12 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/parade-ps8640.c | 672 +++++++++++++++++++++ 4 files changed, 729 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/ps8640.txt create mode 100644 drivers/gpu/drm/bridge/parade-ps8640.c
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
A message that is not in the archive (sent off-list or not yet received): 4df984a5-a917-753e-5870-7453f3d5438e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 19 lines · Matthias Brugger
Hi Uli,
Quoted 12 lines · Ulrich Hecht
Hi!
This driver seems to have fallen by the wayside because, while otherwise fine, it has a firmware update feature that requires a blob that is not in the linux-firmware repo.[1]
Whatever the cause for that may be, the update code is entirely optional (my chip works fine with whatever firmware is currently installed), so I have removed it in order to get this merged after all. I have also followed various trivial API changes that have piled up since 2016; see the individual patches for details.
Quoted 7 lines
Quoted 3 lines
I'm using this driver on an Acer Chromebook R13 ("Elm"); see
https://github.com/uli/kernel/tree/elm-working-5.4.Thanks for your effort to get things upstream.
I just tried your branch on my R13. I had to do a trivial config change I had to do, as I don't have and care about the bluetooth FW right now.
Thank you for testing!
Quoted 6 lines
But after that my screen keeps black. I was able to build and boot elm-working-5.3 and elm-working-5.2.
Unfortunatley I don't have a serial console on the Chromebook, so it's difficult to find out where it hangs. Can you please double check if your new elm-working-5.4 actually really works?
No, it doesn't. :( It seems I forgot to run mkimage/vbutil_kernel when testing...
I have pushed a fix to the elm-working-5.4 tree, and I will send a v20 tomorrow. Sorry for the inconvenience.
CU
Uli