From: Brandon Martin <martinbv-cvVvTOR6QHAqDJ6do+/SaQ@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] rtc: v3020: Add documentation for DT bindings
Date: Fri, 25 Aug 2017 18:36:20 -0400 [thread overview]
Message-ID: <59A0A664.7040904@mothictech.com> (raw)
In-Reply-To: <20170825215457.qcd5paiw5qtuybxv@rob-hp-laptop>
On 08/25/2017 05:54 PM, Rob Herring wrote:
>> +
>> +Required for MMIO connection:
>> + - reg : should contain registers location and length.
>
> Looking at the datasheet, there's really no such thing. You'd have to
> have some specialized h/w to generate the serial waveform.
If it's MMIO attached i.e. hooked up to a single data bit on an
otherwise multi-drop, flat addressed external bus, you do have to
specify the memory address at which one would access the device. Length
is irrelevant, yes, as it has but one externally-accessible "register"
in its memory map.
Is there a better way to handle this sort of thing than the typical
"reg" binding? It certainly seems to map nicely to ioremap().
>
>> +
>> +Required for GPIO connection:
>> +- emmicro,use-gpio
>> +- cs-gpios, wr-gpios, rd-gpios, io-gpios : specify gpios connected to
>> + corresponding pins of the RTC
>> +
>> +Optional properties:
>> +- emmicro,mmio-left-shift : data bit to which IO line is connected for MMIO
>> + connection (defaults to 0)
>
> This has come up several times on RTCs (LP8841, DS1302). This really
> looks like SPI and could probably use the spi-gpio bitbang driver.
Indeed it is perhaps like that.
This was a comparatively blind pass at DT-izing the existing driver
without other changes. It does work and has immediate application on a
mainline'd DT board: Compulab CM-T3517 which is in fact what I'm porting to.
I don't think you could use spi-gpio bitbang if you had it
memory-mapped, and there are actual platforms that do this. Some of
Compulab's older PXA based boards appear to do it, and they are in fact
the boards still using pdata rather than DT that caused me to keep that
around when doing this.
--
Brandon Martin
Mothic Technologies
317-565-1357 x7000
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-08-25 22:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 21:05 [PATCH 0/2] DT bindings for rtc-v3020 Brandon Martin
[not found] ` <b832db93-9885-adfe-39b4-1950851b391d-cvVvTOR6QHAqDJ6do+/SaQ@public.gmane.org>
2017-08-22 21:05 ` [PATCH 1/2] rtc: v3020: Add documentation for DT bindings Brandon Martin
[not found] ` <660fa006-4f91-2fb5-ef98-ba0482e1ecff-cvVvTOR6QHAqDJ6do+/SaQ@public.gmane.org>
2017-08-25 21:54 ` Rob Herring
2017-08-25 22:36 ` Brandon Martin [this message]
[not found] ` <59A0A664.7040904-cvVvTOR6QHAqDJ6do+/SaQ@public.gmane.org>
2017-08-28 18:36 ` Rob Herring
[not found] ` <CAL_JsqLgxQ1xKg6mWHQTjq-u3ukOu7n1kwBspVnpF6XDxWpVFw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-29 2:30 ` Brandon Martin
2017-08-22 21:06 ` [PATCH 2/2] rtc: v3020: " Brandon Martin
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=59A0A664.7040904@mothictech.com \
--to=martinbv-cvvvtor6qhaqdj6do+/saq@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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).