1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-06-08 11:50:56 +00:00

linux-ti33x-psp: add TI33x PSP kernel with am335x-evm configs

New proper ti33x SOC_FAMILY
Use linux-am33x PSP repository on Arago, aligned with AM-SDK
Use tipspkernel DISTRO_FEATURE to opt out of additional patches over PSP
Original LED patch from Koen was massaged to apply on top
Beaglebone defconfig is from Joel's kernel

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Denys Dmytriyenko
2011-10-14 16:00:13 -04:00
committed by Koen Kooi
parent 2c8dcc2a8c
commit 3b5eced12a
9 changed files with 8147 additions and 0 deletions
@@ -0,0 +1,109 @@
From f658d7975f2e7232786190002ddd24d6b92ba965 Mon Sep 17 00:00:00 2001
From: Denys Dmytriyenko <denys@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 <koen@dominion.thruhere.net>
Signed-off-by: Denys Dmytriyenko <denys@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
@@ -0,0 +1,31 @@
From 728dac2a525b9516ab22f78ec9c17d0862379085 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Fri, 7 Oct 2011 15:29:28 +0200
Subject: [PATCH] f_rndis: HACK around undefined variables
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
drivers/usb/gadget/f_rndis.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c
index 2d4e9eb..06114da 100644
--- a/drivers/usb/gadget/f_rndis.c
+++ b/drivers/usb/gadget/f_rndis.c
@@ -775,11 +775,11 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
rndis_set_param_medium(rndis->config, NDIS_MEDIUM_802_3, 0);
rndis_set_host_mac(rndis->config, rndis->ethaddr);
-
+/*
if (rndis_set_param_vendor(rndis->config, vendorID,
manufacturer))
goto fail;
-
+*/
/* NOTE: all that is done without knowing or caring about
* the network link ... which is unavailable to this code
* until we're activated via set_alt().
--
1.6.6.1
@@ -0,0 +1 @@
../defconfig
File diff suppressed because it is too large Load Diff
@@ -0,0 +1 @@
../../am335x-evm/defconfig
File diff suppressed because it is too large Load Diff
@@ -0,0 +1 @@
../defconfig
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,31 @@
SECTION = "kernel"
DESCRIPTION = "Linux kernel for TI33x EVM from PSP, based on am335x-kernel"
LICENSE = "GPLv2"
KERNEL_IMAGETYPE = "uImage"
require multi-kernel.inc
S = "${WORKDIR}/git"
MULTI_CONFIG_BASE_SUFFIX = ""
BRANCH = "master"
SRCREV = "10a9c95f6713ce4f7db7088443676808ca79a851"
COMPATIBLE_MACHINE = "(ti33x)"
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
CONFIGS_PSP = "${@base_set_filespath(["${THISDIR}/${PN}-${PV}/tipspkernel"], d)}:\
${@base_set_filespath(["${THISDIR}/${PN}/tipspkernel"], d)}:\
${@base_set_filespath(["${THISDIR}/files/tipspkernel"], d)}:"
FILESPATH =. "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "${CONFIGS_PSP}", "", d)}"
SRC_URI += "git://arago-project.org/git/projects/linux-am33x.git;protocol=git;branch=${BRANCH} \
file://defconfig"
PATCHES_OVER_PSP = " \
file://0001-f_rndis-HACK-around-undefined-variables.patch \
file://0001-am335x-evm-hack-in-LED-support-for-beaglebone.patch \
"
SRC_URI += "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "", "${PATCHES_OVER_PSP}", d)}"