dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens@kernel.org>
To: Maxime Ripard <maxime@cerno.tech>
Cc: devicetree <devicetree@vger.kernel.org>,
	Siarhei Siamashka <siarhei.siamashka@gmail.com>,
	David Airlie <airlied@linux.ie>, Rob Herring <robh+dt@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Chen-Yu Tsai <wens@kernel.org>, Sam Ravnborg <sam@ravnborg.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet
Date: Thu, 16 Jul 2020 16:09:51 +0800	[thread overview]
Message-ID: <CAGb2v64d_nc2tPwLV6YeQuLjCxbTddEk0yGUtnGvJ8Pjk1FfYQ@mail.gmail.com> (raw)
In-Reply-To: <20200716080435.3td5il4eskh5jcru@gilmour.lan>

On Thu, Jul 16, 2020 at 4:04 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> Hi,
>
> On Tue, Jul 14, 2020 at 03:13:05PM +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> >
> > The Primo73 is an MSI branded Allwinner A20-based 7-inch tablet. It has
> > a metal back case with a plastic insert around where the WiFi antenna is.
> > The tablet is (as of July of 2020) no longer available from retailers.
> > Kernel sources (as required by GPL) are no longer available from the
> > vendor, MSI. The device support page still lists the link, but it is
> > dead.
> >
> > The tablet features a non-identifiable 1024x600 7" MIPI DPI TFT panel,
> > Goodix GT911-based capacitive touchscreen, 1GB DRAM, 8GB MLC NAND,
> > RTL8188ETV-based WiFi, an NXP MMA8452 accelerometer for orientation,
> > a GC2035 2 megapixel rear camera, a GC0308 0.3 megapixel front camera,
> > a mini-HDMI output, a micro-USB port, a headphone jack and single speaker.
> >
> > The board design is believe to follow Allwinner's reference design. This
> > judgement is based on the fact that the I/O pins and GPIO lines used
> > match up with the reference design. Assumptions about the regulator tree
> > are based on this.
> >
> > The LCD panel only has some serial number markings, and what appears to
> > be a part number: "OS1N71J003", which is also a prefix for one of the
> > serial number markings. Searching for this part number yielded no
> > results. As such, the color depth display timings are directly listed
> > in the device tree. The timing are from the FEX file recovered from the
> > device. The color depth was derived from the dithering setting from the
> > FEX file, as well as independent testing with a color gradient image.
> > The internal board, as well as the ribbon cable for the panel, route the
> > full 24 bits of color. So the 2 extra bits are dropped either by the
> > panel itself or somewhere within the LCD panel module casing.
> >
> > Add a device tree for this tablet. Almost the whole device is supported.
> > The only things missing are the two cameras, which don't have device
> > tree bindings or driver support. The vendor for the LCD panel is left
> > out, since there is nothing to go with.
> >
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >
> > The panel-dpi binding requires a more-specific compatible string.
> > However given the vendor of the panel is unknown, I'm not sure what
> > the best course of action is here. I opted to put the part number in
> > without a vendor prefix.
>
> I guess we could just make up a comptible from the tablet name here?
> Something like msi,primo73-panel ?

That might work. On the other hand, someone might take apart theirs
and find a different panel than mine, and not realize the timings
are off. Keeping the part number would still be useful, even if we
don't have any information on it.

> > ---
> >  arch/arm/boot/dts/Makefile              |   1 +
> >  arch/arm/boot/dts/sun7i-a20-primo73.dts | 279 ++++++++++++++++++++++++
> >  2 files changed, 280 insertions(+)
> >  create mode 100644 arch/arm/boot/dts/sun7i-a20-primo73.dts
> >
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index e6a1cac0bfc7..c09cda958db5 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -1133,6 +1133,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
> >       sun7i-a20-orangepi-mini.dtb \
> >       sun7i-a20-pcduino3.dtb \
> >       sun7i-a20-pcduino3-nano.dtb \
> > +     sun7i-a20-primo73.dtb \
> >       sun7i-a20-wexler-tab7200.dtb \
> >       sun7i-a20-wits-pro-a20-dkt.dtb
> >  dtb-$(CONFIG_MACH_SUN8I) += \
> > diff --git a/arch/arm/boot/dts/sun7i-a20-primo73.dts b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> > new file mode 100644
> > index 000000000000..f3b1002ceb50
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/sun7i-a20-primo73.dts
> > @@ -0,0 +1,279 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +/*
> > + * Copyright (C) 2020 Chen-Yu Tsai <wens@csie.org>
> > + */
> > +
> > +/dts-v1/;
> > +#include "sun7i-a20.dtsi"
> > +#include "sunxi-common-regulators.dtsi"
> > +
> > +#include <dt-bindings/gpio/gpio.h>
> > +#include <dt-bindings/input/input.h>
> > +#include <dt-bindings/interrupt-controller/irq.h>
> > +#include <dt-bindings/pwm/pwm.h>
> > +
> > +/{
> > +     model = "MSI Primo73 Tablet";
> > +     compatible = "msi,primo73", "allwinner,sun7i-a20";
> > +
> > +     aliases {
> > +             serial0 = &uart0;
> > +     };
> > +
> > +     backlight: backlight {
> > +             compatible = "pwm-backlight";
> > +             pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
> > +             enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
> > +     };
> > +
> > +     chosen {
> > +             stdout-path = "serial0:115200n8";
> > +     };
> > +
> > +     hdmi-connector {
> > +             compatible = "hdmi-connector";
> > +             type = "b";
> > +
> > +             port {
> > +                     hdmi_con_in: endpoint {
> > +                             remote-endpoint = <&hdmi_out_con>;
> > +                     };
> > +             };
> > +     };
> > +
> > +     panel: panel {
> > +             compatible = "os1n71j003", "panel-dpi";
> > +             backlight = <&backlight>;
> > +             power-supply = <&reg_vcc5v0>; /* Actually driven from IPSOUT */
> > +             enable-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
> > +             height-mm = <86>;
> > +             width-mm = <155>;
> > +             bits-per-color = <6>;
> > +
> > +             panel-timing {
> > +                     clock-frequency = <60000000>;
> > +                     hactive = <1024>;
> > +                     vactive = <600>;
> > +                     hfront-porch = <160>;
> > +                     hback-porch = <60>;
> > +                     hsync-len = <100>;
> > +                     vback-porch = <13>;
> > +                     vfront-porch = <10>;
> > +                     vsync-len = <10>;
> > +                     de-active = <1>;
> > +                     pixelclk-active = <0>;
> > +             };
>
> The clock frequency doesn't seem to match the rest of the timings
> though, it should be around 51MHz. Was this taken from the fex file too?

It was. I wonder if they somehow fixed up the timing in the driver.

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

      reply	other threads:[~2020-07-16  8:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14  7:13 [PATCH 0/5] ARM: sunxi: Add support for MSI Primo73 tablet Chen-Yu Tsai
2020-07-14  7:13 ` [PATCH 1/5] dt-bindings: display: panel-dpi: Add bits-per-color property Chen-Yu Tsai
2020-07-16  8:00   ` Maxime Ripard
2020-07-16  8:05     ` Chen-Yu Tsai
2020-07-21  2:10   ` Rob Herring
2020-07-21  9:23     ` Maxime Ripard
2020-07-21  9:40       ` Chen-Yu Tsai
2020-07-21 13:58       ` Rob Herring
2020-07-14  7:13 ` [PATCH 2/5] drm/panel: simple: Set bpc from bits-per-color DT property for panel-dpi Chen-Yu Tsai
2020-07-14  7:13 ` [PATCH 3/5] dt-bindings: arm: sunxi: Add compatible for MSI Primo73 tablet Chen-Yu Tsai
2020-07-21  2:10   ` Rob Herring
2020-07-14  7:13 ` [PATCH 4/5] ARM: dts: sun7i: Add LCD0 RGB888 pins Chen-Yu Tsai
2020-07-14  7:13 ` [PATCH 5/5] ARM: dts: sun7i: Add MSI Primo73 tablet Chen-Yu Tsai
2020-07-16  8:04   ` Maxime Ripard
2020-07-16  8:09     ` Chen-Yu Tsai [this message]

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=CAGb2v64d_nc2tPwLV6YeQuLjCxbTddEk0yGUtnGvJ8Pjk1FfYQ@mail.gmail.com \
    --to=wens@kernel.org \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maxime@cerno.tech \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=siarhei.siamashka@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).