mbox series

[RFC,00/12] Support for Allwinner V831 SoC

Message ID 20201212040157.3639864-1-icenowy@aosc.io
Headers show
Series Support for Allwinner V831 SoC | expand

Message

Icenowy Zheng Dec. 12, 2020, 4:01 a.m. UTC
Allwinner V831 is a new SoC by Allwinner oriented at the camera market.
It has a QFN88 package with co-packaged 64MiB DDR2 DRAM. Another SoC,
V833, is also available, which has the same die with V831 but w/o
co-packaged DRAM (thus a BGA package).

This patchset tries to add basical support for V831, with consideration
of V833 in many drivers.

The DT is only for a temporary test device w/o schematics, development
will be shifted to another device when the patchset leaves RFC.

Icenowy Zheng (12):
  dt-bindings: clock: sunxi-ng: add compatible for V831/V833 CCU
  dt-bindings: clk: sunxi-ng: add V833 CCU clock/reset indices headers
  clk: sunxi-ng: add CCU driver for V831/V833
  dt-bindings: pinctrl: sunxi: add compatible for V831/V833 pinctrl
  pinctrl: sunxi: add pinctrl driver for V831/V833
  dt-bindings: rtc: sun6i: add compatible string for V831/V833 RTC
  rtc: sun6i: add compatible string for V831/V833 RTC
  dt-bindings: mmc: sunxi: add compatible strings for V831 MMC
  dt-bindings: watchdog: sunxi: add compatible string for V831/V833 WDT
  dt-bindings: spi: sun6i: add compatible for V831 SPI
  ARM: dts: sun8i: add DTSI file for V831
  [DO NOT MERGE] ARM: dts: sun8i: v831: add a device tree file for Y20GA

 .../clock/allwinner,sun4i-a10-ccu.yaml        |   2 +
 .../bindings/mmc/allwinner,sun4i-a10-mmc.yaml |   3 +
 .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml  |   4 +
 .../bindings/rtc/allwinner,sun6i-a31-rtc.yaml |   2 +
 .../bindings/spi/allwinner,sun6i-a31-spi.yaml |   1 +
 .../watchdog/allwinner,sun4i-a10-wdt.yaml     |   3 +
 arch/arm/boot/dts/Makefile                    |   3 +-
 arch/arm/boot/dts/sun8i-v831-yi-y20ga.dts     |  53 +
 arch/arm/boot/dts/sun8i-v831.dtsi             | 244 +++++
 drivers/clk/sunxi-ng/Kconfig                  |   5 +
 drivers/clk/sunxi-ng/Makefile                 |   1 +
 drivers/clk/sunxi-ng/ccu-sun8i-v833.c         | 930 ++++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun8i-v833.h         |  46 +
 drivers/pinctrl/sunxi/Kconfig                 |   5 +
 drivers/pinctrl/sunxi/Makefile                |   1 +
 drivers/pinctrl/sunxi/pinctrl-sun8i-v83x.c    | 743 ++++++++++++++
 drivers/pinctrl/sunxi/pinctrl-sunxi.h         |   2 +
 drivers/rtc/rtc-sun6i.c                       |  18 +
 include/dt-bindings/clock/sun8i-v833-ccu.h    |  89 ++
 include/dt-bindings/reset/sun8i-v833-ccu.h    |  52 +
 20 files changed, 2206 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun8i-v831-yi-y20ga.dts
 create mode 100644 arch/arm/boot/dts/sun8i-v831.dtsi
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun8i-v833.c
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun8i-v833.h
 create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun8i-v83x.c
 create mode 100644 include/dt-bindings/clock/sun8i-v833-ccu.h
 create mode 100644 include/dt-bindings/reset/sun8i-v833-ccu.h

Comments

Maxime Ripard Dec. 14, 2020, 2:21 p.m. UTC | #1
On Sat, Dec 12, 2020 at 12:04:23PM +0800, Icenowy Zheng wrote:
> V831/V833 are new chips from Allwinner. They're the same die with
> different package.
> 
> Add a pinctrl driver for them.
> 
> The difference between V831/V833 pinctrl is implemented based on the
> user manual.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
>  drivers/pinctrl/sunxi/Kconfig              |   5 +
>  drivers/pinctrl/sunxi/Makefile             |   1 +
>  drivers/pinctrl/sunxi/pinctrl-sun8i-v83x.c | 743 +++++++++++++++++++++
>  drivers/pinctrl/sunxi/pinctrl-sunxi.h      |   2 +
>  4 files changed, 751 insertions(+)
>  create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun8i-v83x.c
> 
> diff --git a/drivers/pinctrl/sunxi/Kconfig b/drivers/pinctrl/sunxi/Kconfig
> index 593293584ecc..fc13335a3eda 100644
> --- a/drivers/pinctrl/sunxi/Kconfig
> +++ b/drivers/pinctrl/sunxi/Kconfig
> @@ -73,6 +73,11 @@ config PINCTRL_SUN8I_V3S
>  	default MACH_SUN8I
>  	select PINCTRL_SUNXI
>  
> +config PINCTRL_SUN8I_V83X
> +	bool "Support for the Allwinner V831/V833 PIO"
> +	default MACH_SUN8I
> +	select PINCTRL_SUNXI
> +

We're not using the wildcard much, and I'd rather be consistent with the
name / Kconfig option scheme used for the clock driver (and the rest of
the SoCs in a similar situation)

Maxime
Maxime Ripard Dec. 14, 2020, 2:39 p.m. UTC | #2
On Sat, Dec 12, 2020 at 01:12:01PM +0800, Icenowy Zheng wrote:
> +		spi0: spi@5010000 {
> +			compatible = "allwinner,sun8i-v831-spi",
> +				     "allwinner,sun50i-h6-spi",
> +				     "allwinner,sun8i-h3-spi";

That's not the compatible you've documented in the binding

Maxime
Icenowy Zheng Dec. 14, 2020, 3:19 p.m. UTC | #3
于 2020年12月14日 GMT+08:00 下午10:21:18, Maxime Ripard <maxime@cerno.tech> 写到:
>On Sat, Dec 12, 2020 at 12:04:23PM +0800, Icenowy Zheng wrote:
>> V831/V833 are new chips from Allwinner. They're the same die with
>> different package.
>> 
>> Add a pinctrl driver for them.
>> 
>> The difference between V831/V833 pinctrl is implemented based on the
>> user manual.
>> 
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: linux-gpio@vger.kernel.org
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> ---
>>  drivers/pinctrl/sunxi/Kconfig              |   5 +
>>  drivers/pinctrl/sunxi/Makefile             |   1 +
>>  drivers/pinctrl/sunxi/pinctrl-sun8i-v83x.c | 743
>+++++++++++++++++++++
>>  drivers/pinctrl/sunxi/pinctrl-sunxi.h      |   2 +
>>  4 files changed, 751 insertions(+)
>>  create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun8i-v83x.c
>> 
>> diff --git a/drivers/pinctrl/sunxi/Kconfig
>b/drivers/pinctrl/sunxi/Kconfig
>> index 593293584ecc..fc13335a3eda 100644
>> --- a/drivers/pinctrl/sunxi/Kconfig
>> +++ b/drivers/pinctrl/sunxi/Kconfig
>> @@ -73,6 +73,11 @@ config PINCTRL_SUN8I_V3S
>>  	default MACH_SUN8I
>>  	select PINCTRL_SUNXI
>>  
>> +config PINCTRL_SUN8I_V83X
>> +	bool "Support for the Allwinner V831/V833 PIO"
>> +	default MACH_SUN8I
>> +	select PINCTRL_SUNXI
>> +
>
>We're not using the wildcard much, and I'd rather be consistent with
>the
>name / Kconfig option scheme used for the clock driver (and the rest of
>the SoCs in a similar situation)

Well, call everything V831, or call everything V833, or call things usable 
on V831 V831 and things only available to V833 V833?

>
>Maxime
Maxime Ripard Dec. 14, 2020, 4:42 p.m. UTC | #4
On Mon, Dec 14, 2020 at 11:19:48PM +0800, Icenowy Zheng wrote:
> 
> 
> 于 2020年12月14日 GMT+08:00 下午10:21:18, Maxime Ripard <maxime@cerno.tech> 写到:
> >On Sat, Dec 12, 2020 at 12:04:23PM +0800, Icenowy Zheng wrote:
> >> V831/V833 are new chips from Allwinner. They're the same die with
> >> different package.
> >> 
> >> Add a pinctrl driver for them.
> >> 
> >> The difference between V831/V833 pinctrl is implemented based on the
> >> user manual.
> >> 
> >> Cc: Linus Walleij <linus.walleij@linaro.org>
> >> Cc: linux-gpio@vger.kernel.org
> >> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> >> ---
> >>  drivers/pinctrl/sunxi/Kconfig              |   5 +
> >>  drivers/pinctrl/sunxi/Makefile             |   1 +
> >>  drivers/pinctrl/sunxi/pinctrl-sun8i-v83x.c | 743
> >+++++++++++++++++++++
> >>  drivers/pinctrl/sunxi/pinctrl-sunxi.h      |   2 +
> >>  4 files changed, 751 insertions(+)
> >>  create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun8i-v83x.c
> >> 
> >> diff --git a/drivers/pinctrl/sunxi/Kconfig
> >b/drivers/pinctrl/sunxi/Kconfig
> >> index 593293584ecc..fc13335a3eda 100644
> >> --- a/drivers/pinctrl/sunxi/Kconfig
> >> +++ b/drivers/pinctrl/sunxi/Kconfig
> >> @@ -73,6 +73,11 @@ config PINCTRL_SUN8I_V3S
> >>  	default MACH_SUN8I
> >>  	select PINCTRL_SUNXI
> >>  
> >> +config PINCTRL_SUN8I_V83X
> >> +	bool "Support for the Allwinner V831/V833 PIO"
> >> +	default MACH_SUN8I
> >> +	select PINCTRL_SUNXI
> >> +
> >
> >We're not using the wildcard much, and I'd rather be consistent with
> >the
> >name / Kconfig option scheme used for the clock driver (and the rest of
> >the SoCs in a similar situation)
> 
> Well, call everything V831, or call everything V833, or call things usable 
> on V831 V831 and things only available to V833 V833?

It would feel more natural to have everything called v831, with things
v833-specific obviously called v833

Maxime
Linus Walleij Jan. 4, 2021, 2:47 p.m. UTC | #5
Hi Icenowy,

On Sat, Dec 12, 2020 at 5:04 AM Icenowy Zheng <icenowy@aosc.io> wrote:

> V831/V833 are new chips from Allwinner. They're the same die with
> different package.
>
> Add a pinctrl driver for them.
>
> The difference between V831/V833 pinctrl is implemented based on the
> user manual.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: linux-gpio@vger.kernel.org
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>

Could you respin patches 4 & 5 with Maxime's comments
addressed and include Rob's ACK on patch 4? Also please rebase on v5.11-rc1.

I suppose these two patches are independent from the rest of the stuff
in the series so it can be managed separately?

Yours.
Linus Walleij