From 5ccf189cb5605549f407d5287f134fccaa638277 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 2 Nov 2011 09:30:51 +0100 Subject: [PATCH] linux-ti335x-psp 3.1: update to latest v3.1-staging branch, fix beaglebone ethernet Signed-off-by: Koen Kooi --- ...BeagleBone-version-detection-and-sup.patch | 140 ++++++++++++++++++ ...return-value-of-omap_mux_init_signal.patch | 34 ----- ...ew-machine-type-beaglebone-to-mach-t.patch | 22 --- ...RM-OMAP2-beaglebone-add-LED-support.patch} | 72 ++++----- ...dd-support-for-beaglebone-machine-id.patch | 29 ---- ...-to-dynamically-reconfigure-chip-inf.patch | 57 ------- ...ebone-add-DVI-support-needs-cleanup.patch} | 105 +++---------- ...igure-EEPROM-with-new-eeprom_info-in.patch | 65 -------- ...35xevm-Use-new-beaglebone-machine-id.patch | 52 ------- recipes-kernel/linux/linux-ti33x-psp_3.1.bb | 14 +- 10 files changed, 195 insertions(+), 395 deletions(-) create mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.1/0001-ARM-omap-am335x-BeagleBone-version-detection-and-sup.patch delete mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.1/0001-am335x-Check-return-value-of-omap_mux_init_signal.patch delete mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.1/0001-mach-types-Add-new-machine-type-beaglebone-to-mach-t.patch rename recipes-kernel/linux/linux-ti33x-psp-3.1/{0001-am335x-Add-pin-mux-and-init-for-beaglebone-specific-.patch => 0002-ARM-OMAP2-beaglebone-add-LED-support.patch} (58%) delete mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.1/0002-Kconfig-Add-support-for-beaglebone-machine-id.patch delete mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.1/0002-at24-Add-ability-to-dynamically-reconfigure-chip-inf.patch rename recipes-kernel/linux/linux-ti33x-psp-3.1/{0001-ARM-OMAP2-beaglebone-hack-in-DVI-support.patch => 0003-ARM-OMAP2-beaglebone-add-DVI-support-needs-cleanup.patch} (64%) delete mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.1/0003-am335x-evm-Reconfigure-EEPROM-with-new-eeprom_info-in.patch delete mode 100644 recipes-kernel/linux/linux-ti33x-psp-3.1/0003-am335xevm-Use-new-beaglebone-machine-id.patch diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-ARM-omap-am335x-BeagleBone-version-detection-and-sup.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-ARM-omap-am335x-BeagleBone-version-detection-and-sup.patch new file mode 100644 index 00000000..669cf4d7 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-ARM-omap-am335x-BeagleBone-version-detection-and-sup.patch @@ -0,0 +1,140 @@ +From 560f9d8e02d70e31e18f4f09c83d904d5e4595b5 Mon Sep 17 00:00:00 2001 +From: Joel A Fernandes +Date: Fri, 28 Oct 2011 16:21:15 +0530 +Subject: [PATCH 1/3] ARM:omap:am335x: BeagleBone version detection and support for old boards + +* Have different dev_cfg structures and setup functions for new, old + beaglebone boards setup pin mux accordingly + +* Fall back to older Bone boards if EEPROM reads are incorrect or empty + +* Read version field of EEPROM config to call correct setup_beaglebone + function according to board version + +While at it, clean-up a bad comment style in existing code. + +Signed-off-by: Steve Kipisz +Signed-off-by: Joel A Fernandes +Signed-off-by: Sekhar Nori +--- + arch/arm/mach-omap2/board-am335xevm.c | 54 +++++++++++++++++++++++++------- + 1 files changed, 42 insertions(+), 12 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c +index c84857e..ee936e0 100644 +--- a/arch/arm/mach-omap2/board-am335xevm.c ++++ b/arch/arm/mach-omap2/board-am335xevm.c +@@ -288,7 +288,7 @@ static struct omap_board_config_kernel am335x_evm_config[] __initdata = { + struct am335x_evm_eeprom_config { + u32 header; + u8 name[8]; +- u32 version; ++ char version[4]; + u8 serial[12]; + u8 opt[32]; + }; +@@ -1224,8 +1224,8 @@ static struct evm_dev_cfg ip_phn_evm_dev_cfg[] = { + {NULL, 0, 0}, + }; + +-/* Beaglebone */ +-static struct evm_dev_cfg beaglebone_dev_cfg[] = { ++/* Beaglebone < Rev A3 */ ++static struct evm_dev_cfg beaglebone_old_dev_cfg[] = { + {rmii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, + {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, + {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, +@@ -1233,6 +1233,15 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = { + {NULL, 0, 0}, + }; + ++/* Beaglebone Rev A3 and after */ ++static struct evm_dev_cfg beaglebone_dev_cfg[] = { ++ {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, ++ {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, ++ {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, ++ {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, ++ {NULL, 0, 0}, ++}; ++ + static void setup_low_cost_evm(void) + { + pr_info("The board is a AM335x Low Cost EVM.\n"); +@@ -1282,19 +1291,32 @@ static void setup_ip_phone_evm(void) + _configure_device(IP_PHN_EVM, ip_phn_evm_dev_cfg, PROFILE_NONE); + } + +-static void setup_beaglebone(void) ++/* BeagleBone < Rev A3 */ ++static void setup_beaglebone_old(void) + { +- pr_info("The board is a AM335x Beaglebone.\n"); ++ pr_info("The board is a AM335x Beaglebone < Rev A3.\n"); + +- /*Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */ ++ /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */ + am335x_mmc[0].gpio_wp = -EINVAL; + +- _configure_device(LOW_COST_EVM, beaglebone_dev_cfg, PROFILE_NONE); ++ _configure_device(LOW_COST_EVM, beaglebone_old_dev_cfg, PROFILE_NONE); + + phy_register_fixup_for_uid(BBB_PHY_ID, BBB_PHY_MASK, + beaglebone_phy_fixup); + } + ++/* BeagleBone after Rev A3 */ ++static void setup_beaglebone(void) ++{ ++ pr_info("The board is a AM335x Beaglebone.\n"); ++ ++ /* Beagle Bone has Micro-SD slot which doesn't have Write Protect pin */ ++ am335x_mmc[0].gpio_wp = -EINVAL; ++ ++ _configure_device(LOW_COST_EVM, beaglebone_dev_cfg, PROFILE_NONE); ++} ++ ++ + static void am335x_setup_daughter_board(struct memory_accessor *m, void *c) + { + u8 tmp; +@@ -1353,11 +1375,18 @@ static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context) + goto out; + } + +- snprintf(tmp, sizeof(config.name), "%s", config.name); ++ snprintf(tmp, sizeof(config.name) + 1, "%s", config.name); + pr_info("Board name: %s\n", tmp); ++ snprintf(tmp, sizeof(config.version) + 1, "%s", config.version); ++ pr_info("Board version: %s\n", tmp); ++ + if (!strncmp("A335BONE", config.name, 8)) { + daughter_brd_detected = false; +- setup_beaglebone(); ++ if(!strncmp("00A1", config.version, 4) || ++ !strncmp("00A2", config.version, 4)) ++ setup_beaglebone_old(); ++ else ++ setup_beaglebone(); + } else { + /* only 6 characters of options string used for now */ + snprintf(tmp, 7, "%s", config.opt); +@@ -1384,12 +1413,13 @@ static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context) + out: + /* + * If the EEPROM hasn't been programed or an incorrect header +- * or board name are read, assume this is a beaglebone board. ++ * or board name are read, assume this is an old beaglebone board ++ * (< Rev A3) + */ + pr_err("Could not detect any board, falling back to: " +- "Beaglebone in profile 0 with no daughter card connected\n"); ++ "Beaglebone (< Rev A3) with no daughter card connected\n"); + daughter_brd_detected = false; +- setup_beaglebone(); ++ setup_beaglebone_old(); + + /* Initialize cpsw after board detection is completed as board + * information is required for configuring phy address and hence +-- +1.7.2.5 + diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-am335x-Check-return-value-of-omap_mux_init_signal.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-am335x-Check-return-value-of-omap_mux_init_signal.patch deleted file mode 100644 index 3ce2df8b..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-am335x-Check-return-value-of-omap_mux_init_signal.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b11df2bf8e19b8a4d4e4bb6eae59fde6a1498920 Mon Sep 17 00:00:00 2001 -From: Joel A Fernandes -Date: Wed, 19 Oct 2011 20:11:00 -0500 -Subject: [PATCH 1/3] am335x: Check return value of omap_mux_init_signal - -This helps guard against setting up pin muxmode incorrectly - -Signed-off-by: Joel A Fernandes ---- - arch/arm/mach-omap2/board-am335xevm.c | 8 +++++--- - 1 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c -index 187f758..f959d95 100644 ---- a/arch/arm/mach-omap2/board-am335xevm.c -+++ b/arch/arm/mach-omap2/board-am335xevm.c -@@ -590,9 +590,11 @@ static void setup_pin_mux(struct pinmux_config *pin_mux) - { - int i; - -- for (i = 0; pin_mux->string_name != NULL; pin_mux++) -- omap_mux_init_signal(pin_mux->string_name, pin_mux->val); -- -+ for (i = 0; pin_mux->string_name != NULL; pin_mux++) { -+ if(omap_mux_init_signal(pin_mux->string_name, pin_mux->val) < 0) { -+ printk(KERN_ERR "Failed to setup pinmux for %s\n", pin_mux->string_name); -+ } -+ } - } - - /* --- -1.7.4.1 - diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-mach-types-Add-new-machine-type-beaglebone-to-mach-t.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-mach-types-Add-new-machine-type-beaglebone-to-mach-t.patch deleted file mode 100644 index 923272cd..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-mach-types-Add-new-machine-type-beaglebone-to-mach-t.patch +++ /dev/null @@ -1,22 +0,0 @@ -From fff15650c35829def3e07712486850c0947ed255 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Tue, 18 Oct 2011 19:27:24 +0200 -Subject: [PATCH 1/3] mach-types: Add new machine type beaglebone to mach-types - -Signed-off-by: Koen Kooi ---- - arch/arm/tools/mach-types | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types -index a0743e1..971612d 100644 ---- a/arch/arm/tools/mach-types -+++ b/arch/arm/tools/mach-types -@@ -1115,3 +1115,4 @@ ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493 - atdgp318 MACH_ATDGP318 ATDGP318 3494 - am335xevm MACH_AM335XEVM AM335XEVM 3589 - am335xiaevm MACH_AM335XIAEVM AM335XIAEVM 3684 -+beaglebone MACH_BEAGLEBONE BEAGLEBONE 3808 --- -1.6.6.1 - diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-am335x-Add-pin-mux-and-init-for-beaglebone-specific-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0002-ARM-OMAP2-beaglebone-add-LED-support.patch similarity index 58% rename from recipes-kernel/linux/linux-ti33x-psp-3.1/0001-am335x-Add-pin-mux-and-init-for-beaglebone-specific-.patch rename to recipes-kernel/linux/linux-ti33x-psp-3.1/0002-ARM-OMAP2-beaglebone-add-LED-support.patch index a501c8a4..c1e75600 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-am335x-Add-pin-mux-and-init-for-beaglebone-specific-.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.1/0002-ARM-OMAP2-beaglebone-add-LED-support.patch @@ -1,31 +1,26 @@ -From 5be793dc9de7e694d9256396aecfdc136c8e2cf6 Mon Sep 17 00:00:00 2001 -From: Joel A Fernandes -Date: Mon, 17 Oct 2011 02:00:39 -0400 -Subject: [PATCH] am335x: Add pin mux and init for beaglebone specific devices +From 3672d287f5382b102e02400298a00d6f8052dd9d Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 2 Nov 2011 09:11:59 +0100 +Subject: [PATCH 2/3] ARM: OMAP2+: beaglebone: add LED support -Currently added for following: - * User LEDs (added by Koen Kooi ) - * BeagleBone tester - -Signed-off-by: Joel A Fernandes +Signed-off-by: Koen Kooi --- - arch/arm/mach-omap2/board-am335xevm.c | 69 +++++++++++++++++++++++++++++++++ - arch/arm/mach-omap2/mux33xx.c | 2 +- - 2 files changed, 70 insertions(+), 1 deletions(-) + arch/arm/mach-omap2/board-am335xevm.c | 66 +++++++++++++++++++++++++++++++++ + 1 files changed, 66 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c -index f625510..6beaa23 100644 +index ee936e0..ecf4a76 100644 --- a/arch/arm/mach-omap2/board-am335xevm.c +++ b/arch/arm/mach-omap2/board-am335xevm.c -@@ -17,6 +17,7 @@ - #include +@@ -18,6 +18,7 @@ #include + #include #include +#include #include #include #include -@@ -590,6 +591,61 @@ static struct pinmux_config usb1_pin_mux[] = { +@@ -649,6 +650,60 @@ static struct pinmux_config usb1_pin_mux[] = { {NULL, 0}, }; @@ -36,6 +31,9 @@ index f625510..6beaa23 100644 +#define BEAGLEBONE_USR3_LED GPIO_TO_PIN(1, 23) +#define BEAGLEBONE_USR4_LED GPIO_TO_PIN(1, 24) + ++#define BEAGLEBONEDVI_USR0_LED GPIO_TO_PIN(1, 18) ++#define BEAGLEBONEDVI_USR1_LED GPIO_TO_PIN(1, 19) ++ +static struct gpio_led gpio_leds[] = { + { + .name = "beaglebone::usr0", @@ -70,10 +68,6 @@ index f625510..6beaa23 100644 + }, +}; + -+static struct platform_device *bone_devices[] __initdata = { -+ &leds_gpio, -+}; -+ +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}, @@ -87,46 +81,38 @@ index f625510..6beaa23 100644 /* Module pin mux for eCAP0 */ static struct pinmux_config ecap0_pin_mux[] = { {"ecap0_in_pwm0_out.gpio0_7", AM33XX_PIN_OUTPUT}, -@@ -698,6 +754,18 @@ static void tsc_init(int evm_id, int profile) +@@ -757,6 +812,15 @@ static void tsc_init(int evm_id, int profile) pr_err("failed to register touchscreen device\n"); } -+/* -+ * Initialization of BeagleBone specific devices -+ */ -+static void bone_init(int evm_id, int profil ) ++static void boneleds_init(int evm_id, int profile ) +{ + int err; + setup_pin_mux(bone_pin_mux); -+ err = platform_add_devices(bone_devices, ARRAY_SIZE(bone_devices)); ++ err = platform_device_register(&leds_gpio); + if (err) -+ pr_err("failed to register LEDS\n"); ++ pr_err("failed to register BeagleBone LEDS\n"); +} + static void rgmii1_init(int evm_id, int profile) { setup_pin_mux(rgmii1_pin_mux); -@@ -1103,6 +1171,7 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = { +@@ -1230,6 +1294,7 @@ static struct evm_dev_cfg beaglebone_old_dev_cfg[] = { {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, -+ {bone_init, DEV_ON_BASEBOARD, PROFILE_ALL}, ++ {boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL}, + {NULL, 0, 0}, + }; + +@@ -1239,6 +1304,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}, ++ {boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {NULL, 0, 0}, }; -diff --git a/arch/arm/mach-omap2/mux33xx.c b/arch/arm/mach-omap2/mux33xx.c -index 0286c4f..f09e827 100644 ---- a/arch/arm/mach-omap2/mux33xx.c -+++ b/arch/arm/mach-omap2/mux33xx.c -@@ -49,7 +49,7 @@ static struct omap_mux __initdata am33xx_muxmodes[] = { - NULL, NULL, NULL, NULL), - _AM33XX_MUXENTRY(GPMC_AD6, 0, - "gpmc_ad6", "mmc1_dat6", NULL, NULL, -- NULL, NULL, NULL, NULL), -+ NULL, NULL, NULL, "gpio1_6"), - _AM33XX_MUXENTRY(GPMC_AD7, 0, - "gpmc_ad7", "mmc1_dat7", NULL, NULL, - NULL, NULL, NULL, NULL), -- -1.7.1 +1.7.2.5 diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0002-Kconfig-Add-support-for-beaglebone-machine-id.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0002-Kconfig-Add-support-for-beaglebone-machine-id.patch deleted file mode 100644 index 6f0f1455..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.1/0002-Kconfig-Add-support-for-beaglebone-machine-id.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 205b782fbc826983ea274dd55642cd6888f1c3df Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Tue, 18 Oct 2011 19:30:05 +0200 -Subject: [PATCH 2/3] Kconfig: Add support for beaglebone machine id. - -Signed-off-by: Koen Kooi ---- - arch/arm/mach-omap2/Kconfig | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig -index b0e1709..9be2982 100644 ---- a/arch/arm/mach-omap2/Kconfig -+++ b/arch/arm/mach-omap2/Kconfig -@@ -331,6 +331,11 @@ config MACH_AM335XIAEVM - depends on SOC_OMAPAM33XX - default y - -+config MACH_BEAGLEBONE -+ bool "AM335x BeagleBone, the most awesome AM335x board" -+ depends on SOC_OMAPAM33XX -+ default y -+ - config MACH_OMAP_4430SDP - bool "OMAP 4430 SDP board" - default y --- -1.6.6.1 - diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0002-at24-Add-ability-to-dynamically-reconfigure-chip-inf.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0002-at24-Add-ability-to-dynamically-reconfigure-chip-inf.patch deleted file mode 100644 index 5d0d580d..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.1/0002-at24-Add-ability-to-dynamically-reconfigure-chip-inf.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 8d0697f8962ef52e06012101efdea7713e0e5055 Mon Sep 17 00:00:00 2001 -From: Joel A Fernandes -Date: Sat, 22 Oct 2011 12:56:44 -0500 -Subject: [PATCH 2/3] at24: Add ability to dynamically reconfigure chip information - -As some EEPROMs are used for board name detection, it is not possible to detect -in advance which EEPROM type is connected without detecting the board first. - -In board-a335xevm.c, we use a trial and error approach and this requires for us -to reconfigure the driver with a new 'eeprom_info' structure different from any -earlier ones that were passed. - -We add new accessor functions to the at24 driver to help with this. - -Signed-off-by: Joel A Fernandes ---- - drivers/misc/eeprom/at24.c | 11 +++++++++++ - include/linux/i2c/at24.h | 3 +++ - 2 files changed, 14 insertions(+), 0 deletions(-) - -diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c -index ab1ad41..41ebc1f 100644 ---- a/drivers/misc/eeprom/at24.c -+++ b/drivers/misc/eeprom/at24.c -@@ -456,6 +456,17 @@ static ssize_t at24_macc_write(struct memory_accessor *macc, const char *buf, - return at24_write(at24, buf, offset, count); - } - -+struct at24_platform_data *at24_macc_getpdata(struct memory_accessor *macc) -+{ -+ struct at24_data *at24 = container_of(macc, struct at24_data, macc); -+ return &at24->chip; -+} -+ -+void at24_macc_setpdata(struct memory_accessor *macc, struct at24_platform_data *chip) -+{ -+ struct at24_data *at24 = container_of(macc, struct at24_data, macc); -+ at24->chip = *chip; -+} - /*-------------------------------------------------------------------------*/ - - #ifdef CONFIG_OF -diff --git a/include/linux/i2c/at24.h b/include/linux/i2c/at24.h -index 8ace930..7872912 100644 ---- a/include/linux/i2c/at24.h -+++ b/include/linux/i2c/at24.h -@@ -29,4 +29,7 @@ struct at24_platform_data { - void *context; - }; - -+struct at24_platform_data *at24_macc_getpdata(struct memory_accessor *macc); -+void at24_macc_setpdata(struct memory_accessor *macc, struct at24_platform_data *chip); -+ - #endif /* _LINUX_AT24_H */ --- -1.7.4.1 - diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-ARM-OMAP2-beaglebone-hack-in-DVI-support.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0003-ARM-OMAP2-beaglebone-add-DVI-support-needs-cleanup.patch similarity index 64% rename from recipes-kernel/linux/linux-ti33x-psp-3.1/0001-ARM-OMAP2-beaglebone-hack-in-DVI-support.patch rename to recipes-kernel/linux/linux-ti33x-psp-3.1/0003-ARM-OMAP2-beaglebone-add-DVI-support-needs-cleanup.patch index a357ee80..479e7902 100644 --- a/recipes-kernel/linux/linux-ti33x-psp-3.1/0001-ARM-OMAP2-beaglebone-hack-in-DVI-support.patch +++ b/recipes-kernel/linux/linux-ti33x-psp-3.1/0003-ARM-OMAP2-beaglebone-add-DVI-support-needs-cleanup.patch @@ -1,16 +1,15 @@ -From 53f68267a95eac46ee91a692ef8a9b144102b3ec Mon Sep 17 00:00:00 2001 +From e3b1d8e6480879ecd533d8a3ac17bb7c4aa2baf0 Mon Sep 17 00:00:00 2001 From: Koen Kooi -Date: Mon, 31 Oct 2011 20:14:46 +0100 -Subject: [PATCH] ARM: OMAP2+: beaglebone: hack in DVI support +Date: Wed, 2 Nov 2011 09:14:29 +0100 +Subject: [PATCH 3/3] ARM: OMAP2+: beaglebone: add DVI support (needs cleanup) Signed-off-by: Koen Kooi --- - arch/arm/mach-omap2/board-am335xevm.c | 124 ++++++++++++++++++++++++++++++--- - drivers/video/da8xx-fb.c | 14 ++++ - 2 files changed, 127 insertions(+), 11 deletions(-) + arch/arm/mach-omap2/board-am335xevm.c | 106 +++++++++++++++++++++++++++++++++ + 1 files changed, 106 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c -index eb18fb9..3d60530 100644 +index ecf4a76..6840422 100644 --- a/arch/arm/mach-omap2/board-am335xevm.c +++ b/arch/arm/mach-omap2/board-am335xevm.c @@ -144,6 +144,36 @@ struct da8xx_lcdc_platform_data TFC_S9700RTWV35TR_01B_pdata = { @@ -101,17 +100,7 @@ index eb18fb9..3d60530 100644 static struct pinmux_config tsc_pin_mux[] = { {"ain0.ain0", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, {"ain1.ain1", OMAP_MUX_MODE0 | AM33XX_INPUT_EN}, -@@ -659,6 +733,9 @@ static struct pinmux_config usb1_pin_mux[] = { - #define BEAGLEBONE_USR3_LED GPIO_TO_PIN(1, 23) - #define BEAGLEBONE_USR4_LED GPIO_TO_PIN(1, 24) - -+#define BEAGLEBONEDVI_USR0_LED GPIO_TO_PIN(1, 18) -+#define BEAGLEBONEDVI_USR1_LED GPIO_TO_PIN(1, 19) -+ - static struct gpio_led gpio_leds[] = { - { - .name = "beaglebone::usr0", -@@ -678,6 +755,16 @@ static struct gpio_led gpio_leds[] = { +@@ -679,6 +753,16 @@ static struct gpio_led gpio_leds[] = { .name = "beaglebone::usr3", .gpio = BEAGLEBONE_USR4_LED, }, @@ -128,18 +117,7 @@ index eb18fb9..3d60530 100644 }; static struct gpio_led_platform_data gpio_led_info = { -@@ -693,10 +780,6 @@ static struct platform_device leds_gpio = { - }, - }; - --static struct platform_device *bone_devices[] __initdata = { -- &leds_gpio, --}; -- - 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}, -@@ -806,6 +889,26 @@ static void lcdc_init(int evm_id, int profile) +@@ -803,6 +887,26 @@ static void lcdc_init(int evm_id, int profile) return; } @@ -166,65 +144,22 @@ index eb18fb9..3d60530 100644 static void tsc_init(int evm_id, int profile) { int err; -@@ -815,16 +918,14 @@ static void tsc_init(int evm_id, int profile) - pr_err("failed to register touchscreen device\n"); - } - --/* -- * Initialization of BeagleBone specific devices -- */ --static void bone_init(int evm_id, int profil ) -+ -+static void boneleds_init(int evm_id, int profile ) - { - int err; - setup_pin_mux(bone_pin_mux); -- err = platform_add_devices(bone_devices, ARRAY_SIZE(bone_devices)); -+ err = platform_device_register(&leds_gpio); - if (err) -- pr_err("failed to register LEDS\n"); -+ pr_err("failed to register BeagleBone LEDS\n"); - } - - static void rgmii1_init(int evm_id, int profile) -@@ -1297,10 +1398,11 @@ static struct evm_dev_cfg ip_phn_evm_dev_cfg[] = { - /* Beaglebone */ - static struct evm_dev_cfg beaglebone_dev_cfg[] = { +@@ -1291,6 +1395,7 @@ static struct evm_dev_cfg ip_phn_evm_dev_cfg[] = { + /* Beaglebone < Rev A3 */ + static struct evm_dev_cfg beaglebone_old_dev_cfg[] = { {rmii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, + {dvi_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, -- {bone_init, DEV_ON_BASEBOARD, PROFILE_ALL}, -+ {boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL}, - {NULL, 0, 0}, - }; - -diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c -index 4347421..9619518 100644 ---- a/drivers/video/da8xx-fb.c -+++ b/drivers/video/da8xx-fb.c -@@ -266,6 +266,20 @@ static struct da8xx_panel known_lcd_panels[] = { - .pxl_clk = 30000000, - .invert_pxl_clk = 0, - }, -+ [3] = { -+ /* 1024 x 768 @ 60 Hz Reduced blanking VESA CVT 0.79M3-R */ -+ .name = "1024x768@60", -+ .width = 1024, -+ .height = 768, -+ .hfp = 48, -+ .hbp = 80, -+ .hsw = 32, -+ .vfp = 3, -+ .vbp = 15, -+ .vsw = 4, -+ .pxl_clk = 56000000, -+ .invert_pxl_clk = 0, -+ }, - }; - - /* Enable the Raster Engine of the LCD Controller */ +@@ -1301,6 +1406,7 @@ static struct evm_dev_cfg beaglebone_old_dev_cfg[] = { + /* Beaglebone Rev A3 and after */ + static struct evm_dev_cfg beaglebone_dev_cfg[] = { + {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, ++ {dvi_init, DEV_ON_BASEBOARD, PROFILE_ALL}, + {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, + {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, + {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, -- -1.6.6.1 +1.7.2.5 diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0003-am335x-evm-Reconfigure-EEPROM-with-new-eeprom_info-in.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0003-am335x-evm-Reconfigure-EEPROM-with-new-eeprom_info-in.patch deleted file mode 100644 index 9d3bb6eb..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.1/0003-am335x-evm-Reconfigure-EEPROM-with-new-eeprom_info-in.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 18a4a980113f7b290c5694239b0e9b21fb7fe132 Mon Sep 17 00:00:00 2001 -From: Joel A Fernandes -Date: Sat, 22 Oct 2011 13:03:08 -0500 -Subject: [PATCH 3/3] am335x-evm: Reconfigure EEPROM with new eeprom_info incase of failure - -The earlier bone boards have an 8-bit address capable EEPROM with 2kbit size -and 16 byte page size. This is very different from the EEPROM on the AM335x -EVM and causes problem when reading for board detection and other purposes. - -We first attempt a read with the original EEPROM settings and incase of an -invalid header, we reconfigure the EEPROM driver with bone_eeprom_info and -perform a restart of the setup function to reread all EEPROM data again this -time with the correct EEPROM configuration. - -This patch is required to get EEPROM reading working correctly on bone board -without breaking support for EVM. - -Signed-off-by: Joel A Fernandes ---- - arch/arm/mach-omap2/board-am335xevm.c | 15 +++++++++++++++ - 1 files changed, 15 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c -index f959d95..eb18fb9 100644 ---- a/arch/arm/mach-omap2/board-am335xevm.c -+++ b/arch/arm/mach-omap2/board-am335xevm.c -@@ -1387,6 +1387,8 @@ static void am335x_setup_daughter_board(struct memory_accessor *m, void *c) - } - } - -+static struct at24_platform_data bone_eeprom_info; -+ - static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context) - { - int ret; -@@ -1413,6 +1415,11 @@ static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context) - } - - if (config.header != AM335X_EEPROM_HEADER) { -+ if(memcmp(at24_macc_getpdata(mem_acc), &bone_eeprom_info, -+ sizeof(struct at24_platform_data)) != 0) { -+ at24_macc_setpdata(mem_acc, &bone_eeprom_info); -+ return am335x_evm_setup(mem_acc, context); -+ } - pr_warning("AM335X: wrong header 0x%x, expected 0x%x\n", - config.header, AM335X_EEPROM_HEADER); - goto out; -@@ -1485,6 +1492,14 @@ static struct at24_platform_data am335x_baseboard_eeprom_info = { - .context = (void *)NULL, - }; - -+static struct at24_platform_data bone_eeprom_info = { -+ .byte_len = (2*1024) / 8, -+ .page_size = 16, -+ .flags = 0x0, -+ .setup = am335x_evm_setup, -+ .context = (void *)NULL, -+}; -+ - /* - * Daughter board Detection. - * Every board has a ID memory (EEPROM) on board. We probe these devices at --- -1.7.4.1 - diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.1/0003-am335xevm-Use-new-beaglebone-machine-id.patch b/recipes-kernel/linux/linux-ti33x-psp-3.1/0003-am335xevm-Use-new-beaglebone-machine-id.patch deleted file mode 100644 index 91c37b4e..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.1/0003-am335xevm-Use-new-beaglebone-machine-id.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 66bec8f45fa501f5cb06f760b62882f43c7cfebd Mon Sep 17 00:00:00 2001 -From: Steve Kipisz -Date: Thu, 13 Oct 2011 17:08:37 -0500 -Subject: [PATCH 3/3] am335xevm: Use new beaglebone machine id. - -Signed-off-by: Steve Kipisz -Signed-off-by: Koen Kooi ---- - arch/arm/mach-omap2/board-am335xevm.c | 23 +++++++++++++++++++++++ - 1 files changed, 23 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c -index 572cb87..e363c80 100644 ---- a/arch/arm/mach-omap2/board-am335xevm.c -+++ b/arch/arm/mach-omap2/board-am335xevm.c -@@ -1242,6 +1242,19 @@ static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context) - int ret; - char tmp[10]; - -+ /* Eventually when we have device tree support, u-boot will -+ * read the EEPROMs and pass flattened device trees to the -+ * kernel. For beaglebone, u-boot will read the EEPROM and -+ * pass the machine type to the kernel. -+ */ -+ if (machine_is_beaglebone()) { -+ pr_info("Board name: AM335BONE\n"); -+ daughter_brd_detected = false; -+ setup_beaglebone(); -+ am33xx_cpsw_init(); -+ return; -+ } -+ - /* get board specific data */ - ret = mem_acc->read(mem_acc, (char *)&config, 0, sizeof(config)); - if (ret != sizeof(config)) { -@@ -1523,3 +1536,13 @@ MACHINE_START(AM335XIAEVM, "am335xiaevm") - .timer = &omap3_am33xx_timer, - .init_machine = am335x_evm_init, - MACHINE_END -+ -+MACHINE_START(BEAGLEBONE, "beaglebone") -+ /* Maintainer: Texas Instruments */ -+ .atag_offset = 0x100, -+ .map_io = am335x_evm_map_io, -+ .init_irq = ti816x_init_irq, -+ .init_early = am335x_init_early, -+ .timer = &omap3_am33xx_timer, -+ .init_machine = am335x_evm_init, -+MACHINE_END --- -1.6.6.1 - diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.1.bb b/recipes-kernel/linux/linux-ti33x-psp_3.1.bb index cf0a1181..faf74063 100644 --- a/recipes-kernel/linux/linux-ti33x-psp_3.1.bb +++ b/recipes-kernel/linux/linux-ti33x-psp_3.1.bb @@ -9,9 +9,9 @@ S = "${WORKDIR}/git" MULTI_CONFIG_BASE_SUFFIX = "" -BRANCH = "master" -SRCREV = "fd97d5068496ab770991a263e9046781ca2441a5" -MACHINE_KERNEL_PR_append = "m+gitr${SRCREV}" +BRANCH = "v3.1-staging" +SRCREV = "1d84d8853fa30cf3db2571a5aec572accca4e29d" +MACHINE_KERNEL_PR_append = "n+gitr${SRCREV}" COMPATIBLE_MACHINE = "(ti33x)" @@ -26,11 +26,9 @@ 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-Add-pin-mux-and-init-for-beaglebone-specific-.patch \ - file://0001-am335x-Check-return-value-of-omap_mux_init_signal.patch \ - file://0002-at24-Add-ability-to-dynamically-reconfigure-chip-inf.patch \ - file://0003-am335x-evm-Reconfigure-EEPROM-with-new-eeprom_info-in.patch \ - file://0001-ARM-OMAP2-beaglebone-hack-in-DVI-support.patch \ + file://0001-ARM-omap-am335x-BeagleBone-version-detection-and-sup.patch \ + file://0002-ARM-OMAP2-beaglebone-add-LED-support.patch \ + file://0003-ARM-OMAP2-beaglebone-add-DVI-support-needs-cleanup.patch \ " SRC_URI += "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "", "${PATCHES_OVER_PSP}", d)}"