mbox series

[0/3] Enable hwlock on Allwinner A64

Message ID 20230213231931.6546-1-bage@debian.org (mailing list archive)
Headers show
Series Enable hwlock on Allwinner A64 | expand

Message

Bastian Germann Feb. 13, 2023, 11:19 p.m. UTC
The allwinner,sun6i-a31-hwspinlock compatible driver can be used with
the Allwinner A64 chip. Add the wiring required to enable it.

The device tree schema needs some work to verify everything that is
needed by the sun6i hwlock driver.

The hwlock device was verified to be available with this series applied
on a Pinebook.

Bastian Germann (3):
  dt-bindings: hwlock: sun6i: Add missing #hwlock-cells
  dt-bindings: hwlock: sun6i: Add missing names
  arm64: dts: allwinner: a64: Add hwspinlock node

 .../hwlock/allwinner,sun6i-a31-hwspinlock.yaml     | 14 ++++++++++++++
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi      | 10 ++++++++++
 2 files changed, 24 insertions(+)

Comments

Andre Przywara Feb. 14, 2023, 12:18 a.m. UTC | #1
On Tue, 14 Feb 2023 00:19:27 +0100
Bastian Germann <bage@debian.org> wrote:

Hi Bastian,

> The allwinner,sun6i-a31-hwspinlock compatible driver can be used with
> the Allwinner A64 chip. Add the wiring required to enable it.
> 
> The device tree schema needs some work to verify everything that is
> needed by the sun6i hwlock driver.
> 
> The hwlock device was verified to be available with this series applied
> on a Pinebook.

The changes look fine, but are there any actual users of this device?
The missing binding bits you fixed demonstrate that a driver/binding
without actual users can create problems.
So are there Linux/Crust patches out there that use this device?

Cheers,
Andre

> 
> Bastian Germann (3):
>   dt-bindings: hwlock: sun6i: Add missing #hwlock-cells
>   dt-bindings: hwlock: sun6i: Add missing names
>   arm64: dts: allwinner: a64: Add hwspinlock node
> 
>  .../hwlock/allwinner,sun6i-a31-hwspinlock.yaml     | 14 ++++++++++++++
>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi      | 10 ++++++++++
>  2 files changed, 24 insertions(+)
>
Bjorn Andersson Feb. 14, 2023, 8:57 p.m. UTC | #2
On Tue, 14 Feb 2023 00:19:27 +0100, Bastian Germann wrote:
> The allwinner,sun6i-a31-hwspinlock compatible driver can be used with
> the Allwinner A64 chip. Add the wiring required to enable it.
> 
> The device tree schema needs some work to verify everything that is
> needed by the sun6i hwlock driver.
> 
> The hwlock device was verified to be available with this series applied
> on a Pinebook.
> 
> [...]

Applied, thanks!

[1/3] dt-bindings: hwlock: sun6i: Add missing #hwlock-cells
      commit: 25d10262ed8aae71cd2f0b3c0a90d06a6b79fba2

Best regards,
Bastian Germann Feb. 14, 2023, 9:55 p.m. UTC | #3
Am 14.02.23 um 01:18 schrieb Andre Przywara:
> So are there Linux/Crust patches out there that use this device?

I do not know of any. I was just investigating the chip and checked the parts that I could easily use in Linux.
Wilken Gottwalt Feb. 15, 2023, 5:01 a.m. UTC | #4
On Tue, 14 Feb 2023 22:55:45 +0100
Bastian Germann <bage@debian.org> wrote:

> Am 14.02.23 um 01:18 schrieb Andre Przywara:
> > So are there Linux/Crust patches out there that use this device?
> 
> I do not know of any. I was just investigating the chip and checked the parts that I could easily
> use in Linux.

Easily using it is, well, a bit questionable. The only reason to use this is
for syncing access to hardware between the ARM and the embedded OpenRISC core.
Like Andre wrote, it only makes sense if you want to etablish some form of
shared access between Linux and the Crust firmware. Using this in Linux only
instead of the common spinlocks won't be fun, that hwspinlock unit is slower.

greetings,
Will
Andre Przywara Feb. 15, 2023, 10:31 p.m. UTC | #5
On Tue, 14 Feb 2023 12:57:06 -0800
Bjorn Andersson <andersson@kernel.org> wrote:

Hi Bjorn,

> On Tue, 14 Feb 2023 00:19:27 +0100, Bastian Germann wrote:
> > The allwinner,sun6i-a31-hwspinlock compatible driver can be used with
> > the Allwinner A64 chip. Add the wiring required to enable it.
> > 
> > The device tree schema needs some work to verify everything that is
> > needed by the sun6i hwlock driver.
> > 
> > The hwlock device was verified to be available with this series applied
> > on a Pinebook.
> > 
> > [...]  
> 
> Applied, thanks!
> 
> [1/3] dt-bindings: hwlock: sun6i: Add missing #hwlock-cells
>       commit: 25d10262ed8aae71cd2f0b3c0a90d06a6b79fba2

as you might have seen, this was a bit premature, as the example is
missing the newly required property, as pointed out by Rob[1].
Did you send a pull request including this patch already? Can you drop
this patch still from your tree? The fix is rather trivial, but the
patch is also not critical, since there is no DT user in the tree, and
the remaining series won't make it into v6.3 anyway.

Cheers,
Andre

[1]
https://lore.kernel.org/linux-remoteproc/167638944701.3666.5425414440419322569.robh@kernel.org/