kernel: bump 4.14 to 4.14.125 (FS#2305 FS#2297)
[oweals/openwrt.git] / target / linux / layerscape / patches-4.14 / 201-config-support-layerscape.patch
1 From 2a1351617985ef47581de825ae1bbf1d42bf3200 Mon Sep 17 00:00:00 2001
2 From: Yangbo Lu <yangbo.lu@nxp.com>
3 Date: Mon, 6 May 2019 17:29:32 +0800
4 Subject: [PATCH] config: support layerscape
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 This is an integrated patch of config for layerscape
10
11 Signed-off-by: Alison Wang <alison.wang@nxp.com>
12 Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com>
13 Signed-off-by: Biwen Li <biwen.li@nxp.com>
14 Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
15 Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
16 Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
17 Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
18 Signed-off-by: Chenhui Zhao <chenhui.zhao@nxp.com>
19 Signed-off-by: Florin Chiculita <florinlaurentiu.chiculita@nxp.com>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
22 Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
23 Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
24 Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
25 Signed-off-by: Li Yang <leoyang.li@nxp.com>
26 Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
27 Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
28 Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
29 Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
30 Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
31 Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
32 Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
33 Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
34 Signed-off-by: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
35 Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
36 Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
37 Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
38 Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
39 Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
40 ---
41  drivers/Makefile                        |  2 ++
42  drivers/irqchip/Makefile                |  1 +
43  drivers/net/ethernet/freescale/Kconfig  | 14 +++++----
44  drivers/net/ethernet/freescale/Makefile |  3 ++
45  drivers/ptp/Kconfig                     | 16 +++++-----
46  drivers/soc/Kconfig                     |  1 +
47  drivers/soc/fsl/Kconfig                 | 22 +++++++++++++
48  drivers/soc/fsl/Kconfig.arm             | 16 ++++++++++
49  drivers/soc/fsl/Makefile                |  5 +++
50  drivers/soc/fsl/layerscape/Kconfig      | 10 ++++++
51  drivers/soc/fsl/layerscape/Makefile     |  1 +
52  drivers/staging/Kconfig                 |  4 +++
53  drivers/staging/Makefile                |  2 ++
54  drivers/staging/fsl-dpaa2/Kconfig       | 56 ++++++++++++++++++++++++++++++++-
55  drivers/staging/fsl-dpaa2/Makefile      |  4 +++
56  15 files changed, 142 insertions(+), 15 deletions(-)
57  create mode 100644 drivers/soc/fsl/Kconfig.arm
58  create mode 100644 drivers/soc/fsl/layerscape/Kconfig
59  create mode 100644 drivers/soc/fsl/layerscape/Makefile
60
61 --- a/drivers/Makefile
62 +++ b/drivers/Makefile
63 @@ -20,6 +20,8 @@ obj-$(CONFIG_PCI)             += pci/
64  obj-$(CONFIG_PCI_ENDPOINT)     += pci/endpoint/
65  # PCI dwc controller drivers
66  obj-y                          += pci/dwc/
67 +# PCI mobiveil controller drivers
68 +obj-y                          += pci/mobiveil/
69  
70  obj-$(CONFIG_PARISC)           += parisc/
71  obj-$(CONFIG_RAPIDIO)          += rapidio/
72 --- a/drivers/irqchip/Makefile
73 +++ b/drivers/irqchip/Makefile
74 @@ -80,3 +80,4 @@ obj-$(CONFIG_ARCH_ASPEED)             += irq-aspeed
75  obj-$(CONFIG_STM32_EXTI)               += irq-stm32-exti.o
76  obj-$(CONFIG_QCOM_IRQ_COMBINER)                += qcom-irq-combiner.o
77  obj-$(CONFIG_IRQ_UNIPHIER_AIDET)       += irq-uniphier-aidet.o
78 +obj-$(CONFIG_QUICC_ENGINE)             += irq-qeic.o
79 --- a/drivers/net/ethernet/freescale/Kconfig
80 +++ b/drivers/net/ethernet/freescale/Kconfig
81 @@ -5,10 +5,11 @@
82  config NET_VENDOR_FREESCALE
83         bool "Freescale devices"
84         default y
85 -       depends on FSL_SOC || QUICC_ENGINE || CPM1 || CPM2 || PPC_MPC512x || \
86 -                  M523x || M527x || M5272 || M528x || M520x || M532x || \
87 -                  ARCH_MXC || ARCH_MXS || (PPC_MPC52xx && PPC_BESTCOMM) || \
88 -                  ARCH_LAYERSCAPE || COMPILE_TEST
89 +       depends on FSL_SOC || (QUICC_ENGINE && PPC32) || CPM1 || CPM2 || \
90 +                  PPC_MPC512x || M523x || M527x || M5272 || M528x || M520x || \
91 +                  M532x || ARCH_MXC || ARCH_MXS || \
92 +                  (PPC_MPC52xx && PPC_BESTCOMM) || ARCH_LAYERSCAPE || \
93 +                  COMPILE_TEST
94         ---help---
95           If you have a network (Ethernet) card belonging to this class, say Y.
96  
97 @@ -73,7 +74,7 @@ config FSL_XGMAC_MDIO
98  
99  config UCC_GETH
100         tristate "Freescale QE Gigabit Ethernet"
101 -       depends on QUICC_ENGINE
102 +       depends on QUICC_ENGINE && FSL_SOC && PPC32
103         select FSL_PQ_MDIO
104         select PHYLIB
105         ---help---
106 @@ -94,7 +95,8 @@ config GIANFAR
107           This driver supports the Gigabit TSEC on the MPC83xx, MPC85xx,
108           and MPC86xx family of chips, the eTSEC on LS1021A and the FEC
109           on the 8540.
110 -
111 +source "drivers/net/ethernet/freescale/sdk_fman/Kconfig"
112 +source "drivers/net/ethernet/freescale/sdk_dpaa/Kconfig"
113  source "drivers/net/ethernet/freescale/dpaa/Kconfig"
114  
115  endif # NET_VENDOR_FREESCALE
116 --- a/drivers/net/ethernet/freescale/Makefile
117 +++ b/drivers/net/ethernet/freescale/Makefile
118 @@ -20,5 +20,8 @@ gianfar_driver-objs := gianfar.o \
119  obj-$(CONFIG_UCC_GETH) += ucc_geth_driver.o
120  ucc_geth_driver-objs := ucc_geth.o ucc_geth_ethtool.o
121  
122 +obj-$(if $(CONFIG_FSL_SDK_FMAN),y) += sdk_fman/
123 +obj-$(if $(CONFIG_FSL_SDK_DPAA_ETH),y) += sdk_dpaa/
124 +
125  obj-$(CONFIG_FSL_FMAN) += fman/
126  obj-$(CONFIG_FSL_DPAA_ETH) += dpaa/
127 --- a/drivers/ptp/Kconfig
128 +++ b/drivers/ptp/Kconfig
129 @@ -41,19 +41,19 @@ config PTP_1588_CLOCK_DTE
130           To compile this driver as a module, choose M here: the module
131           will be called ptp_dte.
132  
133 -config PTP_1588_CLOCK_GIANFAR
134 -       tristate "Freescale eTSEC as PTP clock"
135 -       depends on GIANFAR
136 +config PTP_1588_CLOCK_QORIQ
137 +       tristate "Freescale QorIQ 1588 timer as PTP clock"
138 +       depends on GIANFAR || FSL_DPAA_ETH || FSL_SDK_DPAA_ETH
139         depends on PTP_1588_CLOCK
140         default y
141         help
142 -         This driver adds support for using the eTSEC as a PTP
143 -         clock. This clock is only useful if your PTP programs are
144 -         getting hardware time stamps on the PTP Ethernet packets
145 -         using the SO_TIMESTAMPING API.
146 +         This driver adds support for using the Freescale QorIQ 1588
147 +         timer as a PTP clock. This clock is only useful if your PTP
148 +         programs are getting hardware time stamps on the PTP Ethernet
149 +         packets using the SO_TIMESTAMPING API.
150  
151           To compile this driver as a module, choose M here: the module
152 -         will be called gianfar_ptp.
153 +         will be called ptp_qoriq.
154  
155  config PTP_1588_CLOCK_IXP46X
156         tristate "Intel IXP46x as PTP clock"
157 --- a/drivers/soc/Kconfig
158 +++ b/drivers/soc/Kconfig
159 @@ -5,6 +5,7 @@ source "drivers/soc/amlogic/Kconfig"
160  source "drivers/soc/atmel/Kconfig"
161  source "drivers/soc/bcm/Kconfig"
162  source "drivers/soc/fsl/Kconfig"
163 +source "drivers/soc/fsl/ls2-console/Kconfig"
164  source "drivers/soc/imx/Kconfig"
165  source "drivers/soc/mediatek/Kconfig"
166  source "drivers/soc/qcom/Kconfig"
167 --- a/drivers/soc/fsl/Kconfig
168 +++ b/drivers/soc/fsl/Kconfig
169 @@ -16,3 +16,25 @@ config FSL_GUTS
170           Initially only reading SVR and registering soc device are supported.
171           Other guts accesses, such as reading RCW, should eventually be moved
172           into this driver as well.
173 +
174 +config FSL_QIXIS
175 +       tristate "QIXIS system controller driver"
176 +       depends on OF
177 +       select REGMAP_I2C
178 +       select REGMAP_MMIO
179 +       select MFD_CORE
180 +       default n
181 +       help
182 +         Say y here to enable QIXIS system controller api. The qixis driver
183 +         provides FPGA functions to control system.
184 +
185 +config FSL_SLEEP_FSM
186 +       bool
187 +       help
188 +         This driver configures a hardware FSM (Finite State Machine) for deep sleep.
189 +         The FSM is used to finish clean-ups at the last stage of system entering deep
190 +         sleep, and also wakes up system when a wake up event happens.
191 +
192 +if ARM || ARM64
193 +source "drivers/soc/fsl/Kconfig.arm"
194 +endif
195 --- /dev/null
196 +++ b/drivers/soc/fsl/Kconfig.arm
197 @@ -0,0 +1,16 @@
198 +#
199 +# Freescale ARM SOC Drivers
200 +#
201 +
202 +config LS_SOC_DRIVERS
203 +       bool "Layerscape Soc Drivers"
204 +       depends on ARCH_LAYERSCAPE || SOC_LS1021A
205 +       default n
206 +       help
207 +       Say y here to enable Freescale Layerscape Soc Device Drivers support.
208 +       The Soc Drivers provides the device driver that is a specific block
209 +       or feature on Layerscape platform.
210 +
211 +if LS_SOC_DRIVERS
212 +       source "drivers/soc/fsl/layerscape/Kconfig"
213 +endif
214 --- a/drivers/soc/fsl/Makefile
215 +++ b/drivers/soc/fsl/Makefile
216 @@ -5,4 +5,9 @@
217  obj-$(CONFIG_FSL_DPAA)                 += qbman/
218  obj-$(CONFIG_QUICC_ENGINE)             += qe/
219  obj-$(CONFIG_CPM)                      += qe/
220 +obj-$(CONFIG_FSL_QIXIS)                += qixis_ctrl.o
221  obj-$(CONFIG_FSL_GUTS)                 += guts.o
222 +obj-$(CONFIG_FSL_LS2_CONSOLE)          += ls2-console/
223 +obj-$(CONFIG_SUSPEND)                  += rcpm.o
224 +obj-$(CONFIG_LS_SOC_DRIVERS)           += layerscape/
225 +obj-$(CONFIG_FSL_SLEEP_FSM)    += sleep_fsm.o
226 --- /dev/null
227 +++ b/drivers/soc/fsl/layerscape/Kconfig
228 @@ -0,0 +1,10 @@
229 +#
230 +# Layerscape Soc drivers
231 +#
232 +config  FTM_ALARM
233 +       bool "FTM alarm driver"
234 +       default n
235 +       help
236 +       Say y here to enable FTM alarm support.  The FTM alarm provides
237 +       alarm functions for wakeup system from deep sleep.  There is only
238 +       one FTM can be used in ALARM(FTM 0).
239 --- /dev/null
240 +++ b/drivers/soc/fsl/layerscape/Makefile
241 @@ -0,0 +1 @@
242 +obj-$(CONFIG_FTM_ALARM) += ftm_alarm.o
243 --- a/drivers/staging/Kconfig
244 +++ b/drivers/staging/Kconfig
245 @@ -118,4 +118,8 @@ source "drivers/staging/vboxvideo/Kconfi
246  
247  source "drivers/staging/pi433/Kconfig"
248  
249 +source "drivers/staging/fsl_qbman/Kconfig"
250 +
251 +source "drivers/staging/fsl_ppfe/Kconfig"
252 +
253  endif # STAGING
254 --- a/drivers/staging/Makefile
255 +++ b/drivers/staging/Makefile
256 @@ -50,3 +50,5 @@ obj-$(CONFIG_BCM2835_VCHIQ)   += vc04_serv
257  obj-$(CONFIG_CRYPTO_DEV_CCREE) += ccree/
258  obj-$(CONFIG_DRM_VBOXVIDEO)    += vboxvideo/
259  obj-$(CONFIG_PI433)            += pi433/
260 +obj-$(CONFIG_FSL_SDK_DPA)      += fsl_qbman/
261 +obj-$(CONFIG_FSL_PPFE)         += fsl_ppfe/
262 --- a/drivers/staging/fsl-dpaa2/Kconfig
263 +++ b/drivers/staging/fsl-dpaa2/Kconfig
264 @@ -4,7 +4,7 @@
265  
266  config FSL_DPAA2
267         bool "Freescale DPAA2 devices"
268 -       depends on FSL_MC_BUS && ARCH_LAYERSCAPE
269 +       depends on FSL_MC_BUS
270         ---help---
271           Build drivers for Freescale DataPath Acceleration
272           Architecture (DPAA2) family of SoCs.
273 @@ -16,3 +16,57 @@ config FSL_DPAA2_ETH
274         ---help---
275           Ethernet driver for Freescale DPAA2 SoCs, using the
276           Freescale MC bus driver
277 +
278 +if FSL_DPAA2_ETH
279 +config FSL_DPAA2_ETH_USE_ERR_QUEUE
280 +       bool "Enable Rx error queue"
281 +       default n
282 +       ---help---
283 +         Allow Rx error frames to be enqueued on an error queue
284 +         and processed by the driver (by default they are dropped
285 +         in hardware).
286 +         This may impact performance, recommended for debugging
287 +         purposes only.
288 +
289 +# QBMAN_DEBUG requires some additional DPIO APIs
290 +config FSL_DPAA2_ETH_DEBUGFS
291 +       depends on DEBUG_FS
292 +       bool "Enable debugfs support"
293 +       default y
294 +       ---help---
295 +         Enable advanced statistics through debugfs interface.
296 +
297 +config FSL_DPAA2_ETH_DCB
298 +        bool "Data Center Bridging (DCB) Support"
299 +        default n
300 +        depends on DCB
301 +        ---help---
302 +          Say Y here if you want to use Data Center Bridging (DCB) features
303 +          (PFC) in the driver.
304 +
305 +          If unsure, say N.
306 +
307 +config FSL_DPAA2_PTP_CLOCK
308 +       tristate "Freescale DPAA2 as PTP clock"
309 +       select PTP_1588_CLOCK
310 +       default y
311 +       help
312 +         This driver adds support for using the DPAA2 1588 timer module
313 +         as a PTP clock. This clock is only useful if your PTP programs are
314 +         getting hardware time stamps on the PTP Ethernet packets
315 +         using the SO_TIMESTAMPING API.
316 +
317 +         To compile this driver as a module, choose M here: the module
318 +         will be called dpaa2-rtc.
319 +endif
320 +
321 +source "drivers/staging/fsl-dpaa2/mac/Kconfig"
322 +source "drivers/staging/fsl-dpaa2/evb/Kconfig"
323 +
324 +config FSL_DPAA2_ETHSW
325 +       tristate "Freescale DPAA2 Ethernet Switch"
326 +       depends on FSL_DPAA2
327 +       depends on NET_SWITCHDEV
328 +       ---help---
329 +       Driver for Freescale DPAA2 Ethernet Switch. Select
330 +       BRIDGE to have support for bridge tools.
331 --- a/drivers/staging/fsl-dpaa2/Makefile
332 +++ b/drivers/staging/fsl-dpaa2/Makefile
333 @@ -3,3 +3,7 @@
334  #
335  
336  obj-$(CONFIG_FSL_DPAA2_ETH)    += ethernet/
337 +obj-$(CONFIG_FSL_DPAA2_MAC)    += mac/
338 +obj-$(CONFIG_FSL_DPAA2_EVB)    += evb/
339 +obj-$(CONFIG_FSL_DPAA2_PTP_CLOCK) += rtc/
340 +obj-$(CONFIG_FSL_DPAA2_ETHSW)  += ethsw/