mbox series

[00/12] Support for Allwinner V853 SoC

Message ID 20250110123923.270626-1-szemzo.andras@gmail.com (mailing list archive)
Headers show
Series Support for Allwinner V853 SoC | expand

Message

Andras Szemzo Jan. 10, 2025, 12:39 p.m. UTC
V85x is a device from Allwinner with video encoding targeted for the field of
IP Camera. It integrates the single CA7 core, and a T-Head E907 RISC-V mcu.
The SoC has the usual Allwinner peripherals and a Vivante NPU.
V853 is a BGA package without DRAM, V851s/V851s3 has the same die with
co-packaged 64MB/128MB DRAM (in a QFN88 package).

This patchset tries to add basical support for the V853 device family.
For review the ccu driver, I added a clk_summary debug output, maybe it'll help. [1]

PS:
As this is my first patchset, sorry for the rookie mistakes...

Andras Szemzo (12):
  clk: sunxi-ng: allow key feature in ccu reset
  dt-bindings: pinctrl: sunxi: add compatible for V853
  pinctrl: sunxi: add driver for Allwinner V853.
  dt-bindings: clock: sunxi-ng: add compatibles for V853
  clk: sunxi-ng: add CCU drivers for V853
  dt-bindings: clk: sunxi-ng: add V853 CCU clock/reset
  devicetree: bindings: power: add v853 ppu
  pmdomain: sunxi: add V853 ppu support
  dt-bindings: power: add V853 ppu bindings
  dt-bindings: phy: allwinner: add v853 usb phy
  phy: allwinner: add v853 usb phy compatible
  ARM: dts: sun8i: add DTSI file for V853

 .../clock/allwinner,sun4i-a10-ccu.yaml        |    2 +
 .../phy/allwinner,sun8i-v853-usb-phy.yaml     |   89 ++
 .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml  |   13 +
 .../power/allwinner,sun20i-d1-ppu.yaml        |    1 +
 arch/arm/boot/dts/allwinner/sun8i-v853.dtsi   |  673 ++++++++++
 drivers/clk/sunxi-ng/Kconfig                  |   10 +
 drivers/clk/sunxi-ng/Makefile                 |    4 +
 drivers/clk/sunxi-ng/ccu-sun8i-v853-r.c       |   95 ++
 drivers/clk/sunxi-ng/ccu-sun8i-v853-r.h       |   15 +
 drivers/clk/sunxi-ng/ccu-sun8i-v853.c         | 1145 +++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun8i-v853.h         |   14 +
 drivers/clk/sunxi-ng/ccu_common.h             |    2 +
 drivers/clk/sunxi-ng/ccu_mux.c                |    4 +-
 drivers/clk/sunxi-ng/ccu_reset.c              |    7 +
 drivers/clk/sunxi-ng/ccu_reset.h              |    1 +
 drivers/phy/allwinner/phy-sun4i-usb.c         |   10 +
 drivers/pinctrl/sunxi/Kconfig                 |    5 +
 drivers/pinctrl/sunxi/Makefile                |    1 +
 drivers/pinctrl/sunxi/pinctrl-sun8i-v853.c    |  980 ++++++++++++++
 drivers/pinctrl/sunxi/pinctrl-sunxi.h         |    1 +
 drivers/pmdomain/sunxi/sun20i-ppu.c           |   15 +
 include/dt-bindings/clock/sun8i-v853-ccu.h    |  132 ++
 include/dt-bindings/clock/sun8i-v853-r-ccu.h  |   16 +
 .../power/allwinner,sun8i-v853-ppu.h          |   10 +
 include/dt-bindings/reset/sun8i-v853-ccu.h    |   62 +
 include/dt-bindings/reset/sun8i-v853-r-ccu.h  |   14 +
 26 files changed, 3318 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/allwinner,sun8i-v853-usb-phy.yaml
 create mode 100644 arch/arm/boot/dts/allwinner/sun8i-v853.dtsi
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun8i-v853-r.c
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun8i-v853-r.h
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun8i-v853.c
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun8i-v853.h
 create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun8i-v853.c
 create mode 100644 include/dt-bindings/clock/sun8i-v853-ccu.h
 create mode 100644 include/dt-bindings/clock/sun8i-v853-r-ccu.h
 create mode 100644 include/dt-bindings/power/allwinner,sun8i-v853-ppu.h
 create mode 100644 include/dt-bindings/reset/sun8i-v853-ccu.h
 create mode 100644 include/dt-bindings/reset/sun8i-v853-r-ccu.h

[1]:
                                 enable  prepare  protect                                duty  hardware                            connection
   clock                          count    count    count        rate   accuracy phase  cycle    enable   consumer                         id
---------------------------------------------------------------------------------------------------------------------------------------------
 iosc                                1       1        0        16000000    300000000  0     50000      Y   deviceless                      no_connection_id         
    iosc-32k                         1       1        0        31250       300000000  0     50000      Y      deviceless                      no_connection_id         
       osc32k                        1       1        0        31250       300000000  0     50000      Y         deviceless                      no_connection_id         
          fanout2                    0       0        0        31250       300000000  0     50000      N            deviceless                      no_connection_id         
          fanout1                    0       0        0        31250       300000000  0     50000      N            deviceless                      no_connection_id         
          fanout0                    0       0        0        31250       300000000  0     50000      N            deviceless                      no_connection_id         
          rtc-32k                    1       1        0        31250       300000000  0     50000      Y            deviceless                      no_connection_id         
          osc32k-fanout              0       0        0        31250       300000000  0     50000      N            deviceless                      no_connection_id         
 osc24M                              9       9        0        24000000    0          0     50000      Y   timer@2050000                   no_connection_id         
                                                                                                           deviceless                      no_connection_id         
    fanout-12M                       0       0        0        12000000    0          0     50000      N      deviceless                      no_connection_id         
    fanout-24M                       0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    riscv-cpu                        0       0        0        24000000    0          0     50000      Y      deviceless                      no_connection_id         
       riscv-axi                     0       0        0        12000000    0          0     50000      Y         deviceless                      no_connection_id         
    csi-mclk2                        0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    csi-mclk1                        0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    csi-mclk0                        0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    mipi-dsi                         0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    spif                             0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    spi3                             0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    spi2                             0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    spi1                             0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    mmc2                             0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    avs                              0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    apb1                             1       1        0        24000000    0          0     50000      Y      deviceless                      no_connection_id         
       bus-i2c4                      0       0        0        24000000    0          0     50000      N         deviceless                      no_connection_id         
       bus-i2c3                      0       0        0        24000000    0          0     50000      N         deviceless                      no_connection_id         
       bus-i2c2                      0       0        0        24000000    0          0     50000      N         2502800.i2c                     no_connection_id         
                                                                                                                 deviceless                      no_connection_id         
       bus-i2c1                      0       0        0        24000000    0          0     50000      N         deviceless                      no_connection_id         
       bus-i2c0                      0       0        0        24000000    0          0     50000      N         deviceless                      no_connection_id         
       bus-uart3                     0       0        0        24000000    0          0     50000      N         deviceless                      no_connection_id         
       bus-uart2                     1       1        0        24000000    0          0     50000      Y         2500800.serial                  no_connection_id         
                                                                                                                 deviceless                      no_connection_id         
       bus-uart1                     0       0        0        24000000    0          0     50000      N         deviceless                      no_connection_id         
       bus-uart0                     0       0        0        24000000    0          0     50000      N         deviceless                      no_connection_id         
    pll-npu-4x                       1       1        0        1392000000  0          0     50000      Y      deviceless                      no_connection_id         
       npu                           1       1        0        348000000   0          0     50000      Y         3050000.npu                     core                     
                                                                                                                 deviceless                      no_connection_id         
    pll-audio-div5                   0       0        0        614400000   0          0     50000      N      deviceless                      no_connection_id         
       pll-audio-1x                  0       0        0        614400000   0          0     50000      Y         deviceless                      no_connection_id         
          audio-codec-adc            0       0        0        614400000   0          0     50000      N            deviceless                      no_connection_id         
          audio-codec-dac            0       0        0        614400000   0          0     50000      N            deviceless                      no_connection_id         
          dmic                       0       0        0        614400000   0          0     50000      N            deviceless                      no_connection_id         
          i2s1                       0       0        0        614400000   0          0     50000      N            deviceless                      no_connection_id         
          i2s0                       0       0        0        614400000   0          0     50000      N            deviceless                      no_connection_id         
    pll-csi-4x                       0       0        0        1188000000  0          0     50000      N      deviceless                      no_connection_id         
    pll-video-4x                     0       0        0        1188000000  0          0     50000      N      deviceless                      no_connection_id         
       tcon-lcd                      0       0        0        1188000000  0          0     50000      N         deviceless                      no_connection_id         
       pll-video-1x                  0       0        0        297000000   0          0     50000      Y         deviceless                      no_connection_id         
          fanout-27M                 0       0        0        297000000   0          0     50000      N            deviceless                      no_connection_id         
       pll-video-2x                  0       0        0        594000000   0          0     50000      Y         deviceless                      no_connection_id         
    pll-periph-4x                    1       1        0        2400000000  0          0     50000      Y      deviceless                      no_connection_id         
       pll-periph-480M               0       0        0        480000000   0          0     50000      Y         deviceless                      no_connection_id         
          pll-periph-160M            0       0        0        160000000   0          0     50000      Y            deviceless                      no_connection_id         
             fanout-16M              0       0        0        16000000    0          0     50000      N               deviceless                      no_connection_id         
       pll-periph-800M               0       0        0        800000000   0          0     50000      Y         deviceless                      no_connection_id         
       pll-periph-2x                 1       1        0        1200000000  0          0     50000      Y         deviceless                      no_connection_id         
          pll-periph-400M            0       0        0        400000000   0          0     50000      Y            deviceless                      no_connection_id         
             mmc0                    0       0        0        50000000    0          0     50000      N               4020000.mmc                     mmc                      
                                                                                                                       deviceless                      no_connection_id         
             mmc1                    0       0        0        50000000    0          0     50000      N               4021000.mmc                     mmc                      
                                                                                                                       deviceless                      no_connection_id         
             ce                      0       0        0        400000000   0          0     50000      N               deviceless                      no_connection_id         
             pll-periph-200M         0       0        0        200000000   0          0     50000      Y               deviceless                      no_connection_id         
          pll-periph-600M            2       2        0        600000000   0          0     50000      Y            deviceless                      no_connection_id         
             apb0                    2       2        0        100000000   0          0     50000      Y               2000000.pinctrl                 apb                      
                                                                                                                       deviceless                      no_connection_id         
                fanout-pclk          0       0        0        100000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-audio-codec      0       0        0        100000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-gpadc            1       1        0        100000000   0          0     50000      Y                  2009000.adc                     no_connection_id         
                                                                                                                          deviceless                      no_connection_id         
                bus-pwm              0       0        0        100000000   0          0     50000      N                  deviceless                      no_connection_id         
             ahb                     8       8        0        200000000   0          0     50000      Y               deviceless                      no_connection_id         
                riscv-cfg            0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-wiegand          0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-csi              0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-tcon-lcd         0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-mipi-dsi         0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-dpss-top         0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-otg              1       1        0        200000000   0          0     50000      Y                  4100000.usb                     no_connection_id         
                                                                                                                          deviceless                      no_connection_id         
                bus-ehci             1       1        0        200000000   0          0     50000      Y                  usb@4101000                     no_connection_id         
                                                                                                                          deviceless                      no_connection_id         
                bus-ohci             2       2        0        200000000   0          0     50000      Y                  usb@4101400                     no_connection_id         
                                                                                                                          usb@4101000                     no_connection_id         
                                                                                                                          deviceless                      no_connection_id         
                bus-dmic             0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-i2s1             0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-i2s0             0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-ths              0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-emac             0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-spif             0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-spi3             0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-spi2             0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-spi1             0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-spi0             0       0        0        200000000   0          0     50000      N                  4025000.spi                     ahb                      
                                                                                                                          deviceless                      no_connection_id         
                bus-mmc2             0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-mmc1             0       0        0        200000000   0          0     50000      N                  4021000.mmc                     ahb                      
                                                                                                                          deviceless                      no_connection_id         
                bus-mmc0             0       0        0        200000000   0          0     50000      N                  4020000.mmc                     ahb                      
                                                                                                                          deviceless                      no_connection_id         
                bus-dram             1       1        0        200000000   0          0     50000      Y                  deviceless                      no_connection_id         
                bus-iommu            0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-dbg              0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-hstimer          1       1        0        200000000   0          0     50000      Y                  3008000.hstimer                 no_connection_id         
                                                                                                                          deviceless                      no_connection_id         
                bus-spinlock         1       1        0        200000000   0          0     50000      Y                  3005000.hwlock                  ahb                      
                                                                                                                          deviceless                      no_connection_id         
                bus-msgbox1          0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-msgbox0          0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-dma              1       1        0        200000000   0          0     50000      Y                  3002000.dma-controller          no_connection_id         
                                                                                                                          deviceless                      no_connection_id         
                bus-npu              1       1        0        200000000   0          0     50000      Y                  3050000.npu                     bus                      
                                                                                                                          deviceless                      no_connection_id         
                bus-ve               0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-ce               0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-g2d              0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
                bus-de               0       0        0        200000000   0          0     50000      N                  deviceless                      no_connection_id         
             pll-periph-300M         0       0        0        300000000   0          0     50000      Y               deviceless                      no_connection_id         
                csi-top              0       0        0        300000000   0          0     50000      N                  deviceless                      no_connection_id         
                spi0                 0       0        0        75000000    0          0     50000      N                  4025000.spi                     mod                      
                                                                                                                          deviceless                      no_connection_id         
                ve                   0       0        0        300000000   0          0     50000      N                  deviceless                      no_connection_id         
                g2d                  0       0        0        300000000   0          0     50000      N                  deviceless                      no_connection_id         
                de                   0       0        0        300000000   0          0     50000      N                  deviceless                      no_connection_id         
                pll-periph-150M      0       0        0        150000000   0          0     50000      Y                  deviceless                      no_connection_id         
                   fanout-25M        0       0        0        25000000    0          0     50000      N                     deviceless                      no_connection_id         
                   emac-25M          0       0        0        25000000    0          0     50000      N                     deviceless                      no_connection_id         
    pll-ddr                          1       1        0        1056000000  0          0     50000      Y      deviceless                      no_connection_id         
       dram                          2       2        0        1056000000  0          0     50000      Y         deviceless                      no_connection_id         
          mbus                       1       1        0        264000000   0          0     50000      Y            deviceless                      no_connection_id         
             mbus-g2d                0       0        0        264000000   0          0     50000      N               deviceless                      no_connection_id         
             mbus-isp                0       0        0        264000000   0          0     50000      N               deviceless                      no_connection_id         
             mbus-csi                0       0        0        264000000   0          0     50000      N               deviceless                      no_connection_id         
             mbus-ce                 0       0        0        264000000   0          0     50000      N               deviceless                      no_connection_id         
             mbus-ve                 0       0        0        264000000   0          0     50000      N               deviceless                      no_connection_id         
             mbus-dma                1       1        0        264000000   0          0     50000      Y               3002000.dma-controller          mbus                     
                                                                                                                       deviceless                      no_connection_id         
    pll-cpu                          1       1        0        912000000   0          0     50000      Y      deviceless                      no_connection_id         
       cpu                           1       1        0        912000000   0          0     50000      Y         deviceless                      no_connection_id         
          cpu-apb                    0       0        0        228000000   0          0     50000      Y            deviceless                      no_connection_id         
          cpu-axi                    0       0        0        456000000   0          0     50000      Y            deviceless                      no_connection_id         
    osc12M                           1       1        0        12000000    0          0     50000      Y      deviceless                      no_connection_id         
       usb                           3       3        0        12000000    0          0     50000      Y         usb@4101400                     no_connection_id         
                                                                                                                 usb@4101000                     no_connection_id         
                                                                                                                 4100400.phy                     usb0_phy                 
                                                                                                                 deviceless                      no_connection_id         
    osc24M-32k                       0       0        0        32000       0          0     50000      N      deviceless                      no_connection_id         
    r-cpucfg                         0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    r-rtc                            1       1        0        24000000    0          0     50000      Y      7090000.rtc                     bus                      
                                                                                                              deviceless                      no_connection_id         
    r-ppu                            1       1        0        24000000    0          0     50000      Y      7001000.power-controller        no_connection_id         
                                                                                                              deviceless                      no_connection_id         
    r-twd                            0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
 pll-audio-div2                      0       0        0        0           0          0     50000      Y   deviceless                      no_connection_id         
    pll-audio-4x                     0       0        0        0           0          0     50000      Y      deviceless                      no_connection_id