Skip to content

Instantly share code, notes, and snippets.

View Embedded-linux's full-sized avatar
💭
I may be slow to respond.

G Satish Kumar Embedded-linux

💭
I may be slow to respond.
  • Cavium Networks
  • Bangalore
View GitHub Profile
@Embedded-linux
Embedded-linux / I2C and EEPROM
Created September 13, 2013 17:36
I2C EEPROM for LPC2148
I2C with segment display
#include <LPC214x.h>
#include <stdio.h>
#define MAX 6
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Declarations >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void I2C_ISR(void)__irq;
void Wait (unsigned int);
void I2C_Init (void);
@Embedded-linux
Embedded-linux / board_am335x_evm.c
Last active December 26, 2015 21:19
Template file for am335xevm "arch/arm/mach-omap2/board_am335x_evm.c"
File Name: arch/arm/mach-omap2/board_am335x_evm.c
Complete analysis of template board file, this file gives minium requirements
for the board to up and it gives priority to user to add other I/O devices such
as LCD, MMC, NAND for providing kerenl support.
MACHINE_START(AM335XEVM, "am335xevm")
/* Maintainer: Texas Instruments */
.atag_offset = 0x100,
.map_io = am335x_evm_map_io,
.init_early = am33xx_init_early,
@Embedded-linux
Embedded-linux / board_am335x_evm.c
Last active December 26, 2015 23:29
Adding MMC support to beagle bone board
For Kerenl porting/u-boot porting there are 3 types of files added/changed
1.cpu spefic files [arm cortex-A8 processor]
2.Machine/architecture spefic files [AM335x ]
3.Board spefic files [Beagle bone]
Machine/Architecture spefic files are presented commonly in cpu and
board realted files for ex.arch/arm/cpu/armv7/am335x/*.c
[for armv7 processor --are cortex A8 and for am335x architecture spefic]
@Embedded-linux
Embedded-linux / board-am335xevm.h
Created October 30, 2013 13:52
Adding ethernet support
For adding ethernet support platform supported PHY values are added
File Name : "arch/arm/mach-omap2/include/mach/board-am335xevm.h"
+
+/* Define Ethernet Phy Types */
+#define MII_MODE_ENABLE 0x0
+#define RMII_MODE_ENABLE 0x5
+#define RGMII_MODE_ENABLE 0xA
+#define MAC_MII_SEL 0x650
@Embedded-linux
Embedded-linux / board-am335xevm.c
Last active December 28, 2015 16:08
Adding Touchscreen Support [Adding Backlight & 7'' LCD]
Enable Backlight Support:
File Names changed : arch/arm/mach-omap2/board-am335xevm.c
arch/arm/mach-omap2/mux33xx.c
File Name: arch/arm/mach-omap2/board-am335xevm.c
-------------------------------------------------------------------------------------------
+#include <linux/pwm/pwm.h>
@Embedded-linux
Embedded-linux / board-am335xevm.c
Created November 18, 2013 13:42
Adding 7" LCD support
Files to chnage: arch/arm/mach-omap2/board-am335xevm.c
------------------------------------------------------------------------
+ bbcape7lcd_init();
------------------------------------------------------------------------
Initilization of bbcape7" lcd function declaration
@Embedded-linux
Embedded-linux / board-am335xevm.c
Created November 18, 2013 14:20
Touch Screen Support
Files to change: arch/arm/board-am335xevm.c
-------------------------------------------------------------------------
+#include <linux/input/ti_tsc.h>
+#include <linux/mfd/ti_tscadc.h>
-------------------------------------------------------------------------
Header files incluing for structure ti_tsc variables and
register offset values of the device "TFC_S9700RTWV35TR_01B"
-------------------------------------------------------------------------
@Embedded-linux
Embedded-linux / board.c
Created November 18, 2013 15:05
Uboot porting--template
Template Files : arch/arm/cpu/armv7/am33xx/board.c
arch/arm/cpu/armv7/am33xx/emif4.c
arch/arm/cpu/armv7/am33xx/mem.c
board/ti/am335x/board.c
board/ti/am335x/mux.c
board/ti/am335x/uboot.lds
boards.cfg
include/configs/am335x_evm.h
@Embedded-linux
Embedded-linux / rtc-ds1307.c
Last active January 1, 2016 07:39
I2C Platform Driver ,Bus Driver and Client Driver
Writing I2C Platform Driver and Code Flow:
File Name: arch/arm/mach-versatile/versatile-pb.c
Function Name: versatile_init(); -----------> arch/arm/mach-versatile/core.c -------------->
platform_device_register(&versatile_i2c_device);
Machine File is registering i2c device with function name platform_device_register()
@Embedded-linux
Embedded-linux / all-functions
Created January 3, 2014 07:00
kernel supported driver functions
The OS functions supported at kernel level are, of course, only those functions programmed inside it:
kmalloc(), kfree(): memory management
cli(), sti(): enable/disable interrupts
add_timer(), init_timer(), del_timer(): timing management
request_irq(), free_irq(): irq management