From 8a908ca181a36848270af8a60f1ff9b954c24486 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 17 Jul 2013 09:50:42 +0200 Subject: [PATCH] 3.8: add BeBoPr support Signed-off-by: Koen Kooi --- .../capes/0006-firmware-add-BeBoPr-cape.patch | 450 ++++++++++++++++++ 1 file changed, 450 insertions(+) create mode 100644 patches/capes/0006-firmware-add-BeBoPr-cape.patch diff --git a/patches/capes/0006-firmware-add-BeBoPr-cape.patch b/patches/capes/0006-firmware-add-BeBoPr-cape.patch new file mode 100644 index 00000000..c862e489 --- /dev/null +++ b/patches/capes/0006-firmware-add-BeBoPr-cape.patch @@ -0,0 +1,450 @@ +From a083868e833abf5ae69d413028d80f3530198e3e Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 17 Jul 2013 09:05:27 +0200 +Subject: [PATCH 6/6] firmware: add BeBoPr cape + +Signed-off-by: Koen Kooi +--- + firmware/Makefile | 1 + + firmware/capes/2191-R2.dts | 417 +++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 418 insertions(+) + create mode 100644 firmware/capes/2191-R2.dts + +diff --git a/firmware/Makefile b/firmware/Makefile +index cea34e6..677d634 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -138,6 +138,7 @@ fw-shipped-$(CONFIG_YAM) += yam/1200.bin yam/9600.bin + + # all the generic capes + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ ++ 2191-R2.dtbo \ + cape-bone-2g-emmc1.dtbo \ + cape-bone-adafruit-lcd-00A0.dtbo \ + cape-bone-dvi-00A0.dtbo \ +diff --git a/firmware/capes/2191-R2.dts b/firmware/capes/2191-R2.dts +new file mode 100644 +index 0000000..d179b05 +--- /dev/null ++++ b/firmware/capes/2191-R2.dts +@@ -0,0 +1,417 @@ ++/* ++ * Copyright (C) 2013 Bas Laarhoven ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * version 1.1 - 2013-06-17 cleanup for release ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "aes,bebopr", "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "2191"; ++ version = "R2"; ++ ++ exclusive-use = ++ /* state the resources this cape uses */ ++ ++ /* ------ IO POWER ------ */ ++ ++ "P8.3", /* gpio1.6 gpio38 old Enable */ ++ "P8.5", /* gpio1.2 gpio34 old Enablen */ ++ "P8.7", /* timer4 gpio66 new Enablen */ ++ ++ /* ------ PWM ------ */ ++ ++ "P8.36", /* gpio2.16 J4_PWM */ ++ "P8.45", /* pru1.r30.0 J3_PWM */ ++ "P8.46", /* pru1.r30.1 J2_PWM */ ++ "ehrpwm1A", ++ "ehrpwm2A", ++ "ehrpwm2B", ++ ++ /* ------ STEPPERS ------ */ ++ ++ "P8.41", /* gpio2.10 #X_ENA */ ++ "P8.44", /* gpio2.9 #X_DIR */ ++ "P8.43", /* gpio2.8 #X_STP */ ++ "P8.40", /* gpio2.13 #Y_ENA */ ++ "P8.39", /* gpio2.12 #Y_DIR */ ++ "P8.42", /* gpio2.11 #Y_STP */ ++ "P8.28", /* gpio2.24 #Z_ENA */ ++ "P8.29", /* gpio2.23 #Z_DIR */ ++ "P8.27", /* gpio2.22 #Z_STP */ ++ "P8.20", /* gpio1.31 #E_ENA */ ++ "P8.21", /* gpio1.30 #E_DIR */ ++ "P8.30", /* gpio2.25 #E_STP */ ++ "pru1", ++ "pruss", ++ ++ /* ------ SENSORS ------ */ ++ ++ "P8.31", /* gpio0.10 #X_MIN */ ++ "P8.32", /* gpio0.11 #X_MAX */ ++ "P8.35", /* gpio0.8 #Y_MIN */ ++ "P8.33", /* gpio0.9 #Y_MAX */ ++ "P8.38", /* gpio2.15 #Z_MIN */ ++ "P8.37", /* gpio2.14 #Z_MAX */ ++ ++ /* ------ ADC ------ */ ++ ++ "P9.40", /* AIN1 */ ++ "P9.38", /* AIN3 */ ++ "P9.36", /* AIN5 */ ++ "tscadc", ++ ++ /* ------ LED ------ */ ++ ++ "P8.25"; /* gpio1.0 LED */ ++ ++ ++ ++ /* ----------- IO POWER ------------ */ ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ bebopr_io_ena_pins: pinmux_bebopr_io_ena_pins { ++ pinctrl-single,pins = < ++ 0x018 0x07 /* P8-3 GPIO1_6 gpmc_ad6.gpio1[6] */ ++ 0x008 0x07 /* P8-5 GPIO1_2 gpmc_ad2.gpio1[2] */ ++ 0x090 0x07 /* P8-7 TIMER4 gpmc_advn_ale.gpio2[2] */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ bebopr_io_ena { ++ compatible = "aes,bebopr"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bebopr_io_ena_pins>; ++ ++ bebopr-io-enable { ++ label = "bebopr:io_enables"; ++ gpios = <&gpio2 2 1>, <&gpio2 6 0>, <&gpio3 2 1>; ++ default-state = "off"; ++ }; ++ }; ++ }; ++ }; ++ ++ /* ----------- PWM ------------ */ ++ ++ fragment@15 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ P8_46_ehrpwm_pin: pinmux_P8_46_ehrpwm_pin { ++ pinctrl-single,pins = <0x0a4 0x3>; /* P8_46 (ZCZ ball R2) | MODE 3 */ ++ }; ++ ++ P8_46_gpio_pin: pinmux_P8_46_gpio_pin { ++ pinctrl-single,pins = <0x0a4 0x7>; /* P8_46 (ZCZ ball R2) | MODE 7 */ ++ }; ++ ++ P8_46_pruss_pin: pinmux_P8_46_pruss_pin { ++ pinctrl-single,pins = <0x0a4 0x5>; /* P8_46 (ZCZ ball R2) | MODE 5 */ ++ }; ++ ++ P8_45_ehrpwm_pin: pinmux_P8_45_ehrpwm_pin { ++ pinctrl-single,pins = <0x0a0 0x3>; /* P8_45 (ZCZ ball R1) | MODE 3 */ ++ }; ++ ++ P8_45_gpio_pin: pinmux_P8_45_gpio_pin { ++ pinctrl-single,pins = <0x0a0 0x7>; /* P8_45 (ZCZ ball R1) | MODE 7 */ ++ }; ++ ++ P8_45_pruss_pin: pinmux_P8_45_pruss_pin { ++ pinctrl-single,pins = <0x0a0 0x5>; /* P8_45 (ZCZ ball R1) | MODE 5 */ ++ }; ++ ++ P8_36_ehrpwm_pin: pinmux_P8_36_ehrpwm_pin { ++ pinctrl-single,pins = <0x0c8 0x2>; /* P8_36 (ZCZ ball U3) | MODE 2 */ ++ }; ++ ++ P8_36_gpio_pin: pinmux_P8_36_gpio_pin { ++ pinctrl-single,pins = <0x0c8 0x7>; /* P8_36 (ZCZ ball U3) | MODE 7 */ ++ }; ++ }; ++ }; ++ ++ fragment@16 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ bebopr_pwm_J2_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "pruss"; ++ pinctrl-0 = <&P8_46_ehrpwm_pin>; ++ pinctrl-1 = <&P8_46_gpio_pin>; ++ pinctrl-2 = <&P8_46_pruss_pin>; ++ }; ++ ++ bebopr_pwm_J3_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "pruss"; ++ pinctrl-0 = <&P8_45_ehrpwm_pin>; ++ pinctrl-1 = <&P8_45_gpio_pin>; ++ pinctrl-2 = <&P8_45_pruss_pin>; ++ }; ++ ++ bebopr_pwm_J4_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&P8_36_ehrpwm_pin>; ++ pinctrl-1 = <&P8_36_gpio_pin>; ++ }; ++ ++ bebopr_pwm_J2 { ++ compatible = "pwm_test"; ++ pwms = <&ehrpwm2 1 10000000 0>; ++ pwm-names = "PWM_J2_FAN"; ++ enabled = <0>; ++ duty = <0>; ++ status = "okay"; ++ }; ++ ++ bebopr_pwm_J3 { ++ compatible = "pwm_test"; ++ pwms = <&ehrpwm2 0 10000000 0>; ++ pwm-names = "PWM_J3_EXTR"; ++ enabled = <0>; ++ duty = <0>; ++ status = "okay"; ++ }; ++ ++ bebopr_pwm_J4 { ++ compatible = "pwm_test"; ++ pwms = <&ehrpwm1 0 100000000 0>; ++ pwm-names = "PWM_J4_BED"; ++ enabled = <0>; ++ duty = <0>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@11 { ++ target = <&epwmss1>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@12 { ++ target = <&ehrpwm1>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@13 { ++ target = <&epwmss2>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@14 { ++ target = <&ehrpwm2>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ /* ----------- STEPPERS ------------ */ ++ ++ fragment@21 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ bebopr_pruss_pins: pinmux_bebopr_pruss_pins { ++ status = "okay"; ++ pinctrl-single,pins = < ++ 0xb0 5 /* #X_ENA, pr1_pru1_pru_r30_4, P8_41, gpio2.10, mode5 out */ ++ 0xac 5 /* #X_DIR, pr1_pru1_pru_r30_3, P8_44, gpio2.9, mode5 out */ ++ 0xa8 5 /* #X_STP, pr1_pru1_pru_r30_2, P8_43, gpio2.8, mode5 out */ ++ 0xbc 5 /* #Y_ENA, pr1_pru1_pru_r30_7, P8_40, gpio2.13, mode5 out */ ++ 0xb8 5 /* #Y_DIR, pr1_pru1_pru_r30_6, P8_39, gpio2.12, mode5 out */ ++ 0xb4 5 /* #Y_STP, pr1_pru1_pru_r30_5, P8_42, gpio2.11, mode5 out */ ++ 0xe8 5 /* #Z_ENA, pr1_pru1_pru_r30_10, P8_28, gpio2.24, mode5 out */ ++ 0xe4 5 /* #Z_DIR, pr1_pru1_pru_r30_9, P8_29, gpio2.23, mode5 out */ ++ 0xe0 5 /* #Z_STP, pr1_pru1_pru_r30_8, P8_27, gpio2.22, mode5 out */ ++ 0x84 5 /* #E_ENA, pr1_pru1_pru_r30_13, P8_20, gpio1.31, mode5 out */ ++ 0x80 5 /* #E_DIR, pr1_pru1_pru_r30_12, P8_21, gpio1.30, mode5 out */ ++ 0xec 5 /* #E_STP, pr1_pru1_pru_r30_11, P8_30, gpio2.25, mode5 out */ ++ >; ++ }; ++ }; ++ }; ++ ++ ++ fragment@22 { ++ target = <&pruss>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bebopr_pruss_pins>; ++ }; ++ }; ++ ++ fragment@23 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ bebopr_pruss { ++ compatible = "pruss_uio"; ++ status = "okay"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bebopr_pruss_pins>; ++ ++ stepper_x { ++ pin-names = "bebopr:x_ena", "bebopr:x_dir", "bebpor:x_stp"; ++ gpios = <&gpio3 10 0>, <&gpio3 9 0>, <&gpio3 8 0>; ++ }; ++ stepper_y { ++ pin-names = "bebopr:y_ena", "bebopr:y_dir", "bebpor:y_stp"; ++ gpios = <&gpio3 13 0>, <&gpio3 12 0>, <&gpio3 11 0>; ++ }; ++ stepper_z { ++ pin-names = "bebopr:z_ena", "bebopr:z_dir", "bebpor:z_stp"; ++ gpios = <&gpio3 24 0>, <&gpio3 23 0>, <&gpio3 22 0>; ++ }; ++ stepper_e { ++ pin-names = "bebopr:e_ena", "bebopr:e_dir", "bebpor:e_stp"; ++ gpios = <&gpio2 31 0>, <&gpio2 30 0>, <&gpio3 25 0>; ++ }; ++ }; ++ }; ++ }; ++ ++ /* ----------- SENSORS ------------ */ ++ ++ fragment@31 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ bebopr_sensor_pins: pinmux_bebopr_sensor_pins { ++ pinctrl-single,pins = < ++ /* all inputs with pull-downs */ ++ 0xd8 0x2f /* #X_MIN, P8_31, gpio0.10, mode7 in */ ++ 0xdc 0x2f /* #X_MAX, P8_32, gpio0.11, mode7 in */ ++ 0xd0 0x2f /* #Y_MIN, P8_35, gpio0.8, mode7 in */ ++ 0xd4 0x2f /* #Y_MAX, P8_33, gpio0.9 , mode7 in */ ++ 0xc4 0x2f /* #Z_MIN, P8_38, gpio2.15, mode7 in */ ++ 0xc0 0x2f /* #Z_MAX, P8_37, gpio2.14, mode7 in */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@33 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ compatible = "bone-pinmux-helper"; ++ ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bebopr_sensor_pins>; ++ ++ sensors_x { ++ pin-names = "bebopr:x_min", "bebopr:x_max"; ++ gpios = <&gpio1 10 0>, <&gpio1 11 0>; ++ }; ++ sensors_y { ++ pin-names = "bebopr:y_min", "bebopr:y_max"; ++ gpios = <&gpio1 8 0>, <&gpio1 9 0>; ++ }; ++ sensors_z { ++ pin-names = "bebopr:z_min", "bebopr:z_max"; ++ gpios = <&gpio3 15 0>, <&gpio3 14 0>; ++ }; ++ }; ++ }; ++ ++ /* ----------- ADC ------------ */ ++ ++ fragment@41 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ tscadc { ++ compatible = "ti,ti-tscadc"; ++ reg = <0x44e0d000 0x1000>; ++ interrupt-parent = <&intc>; ++ interrupts = <16>; ++ ti,hwmods = "adc_tsc"; ++ status = "okay"; ++ adc { ++ ti,adc-channels = <8>; ++ }; ++ }; ++ ++ bebopr_adc { ++ compatible = "bone-iio-helper"; ++ vsense-name = "AIN0", "AIN1", "AIN2", "AIN3", "AIN4", "AIN5", "AIN6", "AIN7"; ++ vsense-scale = < 228 228 228 228 228 228 228 228>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ /* ----------- LED ------------ */ ++ ++ fragment@51 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ bebopr_led_pins: pinmux_bebopr_led_pins { ++ pinctrl-single,pins = < ++ 0x000 0x07 /* P8-25 GPIO1_0 gpmc_ad0 .gpio1[0] */ ++ >; ++ }; ++ }; ++ }; ++ ++ ++ fragment@52 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ bebopr_leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bebopr_led_pins>; ++ ++ status_led { ++ label = "bebopr:status_led"; ++ gpios = <&gpio2 0 0>; ++ linux,default-trigger = "heartbeat"; ++ default-state = "off"; ++ }; ++ }; ++ }; ++ }; ++ ++}; +-- +1.8.2.1 +