[linux-sunxi] Re: [PATCH v8 00/11] arm64: sunxi: Initial Allwinner H616 SoC support

2021-08-17 Thread Maxime Ripard
Hi Andre,

On Mon, Aug 02, 2021 at 01:38:51AM +0100, Andre Przywara wrote:
> On Mon, 26 Jul 2021 16:52:30 +0200
> Maxime Ripard  wrote:
> > On Fri, Jul 23, 2021 at 04:38:27PM +0100, Andre Przywara wrote:
> > > Hi,
> > > 
> > > another try on the basic Allwinner H616 support, now on top of 5.14-rc1.
> > > 
> > > This time I dropped the USB support from the basic series, to split off
> > > the discussion, and simplify the core SoC support. I will post the USB
> > > series soon, to be applied on top.
> > > I kept the RTC support in, even though this is still under discussion,
> > > because this is important to keep future DT files compatible with this
> > > kernel.  
> > 
> > Honestly, I don't want to support something we don't guarantee if it's
> > at the expense of making something we do guarantee more complicated.
> 
> I don't ask for or provide guarantees, but I think we can at least *try*
> to keep this compatible. This version works at the moment, and should
> also work with future DTs - within the limits of the current driver, so
> only using the RC clock. It allows to later improve the accuracy by
> adding better input clocks - and later DT/driver combinations can make
> use of this.

Again, at the expense of having to deal with more bindings combinations
in the driver. This driver is already a nightmare to get all the one we
have to support already. You asked to keep the same driver, fair enough,
but then let's do our best to not make the situation worse there.

> > Delaying the clock tree description to sometime in the future will only
> > further complicate the probe part of the driver, and there's far too
> > many special cases already.
> 
> I don't see how this would complicate probing beyond what Allwinner
> brought upon us already anyway: no LOSC crystal input in this package
> version, but having this pin in some other SoC sharing this die
> (according to some BSP) sources. We can't expect a super clean driver
> with those HW design choices.
> 
> If we really cannot keep the DT compatible, fair enough: that's what
> it is (there is no guarantee!), but at least we have tried.

I mean, we didn't really try though? The whole clock tree has basically
a big TODO all over it.

I know that it can be hard to figure out. It's why I suggested to rely
on fixed clock for the moment as placeholders to get the rest of the
series in. But for some reason you don't want to do that either.

Maxime

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/20210817073030.jcvpfipsikllursv%40gilmour.


signature.asc
Description: PGP signature


[linux-sunxi] Re: [PATCH v8 00/11] arm64: sunxi: Initial Allwinner H616 SoC support

2021-08-01 Thread Andre Przywara
On Mon, 26 Jul 2021 16:52:30 +0200
Maxime Ripard  wrote:

Hi,

> On Fri, Jul 23, 2021 at 04:38:27PM +0100, Andre Przywara wrote:
> > Hi,
> > 
> > another try on the basic Allwinner H616 support, now on top of 5.14-rc1.
> > 
> > This time I dropped the USB support from the basic series, to split off
> > the discussion, and simplify the core SoC support. I will post the USB
> > series soon, to be applied on top.
> > I kept the RTC support in, even though this is still under discussion,
> > because this is important to keep future DT files compatible with this
> > kernel.  
> 
> Honestly, I don't want to support something we don't guarantee if it's
> at the expense of making something we do guarantee more complicated.

I don't ask for or provide guarantees, but I think we can at least *try*
to keep this compatible. This version works at the moment, and should
also work with future DTs - within the limits of the current driver, so
only using the RC clock. It allows to later improve the accuracy by
adding better input clocks - and later DT/driver combinations can make
use of this.

> Delaying the clock tree description to sometime in the future will only
> further complicate the probe part of the driver, and there's far too
> many special cases already.

I don't see how this would complicate probing beyond what Allwinner
brought upon us already anyway: no LOSC crystal input in this package
version, but having this pin in some other SoC sharing this die
(according to some BSP) sources. We can't expect a super clean driver
with those HW design choices.

If we really cannot keep the DT compatible, fair enough: that's what
it is (there is no guarantee!), but at least we have tried.

Cheers,
Andre

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/20210802013851.13375f0f%40slackpad.fritz.box.


[linux-sunxi] Re: [PATCH v8 00/11] arm64: sunxi: Initial Allwinner H616 SoC support

2021-07-26 Thread Maxime Ripard
Hi,

On Fri, Jul 23, 2021 at 04:38:27PM +0100, Andre Przywara wrote:
> Hi,
> 
> another try on the basic Allwinner H616 support, now on top of 5.14-rc1.
> 
> This time I dropped the USB support from the basic series, to split off
> the discussion, and simplify the core SoC support. I will post the USB
> series soon, to be applied on top.
> I kept the RTC support in, even though this is still under discussion,
> because this is important to keep future DT files compatible with this
> kernel.

Honestly, I don't want to support something we don't guarantee if it's
at the expense of making something we do guarantee more complicated.

Delaying the clock tree description to sometime in the future will only
further complicate the probe part of the driver, and there's far too
many special cases already.

Maxime

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/20210726145230.uevhinsrvo7gtuty%40gilmour.


signature.asc
Description: PGP signature


[linux-sunxi] Re: [PATCH v8 00/11] arm64: sunxi: Initial Allwinner H616 SoC support

2021-07-25 Thread Icenowy Zheng
在 2021-07-23星期五的 16:38 +0100,Andre Przywara写道:
> Hi,
> 
> another try on the basic Allwinner H616 support, now on top of 5.14-
> rc1.
> 
> This time I dropped the USB support from the basic series, to split
> off
> the discussion, and simplify the core SoC support. I will post the
> USB
> series soon, to be applied on top.
> I kept the RTC support in, even though this is still under
> discussion,
> because this is important to keep future DT files compatible with
> this
> kernel. This gains one fix patch for the existing RTC driver.

Well, I think RTC is really a fundmental part of SoC support now.

I think if I post my R329 patchset, it will depend on this patchset's
RTC part (R329 has linear day too, although it still has external LOSC
(and even LOSC fanout) ).

BTW Thanks for your code ;-)

> 
> For a complete changelog, see below.
> 
> Based on 5.14-rc1. Let me know if you need a different base.
> Relies on this pinctrl fix:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2021-July/672813.html
> 
> Also available here: 
> https://github.com/apritzel/linux/commits/h616-v8
> 
> Thanks!
> Andre
> 
> ==
> This series gathers patches to support the Allwinner H616 SoC. This
> is
> a rather uninspired SoC (Quad-A53 with the usual peripherals), but
> allows for some cheap development boards and TV boxes, and supports
> up to 4GB of DRAM.
> 
> Some DT binding patches are sprinkled throughout the series, to add
> the new compatible names right before they are used.
> Patch 3-7 add support for the new RTC: the date is now stored as a
> linear number, not broken down into day-month-year. The benefit is
> that
> this lifts the limit of the old date counter, which would have rolled
> over around 2032. Also the alarm setting is using the same storage
> format as the current time, compared to the number of seconds left
> used
> in existing SoCs.
> Eventually we get the .dtsi for the SoC in patch 8, and the .dts for
> the OrangePi Zero2 board[1] in the penultimate patch, followed by
> the .dts for the X96 Mate TV box[2] in the final commit.
> 
> U-Boot and Trusted Firmware support is now merged in released
> versions,
> it allows booting via FEL or SD card, also you can TFTP kernels in on
> the OrangePi Zero 2 board.
> 
> Many thanks to Jernej for his tremendous help on this, also for the
> awesome input and help from the #linux-sunxi Freenode channel.
> 
> The whole series (including the pinctrl fix) can also be found here:
> https://github.com/apritzel/linux/commits/h616-v8
> 
> Happy reviewing!
> 
> Cheers,
> Andre
> 
> [1] https://linux-sunxi.org/Orange_Pi_Zero_2
> [2] https://linux-sunxi.org/X96_Mate
> 
> Changelog v7 .. v8:
> - Rebase on top of 5.14-rc1, which already includes the previous v7
> 02/19
> - Drop USB and Ethernet patches (to keep series small)
> - Use "clocks: false" in RTC DT binding (2/11)
> - Include fix for RTC overflow check (3/11)
> - Use div_64() to avoid linking error on some 32-bit platforms
> (4+5/11)
> - Adjust to changed RTC overflow check (5/11)
> - Drop USB nodes from .dtsi file
> - Move mmc-ddr-1_8v property from .dtsi file into board .dts
> - Fix DTC warnings (underscore in node name, soc@0, #a-c in IRQ
> controllers)
> 
> Changelog v6 .. v7:
> - Fix AXP305 binding documentation blunder (01/19)
> - Improve new linear day support (use existing conversion functions)
> (04/19)
> - Add support for changed RTC alarm registers (05/19)
> - Add support for RTCs without a LOSC clock (06/19)
> - Rework USB PHY2 SIDDQ quirk to use PHY clocks directly (14/19)
> - Add X96 Mate compatible string to binding doc (17/19)
> - Add Rob's ACKs
> 
> Changelog v5 .. v6:
> - Drop already merged clock, pinctrl and MMC support from this series
> - Properly fix AXP support by skipping power key initialisation
> - Add patch to support new RTC date storage encoding
> - Re-add USB HCI PHY refactoring
> - Add patch to allow USB reset line sharing
> - Add patch to introduce quirk for PHY2 SIDDQ clearing
> - Re-add USB nodes to the .dtsi
> - Add USB gadget support
> - Add DT for X96 Mate TV box
> 
> Changelog v4 .. v5:
> - Fix CCU binding to pass dtbs_check
> - Add RSB compatible string to binding doc
> - Rename IR pin name to pass dtbs_check
> - Add EMAC compatible string to binding doc
> - Drop USB PHY support and binding doc patches 
> - Drop USB nodes from .dtsi and .dts
> - Drop second EMAC node from .dtsi
> 
> Changelog v3 .. v4:
> - Drop MMC and pinctrl matches (already in some -next trees)
> - Add Maxime's Acks
> - Add patch to update the AXP MFD DT bindings
> - Add new patch (05/21) to fix axp20x-pek driver
> - Change AXP IRQ fix to check for invalid IRQ line number
> - Split joint DT bindings patch (v3 18/21) into subsystems
> - move dwmac variable to keep christmas tree
> - Use enums for USB PHY compatible strings in DT binding
> - Enable watchdog (briefly verified to work)
> - Add PHY2 to HCI1&3, this fixes USB
> - limit r-ccu register frame length to not collide with NMI
>