Annotation of wikisrc/ports/evbarm/tegra.mdwn, revision 1.33

1.1       wiki        1: [[!meta title="NetBSD/evbarm on NVIDIA Tegra"]]
                      2: 
1.30      wiki        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.
1.1       wiki        4: 
1.4       wiki        5: [[!toc levels=2]]
                      6: 
                      7: # Supported hardware
                      8:  - CPU: Cortex-A15: NVIDIA Tegra K1 (T124) (4-core)
1.8       wiki        9:    - VFP / NEON
                     10:    - CPU frequency scaling
1.4       wiki       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
1.12      wiki       21:  - Watchdog timer
1.6       wiki       22:  - SDMMC [[!template id=man name="sdhc" section="4"]] controller
1.4       wiki       23:  - USB 2.0 [[!template id=man name="ehci" section="4"]] controller
                     24:  - PCI express
1.10      wiki       25:  - SATA [[!template id=man name="ahcisata" section="4"]] controller
1.17      wiki       26:  - HDMI
                     27:    - Framebuffer console
                     28:    - HDMI Audio [[!template id=man name="hdaudio" section="4"]] controller
1.18      wiki       29:    - HDMI CEC
1.4       wiki       30:  - Jetson TK1
                     31:    - On-board Realtek 8111G [[!template id=man name="re" section="4"]] gigabit ethernet 
                     32:    - EEPROM [[!template id=man name="seeprom" section="4"]] (on I2C)
1.7       wiki       33:    - TMP451 [[!template id=man name="titemp" section="4"]] temperature sensor (on I2C)
1.14      wiki       34:    - RF kill switch
                     35:    - Power button
1.28      wiki       36:  - AS3722 power management unit
1.32      wiki       37:  - eFUSE
1.33    ! wiki       38:  - SoC thermal sensors
1.28      wiki       39: 
1.4       wiki       40: 
                     41: # TODO
1.20      wiki       42:  - Analog audio output (I2S, Audio codec, APB DMA)
1.11      wiki       43:  - GPU (nouveau)
1.21      wiki       44:  - USB 3.0 [[!template id=man name="xhci" section="4"]] controller
1.24      wiki       45:  - SPI controller
                     46:  - PWM controller
1.26      wiki       47:  - PCIe MSI support
1.4       wiki       48: 
1.1       wiki       49: # Generating a boot script
                     50: 
                     51: [[!template  id=programlisting text="""
                     52: $ cat boot.txt
1.3       wiki       53: setenv bootargs root=ld1a
1.1       wiki       54: fatload mmc 1:1 0x90000000 netbsd.ub
                     55: bootm 0x90000000
                     56: $ mkubootimage -A arm -C none -O netbsd -T script -a 0 -n "NetBSD/tegra boot" boot.txt boot.scr
                     57: """]]
                     58: 
1.25      wiki       59: # Getting U-Boot
                     60: 
                     61: 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).
                     62: 
1.27      wiki       63: # Modesetting
                     64: 
1.31      wiki       65: ## Console
                     66: 
                     67: To override the default video mode (auto-detected from display EDID), use the *video* kernel command-line parameter:
                     68: 
                     69: [[!template  id=programlisting text="""
                     70: video=<xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m][eDd]
                     71: """]]
                     72: 
                     73: ## Xorg
                     74: 
1.27      wiki       75: 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:
                     76: 
                     77: [[!template  id=programlisting text="""
                     78: Section "Device"
                     79:     Identifier "DRM Modesetting"
                     80:     Driver "modesetting"
                     81: EndSection
                     82: """]]
                     83: 
1.29      wiki       84: # dmesg
                     85: 
                     86: [[!template  id=programlisting text="""
                     87: Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
                     88:     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
                     89:     The NetBSD Foundation, Inc.  All rights reserved.
                     90: Copyright (c) 1982, 1986, 1989, 1991, 1993
                     91:     The Regents of the University of California.  All rights reserved.
                     92: 
                     93: NetBSD 7.99.21 (JETSONTK1) #258: Thu Nov 12 06:45:09 AST 2015
                     94:        jmcneill@megatron.local:/Users/jmcneill/netbsd/src/sys/arch/evbarm/compile/obj/JETSONTK1
                     95: total memory = 2047 MB
                     96: avail memory = 2021 MB
                     97: sysctl_createv: sysctl_create(machine_arch) returned 17
                     98: timecounter: Timecounters tick every 10.000 msec
                     99: mainbus0 (root)
                    100: cpu0 at mainbus0 core 0: 2292 MHz Cortex-A15 r3p3 (Cortex V7A core)
                    101: cpu0: DC enabled IC enabled WB disabled EABT branch prediction enabled
                    102: cpu0: 32KB/64B 2-way L1 PIPT Instruction cache
                    103: cpu0: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache
                    104: cpu0: 2048KB/64B 16-way write-through L2 PIPT Unified cache
                    105: vfp0 at cpu0: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
                    106: cpu1 at mainbus0 core 1
                    107: cpu2 at mainbus0 core 2
                    108: cpu3 at mainbus0 core 3
                    109: armperiph0 at mainbus0
                    110: armgic0 at armperiph0: Generic Interrupt Controller, 192 sources (183 valid)
                    111: armgic0: 32 Priorities, 160 SPIs, 7 PPIs, 16 SGIs
                    112: armgtmr0 at armperiph0: ARMv7 Generic 64-bit Timer (12000 kHz)
                    113: armgtmr0: interrupting on irq 27
                    114: timecounter: Timecounter "armgtmr0" frequency 12000000 Hz quality 500
                    115: tegraio0 at mainbus0: Tegra K1 (T124)
                    116: tegracar0 at tegraio0: CAR
                    117: tegracar0: PLLX = 2292000000 Hz
                    118: tegracar0: PLLC = 88000000 Hz
                    119: tegracar0: PLLE = 292968 Hz
                    120: tegracar0: PLLU = 480000000 Hz
                    121: tegracar0: PLLP0 = 408000000 Hz
                    122: tegracar0: PLLD2 = 594000000 Hz
                    123: tegragpio0 at tegraio0: GPIO
                    124: gpio0 at tegragpio0 (A): 8 pins
                    125: gpio1 at tegragpio0 (B): 8 pins
                    126: gpio2 at tegragpio0 (C): 8 pins
                    127: gpio3 at tegragpio0 (D): 8 pins
                    128: gpio4 at tegragpio0 (E): 8 pins
                    129: gpio5 at tegragpio0 (F): 8 pins
                    130: gpio6 at tegragpio0 (G): 8 pins
                    131: gpio7 at tegragpio0 (H): 8 pins
                    132: gpio8 at tegragpio0 (I): 8 pins
                    133: gpio9 at tegragpio0 (J): 8 pins
                    134: gpio10 at tegragpio0 (K): 8 pins
                    135: gpio11 at tegragpio0 (L): 8 pins
                    136: gpio12 at tegragpio0 (M): 8 pins
                    137: gpio13 at tegragpio0 (N): 8 pins
                    138: gpio14 at tegragpio0 (O): 8 pins
                    139: gpio15 at tegragpio0 (P): 8 pins
                    140: gpio16 at tegragpio0 (Q): 8 pins
                    141: gpiobutton0 at gpio16 pins 0: Power button
                    142: gpio17 at tegragpio0 (R): 8 pins
                    143: gpio18 at tegragpio0 (S): 8 pins
                    144: gpio19 at tegragpio0 (T): 8 pins
                    145: gpio20 at tegragpio0 (U): 8 pins
                    146: gpio21 at tegragpio0 (V): 8 pins
                    147: gpio22 at tegragpio0 (W): 8 pins
                    148: gpio23 at tegragpio0 (X): 8 pins
                    149: gpiorfkill0 at gpio23 pins 7
                    150: gpio24 at tegragpio0 (Y): 8 pins
                    151: gpio25 at tegragpio0 (Z): 8 pins
                    152: gpio26 at tegragpio0 (AA): 8 pins
                    153: gpio27 at tegragpio0 (BB): 8 pins
                    154: gpio28 at tegragpio0 (CC): 8 pins
                    155: gpio29 at tegragpio0 (DD): 8 pins
                    156: gpio30 at tegragpio0 (EE): 8 pins
                    157: tegratimer0 at tegraio0: Timers
                    158: tegratimer0: default watchdog period is 10 seconds
                    159: tegramc0 at tegraio0: MC
                    160: tegrapmc0 at tegraio0: PMC
                    161: tegraxusbpad0 at tegraio0: XUSB PADCTL
                    162: tegrampio0 at tegraio0: MPIO
                    163: tegrai2c0 at tegraio0 port 0: I2C1
                    164: tegrai2c0: interrupting on irq 70
                    165: iic0 at tegrai2c0: I2C bus
                    166: seeprom0 at iic0 addr 0x56: AT24Cxx or compatible EEPROM: size 256
                    167: titemp0 at iic0 addr 0x4c: TMP451
                    168: tegrai2c1 at tegraio0 port 1: I2C2
                    169: tegrai2c1: interrupting on irq 116
                    170: iic1 at tegrai2c1: I2C bus
                    171: tegrai2c2 at tegraio0 port 2: I2C3
                    172: tegrai2c2: interrupting on irq 124
                    173: iic2 at tegrai2c2: I2C bus
                    174: tegrai2c3 at tegraio0 port 3: I2C4
                    175: tegrai2c3: interrupting on irq 152
                    176: iic3 at tegrai2c3: I2C bus
                    177: ddc0 at iic3 addr 0x50: DDC
                    178: tegrai2c4 at tegraio0 port 4: I2C5
                    179: tegrai2c4: interrupting on irq 85
                    180: iic4 at tegrai2c4: I2C bus
                    181: as3722pmic0 at iic4 addr 0x40: AMS AS3822
                    182: com3 at tegraio0 port 3: ns16550a, working fifo
                    183: com3: console
                    184: tegrartc0 at tegraio0: RTC
                    185: sdhc2 at tegraio0 port 2: SDMMC3
                    186: sdhc2: interrupting on irq 51
                    187: sdhc2: 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
                    188: sdmmc2 at sdhc2 slot 0
                    189: sdhc3 at tegraio0 port 3: SDMMC4
                    190: sdhc3: interrupting on irq 63
                    191: sdhc3: 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
                    192: sdmmc3 at sdhc3 slot 0
                    193: ahcisata0 at tegraio0: SATA
                    194: ahcisata0: interrupting on irq 55
                    195: ahcisata0: AHCI revision 1.31, 2 ports, 32 slots, CAP 0xe620ff01<PSC,SSC,PMD,ISS=0x2=Gen2,SAL,SALP,SSNTF,SNCQ,S64A>
                    196: atabus0 at ahcisata0 channel 0
                    197: hdaudio0 at tegraio0: HDA
                    198: hdaudio0: interrupting on irq 113
                    199: hdafg0 at hdaudio0: NVIDIA Tegra124 HDMI
                    200: hdafg0: HDMI00 8ch: Digital Out [Jack]
                    201: hdafg0: 8ch/0ch 44100Hz PCM16*
                    202: audio0 at hdafg0: full duplex, playback, capture, mmap, independent
                    203: tegracec0 at tegraio0: HDMI CEC
                    204: tegracec0: interrupting on irq 35
                    205: hdmicec0 at tegracec0
                    206: tegrausbphy0 at tegraio0 port 0: USB PHY1
                    207: ehci0 at tegraio0 port 0: USB1
                    208: ehci0: interrupting on irq 52
                    209: ehci0: EHCI version 1.10
                    210: ehci0: switching to host mode
                    211: usb0 at ehci0: USB revision 2.0
                    212: tegrausbphy1 at tegraio0 port 1: USB PHY2
                    213: ehci1 at tegraio0 port 1: USB2
                    214: ehci1: interrupting on irq 53
                    215: ehci1: EHCI version 1.10
                    216: ehci1: switching to host mode
                    217: usb1 at ehci1: USB revision 2.0
                    218: tegrausbphy2 at tegraio0 port 2: USB PHY3
                    219: ehci2 at tegraio0 port 2: USB3
                    220: ehci2: interrupting on irq 129
                    221: ehci2: EHCI version 1.10
                    222: ehci2: switching to host mode
                    223: usb2 at ehci2: USB revision 2.0
                    224: tegrahost1x0 at tegraio0: HOST1X
                    225: tegradrm0 at tegraio0
                    226: drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
                    227: drm: No driver support for vblank timestamp query.
                    228: tegrafb0 at tegradrm0
                    229: tegrafb0: framebuffer at 0x9ab00000, size 1280x720, depth 32, stride 5120
                    230: wsdisplay0 at tegrafb0 kbdmux 1
                    231: wsmux1: connecting to wsdisplay0
                    232: wsdisplay0: screen 0-3 added (default, vt100 emulation)
                    233: tegradrm0: info: registered panic notifier
                    234: tegradrm0: initialized tegra 0.1.0 20151108 on minor 0
                    235: tegrapcie0 at tegraio0: PCIE
                    236: tegrapcie0: interrupting on irq 130
                    237: pci0 at tegrapcie0 bus 0
                    238: pci0: memory space enabled, rd/line, rd/mult, wr/inv ok
                    239: ppb0 at pci0 dev 0 function 0: vendor 10de product 0e12 (rev. 0xa1)
                    240: ppb0: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x2 @ 5.0GT/s
                    241: ppb0: link is x1 @ 2.5GT/s
                    242: pci1 at ppb0 bus 1
                    243: pci1: memory space enabled, rd/line, wr/inv ok
                    244: athn0 at pci1 dev 0 function 0athn0: Atheros AR9285
                    245: athn0: rev 2 (1T1R), ROM rev 13, address 00:17:c4:d7:d0:58
                    246: athn0: interrupting at irq 130
                    247: athn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
                    248: athn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
                    249: ppb1 at pci0 dev 1 function 0: vendor 10de product 0e13 (rev. 0xa1)
                    250: ppb1: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x1 @ 5.0GT/s
                    251: ppb1: link is x1 @ 2.5GT/s
                    252: pci2 at ppb1 bus 2
                    253: pci2: memory space enabled, rd/line, wr/inv ok
                    254: re0 at pci2 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x0c)
                    255: re0: interrupting at irq 130
                    256: re0: Ethernet address 00:04:4b:2f:51:a2
                    257: re0: using 512 tx descriptors
                    258: rgephy0 at re0 phy 7: RTL8251 1000BASE-T media interface, rev. 0
                    259: rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
                    260: timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
                    261: cpu2: 2292 MHz Cortex-A15 r3p3 (Cortex V7A core)
                    262: cpu2: DC enabled IC enabled WB disabled EABT branch prediction enabled
                    263: cpu2: 32KB/64B 2-way L1 PIPT Instruction cache
                    264: cpu2: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache
                    265: cpu2: 2048KB/64B 16-way write-through L2 PIPT Unified cache
                    266: vfp2 at cpu2: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
                    267: cpu1: 2292 MHz Cortex-A15 r3p3 (Cortex V7A core)
                    268: cpu1: DC enabled IC enabled WB disabled EABT branch prediction enabled
                    269: cpu1: 32KB/64B 2-way L1 PIPT Instruction cache
                    270: cpu1: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache
                    271: cpu1: 2048KB/64B 16-way write-through L2 PIPT Unified cache
                    272: vfp1 at cpu1: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
                    273: cpu3: 2292 MHz Cortex-A15 r3p3 (Cortex V7A core)
                    274: cpu3: DC enabled IC enabled WB disabled EABT branch prediction enabled
                    275: cpu3: 32KB/64B 2-way L1 PIPT Instruction cache
                    276: cpu3: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache
                    277: cpu3: 2048KB/64B 16-way write-through L2 PIPT Unified cache
                    278: vfp3 at cpu3: NEON MPE (VFP 3.0+), rounding, NaN propagation, denormals
                    279: uhub0 at usb0: Tegra EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
                    280: uhub0: 1 port with 1 removable, self powered
                    281: uhub1 at usb1: Tegra EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
                    282: uhub1: 1 port with 1 removable, self powered
                    283: uhub2 at usb2: Tegra EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
                    284: uhub2: 1 port with 1 removable, self powered
                    285: sdhc3: cmd timeout error
                    286: IPsec: Initialized Security Association Processing.
                    287: ahcisata0 port 0: device present, speed: 3.0Gb/s
                    288: ld0 at sdmmc3: <0x45:0x0100:SEM16G:0x00:0x0301ff34:0x000>
                    289: ld0: 15028 MB, 7633 cyl, 64 head, 63 sec, 512 bytes/sect x 30777344 sectors
                    290: ld0: GPT GUID: a81e231f-7b1c-c564-1473-5ac55e4b7963
                    291: dk0 at ld0: "APP", 29360128 blocks at 94208, type: <unknown>
                    292: ld1 at sdmmc2: <0x27:0x5048:SD64G:0x30:0x01ce4def:0x0dc>
                    293: dk1 at ld0: "DTB", 8192 blocks at 29454336, type: <unknown>
                    294: dk2 at ld0: "EFI", 131072 blocks at 29462528, type: <unknown>
                    295: dk3 at ld0: "USP", 8192 blocks at 29593600, type: <unknown>
                    296: dk4 at ld0: "TP1", 8192 blocks at 29601792, type: <unknown>
                    297: dk5 at ld0: "TP2", 8192 blocks at 29609984, type: <unknown>
                    298: dk6 at ld0: "TP3", 8192 blocks at 29618176, type: <unknown>
                    299: dk7 at ld0: "WB0", 4096 blocks at 29626368, type: <unknown>
                    300: dk8 at ld0: "UDA", 1142784 blocks at 29630464, type: <unknown>
                    301: ld0: 8-bit width, HS200, 200.000 MHz
                    302: ld1: 59504 MB, 7585 cyl, 255 head, 63 sec, 512 bytes/sect x 121864192 sectors
                    303: ld1: 4-bit width, SDR104, 204.000 MHz
                    304: wd0 at atabus0 drive 0
                    305: wd0: <OCZ-AGILITY3>
                    306: wd0: drive supports 16-sector PIO transfers, LBA48 addressing
                    307: wd0: 111 GB, 232581 cyl, 16 head, 63 sec, 512 bytes/sect x 234441648 sectors
                    308: wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
                    309: wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
                    310: uhidev0 at uhub2 port 1 configuration 1 interface 0
                    311: uhidev0: Logitech USB Receiver, rev 2.00/29.00, addr 2, iclass 3/1
                    312: ukbd0 at uhidev0: 8 modifier keys, 6 key codes
                    313: wskbd0 at ukbd0 mux 1
                    314: wskbd0: connecting to wsdisplay0
                    315: uhidev1 at uhub2 port 1 configuration 1 interface 1
                    316: uhidev1: Logitech USB Receiver, rev 2.00/29.00, addr 2, iclass 3/1
                    317: uhidev1: 17 report ids
                    318: ums0 at uhidev1 reportid 2: 16 buttons, W and Z dirs
                    319: wsmouse0 at ums0 mux 0
                    320: uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
                    321: uhid1 at uhidev1 reportid 4: input=1, output=0, feature=0
                    322: uhid2 at uhidev1 reportid 16: input=6, output=6, feature=0
                    323: uhid3 at uhidev1 reportid 17: input=19, output=19, feature=0
                    324: boot device: wd0
                    325: root on wd0a dumps on wd0b
                    326: root file system type: ffs
                    327: kern.module.path=/stand/evbarm/7.99.21/modules
                    328: WARNING: preposterous TOD clock time
                    329: WARNING: using filesystem time
                    330: WARNING: CHECK AND RESET THE DATE!
                    331: """]]
                    332: 
1.1       wiki      333: # Links
                    334: 
1.2       wiki      335: - [NVIDIA Jetson TK1 development kit](https://developer.nvidia.com/jetson-tk1)
                    336: - [Hardware documentation](https://developer.nvidia.com/hardware-design-and-development)
                    337: - [Linux For Tegra](https://developer.nvidia.com/linux-tegra)

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb