mbox series

[v2,0/2] Add waveshare 7inch touchscreen panel support

Message ID 20240109070949.23957-1-shengyang.chen@starfivetech.com
Headers show
Series Add waveshare 7inch touchscreen panel support | expand

Message

Shengyang Chen Jan. 9, 2024, 7:09 a.m. UTC
This patchset adds waveshare 7inch touchscreen panel support
for the StarFive JH7110 SoC.


changes since v1:
- Rebased on tag v6.7.

patch 1:
- Gave up original changing.
- Changed the commit message.
- Add compatible in panel-simple.yaml

patch 2:
- Gave up original changing.
- Changed the commit message.
- Add new mode for the panel in panel-simple.c

v1: https://patchwork.kernel.org/project/dri-devel/cover/20231124104451.44271-1-shengyang.chen@starfivetech.com/

Shengyang Chen (2):
  dt-bindings: display: panel: panel-simple: Add compatible property for
    waveshare 7inch touchscreen panel
  gpu: drm: panel: panel-simple: add new display mode for waveshare
    7inch touchscreen panel

 .../bindings/display/panel/panel-simple.yaml  |  2 ++
 drivers/gpu/drm/panel/panel-simple.c          | 28 +++++++++++++++++++
 2 files changed, 30 insertions(+)

Comments

Neil Armstrong Jan. 16, 2024, 9:34 a.m. UTC | #1
On 16/01/2024 10:32, Shengyang Chen wrote:
> Hi, Neil
> 
> Thanks for your comment.
> 
>> -----Original Message-----
>> From: neil.armstrong@linaro.org <neil.armstrong@linaro.org>
>> Sent: 2024年1月9日 19:19
>> To: Shengyang Chen <shengyang.chen@starfivetech.com>;
>> devicetree@vger.kernel.org; dri-devel@lists.freedesktop.org
>> Cc: quic_jesszhan@quicinc.com; sam@ravnborg.org; airlied@gmail.com;
>> daniel@ffwll.ch; maarten.lankhorst@linux.intel.com; mripard@kernel.org;
>> tzimmermann@suse.de; robh+dt@kernel.org;
>> krzysztof.kozlowski+dt@linaro.org; conor+dt@kernel.org; wahrenst@gmx.net;
>> dave.stevenson@raspberrypi.com; thierry.reding@gmail.com; Changhuang
>> Liang <changhuang.liang@starfivetech.com>; Keith Zhao
>> <keith.zhao@starfivetech.com>; Jack Zhu <jack.zhu@starfivetech.com>;
>> linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH v2 0/2] Add waveshare 7inch touchscreen panel support
>>
>> Hi,
>>
>> On 09/01/2024 08:09, Shengyang Chen wrote:
>>> This patchset adds waveshare 7inch touchscreen panel support for the
>>> StarFive JH7110 SoC.
>>
>> Could you precise which SKU you're referring to ? is it 19885 =>
>> https://www.waveshare.com/7inch-dsi-lcd.htm ?
>>
> 
> yes, it is
> sorry for confusing you.
> 
>> Are you sure it requires different timings from the RPi one ? In the Waveshare
>> wiki it explicitly uses the rpi setup (vc4-kms-dsi-7inch) to drive it:
>> https://www.waveshare.com/wiki/7inch_DSI_LCD
>>
> 
> Referring to Keith's answer
> https://lists.freedesktop.org/archives/dri-devel/2023-December/434200.html
> the panel timing value is generated to fit phy's bitrate and prevent overflow and underflow.
> 
> Referring to the suggestion, we may try other timing from panel-simple to drive the panel.

Please implement a mode_fixup in your DSI host driver instead.

Neil

> 
>> Neil
>>
>>>
>>>
>>> changes since v1:
>>> - Rebased on tag v6.7.
>>>
>>> patch 1:
>>> - Gave up original changing.
>>> - Changed the commit message.
>>> - Add compatible in panel-simple.yaml
>>>
>>> patch 2:
>>> - Gave up original changing.
>>> - Changed the commit message.
>>> - Add new mode for the panel in panel-simple.c
>>>
>>> v1:
>>> https://patchwork.kernel.org/project/dri-devel/cover/20231124104451.44
>>> 271-1-shengyang.chen@starfivetech.com/
>>>
>>> Shengyang Chen (2):
>>>     dt-bindings: display: panel: panel-simple: Add compatible property for
>>>       waveshare 7inch touchscreen panel
>>>     gpu: drm: panel: panel-simple: add new display mode for waveshare
>>>       7inch touchscreen panel
>>>
>>>    .../bindings/display/panel/panel-simple.yaml  |  2 ++
>>>    drivers/gpu/drm/panel/panel-simple.c          | 28
>> +++++++++++++++++++
>>>    2 files changed, 30 insertions(+)
>>>
> 
> 
> Best Regards,
> Shengyang
Shengyang Chen Jan. 16, 2024, 9:40 a.m. UTC | #2
Hi, Conor

Thanks for comment.

> -----Original Message-----
> From: Conor Dooley <conor@kernel.org>
> Sent: 2024年1月10日 0:32
> To: Shengyang Chen <shengyang.chen@starfivetech.com>
> Cc: devicetree@vger.kernel.org; dri-devel@lists.freedesktop.org;
> neil.armstrong@linaro.org; quic_jesszhan@quicinc.com; sam@ravnborg.org;
> airlied@gmail.com; daniel@ffwll.ch; maarten.lankhorst@linux.intel.com;
> mripard@kernel.org; tzimmermann@suse.de; robh+dt@kernel.org;
> krzysztof.kozlowski+dt@linaro.org; conor+dt@kernel.org; wahrenst@gmx.net;
> dave.stevenson@raspberrypi.com; thierry.reding@gmail.com; Changhuang
> Liang <changhuang.liang@starfivetech.com>; Keith Zhao
> <keith.zhao@starfivetech.com>; Jack Zhu <jack.zhu@starfivetech.com>;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v2 1/2] dt-bindings: display: panel: panel-simple: Add
> compatible property for waveshare 7inch touchscreen panel
> 
> On Tue, Jan 09, 2024 at 03:09:48PM +0800, Shengyang Chen wrote:
> > The waveshare 7" 800x480 panel is a clone of Raspberry Pi 7" 800x480
> > panel It can be drived by Raspberry Pi panel's process but it needs
> > different timing from Raspberry Pi panel. Add compatible property for it.
> >
> > Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
> > Signed-off-by: Shengyang Chen <shengyang.chen@starfivetech.com>
> > ---
> >  .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> > b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> > index 11422af3477e..02f6b1b2ddc9 100644
> > ---
> > a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yam
> > +++ l
> > @@ -335,6 +335,8 @@ properties:
> >        - vivax,tpc9150-panel
> >          # VXT 800x480 color TFT LCD panel
> >        - vxt,vl050-8048nt-c01
> > +        # Waveshare 7" (800x480) touchscreen LCD panel
> > +      - waveshare,7inch-touchscreen
> 
> Is "7inch-touchscreen" really a specific enough identifier for this device?
> 

Referring to official website[1] and Neil's suggestion, maybe I should change to
"7inch-touchscreen-dsi-lcd" or "waveshare,7inch-dsi-sku19885" if the next patch version is needed.

[1]: https://www.waveshare.com/7inch-dsi-lcd.htm

> >          # Winstar Display Corporation 3.5" QVGA (320x240) TFT LCD panel
> >        - winstar,wf35ltiacd
> >          # Yes Optoelectronics YTC700TLAG-05-201C 7" TFT LCD panel
> > --
> > 2.17.1
> >


Best Regards,
Shengyang
Shengyang Chen Jan. 16, 2024, 9:41 a.m. UTC | #3
> -----Original Message-----
> From: neil.armstrong@linaro.org <neil.armstrong@linaro.org>
> Sent: 2024年1月10日 17:06
> To: Conor Dooley <conor@kernel.org>; Shengyang Chen
> <shengyang.chen@starfivetech.com>
> Cc: devicetree@vger.kernel.org; dri-devel@lists.freedesktop.org;
> quic_jesszhan@quicinc.com; sam@ravnborg.org; airlied@gmail.com;
> daniel@ffwll.ch; maarten.lankhorst@linux.intel.com; mripard@kernel.org;
> tzimmermann@suse.de; robh+dt@kernel.org;
> krzysztof.kozlowski+dt@linaro.org; conor+dt@kernel.org; wahrenst@gmx.net;
> dave.stevenson@raspberrypi.com; thierry.reding@gmail.com; Changhuang
> Liang <changhuang.liang@starfivetech.com>; Keith Zhao
> <keith.zhao@starfivetech.com>; Jack Zhu <jack.zhu@starfivetech.com>;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v2 1/2] dt-bindings: display: panel: panel-simple: Add
> compatible property for waveshare 7inch touchscreen panel
> 
> On 09/01/2024 17:32, Conor Dooley wrote:
> > On Tue, Jan 09, 2024 at 03:09:48PM +0800, Shengyang Chen wrote:
> >> The waveshare 7" 800x480 panel is a clone of Raspberry Pi 7" 800x480
> >> panel It can be drived by Raspberry Pi panel's process but it needs
> >> different timing from Raspberry Pi panel. Add compatible property for it.
> >>
> >> Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
> >> Signed-off-by: Shengyang Chen <shengyang.chen@starfivetech.com>
> >> ---
> >>   .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
> >>   1 file changed, 2 insertions(+)
> >>
> >> diff --git
> >> a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> >> b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> >> index 11422af3477e..02f6b1b2ddc9 100644
> >> ---
> >> a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> >> +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.ya
> >> +++ ml
> >> @@ -335,6 +335,8 @@ properties:
> >>         - vivax,tpc9150-panel
> >>           # VXT 800x480 color TFT LCD panel
> >>         - vxt,vl050-8048nt-c01
> >> +        # Waveshare 7" (800x480) touchscreen LCD panel
> >> +      - waveshare,7inch-touchscreen
> >
> > Is "7inch-touchscreen" really a specific enough identifier for this
> > device?
> 
> Waveshare has very precise SKUs, this should be something like
> waveshare,7inch-dsi-sku19885 perhaps
> 
> Neil

thanks for mention, It will be checked if next version is needed.

> 
> >
> >>           # Winstar Display Corporation 3.5" QVGA (320x240) TFT LCD
> panel
> >>         - winstar,wf35ltiacd
> >>           # Yes Optoelectronics YTC700TLAG-05-201C 7" TFT LCD panel
> >> --
> >> 2.17.1
> >>
Shengyang Chen Jan. 16, 2024, 10:02 a.m. UTC | #4
Hi, Neil

> -----Original Message-----
> From: neil.armstrong@linaro.org <neil.armstrong@linaro.org>
> Sent: 2024年1月16日 17:34
> To: Shengyang Chen <shengyang.chen@starfivetech.com>;
> devicetree@vger.kernel.org; dri-devel@lists.freedesktop.org
> Cc: quic_jesszhan@quicinc.com; sam@ravnborg.org; airlied@gmail.com;
> daniel@ffwll.ch; maarten.lankhorst@linux.intel.com; mripard@kernel.org;
> tzimmermann@suse.de; robh+dt@kernel.org;
> krzysztof.kozlowski+dt@linaro.org; conor+dt@kernel.org; wahrenst@gmx.net;
> dave.stevenson@raspberrypi.com; thierry.reding@gmail.com; Changhuang
> Liang <changhuang.liang@starfivetech.com>; Keith Zhao
> <keith.zhao@starfivetech.com>; Jack Zhu <jack.zhu@starfivetech.com>;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v2 0/2] Add waveshare 7inch touchscreen panel support
> 
> On 16/01/2024 10:32, Shengyang Chen wrote:
> > Hi, Neil
> >
> > Thanks for your comment.
> >
> >> -----Original Message-----
> >> From: neil.armstrong@linaro.org <neil.armstrong@linaro.org>
> >> Sent: 2024年1月9日 19:19
> >> To: Shengyang Chen <shengyang.chen@starfivetech.com>;
> >> devicetree@vger.kernel.org; dri-devel@lists.freedesktop.org
> >> Cc: quic_jesszhan@quicinc.com; sam@ravnborg.org; airlied@gmail.com;
> >> daniel@ffwll.ch; maarten.lankhorst@linux.intel.com;
> >> mripard@kernel.org; tzimmermann@suse.de; robh+dt@kernel.org;
> >> krzysztof.kozlowski+dt@linaro.org; conor+dt@kernel.org;
> >> wahrenst@gmx.net; dave.stevenson@raspberrypi.com;
> >> thierry.reding@gmail.com; Changhuang Liang
> >> <changhuang.liang@starfivetech.com>; Keith Zhao
> >> <keith.zhao@starfivetech.com>; Jack Zhu <jack.zhu@starfivetech.com>;
> >> linux-kernel@vger.kernel.org
> >> Subject: Re: [PATCH v2 0/2] Add waveshare 7inch touchscreen panel
> >> support
> >>
> >> Hi,
> >>
> >> On 09/01/2024 08:09, Shengyang Chen wrote:
> >>> This patchset adds waveshare 7inch touchscreen panel support for the
> >>> StarFive JH7110 SoC.
> >>
> >> Could you precise which SKU you're referring to ? is it 19885 =>
> >> https://www.waveshare.com/7inch-dsi-lcd.htm ?
> >>
> >
> > yes, it is
> > sorry for confusing you.
> >
> >> Are you sure it requires different timings from the RPi one ? In the
> >> Waveshare wiki it explicitly uses the rpi setup (vc4-kms-dsi-7inch) to drive it:
> >> https://www.waveshare.com/wiki/7inch_DSI_LCD
> >>
> >
> > Referring to Keith's answer
> > https://lists.freedesktop.org/archives/dri-devel/2023-December/434200.
> > html the panel timing value is generated to fit phy's bitrate and
> > prevent overflow and underflow.
> >
> > Referring to the suggestion, we may try other timing from panel-simple to
> drive the panel.
> 
> Please implement a mode_fixup in your DSI host driver instead.
> 

The mode fixup method is already used. As reference:
https://patchwork.kernel.org/project/dri-devel/patch/20240109072516.24328-3-shengyang.chen@starfivetech.com/
you can check it in cdns_dsi_jh7110_update(). 
This code is being reviewed and may need to be optimized later.

> Neil
> 
> >
> >> Neil
> >>
> >>>
> >>>
> >>> changes since v1:
> >>> - Rebased on tag v6.7.
> >>>
> >>> patch 1:
> >>> - Gave up original changing.
> >>> - Changed the commit message.
> >>> - Add compatible in panel-simple.yaml
> >>>
> >>> patch 2:
> >>> - Gave up original changing.
> >>> - Changed the commit message.
> >>> - Add new mode for the panel in panel-simple.c
> >>>
> >>> v1:
> >>> https://patchwork.kernel.org/project/dri-devel/cover/20231124104451.
> >>> 44 271-1-shengyang.chen@starfivetech.com/
> >>>
> >>> Shengyang Chen (2):
> >>>     dt-bindings: display: panel: panel-simple: Add compatible property for
> >>>       waveshare 7inch touchscreen panel
> >>>     gpu: drm: panel: panel-simple: add new display mode for waveshare
> >>>       7inch touchscreen panel
> >>>
> >>>    .../bindings/display/panel/panel-simple.yaml  |  2 ++
> >>>    drivers/gpu/drm/panel/panel-simple.c          | 28
> >> +++++++++++++++++++
> >>>    2 files changed, 30 insertions(+)
> >>>
> >
> >
> > Best Regards,
> > Shengyang

Best Regards,
Shengyang