Supporting 200 different expansionboards. The broken promise of device tree

Similar documents
Wiring an LED Guide for BeagleBone (Black/Green) Table of Contents. by Brian Fraser Last update: November 16, Target Linux Kernel: 4.

How to connect the LCD screen

ABOUT THE DEVICE TREE

OPT3001EVM Linux Getting Started Guide. Felipe Balbi

Passing Time with a SPI Framebuffer Driver

Device Tree Overview

U-Boot & Linux Kernel Board Port

GUIDE TO SP STARTER SHIELD (V3.0)

USER MANUAL ARDUINO I/O EXPANSION SHIELD

PRU Hardware Overview. Building Blocks for PRU Development: Module 1

FreeBSD and Beaglebone Black, a robotic application.

Devicetree BOF. ELC 2017 Portland, Oregon. Frank Rowand, Sony February 21, _1630

Edge Power International (HK) Ltd. Product Specification

December 1, 2015 Jason Kridner

Zephyr OS Configuration via Device Tree

Bridging of Control Interfaces over Multimedia Serial Links

ReMutt Control. Critical Design Review

Getting to know the Arduino IDE

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

SABLE-X AND SABLE-X-R2 DEVELOPMENT BOARD USER GUIDE

i.mx 7 - Hetereogenous Multiprocessing Architecture

NGS IoT Bone (rev. MRF-1)

Introduction to Microprocessors: Arduino

96Boards Mezzanine Ecosystem. Robert Wolff - 96Boards Community Manager Manivannan Sadhasivam - Applications Engineer

Introduction to Microcontrollers

Sanguino TSB. Introduction: Features:

ARM support in the Linux kernel

Devicetree BOF. ELCE 2017 Prague, Czech Republic. Frank Rowand, Sony October 23, _2149

How Not to Write an x86 Platform Driver

Introduction to Linux kernel driver programming + i2c drivers

Beaglebone green User Manual

November 3, 2015 Jason Kridner

Low-Cost Microcontrollers

Motor Controller Cooling System (MCCS) Maintenance Manual

ArduCAM-M-2MP Camera Shield

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

Devicetree BOF. ELC 2018 Portland, Oregon. Frank Rowand, Sony

ARDUINO YÚN Code: A000008

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

TechNexion PICO SOM Expansion Board

Arduino: What is it? What can it do?

IoE Workshop. Marc Khayat, CCIE #41288, Leonard Janer Technical Managers. June 16

Centroid ACORN CNC controller Specification and Use Guide Updated 8/3/17. Overview

Pmod ESP32 Reference Manual

Intel Galileo gen 2 Board

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

User Manual & Reference

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

Arduino Dock 2. The Hardware

SBC8140 Single Board Computer

Ks0096 keyestudio CNC Kit / CNC Shield V4.0 + Nano 3.0+3pcs a4988 Driver / GRBL Compatible

Advance Robotics with Embedded System Design (ARESD)

The Arduino Briefing. The Arduino Briefing

Microprocessor Systems

U-Boot bootloader port done right 2017 edition

Basic SigmaDSP Microcontroller Integration

ARM Device Tree status report

v0.2-dirty Devicetree Specification Release v0.2-dirty devicetree.org

Replicape Rev B 3D printer controller board

USER MANUAL FOR HARDWARE REV

PocketBeagle beagleboard.org. PocketBeagle, the tiniest $25 key-fob computer you can buy

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

keyestudio Keyestudio MEGA 2560 R3 Board

BrewTroller Phoenix. Owners Manual. Updated - March 14, 2016 BREWTROLLER PHOENIX 1

Devicetree BOF. ELCE 2018 Edinburgh, UK. Frank Rowand, Sony. October 24, _1535

Thursday, September 15, electronic components

Modern Robotics Inc. Sensor Documentation

Introduction To Arduino

Adafruit seesaw. Created by Dean Miller. Last updated on :30:23 AM UTC

Embedded Systems. Embedded Programmer. Duration: 2 weeks Rs Language and Tools. Embedded System Introduction. Embedded C programming

ARDUINO YÚN MINI Code: A000108

Introduction to the Itron Riva Dev Kits

w w w. b a s e t r a i n i n g i n s t i t u t e. c o

DEV-1 HamStack Development Board

Embedded Technosolutions

Microcontrollers for Ham Radio

Diploma in Embedded Systems

THE AVR MICROCONTROLLER AND EMBEDDED SYSTEMS. Using Assembly and С

Advanced Embedded Systems

P-NUCLEO-6180X2. Proximity, gesture, ambient light sensor expansion board based on VL6180X for STM32L053R8. Description. Features

Overview of the Raspberry Pi Models 3B & 2B

Lesson 6 Intel Galileo and Edison Prototype Development Platforms. Chapter-8 L06: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

SHIELD-LCD16 2 custom firmware note

OK335x Products Guide. Contents

Cookie User Manual. For NuMicro Edition 1.0. Rev. 1.0 Release: forum.coocox.org.

Embest SOC8200 Single Board Computer

8:1 Serial Port Expander

Embedded Systems and Kinetic Art. CS5968: Erik Brunvand School of Computing. FA3800: Paul Stout Department of Art and Art History.

Logistics. Embedded Systems. Kinetic Art. This Class. Embedded Systems and Kinetic Art. Kinetic Art

PLATFORM ADAPTATION AND BRING-UP GUIDE

BeagleBone 3.1MP Camera Cape. System Reference Manual

Device Trees A Database Approach to Describing Hardware. Doug Abbott. Produced by EE Times

The Information contained herein is subject to change without notice. Revisions may be issued regarding changes and/or additions.

Panther. CNC Cape for Beaglebone Black. Users Manual. Version 1.1. Warning!

ICN12. I2C to UART Bridge, ADC,DAC and I/O

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

Trees need care a solution to Device Tree validation problem

Microcontroller Basics

Pmod modules are powered by the host via the interface s power and ground pins.

Development Environment Embedded Linux Primer Ch 1&2

Transcription:

Supporting 200 different expansionboards The broken promise of device tree

Devicetree From devicetree.org: The Device Tree is a data structure for describing hardware. Rather than hard coding every detail of a device into an operating system, many aspect of the hardware can be described in a data structure that is passed to the operating system at boot time. The device tree is used both by Open Firmware, and in the standalone Flattened Device Tree (FDT) form.

Devicetree Data only Only describes hardware (sorta) compile by seperate compiler no preprocessor zero useful tools available

Example Point browser to https://github.com/ koenkooi/linux/blob/3.7-for-panto-rebase/ arch/arm/boot/dts/am33xx.dtsi

Beaglebone overview

Beaglebone overview Small, cheap board with a cortex A8 CPU 104 pins exposed on 3 expansion connectors Runs linux Targeted at people moving up from microcontroller based boards like the arduino

Capes Equivalent of shields for arduino and boosterpacks for msp430 Standard allows up to 4 stacked capes EEPROM for ID and config info

Capes A lot of different types: Displays Wifi/Bluetooth/NFC/Radar Sensors CNC And a combination of the above

Weatherstation cape I2C sensors I2C EEPROM

DVI+audio cape I2C EEPROM Audio codec DVI framer

BeBoPr cape PWM I2C EEPROM (bottom) 8 GPIO inputs Analog input PRUss driven stepper motor drivers LED

3 LCD cape LCD PWM backlight Buttons I2C EEPROM (bottom)

Camera cape GPIO GPMC bus Camera sensor I2C EEPROM

GPIO-keys, old style /* pinmux for lcd7 keys */ static struct pinmux_config lcd7_keys_pin_mux[] = {! {"gpmc_a0.gpio1_16", OMAP_MUX_MODE7 AM33XX_PIN_INPUT}, //left! {"gpmc_a1.gpio1_17", OMAP_MUX_MODE7 AM33XX_PIN_INPUT}, //right! {"gpmc_a3.gpio1_19", OMAP_MUX_MODE7 AM33XX_PIN_INPUT}, //up! {"mcasp0_axr0.gpio3_16", OMAP_MUX_MODE7 AM33XX_PIN_INPUT}, //down! {"mcasp0_fsr.gpio3_19", OMAP_MUX_MODE7 AM33XX_PIN_INPUT}, //enter! {NULL, 0}, }; static struct gpio_keys_platform_data beaglebone_lcd7_gpio_key_info = {!.buttons = beaglebone_lcd7_gpio_keys,!.nbuttons = ARRAY_SIZE(beaglebone_lcd7_gpio_keys), }; static struct platform_device beaglebone_lcd7_keys = {!.name = "gpio-keys",!.id = -1,!.dev = {!!.platform_data = &beaglebone_lcd7_gpio_key_info, }; static void beaglebone_lcd7_keys_init(int evm_id, int profile) {! int err;! setup_pin_mux(lcd7_keys_pin_mux);! err = platform_device_register(&beaglebone_lcd7_keys);! if (err)!! pr_err("failed to register gpio keys for LCD7 cape\n"); } /* Configure GPIOs for lcd7 keys */ static struct gpio_keys_button beaglebone_lcd7_gpio_keys[] = {! {!!.code = KEY_LEFT,!!.gpio = GPIO_TO_PIN(1, 16),!!.active_low = true,!!.desc = "left",!!.type = EV_KEY,!!.wakeup = 1,! {!!.code = KEY_RIGHT,!!.gpio = GPIO_TO_PIN(1, 17),!!.active_low = true,!!.desc = "right",!!.type = EV_KEY,!!.wakeup = 1,! {!!.code = KEY_UP,!!.gpio = GPIO_TO_PIN(1, 19),!!.active_low = true,!!.desc = "up",!!.type = EV_KEY,!!.wakeup = 1,! {!!.code = KEY_DOWN,!!.gpio = GPIO_TO_PIN(3, 16),!!.active_low = true,!!.desc = "down",!!.type = EV_KEY,!!.wakeup = 1,! {!!.code = KEY_ENTER,!!.gpio = GPIO_TO_PIN(3, 19),!!.active_low = true,!!.desc = "enter",!!.type = EV_KEY,!!.wakeup = 1, };

GPIO-keys, DT gpio_keys {!!! compatible = "gpio-keys";! bone_lcd3_cape_keys_00a0_pins: pinmux_bone_lcd3_cape_keys_00a0_pins {!! pinctrl-single,pins = <!!! 0x040 0x2f! /* gpmc_a0.gpio1_16, INPUT PULLDIS MODE7 */!!! 0x044 0x2f! /* gpmc_a1.gpio1_17, INPUT PULLDIS MODE7 */!!! pinctrl-names = "default";!!! pinctrl-0 = <&bone_lcd3_cape_keys_00a0_pins>;!!! #address-cells = <1>;!!! 0x1a4 0x2f!! /* mcasp0_fsr.gpio3_19, INPUT PULLDIS MODE7 */!! #size-cells = <0>;!!! 0x078 0x2f! /* gpmc_ben1.gpio1_28, INPUT PULLDIS MODE7 */!!! button@1 {!!! 0x164 0x2f! /* ecap0_in_pwm0_out.gpio0_7, INPUT PULLDIS MODE7 */!!!! debounce_interval = <50>;!! >;!!!! linux,code = <105>;! }!!!! label = "left";!!!! gpios = <&gpio2 16 0x0>;!!!! gpio-key,wakeup;!!!! autorepeat;!!! };!!! button@2 {!!!! debounce_interval = <50>;!!!! linux,code = <106>;!!!! label = "right";!!!! gpios = <&gpio2 17 0x0>;!!!! gpio-key,wakeup;!!!! autorepeat;!!! };!!! button@3 {!!!! debounce_interval = <50>;!!!! linux,code = <103>;!!!! label = "up";!!!! gpios = <&gpio4 19 0x0>;!!!! gpio-key,wakeup;!!!! autorepeat;!!! };!!! button@4 {!!!! debounce_interval = <50>;!!!! linux,code = <108>;!!!! label = "down";!!!! gpios = <&gpio2 28 0x0>;!!!! gpio-key,wakeup;!!!! autorepeat;!!! };!!! button@5 {!!!! debounce_interval = <50>;!!!! linux,code = <28>;!!!! label = "enter";!!!! gpios = <&gpio1 7 0x0>;!!!! gpio-key,wakeup;!!! };!! };

leds-gpio, old style #define BEAGLEBONE_USR1_LED GPIO_TO_PIN(1, 21) #define BEAGLEBONE_USR2_LED GPIO_TO_PIN(1, 22) #define BEAGLEBONE_USR3_LED GPIO_TO_PIN(1, 23) #define BEAGLEBONE_USR4_LED GPIO_TO_PIN(1, 24) static struct gpio_led bone_gpio_leds[] = {! {!!.name!!! = "beaglebone::usr0",!!.default_trigger! = "heartbeat",!!.gpio!!! = BEAGLEBONE_USR1_LED,! {!!.name!!! = "beaglebone::usr1",!!.default_trigger! = "mmc0",!!.gpio!!! = BEAGLEBONE_USR2_LED,! {!!.name!!! = "beaglebone::usr2",!!.gpio!!! = BEAGLEBONE_USR3_LED,! {!!.name = "beaglebone::usr3",!!.gpio = BEAGLEBONE_USR4_LED, }; static struct pinmux_config bone_pin_mux[] = {! /* User LED gpios (gpio1_21 to gpio1_24) */ {"gpmc_a5.rgmii2_td0", OMAP_MUX_MODE7 AM33XX_PIN_OUTPUT}, // USR0 {"gpmc_a6.rgmii2_tclk", OMAP_MUX_MODE7 AM33XX_PIN_OUTPUT}, // USR1 {"gpmc_a7.rgmii2_rclk", OMAP_MUX_MODE7 AM33XX_PIN_OUTPUT}, // USR2 {"gpmc_a8.rgmii2_rd3", OMAP_MUX_MODE7 AM33XX_PIN_OUTPUT}, // USR3 /* Grounding gpio1_6 (pin 3 Conn A) signals bone tester to start diag tests * {"gpmc_ad6.gpio1_6", OMAP_MUX_MODE7 AM33XX_PIN_INPUT_PULLUP},! {NULL, 0}, }; static void boneleds_init(int evm_id, int profile ) {! int err;! setup_pin_mux(bone_pin_mux);! err = platform_device_register(&bone_leds_gpio);! if (err)!! pr_err("failed to register BeagleBone LEDS\n"); } static struct gpio_led_platform_data bone_gpio_led_info = {!.leds!! = bone_gpio_leds,!.num_leds!= ARRAY_SIZE(bone_gpio_leds), }; static struct platform_device bone_leds_gpio = {!.name! = "leds-gpio",!.id! = -1,!.dev!= {!!.platform_data!= &bone_gpio_led_info, };

leds-gpio, DT! userled_pins: pinmux_userled_pins {!! pinctrl-single,pins = <!!! 0x54 0x7! /* gpmc_a5.gpio1_21, OUTPUT MODE7 */!!! 0x58 0x17!/* gpmc_a6.gpio1_22, OUTPUT_PULLUP MODE7 */!!! 0x5c 0x7! /* gpmc_a7.gpio1_23, OUTPUT MODE7 */!!! 0x60 0x17!/* gpmc_a8.gpio1_24, OUTPUT_PULLUP MODE7 */!! >;! };!! gpio-leds {!!! compatible = "gpio-leds";!!! pinctrl-names = "default";!!! pinctrl-0 = <&userled_pins>;!!! led0 {!!!! label = "beaglebone:green:usr0";!!!! gpios = <&gpio2 21 0>;!!!! linux,default-trigger = "heartbeat";!!!! default-state = "off";!!! };!!! led1 {!!!! label = "beaglebone:green:usr1";!!!! gpios = <&gpio2 22 0>;!!!! linux,default-trigger = "mmc0";!!!! default-state = "off";!!! };!!! led2 {!!!! label = "beaglebone:green:usr2";!!!! gpios = <&gpio2 23 0>;!!!! linux,default-trigger = "cpu0";!!!! default-state = "off";!!! };!!! led3 {!!!! label = "beaglebone:green:usr3";!!!! gpios = <&gpio2 24 0>;!!!! default-state = "off";!!! };!! };

Talking points pinctrl resource tracking evm/bone split uboot/uimage/dtb lockstep pdata only keycodes and other non-hardware bits

There's an if() in my boardfile, now what?