All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Archit Taneja <architt@codeaurora.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	"devicetree\@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] dt-bindings: Document the Raspberry Pi Touchscreen nodes.
Date: Tue, 16 May 2017 11:46:36 -0700	[thread overview]
Message-ID: <87shk4iqr7.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <3768334.nZM7df9y4L@avalon>

[-- Attachment #1: Type: text/plain, Size: 4504 bytes --]

Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:

> Hi Eric,
>
> On Tuesday 16 May 2017 09:47:49 Eric Anholt wrote:
>> Rob Herring <robh+dt@kernel.org> writes:
>> > On Mon, May 15, 2017 at 7:03 PM, Eric Anholt <eric@anholt.net> wrote:
>> >> Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:
>> >>> Hi Eric,
>> >>> 
>> >>> Thank you for the patch.
>> >>> 
>> >>> On Thursday 11 May 2017 16:56:23 Eric Anholt wrote:
>> >>>> The Raspberry Pi 7" Touchscreen is a DPI touchscreen panel with
>> >>>> DSI->DPI bridge and touchscreen controller integrated, that connects
>> >>>> to the Raspberry Pi through its 15-pin "DSI" connector (some lines are
>> >>>> DSI, some lines are I2C).
>> >>>> 
>> >>>> This device is represented in the DT as three nodes (DSI device, I2C
>> >>>> device, panel).  Input will be left to a separate binding later, as it
>> >>>> will be a basic I2C client device.
>> >>>> 
>> >>>> Signed-off-by: Eric Anholt <eric@anholt.net>
>> >>>> ---
>> >>>> 
>> >>>>  .../raspberrypi,7inch-touchscreen-bridge.txt       | 68 ++++++++++++++
>> >>>>  .../panel/raspberrypi,7inch-touchscreen-panel.txt  |  7 +++
>> >>>>  2 files changed, 75 insertions(+)
>> >>>>  create mode 100644
>> >>>> 
>> >>>> Documentation/devicetree/bindings/display/bridge/raspberrypi,7inch-touc
>> >>>> hscreen-bridge.txt create mode 100644
>> >>>> Documentation/devicetree/bindings/display/panel/raspberrypi,7inch-touch
>> >>>> screen-panel.txt
>> >>>> 
>> >>>> diff --git
>> >>>> a/Documentation/devicetree/bindings/display/bridge/raspberrypi,7inch-to
>> >>>> uchscreen-bridge.txt
>> >>>> b/Documentation/devicetree/bindings/display/bridge/raspberrypi,7inch-to
>> >>>> uchscreen-bridge.txt new file mode 100644
>> >>>> index 000000000000..a5669beaf68f
>> >>>> --- /dev/null
>> >>>> +++
>> >>>> b/Documentation/devicetree/bindings/display/bridge/raspberrypi,7inch-to
>> >>>> uchscreen-bridge.txt
>> >>>> @@ -0,0 +1,68 @@
>> >>>> +Official 7" (800x480) Raspberry Pi touchscreen panel's bridge.
>> >>>> +
>> >>>> +This DSI panel contains:
>> >>>> +
>> >>>> +- TC358762 DSI->DPI bridge
>> >>>> +- Atmel microcontroller on I2C for power sequencing the DSI bridge and
>> >>>> +  controlling backlight
>> >>>> +- Touchscreen controller on I2C for touch input
>> >>>> +
>> >>>> +and this covers the TC358762 bridge and Atmel microcontroller, while
>> >>>> +../panel/raspberrypi,7inch-touchscreen-panel.txt covers the panel.
>> >>> 
>> >>> The TC358762 is a standalone bridge that doesn't depend on the ATTiny
>> >>> microcontroller used by the RPI. As it's usable standalone, I believe
>> >>> this binding should be split in two.
>> >> 
>> >> Do you have a plan for how I would implement a driver on top of that
>> >> binding change, though?  Note that we don't program the Toshiba
>> >> directly, we only send commands to the Atmel.
>> > 
>> > I agree. If it is a black box and the interface to the host is defined
>> > by the Atmel uC firmware, then that's what the DT should describe.
>> > Perhaps a diagram here or pointer to one would help and remove
>> > mentioning what kind of bridge chip it is.
>> 
>> It's a *very* black box.  I have some non-public schematics that don't
>> even say what panel is involved, and no documentation of the uc
>> interface.  The driver code is just replicating the firmware's
>> programming sequence.
>> 
>> I would certainly love to be building a generic TC358762 driver, which
>> would be a lot more satisfying.  I just don't think it's doable for this
>> panel.  Given that, what do I need to do to the DT?  Should I just drop
>> mention of the Toshiba and talk about this being a bridge with a custom
>> microcontroller firmware?
>
> I think that would be best, yes. Could you share a simple block-diagram of the 
> hardware ? It would help turning my random advices into semi-random advices 
> :-)

In terms of physical connections:

   [15-pin "DSI" connector on 2835]
    |                   |
    | I2C               | DSI
    |                   |
   / \        SPI       |
[TS]  [Atmel]------[TC358762]
       \                |
        \PWM            |
         \              | DPI
[some backlight]------[some unknown panel]

The binding I'm trying to create is to expose what's necessary for a
driver that talks I2C to the Atmel, which then controls the PWM and does
the command sequence over SPI to the Toshiba that sets up its end of the
DSI link.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Eric Anholt <eric@anholt.net>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH 2/4] dt-bindings: Document the Raspberry Pi Touchscreen nodes.
Date: Tue, 16 May 2017 11:46:36 -0700	[thread overview]
Message-ID: <87shk4iqr7.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <3768334.nZM7df9y4L@avalon>


[-- Attachment #1.1: Type: text/plain, Size: 4504 bytes --]

Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:

> Hi Eric,
>
> On Tuesday 16 May 2017 09:47:49 Eric Anholt wrote:
>> Rob Herring <robh+dt@kernel.org> writes:
>> > On Mon, May 15, 2017 at 7:03 PM, Eric Anholt <eric@anholt.net> wrote:
>> >> Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:
>> >>> Hi Eric,
>> >>> 
>> >>> Thank you for the patch.
>> >>> 
>> >>> On Thursday 11 May 2017 16:56:23 Eric Anholt wrote:
>> >>>> The Raspberry Pi 7" Touchscreen is a DPI touchscreen panel with
>> >>>> DSI->DPI bridge and touchscreen controller integrated, that connects
>> >>>> to the Raspberry Pi through its 15-pin "DSI" connector (some lines are
>> >>>> DSI, some lines are I2C).
>> >>>> 
>> >>>> This device is represented in the DT as three nodes (DSI device, I2C
>> >>>> device, panel).  Input will be left to a separate binding later, as it
>> >>>> will be a basic I2C client device.
>> >>>> 
>> >>>> Signed-off-by: Eric Anholt <eric@anholt.net>
>> >>>> ---
>> >>>> 
>> >>>>  .../raspberrypi,7inch-touchscreen-bridge.txt       | 68 ++++++++++++++
>> >>>>  .../panel/raspberrypi,7inch-touchscreen-panel.txt  |  7 +++
>> >>>>  2 files changed, 75 insertions(+)
>> >>>>  create mode 100644
>> >>>> 
>> >>>> Documentation/devicetree/bindings/display/bridge/raspberrypi,7inch-touc
>> >>>> hscreen-bridge.txt create mode 100644
>> >>>> Documentation/devicetree/bindings/display/panel/raspberrypi,7inch-touch
>> >>>> screen-panel.txt
>> >>>> 
>> >>>> diff --git
>> >>>> a/Documentation/devicetree/bindings/display/bridge/raspberrypi,7inch-to
>> >>>> uchscreen-bridge.txt
>> >>>> b/Documentation/devicetree/bindings/display/bridge/raspberrypi,7inch-to
>> >>>> uchscreen-bridge.txt new file mode 100644
>> >>>> index 000000000000..a5669beaf68f
>> >>>> --- /dev/null
>> >>>> +++
>> >>>> b/Documentation/devicetree/bindings/display/bridge/raspberrypi,7inch-to
>> >>>> uchscreen-bridge.txt
>> >>>> @@ -0,0 +1,68 @@
>> >>>> +Official 7" (800x480) Raspberry Pi touchscreen panel's bridge.
>> >>>> +
>> >>>> +This DSI panel contains:
>> >>>> +
>> >>>> +- TC358762 DSI->DPI bridge
>> >>>> +- Atmel microcontroller on I2C for power sequencing the DSI bridge and
>> >>>> +  controlling backlight
>> >>>> +- Touchscreen controller on I2C for touch input
>> >>>> +
>> >>>> +and this covers the TC358762 bridge and Atmel microcontroller, while
>> >>>> +../panel/raspberrypi,7inch-touchscreen-panel.txt covers the panel.
>> >>> 
>> >>> The TC358762 is a standalone bridge that doesn't depend on the ATTiny
>> >>> microcontroller used by the RPI. As it's usable standalone, I believe
>> >>> this binding should be split in two.
>> >> 
>> >> Do you have a plan for how I would implement a driver on top of that
>> >> binding change, though?  Note that we don't program the Toshiba
>> >> directly, we only send commands to the Atmel.
>> > 
>> > I agree. If it is a black box and the interface to the host is defined
>> > by the Atmel uC firmware, then that's what the DT should describe.
>> > Perhaps a diagram here or pointer to one would help and remove
>> > mentioning what kind of bridge chip it is.
>> 
>> It's a *very* black box.  I have some non-public schematics that don't
>> even say what panel is involved, and no documentation of the uc
>> interface.  The driver code is just replicating the firmware's
>> programming sequence.
>> 
>> I would certainly love to be building a generic TC358762 driver, which
>> would be a lot more satisfying.  I just don't think it's doable for this
>> panel.  Given that, what do I need to do to the DT?  Should I just drop
>> mention of the Toshiba and talk about this being a bridge with a custom
>> microcontroller firmware?
>
> I think that would be best, yes. Could you share a simple block-diagram of the 
> hardware ? It would help turning my random advices into semi-random advices 
> :-)

In terms of physical connections:

   [15-pin "DSI" connector on 2835]
    |                   |
    | I2C               | DSI
    |                   |
   / \        SPI       |
[TS]  [Atmel]------[TC358762]
       \                |
        \PWM            |
         \              | DPI
[some backlight]------[some unknown panel]

The binding I'm trying to create is to expose what's necessary for a
driver that talks I2C to the Atmel, which then controls the PWM and does
the command sequence over SPI to the Toshiba that sets up its end of the
DSI link.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-05-16 18:47 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11 23:56 [PATCH 0/4] Raspberry Pi Touchscreen bridge/panel drivers Eric Anholt
2017-05-11 23:56 ` Eric Anholt
2017-05-11 23:56 ` [PATCH 1/4] drm/vc4: Adjust modes in DSI to work around the integer PLL divider Eric Anholt
2017-05-11 23:56   ` Eric Anholt
2017-05-12  7:55   ` Daniel Vetter
2017-05-12  7:55     ` Daniel Vetter
2017-05-12 11:01   ` Noralf Trønnes
2017-05-12 11:01     ` Noralf Trønnes
2017-05-11 23:56 ` [PATCH 2/4] dt-bindings: Document the Raspberry Pi Touchscreen nodes Eric Anholt
2017-05-11 23:56   ` Eric Anholt
2017-05-15 20:44   ` Rob Herring
2017-05-15 20:44     ` Rob Herring
2017-05-15 21:56     ` Laurent Pinchart
2017-05-15 21:56       ` Laurent Pinchart
2017-05-15 21:53   ` Laurent Pinchart
2017-05-15 21:53     ` Laurent Pinchart
2017-05-16  0:03     ` Eric Anholt
2017-05-16  0:03       ` Eric Anholt
2017-05-16  0:11       ` Rob Herring
2017-05-16 16:47         ` Eric Anholt
2017-05-16 16:47           ` Eric Anholt
2017-05-16 16:54           ` Laurent Pinchart
2017-05-16 16:54             ` Laurent Pinchart
2017-05-16 18:46             ` Eric Anholt [this message]
2017-05-16 18:46               ` Eric Anholt
2017-05-18  8:26               ` Archit Taneja
2017-05-18  8:26                 ` Archit Taneja
2017-05-18 14:55                 ` Laurent Pinchart
2017-05-18 14:55                   ` Laurent Pinchart
2017-05-19  8:54                   ` Archit Taneja
2017-05-19  8:54                     ` Archit Taneja
2017-05-19  9:32                     ` Laurent Pinchart
2017-05-19  9:32                       ` Laurent Pinchart
2017-05-22 20:51                       ` Eric Anholt
2017-05-22 20:51                         ` Eric Anholt
2017-05-18 14:45               ` Laurent Pinchart
2017-05-18 14:45                 ` Laurent Pinchart
2017-05-22 20:50                 ` Eric Anholt
2017-05-22 20:50                   ` Eric Anholt
2017-05-16  7:20       ` Laurent Pinchart
2017-05-16  7:20         ` Laurent Pinchart
2017-05-11 23:56 ` [PATCH 3/4] drm/bridge: Add support for the Raspberry Pi 7" Touchscreen Eric Anholt
2017-05-11 23:56   ` Eric Anholt
2017-05-11 23:56 ` [PATCH 4/4] drm/panel: Add the Raspberry Pi 7" touchscreen's panel Eric Anholt
2017-05-11 23:56   ` Eric Anholt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87shk4iqr7.fsf@eliezer.anholt.net \
    --to=eric@anholt.net \
    --cc=a.hajda@samsung.com \
    --cc=architt@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.