Currently added for following: * User LEDs (added by Koen Kooi <k-k...@ti.com>) * BeagleBone tester
Build and run time tested. Signed-off-by: Joel A Fernandes <joelag...@ti.com> --- ...pin-mux-and-init-for-beaglebone-specific-.patch | 109 ++++++++++++++++++++ ...5x-evm-hack-in-LED-support-for-beaglebone.patch | 109 -------------------- recipes-kernel/linux/linux-ti33x-psp_3.0+3.1rc.bb | 4 +- 3 files changed, 111 insertions(+), 111 deletions(-) create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0001-am335x-Add-pin-mux-and-init-for-beaglebone-specific-.patch delete mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0001-am335x-evm-hack-in-LED-support-for-beaglebone.patch diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0001-am335x-Add-pin-mux-and-init-for-beaglebone-specific-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0001-am335x-Add-pin-mux-and-init-for-beaglebone-specific-.patch new file mode 100644 index 0000000..b043ce9 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0001-am335x-Add-pin-mux-and-init-for-beaglebone-specific-.patch @@ -0,0 +1,109 @@ +From f658d7975f2e7232786190002ddd24d6b92ba965 Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko <de...@ti.com> +Date: Mon, 17 Oct 2011 02:00:39 -0400 +Subject: [PATCH] am335x-evm: hack in LED support for beaglebone + +Signed-off-by: Koen Kooi <k...@dominion.thruhere.net> +Signed-off-by: Denys Dmytriyenko <de...@ti.com> +--- + arch/arm/mach-omap2/board-am335xevm.c | 63 +++++++++++++++++++++++++++++++++ + 1 files changed, 63 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c +index 87eec7b..3a3c55b 100644 +--- a/arch/arm/mach-omap2/board-am335xevm.c ++++ b/arch/arm/mach-omap2/board-am335xevm.c +@@ -17,6 +17,7 @@ + #include <linux/i2c.h> + #include <linux/i2c/at24.h> + #include <linux/gpio.h> ++#include <linux/leds.h> + #include <linux/spi/spi.h> + #include <linux/spi/flash.h> + #include <linux/mtd/mtd.h> +@@ -588,6 +589,58 @@ static struct pinmux_config usb1_pin_mux[] = { + {NULL, 0}, + }; + ++/* LEDS - gpio1_21 -> gpio1_24 */ ++ ++#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 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 gpio_led_platform_data gpio_led_info = { ++ .leds = gpio_leds, ++ .num_leds = ARRAY_SIZE(gpio_leds), ++}; ++ ++static struct platform_device leds_gpio = { ++ .name = "leds-gpio", ++ .id = -1, ++ .dev = { ++ .platform_data = &gpio_led_info, ++ }, ++}; ++ ++static struct platform_device *bone_devices[] __initdata = { ++ &leds_gpio, ++}; ++ ++static struct pinmux_config boneled_pin_mux[] = { ++ {"gpmc_a5.rgmii2_td0", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // gpio 21 ++ {"gpmc_a6.rgmii2_tclk", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // gpio22 ++ {"gpmc_a7.rgmii2_rclk", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // gpio23 ++ {"gpmc_a8.rgmii2_rd3", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // gpio 24 ++}; ++ + /* Module pin mux for eCAP0 */ + static struct pinmux_config ecap0_pin_mux[] = { + {"ecap0_in_pwm0_out.gpio0_7", AM33XX_PIN_OUTPUT}, +@@ -696,6 +749,15 @@ static void tsc_init(int evm_id, int profile) + pr_err("failed to register touchscreen device\n"); + } + ++static void bone_leds_init(int evm_id, int profil ) ++{ ++ int err; ++ setup_pin_mux(boneled_pin_mux); ++ err = platform_add_devices(bone_devices, ARRAY_SIZE(bone_devices)); ++ if (err) ++ pr_err("failed to register LEDS\n"); ++} ++ + static void rgmii1_init(int evm_id, int profile) + { + setup_pin_mux(rgmii1_pin_mux); +@@ -1101,6 +1163,7 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = { + {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, + {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, + {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, ++ {bone_leds_init, DEV_ON_BASEBOARD, PROFILE_ALL}, + {NULL, 0, 0}, + }; + +-- +1.7.0.4 + diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0001-am335x-evm-hack-in-LED-support-for-beaglebone.patch b/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0001-am335x-evm-hack-in-LED-support-for-beaglebone.patch deleted file mode 100644 index b043ce9..0000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0001-am335x-evm-hack-in-LED-support-for-beaglebone.patch +++ /dev/null @@ -1,109 +0,0 @@ -From f658d7975f2e7232786190002ddd24d6b92ba965 Mon Sep 17 00:00:00 2001 -From: Denys Dmytriyenko <de...@ti.com> -Date: Mon, 17 Oct 2011 02:00:39 -0400 -Subject: [PATCH] am335x-evm: hack in LED support for beaglebone - -Signed-off-by: Koen Kooi <k...@dominion.thruhere.net> -Signed-off-by: Denys Dmytriyenko <de...@ti.com> ---- - arch/arm/mach-omap2/board-am335xevm.c | 63 +++++++++++++++++++++++++++++++++ - 1 files changed, 63 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c -index 87eec7b..3a3c55b 100644 ---- a/arch/arm/mach-omap2/board-am335xevm.c -+++ b/arch/arm/mach-omap2/board-am335xevm.c -@@ -17,6 +17,7 @@ - #include <linux/i2c.h> - #include <linux/i2c/at24.h> - #include <linux/gpio.h> -+#include <linux/leds.h> - #include <linux/spi/spi.h> - #include <linux/spi/flash.h> - #include <linux/mtd/mtd.h> -@@ -588,6 +589,58 @@ static struct pinmux_config usb1_pin_mux[] = { - {NULL, 0}, - }; - -+/* LEDS - gpio1_21 -> gpio1_24 */ -+ -+#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 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 gpio_led_platform_data gpio_led_info = { -+ .leds = gpio_leds, -+ .num_leds = ARRAY_SIZE(gpio_leds), -+}; -+ -+static struct platform_device leds_gpio = { -+ .name = "leds-gpio", -+ .id = -1, -+ .dev = { -+ .platform_data = &gpio_led_info, -+ }, -+}; -+ -+static struct platform_device *bone_devices[] __initdata = { -+ &leds_gpio, -+}; -+ -+static struct pinmux_config boneled_pin_mux[] = { -+ {"gpmc_a5.rgmii2_td0", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // gpio 21 -+ {"gpmc_a6.rgmii2_tclk", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // gpio22 -+ {"gpmc_a7.rgmii2_rclk", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // gpio23 -+ {"gpmc_a8.rgmii2_rd3", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT}, // gpio 24 -+}; -+ - /* Module pin mux for eCAP0 */ - static struct pinmux_config ecap0_pin_mux[] = { - {"ecap0_in_pwm0_out.gpio0_7", AM33XX_PIN_OUTPUT}, -@@ -696,6 +749,15 @@ static void tsc_init(int evm_id, int profile) - pr_err("failed to register touchscreen device\n"); - } - -+static void bone_leds_init(int evm_id, int profil ) -+{ -+ int err; -+ setup_pin_mux(boneled_pin_mux); -+ err = platform_add_devices(bone_devices, ARRAY_SIZE(bone_devices)); -+ if (err) -+ pr_err("failed to register LEDS\n"); -+} -+ - static void rgmii1_init(int evm_id, int profile) - { - setup_pin_mux(rgmii1_pin_mux); -@@ -1101,6 +1163,7 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = { - {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, - {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, - {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, -+ {bone_leds_init, DEV_ON_BASEBOARD, PROFILE_ALL}, - {NULL, 0, 0}, - }; - --- -1.7.0.4 - diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.0+3.1rc.bb b/recipes-kernel/linux/linux-ti33x-psp_3.0+3.1rc.bb index e42b8a0..ba40bdb 100644 --- a/recipes-kernel/linux/linux-ti33x-psp_3.0+3.1rc.bb +++ b/recipes-kernel/linux/linux-ti33x-psp_3.0+3.1rc.bb @@ -11,7 +11,7 @@ MULTI_CONFIG_BASE_SUFFIX = "" BRANCH = "master" SRCREV = "a95ceb11b5858feae89895d14d7f7bc41cca9fd6" -MACHINE_KERNEL_PR_append = "d+gitr${SRCREV}" +MACHINE_KERNEL_PR_append = "e+gitr${SRCREV}" COMPATIBLE_MACHINE = "(ti33x)" @@ -26,7 +26,7 @@ SRC_URI += "git://arago-project.org/git/projects/linux-am33x.git;protocol=git;br PATCHES_OVER_PSP = " \ file://0001-f_rndis-HACK-around-undefined-variables.patch \ - file://0001-am335x-evm-hack-in-LED-support-for-beaglebone.patch \ + file://0001-am335x-Add-pin-mux-and-init-for-beaglebone-specific-.patch \ file://0001-mach-types-Add-new-machine-type-beaglebone-to-mach-t.patch \ file://0002-Kconfig-Add-support-for-beaglebone-machine-id.patch \ file://0003-am335xevm-Use-new-beaglebone-machine-id.patch \ -- 1.7.0.4 _______________________________________________ Angstrom-distro-devel mailing list Angstrom-distro-devel@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel