From: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 06/11] drivers: Add SPMI bus uclass
Date: Thu, 17 Dec 2015 00:09:54 +0100 [thread overview]
Message-ID: <5671EF42.5020703@gmail.com> (raw)
In-Reply-To: <CAPnjgZ16DH1t2bxZ9nA8HBnUrw8MXVu8YUqNfsViqYGYF4yNnA@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi Simon,
On 15.12.2015 19:58, Simon Glass wrote:
> Hi Matheusz,
>
> On 10 December 2015 at 14:41, Mateusz Kulikowski
> <mateusz.kulikowski@gmail.com> wrote:
[...]
>> +
>> +/**
>> + * struct dm_spmi_ops - SPMI device I/O interface
>> + *
>> + * Should be implemented by UCLASS_SPMI device drivers. The standard
>> + * device operations provides the I/O interface for it's childs.
>> + *
>> + * @read: read register
>> + * @write: write register
>
> You should describe the args also.
OK
>
> What is different between this and I2C? Could you use that uclass? It
> seems to have an additional address value (pid)- is that right?
That's a difficult question, as my knowledge about this bus is based only
on drivers/SoC documentation/speculation (bus spec is not public :()
At wiring level it looks exactly like multi-master I2C
On logical level:
- - Each bus can have several slaves (up to 16).
- - Each slave can have several peripherals (up to 256),
- - Each peripheral can have up to 256 registers (I think each is 8-bit wide).
- - Each peripheral have 2 ID registers (type/subtype) that can be used
for probing
PM8916 implements two slaves (but for some reason in Linux they are
presented as 2 sibling nodes on SPMI bus).
But this is device perspective.
On SoC side, implementation is different and I fully don't understand
all rationale behind it.
SoC has some kind of arbiter with 127 channels (2x - separate for
reads called "observers" and separate for writers).
Each peripheral (not slave) has assigned single channel that I have
to map in probe().
This means that (as far as I understand) there can be no more than
127 peripherals on single bus.
Weird think is that while doing reads/writes I have to use not
only channel #, but also full slave/peripheral/register address.
Perhaps my driver oversimplified SPMI, or maybe SPMI is just I2C,
using some simple protocol to charge royalty fees ;)
>
> If you do end up with a new uclass, please add a sandbox driver for it
> and a test.
OK
Thanks,
Mateusz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJWce82AAoJELvtohmVtQzBLUIH/1NX6eAd+eh+HTTdntsni109
yQKMJVPEE17znTtcYgW2hpgWLqUa9aZ6n97hWMiWF7N+3879kWJYLTgj2uFBiVgl
nXS8DFdfE7BQlzwVrGLIoaIXC7Jx7w3O/+9k7XsTaU2QcX7E+rWjyj/Y88Uq8oen
M/MdtU2eYY/SggdMd99dEn305LrhRpXhDx0qgPTwGGb7BPwB2Vfrvm7mUrXMGTTY
GMbiKsNuiYzNdXGz65gmZ6fHHQM6Gmm5Lh5GYftMnn0qQA6D8PcDm8h+it1eqoW3
t1VpCmCp7k6eGzM6m+scwFHu0mCeGeYhYD+vRZIbxX0lu5UWIUuakVdjpJmn9Ig=
=iZjm
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2015-12-16 23:09 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 21:41 [U-Boot] [RFC PATCH 00/11] Add support for 96boards Dragonboard410C board Mateusz Kulikowski
2015-12-10 21:41 ` [U-Boot] [RFC PATCH 01/11] serial: Add support for Qualcomm serial port Mateusz Kulikowski
2015-12-15 18:58 ` Simon Glass
2015-12-16 22:19 ` Mateusz Kulikowski
2015-12-21 6:50 ` Masahiro Yamada
2015-12-22 20:23 ` Simon Glass
2015-12-23 3:52 ` Masahiro Yamada
2015-12-27 16:51 ` Mateusz Kulikowski
2015-12-28 17:09 ` Masahiro Yamada
2015-12-28 4:29 ` Simon Glass
2015-12-28 17:13 ` Masahiro Yamada
2015-12-10 21:41 ` [U-Boot] [RFC PATCH 02/11] gpio: Add support for Qualcomm gpio controller Mateusz Kulikowski
2015-12-15 18:58 ` Simon Glass
2015-12-10 21:41 ` [U-Boot] [RFC PATCH 03/11] mmc: Add support for Qualcomm SDHCI controller Mateusz Kulikowski
2015-12-15 18:58 ` Simon Glass
2015-12-16 22:46 ` Mateusz Kulikowski
2015-12-18 22:41 ` Simon Glass
2015-12-19 11:21 ` Mateusz Kulikowski
2015-12-10 21:41 ` [U-Boot] [RFC PATCH 04/11] ehci-hcd: Add init_after_reset Mateusz Kulikowski
2015-12-10 23:14 ` Marek Vasut
2015-12-16 22:30 ` Tom Rini
2015-12-10 21:41 ` [U-Boot] [RFC PATCH 05/11] ehci: Add support for Qualcomm EHCI Mateusz Kulikowski
2015-12-10 23:22 ` Marek Vasut
2015-12-13 12:38 ` Mateusz Kulikowski
2015-12-13 15:48 ` Marek Vasut
2015-12-16 22:51 ` Mateusz Kulikowski
2015-12-10 21:41 ` [U-Boot] [RFC PATCH 06/11] drivers: Add SPMI bus uclass Mateusz Kulikowski
2015-12-15 18:58 ` Simon Glass
2015-12-16 23:09 ` Mateusz Kulikowski [this message]
2015-12-10 21:41 ` [U-Boot] [RFC PATCH 07/11] drivers: spmi: Add support for Qualcomm SPMI bus driver Mateusz Kulikowski
2015-12-10 21:41 ` [U-Boot] [RFC PATCH 08/11] pmic: Add support for Qualcomm PM8916 PMIC Mateusz Kulikowski
2015-12-15 18:58 ` Simon Glass
2015-12-10 21:41 ` [U-Boot] [RFC PATCH 09/11] gpio: Add support for Qualcomm PM8916 gpios Mateusz Kulikowski
2015-12-15 18:58 ` Simon Glass
2015-12-10 21:41 ` [U-Boot] [RFC PATCH 10/11] arm: Add support for Qualcomm Snapdragon family Mateusz Kulikowski
2015-12-16 22:29 ` Simon Glass
2015-12-19 12:12 ` Mateusz Kulikowski
2015-12-10 21:41 ` [U-Boot] [RFC PATCH 11/11] board: Add Qualcomm Dragonboard 410C support Mateusz Kulikowski
2015-12-16 22:29 ` Simon Glass
2015-12-19 12:24 ` Mateusz Kulikowski
2015-12-19 20:29 ` Simon Glass
2015-12-15 18:57 ` [U-Boot] [RFC PATCH 00/11] Add support for 96boards Dragonboard410C board sk.syed2
2015-12-15 21:25 ` Mateusz Kulikowski
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=5671EF42.5020703@gmail.com \
--to=mateusz.kulikowski@gmail.com \
--cc=u-boot@lists.denx.de \
/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