source: rtems-libbsd/rtemsbsd/include/bsp/nexus-devices.h @ f5c405e

6-freebsd-12
Last change on this file since f5c405e was f5c405e, checked in by Chris Johns <chrisj@…>, on 02/17/21 at 03:55:48

bsp/motorola_powerpc: Add dc and ukphy support

  • Add the dc net dev to the BSP
  • Add the ukphy support

Closes # 4246

  • Property mode set to 100644
File size: 7.6 KB
RevLine 
[369e2c4]1/*
[c30fa94]2 * Copyright (c) 2013, 2018 embedded brains GmbH.  All rights reserved.
[369e2c4]3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
[459d67d]10 * Copyright (c) 2016 Chris Johns <chrisj@rtems.org> All rights reserved.
11 *
[369e2c4]12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 *    notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 *    notice, this list of conditions and the following disclaimer in the
19 *    documentation and/or other materials provided with the distribution.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
[459d67d]34#if !defined(BSP_NEXUS_DEVICES_h)
35#define BSP_NEXUS_DEVICES_h
36
[f588325]37#include <bsp.h>
38
[369e2c4]39#include <rtems/bsd/bsd.h>
[f8cf074]40#include <rtems/bsd/modules.h>
[f588325]41#include <machine/rtems-bsd-nexus-bus.h>
[369e2c4]42
43
44#if defined(LIBBSP_ARM_REALVIEW_PBX_A9_BSP_H)
[63d8e59]45
[369e2c4]46#include <bsp/irq.h>
47
[f588325]48RTEMS_BSD_DRIVER_SMC0(0x4e000000,  RVPBXA9_IRQ_ETHERNET);
[63d8e59]49
[9121570]50#elif defined(LIBBSP_ARM_BEAGLE_BSP_H)
51
52#include <bsp/irq.h>
53
54RTEMS_BSD_DEFINE_NEXUS_DEVICE(ofwbus, 0, 0, NULL);
55SYSINIT_DRIVER_REFERENCE(simplebus, ofwbus);
56SYSINIT_DRIVER_REFERENCE(ti_scm, simplebus);
57SYSINIT_DRIVER_REFERENCE(am335x_prcm, simplebus);
58SYSINIT_DRIVER_REFERENCE(usbss, simplebus);
59SYSINIT_DRIVER_REFERENCE(musbotg, usbss);
[7c68f4e]60SYSINIT_DRIVER_REFERENCE(sdhci_ti, simplebus);
61SYSINIT_DRIVER_REFERENCE(mmcsd, mmc);
[8ae22c4]62SYSINIT_DRIVER_REFERENCE(cpsw, cpswss);
63SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
[2eae88b]64#ifdef RTEMS_BSD_MODULE_NET80211
[47169ea]65SYSINIT_DRIVER_REFERENCE(rtwn_usb, uhub);
66SYSINIT_MODULE_REFERENCE(wlan_ratectl_none);
67SYSINIT_MODULE_REFERENCE(wlan_sta);
68SYSINIT_MODULE_REFERENCE(wlan_amrr);
[097ccba]69SYSINIT_MODULE_REFERENCE(wlan_wep);
[8f2267b]70SYSINIT_MODULE_REFERENCE(wlan_tkip);
71SYSINIT_MODULE_REFERENCE(wlan_ccmp);
[47169ea]72SYSINIT_REFERENCE(rtwn_rtl8188eufw);
[2eae88b]73#endif /* RTEMS_BSD_MODULE_NET80211 */
[9121570]74
75RTEMS_BSD_DRIVER_USB;
76RTEMS_BSD_DRIVER_USB_MASS;
77
[9f2205a]78#elif defined(LIBBSP_ARM_LPC32XX_BSP_H)
79
80#include <bsp/irq.h>
81
82RTEMS_BSD_DRIVER_LPC32XX_PWR;
83RTEMS_BSD_DRIVER_LPC32XX_LPE;
[e28a8d0]84RTEMS_BSD_DRIVER_LPC32XX_TSC;
[9f2205a]85RTEMS_BSD_DRIVER_ICSPHY;
86RTEMS_BSD_DRIVER_LPC32XX_OHCI;
87SYSINIT_DRIVER_REFERENCE(usbus, ohci);
88RTEMS_BSD_DRIVER_USB;
89RTEMS_BSD_DRIVER_USB_MASS;
90
[3cb5e9e]91#elif defined(LIBBSP_M68K_GENMCF548X_BSP_H)
[63d8e59]92
[f588325]93RTEMS_BSD_DRIVER_FEC;
[63d8e59]94
[5071600]95#elif defined(LIBBSP_ARM_XILINX_ZYNQ_BSP_H)
96
97#include <bsp/irq.h>
98
[c40e45b]99RTEMS_BSD_DRIVER_XILINX_ZYNQ_SLCR;
[68e79b6]100RTEMS_BSD_DRIVER_XILINX_ZYNQ_SDHCI0;
101RTEMS_BSD_DRIVER_XILINX_ZYNQ_SDHCI1;
[f588325]102RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM0(ZYNQ_IRQ_ETHERNET_0);
103RTEMS_BSD_DRIVER_E1000PHY;
[68e79b6]104RTEMS_BSD_DRIVER_MMC;
[5071600]105
[0ad342a]106#elif defined(LIBBSP_AARCH64_XILINX_ZYNQMP_BSP_H)
107
108#include <bsp/irq.h>
109
[e256668]110RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SLCR;
[1d9f93c]111/* Qemu only applies user-mode networking to the first interface by default, so
112 * all 4 CGEM instances must be configured in the Qemu arguments using
113 * "-nic user,model=cadence_gem" for each nic.
114 *
115 * CGEM3 is used for LibBSD because all Zynq Ultrascale+ MPSoC dev boards treat
116 * the highest-mapped CGEM as the primary interface.
117 */
[4ce914c]118RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM0(ZYNQMP_IRQ_ETHERNET_0);
119RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM1(ZYNQMP_IRQ_ETHERNET_1);
120RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM2(ZYNQMP_IRQ_ETHERNET_2);
[1d9f93c]121RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(ZYNQMP_IRQ_ETHERNET_3);
[0ad342a]122RTEMS_BSD_DRIVER_E1000PHY;
[023e94f]123RTEMS_BSD_DRIVER_UKPHY;
[0ad342a]124
[c413180]125RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI0;
126RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI1;
127RTEMS_BSD_DRIVER_MMC;
128
[e3881ee]129#elif defined(LIBBSP_ARM_ATSAM_BSP_H)
130
131RTEMS_BSD_DRIVER_USB;
132RTEMS_BSD_DRIVER_USB_MASS;
[80a7fe6]133RTEMS_BSD_DRIVER_IF_ATSAM;
134SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
[e3881ee]135
[fc9e83b]136#elif defined(LIBBSP_ARM_ALTERA_CYCLONE_V_BSP_H)
137
[c30fa94]138RTEMS_BSD_DEFINE_NEXUS_DEVICE(ofwbus, 0, 0, NULL);
139SYSINIT_DRIVER_REFERENCE(simplebus, ofwbus);
[aee6864]140
[c30fa94]141RTEMS_BSD_DRIVER_DW_ETH;
142RTEMS_BSD_DRIVER_PHY_MIC;
143
144RTEMS_BSD_DRIVER_DW_OTG;
[f588325]145RTEMS_BSD_DRIVER_USB;
146RTEMS_BSD_DRIVER_USB_MASS;
[ba44613]147
[c30fa94]148RTEMS_BSD_DRIVER_DW_MMC;
149RTEMS_BSD_DRIVER_MMC;
150
[95b102f]151#elif defined(LIBBSP_ARM_IMX_BSP_H)
152
153RTEMS_BSD_DEFINE_NEXUS_DEVICE(ofwbus, 0, 0, NULL);
154SYSINIT_DRIVER_REFERENCE(simplebus, ofwbus);
[b382502]155
[3a1d48c]156SYSINIT_DRIVER_REFERENCE(ccm, simplebus);
[c5455b0]157SYSINIT_DRIVER_REFERENCE(ehci, simplebus);
158SYSINIT_DRIVER_REFERENCE(usbphy, simplebus);
159SYSINIT_DRIVER_REFERENCE(usbus, ehci);
160RTEMS_BSD_DRIVER_USB;
161RTEMS_BSD_DRIVER_USB_MASS;
[3a1d48c]162
[95b102f]163SYSINIT_DRIVER_REFERENCE(ffec, simplebus);
164SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
165
[1398d93]166SYSINIT_DRIVER_REFERENCE(imx_rtems_gpio, simplebus);
[b382502]167SYSINIT_DRIVER_REFERENCE(sdhci_fsl, simplebus);
168RTEMS_BSD_DRIVER_MMC;
[06dd40e]169
[24806ee]170SYSINIT_DRIVER_REFERENCE(ofw_regulator_bus, simplebus);
171
[9cd2890]172#elif defined(LIBBSP_ARM_IMXRT_BSP_H)
173
174RTEMS_BSD_DEFINE_NEXUS_DEVICE(ofwbus, 0, 0, NULL);
175SYSINIT_DRIVER_REFERENCE(simplebus, ofwbus);
176
177SYSINIT_DRIVER_REFERENCE(ffec, simplebus);
178SYSINIT_DRIVER_REFERENCE(ksz8091rnb, miibus);
179
[f5f9e16]180#elif defined(LIBBSP_ARM_LPC24XX_BSP_H)
181
182RTEMS_BSD_DEFINE_NEXUS_DEVICE(ohci, 0, 0, NULL);
183SYSINIT_DRIVER_REFERENCE(usbus, ohci);
184RTEMS_BSD_DRIVER_USB;
185RTEMS_BSD_DRIVER_USB_MASS;
186
[1189f71]187#elif defined(LIBBSP_ARM_STM32H7_BSP_H)
188
[0e7108f]189#include <stm32h7xx.h>
190
[1189f71]191RTEMS_BSD_DEFINE_NEXUS_DEVICE(stmac, 0, 0, NULL);
192SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
193
[0e7108f]194static const rtems_bsd_device_resource dwcotg_res[] = {
195        {
196                .type = RTEMS_BSD_RES_MEMORY,
197                .start_request = 0,
198                .start_actual = USB2_OTG_FS_PERIPH_BASE
199        }, {
200                .type = RTEMS_BSD_RES_IRQ,
201                .start_request = 0,
202                .start_actual = OTG_FS_IRQn
203        }
204};
205RTEMS_BSD_DEFINE_NEXUS_DEVICE(dwcotg, 0, RTEMS_ARRAY_SIZE(dwcotg_res),
206    dwcotg_res);
[e0fcb31]207RTEMS_BSD_DRIVER_ST_SDMMC(0, SDMMC1_BASE, DLYB_SDMMC1_BASE, SDMMC1_IRQn);
208RTEMS_BSD_DRIVER_MMC;
[0e7108f]209RTEMS_BSD_DRIVER_USB;
210RTEMS_BSD_DRIVER_USB_MASS;
211
[45eb88b]212#elif defined(LIBBSP_I386_PC386_BSP_H)
213
[f588325]214RTEMS_BSD_DRIVER_PC_LEGACY;
215RTEMS_BSD_DRIVER_PCI_LEM;
216RTEMS_BSD_DRIVER_PCI_IGB;
217RTEMS_BSD_DRIVER_PCI_EM;
218RTEMS_BSD_DRIVER_PCI_RE;
219RTEMS_BSD_DRIVER_REPHY;
[f5c405e]220RTEMS_BSD_DRIVER_PCI_DC;
221RTEMS_BSD_DRIVER_DCPHY;
[4b127e7]222
[8fe59fe]223#elif defined(LIBBSP_POWERPC_QORIQ_BSP_H)
224
[28ee86a]225#if QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT)
226
227#include <bsp/irq.h>
228
[d62a3df]229#ifdef QORIQ_IS_HYPERVISOR_GUEST
230
231RTEMS_BSD_DEFINE_NEXUS_DEVICE(dpaa_ml, 0, 0, NULL);
232
233#else /* !QORIQ_IS_HYPERVISOR_GUEST */
234
[28ee86a]235RTEMS_BSD_DEFINE_NEXUS_DEVICE(fman, 0, 0, NULL);
236RTEMS_BSD_DEFINE_NEXUS_DEVICE(fman, 1, 0, NULL);
237
238SYSINIT_DRIVER_REFERENCE(fman_mac, fman);
239SYSINIT_DRIVER_REFERENCE(fman_port, fman_mac);
240SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
241
[d62a3df]242#endif /* QORIQ_IS_HYPERVISOR_GUEST */
243
[28ee86a]244#else /* QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT) */
[024e064]245
[8fe59fe]246#include <bsp/irq.h>
247
[334019d]248RTEMS_BSD_DEFINE_NEXUS_DEVICE(ofwbus, 0, 0, NULL);
249SYSINIT_DRIVER_REFERENCE(simplebus, ofwbus);
250SYSINIT_DRIVER_REFERENCE(tsec, simplebus);
251SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
[024e064]252
[28ee86a]253#endif /* QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT) */
[8fe59fe]254
[457b4fc]255#elif defined(LIBBSP_POWERPC_TQM8XX_BSP_H)
256
257RTEMS_BSD_DEFINE_NEXUS_DEVICE(fec, 0, 0, NULL);
[d101ed8]258SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
[457b4fc]259
[c99a1ab]260#elif defined(LIBBSP_POWERPC_MOTOROLA_POWERPC_BSP_H)
261
262RTEMS_BSD_DRIVER_PC_LEGACY;
[f5c405e]263RTEMS_BSD_DRIVER_PCI_DC;
264RTEMS_BSD_DRIVER_UKPHY;
[c99a1ab]265
266#endif /* LIBBSP_POWERPC_MOTOROLA_POWERPC_BSP_H */
[459d67d]267
268#endif
Note: See TracBrowser for help on using the repository browser.