Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rockpi4/hardware/devtree overlays /es es

< Rockpi4‎ | hardware‎ | devtree overlays
Revision as of 01:05, 8 March 2019 by HANLLEL (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
    ROCK Pi 4 >  Hardware >  Device Tree Overlays


Device Tree Overlays

Introducción

Este directorio contiene Device Tree overlays. Device Tree permite soportar muchas configuraciones hardware con un único núcleo y la necesidad de cargar explícitamente o prohibir módulos del núcleo.

En el Rock Pi, encontrarás en /boot el archivo rockpi-4b-linux.dtb. Que describe el hardware que forma parte de la tarjeta Rock Pi. El cargador selecciona el archivo .dtb apropiado para la plataforma por su nombre y lo pasa al núcleo.

El uso de Device Tree Overlays es controlado desde /boot/hw_intfc.conf . Puedes configurar el Rock Pi en tu fichero hw_intfc.conf, lo que hará que para que surta efecto la nueva configuración el Rock Pi deba reiniciar.

En /boot/overlays encontrarás muchos ficheros .dtbo. El cargador unirá los ficheros seleccionados .dtbo que aparezcan en /boot/hw_intfc.conf.

Estructura de Ficheros

 /boot
   |--rockpi-4b-linux.dtb
   |--hw_intfc.conf
   |--overlays
           |--at24c02.dtbo
           |--console-disabled.dtbo
           |--console-on-uart4.dtbo
           |--two-color-led.dtbo

Usando Overlays

Los Overlays son cargados usando la directiva "intfc:". Como ejemplo, el módulo at24c02. Añade una línea en hw_intfc.conf:

 intfc:dtoverlay=at24c02

Esto provocará que el archivo /boot/overlays/at24c02.dtbo se cargue.

El Overlay y el Parámetro por Referencia

Se recomienda activar solamente aquellos buses que sean necesarios. Activar todas las interfaces puede provocar comportamientos indeseados.

Activando y desactivando un BUS
 Nombre:	pwm0
 Descripción:	Overlay para el BUS PWM0
 Comando:	intfc:pwm0=<valor>
 Valor:
 	on		Ponerlo a "on" para activar la intefaz pwm0 (por defecto está en "off")
 	off		Ponerlo a "off" para desactivar la interfaz pwm0
 
 Name:	pwm1
 Info:	Overlay for BUS PWM1
 Load:	intfc:pwm1=<value>
 Value:
 	on		Set to "on" to enable the pwm1 interface (default "off")
 	off		Set to "off" to disable the pwm2 interface
 
 Name:	uart2
 Info:	Overlay for BUS UART2
 Load:	intfc:uart2=<value>
 Value:
 	on		Set to "on" to enable the uart2 interface (default "off")
 	off		Set to "off" to disable the uart2 interface
 
 Name:	uart4
 Info:	Overlay for BUS UART4
 Load:	intfc:uart4=<value>
 Value:
 	on		Set to "on" to enable the uart4 interface (default "off")
 	off		Set to "off" to disable the uart4 interface
 
 Name:	spi1
 Info:	Overlay for BUS SPI1
 Load:	intfc:spi1=<value>
 Value:
 	on		Set to "on" to enable the spi1 interface (default "off")
 	off		Set to "off" to disable the spi1 interface
 
 Name:	spi2
 Info:	Overlay for BUS SPI2
 Load:	intfc:spi2=<value>
 Value:
 	on		Set to "on" to enable the spi2 interface (default "off")
 	off		Set to "off" to disable the spi2 interface
 
 Name:	i2c2
 Info:	Overlay for BUS I2C2
 Load:	intfc:i2c2=<value>
 Value:
 	on		Set to "on" to enable the i2c2 interface (default "off")
 	off		Set to "off" to disable the i2c2 interface
 
 Name:	i2c6
 Info:	Overlay for BUS I2C6
 Load:	intfc:i2c6=<value>
 Value:
 	on		Set to "on" to enable the i2c6 interface (default "off")
 	off		Set to "off" to disable the i2c6 interface
 
 Name:	i2c7
 Info:	Overlay for BUS I2C7
 Load:	intfc:i2c7=<value>
 Value:
 	on		Set to "on" to enable the i2c7 interface (default "off")
 	off		Set to "off" to disable the i2c7 interface
 
Loading hardware module
 Name:	at24c02
 Info:	Overlay for activation of Atmel AT24C02 over I2C
 Load:	intfc:dtoverlay=at24c02
 
 Name:	two-color-led
 Info:	Overlay for activation of two color led module.
 Load:	intfc:dtoverlay=two-color-led
 
 Name:	console-disabled
 Info:	Overlay for disabling fiq debugger console.
 	When this dtbo file is not loaded, Rock Pi enables fiq debugger console
 	by default. And UART2DBG Pins will output console information.
 	When this dtbo is loaded, Rock Pi disables fiq debugger console and
 	UART2DBG pins do not output console information. What's more,
 	UART2DBG pins can be used for serial communication if UART2 is enabled.
 Load:	intfc:dtoverlay=console-disabled
 
 Name:	console-on-uart4
 Info:	Overlay for setting uart4 pins as fiq debugger console pins. With this
 	dtbo loaded, UART4 pins output console information after kernel is
 	booted. Note that at the same time, Rock Pi cannot work with other
 	serial communication devices like UART Serial Bluetooth Module through
 	UART4 (even though set "on" for BUS UART4).
 Load:	intfc:dtoverlay=console-on-uart4

Installing ROCK Pi 4 dtbo package

Radxa APT provides rockpi4-dtbo package that includes hw_intfc.conf and .dtbo files. To use it, do:

 $ sudo apt-get update
 $ sudo apt-get install rockpi4-dtbo