uboot-d1: add bootloader for upcoming d1 target
[openwrt/staging/mans0n.git] / package / boot / uboot-d1 / patches / 0036-sunxi-Enable-PHY_SUN4I_USB-by-default-for-new-SoCs.patch
1 From b13140a914199dcdd80331fef6f33d47f008f1b4 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Fri, 5 Aug 2022 23:40:22 -0500
4 Subject: [PATCH 36/90] sunxi: Enable PHY_SUN4I_USB by default for new SoCs
5
6 With one exception (sun9i), all sunxi SoCs released to date use variants
7 of the same USB PHY. Instead of requiring each new SoC to duplicate the
8 PHY driver selection, enable it by default.
9
10 Series-to: Andre Przywara <andre.przywara@arm.com>
11 Series-to: Jagan Teki <jagan@amarulasolutions.com>
12
13 Signed-off-by: Samuel Holland <samuel@sholland.org>
14 ---
15 arch/arm/mach-sunxi/Kconfig | 11 -----------
16 drivers/phy/allwinner/Kconfig | 3 ++-
17 2 files changed, 2 insertions(+), 12 deletions(-)
18
19 --- a/arch/arm/mach-sunxi/Kconfig
20 +++ b/arch/arm/mach-sunxi/Kconfig
21 @@ -162,7 +162,6 @@ endif
22
23 config MACH_SUNXI_H3_H5
24 bool
25 - select PHY_SUN4I_USB
26 select SUNXI_DE2
27 select SUNXI_DRAM_DW
28 select SUNXI_DRAM_DW_32BIT
29 @@ -191,7 +190,6 @@ config MACH_SUNIV
30 config MACH_SUN4I
31 bool "sun4i (Allwinner A10)"
32 select CPU_V7A
33 - select PHY_SUN4I_USB
34 select DRAM_SUN4I
35 select SUNXI_GEN_SUN4I
36 select SUPPORT_SPL
37 @@ -202,7 +200,6 @@ config MACH_SUN5I
38 bool "sun5i (Allwinner A13)"
39 select CPU_V7A
40 select DRAM_SUN4I
41 - select PHY_SUN4I_USB
42 select SUNXI_GEN_SUN4I
43 select SUPPORT_SPL
44 imply SPL_SYS_I2C_LEGACY
45 @@ -216,7 +213,6 @@ config MACH_SUN6I
46 select ARCH_SUPPORT_PSCI
47 select SPL_ARMV7_SET_CORTEX_SMPEN
48 select DRAM_SUN6I
49 - select PHY_SUN4I_USB
50 select SPL_I2C
51 select SUN6I_PRCM
52 select SUNXI_GEN_SUN6I
53 @@ -232,7 +228,6 @@ config MACH_SUN7I
54 select ARCH_SUPPORT_PSCI
55 select SPL_ARMV7_SET_CORTEX_SMPEN
56 select DRAM_SUN4I
57 - select PHY_SUN4I_USB
58 select SUNXI_GEN_SUN4I
59 select SUPPORT_SPL
60 select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
61 @@ -246,7 +241,6 @@ config MACH_SUN8I_A23
62 select CPU_V7_HAS_VIRT
63 select ARCH_SUPPORT_PSCI
64 select DRAM_SUN8I_A23
65 - select PHY_SUN4I_USB
66 select SPL_I2C
67 select SUNXI_GEN_SUN6I
68 select SUPPORT_SPL
69 @@ -260,7 +254,6 @@ config MACH_SUN8I_A33
70 select CPU_V7_HAS_VIRT
71 select ARCH_SUPPORT_PSCI
72 select DRAM_SUN8I_A33
73 - select PHY_SUN4I_USB
74 select SPL_I2C
75 select SUNXI_GEN_SUN6I
76 select SUPPORT_SPL
77 @@ -271,7 +264,6 @@ config MACH_SUN8I_A83T
78 bool "sun8i (Allwinner A83T)"
79 select CPU_V7A
80 select DRAM_SUN8I_A83T
81 - select PHY_SUN4I_USB
82 select SPL_I2C
83 select SUNXI_GEN_SUN6I
84 select MMC_SUNXI_HAS_NEW_MODE
85 @@ -299,7 +291,6 @@ config MACH_SUN8I_R40
86 select SUPPORT_SPL
87 select SUNXI_DRAM_DW
88 select SUNXI_DRAM_DW_32BIT
89 - select PHY_SUN4I_USB
90 imply SPL_SYS_I2C_LEGACY
91
92 config MACH_SUN8I_V3S
93 @@ -327,7 +318,6 @@ config MACH_SUN9I
94 config MACH_SUN50I
95 bool "sun50i (Allwinner A64)"
96 select ARM64
97 - select PHY_SUN4I_USB
98 select SUN6I_PRCM
99 select SUNXI_DE2
100 select SUNXI_GEN_SUN6I
101 @@ -350,7 +340,6 @@ config MACH_SUN50I_H5
102 config MACH_SUN50I_H6
103 bool "sun50i (Allwinner H6)"
104 select ARM64
105 - select PHY_SUN4I_USB
106 select DRAM_SUN50I_H6
107 select SUN50I_GEN_H6
108
109 --- a/drivers/phy/allwinner/Kconfig
110 +++ b/drivers/phy/allwinner/Kconfig
111 @@ -3,7 +3,8 @@
112 #
113 config PHY_SUN4I_USB
114 bool "Allwinner Sun4I USB PHY driver"
115 - depends on ARCH_SUNXI
116 + depends on ARCH_SUNXI && !MACH_SUN9I
117 + default y
118 select DM_REGULATOR
119 select PHY
120 help