uboot-d1: add bootloader for upcoming d1 target
[openwrt/staging/mans0n.git] / package / boot / uboot-d1 / patches / 0071-sunxi-Move-most-board-options-to-the-board-Kconfig.patch
1 From 6a1b660a83b262237b6bebed26e44db923a86a6b Mon Sep 17 00:00:00 2001
2 From: Zoltan HERPAI <wigyori@uid0.hu>
3 Date: Tue, 6 Jun 2023 18:09:19 +0000
4 Subject: [PATCH 71/90] sunxi: Move most board options to the board Kconfig
5
6 This excludes options that are inherently ARM-specific or are specific
7 to legacy non-DM drivers.
8
9 Some help text is cleaned up along the way.
10
11 Signed-off-by: Samuel Holland <samuel@sholland.org>
12 Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
13 ---
14 arch/arm/mach-sunxi/Kconfig | 71 ------------------------------------
15 board/sunxi/Kconfig | 72 +++++++++++++++++++++++++++++++++++++
16 2 files changed, 72 insertions(+), 71 deletions(-)
17
18 --- a/arch/arm/mach-sunxi/Kconfig
19 +++ b/arch/arm/mach-sunxi/Kconfig
20 @@ -548,16 +548,6 @@ config DRAM_ODT_CORRECTION
21 then the correction is negative. Usually the value for this is 0.
22 endif
23
24 -config UART0_PORT_F
25 - bool "UART0 on MicroSD breakout board"
26 - ---help---
27 - Repurpose the SD card slot for getting access to the UART0 serial
28 - console. Primarily useful only for low level u-boot debugging on
29 - tablets, where normal UART0 is difficult to access and requires
30 - device disassembly and/or soldering. As the SD card can't be used
31 - at the same time, the system can be only booted in the FEL mode.
32 - Only enable this if you really know what you are doing.
33 -
34 config OLD_SUNXI_KERNEL_COMPAT
35 bool "Enable workarounds for booting old kernels"
36 ---help---
37 @@ -571,20 +561,6 @@ config MACPWR
38 Set the pin used to power the MAC. This takes a string in the format
39 understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
40
41 -config MMC1_PINS_PH
42 - bool "Pins for mmc1 are on Port H"
43 - depends on MACH_SUN4I || MACH_SUN7I || MACH_SUN8I_R40
44 - ---help---
45 - Select this option for boards where mmc1 uses the Port H pinmux.
46 -
47 -config MMC_SUNXI_SLOT_EXTRA
48 - int "mmc extra slot number"
49 - default -1
50 - ---help---
51 - sunxi builds always enable mmc0, some boards also have a second sdcard
52 - slot or emmc on mmc1 - mmc3. Setting this to 1, 2 or 3 will enable
53 - support for this.
54 -
55 config I2C0_ENABLE
56 bool "Enable I2C/TWI controller 0"
57 default y if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUN8I_R40
58 @@ -612,16 +588,6 @@ config R_I2C_ENABLE
59 Set this to y to enable the I2C controller which is part of the PRCM.
60 endif
61
62 -config AXP_DISABLE_BOOT_ON_POWERON
63 - bool "Disable device boot on power plug-in"
64 - depends on AXP209_POWER || AXP221_POWER || AXP809_POWER || AXP818_POWER
65 - default n
66 - ---help---
67 - Say Y here to prevent the device from booting up because of a plug-in
68 - event. When set, the device will boot into the SPL briefly to
69 - determine why it was powered on, and if it was determined because of
70 - a plug-in event instead of a button press event it will shut back off.
71 -
72 config VIDEO_SUNXI
73 bool "Enable graphical uboot console on HDMI, LCD or VGA"
74 depends on !MACH_SUN8I_A83T
75 @@ -850,41 +816,4 @@ config SPL_SPI_SUNXI
76 sunxi SPI Flash. It uses the same method as the boot ROM, so does
77 not need any extra configuration.
78
79 -config PINE64_DT_SELECTION
80 - bool "Enable Pine64 device tree selection code"
81 - depends on MACH_SUN50I
82 - help
83 - The original Pine A64 and Pine A64+ are similar but different
84 - boards and can be differed by the DRAM size. Pine A64 has
85 - 512MiB DRAM, and Pine A64+ has 1GiB or 2GiB. By selecting this
86 - option, the device tree selection code specific to Pine64 which
87 - utilizes the DRAM size will be enabled.
88 -
89 -config PINEPHONE_DT_SELECTION
90 - bool "Enable PinePhone device tree selection code"
91 - depends on MACH_SUN50I
92 - help
93 - Enable this option to automatically select the device tree for the
94 - correct PinePhone hardware revision during boot.
95 -
96 -config BLUETOOTH_DT_DEVICE_FIXUP
97 - string "Fixup the Bluetooth controller address"
98 - default ""
99 - help
100 - This option specifies the DT compatible name of the Bluetooth
101 - controller for which to set the "local-bd-address" property.
102 - Set this option if your device ships with the Bluetooth controller
103 - default address.
104 - The used address is "bdaddr" if set, and "ethaddr" with the LSB
105 - flipped elsewise.
106 -
107 endif
108 -
109 -config CHIP_DIP_SCAN
110 - bool "Enable DIPs detection for CHIP board"
111 - select SUPPORT_EXTENSION_SCAN
112 - select W1
113 - select W1_GPIO
114 - select W1_EEPROM
115 - select W1_EEPROM_DS24XXX
116 - select CMD_EXTENSION
117 --- a/board/sunxi/Kconfig
118 +++ b/board/sunxi/Kconfig
119 @@ -171,6 +171,78 @@ config SPL_IMAGE_TYPE
120 default "sunxi_egon" if SPL_IMAGE_TYPE_SUNXI_EGON
121 default "sunxi_toc0" if SPL_IMAGE_TYPE_SUNXI_TOC0
122
123 +config MMC_SUNXI_SLOT_EXTRA
124 + int "MMC extra slot number"
125 + default -1
126 + help
127 + sunxi builds always enable mmc0. Some boards also have a
128 + second SD card slot or eMMC on mmc1 - mmc3. Setting this to 1,
129 + 2 or 3 will enable support for this.
130 +
131 +config MMC1_PINS_PH
132 + bool "MMC1 pins are on Port H"
133 + depends on MACH_SUN4I || MACH_SUN7I || MACH_SUN8I_R40
134 + help
135 + Select this option on boards where mmc1 uses the Port H pinmux.
136 +
137 +config UART0_PORT_F
138 + bool "UART0 pins are on Port F (MicroSD breakout board)"
139 + help
140 + Repurpose the SD card slot for getting access to the UART0
141 + serial console. Primarily useful only for low level u-boot
142 + debugging on tablets, where normal UART0 is difficult to
143 + access and requires device disassembly and/or soldering. As
144 + the SD card can't be used at the same time, the system can be
145 + only booted in FEL mode. Only enable this if you really know
146 + what you are doing.
147 +
148 +config AXP_DISABLE_BOOT_ON_POWERON
149 + bool "Disable device boot on power plug-in"
150 + depends on AXP209_POWER || AXP221_POWER || AXP809_POWER || AXP818_POWER
151 + help
152 + Say Y here to prevent the device from booting up because of a
153 + plug-in event. When set, the device will boot into the SPL
154 + briefly to determine why it was powered on, and if the board
155 + was powered on because of a plug-in event instead of a button
156 + press event, it will shut back off.
157 +
158 +config CHIP_DIP_SCAN
159 + bool "Enable DIPs detection for CHIP board"
160 + select SUPPORT_EXTENSION_SCAN
161 + select W1
162 + select W1_GPIO
163 + select W1_EEPROM
164 + select W1_EEPROM_DS24XXX
165 + select CMD_EXTENSION
166 +
167 +config PINE64_DT_SELECTION
168 + bool "Enable Pine64 device tree selection code"
169 + depends on MACH_SUN50I
170 + help
171 + The original Pine A64 and Pine A64+ are similar but different
172 + boards and can be differed by the DRAM size. Pine A64 has
173 + 512MiB DRAM, and Pine A64+ has 1GiB or 2GiB. By selecting this
174 + option, the device tree selection code specific to Pine64 which
175 + utilizes the DRAM size will be enabled.
176 +
177 +config PINEPHONE_DT_SELECTION
178 + bool "Enable PinePhone device tree selection code"
179 + depends on MACH_SUN50I
180 + help
181 + Enable this option to automatically select the device tree for the
182 + correct PinePhone hardware revision during boot.
183 +
184 +config BLUETOOTH_DT_DEVICE_FIXUP
185 + string "Fixup the Bluetooth controller address"
186 + default ""
187 + help
188 + This option specifies the DT compatible name of the Bluetooth
189 + controller for which to set the "local-bd-address" property.
190 + Set this option if your device ships with the Bluetooth controller
191 + default address.
192 + The used address is "bdaddr" if set, and "ethaddr" with the LSB
193 + flipped elsewise.
194 +
195 endmenu
196
197 endif