devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rask Ingemann Lambertsen <rask@formelder.dk>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree <devicetree@vger.kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Lee Jones <lee.jones@linaro.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 5/5] ARM: dts: sun9i: Initial support for the Sunchip CX-A99 board
Date: Sun, 5 Feb 2017 20:23:14 +0100	[thread overview]
Message-ID: <20170205192313.iik7fdcygltpjfwt@localhost> (raw)
In-Reply-To: <CAGb2v65EAJBsNCDNSg=uNm3-h8xAKoiuS_rUdaWS8Be84WMvsQ@mail.gmail.com>

On Thu, Feb 02, 2017 at 03:36:41PM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> On Fri, Jan 27, 2017 at 5:27 AM, Rask Ingemann Lambertsen
> <rask@formelder.dk> wrote:
[...]
> > diff --git a/arch/arm/boot/dts/sun9i-a80-cx-a99.dts b/arch/arm/boot/dts/sun9i-a80-cx-a99.dts
> > new file mode 100644
> > index 0000000..8925093
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/sun9i-a80-cx-a99.dts
[...]
> > +       leds {
> > +               compatible = "gpio-leds";
> > +
> > +               blue {
> > +                       gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>;   /* PG10 */
> > +                       label = "cx-a99:blue:status";
> > +                       default-state = "on";
> 
> Please add a note justifying default-state = "on".

I think I'll remove it instead. The device ships with a U-Boot and Android
installation where blue means "on" and red means "stand-by" (which is simply
implemented by blanking the screen, it seems), but I doubt many people want
to run the rather old Android version available for this device. Instead,
I was going to point to the quick setup guide, but it has no mention of the
LEDs at all, so I guess the user won't expect the blue LED to turn on.

> > +       /* USB 3.0 OTG connector. For now, only Vbus is supported. */
> > +       reg_usb0_vbus: regulator-usb0-vbus {
> > +               compatible = "regulator-fixed";
> > +               regulator-name = "usb0-vbus";
> > +               regulator-min-microvolt = <5000000>;
> > +               regulator-max-microvolt = <5000000>;
> > +               gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>;    /* PH15 */
> > +               enable-active-high;
> > +               regulator-always-on;
> 
> It's bad to leave VBUS for OTG connectors on. You never know
> what is plugged in.

The comment is misleading as the connector is not an OTG one but just a
standard-A receptacle wired to the SoC's OTG port. I'll change the comment.

> > +/* SD card slot. */
> > +&mmc0 {
> > +       bus-width = <4>;
> > +       cd-gpios = <&pio 7 17 GPIO_ACTIVE_LOW>; /* PH17 */
> > +       broken-cd;                              /* Interrupts don't work. */
> 
> This should be handled by the driver.

The MMC core, without broken-cd, requests the GPIO driver to enable
interrupt delivery on the pin and will fall back to polling the GPIO pin
if the GPIO driver refuses to enable interrupt delivery. What I see is
that the GPIO driver accepts to deliver interrupts, but only the first
interrupt is triggered (as evident from /proc/interrupts showing only 1).
The vendor sys_config.fex also sets the GPIO pin to polled operation, so
maybe there is a hardware bug.

The sunxi-mmc driver doesn't really support operation with broken-cd only
because it spams the console and dmesg with useless error messages, see
https://www.mail-archive.com/linux-sunxi@googlegroups.com/msg19963.html
for an example.

The comment should probably read something like "GPIO pin delivers no
interrupts, poll it".

> > +                       /* 1.8 V (enabled). */
> > +                       reg_bldo1: bldo1 {
> > +                               regulator-boot-on;
> > +                               regulator-always-on;    /* Hang if disabled */
> 
> If you specify always-on, you don't need to add boot-on.

Ack.

> > +                       /* 3.3 V (enabled). */
> > +                       reg_dcdce: dcdce {
> > +                               regulator-boot-on;
> > +                               regulator-always-on;
> > +                               regulator-min-microvolt = <3300000>;
> > +                               regulator-max-microvolt = <3300000>;
> > +                               regulator-name = "vcc-pb-pc-pd-pe-pf-ph-mmc-spdif";
> 
> This is probably vcc-io or something shorter.

I'm verbose with the names of the regulators for documentation purposes
because unlike some of the boards aimed at developers, documentation is on
this device is scarse. I see that with -mmc now added after my latest round
of probing with a multimeter, the line went above 80 characters. Will it be
OK with vcc-pb,c,d,e,f,h-mmc-spdif?

-- 
Rask Ingemann Lambertsen

      reply	other threads:[~2017-02-05 19:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 21:22 [PATCH 0/5] arm: sun9i: Support AXP808 PMIC and Sunchip CX-A99 board Rask Ingemann Lambertsen
     [not found] ` <cover.1485456003.git.rask-SivP7zSAdNDZaaYASwVUlg@public.gmane.org>
2017-01-26 21:15   ` [PATCH 1/5] DT: mfd: axp20x: Add AXP806 to list of current AXP20x family members Rask Ingemann Lambertsen
2017-01-27  4:38     ` Chen-Yu Tsai
     [not found]     ` <abdfbac9a5f363ab6d338dd66d8fb138741f71c7.1485456005.git.rask-SivP7zSAdNDZaaYASwVUlg@public.gmane.org>
2017-02-01 13:26       ` Rob Herring
2017-01-26 21:16   ` [PATCH 2/5] DT: mfd: axp20x: Add binding for the AXP808 Rask Ingemann Lambertsen
     [not found]     ` <abb27901379a19a11608fd37254e1a8f7fa1b199.1485456006.git.rask-SivP7zSAdNDZaaYASwVUlg@public.gmane.org>
2017-02-01 13:27       ` Rob Herring
2017-02-02  7:20         ` Chen-Yu Tsai
2017-01-26 21:49   ` [PATCH 0/5] arm: sun9i: Support AXP808 PMIC and Sunchip CX-A99 board Rask Ingemann Lambertsen
2017-01-26 21:17 ` [PATCH 3/5] mfd: axp20x: Add support for the AXP808 PMIC Rask Ingemann Lambertsen
     [not found]   ` <e1d6d6acfaa95e214b6baa73a7edeaa8e6af3670.1485456006.git.rask-SivP7zSAdNDZaaYASwVUlg@public.gmane.org>
2017-02-02  7:23     ` Chen-Yu Tsai
     [not found]       ` <CAGb2v64O7wax5Pku=VVY3rgS2Ybm-=BDQQT+oB13FSGQHhtkiw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-03 21:47         ` Rask Ingemann Lambertsen
2017-01-26 21:18 ` [PATCH 4/5] regulator: " Rask Ingemann Lambertsen
2017-01-27 11:42   ` Mark Brown
     [not found]     ` <20170127114254.wk4j7lbczwo3g6pn-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2017-02-02  7:25       ` Chen-Yu Tsai
2017-01-26 21:27 ` [PATCH 5/5] ARM: dts: sun9i: Initial support for the Sunchip CX-A99 board Rask Ingemann Lambertsen
     [not found]   ` <82617383a0739458d5c9c95dccaf479675fce593.1485456007.git.rask-SivP7zSAdNDZaaYASwVUlg@public.gmane.org>
2017-02-02  7:36     ` Chen-Yu Tsai
2017-02-05 19:23       ` Rask Ingemann Lambertsen [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=20170205192313.iik7fdcygltpjfwt@localhost \
    --to=rask@formelder.dk \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.org \
    /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).