All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Samuel Holland <samuel@sholland.org>
Cc: Chen-Yu Tsai <wens@csie.org>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Andre Przywara <andre.przywara@arm.com>
Subject: Re: [PATCH 0/3] Allwinner sunxi message box support
Date: Thu, 1 Mar 2018 11:28:36 +0100	[thread overview]
Message-ID: <20180301102836.odxjy4lak2spujii@flea> (raw)
In-Reply-To: <398d54c4-8bfc-c459-f7d4-fba4665d1250@sholland.org>

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

Hi,

On Wed, Feb 28, 2018 at 11:18:50AM -0600, Samuel Holland wrote:
> On 02/28/18 02:24, Maxime Ripard wrote:
> > On Tue, Feb 27, 2018 at 08:27:11PM -0600, Samuel Holland wrote:
> >> This series adds support for the "hardware message box" in recent
> >> Allwinner sunxi SoCs, used for communication with the ARISC management
> >> processor (the platform's equivalent of the ARM SCP). The end goal is to
> >> use the arm_scpi driver as a client, communicating with firmware running
> >> on the ARISC CPU.
> >>
> >> This driver has been tested with the base arm_scpi driver (which sends
> >> the SCPI_CMD_SCPI_CAPABILITIES command at probe time) and an in-progress
> >> firmware application running on the ARISC CPU. Because no firmware for
> >> the other end of the mailbox is complete at the moment, I have not
> >> included changes to the SoC device trees.
> > 
> > This is not directly related to this series, but what is your end goal
> > with regard to SCPI? What features do you expect to have there?
> 
> Current plans are to support in SCPI:
> - SMP bringup and CPU hotplug (via PSCI in ATF)
> - System reset and poweroff (via PSCI in ATF)
> - System standby and suspend (via PSCI in ATF)
> - DVFS for ARM CPUs
> - Clock control for clocks in R_PRCM (e.g. R_CIR_RX)
> - Thermal sensor reading
> 
> Other planned features of the firmware:
> - System wakeup from poweroff (via GPIO or interrupt to firmware)
> - System power/suspend LED control (connected to GPIO or PMIC GPIO)
> - Polling of thermal sensor in firmware for thermal throttling

Nice.

> > I'm asking because last time we discussed this, SCPI wasn't able to abstract
> > all the features the PMIC provides, and thus Linux needed to still be able to
> > access it.
> 
> This should only be an issue for devices with AXP PMICs.

So this should only be an issue for most devices out there :)

> Other devices with GPIO or simple I²C regulator control, such as H3
> and H5 boards, can have all necessary features described with
> standard SCPI commands. SCPI provides for 127 vendor-defined
> "extended" commands, which could be used to build a full AXP PMIC
> driver, or simply provide commands to read/write PMIC registers.

So I'm not sure whether it was your plan, but the last plan that was
discussed was that the whole RSB bus would be put outside of Linux
control, hence why I was asking.

And in this case the RSB bus is used to access the PMIC, but also its
secondary devices such as the audio codec on the AC100/AC200, so we
really need to have access to the RSB bus in Linux. If you can
implement that through custom SCPI commands, that works for me though.

Another thing that I'm not quire sure about is how would interrupts be
reported throuh that mecanism? We want to use the PMIC as an interrupt
controller for things like VBUS detection, GPIOs or the Jack detect in
the codec. Is that doable?

> For the moment I'm not concerned with battery powered devices. So
> right now the relevant boards either a) don't have a PMIC, or b) can
> have everything but DVFS voltage hard-coded in the firmware.

I wasn't asking you to implement everything from the start, just that
you consider the rest in your design.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@bootlin.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/3] Allwinner sunxi message box support
Date: Thu, 1 Mar 2018 11:28:36 +0100	[thread overview]
Message-ID: <20180301102836.odxjy4lak2spujii@flea> (raw)
In-Reply-To: <398d54c4-8bfc-c459-f7d4-fba4665d1250@sholland.org>

Hi,

On Wed, Feb 28, 2018 at 11:18:50AM -0600, Samuel Holland wrote:
> On 02/28/18 02:24, Maxime Ripard wrote:
> > On Tue, Feb 27, 2018 at 08:27:11PM -0600, Samuel Holland wrote:
> >> This series adds support for the "hardware message box" in recent
> >> Allwinner sunxi SoCs, used for communication with the ARISC management
> >> processor (the platform's equivalent of the ARM SCP). The end goal is to
> >> use the arm_scpi driver as a client, communicating with firmware running
> >> on the ARISC CPU.
> >>
> >> This driver has been tested with the base arm_scpi driver (which sends
> >> the SCPI_CMD_SCPI_CAPABILITIES command at probe time) and an in-progress
> >> firmware application running on the ARISC CPU. Because no firmware for
> >> the other end of the mailbox is complete at the moment, I have not
> >> included changes to the SoC device trees.
> > 
> > This is not directly related to this series, but what is your end goal
> > with regard to SCPI? What features do you expect to have there?
> 
> Current plans are to support in SCPI:
> - SMP bringup and CPU hotplug (via PSCI in ATF)
> - System reset and poweroff (via PSCI in ATF)
> - System standby and suspend (via PSCI in ATF)
> - DVFS for ARM CPUs
> - Clock control for clocks in R_PRCM (e.g. R_CIR_RX)
> - Thermal sensor reading
> 
> Other planned features of the firmware:
> - System wakeup from poweroff (via GPIO or interrupt to firmware)
> - System power/suspend LED control (connected to GPIO or PMIC GPIO)
> - Polling of thermal sensor in firmware for thermal throttling

Nice.

> > I'm asking because last time we discussed this, SCPI wasn't able to abstract
> > all the features the PMIC provides, and thus Linux needed to still be able to
> > access it.
> 
> This should only be an issue for devices with AXP PMICs.

So this should only be an issue for most devices out there :)

> Other devices with GPIO or simple I?C regulator control, such as H3
> and H5 boards, can have all necessary features described with
> standard SCPI commands. SCPI provides for 127 vendor-defined
> "extended" commands, which could be used to build a full AXP PMIC
> driver, or simply provide commands to read/write PMIC registers.

So I'm not sure whether it was your plan, but the last plan that was
discussed was that the whole RSB bus would be put outside of Linux
control, hence why I was asking.

And in this case the RSB bus is used to access the PMIC, but also its
secondary devices such as the audio codec on the AC100/AC200, so we
really need to have access to the RSB bus in Linux. If you can
implement that through custom SCPI commands, that works for me though.

Another thing that I'm not quire sure about is how would interrupts be
reported throuh that mecanism? We want to use the PMIC as an interrupt
controller for things like VBUS detection, GPIOs or the Jack detect in
the codec. Is that doable?

> For the moment I'm not concerned with battery powered devices. So
> right now the relevant boards either a) don't have a PMIC, or b) can
> have everything but DVFS voltage hard-coded in the firmware.

I wasn't asking you to implement everything from the start, just that
you consider the rest in your design.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180301/25b77551/attachment.sig>

  reply	other threads:[~2018-03-01 10:28 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  2:27 [PATCH 0/3] Allwinner sunxi message box support Samuel Holland
2018-02-28  2:27 ` Samuel Holland
2018-02-28  2:27 ` [PATCH 1/3] dt-bindings: Add a binding for the sunxi message box Samuel Holland
2018-02-28  2:27   ` Samuel Holland
2018-02-28  8:28   ` Maxime Ripard
2018-02-28  8:28     ` Maxime Ripard
2018-02-28 17:17     ` Andre Przywara
2018-02-28 17:17       ` Andre Przywara
2018-03-01 10:03       ` Maxime Ripard
2018-03-01 10:03         ` Maxime Ripard
2018-02-28 17:52     ` Samuel Holland
2018-02-28 17:52       ` Samuel Holland
2018-02-28  2:27 ` [PATCH 2/3] mailbox: Avoid NULL dereference in mbox_chan_received_data Samuel Holland
2018-02-28  2:27   ` Samuel Holland
2018-02-28 17:17   ` Andre Przywara
2018-02-28 17:17     ` Andre Przywara
2018-03-01 13:32   ` Jassi Brar
2018-03-01 13:32     ` Jassi Brar
2018-02-28  2:27 ` [PATCH 3/3] mailbox: sunxi-msgbox: Add a new mailbox driver Samuel Holland
2018-02-28  2:27   ` Samuel Holland
2018-02-28  8:32   ` Maxime Ripard
2018-02-28  8:32     ` Maxime Ripard
2018-02-28 17:19     ` Samuel Holland
2018-02-28 17:19       ` Samuel Holland
2018-03-01 10:32       ` Maxime Ripard
2018-03-01 10:32         ` Maxime Ripard
2018-03-01 11:32         ` Andre Przywara
2018-03-01 11:32           ` Andre Przywara
2018-03-01 11:51           ` Maxime Ripard
2018-03-01 11:51             ` Maxime Ripard
2018-02-28  9:16   ` Jassi Brar
2018-02-28  9:16     ` Jassi Brar
2018-02-28 17:51     ` Samuel Holland
2018-02-28 17:51       ` Samuel Holland
2018-02-28 18:14       ` Jassi Brar
2018-02-28 18:14         ` Jassi Brar
2018-02-28 18:14         ` Jassi Brar
2018-02-28 18:56         ` Samuel Holland
2018-02-28 18:56           ` Samuel Holland
2018-02-28 18:56           ` Samuel Holland
2018-03-01  5:22           ` Jassi Brar
2018-03-01  5:22             ` Jassi Brar
2018-03-01  5:22             ` Jassi Brar
2018-02-28  8:24 ` [PATCH 0/3] Allwinner sunxi message box support Maxime Ripard
2018-02-28  8:24   ` Maxime Ripard
2018-02-28 17:18   ` Samuel Holland
2018-02-28 17:18     ` Samuel Holland
2018-03-01 10:28     ` Maxime Ripard [this message]
2018-03-01 10:28       ` Maxime Ripard

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=20180301102836.odxjy4lak2spujii@flea \
    --to=maxime.ripard@bootlin.com \
    --cc=andre.przywara@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=samuel@sholland.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 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.