linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/21] arm64: sunxi: Initial Allwinner H616 SoC support
@ 2021-01-18  2:08 Andre Przywara
  2021-01-18  2:08 ` [PATCH v3 01/21] dt-bindings: mmc: sunxi: Add Allwinner A100 and H616 compatibles Andre Przywara
                   ` (20 more replies)
  0 siblings, 21 replies; 47+ messages in thread
From: Andre Przywara @ 2021-01-18  2:08 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec
  Cc: Icenowy Zheng, Linus Walleij, Rob Herring,
	Clément Péron, Samuel Holland, Shuosheng Huang,
	Yangtao Li, linux-arm-kernel, linux-kernel, linux-sunxi

Hi,

an update from the v2 in December, to add support for the Allwinner H616
SoC. This time it's based on sunxi/for-next, which is based on 5.11-rc1.
The A100 watchdog binding patch is already merged, so omitted,
and Ulf has already queued the two MMC patch to his next branch. I am
still including them here to get a complete series on the list.

I was wondering if at least the basic pinctrl, clock and MFD patch (up
until patch 9) might make it into 5.12? Maybe the EMAC (patches 10-12)
as well?

Besides some fixes and addressed comments, this version adds RSB support:
this seems to be a similar story like for the H6 (omitted from the manual,
but fully functional).

USB seems to work now *sometimes*, one issue was the dodgy power situation
when powering with a bad USB-C cable from a laptop. Powering from a proper
USB-C power supply works better, however I still get enumeration errors
from Linux ("error -62") occasionally. On some boots it works just fine.

I keep the reserved-memory node in the .dtsi for now. Trusted Firmware now
properly adds this to the DT, but U-Boot does not propagate this to a
freshly loaded DTB (using $fdtcontroladdr works, though). When this gets
fixed in U-Boot, we can remove this from the .dtsi.

For a more detailed changelog, see below.

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.

Various DT binding patches are sprinkled throughout the series, to add
the new compatible names right before they are used.
Patch 4 and 5 add pinctrl support, with the "-R" controller now being
crippled down to two I2C pins only. If we grow tired of repeating this
exercise for every new SoC variant, I am happy to revive my more
versatile sunxi pinctrl driver effort from a few years back [1].
Patch 7 and 8 add clock support. For the -R clock this is shared with
the H6 code, as the clocks are identical, with the H616 just having
fewer of them. The main clocks are different enough to warrant a separate
file.
Patch 9 teaches the AXP MFD driver to get along without having an
interrupt, as the H616 apparently does not have an NMI controller anymore.
Patch 11 and 12 add some tweaks to the syscon and EMAC driver, to deal
with the second EMAC clock used for the second Ethernet controller.
Patches 13 and 16 add USB support.

The remaining patches add DT bindings, which just add the new compatible
string along with an existing name as a fallback string.
Eventually we get the .dtsi for the SoC in patch 19, and the .dts for
the OrangePi Zero2 board[2] in the last patch.

We have U-Boot and Trusted-Firmware support in a working state, booting
via FEL or SD card and even TFTPing kernels work already [3][4].

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 can also be found here:
https://github.com/apritzel/linux/commits/h616-v3

Happy reviewing!

Cheers,
Andre

[1] https://patchwork.ozlabs.org/project/linux-gpio/cover/20171113012523.2328-1-andre.przywara@arm.com/
[2] https://linux-sunxi.org/Xunlong_Orange_Pi_Zero2
[3] https://github.com/jernejsk/u-boot/commits/h616-v2
[4] https://github.com/apritzel/arm-trusted-firmware/commits/h616-v1

Changelog v2 .. v3:
- Add Rob's Acks
- Drop redundant maxItems from pinctrl DT binding
- Rename h_i2s* to just i2s* in pinctrl names
- Use more declarative i2s0_d{in,out}{0,1} names
- Add RSB pins to pinctrl
- Include RSB clocks (sharing with newly added H6 versions)
- Fix CEC clock (add 2nd enable bit, also fix predivider flag)
- Rename PMU_UNK1 register in USB PHY
- Add USB and MUSB DT binding patches
- Add MMC/SD speed modes to .dtsi

Changelog v1 .. v2:
- pinctrl: adjust irq bank map to cover undocumented GPIO bank IRQs
- use differing h_i2s0 pin output names
- r-ccu: fix number of used clocks
- ccu: remove PLL-PERIPHy(4X)
- ccu: fix gpu1 divider range
- ccu: fix usb-phy3 parent
- ccu: add missing TV clocks
- ccu: rework to CLK_OF_DECLARE style
- ccu: enable output bit for PLL clocks
- ccu: renumber clocks
- .dtsi: drop sun50i-a64-system-control fallback
- .dtsi: drop unknown SRAM regions
- .dtsi: add more (undocumented) GPIO interrupts
- .dtsi: fix I2C3 pin names
- .dtsi: use a100-emmc fallback for MMC2
- .dtsi: add second EMAC controller
- .dtsi: use H3 MUSB controller fallback
- .dtsi: fix frame size for USB PHY PMU registers
- .dtsi: add USB0 PHY references
- .dtsi: fix IR controller clock source
- .dts: fix LED naming and swap pins
- .dts: use 5V supply parent for USB supply
- .dts: drop dummy IRQ for AXP
- .dts: enable 3V3 header pin power rail
- .dts: add SPI flash node
- .dts: make USB-C port peripheral only
- add IRQ-less AXP support
- add two patches to support more than one EMAC clock
- add patch to rework and extend USB PHY support
- add DT binding documentation patches

Andre Przywara (19):
  dt-bindings: pinctrl: Add Allwinner H616 compatible strings
  pinctrl: sunxi: Add support for the Allwinner H616 pin controller
  pinctrl: sunxi: Add support for the Allwinner H616-R pin controller
  dt-bindings: clk: sunxi-ccu: Add compatible string for Allwinner H616
  clk: sunxi-ng: Add support for the Allwinner H616 R-CCU
  clk: sunxi-ng: Add support for the Allwinner H616 CCU
  mfd: axp20x: Allow AXP chips without interrupt lines
  dt-bindings: sram: sunxi-sram: Add H616 compatible string
  soc: sunxi: sram: Add support for more than one EMAC clock
  net: stmmac: dwmac-sun8i: Prepare for second EMAC clock register
  phy: sun4i-usb: Rework HCI PHY (aka. "pmu_unk1") handling
  dt-bindings: usb: Add H616 compatible string
  dt-bindings: usb: sunxi-musb: Add H616 compatible string
  phy: sun4i-usb: Add support for the H616 USB PHY
  dt-bindings: watchdog: sun4i: Add H616 compatible string
  dt-bindings: allwinner: Add H616 compatible strings
  arm64: dts: allwinner: Add Allwinner H616 .dtsi file
  dt-bindings: arm: sunxi: Add OrangePi Zero 2 binding
  arm64: dts: allwinner: Add OrangePi Zero 2 .dts

Yangtao Li (2):
  dt-bindings: mmc: sunxi: Add Allwinner A100 and H616 compatibles
  mmc: sunxi: add support for A100 mmc controller

 .../devicetree/bindings/arm/sunxi.yaml        |    5 +
 .../clock/allwinner,sun4i-a10-ccu.yaml        |    2 +
 .../bindings/i2c/marvell,mv64xxx-i2c.yaml     |   21 +-
 .../media/allwinner,sun4i-a10-ir.yaml         |   16 +-
 .../bindings/mmc/allwinner,sun4i-a10-mmc.yaml |    8 +
 .../phy/allwinner,sun8i-h3-usb-phy.yaml       |    4 +-
 .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml  |   17 +-
 .../bindings/rtc/allwinner,sun6i-a31-rtc.yaml |    3 +
 .../bindings/spi/allwinner,sun6i-a31-spi.yaml |    1 +
 .../allwinner,sun4i-a10-system-control.yaml   |    1 +
 .../usb/allwinner,sun4i-a10-musb.yaml         |    3 +
 .../watchdog/allwinner,sun4i-a10-wdt.yaml     |   12 +-
 arch/arm64/boot/dts/allwinner/Makefile        |    1 +
 .../allwinner/sun50i-h616-orangepi-zero2.dts  |  240 ++++
 .../arm64/boot/dts/allwinner/sun50i-h616.dtsi |  750 +++++++++++
 drivers/clk/sunxi-ng/Kconfig                  |    7 +-
 drivers/clk/sunxi-ng/Makefile                 |    1 +
 drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c        |   48 +
 drivers/clk/sunxi-ng/ccu-sun50i-h616.c        | 1150 +++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun50i-h616.h        |   56 +
 drivers/mfd/axp20x.c                          |   17 +-
 drivers/mmc/host/sunxi-mmc.c                  |   28 +-
 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c |   12 +-
 drivers/phy/allwinner/phy-sun4i-usb.c         |   40 +-
 drivers/pinctrl/sunxi/Kconfig                 |   10 +
 drivers/pinctrl/sunxi/Makefile                |    2 +
 drivers/pinctrl/sunxi/pinctrl-sun50i-h616-r.c |   56 +
 drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c   |  548 ++++++++
 drivers/soc/sunxi/sunxi_sram.c                |   31 +-
 include/dt-bindings/clock/sun50i-h616-ccu.h   |  115 ++
 include/dt-bindings/reset/sun50i-h616-ccu.h   |   70 +
 31 files changed, 3204 insertions(+), 71 deletions(-)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun50i-h616.c
 create mode 100644 drivers/clk/sunxi-ng/ccu-sun50i-h616.h
 create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun50i-h616-r.c
 create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c
 create mode 100644 include/dt-bindings/clock/sun50i-h616-ccu.h
 create mode 100644 include/dt-bindings/reset/sun50i-h616-ccu.h

-- 
2.17.5


^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2021-01-26  5:48 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18  2:08 [PATCH v3 00/21] arm64: sunxi: Initial Allwinner H616 SoC support Andre Przywara
2021-01-18  2:08 ` [PATCH v3 01/21] dt-bindings: mmc: sunxi: Add Allwinner A100 and H616 compatibles Andre Przywara
2021-01-18  2:08 ` [PATCH v3 02/21] mmc: sunxi: add support for A100 mmc controller Andre Przywara
2021-01-18 13:28   ` Maxime Ripard
2021-01-18 15:52     ` Andre Przywara
2021-01-18 15:55       ` [linux-sunxi] " Chen-Yu Tsai
2021-01-21 16:38       ` Maxime Ripard
2021-01-18  2:08 ` [PATCH v3 03/21] dt-bindings: pinctrl: Add Allwinner H616 compatible strings Andre Przywara
2021-01-18 13:29   ` Maxime Ripard
2021-01-21 21:12   ` Linus Walleij
2021-01-18  2:08 ` [PATCH v3 04/21] pinctrl: sunxi: Add support for the Allwinner H616 pin controller Andre Przywara
2021-01-18 15:26   ` Maxime Ripard
2021-01-21 21:14   ` Linus Walleij
2021-01-18  2:08 ` [PATCH v3 05/21] pinctrl: sunxi: Add support for the Allwinner H616-R " Andre Przywara
2021-01-21 21:16   ` Linus Walleij
2021-01-18  2:08 ` [PATCH v3 06/21] dt-bindings: clk: sunxi-ccu: Add compatible string for Allwinner H616 Andre Przywara
2021-01-18 15:26   ` Maxime Ripard
2021-01-18  2:08 ` [PATCH v3 07/21] clk: sunxi-ng: Add support for the Allwinner H616 R-CCU Andre Przywara
2021-01-18 15:30   ` Maxime Ripard
2021-01-18  2:08 ` [PATCH v3 08/21] clk: sunxi-ng: Add support for the Allwinner H616 CCU Andre Przywara
2021-01-18 15:30   ` Maxime Ripard
2021-01-18  2:08 ` [PATCH v3 09/21] mfd: axp20x: Allow AXP chips without interrupt lines Andre Przywara
2021-01-18  3:37   ` Samuel Holland
2021-01-21 15:54     ` Andre Przywara
2021-01-18  2:08 ` [PATCH v3 10/21] dt-bindings: sram: sunxi-sram: Add H616 compatible string Andre Przywara
2021-01-18  2:08 ` [PATCH v3 11/21] soc: sunxi: sram: Add support for more than one EMAC clock Andre Przywara
2021-01-18  2:08 ` [PATCH v3 12/21] net: stmmac: dwmac-sun8i: Prepare for second EMAC clock register Andre Przywara
2021-01-18 21:27   ` Jakub Kicinski
2021-01-18  2:08 ` [PATCH v3 13/21] phy: sun4i-usb: Rework HCI PHY (aka. "pmu_unk1") handling Andre Przywara
2021-01-18 15:32   ` Maxime Ripard
2021-01-18  2:08 ` [PATCH v3 14/21] dt-bindings: usb: Add H616 compatible string Andre Przywara
2021-01-18 15:33   ` Maxime Ripard
2021-01-18  2:08 ` [PATCH v3 15/21] dt-bindings: usb: sunxi-musb: " Andre Przywara
2021-01-18 15:33   ` Maxime Ripard
2021-01-18  2:08 ` [PATCH v3 16/21] phy: sun4i-usb: Add support for the H616 USB PHY Andre Przywara
2021-01-18 15:33   ` Maxime Ripard
2021-01-18  2:08 ` [PATCH v3 17/21] dt-bindings: watchdog: sun4i: Add H616 compatible string Andre Przywara
2021-01-18 15:34   ` maxime
2021-01-23 17:31   ` Guenter Roeck
2021-01-18  2:08 ` [PATCH v3 18/21] dt-bindings: allwinner: Add H616 compatible strings Andre Przywara
2021-01-18  4:28   ` Samuel Holland
2021-01-25 11:59     ` Andre Przywara
2021-01-18 12:05   ` Mark Brown
2021-01-18  2:08 ` [PATCH v3 19/21] arm64: dts: allwinner: Add Allwinner H616 .dtsi file Andre Przywara
2021-01-18  4:35   ` Samuel Holland
2021-01-18  2:08 ` [PATCH v3 20/21] dt-bindings: arm: sunxi: Add OrangePi Zero 2 binding Andre Przywara
2021-01-18  2:08 ` [PATCH v3 21/21] arm64: dts: allwinner: Add OrangePi Zero 2 .dts Andre Przywara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).