1: [[!meta title="NetBSD/evbarm on NVIDIA Tegra"]]
2:
3: The NetBSD tegra port currently supports the NVIDIA Tegra K1 (32-bit) system-on-a-chip. The [NVIDIA Jetson TK1 development kit](https://developer.nvidia.com/jetson-tk1) is a board based on the Tegra K1 SoC.
4:
5: [[!toc levels=2]]
6:
7: # Supported hardware
8: - CPU: Cortex-A15: NVIDIA Tegra K1 (T124) (4-core)
9: - VFP / NEON
10: - CPU frequency scaling
11: - GIC
12: - ARM generic timer
13: - Clock and reset controller
14: - GPIO controller
15: - MPIO / pinmux controller
16: - Memory controller
17: - Power management controller
18: - I2C controller
19: - UART [[!template id=man name="com" section="4"]] serial console
20: - RTC
21: - Watchdog timer
22: - SDMMC [[!template id=man name="sdhc" section="4"]] controller
23: - USB 2.0 [[!template id=man name="ehci" section="4"]] controller
24: - USB 3.0 [[!template id=man name="xhci" section="4"]] controller
25: - Requires the [sysutils/tegra-firmware](http://pkgsrc.se/sysutils/tegra-firmware) package to be installed.
26: - PCI express
27: - SATA [[!template id=man name="ahcisata" section="4"]] controller
28: - HDMI
29: - Framebuffer console
30: - HDMI Audio [[!template id=man name="hdaudio" section="4"]] controller
31: - HDMI CEC
32: - Jetson TK1
33: - On-board Realtek 8111G [[!template id=man name="re" section="4"]] gigabit ethernet
34: - EEPROM [[!template id=man name="seeprom" section="4"]] (on I2C)
35: - TMP451 [[!template id=man name="titemp" section="4"]] temperature sensor (on I2C)
36: - RF kill switch
37: - Power button
38: - AS3722 power management unit
39: - eFUSE
40: - SoC thermal sensors
41:
42:
43: # TODO
44: - Memory controller SMMU support
45: - APB DMA
46: - Audio Hub (AHUB)
47: - GPU (nouveau)
48: - SPI controller
49: - PWM controller
50: - PCIe MSI support
51: - CL-DVFS
52: - LVDS/eDP display output
53: - [[Chromebook|tegra-chromebook]] support
54:
55: # Generating a boot script
56:
57: The Tegra kernels need a .dtb for your board to boot. The dtb here was updated on 2017-04-13 and is generated from a Linux 4.10.10 source tree. [NVIDIA Jetson TK1 .dtb](http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/tegra/tegra124-jetson-tk1.dtb)
58:
59: [[!template id=programlisting text="""
60: $ cat boot.txt
61: setenv bootargs root=ld0a
62: fatload mmc 1:1 0x90000000 netbsd.ub
63: fatload mmc 1:1 ${fdt_addr_r} tegra124-jetson-tk1.dtb
64: fdt addr ${fdt_addr_r}
65: bootm 0x90000000 - ${fdt_addr_r}
66: $ mkubootimage -A arm -C none -O netbsd -T script -a 0 -n "NetBSD/tegra boot" boot.txt boot.scr
67: """]]
68:
69: # Getting U-Boot
70:
71: Jetson TK1 boards come with Linux4Tegra R19.x installed, which doesn't use U-Boot. The easiest way to get U-Boot is to upgrade to Linux4Tegra R21.x (Linux PC or VM required) following the [quick start guide](http://developer.download.nvidia.com/embedded/L4T/r21_Release_v4.0/l4t_quick_start_guide.txt).
72:
73: # Modesetting
74:
75: ## Console
76:
77: To override the default video mode (auto-detected from display EDID), use the *video* kernel command-line parameter:
78:
79: [[!template id=programlisting text="""
80: video=<xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m][eDd]
81: """]]
82:
83: ## Xorg
84:
85: To be able to use the mode setting features of the Tegra DRM driver, you must use the xf86-video-modesetting driver. Put this in xorg.conf:
86:
87: [[!template id=programlisting text="""
88: Section "Device"
89: Identifier "DRM Modesetting"
90: Driver "modesetting"
91: EndSection
92: """]]
93:
94: # GPU (nouveau)
95:
96: To enable the GPU, add the following before the `bootm` command in the boot script:
97:
98: [[!template id=programlisting text="""
99: fdt set /gpu@0,57000000 status okay
100: """]]
101:
102: For the nouveau driver to load successfully, firmware is required:
103:
104: * Install the [sysutils/tegra-firmware](http://pkgsrc.se/sysutils/tegra-firmware) package from pkgsrc.
105: * Extract the contents of [tegra-nouveau-firmware.tar.gz](http://cdn.netbsd.org/pub/NetBSD/misc/jmcneill/tegra/tegra-nouveau-firmware.tar.gz) to ''/libdata/firmware/nouveau''.
106:
107: You should see the following messages at boot:
108:
109: [[!template id=programlisting text="""
110: nouveau0 at fdt0: GPU
111: drm kern info: nouveau [ DEVICE][nouveau0] BOOT0 : 0x0ea000a1
112: drm kern info: nouveau [ DEVICE][nouveau0] Chipset: GK20A (NVEA)
113: drm kern info: nouveau [ DEVICE][nouveau0] Family : NVE0
114: drm kern info: nouveau [ PFB][nouveau0] RAM type: stolen system memory
115: drm kern info: nouveau [ PFB][nouveau0] RAM size: 2019 MiB
116: drm kern info: nouveau [ PFB][nouveau0] ZCOMP: 0 tags
117: drm kern info: nouveau [ PGRAPH][nouveau0] using external firmware
118: drm kern info: nouveau [ DRM] VRAM: 2019 MiB
119: drm kern info: nouveau [ DRM] GART: 1048576 MiB
120: drm kern error: nouveau E[ PFIFO][nouveau0] unsupported engines 0x00000030
121: drm kern error: nouveau E[ DRM] failed to create ce channel, -22
122: drm kern info: nouveau [ DRM] MM: using GRCE for buffer copies
123: nouveau0: initialized nouveau 1.1.1 20120801 on minor 1
124: """]]
125:
126: # dmesg
127:
128: [[!template id=programlisting text="""
129: Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
130: 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
131: The NetBSD Foundation, Inc. All rights reserved.
132: Copyright (c) 1982, 1986, 1989, 1991, 1993
133: The Regents of the University of California. All rights reserved.
134:
135: NetBSD 7.99.23 (JETSONTK1) #657: Sun Dec 13 12:33:17 AST 2015
136: jmcneill@megatron.local:/Users/jmcneill/netbsd/src/sys/arch/evbarm/compile/obj/JETSONTK1
137: total memory = 2047 MB
138: avail memory = 2020 MB
139: sysctl_createv: sysctl_create(machine_arch) returned 17
140: timecounter: Timecounters tick every 10.000 msec
141: mainbus0 (root)
142: cpu0 at mainbus0 core 0: 2316 MHz Cortex-A15 r3p3 (Cortex V7A core)
143: cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
144: cpu0: 32KB/64B 2-way L1 PIPT Instruction cache
145: cpu0: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache
146: cpu0: 2048KB/64B 16-way write-through L2 PIPT Unified cache
147: vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
148: cpu1 at mainbus0 core 1
149: cpu2 at mainbus0 core 2
150: cpu3 at mainbus0 core 3
151: armperiph0 at mainbus0
152: armgic0 at armperiph0: Generic Interrupt Controller, 192 sources (183 valid)
153: armgic0: 32 Priorities, 160 SPIs, 7 PPIs, 16 SGIs
154: armgtmr0 at armperiph0: ARMv7 Generic 64-bit Timer (12000 kHz)
155: armgtmr0: interrupting on irq 27
156: timecounter: Timecounter "armgtmr0" frequency 12000000 Hz quality 500
157: tegrafdt0 at mainbus0
158: fdt0 at tegrafdt0: NVIDIA Tegra124 Jetson TK1
159: gic0 at fdt0: GIC
160: tegralic0 at fdt0: LIC
161: tegracar0 at fdt0: CAR
162: clock at fdt0 not configured
163: tegrampio0 at fdt0: MPIO
164: tegragpio0 at fdt0: GPIO
165: gpio0 at tegragpio0 (A): 8 pins
166: gpio1 at tegragpio0 (B): 8 pins
167: gpio2 at tegragpio0 (C): 8 pins
168: gpio3 at tegragpio0 (D): 8 pins
169: gpio4 at tegragpio0 (E): 8 pins
170: gpio5 at tegragpio0 (F): 8 pins
171: gpio6 at tegragpio0 (G): 8 pins
172: gpio7 at tegragpio0 (H): 8 pins
173: gpio8 at tegragpio0 (I): 8 pins
174: gpio9 at tegragpio0 (J): 8 pins
175: gpio10 at tegragpio0 (K): 8 pins
176: gpio11 at tegragpio0 (L): 8 pins
177: gpio12 at tegragpio0 (M): 8 pins
178: gpio13 at tegragpio0 (N): 8 pins
179: gpio14 at tegragpio0 (O): 8 pins
180: gpio15 at tegragpio0 (P): 8 pins
181: gpio16 at tegragpio0 (Q): 8 pins
182: gpio17 at tegragpio0 (R): 8 pins
183: gpio18 at tegragpio0 (S): 8 pins
184: gpio19 at tegragpio0 (T): 8 pins
185: gpio20 at tegragpio0 (U): 8 pins
186: gpio21 at tegragpio0 (V): 8 pins
187: gpio22 at tegragpio0 (W): 8 pins
188: gpio23 at tegragpio0 (X): 8 pins
189: gpio24 at tegragpio0 (Y): 8 pins
190: gpio25 at tegragpio0 (Z): 8 pins
191: gpio26 at tegragpio0 (AA): 8 pins
192: gpio27 at tegragpio0 (BB): 8 pins
193: gpio28 at tegragpio0 (CC): 8 pins
194: gpio29 at tegragpio0 (DD): 8 pins
195: gpio30 at tegragpio0 (EE): 8 pins
196: simplebus0 at fdt0: regulators
197: fdt1 at simplebus0
198: fregulator0 at fdt1: +VDD_MUX
199: fregulator1 at fdt1: +5V_SYS
200: fregulator2 at fdt1: +3.3V_SYS
201: fregulator3 at fdt1: +3.3V_RUN
202: fregulator4 at fdt1: +3.3V_AVDD_HDMI_AP_GATED
203: fregulator5 at fdt1: +USB0_VBUS_SW
204: fregulator6 at fdt1: +5V_USB_HS
205: fregulator7 at fdt1: +3.3V_LP0
206: fregulator8 at fdt1: +1.05V_RUN_AVDD_HDMI_PLL
207: fregulator9 at fdt1: +5V_HDMI_CON
208: fregulator10 at fdt1: +5V_SATA
209: fregulator11 at fdt1: +12V_SATA
210: dma at fdt0 not configured
211: tegrapmc0 at fdt0: PMC
212: tegramc0 at fdt0: MC
213: tegramc0: interrupting on LIC irq 109
214: tegrai2c0 at fdt0: I2C1
215: tegrai2c0: interrupting on LIC irq 70
216: iic0 at tegrai2c0: I2C bus
217: audio-codec at iic0 addr 0x1c not configured
218: titemp0 at iic0 addr 0x4c: TMP451
219: seeprom0 at iic0 addr 0x56: eeprom: size 256
220: tegrai2c1 at fdt0: I2C2
221: tegrai2c1: interrupting on LIC irq 116
222: iic1 at tegrai2c1: I2C bus
223: tegrai2c2 at fdt0: I2C3
224: tegrai2c2: interrupting on LIC irq 124
225: iic2 at tegrai2c2: I2C bus
226: tegrai2c3 at fdt0: I2C4
227: tegrai2c3: interrupting on LIC irq 152
228: iic3 at tegrai2c3: I2C bus
229: tegrai2c4 at fdt0: I2C5
230: tegrai2c4: interrupting on LIC irq 85
231: iic4 at tegrai2c4: I2C bus
232: as3722pmic0 at iic4 addr 0x40: AMS AS3822
233: as3722pmic0: default watchdog period is 10 seconds
234: tegrausbphy0 at fdt0: USB PHY2
235: tegrausbphy1 at fdt0: USB PHY3
236: tegrapcie0 at fdt0: PCIE
237: tegrapcie0: interrupting on LIC irq 130
238: pci0 at tegrapcie0 bus 0
239: pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
240: ppb0 at pci0 dev 0 function 0: vendor 10de product 0e12 (rev. 0xa1)
241: ppb0: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x2 @ 5.0GT/s
242: ppb0: link is x1 @ 2.5GT/s
243: pci1 at ppb0 bus 1
244: pci1: i/o space, memory space enabled, rd/line, wr/inv ok
245: athn0 at pci1 dev 0 function 0: Atheros AR9285
246: athn0: rev 2 (1T1R), ROM rev 13, address 00:17:c4:d7:d0:58
247: athn0: interrupting at LIC irq 130
248: athn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
249: athn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
250: ppb1 at pci0 dev 1 function 0: vendor 10de product 0e13 (rev. 0xa1)
251: ppb1: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x1 @ 5.0GT/s
252: ppb1: link is x1 @ 2.5GT/s
253: pci2 at ppb1 bus 2
254: pci2: i/o space, memory space enabled, rd/line, wr/inv ok
255: re0 at pci2 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x0c)
256: re0: interrupting at LIC irq 130
257: re0: Ethernet address 00:04:4b:2f:51:a2
258: re0: using 512 tx descriptors
259: rgephy0 at re0 phy 7: RTL8251 1000BASE-T media interface, rev. 0
260: rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
261: tegradrm0 at fdt0
262: drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
263: drm: No driver support for vblank timestamp query.
264: tegrafb0 at tegradrm0
265: tegrafb0: framebuffer at 0x9bc00000, size 1920x1080, depth 32, stride 7680
266: wsdisplay0 at tegrafb0 kbdmux 1
267: wsmux1: connecting to wsdisplay0
268: wsdisplay0: screen 0-3 added (default, vt100 emulation)
269: tegradrm0: info: registered panic notifier
270: tegradrm0: initialized tegra 0.1.0 20151108 on minor 0
271: tegratimer0 at fdt0: Timers
272: tegratimer0: default watchdog period is 10 seconds
273: flow-controller at fdt0 not configured
274: actmon at fdt0 not configured
275: apbmisc at fdt0 not configured
276: com0 at fdt0: ns16550a, working fifo
277: com0: console
278: com0: interrupting on LIC irq 122
279: spi at fdt0 not configured
280: spi at fdt0 not configured
281: tegrartc0 at fdt0: RTC
282: tegrafuse0 at fdt0: FUSE
283: emc at fdt0 not configured
284: ahcisata0 at fdt0: SATA
285: ahcisata0: couldn't acquire vddio-supply
286: ahcisata0: couldn't acquire avdd-supply
287: ahcisata0: interrupting on LIC irq 55
288: ahcisata0: AHCI revision 1.31, 2 ports, 32 slots, CAP 0xe620ff01<PSC,SSC,PMD,ISS=0x2=Gen2,SAL,SALP,SSNTF,SNCQ,S64A>
289: atabus0 at ahcisata0 channel 0
290: hdaudio0 at fdt0: HDA
291: hdaudio0: interrupting on LIC irq 113
292: hdafg0 at hdaudio0: NVIDIA Tegra124 HDMI
293: hdafg0: HDMI00 8ch: Digital Out [Jack]
294: hdafg0: 8ch/0ch 44100Hz PCM16*
295: audio0 at hdafg0: full duplex, playback, capture, mmap, independent
296: tegraxusbpad0 at fdt0: XUSB PADCTL
297: sdhc0 at fdt0: SDMMC3
298: sdhc0: interrupting on LIC irq 51
299: sdhc0: SDHC 4.0, rev 3, 32-bit ADMA2, 204000 kHz, HS SDR50 SDR104 HS200 1.8V 3.0V 3.3V, re-tuning mode 1, 4096 byte blocks
300: sdmmc0 at sdhc0 slot 0
301: sdhc1 at fdt0: SDMMC4
302: sdhc1: interrupting on LIC irq 63
303: sdhc1: SDHC 4.0, rev 3, 32-bit ADMA2, 204000 kHz, HS SDR50 SDR104 HS200 1.8V 3.0V 3.3V, re-tuning mode 1, 4096 byte blocks
304: sdmmc1 at sdhc1 slot 0
305: tegrasoctherm0 at fdt0: SOC_THERM
306: ahub at fdt0 not configured
307: ehci0 at fdt0: USB2
308: ehci0: interrupting on LIC irq 53
309: ehci0: EHCI version 1.10
310: ehci0: switching to host mode
311: usb0 at ehci0: USB revision 2.0
312: ehci1 at fdt0: USB3
313: ehci1: interrupting on LIC irq 129
314: ehci1: EHCI version 1.10
315: ehci1: switching to host mode
316: usb1 at ehci1: USB revision 2.0
317: pmu at fdt0 not configured
318: timer at fdt0 not configured
319: simplebus1 at fdt0: clocks
320: fdt2 at simplebus1
321: clock at fdt2 not configured
322: gpio-keys at fdt0 not configured
323: sound at fdt0 not configured
324: timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
325: cpu3: 2316 MHz Cortex-A15 r3p3 (Cortex V7A core)
326: cpu3: DC enabled IC enabled WB disabled EABT branch prediction enabled
327: cpu3: 32KB/64B 2-way L1 PIPT Instruction cache
328: cpu3: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache
329: cpu3: 2048KB/64B 16-way write-through L2 PIPT Unified cache
330: vfp3 at cpu3: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
331: cpu1: 2316 MHz Cortex-A15 r3p3 (Cortex V7A core)
332: cpu1: DC enabled IC enabled WB disabled EABT branch prediction enabled
333: cpu1: 32KB/64B 2-way L1 PIPT Instruction cache
334: cpu1: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache
335: cpu1: 2048KB/64B 16-way write-through L2 PIPT Unified cache
336: vfp1 at cpu1: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
337: cpu2: 2316 MHz Cortex-A15 r3p3 (Cortex V7A core)
338: cpu2: DC enabled IC enabled WB disabled EABT branch prediction enabled
339: cpu2: 32KB/64B 2-way L1 PIPT Instruction cache
340: cpu2: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache
341: cpu2: 2048KB/64B 16-way write-through L2 PIPT Unified cache
342: vfp2 at cpu2: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
343: uhub0 at usb0: Tegra EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
344: uhub0: 1 port with 1 removable, self powered
345: ahcisata0 port 0: device present, speed: 3.0Gb/s
346: uhub1 at usb1: Tegra EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
347: uhub1: 1 port with 1 removable, self powered
348: sdhc1: cmd timeout error
349: IPsec: Initialized Security Association Processing.
350: ld0 at sdmmc1: <0x45:0x0100:SEM16G:0x00:0x0301ff34:0x000>
351: ld0: 15028 MB, 7633 cyl, 64 head, 63 sec, 512 bytes/sect x 30777344 sectors
352: ld0: GPT GUID: a81e231f-7b1c-c564-1473-5ac55e4b7963
353: dk0 at ld0: "APP", 29360128 blocks at 94208, type: <unknown>
354: dk1 at ld0: "DTB", 8192 blocks at 29454336, type: <unknown>
355: ld1 at sdmmc0dk2 at ld0: "EFI", 131072 blocks at 29462528, type: <unknown>
356: : <0x27:0x5048:SD64G:0x30:0x01ce4def:0x0dc>
357: dk3 at ld0: "USP", 8192 blocks at 29593600, type: <unknown>
358: dk4 at ld0: "TP1", 8192 blocks at 29601792, type: <unknown>
359: dk5 at ld0: "TP2", 8192 blocks at 29609984, type: <unknown>
360: dk6 at ld0: "TP3", 8192 blocks at 29618176, type: <unknown>
361: dk7 at ld0: "WB0", 4096 blocks at 29626368, type: <unknown>
362: dk8 at ld0: "UDA", 1142784 blocks at 29630464, type: <unknown>
363: ld0: 8-bit width, HS200, 200.000 MHz
364: ld1: 59504 MB, 7585 cyl, 255 head, 63 sec, 512 bytes/sect x 121864192 sectors
365: ld1: 4-bit width, SDR104, 204.000 MHz
366: wd0 at atabus0 drive 0
367: wd0: <OCZ-AGILITY3>
368: wd0: drive supports 16-sector PIO transfers, LBA48 addressing
369: wd0: 111 GB, 232581 cyl, 16 head, 63 sec, 512 bytes/sect x 234441648 sectors
370: wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
371: wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
372: uhidev0 at uhub1 port 1 configuration 1 interface 0
373: uhidev0: Logitech USB Receiver, rev 2.00/29.00, addr 2, iclass 3/1
374: ukbd0 at uhidev0: 8 modifier keys, 6 key codes
375: wskbd0 at ukbd0 mux 1
376: wskbd0: connecting to wsdisplay0
377: uhidev1 at uhub1 port 1 configuration 1 interface 1
378: uhidev1: Logitech USB Receiver, rev 2.00/29.00, addr 2, iclass 3/1
379: uhidev1: 17 report ids
380: ums0 at uhidev1 reportid 2: 16 buttons, W and Z dirs
381: wsmouse0 at ums0 mux 0
382: uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
383: uhid1 at uhidev1 reportid 4: input=1, output=0, feature=0
384: uhid2 at uhidev1 reportid 16: input=6, output=6, feature=0
385: uhid3 at uhidev1 reportid 17: input=19, output=19, feature=0
386: boot device: wd0
387: root on wd0a dumps on wd0b
388: root file system type: ffs
389: kern.module.path=/stand/evbarm/7.99.23/modules
390: WARNING: preposterous TOD clock time
391: WARNING: using filesystem time
392: WARNING: CHECK AND RESET THE DATE!
393: """]]
394:
395: # Links
396:
397: - [NVIDIA Jetson TK1 development kit](https://developer.nvidia.com/jetson-tk1)
398: - [Hardware documentation](https://developer.nvidia.com/hardware-design-and-development)
399: - [Linux For Tegra](https://developer.nvidia.com/linux-tegra)
400: - [Device Tree](http://www.devicetree.org)
401:
402: .
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb