diff -crN buildroot-2013.08.1-cm-3g-20150616-1/board/ckb/cm-3g/configs/linux-3.2.1.config buildroot-2013.08.1-cm-3g-20150617-pwm/board/ckb/cm-3g/configs/linux-3.2.1.config
*** buildroot-2013.08.1-cm-3g-20150616-1/board/ckb/cm-3g/configs/linux-3.2.1.config	2015-06-16 09:10:44.007450617 +0900
--- buildroot-2013.08.1-cm-3g-20150617-pwm/board/ckb/cm-3g/configs/linux-3.2.1.config	2015-06-17 12:54:53.864685700 +0900
***************
*** 308,320 ****
  CONFIG_CM3G_USB1_SUPPORT=y
  CONFIG_CM3G_LED_SUPPORT=y
  CONFIG_CM3G_ETHERNET_SUPPORT=y
- CONFIG_CM3G_AUDIO_EHRPWM=y
  CONFIG_CM3G_AUDIO_SUPPORT=y
- # CONFIG_CM3G_EHRPWM0_SUPPORT is not set
  CONFIG_CM3G_I2C1_SUPPORT=y
  CONFIG_CM3G_I2C2_SUPPORT=y
  
  #
  # TCN pin multiplex
  #
  
--- 308,328 ----
  CONFIG_CM3G_USB1_SUPPORT=y
  CONFIG_CM3G_LED_SUPPORT=y
  CONFIG_CM3G_ETHERNET_SUPPORT=y
  CONFIG_CM3G_AUDIO_SUPPORT=y
  CONFIG_CM3G_I2C1_SUPPORT=y
  CONFIG_CM3G_I2C2_SUPPORT=y
  
  #
+ # Disable Audio support to enable eHRPWM0 support
+ #
+ 
+ #
+ # Disable CM-J100 WLAN card support to enable eHRPWM1 support
+ #
+ # CONFIG_CM3G_ECAP0_SUPPORT is not set
+ # CONFIG_CM3G_ECAP2_SUPPORT is not set
+ 
+ #
  # TCN pin multiplex
  #
  
***************
*** 588,598 ****
  #
  
  #
! # Disable CM-J100 WLAN card support to enable Pin59 multiplex options
  #
  
  #
! # Disable CM-J100 WLAN card support to enable Pin60 multiplex options
  #
  
  #
--- 596,606 ----
  #
  
  #
! # Disable CM-J100 WLAN card and eHRPWM1 support to enable Pin59 multiplex options
  #
  
  #
! # Disable CM-J100 WLAN card and eHRPWM1 support to enable Pin60 multiplex options
  #
  
  #
diff -crN buildroot-2013.08.1-cm-3g-20150616-1/board/ckb/cm-3g/patches/linux-3.2.1-003-pwm.patch buildroot-2013.08.1-cm-3g-20150617-pwm/board/ckb/cm-3g/patches/linux-3.2.1-003-pwm.patch
*** buildroot-2013.08.1-cm-3g-20150616-1/board/ckb/cm-3g/patches/linux-3.2.1-003-pwm.patch	1970-01-01 09:00:00.000000000 +0900
--- buildroot-2013.08.1-cm-3g-20150617-pwm/board/ckb/cm-3g/patches/linux-3.2.1-003-pwm.patch	2015-06-17 11:56:14.601059000 +0900
***************
*** 0 ****
--- 1,407 ----
+ diff -crN linux-3.2.1/arch/arm/mach-cm_3g/board-cm-3g.c linux-3.2.1-pwm/arch/arm/mach-cm_3g/board-cm-3g.c
+ *** linux-3.2.1/arch/arm/mach-cm_3g/board-cm-3g.c	2015-06-17 11:42:07.471223050 +0900
+ --- linux-3.2.1-pwm/arch/arm/mach-cm_3g/board-cm-3g.c	2015-06-17 11:54:37.284790000 +0900
+ ***************
+ *** 1083,1108 ****
+   }
+   #endif
+   
+   #ifdef CONFIG_CM3G_EHRPWM0_SUPPORT
+ ! static struct pinmux_config ehrpwm_pin_mux[] = {
+   	{"mcasp0_aclkx.ehrpwm0A", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
+   	{"mcasp0_fsx.ehrpwm0B",	OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
+   	{NULL, 0},
+   };
+   
+ ! static struct pwmss_platform_data  ehrpwm_pdata0 = {
+   	.version = PWM_VERSION_1,
+   };
+   
+ ! #define HAPTICS_MAX_FREQ 250
+ ! void ckb_ehrpwm_init(void)
+   {
+ ! 	setup_pin_mux(ehrpwm_pin_mux);
+ ! 	ehrpwm_pdata0.chan_attrib[1].max_freq = HAPTICS_MAX_FREQ;
+ ! 	am33xx_register_ehrpwm(0, &ehrpwm_pdata0);
+   }
+   #endif
+   
+   static void __iomem *am33xx_i2c0_base;
+   int am33xx_map_i2c0(void)
+   {
+ --- 1083,1166 ----
+   }
+   #endif
+   
+ + #define HAPTICS_MAX_FREQ 250
+ + 
+   #ifdef CONFIG_CM3G_EHRPWM0_SUPPORT
+ ! static struct pinmux_config ehrpwm0_pin_mux[] = {
+   	{"mcasp0_aclkx.ehrpwm0A", OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
+   	{"mcasp0_fsx.ehrpwm0B",	OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT},
+   	{NULL, 0},
+   };
+   
+ ! static struct pwmss_platform_data  ehrpwm0_pdata = {
+   	.version = PWM_VERSION_1,
+   };
+   
+ ! void ckb_ehrpwm0_init(void)
+ ! {
+ ! 	setup_pin_mux(ehrpwm0_pin_mux);
+ ! 	//ehrpwm0_pdata.chan_attrib[1].max_freq = HAPTICS_MAX_FREQ;
+ ! 	am33xx_register_ehrpwm(0, &ehrpwm0_pdata);
+ ! }
+ ! #endif
+ ! 
+ ! #ifdef CONFIG_CM3G_EHRPWM1_SUPPORT
+ ! static struct pinmux_config ehrpwm1_pin_mux[] = {
+ ! 	{"gpmc_a2.ehrpwm1A",	OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT},
+ ! 	{"gpmc_a3.ehrpwm1B",	OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT},
+ ! 	{NULL, 0},
+ ! };
+ ! 
+ ! static struct pwmss_platform_data  ehrpwm1_pdata = {
+ ! 	.version = PWM_VERSION_1,
+ ! };
+ ! 
+ ! void ckb_ehrpwm1_init(void)
+ ! {
+ ! 	setup_pin_mux(ehrpwm1_pin_mux);
+ ! //	ehrpwm1_pdata.chan_attrib[1].max_freq = HAPTICS_MAX_FREQ;
+ ! 	am33xx_register_ehrpwm(1, &ehrpwm1_pdata);
+ ! }
+ ! #endif
+ ! 
+ ! #ifdef CONFIG_CM3G_ECAP0_SUPPORT
+ ! static struct pwmss_platform_data ecap0_pdata = {
+ ! 		.version = PWM_VERSION_1,
+ ! };
+ ! 
+ ! static struct pinmux_config ecap0_pin_mux[] = {
+ ! 	{"ecap0_in_pwm0_out.ecap0_in_pwm0_out",	OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
+ ! 	{NULL, 0},
+ ! };
+ ! 
+ ! void ckb_ecap0_init(void)
+ ! {
+ ! 	setup_pin_mux(ecap0_pin_mux);
+ ! 	// ecap0_pdata[2].chan_attrib[1].max_freq = HAPTICS_MAX_FREQ;
+ ! 	am33xx_register_ecap(0, &ecap0_pdata);
+ ! }
+ ! #endif
+ ! 
+ ! 
+ ! #ifdef CONFIG_CM3G_ECAP2_SUPPORT
+ ! static struct pwmss_platform_data ecap2_pdata = {
+ ! 		.version = PWM_VERSION_1,
+ ! };
+ ! 
+ ! static struct pinmux_config ecap2_pin_mux[] = {
+ ! 	{"mcasp0_ahclkr.ecap2_in_pwm2_out",	OMAP_MUX_MODE4 | AM33XX_PIN_OUTPUT},
+ ! 	{NULL, 0},
+ ! };
+ ! 
+ ! void ckb_ecap2_init(void)
+   {
+ ! 	setup_pin_mux(ecap2_pin_mux);
+ ! 	// ecap0_pdata[2].chan_attrib[1].max_freq = HAPTICS_MAX_FREQ;
+ ! 	am33xx_register_ecap(2, &ecap2_pdata);
+   }
+   #endif
+   
+ + 
+   static void __iomem *am33xx_i2c0_base;
+   int am33xx_map_i2c0(void)
+   {
+ ***************
+ *** 5429,5435 ****
+   #endif
+   
+   #ifdef CONFIG_CM3G_EHRPWM0_SUPPORT
+ ! 	ckb_ehrpwm_init();
+   #endif
+   	setup_pin_mux(tcn_pin_mux);
+   	configure_tcn_gpio_mode();
+ --- 5487,5502 ----
+   #endif
+   
+   #ifdef CONFIG_CM3G_EHRPWM0_SUPPORT
+ ! 	ckb_ehrpwm0_init();
+ ! #endif
+ ! #ifdef CONFIG_CM3G_EHRPWM1_SUPPORT
+ ! 	ckb_ehrpwm1_init();
+ ! #endif
+ ! #ifdef CONFIG_CM3G_ECAP0_SUPPORT
+ ! 	ckb_ecap0_init();
+ ! #endif
+ ! #ifdef CONFIG_CM3G_ECAP2_SUPPORT
+ ! 	ckb_ecap2_init();
+   #endif
+   	setup_pin_mux(tcn_pin_mux);
+   	configure_tcn_gpio_mode();
+ diff -crN linux-3.2.1/arch/arm/mach-cm_3g/devices.c linux-3.2.1-pwm/arch/arm/mach-cm_3g/devices.c
+ *** linux-3.2.1/arch/arm/mach-cm_3g/devices.c	2015-06-17 11:42:07.509142387 +0900
+ --- linux-3.2.1-pwm/arch/arm/mach-cm_3g/devices.c	2015-06-17 11:54:12.396898000 +0900
+ ***************
+ *** 394,401 ****
+   	return 0;
+   }
+   
+ - #ifdef CONFIG_CM3G_EHRPWM0_SUPPORT
+   #define PWM_STR_LEN 10
+   int __init am33xx_register_ecap(int id, struct pwmss_platform_data *pdata)
+   {
+   	struct platform_device *pdev;
+ --- 394,401 ----
+   	return 0;
+   }
+   
+   #define PWM_STR_LEN 10
+ + #if defined(CONFIG_CM3G_ECAP0_SUPPORT) || defined(CONFIG_CM3G_ECAP2_SUPPORT)
+   int __init am33xx_register_ecap(int id, struct pwmss_platform_data *pdata)
+   {
+   	struct platform_device *pdev;
+ ***************
+ *** 421,427 ****
+ --- 421,429 ----
+   	}
+   	return 0;
+   }
+ + #endif
+   
+ + #if defined(CONFIG_CM3G_EHRPWM0_SUPPORT) || defined(CONFIG_CM3G_EHRPWM1_SUPPORT)
+   int __init am33xx_register_ehrpwm(int id, struct pwmss_platform_data *pdata)
+   {
+   	struct platform_device *pdev;
+ diff -crN linux-3.2.1/arch/arm/mach-cm_3g/Kconfig linux-3.2.1-pwm/arch/arm/mach-cm_3g/Kconfig
+ *** linux-3.2.1/arch/arm/mach-cm_3g/Kconfig	2015-06-17 11:42:07.533696763 +0900
+ --- linux-3.2.1-pwm/arch/arm/mach-cm_3g/Kconfig	2015-06-17 11:54:01.972234000 +0900
+ ***************
+ *** 56,86 ****
+   
+   config SUPPORT_CMJ100
+   	bool "CM-J100 WLAN card support"
+ - 	depends on CM3G100_D_BOARD
+   	help
+   	  Select this option to add support for CM-J100 WLAN card.
+   
+   config CM3G_GPIO_KEYS
+   	bool "GPIO keypad support"
+ - 	depends on CM3G100_D_BOARD
+   	help
+   	  Select this option to add support for GPIO keypad.
+   
+   config CX1205A_KEYPAD
+   	bool "CX1205A Keypad support"
+ - 	depends on CM3G100_D_BOARD
+   	help
+   	  Enable support for CX1205A Matrix Keypad and LCD board
+   
+   config CM3G_UART0
+   	bool "UART0 support"
+ - 	depends on CM3G100_D_BOARD
+   	help
+   	  Select this option to add support for UART0 (CH0-DBG)
+   
+   config CM3G_UART1
+   	bool "UART1 support"
+ - 	depends on CM3G100_D_BOARD
+   	help
+   	  Select this option to add support for UART1 (CH1-USER)
+   
+ --- 56,81 ----
+ ***************
+ *** 92,98 ****
+   
+   config CM3G_UART2
+   	bool "UART2 support"
+ - 	depends on CM3G100_D_BOARD
+   	help
+   	  Select this option to add support for UART2 (RS485)
+   
+ --- 87,92 ----
+ ***************
+ *** 102,108 ****
+   
+   config CM3G_UART3
+   	bool "UART3 support"
+ - 	depends on CM3G100_D_BOARD
+   	help
+   	  Select this option to add support for UART3 (Dust device)
+   
+ --- 96,101 ----
+ ***************
+ *** 114,120 ****
+   
+   config CM3G_UART4
+   	bool "UART4 support"
+ - 	depends on CM3G100_D_BOARD
+   	help
+   	  Select this option to add support for UART4 (Dust device)
+   
+ --- 107,112 ----
+ ***************
+ *** 124,159 ****
+   	  
+   config CM3G_LED_SUPPORT
+   	bool "LED support"
+ ! 	depends on CM3G100_D_BOARD
+ ! 	
+   config CM3G_ETHERNET_SUPPORT
+   	bool "Ethernet support"
+ - 	depends on CM3G100_D_BOARD
+ - 
+ - config CM3G_AUDIO_EHRPWM
+ - 	bool "Support Audio or eHRPWM0"
+ - 	depends on CM3G100_D_BOARD
+ - 
+ - choice
+ - 	bool "Support"
+ - 	depends on CM3G_AUDIO_EHRPWM
+   
+   config CM3G_AUDIO_SUPPORT
+ ! 	bool "Audio"
+ ! 		
+ ! config CM3G_EHRPWM0_SUPPORT
+ ! 	bool "eHRPWM0 (Pins 33,37)"
+ ! 
+ ! endchoice 
+   
+   config CM3G_I2C1_SUPPORT
+   	bool "I2C1 support"
+ - 	depends on CM3G100_D_BOARD
+   
+   config CM3G_I2C2_SUPPORT
+   	bool "I2C2 support"
+ - 	depends on CM3G100_D_BOARD
+   
+   comment "TCN pin multiplex"
+   
+   #PIN7 - USB1_DP
+ --- 116,156 ----
+   	  
+   config CM3G_LED_SUPPORT
+   	bool "LED support"
+ ! 
+   config CM3G_ETHERNET_SUPPORT
+   	bool "Ethernet support"
+   
+   config CM3G_AUDIO_SUPPORT
+ ! 	bool "Audio support"
+   
+   config CM3G_I2C1_SUPPORT
+   	bool "I2C1 support"
+   
+   config CM3G_I2C2_SUPPORT
+   	bool "I2C2 support"
+   
+ + menu "Disable Audio support to enable eHRPWM0 support"
+ + 	depends on CM3G_AUDIO_SUPPORT
+ + endmenu
+ + 
+ + config CM3G_EHRPWM0_SUPPORT
+ + 	bool "eHRPWM0 support (Pins 33,37)"
+ + 	depends on !CM3G_AUDIO_SUPPORT
+ + 
+ + menu "Disable CM-J100 WLAN card support to enable eHRPWM1 support"
+ + 	depends on SUPPORT_CMJ100
+ + endmenu
+ + 
+ + config CM3G_EHRPWM1_SUPPORT
+ + 	bool "eHRPWM1 support (Pins 59,60)"
+ + 	depends on !SUPPORT_CMJ100
+ + 
+ + config CM3G_ECAP0_SUPPORT
+ + 	bool "eECAP0 support (Pin 80)"
+ + 	
+ + config CM3G_ECAP2_SUPPORT
+ + 	bool "eECAP2 support (Pin 79)"
+ + 			
+   comment "TCN pin multiplex"
+   
+   #PIN7 - USB1_DP
+ ***************
+ *** 3192,3203 ****
+   
+   endmenu
+   
+ ! menu "Disable CM-J100 WLAN card support to enable Pin59 multiplex options"
+ ! 	depends on SUPPORT_CMJ100
+   endmenu
+   
+   menu "Pin59"
+ ! 	depends on !SUPPORT_CMJ100
+   
+   choice
+   	prompt "Pin59 MUX"
+ --- 3189,3200 ----
+   
+   endmenu
+   
+ ! menu "Disable CM-J100 WLAN card and eHRPWM1 support to enable Pin59 multiplex options"
+ ! 	depends on SUPPORT_CMJ100 || CM3G_EHRPWM1_SUPPORT
+   endmenu
+   
+   menu "Pin59"
+ ! 	depends on !SUPPORT_CMJ100 && !CM3G_EHRPWM1_SUPPORT
+   
+   choice
+   	prompt "Pin59 MUX"
+ ***************
+ *** 3269,3280 ****
+   
+   endmenu
+   
+ ! menu "Disable CM-J100 WLAN card support to enable Pin60 multiplex options"
+ ! 	depends on SUPPORT_CMJ100
+   endmenu
+   
+   menu "Pin60"
+ ! 	depends on !SUPPORT_CMJ100
+   
+   choice
+   	prompt "Pin60 MUX"
+ --- 3266,3277 ----
+   
+   endmenu
+   
+ ! menu "Disable CM-J100 WLAN card and eHRPWM1 support to enable Pin60 multiplex options"
+ ! 	depends on SUPPORT_CMJ100 || CM3G_EHRPWM1_SUPPORT
+   endmenu
+   
+   menu "Pin60"
+ ! 	depends on !SUPPORT_CMJ100 && !CM3G_EHRPWM1_SUPPORT
+   
+   choice
+   	prompt "Pin60 MUX"
+ ***************
+ *** 4581,4587 ****
+ --- 4578,4589 ----
+   
+   endmenu
+   
+ + menu "Disable eCAP2 support to enable Pin79 multiplex options"
+ + 	depends on CM3G_ECAP2_SUPPORT
+ + endmenu
+ + 
+   menu "Pin79"
+ + 	depends on !CM3G_ECAP2_SUPPORT
+   
+   choice
+   	prompt "Pin79 MUX"
+ ***************
+ *** 4653,4659 ****
+ --- 4655,4666 ----
+   
+   endmenu
+   
+ + menu "Disable eCAP0 support to enable Pin80 multiplex options"
+ + 	depends on CM3G_ECAP0_SUPPORT
+ + endmenu
+ + 
+   menu "Pin80"
+ + 	depends on !CM3G_ECAP0_SUPPORT
+   
+   choice
+   	prompt "Pin80 Mux"
