Exynos4: add support for device tree
Subsystems (5)
cover Exynos4: add support for device tree
This patch set enables support for device tree on all Exynos4 based boards.
DT support is enabled on Exynos mipi dsim and sdhci drives. Common board_exynos4.c file is created for all functions common for Exynos4 boards. Origen, Universal, Trats and Trats2 boards are modifed to support device tree.
This patch set is based on patchset:
[PATCH V2 0/8] arm: add runtime envs describing build
http://patchwork.ozlabs.org/patch/313277/
...
http://patchwork.ozlabs.org/patch/313271/
Piotr Wilczek (9):
exynos4:pinmux:fdt: decode peripheral id video:mipidsim:fdt: Add DT support for mipi dsim driver video:exynos_fb:fdt: add additional fdt data drivers:mmc:sdhci: enable support for DT arm:exynos: add common board file for exynos 4 board:origen:fdt: Enable device tree on Origen board:universal:fdt: Enable device tree on Universal trats:fdt: Enable device tree on Trats board:trats2:fdt: Enable device tree on Trats2
arch/arm/cpu/armv7/exynos/pinmux.c | 21 ++ arch/arm/dts/exynos4.dtsi | 139 ++++++++ arch/arm/include/asm/arch-exynos/mipi_dsim.h | 3 + arch/arm/include/asm/arch-exynos/mmc.h | 7 + board/samsung/common/Makefile | 1 + board/samsung/common/board_exynos4.c | 83 +++++ board/samsung/dts/exynos4210-origen.dts | 45 +++ board/samsung/dts/exynos4210-trats.dts | 120 +++++++ board/samsung/dts/exynos4210-universal_c210.dts | 83 +++++ board/samsung/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++++ board/samsung/origen/origen.c | 86 +---- board/samsung/trats/trats.c | 176 +-------- board/samsung/trats2/trats2.c | 216 +---------- board/samsung/universal_c210/universal.c | 178 +++------- drivers/mmc/s5p_sdhci.c | 130 ++++++- drivers/video/exynos_fb.c | 19 + drivers/video/exynos_mipi_dsi.c | 98 +++++ include/configs/exynos4-dt.h | 170 +++++++++ include/configs/origen.h | 103 ++---- include/configs/s5pc210_universal.h | 128 +------ include/configs/trats.h | 177 ++------- include/configs/trats2.h | 199 +---------- include/fdtdec.h | 2 + include/sdhci.h | 5 + lib/fdtdec.c | 2 + 25 files changed, 1511 insertions(+), 1114 deletions(-) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 board/samsung/common/board_exynos4.c create mode 100644 board/samsung/dts/exynos4210-origen.dts create mode 100644 board/samsung/dts/exynos4210-trats.dts create mode 100644 board/samsung/dts/exynos4210-universal_c210.dts create mode 100644 board/samsung/dts/exynos4412-trats2.dts create mode 100644 include/configs/exynos4-dt.h
Signature · 1 line
1.7.9.5
PATCH 1/9 exynos4:pinmux:fdt: decode peripheral id
This patch adds api to decode peripheral id based in interrupt number.
--- arch/arm/cpu/armv7/exynos/pinmux.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm/cpu/armv7/exynos/pinmux.c +21 -0
@@ -741,6 +741,25 @@ int exynos_pinmux_config(int peripheral, int flags) }#ifdef CONFIG_OF_CONTROL + +static int exynos4_pinmux_decode_periph_id (const void *blob,int node) +{ +int err; +u32 cell[3 ]; + + err =fdtdec_get_int_array (blob, node,"interrupts" , cell, +ARRAY_SIZE (cell)); +if (err) +return PERIPH_ID_NONE ; + +/* check for invalid peripheral id */ +if ((PERIPH_ID_SDMMC4 > cell[1 ]) || (cell[1 ] <PERIPH_ID_UART0 )) +return cell[1 ]; + +debug (" invalid peripheral id\n" ); +return PERIPH_ID_NONE ; +} +static int exynos5_pinmux_decode_periph_id (const void *blob,int node) {int err;
@@ -763,6 +782,8 @@ int pinmux_decode_periph_id(const void *blob, int node) {if (cpu_is_exynos5 ())return exynos5_pinmux_decode_periph_id (blob, node); +else if (cpu_is_exynos4 ()) +return exynos4_pinmux_decode_periph_id (blob, node);else return PERIPH_ID_NONE ; }
Signature · 1 line
1.7.9.5
PATCH 1/9 exynos4:pinmux:fdt: decode peripheral id
Hi, Piotr.
Quoted 14 lines · Piotr Wilczek
This patch adds api to decode peripheral id based in interrupt number.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>CC Minkyu Kang <[email protected]>--- arch/arm/cpu/armv7/exynos/pinmux.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm/cpu/armv7/exynos/pinmux.c +0
-0
arch/arm/cpu/armv7/exynos/pinmux.c int exynos_pinmux_config(int peripheral, int flags) · line 744
Quoted 4 lines
arch/arm/cpu/armv7/exynos/pinmux.c +1
-0@@ -741,6 +741,25 @@ int exynos_pinmux_config(int peripheral, int flags) }#ifdef CONFIG_OF_CONTROL +
Remove the white space.
arch/arm/cpu/armv7/exynos/pinmux.c int exynos_pinmux_config(int peripheral, int flags) · line 756
Quoted 12 lines
arch/arm/cpu/armv7/exynos/pinmux.c +12
-0+static int exynos4_pinmux_decode_periph_id (const void *blob,int node) +{ +int err; +u32 cell[3 ]; + + err =fdtdec_get_int_array (blob, node,"interrupts" , cell, +ARRAY_SIZE (cell)); +if (err) +return PERIPH_ID_NONE ; + +/* check for invalid peripheral id */ +if ((PERIPH_ID_SDMMC4 > cell[1 ]) || (cell[1 ] <PERIPH_ID_UART0 ))
What's condition checking? i didn't understand this. PERIPH_ID_SDMMC > cell[1] or PERIPH_ID_UART0 > cell[1] is valid?
Best Regards,
Jaehoon Chung
Quoted 19 lines
arch/arm/cpu/armv7/exynos/pinmux.c +8
-0+return cell[1 ]; + +debug (" invalid peripheral id\n" ); +return PERIPH_ID_NONE ; +} +static int exynos5_pinmux_decode_periph_id (const void *blob,int node) {int err;@@ -763,6 +782,8 @@ int pinmux_decode_periph_id(const void *blob, int node) {if (cpu_is_exynos5 ())return exynos5_pinmux_decode_periph_id (blob, node); +else if (cpu_is_exynos4 ()) +return exynos4_pinmux_decode_periph_id (blob, node);else return PERIPH_ID_NONE ; }
PATCH 1/9 exynos4:pinmux:fdt: decode peripheral id
Hi Jaehoon,
Thanks for review. Please comments below.
Quoted 23 lines
-----Original Message-----
Hi, Piotr.
Quoted 1 line · Piotr Wilczek
This patch adds api to decode peripheral id based in interrupt
number.
Quoted 16 lines
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>CC Minkyu Kang <[email protected]>--- arch/arm/cpu/armv7/exynos/pinmux.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm/cpu/armv7/exynos/pinmux.c +0
-0@@ -741,6 +741,25 @@ int exynos_pinmux_config(int peripheral, int flags) }
Quoted 4 lines
arch/arm/cpu/armv7/exynos/pinmux.c int exynos_pinmux_config(int peripheral, int · line 744
Quoted 2 lines
arch/arm/cpu/armv7/exynos/pinmux.c +1
-0#ifdef CONFIG_OF_CONTROL +Remove the white space.
Ok.
Quoted 17 lines
arch/arm/cpu/armv7/exynos/pinmux.c int exynos_pinmux_config(int peripheral, int flags) · line 756
Quoted 13 lines
arch/arm/cpu/armv7/exynos/pinmux.c +12
-0+static int exynos4_pinmux_decode_periph_id (const void *blob,int +node) { +int err; +u32 cell[3 ]; + + err =fdtdec_get_int_array (blob, node,"interrupts" , cell, +ARRAY_SIZE (cell)); +if (err) +return PERIPH_ID_NONE ; + +/* check for invalid peripheral id */ +if ((PERIPH_ID_SDMMC4 > cell[1 ]) || (cell[1 ] <PERIPH_ID_UART0 ))What's condition checking? i didn't understand this.
PERIPH_ID_SDMMC> cell[1] orPERIPH_ID_UART0> cell[1] is valid?
It supposed to check if cell[1] is within supported periph_id range and should be like this:
If ((cell[1] >= PERIPH_ID_UART0) && (cell[1] < PERIPH_ID_COUNT))
Quoted 14 lines
Best Regards,
Jaehoon ChungQuoted 11 lines
arch/arm/cpu/armv7/exynos/pinmux.c +6
-0+return cell[1 ]; + +debug (" invalid peripheral id\n" ); +return PERIPH_ID_NONE ; +} +static int exynos5_pinmux_decode_periph_id (const void *blob,int node) {int err;@@ -763,6 +782,8 @@ int pinmux_decode_periph_id(const void *blob, int node) {
Quoted 8 lines
arch/arm/cpu/armv7/exynos/pinmux.c int pinmux_decode_periph_id(const void *blob, int node) · line 789
Quoted 8 lines
arch/arm/cpu/armv7/exynos/pinmux.c +2
-0if (cpu_is_exynos5 ())return exynos5_pinmux_decode_periph_id (blob, node); +else if (cpu_is_exynos4 ()) +return exynos4_pinmux_decode_periph_id (blob, node);else return PERIPH_ID_NONE ; }
Best regards,
Piotr Wilczek
PATCH 1/9 exynos4:pinmux:fdt: decode peripheral id
Quoted 50 lines · Piotr Wilczek
Hi Jaehoon,
Thanks for review. Please comments below.
Quoted 23 lines
-----Original Message-----
Hi, Piotr.
Quoted 1 line · Piotr Wilczek
This patch adds api to decode peripheral id based in interrupt
number.
Quoted 16 lines
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>CC Minkyu Kang <[email protected]>--- arch/arm/cpu/armv7/exynos/pinmux.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm/cpu/armv7/exynos/pinmux.c +0
-0@@ -741,6 +741,25 @@ int exynos_pinmux_config(int peripheral, int flags) }Quoted 4 lines
arch/arm/cpu/armv7/exynos/pinmux.c int exynos_pinmux_config(int peripheral, int · line 744
Quoted 2 lines
arch/arm/cpu/armv7/exynos/pinmux.c +1
-0#ifdef CONFIG_OF_CONTROL +Remove the white space.
Ok.
Quoted 17 lines
arch/arm/cpu/armv7/exynos/pinmux.c int exynos_pinmux_config(int peripheral, int flags) · line 756
Quoted 13 lines
arch/arm/cpu/armv7/exynos/pinmux.c +12
-0+static int exynos4_pinmux_decode_periph_id (const void *blob,int +node) { +int err; +u32 cell[3 ]; + + err =fdtdec_get_int_array (blob, node,"interrupts" , cell, +ARRAY_SIZE (cell)); +if (err) +return PERIPH_ID_NONE ; + +/* check for invalid peripheral id */ +if ((PERIPH_ID_SDMMC4 > cell[1 ]) || (cell[1 ] <PERIPH_ID_UART0 ))What's condition checking? i didn't understand this.
PERIPH_ID_SDMMC> cell[1] orPERIPH_ID_UART0> cell[1] is valid?
Quoted 3 lines
It supposed to check if cell[1] is within supported
periph_idrange and should be like this:
If ((cell[1] >=PERIPH_ID_UART0) && (cell[1] <PERIPH_ID_COUNT))
I know that you refer to exynos5 stuffs.
I think this routine unnecessary.
Thanks,
Minkyu Kang.
PATCH 2/9 video:mipidsim:fdt: Add DT support for mipi dsim driver
In reply to Piotr WilczekThis patch enables parsing mipi data from device tree. Non device tree case is still supported.
--- arch/arm/include/asm/arch-exynos/mipi_dsim.h | 3 + drivers/video/exynos_mipi_dsi.c | 98 ++++++++++++++++++++++++++ include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 4 files changed, 103 insertions(+)
arch/arm/include/asm/arch-exynos/mipi_dsim.h +3 -0
@@ -12,6 +12,7 @@#include <linux/list.h> #include <linux/fb.h> +#include <lcd.h> #define PANEL_NAME_SIZE (32)
@@ -368,8 +369,10 @@ int exynos_mipi_dsi_register_lcd_device(struct mipi_dsim_lcd_device *lcd_dev);void exynos_set_dsim_platform_data (struct exynos_platform_mipi_dsim *pd); +void exynos_init_dsim_platform_data (vidinfo_t *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void ); +extern int mipi_power (void );#endif /* _DSIM_H */
drivers/video/exynos_mipi_dsi.c +98 -0
114 lines not on this page · raw message
include/fdtdec.h +1 -0
@@ -78,6 +78,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS5_USB3_PHY ,/* Exynos phy controller for usb3.0 */ COMPAT_SAMSUNG_EXYNOS_TMU ,/* Exynos TMU */ COMPAT_SAMSUNG_EXYNOS_FIMD ,/* Exynos Display controller */ +COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */
lib/fdtdec.c +1 -0
@@ -51,6 +51,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS5_USB3_PHY ,"samsung,exynos5250-usb3-phy" ),COMPAT (SAMSUNG_EXYNOS_TMU ,"samsung,exynos-tmu" ),COMPAT (SAMSUNG_EXYNOS_FIMD ,"samsung,exynos-fimd" ), +COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"),
Signature · 1 line
1.7.9.5
PATCH 2/9 video:mipidsim:fdt: Add DT support for mipi dsim driver
Quoted 142 lines · Piotr Wilczek
This patch enables parsing mipi data from device tree. Non device tree case is still supported.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>--- arch/arm/include/asm/arch-exynos/mipi_dsim.h | 3 + drivers/video/exynos_mipi_dsi.c | 98 ++++++++++++++++++++++++++ include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 4 files changed, 103 insertions(+)arch/arm/include/asm/arch-exynos/mipi_dsim.h +3
-0@@ -12,6 +12,7 @@#include <linux/list.h> #include <linux/fb.h> +#include <lcd.h> #define PANEL_NAME_SIZE (32)@@ -368,8 +369,10 @@ int exynos_mipi_dsi_register_lcd_device(struct mipi_dsim_lcd_device *lcd_dev);void exynos_set_dsim_platform_data (struct exynos_platform_mipi_dsim *pd); +void exynos_init_dsim_platform_data (vidinfo_t *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void ); +extern int mipi_power (void );#endif /* _DSIM_H */ drivers/video/exynos_mipi_dsi.c +83
-0@@ -9,6 +9,8 @@#include <common.h> #include <malloc.h> +#include <fdtdec.h> +#include <libfdt.h> #include <linux/err.h> #include <asm/arch/dsim.h> #include <asm/arch/mipi_dsim.h> @@ -22,7 +24,12 @@#define master_to_driver (a) (a->dsim_lcd_drv)#define master_to_device (a) (a->dsim_lcd_dev) +DECLARE_GLOBAL_DATA_PTR ; +static struct exynos_platform_mipi_dsim *dsim_pd; +static struct mipi_dsim_config dsim_config_dt; +static struct exynos_platform_mipi_dsim dsim_platform_data_dt; +static struct mipi_dsim_lcd_device mipi_lcd_device_dt;struct mipi_dsim_ddi {int bus_id;@@ -238,3 +245,94 @@ void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd) dsim_pd = pd; } + +#ifdef CONFIG_OF_CONTROL +int exynos_dsim_config_parse_dt (const void *blob) +{ +int node; + + node =fdtdec_next_compatible (blob,0 ,COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ); +if (node <=0 ) { +printf ("exynos_mipi_dsi: Can't get device node for mipi dsi\n" ); +return -ENODEV ; + } + + dsim_config_dt.e_interface =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_interface" ,0 ); + + dsim_config_dt.e_virtual_ch =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_virtual_ch" ,0 ); + + dsim_config_dt.e_pixel_format =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_pixel_format" ,0 ); + + dsim_config_dt.e_burst_mode =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_burst_mode" ,0 ); + + dsim_config_dt.e_no_data_lane =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_no_data_lane" ,0 ); + + dsim_config_dt.e_byte_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_byte_clk" ,0 ); + + dsim_config_dt.hfp =fdtdec_get_int (blob, node, +"samsung,dsim-config-hfp" ,0 ); + + dsim_config_dt.p =fdtdec_get_int (blob, node, +"samsung,dsim-config-p" ,0 ); + dsim_config_dt.m =fdtdec_get_int (blob, node, +"samsung,dsim-config-m" ,0 ); + dsim_config_dt.s =fdtdec_get_int (blob, node, +"samsung,dsim-config-s" ,0 ); + + dsim_config_dt.pll_stable_time =fdtdec_get_int (blob, node, +"samsung,dsim-config-pll_stable_time" ,0 ); + + dsim_config_dt.esc_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-esc_clk" ,0 ); + + dsim_config_dt.stop_holding_cnt =fdtdec_get_int (blob, node, +"samsung,dsim-config-stop_holding_cnt" ,0 ); + + dsim_config_dt.bta_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-bta_timeout" ,0 ); + + dsim_config_dt.rx_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-rx_timeout" ,0 ); + + mipi_lcd_device_dt.name =fdtdec_get_config_string (blob, +"samsung,dsim-device-name" ); + + mipi_lcd_device_dt.id =fdtdec_get_int (blob, node, +"samsung,dsim-device-id" ,0 ); + + mipi_lcd_device_dt.bus_id =fdtdec_get_int (blob, node, +"samsung,dsim-device-bus_id" ,0 ); + + mipi_lcd_device_dt.reverse_panel =fdtdec_get_int (blob, node, +"samsung,dsim-device-reverse_panel" ,0 ); + +return 0 ; +} + +void exynos_init_dsim_platform_data (vidinfo_t *vid) +{ +if (exynos_dsim_config_parse_dt (gd->fdt_blob)) +debug ("Can't get proper dsim config.\n" ); + +strcpy (dsim_platform_data_dt.lcd_panel_name, mipi_lcd_device_dt.name);
drivers/video/exynos_mipi_dsi.c void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd) · line 333
Quoted 10 lines
drivers/video/exynos_mipi_dsi.c +10
-0+ dsim_platform_data_dt.dsim_config = &dsim_config_dt; + dsim_platform_data_dt.mipi_power = mipi_power; + dsim_platform_data_dt.phy_enable = set_mipi_phy_ctrl; + dsim_platform_data_dt.lcd_panel_info = (void *)vid; + + mipi_lcd_device_dt.platform_data = (void *)&dsim_platform_data_dt; +exynos_mipi_dsi_register_lcd_device (&mipi_lcd_device_dt); + +#ifdef CONFIG_S6E8AX0 +s6e8ax0_init ();
No.
Please don't init specific panel at here. looks weird.
Quoted 23 lines
drivers/video/exynos_mipi_dsi.c +5
-0+#endif + + dsim_pd = &dsim_platform_data_dt; +} +#endif include/fdtdec.h +1
-0@@ -78,6 +78,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS5_USB3_PHY ,/* Exynos phy controller for usb3.0 */ COMPAT_SAMSUNG_EXYNOS_TMU ,/* Exynos TMU */ COMPAT_SAMSUNG_EXYNOS_FIMD ,/* Exynos Display controller */ +COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */lib/fdtdec.c +0
-0
lib/fdtdec.c static const char * const compat_names[COMPAT_COUNT] = { · line 57
Quoted 7 lines
lib/fdtdec.c +1
-0@@ -51,6 +51,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS5_USB3_PHY ,"samsung,exynos5250-usb3-phy" ),COMPAT (SAMSUNG_EXYNOS_TMU ,"samsung,exynos-tmu" ),COMPAT (SAMSUNG_EXYNOS_FIMD ,"samsung,exynos-fimd" ), +COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"),
Thanks,
Minkyu Kang.
PATCH 2/9 video:mipidsim:fdt: Add DT support for mipi dsim driver
Dear Minkyu Kang,
Quoted 158 lines
-----Original Message-----
Quoted 9 lines · Piotr Wilczek
This patch enables parsing mipi data from device tree. Non device tree case is still supported.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>--- arch/arm/include/asm/arch-exynos/mipi_dsim.h | 3 + drivers/video/exynos_mipi_dsi.c | 98++++++++++++++++++++++++++
arch/arm/include/asm/arch-exynos/mipi_dsim.h int exynos_mipi_dsi_register_lcd_device(struct
Quoted 18 lines
include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 4 files changed, 103 insertions(+)arch/arm/include/asm/arch-exynos/mipi_dsim.h +1
-0@@ -12,6 +12,7 @@#include <linux/list.h> #include <linux/fb.h> +#include <lcd.h> #define PANEL_NAME_SIZE (32)@@ -368,8 +369,10 @@ int exynos_mipi_dsi_register_lcd_device(struct
mipi_dsim_lcd_deviceQuoted 38 lines
arch/arm/include/asm/arch-exynos/mipi_dsim.h +2
-0*lcd_dev);void exynos_set_dsim_platform_data (struct exynos_platform_mipi_dsim *pd); +void exynos_init_dsim_platform_data (vidinfo_t *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void ); +extern int mipi_power (void );#endif /*
_DSIM_H*/(quoted diff) +0
-0
b/drivers/video/exynos_mipi_dsi.cindex 8bb8fea..ab15ad6 100644drivers/video/exynos_mipi_dsi.c +7
-0@@ -9,6 +9,8 @@#include <common.h> #include <malloc.h> +#include <fdtdec.h> +#include <libfdt.h> #include <linux/err.h> #include <asm/arch/dsim.h> #include <asm/arch/mipi_dsim.h> @@ -22,7 +24,12 @@#define master_to_driver (a) (a->dsim_lcd_drv)#define master_to_device (a) (a->dsim_lcd_dev) +DECLARE_GLOBAL_DATA_PTR ; +static struct exynos_platform_mipi_dsim *dsim_pd; +static struct mipi_dsim_config dsim_config_dt;static struct +exynos_platform_mipi_dsim dsim_platform_data_dt;static struct +mipi_dsim_lcd_device mipi_lcd_device_dt;struct mipi_dsim_ddi {int bus_id;drivers/video/exynos_mipi_dsi.c void exynos_set_dsim_platform_data(struct
Quoted 10 lines
drivers/video/exynos_mipi_dsi.c +6
-0@@ -238,3 +245,94 @@ void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd) dsim_pd = pd; } + +#ifdef CONFIG_OF_CONTROL +int exynos_dsim_config_parse_dt (const void *blob) { +int node; + + node = fdtdec_next_compatible(blob, 0,
COMPAT_SAMSUNG_EXYNOS_MIPI_DSI);drivers/video/exynos_mipi_dsi.c
Quoted 2 lines
drivers/video/exynos_mipi_dsi.c +2
-0+if (node <=0 ) { + printf("exynos_mipi_dsi: Can't get device node for mipidsi\n");
Quoted 56 lines
drivers/video/exynos_mipi_dsi.c +56
-0+return -ENODEV ; + } + + dsim_config_dt.e_interface =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_interface" ,0 ); + + dsim_config_dt.e_virtual_ch =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_virtual_ch" ,0 ); + + dsim_config_dt.e_pixel_format =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_pixel_format" ,0 ); + + dsim_config_dt.e_burst_mode =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_burst_mode" ,0 ); + + dsim_config_dt.e_no_data_lane =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_no_data_lane" ,0 ); + + dsim_config_dt.e_byte_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_byte_clk" ,0 ); + + dsim_config_dt.hfp =fdtdec_get_int (blob, node, +"samsung,dsim-config-hfp" ,0 ); + + dsim_config_dt.p =fdtdec_get_int (blob, node, +"samsung,dsim-config-p" ,0 ); + dsim_config_dt.m =fdtdec_get_int (blob, node, +"samsung,dsim-config-m" ,0 ); + dsim_config_dt.s =fdtdec_get_int (blob, node, +"samsung,dsim-config-s" ,0 ); + + dsim_config_dt.pll_stable_time =fdtdec_get_int (blob, node, +"samsung,dsim-config-pll_stable_time" ,0 ); + + dsim_config_dt.esc_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-esc_clk" ,0 ); + + dsim_config_dt.stop_holding_cnt =fdtdec_get_int (blob, node, +"samsung,dsim-config-stop_holding_cnt" ,0 ); + + dsim_config_dt.bta_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-bta_timeout" ,0 ); + + dsim_config_dt.rx_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-rx_timeout" ,0 ); + + mipi_lcd_device_dt.name =fdtdec_get_config_string (blob, +"samsung,dsim-device-name" ); + + mipi_lcd_device_dt.id =fdtdec_get_int (blob, node, +"samsung,dsim-device-id" ,0 ); + + mipi_lcd_device_dt.bus_id =fdtdec_get_int (blob, node, +"samsung,dsim-device-bus_id" ,0 ); + + mipi_lcd_device_dt.reverse_panel = fdtdec_get_int(blob, node,drivers/video/exynos_mipi_dsi.c void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd)
Quoted 10 lines
drivers/video/exynos_mipi_dsi.c +10
-0+ "samsung,dsim-device-reverse_panel", 0); + +return 0 ; +} + +void exynos_init_dsim_platform_data (vidinfo_t *vid) { +if (exynos_dsim_config_parse_dt (gd->fdt_blob)) +debug ("Can't get proper dsim config.\n" ); + + strcpy(dsim_platform_data_dt.lcd_panel_name,mipi_lcd_device_dt.name);
drivers/video/exynos_mipi_dsi.c void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd)
Quoted 6 lines
drivers/video/exynos_mipi_dsi.c +6
-0+ dsim_platform_data_dt.dsim_config = &dsim_config_dt; + dsim_platform_data_dt.mipi_power = mipi_power; + dsim_platform_data_dt.phy_enable = set_mipi_phy_ctrl; + dsim_platform_data_dt.lcd_panel_info = (void *)vid; + + mipi_lcd_device_dt.platform_data = (void*)&dsim_platform_data_dt;
Quoted 8 lines
drivers/video/exynos_mipi_dsi.c void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd) · line 333
Quoted 4 lines
drivers/video/exynos_mipi_dsi.c +4
-0+exynos_mipi_dsi_register_lcd_device (&mipi_lcd_device_dt); + +#ifdef CONFIG_S6E8AX0 +s6e8ax0_init ();No.
Please don't init specific panel at here. looks weird.
Ok.
Quoted 24 lines
include/fdtdec.h enum fdt_compat_id { · line 78
Quoted 11 lines
drivers/video/exynos_mipi_dsi.c +5
-0+#endif + + dsim_pd = &dsim_platform_data_dt; +} +#endif include/fdtdec.h index renamed from include/fdtdec.h +0
-0433d6a7..f12b4aa 100644
include/fdtdec.h +0
-0@@ -78,6 +78,7 @@ enum fdt_compat_id { COMPAT_SAMSUNG_EXYNOS5_USB3_PHY,/* Exynos phy controller forusb3.0 */
lib/fdtdec.c index 207314f..46e67ff
Quoted 7 lines
include/fdtdec.h +1
-0COMPAT_SAMSUNG_EXYNOS_TMU ,/* Exynos TMU */ COMPAT_SAMSUNG_EXYNOS_FIMD ,/* Exynos Display controller */ +COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */lib/fdtdec.c index 207314f..46e67ff renamed from lib/fdtdec.c +0
-0100644
lib/fdtdec.c static const char * const
Quoted 3 lines
lib/fdtdec.c +0
-0@@ -51,6 +51,7 @@ static const char * constcompat_names[COMPAT_COUNT] = {
Quoted 11 lines
lib/fdtdec.c static const char * const compat_names[COMPAT_COUNT] = { · line 57
Quoted 8 lines
lib/fdtdec.c +1
-0COMPAT (SAMSUNG_EXYNOS5_USB3_PHY ,"samsung,exynos5250-usb3-phy" ),COMPAT (SAMSUNG_EXYNOS_TMU ,"samsung,exynos-tmu" ),COMPAT (SAMSUNG_EXYNOS_FIMD ,"samsung,exynos-fimd" ), +COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"),Thanks,
Minkyu Kang.
Best regards,
Piotr Wilczek
PATCH 3/9 video:exynos_fb:fdt: add additional fdt data
In reply to Piotr WilczekThis patch adds additional data parsing from DTB.
--- drivers/video/exynos_fb.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/video/exynos_fb.c +19 -0
@@ -20,6 +20,7 @@#include <asm/arch/dp_info.h> #include <asm/arch/system.h> #include <asm-generic/errno.h> +#include <libtizen.h> #include "exynos_fb.h"
@@ -269,6 +270,21 @@ int exynos_fimd_parse_dt(const void *blob) panel_info.dual_lcd_enabled =fdtdec_get_int (blob, node,"samsung,dual-lcd-enabled" ,0 ); + panel_info.logo_on =fdtdec_get_int (blob, node, +"samsung,logo-on" ,0 ); + + panel_info.resolution =fdtdec_get_int (blob, node, +"samsung,resolution" ,0 ); + + panel_info.rgb_mode =fdtdec_get_int (blob, node, +"samsung,rgb-mode" ,0 ); + + panel_info.power_on_delay =fdtdec_get_int (blob, node, +"samsung,power-on-delay" ,0 ); + +#ifdef CONFIG_TIZEN +get_tizen_logo_info (&panel_info); +#endif return 0; }#endif
@@ -281,6 +297,9 @@ void lcd_ctrl_init(void *lcdbase)#ifdef CONFIG_OF_CONTROL if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info); +#endif #else /* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);
Signature · 1 line
1.7.9.5
PATCH 3/9 video:exynos_fb:fdt: add additional fdt data
Quoted 22 lines · Piotr Wilczek
This patch adds additional data parsing from DTB.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>--- drivers/video/exynos_fb.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/video/exynos_fb.c +1
-0@@ -20,6 +20,7 @@#include <asm/arch/dp_info.h> #include <asm/arch/system.h> #include <asm-generic/errno.h> +#include <libtizen.h> #include "exynos_fb.h"
drivers/video/exynos_fb.c int exynos_fimd_parse_dt(const void *blob) · line 274
Quoted 5 lines
drivers/video/exynos_fb.c +2
-0@@ -269,6 +270,21 @@ int exynos_fimd_parse_dt(const void *blob) panel_info.dual_lcd_enabled =fdtdec_get_int (blob, node,"samsung,dual-lcd-enabled" ,0 ); + panel_info.logo_on =fdtdec_get_int (blob, node, +"samsung,logo-on" ,0 );
duplicated.
drivers/video/exynos_fb.c int exynos_fimd_parse_dt(const void *blob) · line 286
Quoted 12 lines
drivers/video/exynos_fb.c +12
-0+ + panel_info.resolution =fdtdec_get_int (blob, node, +"samsung,resolution" ,0 ); + + panel_info.rgb_mode =fdtdec_get_int (blob, node, +"samsung,rgb-mode" ,0 ); + + panel_info.power_on_delay =fdtdec_get_int (blob, node, +"samsung,power-on-delay" ,0 ); + +#ifdef CONFIG_TIZEN +get_tizen_logo_info (&panel_info);
It looks strange.
Why you load the logo at frame buffer driver?
Quoted 6 lines
drivers/video/exynos_fb.c +1
-0+#endif return 0; }#endif
drivers/video/exynos_fb.c void lcd_ctrl_init(void *lcdbase) · line 305
Quoted 9 lines
drivers/video/exynos_fb.c +3
-0@@ -281,6 +297,9 @@ void lcd_ctrl_init(void *lcdbase)#ifdef CONFIG_OF_CONTROL if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info); +#endif #else /* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);
Thanks,
Minkyu Kang.
PATCH 3/9 video:exynos_fb:fdt: add additional fdt data
Dear Minkyu Kang,
Quoted 20 lines · Piotr Wilczek
Quoted 19 lines
This patch adds additional data parsing from DTB.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>--- drivers/video/exynos_fb.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/video/exynos_fb.c +1
-0@@ -20,6 +20,7 @@#include <asm/arch/dp_info.h> #include <asm/arch/system.h> #include <asm-generic/errno.h> +#include <libtizen.h>
Quoted 5 lines
drivers/video/exynos_fb.c int exynos_fimd_parse_dt(const void *blob) · line 271
Quoted 5 lines
drivers/video/exynos_fb.c +0
-0#include "exynos_fb.h" @@ -269,6 +270,21 @@ int exynos_fimd_parse_dt(const void *blob) panel_info.dual_lcd_enabled = fdtdec_get_int(blob, node, "samsung,dual-lcd-enabled",
0);
Quoted 5 lines
drivers/video/exynos_fb.c int exynos_fimd_parse_dt(const void *blob) · line 274
Quoted 3 lines
drivers/video/exynos_fb.c +2
-0+ panel_info.logo_on =fdtdec_get_int (blob, node, +"samsung,logo-on" ,0 );duplicated.
Ok, will remove it.
Quoted 10 lines
drivers/video/exynos_fb.c int exynos_fimd_parse_dt(const void *blob)
Quoted 10 lines
drivers/video/exynos_fb.c +9
-0+ + panel_info.resolution =fdtdec_get_int (blob, node, +"samsung,resolution" ,0 ); + + panel_info.rgb_mode =fdtdec_get_int (blob, node, +"samsung,rgb-mode" ,0 ); + + panel_info.power_on_delay = fdtdec_get_int(blob, node, + "samsung,power-on-delay",
0);
Quoted 6 lines
drivers/video/exynos_fb.c int exynos_fimd_parse_dt(const void *blob) · line 286
Quoted 3 lines
drivers/video/exynos_fb.c +3
-0+ +#ifdef CONFIG_TIZEN +get_tizen_logo_info (&panel_info);It looks strange.
Why you load the logo at frame buffer driver?
Ok, I will move it.
Quoted 11 lines
Quoted 11 lines
drivers/video/exynos_fb.c +1
-0+#endif return 0; }#endif @@ -281,6 +297,9 @@ void lcd_ctrl_init(void *lcdbase) #ifdef
CONFIG_OF_CONTROLdrivers/video/exynos_fb.c +2
-0if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info);
Quoted 8 lines
drivers/video/exynos_fb.c void lcd_ctrl_init(void *lcdbase) · line 305
Quoted 5 lines
drivers/video/exynos_fb.c +1
-0+#endif #else /* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);Thanks,
Minkyu Kang.
Thanks for review.
Piotr Wilczek
PATCH 4/9 drivers:mmc:sdhci: enable support for DT
In reply to Piotr WilczekThis patch enables support for device tree for sdhci driver. Non DT case is still supported.
--- arch/arm/include/asm/arch-exynos/mmc.h | 7 ++ drivers/mmc/s5p_sdhci.c | 130 +++++++++++++++++++++++++++++++- include/fdtdec.h | 1 + include/sdhci.h | 5 ++ lib/fdtdec.c | 1 + 5 files changed, 143 insertions(+), 1 deletion(-)
arch/arm/include/asm/arch-exynos/mmc.h +7 -0
@@ -53,6 +53,8 @@#define SDHCI_CTRL4_DRIVE_MASK (_x) ((_x) << 16)#define SDHCI_CTRL4_DRIVE_SHIFT (16) +#define SDHCI_MAX_HOSTS 4 +int s5p_sdhci_init (u32 regbase,int index,int bus_width);static inline int s5p_mmc_init (int index,int bus_width)
@@ -62,4 +64,9 @@ static inline int s5p_mmc_init(int index, int bus_width) return s5p_sdhci_init(base, index, bus_width); } + +#ifdef CONFIG_OF_CONTROL +int exynos_mmc_init (const void *blob); +#endif +#endif
drivers/mmc/s5p_sdhci.c +129 -1
141 lines not on this page · raw message
include/fdtdec.h +1 -0
@@ -81,6 +81,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ +COMPAT_SAMSUNG_EXYNOS_MMC ,/* Exynos MMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL ,/* Exynos UART */ COMPAT_MAXIM_MAX77686_PMIC ,/* MAX77686 PMIC */ COMPAT_GENERIC_SPI_FLASH, /* Generic SPI Flash chip */
include/sdhci.h +5 -0
@@ -12,6 +12,7 @@#include <asm/io.h> #include <mmc.h> +#include <fdtdec.h> /* * Controller registers
@@ -244,6 +245,10 @@ struct sdhci_host {const struct sdhci_ops *ops;int index; +int bus_width; +struct fdt_gpio_state pwr_gpio;/* Change Detect GPIO */ +struct fdt_gpio_state cd_gpio;/* Change Detect GPIO */ +void (*set_control_reg)(struct sdhci_host *host);void (*set_clock)(int dev_index,unsigned int div);uint voltages;
lib/fdtdec.c +1 -0
@@ -54,6 +54,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), +COMPAT (SAMSUNG_EXYNOS_MMC ,"samsung,exynos-mmc" ),COMPAT (SAMSUNG_EXYNOS_SERIAL ,"samsung,exynos4210-uart" ),COMPAT (MAXIM_MAX77686_PMIC ,"maxim,max77686_pmic" ), COMPAT(GENERIC_SPI_FLASH, "spi-flash"),
Signature · 1 line
1.7.9.5
PATCH 4/9 drivers:mmc:sdhci: enable support for DT
Hi, Piotr.
Quoted 66 lines · Piotr Wilczek
This patch enables support for device tree for sdhci driver. Non DT case is still supported.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>--- arch/arm/include/asm/arch-exynos/mmc.h | 7 ++ drivers/mmc/s5p_sdhci.c | 130 +++++++++++++++++++++++++++++++- include/fdtdec.h | 1 + include/sdhci.h | 5 ++ lib/fdtdec.c | 1 + 5 files changed, 143 insertions(+), 1 deletion(-)arch/arm/include/asm/arch-exynos/mmc.h +7
-0@@ -53,6 +53,8 @@#define SDHCI_CTRL4_DRIVE_MASK (_x) ((_x) << 16)#define SDHCI_CTRL4_DRIVE_SHIFT (16) +#define SDHCI_MAX_HOSTS 4 +int s5p_sdhci_init (u32 regbase,int index,int bus_width);static inline int s5p_mmc_init (int index,int bus_width)@@ -62,4 +64,9 @@ static inline int s5p_mmc_init(int index, int bus_width) return s5p_sdhci_init(base, index, bus_width); } + +#ifdef CONFIG_OF_CONTROL +int exynos_mmc_init (const void *blob); +#endif +#endif drivers/mmc/s5p_sdhci.c +11
-1@@ -8,9 +8,15 @@#include <common.h> #include <malloc.h> #include <sdhci.h> +#include <fdtdec.h> +#include <libfdt.h> +#include <asm/gpio.h> #include <asm/arch/mmc.h> #include <asm/arch/clk.h> - +#include <errno.h> +#ifdef CONFIG_OF_CONTROL +#include <asm/arch/pinmux.h> +#endif static char *S5P_NAME ="SAMSUNG SDHCI" ;static void s5p_sdhci_set_control_reg (struct sdhci_host *host) {@@ -86,3 +92,125 @@ int s5p_sdhci_init(u32 regbase, int index, int bus_width)return add_sdhci (host,52000000 ,400000 ); } + +#ifdef CONFIG_OF_CONTROL +struct sdhci_host sdhci_host[SDHCI_MAX_HOSTS ]; +
drivers/mmc/s5p_sdhci.c int s5p_sdhci_init(u32 regbase, int index, int bus_width) · line 108
Quoted 10 lines
drivers/mmc/s5p_sdhci.c +10
-0+static int do_sdhci_init (struct sdhci_host *host) +{ +int dev_id, flag; +int err =0 ; + + flag = host->bus_width ==8 ?PINMUX_FLAG_8BIT_MODE :PINMUX_FLAG_NONE ; + dev_id = host->index +PERIPH_ID_SDMMC0 ; + +if (fdt_gpio_isvalid (&host->pwr_gpio)) { +gpio_direction_output (host->pwr_gpio.gpio,1 );
what's pwr_gpio? Is it used for the both(eMMC and SD card)?
Quoted 33 lines
drivers/mmc/s5p_sdhci.c +33
-0+ err =exynos_pinmux_config (dev_id, flag); +if (err) { +debug ("MMC not configured\n" ); +return err; + } + } + +if (fdt_gpio_isvalid (&host->cd_gpio)) { +gpio_direction_output (host->cd_gpio.gpio,0xf ); +if (gpio_get_value (host->cd_gpio.gpio)) +return -ENODEV ; + + err =exynos_pinmux_config (dev_id, flag); +if (err) { +printf ("external SD not configured\n" ); +return err; + } + } + + host->name =S5P_NAME ; + + host->quirks =SDHCI_QUIRK_NO_HISPD_BIT |SDHCI_QUIRK_BROKEN_VOLTAGE | +SDHCI_QUIRK_BROKEN_R1B |SDHCI_QUIRK_32BIT_DMA_ADDR | +SDHCI_QUIRK_WAIT_SEND_CMD ; + host->voltages =MMC_VDD_32_33 |MMC_VDD_33_34 |MMC_VDD_165_195 ; + host->version =sdhci_readw (host,SDHCI_HOST_VERSION ); + + host->set_control_reg = &s5p_sdhci_set_control_reg; + host->set_clock = set_mmc_clk; + + host->host_caps =MMC_MODE_HC ; + +return add_sdhci (host,52000000 ,400000 );
drivers/mmc/s5p_sdhci.c int s5p_sdhci_init(u32 regbase, int index, int bus_width) · line 151
Quoted 10 lines
drivers/mmc/s5p_sdhci.c +10
-0+} + +static int sdhci_get_config (const void *blob,int node,struct sdhci_host *host) +{ +int bus_width, dev_id; +unsigned int base; + +/* Get device id */ + dev_id =pinmux_decode_periph_id (blob, node); +if (dev_id <PERIPH_ID_SDMMC0 ) {
Didn't need to check other boundary?
Quoted 7 lines
drivers/mmc/s5p_sdhci.c +7
-0+debug ("MMC: Can't get device id\n" ); +return -1 ; + } + host->index = dev_id -PERIPH_ID_SDMMC0 ; + +/* Get bus width */ + bus_width =fdtdec_get_int (blob, node,"samsung,bus-width" ,0 );
drivers/mmc/s5p_sdhci.c int s5p_sdhci_init(u32 regbase, int index, int bus_width) · line 168
Quoted 10 lines
drivers/mmc/s5p_sdhci.c +10
-0+if (bus_width <=0 ) { +debug ("MMC: Can't get bus-width\n" ); +return -1 ; + } + host->bus_width = bus_width; + +/* Get the base address from the device node */ + base =fdtdec_get_addr (blob, node,"reg" ); +if (!base) { +debug ("DWMMC: Can't get base address\n" );
DWMMC?
Quoted 73 lines
drivers/mmc/s5p_sdhci.c +48
-0+ return -1; + } + host->ioaddr = (void *)base; + +fdtdec_decode_gpio (blob, node,"pwr-gpios" , &host->pwr_gpio); +fdtdec_decode_gpio (blob, node,"cd-gpios" , &host->cd_gpio); + +return 0 ; +} + +static int process_nodes (const void *blob,int node_list[],int count) +{ +struct sdhci_host *host; +int i, node; + +debug ("%s: count = %d\n" , __func__, count); + +/* build sdhci_host[] for each controller */ +for (i =0 ; i < count; i++) { + node = node_list[i]; +if (node <=0 ) +continue ; + + host = &sdhci_host[i]; + +if (sdhci_get_config (blob, node, host)) { +printf ("%s: failed to decode dev %d\n" , __func__, i); +return -1 ; + } +do_sdhci_init (host); + } +return 0 ; +} + +int exynos_mmc_init (const void *blob) +{ +int count; +int node_list[SDHCI_MAX_HOSTS ]; + + count =fdtdec_find_aliases_for_id (blob,"mmc" , +COMPAT_SAMSUNG_EXYNOS_MMC , node_list, +SDHCI_MAX_HOSTS ); + +process_nodes (blob, node_list, count); + +return 1 ; +} +#endif include/fdtdec.h +1
-0@@ -81,6 +81,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ +COMPAT_SAMSUNG_EXYNOS_MMC ,/* Exynos MMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL ,/* Exynos UART */ COMPAT_MAXIM_MAX77686_PMIC ,/* MAX77686 PMIC */ COMPAT_GENERIC_SPI_FLASH, /* Generic SPI Flash chip */include/sdhci.h +1
-0@@ -12,6 +12,7 @@#include <asm/io.h> #include <mmc.h> +#include <fdtdec.h> /* * Controller registers
include/sdhci.h struct sdhci_host { · line 249
Quoted 5 lines
include/sdhci.h +2
-0@@ -244,6 +245,10 @@ struct sdhci_host {const struct sdhci_ops *ops;int index; +int bus_width; +struct fdt_gpio_state pwr_gpio;/* Change Detect GPIO */
pwr_gpio is Change Detect GPIO? I think that Comment is wrong.
include/sdhci.h struct sdhci_host { · line 250
Quoted 1 line
include/sdhci.h +1
-0+struct fdt_gpio_state cd_gpio;/* Change Detect GPIO */
Maybe Card detect GPIO is right.
lib/fdtdec.c static const char * const compat_names[COMPAT_COUNT] = { · line 57
Quoted 13 lines
include/sdhci.h +1
-0+void (*set_control_reg)(struct sdhci_host *host);void (*set_clock)(int dev_index,unsigned int div);uint voltages;lib/fdtdec.c +1
-0@@ -54,6 +54,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), + COMPAT(SAMSUNG_EXYNOS_MMC, "samsung,exynos-mmc"),
how about using "exynos4-mmc" instead of "exynos-mmc"?
Best Regards,
Jaehoon Chung
Quoted 4 lines
lib/fdtdec.c +0
-0COMPAT (SAMSUNG_EXYNOS_SERIAL ,"samsung,exynos4210-uart" ),COMPAT (MAXIM_MAX77686_PMIC ,"maxim,max77686_pmic" ), COMPAT(GENERIC_SPI_FLASH, "spi-flash"),
PATCH 4/9 drivers:mmc:sdhci: enable support for DT
Hi Jaehoon,
Quoted 74 lines
Hi, Piotr.
Quoted 9 lines · Piotr Wilczek
This patch enables support for device tree for sdhci driver. Non DT case is still supported.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>--- arch/arm/include/asm/arch-exynos/mmc.h | 7 ++ drivers/mmc/s5p_sdhci.c | 130+++++++++++++++++++++++++++++++-
Quoted 46 lines
include/fdtdec.h | 1 + include/sdhci.h | 5 ++ lib/fdtdec.c | 1 + 5 files changed, 143 insertions(+), 1 deletion(-)arch/arm/include/asm/arch-exynos/mmc.h +7
-0@@ -53,6 +53,8 @@#define SDHCI_CTRL4_DRIVE_MASK (_x) ((_x) << 16)#define SDHCI_CTRL4_DRIVE_SHIFT (16) +#define SDHCI_MAX_HOSTS 4 +int s5p_sdhci_init (u32 regbase,int index,int bus_width); static inline int s5p_mmc_init(int index, int bus_width) @@ -62,4 +64,9 @@ static inline int s5p_mmc_init(int index, int bus_width) return s5p_sdhci_init(base, index, bus_width); } + +#ifdef CONFIG_OF_CONTROL +int exynos_mmc_init (const void *blob);#endif +#endif drivers/mmc/s5p_sdhci.c index renamed from drivers/mmc/s5p_sdhci.c +0
-040ff873..7456ee0 100644
drivers/mmc/s5p_sdhci.c +7
-1@@ -8,9 +8,15 @@#include <common.h> #include <malloc.h> #include <sdhci.h> +#include <fdtdec.h> +#include <libfdt.h> +#include <asm/gpio.h> #include <asm/arch/mmc.h> #include <asm/arch/clk.h> - +#include <errno.h> +#ifdef CONFIG_OF_CONTROL +#include <asm/arch/pinmux.h> +#endif static char *S5P_NAME = "SAMSUNG SDHCI"; static voidQuoted 1 line
s5p_sdhci_set_control_reg(struct sdhci_host *host){ @@ -86,3+92,125
drivers/mmc/s5p_sdhci.c int s5p_sdhci_init(u32 regbase, int index, int bus_width)
Quoted 12 lines
@@ int
s5p_sdhci_init(u32 regbase, int index, int bus_width)drivers/mmc/s5p_sdhci.c +9
-0return add_sdhci (host,52000000 ,400000 ); } + +#ifdef CONFIG_OF_CONTROL +struct sdhci_host sdhci_host[SDHCI_MAX_HOSTS ]; + +static int do_sdhci_init (struct sdhci_host *host) { +int dev_id, flag; +int err =0 ; + + flag = host->bus_width == 8 ? PINMUX_FLAG_8BIT_MODE :
PINMUX_FLAG_NONE;
Quoted 6 lines
drivers/mmc/s5p_sdhci.c int s5p_sdhci_init(u32 regbase, int index, int bus_width) · line 108
Quoted 4 lines
drivers/mmc/s5p_sdhci.c +4
-0+ dev_id = host->index +PERIPH_ID_SDMMC0 ; + +if (fdt_gpio_isvalid (&host->pwr_gpio)) { +gpio_direction_output (host->pwr_gpio.gpio,1 );what's
pwr_gpio? Is it used for the both(eMMC and SD card)?
pwr_gpio is used only for eMMC.cd_gpio is used for SD Card.
Quoted 38 lines
Quoted 13 lines
drivers/mmc/s5p_sdhci.c +12
-0+ err =exynos_pinmux_config (dev_id, flag); +if (err) { +debug ("MMC not configured\n" ); +return err; + } + } + +if (fdt_gpio_isvalid (&host->cd_gpio)) { +gpio_direction_output (host->cd_gpio.gpio,0xf ); +if (gpio_get_value (host->cd_gpio.gpio)) +return -ENODEV ; +drivers/mmc/s5p_sdhci.c int s5p_sdhci_init(u32 regbase, int index, int bus_width)
Quoted 10 lines
drivers/mmc/s5p_sdhci.c +10
-0+ err =exynos_pinmux_config (dev_id, flag); +if (err) { +printf ("external SD not configured\n" ); +return err; + } + } + + host->name =S5P_NAME ; + + host->quirks = SDHCI_QUIRK_NO_HISPD_BIT |
SDHCI_QUIRK_BROKEN_VOLTAGE|Quoted 14 lines
drivers/mmc/s5p_sdhci.c +14
-0+SDHCI_QUIRK_BROKEN_R1B |SDHCI_QUIRK_32BIT_DMA_ADDR | +SDHCI_QUIRK_WAIT_SEND_CMD ; + host->voltages =MMC_VDD_32_33 |MMC_VDD_33_34 |MMC_VDD_165_195 ; + host->version =sdhci_readw (host,SDHCI_HOST_VERSION ); + + host->set_control_reg = &s5p_sdhci_set_control_reg; + host->set_clock = set_mmc_clk; + + host->host_caps =MMC_MODE_HC ; + +return add_sdhci (host,52000000 ,400000 ); } + +static int sdhci_get_config (const void *blob,int node,struct +sdhci_host *host) {
Quoted 8 lines
drivers/mmc/s5p_sdhci.c int s5p_sdhci_init(u32 regbase, int index, int bus_width) · line 151
Quoted 6 lines
drivers/mmc/s5p_sdhci.c +6
-0+int bus_width, dev_id; +unsigned int base; + +/* Get device id */ + dev_id =pinmux_decode_periph_id (blob, node); +if (dev_id <PERIPH_ID_SDMMC0 ) {Didn't need to check other boundary?
Yes, I should check for the PERIPH_ID_SDMMC3
Quoted 12 lines
Quoted 12 lines
drivers/mmc/s5p_sdhci.c +11
-0+debug ("MMC: Can't get device id\n" ); +return -1 ; + } + host->index = dev_id -PERIPH_ID_SDMMC0 ; + +/* Get bus width */ + bus_width =fdtdec_get_int (blob, node,"samsung,bus-width" ,0 ); +if (bus_width <=0 ) { +debug ("MMC: Can't get bus-width\n" ); +return -1 ; + }
Quoted 8 lines
drivers/mmc/s5p_sdhci.c int s5p_sdhci_init(u32 regbase, int index, int bus_width) · line 168
Quoted 6 lines
drivers/mmc/s5p_sdhci.c +6
-0+ host->bus_width = bus_width; + +/* Get the base address from the device node */ + base =fdtdec_get_addr (blob, node,"reg" ); +if (!base) { +debug ("DWMMC: Can't get base address\n" );DWMMC?
MMC
Quoted 77 lines
Quoted 18 lines
drivers/mmc/s5p_sdhci.c +17
-0+return -1 ; + } + host->ioaddr = (void *)base; + +fdtdec_decode_gpio (blob, node,"pwr-gpios" , &host->pwr_gpio); +fdtdec_decode_gpio (blob, node,"cd-gpios" , &host->cd_gpio); + +return 0 ; +} + +static int process_nodes (const void *blob,int node_list[],int +count) { +struct sdhci_host *host; +int i, node; + +debug ("%s: count = %d\n" , __func__, count); +drivers/mmc/s5p_sdhci.c int s5p_sdhci_init(u32 regbase, int index, int bus_width)
Quoted 10 lines
drivers/mmc/s5p_sdhci.c +10
-0+/* build sdhci_host[] for each controller */ +for (i =0 ; i < count; i++) { + node = node_list[i]; +if (node <=0 ) +continue ; + + host = &sdhci_host[i]; + +if (sdhci_get_config (blob, node, host)) { + printf("%s: failed to decode dev %d\n", __func__,i);
Quoted 48 lines
drivers/mmc/s5p_sdhci.c +20
-0+ return -1; + } +do_sdhci_init (host); + } +return 0 ; +} + +int exynos_mmc_init (const void *blob) { +int count; +int node_list[SDHCI_MAX_HOSTS ]; + + count =fdtdec_find_aliases_for_id (blob,"mmc" , +COMPAT_SAMSUNG_EXYNOS_MMC , node_list, +SDHCI_MAX_HOSTS ); + +process_nodes (blob, node_list, count); + +return 1 ; +} +#endif include/fdtdec.h index renamed from include/fdtdec.h +0
-0f12b4aa..d637f88 100644
include/fdtdec.h +1
-0@@ -81,6 +81,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ +COMPAT_SAMSUNG_EXYNOS_MMC ,/* Exynos MMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL ,/* Exynos UART */ COMPAT_MAXIM_MAX77686_PMIC ,/* MAX77686 PMIC */ COMPAT_GENERIC_SPI_FLASH, /* Generic SPI Flash chip */include/sdhci.h index 74d06ae..0cba703 renamed from include/sdhci.h +0
-0100644
include/sdhci.h +1
-0@@ -12,6 +12,7 @@#include <asm/io.h> #include <mmc.h> +#include <fdtdec.h> /* * Controller registers @@ -244,6 +245,10 @@ struct sdhci_host {const struct sdhci_ops *ops;int index;
Quoted 4 lines
include/sdhci.h struct sdhci_host { · line 249
Quoted 2 lines
include/sdhci.h +2
-0+int bus_width; +struct fdt_gpio_state pwr_gpio;/* Change Detect GPIO */
pwr_gpiois Change Detect GPIO? I think that Comment is wrong.
Yes, the comment is wrong.
Quoted 4 lines
include/sdhci.h struct sdhci_host { · line 250
Quoted 2 lines
include/sdhci.h +1
-0+struct fdt_gpio_state cd_gpio;/* Change Detect GPIO */ Maybe Card detect GPIO is right.
Yes
Quoted 10 lines
lib/fdtdec.c index 46e67ff..a88f648
Quoted 5 lines
include/sdhci.h +1
-0+void (*set_control_reg)(struct sdhci_host *host);void (*set_clock)(int dev_index,unsigned int div);uint voltages;lib/fdtdec.c index 46e67ff..a88f648 renamed from lib/fdtdec.c +0
-0100644
lib/fdtdec.c static const char * const
Quoted 3 lines
lib/fdtdec.c +0
-0@@ -54,6 +54,7 @@ static const char * constcompat_names[COMPAT_COUNT] = {
Quoted 6 lines
lib/fdtdec.c static const char * const compat_names[COMPAT_COUNT] = { · line 57
Quoted 4 lines
lib/fdtdec.c +1
-0COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), + COMPAT(SAMSUNG_EXYNOS_MMC, "samsung,exynos-mmc"),how about using "exynos4-mmc" instead of "exynos-mmc"?
Is this driver only for Exynos4?
Quoted 8 lines
Best Regards,
Jaehoon ChungQuoted 4 lines
lib/fdtdec.c +0
-0COMPAT (SAMSUNG_EXYNOS_SERIAL ,"samsung,exynos4210-uart" ),COMPAT (MAXIM_MAX77686_PMIC ,"maxim,max77686_pmic" ), COMPAT(GENERIC_SPI_FLASH, "spi-flash"),
Best regards,
Piotr Wilczek
PATCH 5/9 arm:exynos: add common board file for exynos 4
In reply to Piotr WilczekThis patch adds common board file for Exynos 4 based boards.
--- arch/arm/dts/exynos4.dtsi | 139 +++++++++++++++++++++++++++ board/samsung/common/Makefile | 1 + board/samsung/common/board_exynos4.c | 83 +++++++++++++++++ include/configs/exynos4-dt.h | 170 ++++++++++++++++++++++++++++++++++ 4 files changed, 393 insertions(+) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 board/samsung/common/board_exynos4.c create mode 100644 include/configs/exynos4-dt.h
arch/arm/dts/exynos4.dtsi new file +139 -0
@@ -0,0 +1,139 @@ +/* + * Samsung's Exynos4 SoC common device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/include/ "skeleton.dtsi" + +/ { + + serial at 13800000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13800000 0x3c>; + id = <0>; + }; + + serial at 13810000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13810000 0x3c>; + id = <1>; + }; + + serial at 13820000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13820000 0x3c>; + id = <2>; + }; + + serial at 13830000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13830000 0x3c>; + id = <3>; + }; + + serial at 13840000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13840000 0x3c>; + id = <4>; + }; + + i2c at 13860000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <0 0 0>; + }; + + i2c at 13870000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <1 1 0>; + }; + + i2c at 13880000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <2 2 0>; + }; + + i2c at 13890000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <3 3 0>; + }; + + i2c at 138a0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <4 4 0>; + }; + + i2c at 138b0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <5 5 0>; + }; + + i2c at 138c0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <6 6 0>; + }; + + i2c at 138d0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <7 7 0>; + }; + + sdhci at 12510000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12510000 0x1000>; + interrupts = <0 75 0>; + }; + + sdhci at 12520000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12520000 0x1000>; + interrupts = <0 76 0>; + }; + + sdhci at 12530000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12530000 0x1000>; + interrupts = <0 77 0>; + }; + + sdhci at 12540000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12540000 0x1000>; + interrupts = <0 78 0>; + }; + + gpio: gpio { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; +};
board/samsung/common/Makefile +1 -0
@@ -12,4 +12,5 @@ obj-$(CONFIG_MISC_COMMON) += misc.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_BOARD_COMMON) += board.o +obj-$(CONFIG_BOARD_COMMON_EXYNOS4) += board_exynos4.o endif
board/samsung/common/board_exynos4.c new file +83 -0
83 lines not on this page · raw message
include/configs/exynos4-dt.h new file +170 -0
170 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 5/9 arm:exynos: add common board file for exynos 4
board/samsung/common/board_exynos4.c
Quoted 174 lines · Piotr Wilczek
This patch adds common board file for Exynos 4 based boards.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- arch/arm/dts/exynos4.dtsi | 139 +++++++++++++++++++++++++++ board/samsung/common/Makefile | 1 + board/samsung/common/board_exynos4.c | 83 +++++++++++++++++ include/configs/exynos4-dt.h | 170 ++++++++++++++++++++++++++++++++++ 4 files changed, 393 insertions(+) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 board/samsung/common/board_exynos4.c create mode 100644 include/configs/exynos4-dt.harch/arm/dts/exynos4.dtsi new file +139
-0@@ -0,0 +1,139 @@ +/* + * Samsung's Exynos4 SoC common device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/include/ "skeleton.dtsi" + +/ { + + serial at 13800000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13800000 0x3c>; + id = <0>; + }; + + serial at 13810000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13810000 0x3c>; + id = <1>; + }; + + serial at 13820000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13820000 0x3c>; + id = <2>; + }; + + serial at 13830000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13830000 0x3c>; + id = <3>; + }; + + serial at 13840000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13840000 0x3c>; + id = <4>; + }; + + i2c at 13860000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <0 0 0>; + }; + + i2c at 13870000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <1 1 0>; + }; + + i2c at 13880000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <2 2 0>; + }; + + i2c at 13890000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <3 3 0>; + }; + + i2c at 138a0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <4 4 0>; + }; + + i2c at 138b0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <5 5 0>; + }; + + i2c at 138c0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <6 6 0>; + }; + + i2c at 138d0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <7 7 0>; + }; + + sdhci at 12510000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12510000 0x1000>; + interrupts = <0 75 0>; + }; + + sdhci at 12520000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12520000 0x1000>; + interrupts = <0 76 0>; + }; + + sdhci at 12530000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12530000 0x1000>; + interrupts = <0 77 0>; + }; + + sdhci at 12540000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12540000 0x1000>; + interrupts = <0 78 0>; + }; + + gpio: gpio { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; +};board/samsung/common/Makefile +1
-0@@ -12,4 +12,5 @@ obj-$(CONFIG_MISC_COMMON) += misc.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_BOARD_COMMON) += board.o +obj-$(CONFIG_BOARD_COMMON_EXYNOS4) += board_exynos4.o endifboard/samsung/common/board_exynos4.c new file +0
-0
I don't understand why need exynos4 common board file. There's already exist board.c that is common board file for samsung.
Quoted 96 lines
board/samsung/common/board_exynos4.c new file +83
-0@@ -0,0 +1,83 @@ +/* +* (C) Copyright 2014 SAMSUNG Electronics +* Piotr Wilczek <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <fdtdec.h> +#include <asm/io.h> +#include <asm/arch/board.h> +#include <asm/arch/cpu.h> +#include <asm/arch/gpio.h> +#include <asm/arch/mmc.h> +#include <asm/arch/pinmux.h> +#include <asm/arch/power.h> +#include <power/pmic.h> + +DECLARE_GLOBAL_DATA_PTR ; + +int dram_init (void ) +{ +int i; +u32 addr; + +for (i =0 ; i <CONFIG_NR_DRAM_BANKS ; i++) { + addr =CONFIG_SYS_SDRAM_BASE + (i *SDRAM_BANK_SIZE ); + gd->ram_size +=get_ram_size ((long *)addr,SDRAM_BANK_SIZE ); + } +return 0 ; +} + +void dram_init_banksize (void ) +{ +int i; +u32 addr, size; + +for (i =0 ; i <CONFIG_NR_DRAM_BANKS ; i++) { + addr =CONFIG_SYS_SDRAM_BASE + (i *SDRAM_BANK_SIZE ); + size =get_ram_size ((long *)addr,SDRAM_BANK_SIZE ); + + gd->bd->bi_dram[i].start = addr; + gd->bd->bi_dram[i].size = size; + } +} + +int board_init (void ) +{ +#ifdef CONFIG_SYS_SPL_ARGS_ADDR + gd->bd->bi_boot_params =CONFIG_SYS_SPL_ARGS_ADDR ; +#else + gd->bd->bi_boot_params =CONFIG_SYS_SDRAM_BASE +0x100 ; +#endif + +return exynos_init (); +} + +#ifdef CONFIG_OF_CONTROL +#ifdef CONFIG_GENERIC_MMC +int board_mmc_init (bd_t *bis) +{ +int ret; + +/* mmc initializattion for available channels */ + ret =exynos_mmc_init (gd->fdt_blob); +if (ret) +debug ("mmc init failed\n" ); + +return ret; +} +#endif +#ifdef CONFIG_DISPLAY_BOARDINFO +int checkboard (void ) +{ +const char *board_name; + + board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); +printf ("Board: %s\n" , board_name ? board_name :"Unknown board" ); + +return 0 ; +} +#endif +#endif include/configs/exynos4-dt.h new file +6
-0@@ -0,0 +1,170 @@ +/* +* Copyright (C) 2014 Samsung Electronics +* +* Configuration settings for the SAMSUNG EXYNOS5 board. +* +* SPDX-License-Identifier: GPL-2.0+
include/configs/exynos4-dt.h line 16
Quoted 10 lines
include/configs/exynos4-dt.h new file +10
-0+*/ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* High Level Configuration Options */ +#define CONFIG_SAMSUNG /* in a SAMSUNG core */ +#define CONFIG_S5P /* S5P Family */ +#define CONFIG_EXYNOS4 /* which is in a Exynos5 Family */ +#define CONFIG_TIZEN /* TIZEN lib */
It's a board specific.
Quoted 19 lines
include/configs/exynos4-dt.h new file +19
-0+ +#include <asm/arch/cpu.h> /* get chip and board defs */ + +#define CONFIG_ARCH_CPU_INIT +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_DISPLAY_BOARDINFO +#define CONFIG_BOARD_COMMON_EXYNOS4 + +/* Enable fdt support */ +#define CONFIG_OF_CONTROL +#define CONFIG_OF_EMBED + +#define CONFIG_SYS_CACHELINE_SIZE 32 + +/* input clock of PLL: EXYNOS4 boards have 24MHz input clock */ +#define CONFIG_SYS_CLK_FREQ 24000000 + +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_CMDLINE_TAG
include/configs/exynos4-dt.h line 45
Quoted 10 lines
include/configs/exynos4-dt.h new file +10
-0+#define CONFIG_REVISION_TAG +#define CONFIG_INITRD_TAG +#define CONFIG_CMDLINE_EDITING + +#include <asm/sizes.h> +/* Size of malloc() pool */ +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (80 * SZ_1M)) + +/* select serial console configuration */ +#define CONFIG_SERIAL2
ditto.
I think you should re-arrange what is common feature (it means soc specific) and what is board specific. It looks confused to me.
Please fix it.
Thanks,
Minkyu Kang.
PATCH 5/9 arm:exynos: add common board file for exynos 4
Dear Minkyu Kang,
Quoted 176 lines
-----Original Message-----
From: Minkyu Kang [mailto:mk7.kang at samsung.com]
Sent: Friday, February 07, 2014 8:53 AM
To: Piotr Wilczek
Cc: u-boot at lists.denx.de; Kyungmin Park; Lukasz Majewski; Jaehoon Chung; Inha Song; Chanho Park
Subject: Re: [PATCH 5/9] arm:exynos: add common board file for exynos 4Quoted 6 lines · Piotr Wilczek
This patch adds common board file for Exynos 4 based boards.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- arch/arm/dts/exynos4.dtsi | 139+++++++++++++++++++++++++++
Quoted 3 lines
board/samsung/common/Makefile | 1 + board/samsung/common/board_exynos4.c | 83 +++++++++++++++++ include/configs/exynos4-dt.h | 170++++++++++++++++++++++++++++++++++
arch/arm/dts/exynos4.dtsi
Quoted 6 lines
4 files changed, 393 insertions(+) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 board/samsung/common/board_exynos4.c create mode 100644 include/configs/exynos4-dt.harch/arm/dts/exynos4.dtsi +0
-0new
Quoted 149 lines
file mode 100644 index 0000000..38a6919
arch/arm/dts/exynos4.dtsi new file +139
-0@@ -0,0 +1,139 @@ +/* + * Samsung's Exynos4 SoC common device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/include/ "skeleton.dtsi" + +/ { + + serial at 13800000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13800000 0x3c>; + id = <0>; + }; + + serial at 13810000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13810000 0x3c>; + id = <1>; + }; + + serial at 13820000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13820000 0x3c>; + id = <2>; + }; + + serial at 13830000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13830000 0x3c>; + id = <3>; + }; + + serial at 13840000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13840000 0x3c>; + id = <4>; + }; + + i2c at 13860000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <0 0 0>; + }; + + i2c at 13870000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <1 1 0>; + }; + + i2c at 13880000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <2 2 0>; + }; + + i2c at 13890000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <3 3 0>; + }; + + i2c at 138a0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <4 4 0>; + }; + + i2c at 138b0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <5 5 0>; + }; + + i2c at 138c0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <6 6 0>; + }; + + i2c at 138d0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <7 7 0>; + }; + + sdhci at 12510000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12510000 0x1000>; + interrupts = <0 75 0>; + }; + + sdhci at 12520000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12520000 0x1000>; + interrupts = <0 76 0>; + }; + + sdhci at 12530000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12530000 0x1000>; + interrupts = <0 77 0>; + }; + + sdhci at 12540000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12540000 0x1000>; + interrupts = <0 78 0>; + }; + + gpio: gpio { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; +};(quoted diff) +0
-0b/board/samsung/common/Makefile index 7d2bb8c..25f1e40 100644
board/samsung/common/Makefile +0
-0@@ -12,4 +12,5 @@ obj-$(CONFIG_MISC_COMMON) += misc.o
Quoted 14 lines
board/samsung/common/board_exynos4.c
Quoted 10 lines
board/samsung/common/Makefile +1
-0ifndef CONFIG_SPL_BUILD obj-$(CONFIG_BOARD_COMMON) += board.o +obj-$(CONFIG_BOARD_COMMON_EXYNOS4) += board_exynos4.o endifboard/samsung/common/board_exynos4.c new file +0
-0I don't understand why need exynos4 common board file. There's already exist
board.cthat is common board file for samsung.
Because in the board.c file, both common and board specific functions are added.
Max 77686, eth, power, board late initialization functions are board specific.
If they are removed, I will be able to use the board.c file.
Quoted 105 lines
Quoted 19 lines
board/samsung/common/board_exynos4.c new file +18
-0@@ -0,0 +1,83 @@ +/* +* (C) Copyright 2014 SAMSUNG Electronics +* Piotr Wilczek <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <fdtdec.h> +#include <asm/io.h> +#include <asm/arch/board.h> +#include <asm/arch/cpu.h> +#include <asm/arch/gpio.h> +#include <asm/arch/mmc.h> +#include <asm/arch/pinmux.h> +#include <asm/arch/power.h> +#include <power/pmic.h> +board/samsung/common/board_exynos4.c line 28
Quoted 10 lines
board/samsung/common/board_exynos4.c new file +10
-0+DECLARE_GLOBAL_DATA_PTR ; + +int dram_init (void ) +{ +int i; +u32 addr; + +for (i =0 ; i <CONFIG_NR_DRAM_BANKS ; i++) { + addr =CONFIG_SYS_SDRAM_BASE + (i *SDRAM_BANK_SIZE ); + gd->ram_size += get_ram_size((long *)addr,
SDRAM_BANK_SIZE);Quoted 64 lines
board/samsung/common/board_exynos4.c new file +53
-0+ } +return 0 ; +} + +void dram_init_banksize (void ) +{ +int i; +u32 addr, size; + +for (i =0 ; i <CONFIG_NR_DRAM_BANKS ; i++) { + addr =CONFIG_SYS_SDRAM_BASE + (i *SDRAM_BANK_SIZE ); + size =get_ram_size ((long *)addr,SDRAM_BANK_SIZE ); + + gd->bd->bi_dram[i].start = addr; + gd->bd->bi_dram[i].size = size; + } +} + +int board_init (void ) +{ +#ifdef CONFIG_SYS_SPL_ARGS_ADDR + gd->bd->bi_boot_params =CONFIG_SYS_SPL_ARGS_ADDR ;#else + gd->bd->bi_boot_params =CONFIG_SYS_SDRAM_BASE +0x100 ;#endif + +return exynos_init (); +} + +#ifdef CONFIG_OF_CONTROL +#ifdef CONFIG_GENERIC_MMC +int board_mmc_init (bd_t *bis) +{ +int ret; + +/* mmc initializattion for available channels */ + ret =exynos_mmc_init (gd->fdt_blob); +if (ret) +debug ("mmc init failed\n" ); + +return ret; +} +#endif +#ifdef CONFIG_DISPLAY_BOARDINFO +int checkboard (void ) +{ +const char *board_name; + + board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); +printf ("Board: %s\n" , board_name ? board_name :"Unknown board" ); + +return 0 ; +} +#endif +#endif (quoted diff) +0
-0
b/include/configs/exynos4-dt.hnew file mode 100644 index 0000000..aa941f3include/configs/exynos4-dt.h new file +5
-0@@ -0,0 +1,170 @@ +/* +* Copyright (C) 2014 Samsung Electronics +* +* Configuration settings for the SAMSUNG EXYNOS5 board. +* include/configs/exynos4-dt.h line 15
Quoted 10 lines
include/configs/exynos4-dt.h new file +10
-0+* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* High Level Configuration Options */ +#define CONFIG_SAMSUNG /* in a SAMSUNG core */ +#define CONFIG_S5P /* S5P Family */ +#define CONFIG_EXYNOS4 /* which is in a Exynos5 Family */
Quoted 3 lines
include/configs/exynos4-dt.h line 16
Quoted 1 line
include/configs/exynos4-dt.h new file +1
-0+#define CONFIG_TIZEN /* TIZEN lib */ It's a board specific.
Ok.
Quoted 28 lines
Quoted 17 lines
include/configs/exynos4-dt.h new file +16
-0+ +#include <asm/arch/cpu.h> /* get chip and board defs */ + +#define CONFIG_ARCH_CPU_INIT +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_DISPLAY_BOARDINFO +#define CONFIG_BOARD_COMMON_EXYNOS4 + +/* Enable fdt support */ +#define CONFIG_OF_CONTROL +#define CONFIG_OF_EMBED + +#define CONFIG_SYS_CACHELINE_SIZE 32 + +/* input clock of PLL: EXYNOS4 boards have 24MHz input clock */ +#define CONFIG_SYS_CLK_FREQ 24000000include/configs/exynos4-dt.h
Quoted 10 lines
include/configs/exynos4-dt.h new file +10
-0+ +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_CMDLINE_TAG +#define CONFIG_REVISION_TAG +#define CONFIG_INITRD_TAG +#define CONFIG_CMDLINE_EDITING + +#include <asm/sizes.h> +/* Size of malloc() pool */ +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (80 *
SZ_1M))
Quoted 4 lines
include/configs/exynos4-dt.h line 44
Quoted 2 lines
include/configs/exynos4-dt.h new file +2
-0+ +/* select serial console configuration */ #define CONFIG_SERIAL2 ditto.
Ok.
Quoted 8 lines
I think you should re-arrange what is common feature (it means soc specific) and what is board specific.
It looks confused to me.
Please fix it.Thanks,
Minkyu Kang.
Best regards,
Piotr Wilczek
PATCH 5/9 arm:exynos: add common board file for exynos 4
Quoted 47 lines · Piotr Wilczek
Dear Minkyu Kang,
Quoted 31 lines
-----Original Message-----
From: Minkyu Kang [mailto:mk7.kang at samsung.com]
Sent: Friday, February 07, 2014 8:53 AM
To: Piotr Wilczek
Cc: u-boot at lists.denx.de; Kyungmin Park; Lukasz Majewski; Jaehoon Chung; Inha Song; Chanho Park
Subject: Re: [PATCH 5/9] arm:exynos: add common board file for exynos 4Quoted 6 lines · Piotr Wilczek
This patch adds common board file for Exynos 4 based boards.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- arch/arm/dts/exynos4.dtsi | 139+++++++++++++++++++++++++++
Quoted 3 lines
board/samsung/common/Makefile | 1 + board/samsung/common/board_exynos4.c | 83 +++++++++++++++++ include/configs/exynos4-dt.h | 170++++++++++++++++++++++++++++++++++
Quoted 11 lines
4 files changed, 393 insertions(+) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 board/samsung/common/board_exynos4.c create mode 100644 include/configs/exynos4-dt.h(quoted diff) +0
-0b/board/samsung/common/Makefile index 7d2bb8c..25f1e40 100644
board/samsung/common/Makefile +0
-0@@ -12,4 +12,5 @@ obj-$(CONFIG_MISC_COMMON) += misc.oQuoted 14 lines
board/samsung/common/board_exynos4.c
Quoted 10 lines
board/samsung/common/Makefile +1
-0ifndef CONFIG_SPL_BUILD obj-$(CONFIG_BOARD_COMMON) += board.o +obj-$(CONFIG_BOARD_COMMON_EXYNOS4) += board_exynos4.o endifboard/samsung/common/board_exynos4.c new file +0
-0I don't understand why need exynos4 common board file. There's already exist
board.cthat is common board file for samsung.
Quoted 5 lines
Because in the
board.cfile, both common and board specific functions are added.
Max 77686, eth, power, board late initialization functions are board specific.
If they are removed, I will be able to use theboard.cfile.
It seems to be wrapped with ifdef.
I think there's no problems to use same file.
Thanks,
Minkyu Kang.
PATCH 5/9 arm:exynos: add common board file for exynos 4
Quoted 59 lines
-----Original Message-----
From: Minkyu Kang [mailto:mk7.kang at samsung.com]
Sent: Friday, February 07, 2014 10:48 AM
To: Piotr Wilczek
Cc: u-boot at lists.denx.de; 'Kyungmin Park'; Lukasz Majewski; 'Jaehoon Chung'; 'Inha Song'; 'Chanho Park'
Subject: Re: [PATCH 5/9] arm:exynos: add common board file for exynos 4Quoted 9 lines · Piotr Wilczek
Dear Minkyu Kang,
Quoted 7 lines
-----Original Message-----
From: Minkyu Kang [mailto:mk7.kang at samsung.com]
Sent: Friday, February 07, 2014 8:53 AM
To: Piotr Wilczek
Cc: u-boot at lists.denx.de; Kyungmin Park; Lukasz Majewski; Jaehoon Chung; Inha Song; Chanho Park
Subject: Re: [PATCH 5/9] arm:exynos: add common board file forexynos
Quoted 39 lines
Quoted 39 lines
4
Quoted 6 lines · Piotr Wilczek
This patch adds common board file for Exynos 4 based boards.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>--- arch/arm/dts/exynos4.dtsi | 139+++++++++++++++++++++++++++
Quoted 3 lines
board/samsung/common/Makefile | 1 + board/samsung/common/board_exynos4.c | 83 +++++++++++++++++ include/configs/exynos4-dt.h | 170++++++++++++++++++++++++++++++++++
board/samsung/common/board_exynos4.c
Quoted 21 lines
4 files changed, 393 insertions(+) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 board/samsung/common/board_exynos4.c create mode 100644 include/configs/exynos4-dt.h(quoted diff) +0
-0b/board/samsung/common/Makefile index 7d2bb8c..25f1e40 100644
board/samsung/common/Makefile +1
-0@@ -12,4 +12,5 @@ obj-$(CONFIG_MISC_COMMON) += misc.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_BOARD_COMMON) += board.o +obj-$(CONFIG_BOARD_COMMON_EXYNOS4) += board_exynos4.o endifboard/samsung/common/board_exynos4.c new file +0
-0I don't understand why need exynos4 common board file. There's already exist
board.cthat is common board file for samsung.
Quoted 9 lines
Quoted 5 lines
Because in the
board.cfile, both common and board specific functions are added.
Max 77686, eth, power, board late initialization functions are board specific.
If they are removed, I will be able to use theboard.cfile.It seems to be wrapped with ifdef.
I think there's no problems to use same file.
Max77686 init implementation is different for Trats2 and ifdef will not help here.
I think that max77686_init() function should be removed from the board.c file.
Other board specific initializations I can resolve in the way it was done in board_init() function, if that's the preferred way.
Quoted 2 lines
Thanks,
Minkyu Kang.
Best regrds,
Piotr Wilczek
PATCH 5/9 arm:exynos: add common board file for exynos 4
Dear Piotr,
Quoted 24 lines · Piotr Wilczek
Quoted 24 lines
-----Original Message-----
From: Minkyu Kang [mailto:mk7.kang at samsung.com]
Sent: Friday, February 07, 2014 10:48 AM
To: Piotr Wilczek
Cc: u-boot at lists.denx.de; 'Kyungmin Park'; Lukasz Majewski; 'Jaehoon Chung'; 'Inha Song'; 'Chanho Park'
Subject: Re: [PATCH 5/9] arm:exynos: add common board file for exynos 4Quoted 15 lines
Quoted 10 lines
board/samsung/common/board_exynos4.c
Quoted 6 lines
board/samsung/common/board_exynos4.c new file +0
-0I don't understand why need exynos4 common board file. There's already exist
board.cthat is common board file for samsung.Because in the
board.cfile, both common and board specific functions are added.
Max 77686, eth, power, board late initialization functions are board specific.
If they are removed, I will be able to use theboard.cfile.
Quoted 7 lines
Quoted 3 lines
It seems to be wrapped with ifdef.
I think there's no problems to use same file.Max77686 init implementation is different for Trats2 and ifdef will not help here.
I think thatmax77686_init()function should be removed from theboard.cfile.
It's up to you.
Quoted 10 lines
Other board specific initializations I can resolve in the way it was done in
board_init()function, if that's the preferred way.Quoted 2 lines
Thanks,
Minkyu Kang.Best regrds,
Piotr Wilczek
Thanks,
Minkyu Kang.
PATCH 6/9 board:origen:fdt: Enable device tree on Origen
In reply to Piotr WilczekThis patch enables to run Origen board on device tree.
--- board/samsung/dts/exynos4210-origen.dts | 45 ++++++++++++++ board/samsung/origen/origen.c | 86 +++++--------------------- include/configs/origen.h | 103 +++++++------------------------ 3 files changed, 85 insertions(+), 149 deletions(-) create mode 100644 board/samsung/dts/exynos4210-origen.dts
board/samsung/dts/exynos4210-origen.dts new file +45 -0
@@ -0,0 +1,45 @@ +/* + * Samsung's Exynos4210 based Origen board device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "skeleton.dtsi" +/include/ "exynos4.dtsi" + +/ { + model = "Insignal Origen evaluation board based on Exynos4210"; + compatible = "insignal,origen", "samsung,exynos4210"; + + chosen { + bootargs =""; + }; + + aliases { + serial0 = "/serial at 13800000"; + console = "/serial at 13820000"; + mmc2 = "sdhci at 12530000"; + }; + + sdhci at 12510000 { + status = "disabled"; + }; + + sdhci at 12520000 { + status = "disabled"; + }; + + sdhci at 12530000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + cd-gpios = <&gpio 0x2008002 0>; + }; + + sdhci at 12540000 { + status = "disabled"; + }; +};
board/samsung/origen/origen.c +17 -69
118 lines not on this page · raw message
include/configs/origen.h +23 -80
160 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 7/9 board:universal:fdt: Enable device tree on Universal
In reply to Piotr WilczekThis patch enables to run Universal board on device tree.
--- board/samsung/dts/exynos4210-universal_c210.dts | 83 +++++++++++ board/samsung/universal_c210/universal.c | 178 ++++++----------------- include/configs/s5pc210_universal.h | 128 +++------------- 3 files changed, 144 insertions(+), 245 deletions(-) create mode 100644 board/samsung/dts/exynos4210-universal_c210.dts
board/samsung/dts/exynos4210-universal_c210.dts new file +83 -0
@@ -0,0 +1,83 @@ +/* + * Samsung's Exynos4210 based Universal C210 board device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "exynos4.dtsi" + +/ { + model = "Samsung Universal C210 based on Exynos4210 rev0"; + compatible = "samsung,universal_c210", "samsung,exynos4210"; + + aliases { + serial0 = "/serial at 13800000"; + console = "/serial at 13820000"; + mmc0 = "sdhci at 12510000"; + mmc2 = "sdhci at 12530000"; + }; + + sdhci at 12510000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + pwr-gpios = <&gpio 0x2008002 0>; + }; + + sdhci at 12520000 { + status = "disabled"; + }; + + sdhci at 12530000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + cd-gpios = <&gpio 0x20c6004 0>; + }; + + sdhci at 12540000 { + status = "disabled"; + }; + + fimd at 11c00000 { + compatible = "samsung,exynos-fimd"; + reg = <0x11c00000 0xa4>; + + samsung,vl-freq = <60>; + samsung,vl-col = <480>; + samsung,vl-row = <800>; + samsung,vl-width = <480>; + samsung,vl-height = <800>; + + samsung,vl-clkp = <0>; + samsung,vl-oep = <0>; + samsung,vl-hsp = <1>; + samsung,vl-vsp = <1>; + samsung,vl-dp = <1>; + samsung,vl-bpix = <4>; + + samsung,vl-hspw = <2>; + samsung,vl-hbpd = <16>; + samsung,vl-hfpd = <16>; + samsung,vl-vspw = <2>; + samsung,vl-vbpd = <8>; + samsung,vl-vfpd = <8>; + samsung,vl-cmd-allow-len = <0xf>; + + samsung,pclk_name = <1>; + samsung,sclk_div = <1>; + + samsung,winid = <0>; + samsung,power-on-delay = <10000>; + samsung,interface-mode = <1>; + samsung,mipi-enabled = <0>; + samsung,dp-enabled; + samsung,dual-lcd-enabled; + + samsung,logo-on = <1>; + samsung,resolution = <0>; + samsung,rgb-mode = <0>; + }; +};
board/samsung/universal_c210/universal.c +42 -136
239 lines not on this page · raw message
include/configs/s5pc210_universal.h +19 -109
172 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 8/9 trats:fdt: Enable device tree on Trats
In reply to Piotr WilczekThis patch enables to run Trats board on device tree.
--- board/samsung/dts/exynos4210-trats.dts | 120 ++++++++++++++++++++++ board/samsung/trats/trats.c | 176 +------------------------------ include/configs/trats.h | 177 ++++---------------------------- 3 files changed, 144 insertions(+), 329 deletions(-) create mode 100644 board/samsung/dts/exynos4210-trats.dts
board/samsung/dts/exynos4210-trats.dts new file +120 -0
@@ -0,0 +1,120 @@ +/* + * Samsung's Exynos4210 based Trats board device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "exynos4.dtsi" + +/ { + model = "Samsung Trats based on Exynos4210"; + compatible = "samsung,trats", "samsung,exynos4210"; + + config { + samsung,dsim-device-name = "s6e8ax0"; + }; + + aliases { + i2c0 = "/i2c at 13860000"; + i2c1 = "/i2c at 13870000"; + i2c2 = "/i2c at 13880000"; + i2c3 = "/i2c at 13890000"; + i2c4 = "/i2c at 138a0000"; + i2c5 = "/i2c at 138b0000"; + i2c6 = "/i2c at 138c0000"; + i2c7 = "/i2c at 138d0000"; + serial0 = "/serial at 13800000"; + console = "/serial at 13820000"; + mmc0 = "sdhci at 12510000"; + mmc2 = "sdhci at 12530000"; + }; + + fimd at 11c00000 { + compatible = "samsung,exynos-fimd"; + reg = <0x11c00000 0xa4>; + + samsung,vl-freq = <60>; + samsung,vl-col = <720>; + samsung,vl-row = <1280>; + samsung,vl-width = <720>; + samsung,vl-height = <1280>; + + samsung,vl-clkp = <0>; + samsung,vl-oep = <0>; + samsung,vl-hsp = <1>; + samsung,vl-vsp = <1>; + samsung,vl-dp = <1>; + samsung,vl-bpix = <4>; + + samsung,vl-hspw = <5>; + samsung,vl-hbpd = <10>; + samsung,vl-hfpd = <10>; + samsung,vl-vspw = <2>; + samsung,vl-vbpd = <1>; + samsung,vl-vfpd = <13>; + samsung,vl-cmd-allow-len = <0xf>; + + samsung,winid = <0>; + samsung,power-on-delay = <30>; + samsung,interface-mode = <1>; + samsung,mipi-enabled = <1>; + samsung,dp-enabled; + samsung,dual-lcd-enabled; + + samsung,logo-on = <1>; + samsung,resolution = <0>; + samsung,rgb-mode = <0>; + }; + + mipidsi at 11c80000 { + compatible = "samsung,exynos-mipi-dsi"; + reg = <0x11c80000 0x5c>; + + samsung,dsim-config-e_interface = <1>; + samsung,dsim-config-e_virtual_ch = <0>; + samsung,dsim-config-e_pixel_format = <7>; + samsung,dsim-config-e_burst_mode = <1>; + samsung,dsim-config-e_no_data_lane = <3>; + samsung,dsim-config-e_byte_clk = <0>; + samsung,dsim-config-hfp = <1>; + + samsung,dsim-config-p = <3>; + samsung,dsim-config-m = <120>; + samsung,dsim-config-s = <1>; + + samsung,dsim-config-pll_stable_time = <500>; + samsung,dsim-config-esc_clk = <20000000>; + samsung,dsim-config-stop_holding_cnt = <0x7ff>; + samsung,dsim-config-bta_timeout = <0xff>; + samsung,dsim-config-rx_timeout = <0xffff>; + + samsung,dsim-device-id = <0xffffffff>; + samsung,dsim-device-bus_id = <0>; + + samsung,dsim-device-reverse_panel = <1>; + }; + + sdhci at 12510000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + pwr-gpios = <&gpio 0x2008002 0>; + }; + + sdhci at 12520000 { + status = "disabled"; + }; + + sdhci at 12530000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + cd-gpios = <&gpio 0x20c6004 0>; + }; + + sdhci at 12540000 { + status = "disabled"; + }; +};
board/samsung/trats/trats.c +3 -173
227 lines not on this page · raw message
include/configs/trats.h +21 -156
236 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 9/9 board:trats2:fdt: Enable device tree on Trats2
In reply to Piotr WilczekThis patch enables to run Trats2 board on device tree.
--- board/samsung/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++++++++++++ board/samsung/trats2/trats2.c | 216 +-------------- include/configs/trats2.h | 199 ++------------ 3 files changed, 459 insertions(+), 390 deletions(-) create mode 100644 board/samsung/dts/exynos4412-trats2.dts
board/samsung/dts/exynos4412-trats2.dts new file +434 -0
@@ -0,0 +1,434 @@ +/* + * Samsung's Exynos4412 based Trats2 board device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "exynos4.dtsi" + +/ { + model = "Samsung Trats2 based on Exynos4412"; + compatible = "samsung,trats2", "samsung,exynos4412"; + + config { + samsung,dsim-device-name = "s6e8ax0"; + }; + + aliases { + i2c0 = "/i2c at 13860000"; + i2c1 = "/i2c at 13870000"; + i2c2 = "/i2c at 13880000"; + i2c3 = "/i2c at 13890000"; + i2c4 = "/i2c at 138a0000"; + i2c5 = "/i2c at 138b0000"; + i2c6 = "/i2c at 138c0000"; + i2c7 = "/i2c at 138d0000"; + serial0 = "/serial at 13800000"; + console = "/serial at 13820000"; + mmc0 = "sdhci at 12510000"; + mmc2 = "sdhci at 12510000"; + }; + + i2c at 138d0000 { + samsung,i2c-sda-delay = <100>; + samsung,i2c-slave-addr = <0x10>; + samsung,i2c-max-bus-freq = <100000>; + status = "okay"; + + max77686_pmic at 09 { + compatible = "maxim,max77686_pmic"; + interrupts = <7 0>; + reg = <0x09 0 0>; + #clock-cells = <1>; + + voltage-regulators { + ldo1_reg: ldo1 { + regulator-compatible = "LDO1"; + regulator-name = "VALIVE_1.0V_AP"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo2_reg: ldo2 { + regulator-compatible = "LDO2"; + regulator-name = "VM1M2_1.2V_AP"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo3_reg: ldo3 { + regulator-compatible = "LDO3"; + regulator-name = "VCC_1.8V_AP"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo4_reg: ldo4 { + regulator-compatible = "LDO4"; + regulator-name = "VCC_2.8V_AP"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo5_reg: ldo5 { + regulator-compatible = "LDO5"; + regulator-name = "VCC_1.8V_IO"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo6_reg: ldo6 { + regulator-compatible = "LDO6"; + regulator-name = "VMPLL_1.0V_AP"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo7_reg: ldo7 { + regulator-compatible = "LDO7"; + regulator-name = "VPLL_1.0V_AP"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo8_reg: ldo8 { + regulator-compatible = "LDO8"; + regulator-name = "VMIPI_1.0V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-mem-off; + }; + + ldo9_reg: ldo9 { + regulator-compatible = "LDO9"; + regulator-name = "CAM_ISP_MIPI_1.2V"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-mem-idle; + }; + + ldo10_reg: ldo10 { + regulator-compatible = "LDO10"; + regulator-name = "VMIPI_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-off; + }; + + ldo11_reg: ldo11 { + regulator-compatible = "LDO11"; + regulator-name = "VABB1_1.95V"; + regulator-min-microvolt = <1950000>; + regulator-max-microvolt = <1950000>; + regulator-always-on; + regulator-mem-off; + }; + + ldo12_reg: ldo12 { + regulator-compatible = "LDO12"; + regulator-name = "VUOTG_3.0V"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-mem-off; + }; + + ldo13_reg: ldo13 { + regulator-compatible = "LDO13"; + regulator-name = "NFC_AVDD_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo14_reg: ldo14 { + regulator-compatible = "LDO14"; + regulator-name = "VABB2_1.95V"; + regulator-min-microvolt = <1950000>; + regulator-max-microvolt = <1950000>; + regulator-always-on; + regulator-mem-off; + }; + + ldo15_reg: ldo15 { + regulator-compatible = "LDO15"; + regulator-name = "VHSIC_1.0V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-mem-off; + }; + + ldo16_reg: ldo16 { + regulator-compatible = "LDO16"; + regulator-name = "VHSIC_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-off; + }; + + ldo17_reg: ldo17 { + regulator-compatible = "LDO17"; + regulator-name = "CAM_SENSOR_CORE_1.2V"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-mem-idle; + }; + + ldo18_reg: ldo18 { + regulator-compatible = "LDO18"; + regulator-name = "CAM_ISP_SEN_IO_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo19_reg: ldo19 { + regulator-compatible = "LDO19"; + regulator-name = "VT_CAM_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo20_reg: ldo20 { + regulator-compatible = "LDO20"; + regulator-name = "VDDQ_PRE_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo21_reg: ldo21 { + regulator-compatible = "LDO21"; + regulator-name = "VTF_2.8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-mem-idle; + }; + + ldo22_reg: ldo22 { + regulator-compatible = "LDO22"; + regulator-name = "VMEM_VDD_2.8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-mem-off; + }; + + ldo23_reg: ldo23 { + regulator-compatible = "LDO23"; + regulator-name = "TSP_AVDD_3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-mem-idle; + }; + + ldo24_reg: ldo24 { + regulator-compatible = "LDO24"; + regulator-name = "TSP_VDD_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo25_reg: ldo25 { + regulator-compatible = "LDO25"; + regulator-name = "LCD_VCC_3.3V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-mem-idle; + }; + + ldo26_reg: ldo26 { + regulator-compatible = "LDO26"; + regulator-name = "MOTOR_VCC_3.0V"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-mem-idle; + }; + + buck1_reg: buck1 { + regulator-compatible = "BUCK1"; + regulator-name = "vdd_mif"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1100000>; + regulator-always-on; + regulator-boot-on; + regulator-mem-off; + }; + + buck2_reg: buck2 { + regulator-compatible = "BUCK2"; + regulator-name = "vdd_arm"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + regulator-boot-on; + regulator-mem-off; + }; + + buck3_reg: buck3 { + regulator-compatible = "BUCK3"; + regulator-name = "vdd_int"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1150000>; + regulator-always-on; + regulator-boot-on; + regulator-mem-off; + }; + + buck4_reg: buck4 { + regulator-compatible = "BUCK4"; + regulator-name = "vdd_g3d"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1150000>; + regulator-boot-on; + regulator-mem-off; + }; + + buck5_reg: buck5 { + regulator-compatible = "BUCK5"; + regulator-name = "VMEM_1.2V_AP"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + }; + + buck6_reg: buck6 { + regulator-compatible = "BUCK6"; + regulator-name = "VCC_SUB_1.35V"; + regulator-min-microvolt = <1350000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + }; + + buck7_reg: buck7 { + regulator-compatible = "BUCK7"; + regulator-name = "VCC_SUB_2.0V"; + regulator-min-microvolt = <2000000>; + regulator-max-microvolt = <2000000>; + regulator-always-on; + }; + + buck8_reg: buck8 { + regulator-compatible = "BUCK8"; + regulator-name = "VMEM_VDDF_3.0V"; + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + regulator-always-on; + regulator-mem-off; + }; + + buck9_reg: buck9 { + regulator-compatible = "BUCK9"; + regulator-name = "CAM_ISP_CORE_1.2V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1200000>; + regulator-mem-off; + }; + }; + }; + }; + + fimd at 11c00000 { + compatible = "samsung,exynos-fimd"; + reg = <0x11c00000 0xa4>; + + samsung,vl-freq = <60>; + samsung,vl-col = <720>; + samsung,vl-row = <1280>; + samsung,vl-width = <720>; + samsung,vl-height = <1280>; + + samsung,vl-clkp = <0>; + samsung,vl-oep = <0>; + samsung,vl-hsp = <1>; + samsung,vl-vsp = <1>; + samsung,vl-dp = <1>; + samsung,vl-bpix = <4>; + + samsung,vl-hspw = <5>; + samsung,vl-hbpd = <10>; + samsung,vl-hfpd = <10>; + samsung,vl-vspw = <2>; + samsung,vl-vbpd = <1>; + samsung,vl-vfpd = <13>; + samsung,vl-cmd-allow-len = <0xf>; + + samsung,winid = <0>; + samsung,power-on-delay = <30>; + samsung,interface-mode = <1>; + samsung,mipi-enabled = <1>; + samsung,dp-enabled; + samsung,dual-lcd-enabled; + + samsung,logo-on = <1>; + samsung,resolution = <0>; + samsung,rgb-mode = <0>; + }; + + mipidsi at 11c80000 { + compatible = "samsung,exynos-mipi-dsi"; + reg = <0x11c80000 0x5c>; + + samsung,dsim-config-e_interface = <1>; + samsung,dsim-config-e_virtual_ch = <0>; + samsung,dsim-config-e_pixel_format = <7>; + samsung,dsim-config-e_burst_mode = <1>; + samsung,dsim-config-e_no_data_lane = <3>; + samsung,dsim-config-e_byte_clk = <0>; + samsung,dsim-config-hfp = <1>; + + samsung,dsim-config-p = <3>; + samsung,dsim-config-m = <120>; + samsung,dsim-config-s = <1>; + + samsung,dsim-config-pll_stable_time = <500>; + samsung,dsim-config-esc_clk = <20000000>; + samsung,dsim-config-stop_holding_cnt = <0x7ff>; + samsung,dsim-config-bta_timeout = <0xff>; + samsung,dsim-config-rx_timeout = <0xffff>; + + samsung,dsim-device-id = <0xffffffff>; + samsung,dsim-device-bus_id = <0>; + + samsung,dsim-device-reverse_panel = <1>; + }; + + sdhci at 12510000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + pwr-gpios = <&gpio 0x2004002 0>; + }; + + sdhci at 12520000 { + status = "disabled"; + }; + + sdhci at 12530000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + cd-gpios = <&gpio 0x20C6004 0>; + }; + + sdhci at 12540000 { + status = "disabled"; + }; +};
board/samsung/trats2/trats2.c +7 -209
267 lines not on this page · raw message
include/configs/trats2.h +18 -181
232 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 9/9 board:trats2:fdt: Enable device tree on Trats2
Quoted 41 lines · Piotr Wilczek
This patch enables to run Trats2 board on device tree.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>CC Minkyu Kang <[email protected]>--- board/samsung/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++++++++++++ board/samsung/trats2/trats2.c | 216 +-------------- include/configs/trats2.h | 199 ++------------ 3 files changed, 459 insertions(+), 390 deletions(-) create mode 100644 board/samsung/dts/exynos4412-trats2.dtsboard/samsung/dts/exynos4412-trats2.dts new file +23
-0@@ -0,0 +1,434 @@ +/* + * Samsung's Exynos4412 based Trats2 board device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "exynos4.dtsi" + +/ { + model = "Samsung Trats2 based on Exynos4412"; + compatible = "samsung,trats2", "samsung,exynos4412"; + + config { + samsung,dsim-device-name = "s6e8ax0"; + }; + + aliases { + i2c0 = "/i2c at 13860000"; + i2c1 = "/i2c at 13870000";
board/samsung/dts/exynos4412-trats2.dts line 33
Quoted 10 lines
board/samsung/dts/exynos4412-trats2.dts new file +10
-0+ i2c2 = "/i2c at 13880000"; + i2c3 = "/i2c at 13890000"; + i2c4 = "/i2c at 138a0000"; + i2c5 = "/i2c at 138b0000"; + i2c6 = "/i2c at 138c0000"; + i2c7 = "/i2c at 138d0000"; + serial0 = "/serial at 13800000"; + console = "/serial at 13820000"; + mmc0 = "sdhci at 12510000"; + mmc2 = "sdhci at 12510000";
mmc2 isn't 0x12510000.
Quoted 920 lines
board/samsung/dts/exynos4412-trats2.dts new file +401
-0+ }; + + i2c at 138d0000 { + samsung,i2c-sda-delay = <100>; + samsung,i2c-slave-addr = <0x10>; + samsung,i2c-max-bus-freq = <100000>; + status = "okay"; + + max77686_pmic at 09 { + compatible = "maxim,max77686_pmic"; + interrupts = <7 0>; + reg = <0x09 0 0>; + #clock-cells = <1>; + + voltage-regulators { + ldo1_reg: ldo1 { + regulator-compatible = "LDO1"; + regulator-name = "VALIVE_1.0V_AP"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo2_reg: ldo2 { + regulator-compatible = "LDO2"; + regulator-name = "VM1M2_1.2V_AP"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo3_reg: ldo3 { + regulator-compatible = "LDO3"; + regulator-name = "VCC_1.8V_AP"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo4_reg: ldo4 { + regulator-compatible = "LDO4"; + regulator-name = "VCC_2.8V_AP"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo5_reg: ldo5 { + regulator-compatible = "LDO5"; + regulator-name = "VCC_1.8V_IO"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo6_reg: ldo6 { + regulator-compatible = "LDO6"; + regulator-name = "VMPLL_1.0V_AP"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo7_reg: ldo7 { + regulator-compatible = "LDO7"; + regulator-name = "VPLL_1.0V_AP"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo8_reg: ldo8 { + regulator-compatible = "LDO8"; + regulator-name = "VMIPI_1.0V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-mem-off; + }; + + ldo9_reg: ldo9 { + regulator-compatible = "LDO9"; + regulator-name = "CAM_ISP_MIPI_1.2V"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-mem-idle; + }; + + ldo10_reg: ldo10 { + regulator-compatible = "LDO10"; + regulator-name = "VMIPI_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-off; + }; + + ldo11_reg: ldo11 { + regulator-compatible = "LDO11"; + regulator-name = "VABB1_1.95V"; + regulator-min-microvolt = <1950000>; + regulator-max-microvolt = <1950000>; + regulator-always-on; + regulator-mem-off; + }; + + ldo12_reg: ldo12 { + regulator-compatible = "LDO12"; + regulator-name = "VUOTG_3.0V"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-mem-off; + }; + + ldo13_reg: ldo13 { + regulator-compatible = "LDO13"; + regulator-name = "NFC_AVDD_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo14_reg: ldo14 { + regulator-compatible = "LDO14"; + regulator-name = "VABB2_1.95V"; + regulator-min-microvolt = <1950000>; + regulator-max-microvolt = <1950000>; + regulator-always-on; + regulator-mem-off; + }; + + ldo15_reg: ldo15 { + regulator-compatible = "LDO15"; + regulator-name = "VHSIC_1.0V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-mem-off; + }; + + ldo16_reg: ldo16 { + regulator-compatible = "LDO16"; + regulator-name = "VHSIC_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-off; + }; + + ldo17_reg: ldo17 { + regulator-compatible = "LDO17"; + regulator-name = "CAM_SENSOR_CORE_1.2V"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-mem-idle; + }; + + ldo18_reg: ldo18 { + regulator-compatible = "LDO18"; + regulator-name = "CAM_ISP_SEN_IO_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo19_reg: ldo19 { + regulator-compatible = "LDO19"; + regulator-name = "VT_CAM_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo20_reg: ldo20 { + regulator-compatible = "LDO20"; + regulator-name = "VDDQ_PRE_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo21_reg: ldo21 { + regulator-compatible = "LDO21"; + regulator-name = "VTF_2.8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-mem-idle; + }; + + ldo22_reg: ldo22 { + regulator-compatible = "LDO22"; + regulator-name = "VMEM_VDD_2.8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-mem-off; + }; + + ldo23_reg: ldo23 { + regulator-compatible = "LDO23"; + regulator-name = "TSP_AVDD_3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-mem-idle; + }; + + ldo24_reg: ldo24 { + regulator-compatible = "LDO24"; + regulator-name = "TSP_VDD_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo25_reg: ldo25 { + regulator-compatible = "LDO25"; + regulator-name = "LCD_VCC_3.3V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-mem-idle; + }; + + ldo26_reg: ldo26 { + regulator-compatible = "LDO26"; + regulator-name = "MOTOR_VCC_3.0V"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-mem-idle; + }; + + buck1_reg: buck1 { + regulator-compatible = "BUCK1"; + regulator-name = "vdd_mif"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1100000>; + regulator-always-on; + regulator-boot-on; + regulator-mem-off; + }; + + buck2_reg: buck2 { + regulator-compatible = "BUCK2"; + regulator-name = "vdd_arm"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + regulator-boot-on; + regulator-mem-off; + }; + + buck3_reg: buck3 { + regulator-compatible = "BUCK3"; + regulator-name = "vdd_int"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1150000>; + regulator-always-on; + regulator-boot-on; + regulator-mem-off; + }; + + buck4_reg: buck4 { + regulator-compatible = "BUCK4"; + regulator-name = "vdd_g3d"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1150000>; + regulator-boot-on; + regulator-mem-off; + }; + + buck5_reg: buck5 { + regulator-compatible = "BUCK5"; + regulator-name = "VMEM_1.2V_AP"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + }; + + buck6_reg: buck6 { + regulator-compatible = "BUCK6"; + regulator-name = "VCC_SUB_1.35V"; + regulator-min-microvolt = <1350000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + }; + + buck7_reg: buck7 { + regulator-compatible = "BUCK7"; + regulator-name = "VCC_SUB_2.0V"; + regulator-min-microvolt = <2000000>; + regulator-max-microvolt = <2000000>; + regulator-always-on; + }; + + buck8_reg: buck8 { + regulator-compatible = "BUCK8"; + regulator-name = "VMEM_VDDF_3.0V"; + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + regulator-always-on; + regulator-mem-off; + }; + + buck9_reg: buck9 { + regulator-compatible = "BUCK9"; + regulator-name = "CAM_ISP_CORE_1.2V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1200000>; + regulator-mem-off; + }; + }; + }; + }; + + fimd at 11c00000 { + compatible = "samsung,exynos-fimd"; + reg = <0x11c00000 0xa4>; + + samsung,vl-freq = <60>; + samsung,vl-col = <720>; + samsung,vl-row = <1280>; + samsung,vl-width = <720>; + samsung,vl-height = <1280>; + + samsung,vl-clkp = <0>; + samsung,vl-oep = <0>; + samsung,vl-hsp = <1>; + samsung,vl-vsp = <1>; + samsung,vl-dp = <1>; + samsung,vl-bpix = <4>; + + samsung,vl-hspw = <5>; + samsung,vl-hbpd = <10>; + samsung,vl-hfpd = <10>; + samsung,vl-vspw = <2>; + samsung,vl-vbpd = <1>; + samsung,vl-vfpd = <13>; + samsung,vl-cmd-allow-len = <0xf>; + + samsung,winid = <0>; + samsung,power-on-delay = <30>; + samsung,interface-mode = <1>; + samsung,mipi-enabled = <1>; + samsung,dp-enabled; + samsung,dual-lcd-enabled; + + samsung,logo-on = <1>; + samsung,resolution = <0>; + samsung,rgb-mode = <0>; + }; + + mipidsi at 11c80000 { + compatible = "samsung,exynos-mipi-dsi"; + reg = <0x11c80000 0x5c>; + + samsung,dsim-config-e_interface = <1>; + samsung,dsim-config-e_virtual_ch = <0>; + samsung,dsim-config-e_pixel_format = <7>; + samsung,dsim-config-e_burst_mode = <1>; + samsung,dsim-config-e_no_data_lane = <3>; + samsung,dsim-config-e_byte_clk = <0>; + samsung,dsim-config-hfp = <1>; + + samsung,dsim-config-p = <3>; + samsung,dsim-config-m = <120>; + samsung,dsim-config-s = <1>; + + samsung,dsim-config-pll_stable_time = <500>; + samsung,dsim-config-esc_clk = <20000000>; + samsung,dsim-config-stop_holding_cnt = <0x7ff>; + samsung,dsim-config-bta_timeout = <0xff>; + samsung,dsim-config-rx_timeout = <0xffff>; + + samsung,dsim-device-id = <0xffffffff>; + samsung,dsim-device-bus_id = <0>; + + samsung,dsim-device-reverse_panel = <1>; + }; + + sdhci at 12510000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + pwr-gpios = <&gpio 0x2004002 0>; + }; + + sdhci at 12520000 { + status = "disabled"; + }; + + sdhci at 12530000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + cd-gpios = <&gpio 0x20C6004 0>; + }; + + sdhci at 12540000 { + status = "disabled"; + }; +};board/samsung/trats2/trats2.c +7
-209@@ -8,13 +8,6 @@#include <common.h> #include <lcd.h> -#include <asm/io.h> -#include <asm/arch/gpio.h> -#include <asm/arch/mmc.h> -#include <asm/arch/power.h> -#include <asm/arch/clk.h> -#include <asm/arch/clock.h> -#include <asm/arch/mipi_dsim.h> #include <asm/arch/pinmux.h> #include <asm/arch/power.h> #include <power/pmic.h> @@ -23,7 +16,6 @@#include <power/max77693_pmic.h> #include <power/max77693_muic.h> #include <power/max77693_fg.h> -#include <libtizen.h> #include <errno.h> #include <usb.h> #include <usb/s3c_udc.h> @@ -69,16 +61,6 @@ static void check_hw_revision(void) board_rev = modelrev <<8 ; } -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) -{ -puts ("Board:\tTRATS2\n" ); -printf ("HW Revision:\t0x%04x\n" , board_rev); - -return 0 ; -} -#endif -u32 get_board_rev (void ) {return board_rev;@@ -158,26 +140,21 @@ int get_soft_i2c_sda_pin(void)int board_early_init_f (void ) { -check_hw_revision ();board_external_gpio_init (); - gd->flags |=GD_FLG_DISABLE_CONSOLE ; +#ifdef CONFIG_SYS_I2C_INIT_BOARD +board_i2c_init (gd->fdt_blob); +#endif return 0 ; }static int pmic_init_max77686 (void ); -int board_init (void ) +int exynos_init (void ) { -struct exynos4_power *pwr = - (struct exynos4_power *)samsung_get_base_power (); - - gd->bd->bi_boot_params =PHYS_SDRAM_1 +0x100 ; - -/* workaround: clear INFORM4..5 */ -writel (0 , (unsigned int )&pwr->inform4); -writel (0 , (unsigned int )&pwr->inform5); +check_hw_revision (); +printf ("HW Revision:\t0x%04x\n" , board_rev);return 0 ; }@@ -248,90 +225,6 @@ int power_init_board(void)return 0 ; } -int dram_init (void ) -{ -u32 size_mb; - - size_mb = (get_ram_size ((long *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE ) + -get_ram_size ((long *)PHYS_SDRAM_2 ,PHYS_SDRAM_2_SIZE ) + -get_ram_size ((long *)PHYS_SDRAM_3 ,PHYS_SDRAM_3_SIZE ) + -get_ram_size ((long *)PHYS_SDRAM_4 ,PHYS_SDRAM_4_SIZE )) >>20 ; - - gd->ram_size = size_mb <<20 ; - -return 0 ; -} - -void dram_init_banksize (void ) -{ - gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_1_SIZE ; - gd->bd->bi_dram[1 ].start =PHYS_SDRAM_2 ; - gd->bd->bi_dram[1 ].size =PHYS_SDRAM_2_SIZE ; - gd->bd->bi_dram[2 ].start =PHYS_SDRAM_3 ; - gd->bd->bi_dram[2 ].size =PHYS_SDRAM_3_SIZE ; - gd->bd->bi_dram[3 ].start =PHYS_SDRAM_4 ; - gd->bd->bi_dram[3 ].size =PHYS_SDRAM_4_SIZE ; -} - -int board_mmc_init (bd_t *bis) -{ -int err0, err2 =0 ; - - gpio2 = (struct exynos4x12_gpio_part2 *)samsung_get_base_gpio_part2 (); - -/* eMMC_EN: SD_0_CDn: GPK0[2] Output High */ -s5p_gpio_direction_output (&gpio2->k0,2 ,1 ); -s5p_gpio_set_pull (&gpio2->k0,2 ,GPIO_PULL_NONE ); - -/* -* eMMC GPIO: -* SDR 8-bit at 48MHz at MMC0 -* GPK0[0] SD_0_CLK(2) -* GPK0[1] SD_0_CMD(2) -* GPK0[2] SD_0_CDn -> Not used -* GPK0[3:6] SD_0_DATA[0:3](2) -* GPK1[3:6] SD_0_DATA[0:3](3) -* -* DDR 4-bit at 26MHz at MMC4 -* GPK0[0] SD_4_CLK(3) -* GPK0[1] SD_4_CMD(3) -* GPK0[2] SD_4_CDn -> Not used -* GPK0[3:6] SD_4_DATA[0:3](3) -* GPK1[3:6] SD_4_DATA[4:7](4) -*/ - - err0 =exynos_pinmux_config (PERIPH_ID_SDMMC0 ,PINMUX_FLAG_8BIT_MODE ); - -/* -* MMC device init -* mmc0 : eMMC (8-bit buswidth) -* mmc2 : SD card (4-bit buswidth) -*/ -if (err0) -debug ("SDMMC0 not configured\n" ); -else - err0 =s5p_mmc_init (0 ,8 ); - -/* T-flash detect */ -s5p_gpio_cfg_pin (&gpio2->x3,4 ,0xf ); -s5p_gpio_set_pull (&gpio2->x3,4 ,GPIO_PULL_UP ); - -/* -* Check the T-flash detect pin -* GPX3[4] T-flash detect pin -*/ -if (!s5p_gpio_get_value (&gpio2->x3,4 )) { - err2 =exynos_pinmux_config (PERIPH_ID_SDMMC2 ,PINMUX_FLAG_NONE ); -if (err2) -debug ("SDMMC2 not configured\n" ); -else - err2 =s5p_mmc_init (2 ,4 ); - } - -return err0 & err2; -} -#ifdef CONFIG_USB_GADGET static int s5pc210_phy_control (int on) {@@ -479,46 +372,7 @@ static int pmic_init_max77686(void)*/ #ifdef CONFIG_LCD -static struct mipi_dsim_config dsim_config = { - .e_interface =DSIM_VIDEO , - .e_virtual_ch =DSIM_VIRTUAL_CH_0 , - .e_pixel_format =DSIM_24BPP_888 , - .e_burst_mode =DSIM_BURST_SYNC_EVENT , - .e_no_data_lane =DSIM_DATA_LANE_4 , - .e_byte_clk =DSIM_PLL_OUT_DIV8 , - .hfp =1 , - - .p =3 , - .m =120 , - .s =1 , - -/* D-PHY PLL stable time spec :min = 200usec ~ max 400usec */ - .pll_stable_time =500 , - -/* escape clk : 10MHz */ - .esc_clk =20 *1000000 , - -/* stop state holding counter after bta change count 0 ~ 0xfff */ - .stop_holding_cnt =0x7ff , -/* bta timeout 0 ~ 0xff */ - .bta_timeout =0xff , -/* lp rx timeout 0 ~ 0xffff */ - .rx_timeout =0xffff , -}; - -static struct exynos_platform_mipi_dsim dsim_platform_data = { - .lcd_panel_info =NULL , - .dsim_config = &dsim_config, -}; - -static struct mipi_dsim_lcd_device mipi_lcd_device = { - .name ="s6e8ax0" , - .id =-1 , - .bus_id =0 , - .platform_data = (void *)&dsim_platform_data, -}; - -static int mipi_power (void ) +int mipi_power (void ) {struct pmic *p =pmic_get ("MAX77686_PMIC" );@@ -555,62 +409,6 @@ void exynos_reset_lcd(void)udelay (10 ); s5p_gpio_set_value(&gpio1->f2, 1, 1); } - -vidinfo_t panel_info = { - .vl_freq =60 , - .vl_col =720 , - .vl_row =1280 , - .vl_width =720 , - .vl_height =1280 , - .vl_clkp =CONFIG_SYS_HIGH , - .vl_hsp =CONFIG_SYS_LOW , - .vl_vsp =CONFIG_SYS_LOW , - .vl_dp =CONFIG_SYS_LOW , - .vl_bpix =4 ,/* Bits per pixel, 2^4 = 16 */ - -/* s6e8ax0 Panel infomation */ - .vl_hspw =5 , - .vl_hbpd =10 , - .vl_hfpd =10 , - - .vl_vspw =2 , - .vl_vbpd =1 , - .vl_vfpd =13 , - .vl_cmd_allow_len =0xf , - .mipi_enabled =1 , - - .dual_lcd_enabled =0 , - - .init_delay =0 , - .power_on_delay =25 , - .reset_delay =0 , - .interface_mode =FIMD_RGB_INTERFACE , -}; - -void init_panel_info (vidinfo_t *vid) -{ - vid->logo_on =1 ; - vid->resolution =HD_RESOLUTION ; - vid->rgb_mode =MODE_RGB_P ; - - vid->power_on_delay =30 ; - - mipi_lcd_device.reverse_panel =1 ; - -#ifdef CONFIG_TIZEN -get_tizen_logo_info (vid); -#endif - -strcpy (dsim_platform_data.lcd_panel_name, mipi_lcd_device.name); - dsim_platform_data.mipi_power = mipi_power; - dsim_platform_data.phy_enable = set_mipi_phy_ctrl; - dsim_platform_data.lcd_panel_info = (void *)vid; -exynos_mipi_dsi_register_lcd_device (&mipi_lcd_device); - -s6e8ax0_init (); - -exynos_set_dsim_platform_data (&dsim_platform_data); -}#endif /* LCD */ #ifdef CONFIG_MISC_INIT_R include/configs/trats2.h +18
-181@@ -8,147 +8,32 @@* SPDX-License-Identifier: GPL-2.0+ */ -#ifndef __CONFIG_H -#define __CONFIG_H +#ifndef __CONFIG_TRATS2_H +#define __CONFIG_TRATS2_H -/* -* High Level Configuration Options -* (easy to change) -*/ -#define CONFIG_SAMSUNG /* in a SAMSUNG core */ -#define CONFIG_S5P /* which is in a S5P Family */ -#define CONFIG_EXYNOS4 /* which is in a EXYNOS4XXX */ -#define CONFIG_TIZEN /* TIZEN lib */ - -#include <asm/arch/cpu.h> /* get chip and board defs */ +#include <configs/exynos4-dt.h> -#define CONFIG_ARCH_CPU_INIT -#define CONFIG_DISPLAY_CPUINFO -#define CONFIG_DISPLAY_BOARDINFO - -#define CONFIG_SKIP_LOWLEVEL_INIT - -#define CONFIG_SYS_CACHELINE_SIZE 32 +#define CONFIG_SYS_PROMPT "Trats2 # "/* Monitor Command Prompt */ -#ifndef CONFIG_SYS_L2CACHE_OFF -#define CONFIG_SYS_L2_PL310 -#define CONFIG_SYS_PL310_BASE 0x10502000 -#endif +#undef CONFIG_DEFAULT_DEVICE_TREE +#define CONFIG_DEFAULT_DEVICE_TREE exynos4412-trats2 -#define CONFIG_NR_DRAM_BANKS 4 -#define PHYS_SDRAM_1 0x40000000/* LDDDR2 DMC 0 */ -#define PHYS_SDRAM_1_SIZE (256 << 20)/* 256 MB in CS 0 */ -#define PHYS_SDRAM_2 0x50000000/* LPDDR2 DMC 1 */ -#define PHYS_SDRAM_2_SIZE (256 << 20)/* 256 MB in CS 0 */ -#define PHYS_SDRAM_3 0x60000000/* LPDDR2 DMC 1 */ -#define PHYS_SDRAM_3_SIZE (256 << 20)/* 256 MB in CS 0 */ -#define PHYS_SDRAM_4 0x70000000/* LPDDR2 DMC 1 */ -#define PHYS_SDRAM_4_SIZE (256 << 20)/* 256 MB in CS 0 */ -#define PHYS_SDRAM_END 0x80000000 +/* TRATS2 has 4 banks of DRAM */ +#define CONFIG_NR_DRAM_BANKS 4 +#define CONFIG_SYS_SDRAM_BASE 0x40000000 +#define SDRAM_BANK_SIZE (256 << 20)/* 256 MB */ -#define CONFIG_SYS_MEM_TOP_HIDE (1 << 20)/* ram console */ +/* memtest works on */ +#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5E00000) +#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x3E00000) -#define CONFIG_SYS_SDRAM_BASE (PHYS_SDRAM_1)#define CONFIG_SYS_TEXT_BASE 0x78100000 -#define CONFIG_SYS_CLK_FREQ 24000000 - -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_CMDLINE_TAG -#define CONFIG_REVISION_TAG - -/* MACH_TYPE_TRATS2 */ -#define MACH_TYPE_TRATS2 3765 -#define CONFIG_MACH_TYPE MACH_TYPE_TRATS2 - -#define CONFIG_DISPLAY_CPUINFO - -#include <asm/sizes.h> -/* Size of malloc() pool */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (80 * SZ_1M)) - -/* select serial console configuration */ -#define CONFIG_SERIAL2 - -#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ -#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " - -#define CONFIG_CMDLINE_EDITING - -#define CONFIG_BAUDRATE 115200 - -/* It should define before config_cmd_default.h */ -#define CONFIG_SYS_NO_FLASH - -/*********************************************************** -* Command definition -***********************************************************/ -#include <config_cmd_default.h> - -#undef CONFIG_CMD_ECHO -#undef CONFIG_CMD_FPGA -#undef CONFIG_CMD_FLASH -#undef CONFIG_CMD_IMLS -#undef CONFIG_CMD_NAND -#undef CONFIG_CMD_MISC -#undef CONFIG_CMD_NFS -#undef CONFIG_CMD_SOURCE -#undef CONFIG_CMD_XIMG -#define CONFIG_CMD_CACHE -#define CONFIG_CMD_I2C -#define CONFIG_CMD_MMC -#define CONFIG_CMD_DFU -#define CONFIG_CMD_GPT -#define CONFIG_CMD_PMIC - -#define CONFIG_BOOTDELAY 3 -#define CONFIG_ZERO_BOOTDELAY_CHECK - -#define CONFIG_CMD_FAT -#define CONFIG_FAT_WRITE - -/* EXT4 */ -#define CONFIG_CMD_EXT4 -#define CONFIG_CMD_EXT4_WRITE - -/* USB Composite download gadget - g_dnl */ -#define CONFIG_USBDOWNLOAD_GADGET -#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_32M -#define CONFIG_DFU_FUNCTION -#define CONFIG_DFU_MMC - -/* TIZEN THOR downloader support */ -#define CONFIG_CMD_THOR_DOWNLOAD -#define CONFIG_THOR_FUNCTION - -/* USB Samsung's IDs */ -#define CONFIG_G_DNL_VENDOR_NUM 0x04E8 -#define CONFIG_G_DNL_PRODUCT_NUM 0x6601 -#define CONFIG_G_DNL_THOR_VENDOR_NUM CONFIG_G_DNL_VENDOR_NUM -#define CONFIG_G_DNL_THOR_PRODUCT_NUM 0x685D -#define CONFIG_G_DNL_MANUFACTURER "Samsung" - -/* To use the TFTPBOOT over USB, Please enable the CONFIG_CMD_NET */ -#undef CONFIG_CMD_NET - -/* MMC */ -#define CONFIG_GENERIC_MMC -#define CONFIG_MMC -#define CONFIG_S5P_SDHCI -#define CONFIG_SDHCI -#define CONFIG_MMC_SDMA -#define CONFIG_MMC_DEFAULT_DEV 0 - -/* PWM */ -#define CONFIG_PWM - -#define CONFIG_BOOTARGS "Please use defined boot" -#define CONFIG_BOOTCOMMAND "run mmcboot" -#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" +#define CONFIG_BOOTARGS "Please use defined boot" +#define CONFIG_BOOTCOMMAND "run mmcboot"#define CONFIG_ENV_OVERWRITE -#define CONFIG_SYS_CONSOLE_INFO_QUIET -#define CONFIG_SYS_CONSOLE_IS_IN_ENV #define CONFIG_ENV_VARS_UBOOT_CONFIG #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG @@ -240,46 +125,6 @@"setenv spl_addr_tmp;\0" \"fdtaddr=40800000\0" \ -/* -* Miscellaneous configurable options - */ -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#define CONFIG_SYS_PROMPT "Trats2 # "/* Monitor Command Prompt */ -#define CONFIG_SYS_CBSIZE 256/* Console I/O Buffer Size */ -#define CONFIG_SYS_PBSIZE 384/* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 32/* max number of command args */ - -/* Boot Argument Buffer Size */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE - -/* memtest works on */ -#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE -#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x5000000) -#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x4800000) - -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - - GENERATED_GBL_DATA_SIZE) - -/* valid baudrates */ -#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } - -#define CONFIG_SYS_MONITOR_BASE 0x00000000 - -/*----------------------------------------------------------------------- -* FLASH and environment organization -*/ - -#define CONFIG_SYS_MONITOR_LEN (256 << 10)/* Reserve 2 sectors */ - -#define CONFIG_ENV_IS_IN_MMC -#define CONFIG_SYS_MMC_ENV_DEV CONFIG_MMC_DEFAULT_DEV -#define CONFIG_ENV_SIZE 4096 -#define CONFIG_ENV_OFFSET ((32 - 4) << 10)/* 32KiB - 4KiB */ -#define CONFIG_EFI_PARTITION -#define CONFIG_PARTITION_UUIDS - -#define CONFIG_BOARD_EARLY_INIT_F - /* I2C */#include <asm/arch/gpio.h> @@ -312,11 +157,6 @@ int get_soft_i2c_sda_pin(void);#define CONFIG_POWER_MUIC_MAX77693 #define CONFIG_POWER_FG_MAX77693 #define CONFIG_POWER_BATTERY_TRATS2 -#define CONFIG_USB_GADGET -#define CONFIG_USB_GADGET_S3C_UDC_OTG -#define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2 -#define CONFIG_USB_CABLE_CHECK /* Common misc for Samsung */ #define CONFIG_MISC_COMMON @@ -356,10 +196,7 @@ int get_soft_i2c_sda_pin(void);#define CONFIG_VIDEO_BMP_GZIP #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 160 * 4) + 54) -#define CONFIG_CMD_USB_MASS_STORAGE -#define CONFIG_USB_GADGET_MASS_STORAGE - -/* Pass open firmware flat tree */ -#define CONFIG_OF_LIBFDT 1 +#define LCD_XRES 720 +#define LCD_YRES 1280#endif /* __CONFIG_H */
PATCH 9/9 board:trats2:fdt: Enable device tree on Trats2
Hi Jaehoon,
Quoted 48 lines · Piotr Wilczek
Quoted 7 lines
This patch enables to run Trats2 board on device tree.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>CC Minkyu Kang <[email protected]>--- board/samsung/dts/exynos4412-trats2.dts | 434+++++++++++++++++++++++++++++++
Quoted 39 lines
board/samsung/trats2/trats2.c | 216 +-------------- include/configs/trats2.h | 199 ++------------ 3 files changed, 459 insertions(+), 390 deletions(-) create mode100644
board/samsung/dts/exynos4412-trats2.dtsboard/samsung/dts/exynos4412-trats2.dts new file +27
-0@@ -0,0 +1,434 @@ +/* + * Samsung's Exynos4412 based Trats2 board device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "exynos4.dtsi" + +/ { + model = "Samsung Trats2 based on Exynos4412"; + compatible = "samsung,trats2", "samsung,exynos4412"; + + config { + samsung,dsim-device-name = "s6e8ax0"; + }; + + aliases { + i2c0 = "/i2c at 13860000"; + i2c1 = "/i2c at 13870000"; + i2c2 = "/i2c at 13880000"; + i2c3 = "/i2c at 13890000"; + i2c4 = "/i2c at 138a0000"; + i2c5 = "/i2c at 138b0000";
Quoted 8 lines
board/samsung/dts/exynos4412-trats2.dts line 33
Quoted 6 lines
board/samsung/dts/exynos4412-trats2.dts new file +6
-0+ i2c6 = "/i2c at 138c0000"; + i2c7 = "/i2c at 138d0000"; + serial0 = "/serial at 13800000"; + console = "/serial at 13820000"; + mmc0 = "sdhci at 12510000"; + mmc2 = "sdhci at 12510000";mmc2 isn't
0x12510000.
It is 0x12530000, thanks.
Best regards,
Piotr Wilczek
v2 cover Exynos4: add support for device tree
In reply to Piotr WilczekThis patch set enables support for device tree on all Exynos4 based boards.
DT support is enabled on Exynos mipi dsim and sdhci drives. Common board.c file is reused for all functions common for Exynos4 boards. Board specific files are implemented in the board siles. Origen, Universal, Trats and Trats2 boards are modifed to support device tree.
Piotr Wilczek (12):
exynos4:pinmux:fdt: decode peripheral id video:mipidsim:fdt: Add DT support for mipi dsim driver video:exynos_fb:fdt: add additional fdt data drivers:mmc:sdhci: enable support for DT board:samsung:common: remove unused max77686 init function board:samsung: move checkboard to common file arm:exynos: add common DTS file for exynos 4 arm:exynos: enble sdhci and misc_init to common board board:origen: Enable device tree on Origen board:universal: Enable device tree on Universal board:trats: Enable device tree on Trats board:trats2: Enable device tree on Trats2
arch/arm/cpu/armv7/exynos/pinmux.c | 17 + arch/arm/dts/exynos4.dtsi | 139 ++++++++ arch/arm/include/asm/arch-exynos/board.h | 12 + arch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 + arch/arm/include/asm/arch-exynos/mmc.h | 7 + board/samsung/common/board.c | 182 +++------- board/samsung/dts/exynos4210-origen.dts | 45 +++ board/samsung/dts/exynos4210-trats.dts | 120 +++++++ board/samsung/dts/exynos4210-universal_c210.dts | 83 +++++ board/samsung/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++++ board/samsung/origen/origen.c | 112 +----- board/samsung/smdk5250/exynos5-dt.c | 15 - board/samsung/smdk5420/smdk5420.c | 15 - board/samsung/trats/trats.c | 213 +---------- board/samsung/trats2/trats2.c | 233 +----------- board/samsung/universal_c210/universal.c | 204 +++-------- drivers/mmc/s5p_sdhci.c | 129 +++++++ drivers/video/exynos_fb.c | 21 ++ drivers/video/exynos_mipi_dsi.c | 96 +++++ include/configs/exynos4-dt.h | 144 ++++++++ include/configs/origen.h | 117 +++--- include/configs/s5pc210_universal.h | 145 +++----- include/configs/trats.h | 192 +++------- include/configs/trats2.h | 198 ++--------- include/fdtdec.h | 2 + include/sdhci.h | 5 + lib/fdtdec.c | 2 + 27 files changed, 1553 insertions(+), 1334 deletions(-) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 board/samsung/dts/exynos4210-origen.dts create mode 100644 board/samsung/dts/exynos4210-trats.dts create mode 100644 board/samsung/dts/exynos4210-universal_c210.dts create mode 100644 board/samsung/dts/exynos4412-trats2.dts create mode 100644 include/configs/exynos4-dt.h
Signature · 1 line
1.7.9.5
PATCH v2 1/12 exynos4:pinmux:fdt: decode peripheral id
This patch adds api to decode peripheral id based in interrupt number.
---
Changes for v2:
- removed incorrectly implemented check for invalid peripheral id;
- removed unnecesary white space;
arch/arm/cpu/armv7/exynos/pinmux.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/cpu/armv7/exynos/pinmux.c +17 -0
@@ -741,6 +741,21 @@ int exynos_pinmux_config(int peripheral, int flags) }#ifdef CONFIG_OF_CONTROL +static int exynos4_pinmux_decode_periph_id (const void *blob,int node) +{ +int err; +u32 cell[3 ]; + + err =fdtdec_get_int_array (blob, node,"interrupts" , cell, +ARRAY_SIZE (cell)); +if (err) { +debug (" invalid peripheral id\n" ); +return PERIPH_ID_NONE ; + } + +return cell[1 ]; +} +static int exynos5_pinmux_decode_periph_id (const void *blob,int node) {int err;
@@ -758,6 +773,8 @@ int pinmux_decode_periph_id(const void *blob, int node) {if (cpu_is_exynos5 ())return exynos5_pinmux_decode_periph_id (blob, node); +else if (cpu_is_exynos4 ()) +return exynos4_pinmux_decode_periph_id (blob, node);else return PERIPH_ID_NONE ; }
Signature · 1 line
1.7.9.5
PATCH v2 2/12 video:mipidsim:fdt: Add DT support for mipi dsim driver
In reply to Piotr WilczekThis patch enables parsing mipi data from device tree. Non device tree case is still supported.
---
Changes for v2:
- removed panel specific init function 's6e8ax0_init' to the board file;
arch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 ++ drivers/video/exynos_mipi_dsi.c | 96 ++++++++++++++++++++++++++ include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 4 files changed, 103 insertions(+)
arch/arm/include/asm/arch-exynos/mipi_dsim.h +5 -0
@@ -12,6 +12,7 @@#include <linux/list.h> #include <linux/fb.h> +#include <lcd.h> #define PANEL_NAME_SIZE (32)
@@ -368,8 +369,12 @@ int exynos_mipi_dsi_register_lcd_device(struct mipi_dsim_lcd_device *lcd_dev);void exynos_set_dsim_platform_data (struct exynos_platform_mipi_dsim *pd); +void exynos_init_dsim_platform_data (vidinfo_t *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void ); +#ifdef CONFIG_OF_CONTROL +extern int mipi_power (void ); +#endif #endif /* _DSIM_H */
drivers/video/exynos_mipi_dsi.c +96 -0
112 lines not on this page · raw message
include/fdtdec.h +1 -0
@@ -78,6 +78,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS5_USB3_PHY ,/* Exynos phy controller for usb3.0 */ COMPAT_SAMSUNG_EXYNOS_TMU ,/* Exynos TMU */ COMPAT_SAMSUNG_EXYNOS_FIMD ,/* Exynos Display controller */ +COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */
lib/fdtdec.c +1 -0
@@ -51,6 +51,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS5_USB3_PHY ,"samsung,exynos5250-usb3-phy" ),COMPAT (SAMSUNG_EXYNOS_TMU ,"samsung,exynos-tmu" ),COMPAT (SAMSUNG_EXYNOS_FIMD ,"samsung,exynos-fimd" ), +COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"),
Signature · 1 line
1.7.9.5
PATCH v2 3/12 video:exynos_fb:fdt: add additional fdt data
In reply to Piotr WilczekThis patch adds additional data parsing from DTB and adds the new exynos_lcd_panel_init() function for panel specific initialisation the from board file.
---
Changes for v2:
- removed duplicate DTB node parsing for panel_info.logo_on;
- added (weak) exynos_lcd_panel_init function for panel specific
initialisation from board file;
drivers/video/exynos_fb.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
drivers/video/exynos_fb.c +21 -0
@@ -104,6 +104,13 @@ void __exynos_backlight_reset(void)void exynos_backlight_reset (void ) __attribute__((weak,alias ("__exynos_backlight_reset" ))); +int __exynos_lcd_panel_init (vidinfo_t *vid) +{ +return 0 ; +} +int exynos_lcd_panel_init (vidinfo_t *vid) + __attribute__((weak,alias ("__exynos_lcd_panel_init" ))); +static void lcd_panel_on (vidinfo_t *vid) {udelay (vid->init_delay);
@@ -269,6 +276,15 @@ int exynos_fimd_parse_dt(const void *blob) panel_info.dual_lcd_enabled =fdtdec_get_int (blob, node,"samsung,dual-lcd-enabled" ,0 ); + panel_info.resolution =fdtdec_get_int (blob, node, +"samsung,resolution" ,0 ); + + panel_info.rgb_mode =fdtdec_get_int (blob, node, +"samsung,rgb-mode" ,0 ); + + panel_info.power_on_delay =fdtdec_get_int (blob, node, +"samsung,power-on-delay" ,0 ); + return 0; }#endif
@@ -281,10 +297,15 @@ void lcd_ctrl_init(void *lcdbase)#ifdef CONFIG_OF_CONTROL if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info); +#endif +exynos_lcd_panel_init (&panel_info);#else /* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);#endif + panel_width = panel_info.vl_width; panel_height = panel_info.vl_height;
Signature · 1 line
1.7.9.5
PATCH v2 4/12 drivers:mmc:sdhci: enable support for DT
In reply to Piotr WilczekThis patch enables support for device tree for sdhci driver. Non DT case is still supported.
---
Changes for v2:
- fixed checking for SDMMC boundary;
- fiex debug message;
- fixed comment to 'pwr_gpio' struct filed;
arch/arm/include/asm/arch-exynos/mmc.h | 7 ++ drivers/mmc/s5p_sdhci.c | 129 ++++++++++++++++++++++++++++++++ include/fdtdec.h | 1 + include/sdhci.h | 5 ++ lib/fdtdec.c | 1 + 5 files changed, 143 insertions(+)
arch/arm/include/asm/arch-exynos/mmc.h +7 -0
@@ -53,6 +53,8 @@#define SDHCI_CTRL4_DRIVE_MASK (_x) ((_x) << 16)#define SDHCI_CTRL4_DRIVE_SHIFT (16) +#define SDHCI_MAX_HOSTS 4 +int s5p_sdhci_init (u32 regbase,int index,int bus_width);static inline int s5p_mmc_init (int index,int bus_width)
@@ -62,4 +64,9 @@ static inline int s5p_mmc_init(int index, int bus_width) return s5p_sdhci_init(base, index, bus_width); } + +#ifdef CONFIG_OF_CONTROL +int exynos_mmc_init (const void *blob); +#endif +#endif
drivers/mmc/s5p_sdhci.c +129 -0
140 lines not on this page · raw message
include/fdtdec.h +1 -0
@@ -81,6 +81,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ +COMPAT_SAMSUNG_EXYNOS_MMC ,/* Exynos MMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL ,/* Exynos UART */ COMPAT_MAXIM_MAX77686_PMIC ,/* MAX77686 PMIC */ COMPAT_GENERIC_SPI_FLASH, /* Generic SPI Flash chip */
include/sdhci.h +5 -0
@@ -12,6 +12,7 @@#include <asm/io.h> #include <mmc.h> +#include <fdtdec.h> /* * Controller registers
@@ -244,6 +245,10 @@ struct sdhci_host {const struct sdhci_ops *ops;int index; +int bus_width; +struct fdt_gpio_state pwr_gpio;/* Power GPIO */ +struct fdt_gpio_state cd_gpio;/* Card Detect GPIO */ +void (*set_control_reg)(struct sdhci_host *host);void (*set_clock)(int dev_index,unsigned int div);uint voltages;
lib/fdtdec.c +1 -0
@@ -54,6 +54,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), +COMPAT (SAMSUNG_EXYNOS_MMC ,"samsung,exynos-mmc" ),COMPAT (SAMSUNG_EXYNOS_SERIAL ,"samsung,exynos4210-uart" ),COMPAT (MAXIM_MAX77686_PMIC ,"maxim,max77686_pmic" ), COMPAT(GENERIC_SPI_FLASH, "spi-flash"),
Signature · 1 line
1.7.9.5
PATCH v2 5/12 board:samsung:common: remove unused max77686 init function
In reply to Piotr WilczekThis patch removes currently unused max77686_init function. Despite being not used, it's implementation is board specific.
---
Changes for v2:
- new patch
board/samsung/common/board.c | 120 ------------------------------------------ 1 file changed, 120 deletions(-)
board/samsung/common/board.c +0 -120
@@ -22,7 +22,6 @@#include <asm/arch/power.h> #include <power/pmic.h> #include <asm/arch/sromc.h> -#include <power/max77686_pmic.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -160,133 +159,14 @@ static int board_init_cros_ec_devices(const void *blob) }#endif -#if defined(CONFIG_POWER ) -#ifdef CONFIG_POWER_MAX77686 -static int pmic_reg_update (struct pmic *p,int reg,uint regval) -{ -u32 val; -int ret =0 ; - - ret =pmic_reg_read (p, reg, &val); -if (ret) { -debug ("%s: PMIC %d register read failed\n" , __func__, reg); -return -1 ; - } - val |= regval; - ret =pmic_reg_write (p, reg, val); -if (ret) { -debug ("%s: PMIC %d register write failed\n" , __func__, reg); -return -1 ; - } -return 0 ; -} - -static int max77686_init (void ) -{ -struct pmic *p; - -if (pmic_init (I2C_PMIC )) -return -1 ; - - p =pmic_get ("MAX77686_PMIC" ); -if (!p) -return -ENODEV ; - -if (pmic_probe (p)) -return -1 ; - -if (pmic_reg_update (p,MAX77686_REG_PMIC_32KHZ ,MAX77686_32KHCP_EN )) -return -1 ; - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BBAT , -MAX77686_BBCHOSTEN |MAX77686_BBCVS_3_5V )) -return -1 ; - -/* VDD_MIF */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK1OUT , -MAX77686_BUCK1OUT_1V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK1OUT ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK1CRTL , -MAX77686_BUCK1CTRL_EN )) -return -1 ; - -/* VDD_ARM */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK2DVS1 , -MAX77686_BUCK2DVS1_1_3V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK2DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK2CTRL1 , -MAX77686_BUCK2CTRL_ON )) -return -1 ; - -/* VDD_INT */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK3DVS1 , -MAX77686_BUCK3DVS1_1_0125V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK3DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK3CTRL , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_G3D */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK4DVS1 , -MAX77686_BUCK4DVS1_1_2V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK4DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK4CTRL1 , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_LDO2 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO2CTRL1 , -MAX77686_LD02CTRL1_1_5V |EN_LDO )) -return -1 ; - -/* VDD_LDO3 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO3CTRL1 , -MAX77686_LD03CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO5 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO5CTRL1 , -MAX77686_LD05CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO10 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO10CTRL1 , -MAX77686_LD10CTRL1_1_8V |EN_LDO )) -return -1 ; - -return 0 ; -} -#endif -int power_init_board (void ) {int ret =0 ;set_ps_hold_ctrl (); -#ifdef CONFIG_POWER_MAX77686 - ret =max77686_init (); -#endif -return ret; } -#endif #ifdef CONFIG_OF_CONTROL static int decode_sromc (const void *blob,struct fdt_sromc *config)
Signature · 1 line
1.7.9.5
PATCH v2 5/12 board:samsung:common: remove unused max77686 init function
Hi Piotr,
Quoted 3 lines · Piotr Wilczek
This patch removes currently unused
max77686_initfunction. Despite being not used, it's implementation is board specific.
MAX77686 is required for 5250, but missed it somehow when adding 5420 support and making a common config file for both. It is my mistake will correct the same
You can refer:
"[U-Boot] [PATCH V5 0/6] SMDK5420: Add S2MPS11 pmic support to SMDK5420" by Leela Krishna Amudala
It adds a generic way for PMIC support.
http://lists.denx.de/pipermail/u-boot/2014-January/171113.html
Regards,
Rajeshwari
Quoted 164 lines
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Rajeshwari S Shinde <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v2:
- new patchboard/samsung/common/board.c | 120 ------------------------------------------ 1 file changed, 120 deletions(-)board/samsung/common/board.c +0
-121@@ -22,7 +22,6 @@#include <asm/arch/power.h> #include <power/pmic.h> #include <asm/arch/sromc.h> -#include <power/max77686_pmic.h> DECLARE_GLOBAL_DATA_PTR ;@@ -160,133 +159,14 @@ static int board_init_cros_ec_devices(const void *blob) }#endif -#if defined(CONFIG_POWER ) -#ifdef CONFIG_POWER_MAX77686 -static int pmic_reg_update (struct pmic *p,int reg,uint regval) -{ -u32 val; -int ret =0 ; - - ret =pmic_reg_read (p, reg, &val); -if (ret) { -debug ("%s: PMIC %d register read failed\n" , __func__, reg); -return -1 ; - } - val |= regval; - ret =pmic_reg_write (p, reg, val); -if (ret) { -debug ("%s: PMIC %d register write failed\n" , __func__, reg); -return -1 ; - } -return 0 ; -} - -static int max77686_init (void ) -{ -struct pmic *p; - -if (pmic_init (I2C_PMIC )) -return -1 ; - - p =pmic_get ("MAX77686_PMIC" ); -if (!p) -return -ENODEV ; - -if (pmic_probe (p)) -return -1 ; - -if (pmic_reg_update (p,MAX77686_REG_PMIC_32KHZ ,MAX77686_32KHCP_EN )) -return -1 ; - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BBAT , -MAX77686_BBCHOSTEN |MAX77686_BBCVS_3_5V )) -return -1 ; - -/* VDD_MIF */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK1OUT , -MAX77686_BUCK1OUT_1V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK1OUT ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK1CRTL , -MAX77686_BUCK1CTRL_EN )) -return -1 ; - -/* VDD_ARM */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK2DVS1 , -MAX77686_BUCK2DVS1_1_3V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK2DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK2CTRL1 , -MAX77686_BUCK2CTRL_ON )) -return -1 ; - -/* VDD_INT */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK3DVS1 , -MAX77686_BUCK3DVS1_1_0125V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK3DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK3CTRL , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_G3D */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK4DVS1 , -MAX77686_BUCK4DVS1_1_2V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK4DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK4CTRL1 , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_LDO2 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO2CTRL1 , -MAX77686_LD02CTRL1_1_5V |EN_LDO )) -return -1 ; - -/* VDD_LDO3 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO3CTRL1 , -MAX77686_LD03CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO5 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO5CTRL1 , -MAX77686_LD05CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO10 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO10CTRL1 , -MAX77686_LD10CTRL1_1_8V |EN_LDO )) -return -1 ; - -return 0 ; -} -#endif -int power_init_board (void ) {int ret =0 ;set_ps_hold_ctrl (); -#ifdef CONFIG_POWER_MAX77686 - ret =max77686_init (); -#endif -return ret; } -#endif #ifdef CONFIG_OF_CONTROL static int decode_sromc (const void *blob,struct fdt_sromc *config) --1.7.9.5
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Signature · 2 lines
Regards, Rajeshwari Shinde
PATCH v2 5/12 board:samsung:common: remove unused max77686 init function
Hi Rajeshwari,
Quoted 16 lines
-----Original Message-----
From: Rajeshwari Birje [mailto:rajeshwari.birje at gmail.com]
Sent: Friday, February 14, 2014 6:32 AM
To: Piotr Wilczek
Cc: u-boot at lists.denx.de; Jaehoon Chung; Kyungmin Park; Rajeshwari S Shinde
Subject: Re: [U-Boot] [PATCH V2 05/12] board:samsung:common: remove unused max77686 init functionHi Piotr,
Quoted 3 lines · Piotr Wilczek
This patch removes currently unused
max77686_initfunction. Despite being not used, it's implementation is board specific.
Quoted 8 lines
MAX77686 is required for 5250, but missed it somehow when adding 5420 support and making a common config file for both. It is my mistake will correct the same You can refer:
"[U-Boot] [PATCH V5 0/6] SMDK5420: Add S2MPS11 pmic support to SMDK5420" by Leela Krishna Amudala It adds a generic way for PMIC support.
http://lists.denx.de/pipermail/u-boot/2014-January/171113.html
MAX77686 is also used at Trats2 so max77686_init must be either generic based on DT or moved to the board file.
Best regards,
Piotr
Quoted 180 lines
Regards,
RajeshwariQuoted 27 lines
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Rajeshwari S Shinde <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v2:
- new patchboard/samsung/common/board.c | 120 ------------------------------------------ 1 file changed, 120 deletions(-)(quoted diff) +0
-0
b/board/samsung/common/board.cindex cd873bc..3ac8005 100644board/samsung/common/board.c +0
-1@@ -22,7 +22,6 @@#include <asm/arch/power.h> #include <power/pmic.h> #include <asm/arch/sromc.h> -#include <power/max77686_pmic.h> DECLARE_GLOBAL_DATA_PTR ;@@ -160,133 +159,14 @@ static int board_init_cros_ec_devices(constvoid *blob) } #endif
board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 9 lines
board/samsung/common/board.c +0
-9-#if defined(CONFIG_POWER) -#ifdef CONFIG_POWER_MAX77686 -static int pmic_reg_update(struct pmic *p, int reg, uint regval) -{ - u32 val; - int ret = 0; - - ret = pmic_reg_read(p, reg, &val); - if (ret) { - debug("%s: PMIC %d register read failed\n", __func__,reg);
board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 6 lines
board/samsung/common/board.c +0
-6-return -1 ; - } - val |= regval; - ret =pmic_reg_write (p, reg, val); -if (ret) { - debug("%s: PMIC %d register write failed\n",
__func__, reg);Quoted 10 lines
board/samsung/common/board.c +0
-10-return -1 ; - } -return 0 ; -} - -static int max77686_init (void ) -{ -struct pmic *p; - -if (pmic_init (I2C_PMIC ))board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 10 lines
board/samsung/common/board.c +0
-10-return -1 ; - - p =pmic_get ("MAX77686_PMIC" ); -if (!p) -return -ENODEV ; - -if (pmic_probe (p)) -return -1 ; - - if (pmic_reg_update(p, MAX77686_REG_PMIC_32KHZ,
MAX77686_32KHCP_EN))board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 4 lines
board/samsung/common/board.c +0
-4-return -1 ; - - if (pmic_reg_update(p, MAX77686_REG_PMIC_BBAT, - MAX77686_BBCHOSTEN |
MAX77686_BBCVS_3_5V))board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 6 lines
board/samsung/common/board.c +0
-6-return -1 ; - -/* VDD_MIF */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK1OUT , -MAX77686_BUCK1OUT_1V )) { - debug("%s: PMIC %d register write failed\n",
__func__,board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 12 lines
board/samsung/common/board.c +0
-12- MAX77686_REG_PMIC_BUCK1OUT); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK1CRTL , -MAX77686_BUCK1CTRL_EN )) -return -1 ; - -/* VDD_ARM */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK2DVS1 , -MAX77686_BUCK2DVS1_1_3V )) { - debug("%s: PMIC %d register write failed\n",
__func__,board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 12 lines
board/samsung/common/board.c +0
-12- MAX77686_REG_PMIC_BUCK2DVS1); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK2CTRL1 , -MAX77686_BUCK2CTRL_ON )) -return -1 ; - -/* VDD_INT */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK3DVS1 , -MAX77686_BUCK3DVS1_1_0125V )) { - debug("%s: PMIC %d register write failed\n",
__func__,board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 12 lines
board/samsung/common/board.c +0
-12- MAX77686_REG_PMIC_BUCK3DVS1); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK3CTRL , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_G3D */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK4DVS1 , -MAX77686_BUCK4DVS1_1_2V )) { - debug("%s: PMIC %d register write failed\n",
__func__,Quoted 51 lines
board/samsung/common/board.c +0
-38- MAX77686_REG_PMIC_BUCK4DVS1); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK4CTRL1 , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_LDO2 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO2CTRL1 , -MAX77686_LD02CTRL1_1_5V |EN_LDO )) -return -1 ; - -/* VDD_LDO3 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO3CTRL1 , -MAX77686_LD03CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO5 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO5CTRL1 , -MAX77686_LD05CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO10 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO10CTRL1 , -MAX77686_LD10CTRL1_1_8V |EN_LDO )) -return -1 ; - -return 0 ; -} -#endif -int power_init_board (void ) {int ret =0 ;set_ps_hold_ctrl (); -#ifdef CONFIG_POWER_MAX77686 - ret =max77686_init (); -#endif -return ret; } -#endif #ifdef CONFIG_OF_CONTROL static int decode_sromc (const void *blob,struct fdt_sromc *config) --1.7.9.5
Quoted 4 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot--
Regards,
Rajeshwari Shinde
PATCH v2 5/12 board:samsung:common: remove unused max77686 init function
Hi Piotr,
Quoted 26 lines · Piotr Wilczek
Hi Rajeshwari,
Quoted 16 lines
-----Original Message-----
From: Rajeshwari Birje [mailto:rajeshwari.birje at gmail.com]
Sent: Friday, February 14, 2014 6:32 AM
To: Piotr Wilczek
Cc: u-boot at lists.denx.de; Jaehoon Chung; Kyungmin Park; Rajeshwari S Shinde
Subject: Re: [U-Boot] [PATCH V2 05/12] board:samsung:common: remove unused max77686 init functionHi Piotr,
Quoted 3 lines · Piotr Wilczek
This patch removes currently unused
max77686_initfunction. Despite being not used, it's implementation is board specific.Quoted 8 lines
MAX77686 is required for 5250, but missed it somehow when adding 5420 support and making a common config file for both. It is my mistake will correct the same You can refer:
"[U-Boot] [PATCH V5 0/6] SMDK5420: Add S2MPS11 pmic support to SMDK5420" by Leela Krishna Amudala It adds a generic way for PMIC support.
http://lists.denx.de/pipermail/u-boot/2014-January/171113.html
Quoted 2 lines
MAX77686 is also used at Trats2 so
max77686_initmust be either generic based on DT or moved to the board file.
Generic in the sense you want all registers to be set and there values have to come from DT file?
Which ever you feel OK is fine with me.
Regards,
Rajeshwari
Quoted 186 lines
Best regards,
PiotrQuoted 180 lines
Regards,
RajeshwariQuoted 27 lines
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Rajeshwari S Shinde <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v2:
- new patchboard/samsung/common/board.c | 120 ------------------------------------------ 1 file changed, 120 deletions(-)(quoted diff) +0
-0
b/board/samsung/common/board.cindex cd873bc..3ac8005 100644board/samsung/common/board.c +0
-1@@ -22,7 +22,6 @@#include <asm/arch/power.h> #include <power/pmic.h> #include <asm/arch/sromc.h> -#include <power/max77686_pmic.h> DECLARE_GLOBAL_DATA_PTR ;@@ -160,133 +159,14 @@ static int board_init_cros_ec_devices(constvoid *blob) } #endif
board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 9 lines
board/samsung/common/board.c +0
-9-#if defined(CONFIG_POWER) -#ifdef CONFIG_POWER_MAX77686 -static int pmic_reg_update(struct pmic *p, int reg, uint regval) -{ - u32 val; - int ret = 0; - - ret = pmic_reg_read(p, reg, &val); - if (ret) { - debug("%s: PMIC %d register read failed\n", __func__,reg);
board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 6 lines
board/samsung/common/board.c +0
-6-return -1 ; - } - val |= regval; - ret =pmic_reg_write (p, reg, val); -if (ret) { - debug("%s: PMIC %d register write failed\n",
__func__, reg);Quoted 10 lines
board/samsung/common/board.c +0
-10-return -1 ; - } -return 0 ; -} - -static int max77686_init (void ) -{ -struct pmic *p; - -if (pmic_init (I2C_PMIC ))board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 10 lines
board/samsung/common/board.c +0
-10-return -1 ; - - p =pmic_get ("MAX77686_PMIC" ); -if (!p) -return -ENODEV ; - -if (pmic_probe (p)) -return -1 ; - - if (pmic_reg_update(p, MAX77686_REG_PMIC_32KHZ,
MAX77686_32KHCP_EN))board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 4 lines
board/samsung/common/board.c +0
-4-return -1 ; - - if (pmic_reg_update(p, MAX77686_REG_PMIC_BBAT, - MAX77686_BBCHOSTEN |
MAX77686_BBCVS_3_5V))board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 6 lines
board/samsung/common/board.c +0
-6-return -1 ; - -/* VDD_MIF */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK1OUT , -MAX77686_BUCK1OUT_1V )) { - debug("%s: PMIC %d register write failed\n",
__func__,board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 12 lines
board/samsung/common/board.c +0
-12- MAX77686_REG_PMIC_BUCK1OUT); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK1CRTL , -MAX77686_BUCK1CTRL_EN )) -return -1 ; - -/* VDD_ARM */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK2DVS1 , -MAX77686_BUCK2DVS1_1_3V )) { - debug("%s: PMIC %d register write failed\n",
__func__,board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 12 lines
board/samsung/common/board.c +0
-12- MAX77686_REG_PMIC_BUCK2DVS1); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK2CTRL1 , -MAX77686_BUCK2CTRL_ON )) -return -1 ; - -/* VDD_INT */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK3DVS1 , -MAX77686_BUCK3DVS1_1_0125V )) { - debug("%s: PMIC %d register write failed\n",
__func__,board/samsung/common/board.c static int board_init_cros_ec_devices(const void *blob)
Quoted 12 lines
board/samsung/common/board.c +0
-12- MAX77686_REG_PMIC_BUCK3DVS1); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK3CTRL , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_G3D */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK4DVS1 , -MAX77686_BUCK4DVS1_1_2V )) { - debug("%s: PMIC %d register write failed\n",
__func__,Quoted 51 lines
board/samsung/common/board.c +0
-38- MAX77686_REG_PMIC_BUCK4DVS1); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK4CTRL1 , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_LDO2 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO2CTRL1 , -MAX77686_LD02CTRL1_1_5V |EN_LDO )) -return -1 ; - -/* VDD_LDO3 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO3CTRL1 , -MAX77686_LD03CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO5 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO5CTRL1 , -MAX77686_LD05CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO10 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO10CTRL1 , -MAX77686_LD10CTRL1_1_8V |EN_LDO )) -return -1 ; - -return 0 ; -} -#endif -int power_init_board (void ) {int ret =0 ;set_ps_hold_ctrl (); -#ifdef CONFIG_POWER_MAX77686 - ret =max77686_init (); -#endif -return ret; } -#endif #ifdef CONFIG_OF_CONTROL static int decode_sromc (const void *blob,struct fdt_sromc *config) --1.7.9.5
Quoted 4 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot--
Regards,
Rajeshwari Shinde
Signature · 2 lines
Regards, Rajeshwari Shinde
PATCH v2 5/12 board:samsung:common: remove unused max77686 init function
Dear Rajeshwari and Piotr,
Quoted 29 lines · Rajeshwari Birje
Hi Piotr,
Quoted 26 lines · Piotr Wilczek
Hi Rajeshwari,
Quoted 24 lines
-----Original Message-----
From: Rajeshwari Birje [mailto:rajeshwari.birje at gmail.com]
Sent: Friday, February 14, 2014 6:32 AM
To: Piotr Wilczek
Cc: u-boot at lists.denx.de; Jaehoon Chung; Kyungmin Park; Rajeshwari S Shinde
Subject: Re: [U-Boot] [PATCH V2 05/12] board:samsung:common: remove unused max77686 init functionHi Piotr,
Quoted 3 lines · Piotr Wilczek
This patch removes currently unused
max77686_initfunction. Despite being not used, it's implementation is board specific.MAX77686 is required for 5250, but missed it somehow when adding 5420 support and making a common config file for both. It is my mistake will correct the same You can refer:
"[U-Boot] [PATCH V5 0/6] SMDK5420: Add S2MPS11 pmic support to SMDK5420" by Leela Krishna Amudala It adds a generic way for PMIC support.
http://lists.denx.de/pipermail/u-boot/2014-January/171113.html
Quoted 7 lines
Quoted 2 lines
MAX77686 is also used at Trats2 so
max77686_initmust be either generic based on DT or moved to the board file.Generic in the sense you want all registers to be set and there values have to come from DT file?
Which ever you feel OK is fine with me.
So.. do you agree to apply this patch?
or need another discussion?
Thanks,
Minkyu Kang.
PATCH v2 5/12 board:samsung:common: remove unused max77686 init function
Dear Minkyu Kang,
Quoted 46 lines
-----Original Message-----
From: Minkyu Kang [mailto:mk7.kang at samsung.com]
Sent: Saturday, February 22, 2014 8:38 AM
To: Rajeshwari Birje; Piotr Wilczek; Rajeshwari S Shinde
Cc: Jaehoon Chung; u-boot at lists.denx.de; Kyungmin Park
Subject: Re: [U-Boot] [PATCH V2 05/12] board:samsung:common: remove unused max77686 init functionDear Rajeshwari and Piotr,
Quoted 3 lines · Rajeshwari Birje
Hi Piotr,
On Fri, Feb 14, 2014 at 3:18 PM, Piotr Wilczek
Quoted 7 lines · <[email protected]> wrote:
Quoted 7 lines
Hi Rajeshwari,
Quoted 5 lines
-----Original Message-----
From: Rajeshwari Birje [mailto:rajeshwari.birje at gmail.com]
Sent: Friday, February 14, 2014 6:32 AM
To: Piotr Wilczek
Cc: u-boot at lists.denx.de; Jaehoon Chung; Kyungmin Park; RajeshwariS
Quoted 23 lines
Quoted 22 lines
Quoted 12 lines
Shinde
Subject: Re: [U-Boot] [PATCH V2 05/12] board:samsung:common: remove unused max77686 init functionHi Piotr,
Quoted 3 lines · Piotr Wilczek
This patch removes currently unused
max77686_initfunction. Despite being not used, it's implementation is board specific.Quoted 8 lines
MAX77686 is required for 5250, but missed it somehow when adding 5420 support and making a common config file for both. It is my mistake will correct the same You can refer:
"[U-Boot] [PATCH V5 0/6] SMDK5420: Add S2MPS11 pmic support to SMDK5420" by Leela Krishna Amudala It adds a generic way for PMIC support.
http://lists.denx.de/pipermail/u-boot/2014-January/171113.htmlMAX77686 is also used at Trats2 so
max77686_initmust be either generic based on DT or moved to the board file.
Quoted 9 lines
Quoted 1 line
Generic in the sense you want all registers to be set and there
values
Quoted 3 lines
have to come from DT file?
Which ever you feel OK is fine with me.So.. do you agree to apply this patch?
or need another discussion?
I will move max77686_init to smdk5250 board file and prepare v3 of this patch series.
Do you have any other comments to this series?
Quoted 2 lines
Thanks,
Minkyu Kang.
Best regards,
Piotr Wilczek
PATCH v2 5/12 board:samsung:common: remove unused max77686 init function
Quoted 54 lines · Piotr Wilczek
Dear Minkyu Kang,
Quoted 52 lines
-----Original Message-----
From: Minkyu Kang [mailto:mk7.kang at samsung.com]
Sent: Saturday, February 22, 2014 8:38 AM
To: Rajeshwari Birje; Piotr Wilczek; Rajeshwari S Shinde
Cc: Jaehoon Chung; u-boot at lists.denx.de; Kyungmin Park
Subject: Re: [U-Boot] [PATCH V2 05/12] board:samsung:common: remove unused max77686 init functionDear Rajeshwari and Piotr,
Quoted 3 lines · Rajeshwari Birje
Hi Piotr,
On Fri, Feb 14, 2014 at 3:18 PM, Piotr Wilczek
Quoted 7 lines · <[email protected]> wrote:
Quoted 7 lines
Hi Rajeshwari,
Quoted 5 lines
-----Original Message-----
From: Rajeshwari Birje [mailto:rajeshwari.birje at gmail.com]
Sent: Friday, February 14, 2014 6:32 AM
To: Piotr Wilczek
Cc: u-boot at lists.denx.de; Jaehoon Chung; Kyungmin Park; RajeshwariS
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Shinde
Subject: Re: [U-Boot] [PATCH V2 05/12] board:samsung:common: remove unused max77686 init functionHi Piotr,
Quoted 3 lines · Piotr Wilczek
This patch removes currently unused
max77686_initfunction. Despite being not used, it's implementation is board specific.MAX77686 is required for 5250, but missed it somehow when adding 5420 support and making a common config file for both. It is my mistake will correct the same You can refer:
"[U-Boot] [PATCH V5 0/6] SMDK5420: Add S2MPS11 pmic support to SMDK5420" by Leela Krishna Amudala It adds a generic way for PMIC support.
http://lists.denx.de/pipermail/u-boot/2014-January/171113.htmlQuoted 4 lines
Quoted 2 lines
MAX77686 is also used at Trats2 so
max77686_initmust be either generic based on DT or moved to the board file.Generic in the sense you want all registers to be set and there
values
Quoted 3 lines
have to come from DT file?
Which ever you feel OK is fine with me.
Quoted 6 lines
Quoted 3 lines
So.. do you agree to apply this patch?
or need another discussion?I will move
max77686_initto smdk5250 board file and prepare v3 of this patch series.
Do you have any other comments to this series?
No. looks good to me.
Thanks,
Minkyu Kang.
PATCH v2 6/12 board:samsung: move checkboard to common file
In reply to Piotr WilczekThe checkboard function's implementation is common for all DT supporting boards and should be placed in the board common file.
---
Changes for v2:
- new patch
board/samsung/common/board.c | 12 ++++++++++++ board/samsung/smdk5250/exynos5-dt.c | 15 --------------- board/samsung/smdk5420/smdk5420.c | 15 --------------- 3 files changed, 12 insertions(+), 30 deletions(-)
board/samsung/common/board.c +12 -0
@@ -257,7 +257,19 @@ int board_mmc_init(bd_t *bis)return ret; }#endif + +#ifdef CONFIG_DISPLAY_BOARDINFO +int checkboard (void ) +{ +const char *board_name; + + board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); +printf ("Board: %s\n" , board_name ? board_name :"unknown" ); + +return 0 ; +}#endif +#endif /* CONFIG_OF_CONTROL */ #ifdef CONFIG_BOARD_LATE_INIT int board_late_init (void )
board/samsung/smdk5250/exynos5-dt.c +0 -15
@@ -45,21 +45,6 @@ int exynos_init(void)return 0 ; } -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) -{ -const char *board_name; - - board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); -if (board_name ==NULL ) -printf ("\nUnknown Board\n" ); -else -printf ("\nBoard: %s\n" , board_name); - -return 0 ; -} -#endif -#ifdef CONFIG_LCD void exynos_cfg_lcd_gpio (void ) {
board/samsung/smdk5420/smdk5420.c +0 -15
@@ -142,18 +142,3 @@ int board_get_revision(void) {return 0 ; } - -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) -{ -const char *board_name; - - board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); -if (board_name ==NULL ) -printf ("\nUnknown Board\n" ); -else -printf ("\nBoard: %s\n" , board_name); - -return 0 ; -} -#endif
Signature · 1 line
1.7.9.5
PATCH v2 6/12 board:samsung: move checkboard to common file
Hi Piotr,
This looks fine.
Quoted 97 lines · Piotr Wilczek
The checkboard function's implementation is common for all DT supporting boards and should be placed in the board common file.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Chander Kashyap <[email protected]>Cc Rajeshwari S Shinde <[email protected]>Cc Amar <[email protected]>---
Changes for v2:
- new patchboard/samsung/common/board.c | 12 ++++++++++++ board/samsung/smdk5250/exynos5-dt.c | 15 --------------- board/samsung/smdk5420/smdk5420.c | 15 --------------- 3 files changed, 12 insertions(+), 30 deletions(-)board/samsung/common/board.c +12
-0@@ -257,7 +257,19 @@ int board_mmc_init(bd_t *bis)return ret; }#endif + +#ifdef CONFIG_DISPLAY_BOARDINFO +int checkboard (void ) +{ +const char *board_name; + + board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); +printf ("Board: %s\n" , board_name ? board_name :"unknown" ); + +return 0 ; +}#endif +#endif /* CONFIG_OF_CONTROL */ #ifdef CONFIG_BOARD_LATE_INIT int board_late_init (void )board/samsung/smdk5250/exynos5-dt.c +0
-15@@ -45,21 +45,6 @@ int exynos_init(void)return 0 ; } -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) -{ -const char *board_name; - - board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); -if (board_name ==NULL ) -printf ("\nUnknown Board\n" ); -else -printf ("\nBoard: %s\n" , board_name); - -return 0 ; -} -#endif -#ifdef CONFIG_LCD void exynos_cfg_lcd_gpio (void ) {board/samsung/smdk5420/smdk5420.c +0
-16@@ -142,18 +142,3 @@ int board_get_revision(void) {return 0 ; } - -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) -{ -const char *board_name; - - board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); -if (board_name ==NULL ) -printf ("\nUnknown Board\n" ); -else -printf ("\nBoard: %s\n" , board_name); - -return 0 ; -} -#endif --1.7.9.5
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Signature · 2 lines
Regards, Rajeshwari Shinde
PATCH v2 7/12 arm:exynos: add common DTS file for exynos 4
In reply to Piotr WilczekThis patch adds common dtsi file and config header for all Exynos 4 based boards.
Patch additionally adds board specific (weak) functions for board_early_init_f and board_power_init functions.
---
Changes for v2:
- reuse existing common board.c file
arch/arm/dts/exynos4.dtsi | 139 ++++++++++++++++++++++++++++ arch/arm/include/asm/arch-exynos/board.h | 12 +++ board/samsung/common/board.c | 20 ++++- include/configs/exynos4-dt.h | 144 ++++++++++++++++++++++++++++++ 4 files changed, 311 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 include/configs/exynos4-dt.h
arch/arm/dts/exynos4.dtsi new file +139 -0
@@ -0,0 +1,139 @@ +/* + * Samsung's Exynos4 SoC common device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/include/ "skeleton.dtsi" + +/ { + + serial at 13800000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13800000 0x3c>; + id = <0>; + }; + + serial at 13810000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13810000 0x3c>; + id = <1>; + }; + + serial at 13820000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13820000 0x3c>; + id = <2>; + }; + + serial at 13830000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13830000 0x3c>; + id = <3>; + }; + + serial at 13840000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13840000 0x3c>; + id = <4>; + }; + + i2c at 13860000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <0 0 0>; + }; + + i2c at 13870000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <1 1 0>; + }; + + i2c at 13880000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <2 2 0>; + }; + + i2c at 13890000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <3 3 0>; + }; + + i2c at 138a0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <4 4 0>; + }; + + i2c at 138b0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <5 5 0>; + }; + + i2c at 138c0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <6 6 0>; + }; + + i2c at 138d0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <7 7 0>; + }; + + sdhci at 12510000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12510000 0x1000>; + interrupts = <0 75 0>; + }; + + sdhci at 12520000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12520000 0x1000>; + interrupts = <0 76 0>; + }; + + sdhci at 12530000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12530000 0x1000>; + interrupts = <0 77 0>; + }; + + sdhci at 12540000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12540000 0x1000>; + interrupts = <0 78 0>; + }; + + gpio: gpio { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; +};
arch/arm/include/asm/arch-exynos/board.h +12 -0
@@ -14,4 +14,16 @@*/ int exynos_init (void ); +/* +* Exynos board specific changes for +* board_early_init_f +*/ +int exynos_early_init_f (void ); + +/* +* Exynos board specific changes for +* board_power_init +*/ +int exynos_power_init (void ); +#endif /* EXYNOS_BOARD_H */
board/samsung/common/board.c +16 -4
@@ -32,6 +32,20 @@ struct local_info {static struct local_info local; +int __exynos_early_init_f (void ) +{ +return 0 ; +} +int exynos_early_init_f (void ) + __attribute__((weak,alias ("__exynos_early_init_f" ))); + +int __exynos_power_init (void ) +{ +return 0 ; +} +int exynos_power_init (void ) + __attribute__((weak,alias ("__exynos_power_init" ))); +#if definedCONFIG_EXYNOS_TMU /* Boot Time Thermal Analysis for SoC temperature threshold breach */ static void boot_temp_check (void )
@@ -139,7 +153,7 @@ int board_early_init_f(void)board_i2c_init (gd->fdt_blob);#endif - return err; + return exynos_early_init_f(); }#endif
@@ -161,11 +175,9 @@ static int board_init_cros_ec_devices(const void *blob)int power_init_board (void ) { -int ret =0 ; -set_ps_hold_ctrl (); -return ret; +return exynos_power_init (); }#ifdef CONFIG_OF_CONTROL
include/configs/exynos4-dt.h new file +144 -0
144 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 8/12 arm:exynos: enble sdhci and misc_init to common board
In reply to Piotr WilczekThis patch enables sdhci initialistion and misc_init_r in common board file for all exynos 4 based boards.
---
Changes for v2:
- new patch;
board/samsung/common/board.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
board/samsung/common/board.c +30 -0
@@ -22,6 +22,8 @@#include <asm/arch/power.h> #include <power/pmic.h> #include <asm/arch/sromc.h> +#include <lcd.h> +#include <samsung/misc.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -181,6 +183,7 @@ int power_init_board(void) } #ifdef CONFIG_OF_CONTROL +#ifdef CONFIG_SMC911X static int decode_sromc(const void *blob, struct fdt_sromc *config) { int err;
@@ -204,6 +207,7 @@ static int decode_sromc(const void *blob, struct fdt_sromc *config) }return 0 ; } +#endif int board_eth_init (bd_t *bis) {
@@ -261,10 +265,18 @@ int board_mmc_init(bd_t *bis) {int ret; +#ifdef CONFIG_SDHCI +/* mmc initializattion for available channels */ + ret =exynos_mmc_init (gd->fdt_blob); +if (ret) +debug ("mmc init failed\n" ); +#endif +#ifdef CONFIG_DWMMC /* dwmmc initializattion for available channels */ ret =exynos_dwmmc_init (gd->fdt_blob);if (ret)debug ("dwmmc init failed\n" ); +#endif return ret; }
@@ -313,3 +325,21 @@ int arch_early_init_r(void)return 0 ; } + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r (void ) +{ +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +set_board_info (); +#endif +#ifdef CONFIG_LCD_MENU +keys_init (); +check_boot_mode (); +#endif +#ifdef CONFIG_CMD_BMP +if (panel_info.logo_on) +draw_logo (); +#endif +return 0 ; +} +#endif
Signature · 1 line
1.7.9.5
PATCH v2 9/12 board:origen: Enable device tree on Origen
In reply to Piotr WilczekThis patch enables to run Origen board on device tree.
Uart, DRAM and MMC init functions are removed as their generic replacements form the common board file are used.
The config file is modified to contain only board specific options.
---
Changes for v2:
- no changes;
board/samsung/dts/exynos4210-origen.dts | 45 ++++++++++++ board/samsung/origen/origen.c | 112 +++-------------------------- include/configs/origen.h | 117 +++++++++++-------------------- 3 files changed, 94 insertions(+), 180 deletions(-) create mode 100644 board/samsung/dts/exynos4210-origen.dts
board/samsung/dts/exynos4210-origen.dts new file +45 -0
@@ -0,0 +1,45 @@ +/* + * Samsung's Exynos4210 based Origen board device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "skeleton.dtsi" +/include/ "exynos4.dtsi" + +/ { + model = "Insignal Origen evaluation board based on Exynos4210"; + compatible = "insignal,origen", "samsung,exynos4210"; + + chosen { + bootargs =""; + }; + + aliases { + serial0 = "/serial at 13800000"; + console = "/serial at 13820000"; + mmc2 = "sdhci at 12530000"; + }; + + sdhci at 12510000 { + status = "disabled"; + }; + + sdhci at 12520000 { + status = "disabled"; + }; + + sdhci at 12530000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + cd-gpios = <&gpio 0x2008002 0>; + }; + + sdhci at 12540000 { + status = "disabled"; + }; +};
board/samsung/origen/origen.c +9 -103
138 lines not on this page · raw message
include/configs/origen.h +40 -77
179 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 10/12 board:universal: Enable device tree on Universal
In reply to Piotr WilczekThis patch enables to run Universal board on device tree.
---
Changes for v2:
- no changes;
board/samsung/dts/exynos4210-universal_c210.dts | 83 +++++++++ board/samsung/universal_c210/universal.c | 204 ++++++----------------- include/configs/s5pc210_universal.h | 145 +++++----------- 3 files changed, 176 insertions(+), 256 deletions(-) create mode 100644 board/samsung/dts/exynos4210-universal_c210.dts
board/samsung/dts/exynos4210-universal_c210.dts new file +83 -0
@@ -0,0 +1,83 @@ +/* + * Samsung's Exynos4210 based Universal C210 board device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "exynos4.dtsi" + +/ { + model = "Samsung Universal C210 based on Exynos4210 rev0"; + compatible = "samsung,universal_c210", "samsung,exynos4210"; + + aliases { + serial0 = "/serial at 13800000"; + console = "/serial at 13820000"; + mmc0 = "sdhci at 12510000"; + mmc2 = "sdhci at 12530000"; + }; + + sdhci at 12510000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + pwr-gpios = <&gpio 0x2008002 0>; + }; + + sdhci at 12520000 { + status = "disabled"; + }; + + sdhci at 12530000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + cd-gpios = <&gpio 0x20c6004 0>; + }; + + sdhci at 12540000 { + status = "disabled"; + }; + + fimd at 11c00000 { + compatible = "samsung,exynos-fimd"; + reg = <0x11c00000 0xa4>; + + samsung,vl-freq = <60>; + samsung,vl-col = <480>; + samsung,vl-row = <800>; + samsung,vl-width = <480>; + samsung,vl-height = <800>; + + samsung,vl-clkp = <0>; + samsung,vl-oep = <0>; + samsung,vl-hsp = <1>; + samsung,vl-vsp = <1>; + samsung,vl-dp = <1>; + samsung,vl-bpix = <4>; + + samsung,vl-hspw = <2>; + samsung,vl-hbpd = <16>; + samsung,vl-hfpd = <16>; + samsung,vl-vspw = <2>; + samsung,vl-vbpd = <8>; + samsung,vl-vfpd = <8>; + samsung,vl-cmd-allow-len = <0xf>; + + samsung,pclk_name = <1>; + samsung,sclk_div = <1>; + + samsung,winid = <0>; + samsung,power-on-delay = <10000>; + samsung,interface-mode = <1>; + samsung,mipi-enabled = <0>; + samsung,dp-enabled; + samsung,dual-lcd-enabled; + + samsung,logo-on = <1>; + samsung,resolution = <0>; + samsung,rgb-mode = <0>; + }; +};
board/samsung/universal_c210/universal.c +53 -151
271 lines not on this page · raw message
include/configs/s5pc210_universal.h +40 -105
193 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 10/12 board:universal: Enable device tree on Universal
Hello Piotr,
Quoted 7 lines · Piotr Wilczek
This patch enables to run Universal board on device tree.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Przemyslaw Marczak <[email protected]>Cc Minkyu Kang <[email protected]>---
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com
PATCH v2 11/12 board:trats: Enable device tree on Trats
In reply to Piotr WilczekThis patch enables to run Trats board on device tree.
---
Changes for v2:
- no changes;
board/samsung/dts/exynos4210-trats.dts | 120 ++++++++++++++++++ board/samsung/trats/trats.c | 213 ++------------------------------ include/configs/trats.h | 192 +++++++--------------------- 3 files changed, 172 insertions(+), 353 deletions(-) create mode 100644 board/samsung/dts/exynos4210-trats.dts
board/samsung/dts/exynos4210-trats.dts new file +120 -0
@@ -0,0 +1,120 @@ +/* + * Samsung's Exynos4210 based Trats board device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "exynos4.dtsi" + +/ { + model = "Samsung Trats based on Exynos4210"; + compatible = "samsung,trats", "samsung,exynos4210"; + + config { + samsung,dsim-device-name = "s6e8ax0"; + }; + + aliases { + i2c0 = "/i2c at 13860000"; + i2c1 = "/i2c at 13870000"; + i2c2 = "/i2c at 13880000"; + i2c3 = "/i2c at 13890000"; + i2c4 = "/i2c at 138a0000"; + i2c5 = "/i2c at 138b0000"; + i2c6 = "/i2c at 138c0000"; + i2c7 = "/i2c at 138d0000"; + serial0 = "/serial at 13800000"; + console = "/serial at 13820000"; + mmc0 = "sdhci at 12510000"; + mmc2 = "sdhci at 12530000"; + }; + + fimd at 11c00000 { + compatible = "samsung,exynos-fimd"; + reg = <0x11c00000 0xa4>; + + samsung,vl-freq = <60>; + samsung,vl-col = <720>; + samsung,vl-row = <1280>; + samsung,vl-width = <720>; + samsung,vl-height = <1280>; + + samsung,vl-clkp = <0>; + samsung,vl-oep = <0>; + samsung,vl-hsp = <1>; + samsung,vl-vsp = <1>; + samsung,vl-dp = <1>; + samsung,vl-bpix = <4>; + + samsung,vl-hspw = <5>; + samsung,vl-hbpd = <10>; + samsung,vl-hfpd = <10>; + samsung,vl-vspw = <2>; + samsung,vl-vbpd = <1>; + samsung,vl-vfpd = <13>; + samsung,vl-cmd-allow-len = <0xf>; + + samsung,winid = <3>; + samsung,power-on-delay = <30>; + samsung,interface-mode = <1>; + samsung,mipi-enabled = <1>; + samsung,dp-enabled; + samsung,dual-lcd-enabled; + + samsung,logo-on = <1>; + samsung,resolution = <0>; + samsung,rgb-mode = <0>; + }; + + mipidsi at 11c80000 { + compatible = "samsung,exynos-mipi-dsi"; + reg = <0x11c80000 0x5c>; + + samsung,dsim-config-e_interface = <1>; + samsung,dsim-config-e_virtual_ch = <0>; + samsung,dsim-config-e_pixel_format = <7>; + samsung,dsim-config-e_burst_mode = <1>; + samsung,dsim-config-e_no_data_lane = <3>; + samsung,dsim-config-e_byte_clk = <0>; + samsung,dsim-config-hfp = <1>; + + samsung,dsim-config-p = <3>; + samsung,dsim-config-m = <120>; + samsung,dsim-config-s = <1>; + + samsung,dsim-config-pll_stable_time = <500>; + samsung,dsim-config-esc_clk = <20000000>; + samsung,dsim-config-stop_holding_cnt = <0x7ff>; + samsung,dsim-config-bta_timeout = <0xff>; + samsung,dsim-config-rx_timeout = <0xffff>; + + samsung,dsim-device-id = <0xffffffff>; + samsung,dsim-device-bus_id = <0>; + + samsung,dsim-device-reverse_panel = <1>; + }; + + sdhci at 12510000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + pwr-gpios = <&gpio 0x2008002 0>; + }; + + sdhci at 12520000 { + status = "disabled"; + }; + + sdhci at 12530000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + cd-gpios = <&gpio 0x20c6004 0>; + }; + + sdhci at 12540000 { + status = "disabled"; + }; +};
board/samsung/trats/trats.c +10 -203
299 lines not on this page · raw message
include/configs/trats.h +42 -150
257 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 12/12 board:trats2: Enable device tree on Trats2
In reply to Piotr WilczekThis patch enables to run Trats2 board on device tree.
---
Changes for v2:
- fixed mmc2 addres in DT;
board/samsung/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++++++++++++ board/samsung/trats2/trats2.c | 233 +---------------- include/configs/trats2.h | 198 +++----------- 3 files changed, 474 insertions(+), 391 deletions(-) create mode 100644 board/samsung/dts/exynos4412-trats2.dts
board/samsung/dts/exynos4412-trats2.dts new file +434 -0
@@ -0,0 +1,434 @@ +/* + * Samsung's Exynos4412 based Trats2 board device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "exynos4.dtsi" + +/ { + model = "Samsung Trats2 based on Exynos4412"; + compatible = "samsung,trats2", "samsung,exynos4412"; + + config { + samsung,dsim-device-name = "s6e8ax0"; + }; + + aliases { + i2c0 = "/i2c at 13860000"; + i2c1 = "/i2c at 13870000"; + i2c2 = "/i2c at 13880000"; + i2c3 = "/i2c at 13890000"; + i2c4 = "/i2c at 138a0000"; + i2c5 = "/i2c at 138b0000"; + i2c6 = "/i2c at 138c0000"; + i2c7 = "/i2c at 138d0000"; + serial0 = "/serial at 13800000"; + console = "/serial at 13820000"; + mmc0 = "sdhci at 12510000"; + mmc2 = "sdhci at 12530000"; + }; + + i2c at 138d0000 { + samsung,i2c-sda-delay = <100>; + samsung,i2c-slave-addr = <0x10>; + samsung,i2c-max-bus-freq = <100000>; + status = "okay"; + + max77686_pmic at 09 { + compatible = "maxim,max77686_pmic"; + interrupts = <7 0>; + reg = <0x09 0 0>; + #clock-cells = <1>; + + voltage-regulators { + ldo1_reg: ldo1 { + regulator-compatible = "LDO1"; + regulator-name = "VALIVE_1.0V_AP"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo2_reg: ldo2 { + regulator-compatible = "LDO2"; + regulator-name = "VM1M2_1.2V_AP"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo3_reg: ldo3 { + regulator-compatible = "LDO3"; + regulator-name = "VCC_1.8V_AP"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo4_reg: ldo4 { + regulator-compatible = "LDO4"; + regulator-name = "VCC_2.8V_AP"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo5_reg: ldo5 { + regulator-compatible = "LDO5"; + regulator-name = "VCC_1.8V_IO"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo6_reg: ldo6 { + regulator-compatible = "LDO6"; + regulator-name = "VMPLL_1.0V_AP"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo7_reg: ldo7 { + regulator-compatible = "LDO7"; + regulator-name = "VPLL_1.0V_AP"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-mem-on; + }; + + ldo8_reg: ldo8 { + regulator-compatible = "LDO8"; + regulator-name = "VMIPI_1.0V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-mem-off; + }; + + ldo9_reg: ldo9 { + regulator-compatible = "LDO9"; + regulator-name = "CAM_ISP_MIPI_1.2V"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-mem-idle; + }; + + ldo10_reg: ldo10 { + regulator-compatible = "LDO10"; + regulator-name = "VMIPI_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-off; + }; + + ldo11_reg: ldo11 { + regulator-compatible = "LDO11"; + regulator-name = "VABB1_1.95V"; + regulator-min-microvolt = <1950000>; + regulator-max-microvolt = <1950000>; + regulator-always-on; + regulator-mem-off; + }; + + ldo12_reg: ldo12 { + regulator-compatible = "LDO12"; + regulator-name = "VUOTG_3.0V"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-mem-off; + }; + + ldo13_reg: ldo13 { + regulator-compatible = "LDO13"; + regulator-name = "NFC_AVDD_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo14_reg: ldo14 { + regulator-compatible = "LDO14"; + regulator-name = "VABB2_1.95V"; + regulator-min-microvolt = <1950000>; + regulator-max-microvolt = <1950000>; + regulator-always-on; + regulator-mem-off; + }; + + ldo15_reg: ldo15 { + regulator-compatible = "LDO15"; + regulator-name = "VHSIC_1.0V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-mem-off; + }; + + ldo16_reg: ldo16 { + regulator-compatible = "LDO16"; + regulator-name = "VHSIC_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-off; + }; + + ldo17_reg: ldo17 { + regulator-compatible = "LDO17"; + regulator-name = "CAM_SENSOR_CORE_1.2V"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-mem-idle; + }; + + ldo18_reg: ldo18 { + regulator-compatible = "LDO18"; + regulator-name = "CAM_ISP_SEN_IO_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo19_reg: ldo19 { + regulator-compatible = "LDO19"; + regulator-name = "VT_CAM_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo20_reg: ldo20 { + regulator-compatible = "LDO20"; + regulator-name = "VDDQ_PRE_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo21_reg: ldo21 { + regulator-compatible = "LDO21"; + regulator-name = "VTF_2.8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-mem-idle; + }; + + ldo22_reg: ldo22 { + regulator-compatible = "LDO22"; + regulator-name = "VMEM_VDD_2.8V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-mem-off; + }; + + ldo23_reg: ldo23 { + regulator-compatible = "LDO23"; + regulator-name = "TSP_AVDD_3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-mem-idle; + }; + + ldo24_reg: ldo24 { + regulator-compatible = "LDO24"; + regulator-name = "TSP_VDD_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-mem-idle; + }; + + ldo25_reg: ldo25 { + regulator-compatible = "LDO25"; + regulator-name = "LCD_VCC_3.3V"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-mem-idle; + }; + + ldo26_reg: ldo26 { + regulator-compatible = "LDO26"; + regulator-name = "MOTOR_VCC_3.0V"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-mem-idle; + }; + + buck1_reg: buck1 { + regulator-compatible = "BUCK1"; + regulator-name = "vdd_mif"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1100000>; + regulator-always-on; + regulator-boot-on; + regulator-mem-off; + }; + + buck2_reg: buck2 { + regulator-compatible = "BUCK2"; + regulator-name = "vdd_arm"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + regulator-boot-on; + regulator-mem-off; + }; + + buck3_reg: buck3 { + regulator-compatible = "BUCK3"; + regulator-name = "vdd_int"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1150000>; + regulator-always-on; + regulator-boot-on; + regulator-mem-off; + }; + + buck4_reg: buck4 { + regulator-compatible = "BUCK4"; + regulator-name = "vdd_g3d"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1150000>; + regulator-boot-on; + regulator-mem-off; + }; + + buck5_reg: buck5 { + regulator-compatible = "BUCK5"; + regulator-name = "VMEM_1.2V_AP"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + }; + + buck6_reg: buck6 { + regulator-compatible = "BUCK6"; + regulator-name = "VCC_SUB_1.35V"; + regulator-min-microvolt = <1350000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + }; + + buck7_reg: buck7 { + regulator-compatible = "BUCK7"; + regulator-name = "VCC_SUB_2.0V"; + regulator-min-microvolt = <2000000>; + regulator-max-microvolt = <2000000>; + regulator-always-on; + }; + + buck8_reg: buck8 { + regulator-compatible = "BUCK8"; + regulator-name = "VMEM_VDDF_3.0V"; + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + regulator-always-on; + regulator-mem-off; + }; + + buck9_reg: buck9 { + regulator-compatible = "BUCK9"; + regulator-name = "CAM_ISP_CORE_1.2V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1200000>; + regulator-mem-off; + }; + }; + }; + }; + + fimd at 11c00000 { + compatible = "samsung,exynos-fimd"; + reg = <0x11c00000 0xa4>; + + samsung,vl-freq = <60>; + samsung,vl-col = <720>; + samsung,vl-row = <1280>; + samsung,vl-width = <720>; + samsung,vl-height = <1280>; + + samsung,vl-clkp = <0>; + samsung,vl-oep = <0>; + samsung,vl-hsp = <1>; + samsung,vl-vsp = <1>; + samsung,vl-dp = <1>; + samsung,vl-bpix = <4>; + + samsung,vl-hspw = <5>; + samsung,vl-hbpd = <10>; + samsung,vl-hfpd = <10>; + samsung,vl-vspw = <2>; + samsung,vl-vbpd = <1>; + samsung,vl-vfpd = <13>; + samsung,vl-cmd-allow-len = <0xf>; + + samsung,winid = <0>; + samsung,power-on-delay = <30>; + samsung,interface-mode = <1>; + samsung,mipi-enabled = <1>; + samsung,dp-enabled; + samsung,dual-lcd-enabled; + + samsung,logo-on = <1>; + samsung,resolution = <0>; + samsung,rgb-mode = <0>; + }; + + mipidsi at 11c80000 { + compatible = "samsung,exynos-mipi-dsi"; + reg = <0x11c80000 0x5c>; + + samsung,dsim-config-e_interface = <1>; + samsung,dsim-config-e_virtual_ch = <0>; + samsung,dsim-config-e_pixel_format = <7>; + samsung,dsim-config-e_burst_mode = <1>; + samsung,dsim-config-e_no_data_lane = <3>; + samsung,dsim-config-e_byte_clk = <0>; + samsung,dsim-config-hfp = <1>; + + samsung,dsim-config-p = <3>; + samsung,dsim-config-m = <120>; + samsung,dsim-config-s = <1>; + + samsung,dsim-config-pll_stable_time = <500>; + samsung,dsim-config-esc_clk = <20000000>; + samsung,dsim-config-stop_holding_cnt = <0x7ff>; + samsung,dsim-config-bta_timeout = <0xff>; + samsung,dsim-config-rx_timeout = <0xffff>; + + samsung,dsim-device-id = <0xffffffff>; + samsung,dsim-device-bus_id = <0>; + + samsung,dsim-device-reverse_panel = <1>; + }; + + sdhci at 12510000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + pwr-gpios = <&gpio 0x2004002 0>; + }; + + sdhci at 12520000 { + status = "disabled"; + }; + + sdhci at 12530000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + cd-gpios = <&gpio 0x20C6004 0>; + }; + + sdhci at 12540000 { + status = "disabled"; + }; +};
board/samsung/trats2/trats2.c +10 -223
294 lines not on this page · raw message
include/configs/trats2.h +30 -168
245 lines not on this page · raw message
Signature · 1 line
1.7.9.5
v3 cover Exynos4: add support for device tree
In reply to Piotr WilczekThis patch set enables support for device tree on all Exynos4 based boards.
DT support is enabled on Exynos mipi dsim and sdhci drives. Common board.c file is reused for all functions common for Exynos4 boards. Board specific files are implemented in the board files. Origen, Universal, Trats and Trats2 boards are modifed to support device tree.
Changes for v3:
- moved max77686 init function to smdk5250 board file
- board DTS files moved to arch/arm/dts
- rebased on the latest tree
Changes for v2:
- removed incorrectly implemented check for invalid peripheral id
- removed unnecesary white space
- removed panel specific init function 's6e8ax0_init' to the board file
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak) exynos_lcd_panel_init function for panel specific initialisation from board file
- fixed checking for SDMMC boundary
- fiex debug message
- fixed comment to 'pwr_gpio' struct filed
- new patch to move checkboard to common file
- reuse existing common board.c file
- new patch that removes unused max77686_init function
- fixed mmc2 addres in DT on Trats2
Piotr Wilczek (12):
exynos4:pinmux:fdt: decode peripheral id video:mipidsim:fdt: Add DT support for mipi dsim driver video:exynos_fb:fdt: add additional fdt data drivers:mmc:sdhci: enable support for DT board:samsung: move checkboard to common file arm:exynos: add common DTS file for exynos 4 board:samsung:common: move max77686 init function arm:exynos: enable sdhci and misc_init to common board board:origen: Enable device tree on Origen board:universal: Enable device tree on Universal board:trats: Enable device tree on Trats board:trats2: Enable device tree on Trats2
Piotr Wilczek (12):
exynos4:pinmux:fdt: decode peripheral id video:mipidsim:fdt: Add DT support for mipi dsim driver video:exynos_fb:fdt: add additional fdt data drivers:mmc:sdhci: enable support for DT board:samsung: move checkboard to common file arm:exynos: add common DTS file for exynos 4 board:samsung:common: move max77686 init function arm:exynos: enable sdhci and misc_init to common board board:origen: Enable device tree on Origen board:universal: Enable device tree on Universal board:trats: Enable device tree on Trats board:trats2: Enable device tree on Trats2
arch/arm/cpu/armv7/exynos/pinmux.c | 17 ++ arch/arm/dts/Makefile | 5 + arch/arm/dts/exynos4.dtsi | 139 +++++++++ arch/arm/dts/exynos4210-origen.dts | 45 +++ arch/arm/dts/exynos4210-trats.dts | 120 ++++++++ arch/arm/dts/exynos4210-universal_c210.dts | 83 +++++ arch/arm/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++++++++ arch/arm/include/asm/arch-exynos/board.h | 12 + arch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 + arch/arm/include/asm/arch-exynos/mmc.h | 7 + board/samsung/common/board.c | 180 ++++------- board/samsung/origen/origen.c | 112 +------ board/samsung/smdk5250/exynos5-dt.c | 15 - board/samsung/smdk5250/smdk5250.c | 125 ++++++++ board/samsung/smdk5420/smdk5420.c | 15 - board/samsung/trats/trats.c | 213 +------------ board/samsung/trats2/trats2.c | 233 +------------- board/samsung/universal_c210/universal.c | 204 ++++--------- drivers/mmc/s5p_sdhci.c | 129 ++++++++ drivers/video/exynos_fb.c | 21 ++ drivers/video/exynos_mipi_dsi.c | 96 ++++++ include/configs/exynos4-dt.h | 144 +++++++++ include/configs/origen.h | 117 +++----- include/configs/s5pc210_universal.h | 145 +++------ include/configs/trats.h | 192 +++--------- include/configs/trats2.h | 198 ++---------- include/fdtdec.h | 2 + include/sdhci.h | 5 + lib/fdtdec.c | 2 + 29 files changed, 1683 insertions(+), 1332 deletions(-) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 arch/arm/dts/exynos4210-origen.dts create mode 100644 arch/arm/dts/exynos4210-trats.dts create mode 100644 arch/arm/dts/exynos4210-universal_c210.dts create mode 100644 arch/arm/dts/exynos4412-trats2.dts create mode 100644 include/configs/exynos4-dt.h
Signature · 1 line
1.8.3.2
PATCH v3 1/12 exynos4:pinmux:fdt: decode peripheral id
This patch adds api to decode peripheral id based on interrupt number.
---
Changes for v3:
- none
Changes for v2:
- removed incorrectly implemented check for invalid peripheral id
- removed unnecesary white space
arch/arm/cpu/armv7/exynos/pinmux.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/cpu/armv7/exynos/pinmux.c +17 -0
@@ -741,6 +741,21 @@ int exynos_pinmux_config(int peripheral, int flags) }#ifdef CONFIG_OF_CONTROL +static int exynos4_pinmux_decode_periph_id (const void *blob,int node) +{ +int err; +u32 cell[3 ]; + + err =fdtdec_get_int_array (blob, node,"interrupts" , cell, +ARRAY_SIZE (cell)); +if (err) { +debug (" invalid peripheral id\n" ); +return PERIPH_ID_NONE ; + } + +return cell[1 ]; +} +static int exynos5_pinmux_decode_periph_id (const void *blob,int node) {int err;
@@ -758,6 +773,8 @@ int pinmux_decode_periph_id(const void *blob, int node) {if (cpu_is_exynos5 ())return exynos5_pinmux_decode_periph_id (blob, node); +else if (cpu_is_exynos4 ()) +return exynos4_pinmux_decode_periph_id (blob, node);else return PERIPH_ID_NONE ; }
Signature · 1 line
1.8.3.2
PATCH v3 2/12 video:mipidsim:fdt: Add DT support for mipi dsim driver
In reply to Piotr WilczekThis patch enables parsing mipi data from device tree. Non device tree case is still supported.
---
Changes for v3:
- none
Changes for v2:
- removed panel specific init function 's6e8ax0_init' to the board file
arch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 ++ drivers/video/exynos_mipi_dsi.c | 96 ++++++++++++++++++++++++++++ include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 4 files changed, 103 insertions(+)
arch/arm/include/asm/arch-exynos/mipi_dsim.h +5 -0
@@ -12,6 +12,7 @@#include <linux/list.h> #include <linux/fb.h> +#include <lcd.h> #define PANEL_NAME_SIZE (32)
@@ -368,8 +369,12 @@ int exynos_mipi_dsi_register_lcd_device(struct mipi_dsim_lcd_device *lcd_dev);void exynos_set_dsim_platform_data (struct exynos_platform_mipi_dsim *pd); +void exynos_init_dsim_platform_data (vidinfo_t *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void ); +#ifdef CONFIG_OF_CONTROL +extern int mipi_power (void ); +#endif #endif /* _DSIM_H */
drivers/video/exynos_mipi_dsi.c +96 -0
112 lines not on this page · raw message
include/fdtdec.h +1 -0
@@ -79,6 +79,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS5_USB3_PHY ,/* Exynos phy controller for usb3.0 */ COMPAT_SAMSUNG_EXYNOS_TMU ,/* Exynos TMU */ COMPAT_SAMSUNG_EXYNOS_FIMD ,/* Exynos Display controller */ +COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */
lib/fdtdec.c +1 -0
@@ -52,6 +52,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS5_USB3_PHY ,"samsung,exynos5250-usb3-phy" ),COMPAT (SAMSUNG_EXYNOS_TMU ,"samsung,exynos-tmu" ),COMPAT (SAMSUNG_EXYNOS_FIMD ,"samsung,exynos-fimd" ), +COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"),
Signature · 1 line
1.8.3.2
PATCH v3 2/12 video:mipidsim:fdt: Add DT support for mipi dsim driver
Piotr,
DT bindings should usually be free of "_" (underscore) Please use hyphen: "-"
Quoted 200 lines · Piotr Wilczek
This patch enables parsing mipi data from device tree. Non device tree case is still supported.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v3:
- noneChanges for v2:
- removed panel specific init function 's6e8ax0_init' to the board filearch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 ++ drivers/video/exynos_mipi_dsi.c | 96 ++++++++++++++++++++++++++++ include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 4 files changed, 103 insertions(+)arch/arm/include/asm/arch-exynos/mipi_dsim.h +1
-0@@ -12,6 +12,7 @@#include <linux/list.h> #include <linux/fb.h> +#include <lcd.h> #define PANEL_NAME_SIZE (32)@@ -368,8 +369,12 @@ int exynos_mipi_dsi_register_lcd_device(struct
mipi_dsim_lcd_device*lcd_dev);void
exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd);arch/arm/include/asm/arch-exynos/mipi_dsim.h +4
-0+void exynos_init_dsim_platform_data (vidinfo_t *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void ); +#ifdef CONFIG_OF_CONTROL +extern int mipi_power (void ); +#endif #endif /* _DSIM_H */ drivers/video/exynos_mipi_dsi.c +16
-0@@ -9,6 +9,8 @@#include <common.h> #include <malloc.h> +#include <fdtdec.h> +#include <libfdt.h> #include <linux/err.h> #include <asm/arch/dsim.h> #include <asm/arch/mipi_dsim.h> @@ -22,7 +24,14 @@#define master_to_driver (a) (a->dsim_lcd_drv)#define master_to_device (a) (a->dsim_lcd_dev) +DECLARE_GLOBAL_DATA_PTR ; +static struct exynos_platform_mipi_dsim *dsim_pd; +#ifdef CONFIG_OF_CONTROL +static struct mipi_dsim_config dsim_config_dt; +static struct exynos_platform_mipi_dsim dsim_platform_data_dt; +static struct mipi_dsim_lcd_device mipi_lcd_device_dt; +#endif struct mipi_dsim_ddi {int bus_id;@@ -238,3 +247,90 @@ void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd) dsim_pd = pd; } + +#ifdef CONFIG_OF_CONTROL +int exynos_dsim_config_parse_dt (const void *blob) +{ +int node; + + node = fdtdec_next_compatible(blob, 0,
COMPAT_SAMSUNG_EXYNOS_MIPI_DSI);drivers/video/exynos_mipi_dsi.c +2
-0+if (node <=0 ) { + printf("exynos_mipi_dsi: Can't get device node for mipidsi\n");
drivers/video/exynos_mipi_dsi.c +67
-0+return -ENODEV ; + } + + dsim_config_dt.e_interface =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_interface" ,0 ); + + dsim_config_dt.e_virtual_ch =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_virtual_ch" ,0 ); + + dsim_config_dt.e_pixel_format =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_pixel_format" ,0 ); + + dsim_config_dt.e_burst_mode =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_burst_mode" ,0 ); + + dsim_config_dt.e_no_data_lane =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_no_data_lane" ,0 ); + + dsim_config_dt.e_byte_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_byte_clk" ,0 ); + + dsim_config_dt.hfp =fdtdec_get_int (blob, node, +"samsung,dsim-config-hfp" ,0 ); + + dsim_config_dt.p =fdtdec_get_int (blob, node, +"samsung,dsim-config-p" ,0 ); + dsim_config_dt.m =fdtdec_get_int (blob, node, +"samsung,dsim-config-m" ,0 ); + dsim_config_dt.s =fdtdec_get_int (blob, node, +"samsung,dsim-config-s" ,0 ); + + dsim_config_dt.pll_stable_time =fdtdec_get_int (blob, node, +"samsung,dsim-config-pll_stable_time" ,0 ); + + dsim_config_dt.esc_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-esc_clk" ,0 ); + + dsim_config_dt.stop_holding_cnt =fdtdec_get_int (blob, node, +"samsung,dsim-config-stop_holding_cnt" ,0 ); + + dsim_config_dt.bta_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-bta_timeout" ,0 ); + + dsim_config_dt.rx_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-rx_timeout" ,0 ); + + mipi_lcd_device_dt.name =fdtdec_get_config_string (blob, +"samsung,dsim-device-name" ); + + mipi_lcd_device_dt.id =fdtdec_get_int (blob, node, +"samsung,dsim-device-id" ,0 ); + + mipi_lcd_device_dt.bus_id =fdtdec_get_int (blob, node, +"samsung,dsim-device-bus_id" ,0 ); + + mipi_lcd_device_dt.reverse_panel =fdtdec_get_int (blob, node, +"samsung,dsim-device-reverse_panel" ,0 ); + +return 0 ; +} + +void exynos_init_dsim_platform_data (vidinfo_t *vid) +{ +if (exynos_dsim_config_parse_dt (gd->fdt_blob)) +debug ("Can't get proper dsim config.\n" ); + + strcpy(dsim_platform_data_dt.lcd_panel_name,mipi_lcd_device_dt.name);
drivers/video/exynos_mipi_dsi.c +11
-0+ dsim_platform_data_dt.dsim_config = &dsim_config_dt; + dsim_platform_data_dt.mipi_power = mipi_power; + dsim_platform_data_dt.phy_enable = set_mipi_phy_ctrl; + dsim_platform_data_dt.lcd_panel_info = (void *)vid; + + mipi_lcd_device_dt.platform_data = (void *)&dsim_platform_data_dt; +exynos_mipi_dsi_register_lcd_device (&mipi_lcd_device_dt); + + dsim_pd = &dsim_platform_data_dt; +} +#endif include/fdtdec.h +0
-0@@ -79,6 +79,7 @@ enum fdt_compat_id { COMPAT_SAMSUNG_EXYNOS5_USB3_PHY,/* Exynos phy controller forusb3.0 */
COMPAT_SAMSUNG_EXYNOS_TMU, /* Exynos TMU */
COMPAT_SAMSUNG_EXYNOS_FIMD, /* Exynos Display controller */
+COMPAT_SAMSUNG_EXYNOS_MIPI_DSI, /* Exynos mipi dsi */
COMPAT_SAMSUNG_EXYNOS5_DP, /* Exynos Display port controller
*/
COMPAT_SAMSUNG_EXYNOS5_DWMMC, /* Exynos5 DWMMC controller */
COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */lib/fdtdec.c +1
-1@@ -52,6 +52,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS5_USB3_PHY ,"samsung,exynos5250-usb3-phy" ),COMPAT (SAMSUNG_EXYNOS_TMU ,"samsung,exynos-tmu" ),COMPAT (SAMSUNG_EXYNOS_FIMD ,"samsung,exynos-fimd" ), +COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"), --1.8.3.2
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Regards,
Ajay Kumar
PATCH v3 2/12 video:mipidsim:fdt: Add DT support for mipi dsim driver
Hi Ajay,
Quoted 4 lines · Ajay kumar
Piotr,
DT bindings should usually be free of "_" (underscore) Please use hyphen: "-"
I will use hypen.
Quoted 213 lines · Piotr Wilczek
Quoted 201 lines
This patch enables parsing mipi data from device tree. Non device tree case is still supported.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v3:
- noneChanges for v2:
- removed panel specific init function 's6e8ax0_init' to the board filearch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 ++ drivers/video/exynos_mipi_dsi.c | 96 ++++++++++++++++++++++++++++ include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 4 files changed, 103 insertions(+)arch/arm/include/asm/arch-exynos/mipi_dsim.h +1
-0@@ -12,6 +12,7 @@#include <linux/list.h> #include <linux/fb.h> +#include <lcd.h> #define PANEL_NAME_SIZE (32)@@ -368,8 +369,12 @@ int exynos_mipi_dsi_register_lcd_device(struct
mipi_dsim_lcd_device*lcd_dev);void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd);arch/arm/include/asm/arch-exynos/mipi_dsim.h +4
-0+void exynos_init_dsim_platform_data (vidinfo_t *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void ); +#ifdef CONFIG_OF_CONTROL +extern int mipi_power (void ); +#endif #endif /* _DSIM_H */ drivers/video/exynos_mipi_dsi.c +16
-0@@ -9,6 +9,8 @@#include <common.h> #include <malloc.h> +#include <fdtdec.h> +#include <libfdt.h> #include <linux/err.h> #include <asm/arch/dsim.h> #include <asm/arch/mipi_dsim.h> @@ -22,7 +24,14 @@#define master_to_driver (a) (a->dsim_lcd_drv)#define master_to_device (a) (a->dsim_lcd_dev) +DECLARE_GLOBAL_DATA_PTR ; +static struct exynos_platform_mipi_dsim *dsim_pd; +#ifdef CONFIG_OF_CONTROL +static struct mipi_dsim_config dsim_config_dt; +static struct exynos_platform_mipi_dsim dsim_platform_data_dt; +static struct mipi_dsim_lcd_device mipi_lcd_device_dt; +#endif struct mipi_dsim_ddi {int bus_id;@@ -238,3 +247,90 @@ void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd) dsim_pd = pd; } + +#ifdef CONFIG_OF_CONTROL +int exynos_dsim_config_parse_dt (const void *blob) +{ +int node; + + node = fdtdec_next_compatible(blob, 0,
COMPAT_SAMSUNG_EXYNOS_MIPI_DSI);drivers/video/exynos_mipi_dsi.c +2
-0+if (node <=0 ) { + printf("exynos_mipi_dsi: Can't get device node for mipidsi\n");
drivers/video/exynos_mipi_dsi.c +67
-0+return -ENODEV ; + } + + dsim_config_dt.e_interface =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_interface" ,0 ); + + dsim_config_dt.e_virtual_ch =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_virtual_ch" ,0 ); + + dsim_config_dt.e_pixel_format =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_pixel_format" ,0 ); + + dsim_config_dt.e_burst_mode =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_burst_mode" ,0 ); + + dsim_config_dt.e_no_data_lane =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_no_data_lane" ,0 ); + + dsim_config_dt.e_byte_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-e_byte_clk" ,0 ); + + dsim_config_dt.hfp =fdtdec_get_int (blob, node, +"samsung,dsim-config-hfp" ,0 ); + + dsim_config_dt.p =fdtdec_get_int (blob, node, +"samsung,dsim-config-p" ,0 ); + dsim_config_dt.m =fdtdec_get_int (blob, node, +"samsung,dsim-config-m" ,0 ); + dsim_config_dt.s =fdtdec_get_int (blob, node, +"samsung,dsim-config-s" ,0 ); + + dsim_config_dt.pll_stable_time =fdtdec_get_int (blob, node, +"samsung,dsim-config-pll_stable_time" ,0 ); + + dsim_config_dt.esc_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-esc_clk" ,0 ); + + dsim_config_dt.stop_holding_cnt =fdtdec_get_int (blob, node, +"samsung,dsim-config-stop_holding_cnt" ,0 ); + + dsim_config_dt.bta_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-bta_timeout" ,0 ); + + dsim_config_dt.rx_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-rx_timeout" ,0 ); + + mipi_lcd_device_dt.name =fdtdec_get_config_string (blob, +"samsung,dsim-device-name" ); + + mipi_lcd_device_dt.id =fdtdec_get_int (blob, node, +"samsung,dsim-device-id" ,0 ); + + mipi_lcd_device_dt.bus_id =fdtdec_get_int (blob, node, +"samsung,dsim-device-bus_id" ,0 ); + + mipi_lcd_device_dt.reverse_panel =fdtdec_get_int (blob, node, +"samsung,dsim-device-reverse_panel" ,0 ); + +return 0 ; +} + +void exynos_init_dsim_platform_data (vidinfo_t *vid) +{ +if (exynos_dsim_config_parse_dt (gd->fdt_blob)) +debug ("Can't get proper dsim config.\n" ); + + strcpy(dsim_platform_data_dt.lcd_panel_name,mipi_lcd_device_dt.name);
drivers/video/exynos_mipi_dsi.c +11
-0+ dsim_platform_data_dt.dsim_config = &dsim_config_dt; + dsim_platform_data_dt.mipi_power = mipi_power; + dsim_platform_data_dt.phy_enable = set_mipi_phy_ctrl; + dsim_platform_data_dt.lcd_panel_info = (void *)vid; + + mipi_lcd_device_dt.platform_data = (void *)&dsim_platform_data_dt; +exynos_mipi_dsi_register_lcd_device (&mipi_lcd_device_dt); + + dsim_pd = &dsim_platform_data_dt; +} +#endif include/fdtdec.h +0
-0@@ -79,6 +79,7 @@ enum fdt_compat_id { COMPAT_SAMSUNG_EXYNOS5_USB3_PHY,/* Exynos phy controller forusb3.0 */
COMPAT_SAMSUNG_EXYNOS_TMU, /* Exynos TMU */
COMPAT_SAMSUNG_EXYNOS_FIMD, /* Exynos Display controller */
+COMPAT_SAMSUNG_EXYNOS_MIPI_DSI, /* Exynos mipi dsi */
COMPAT_SAMSUNG_EXYNOS5_DP, /* Exynos Display port controller
*/
COMPAT_SAMSUNG_EXYNOS5_DWMMC, /* Exynos5 DWMMC controller */
COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */lib/fdtdec.c +1
-1@@ -52,6 +52,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS5_USB3_PHY ,"samsung,exynos5250-usb3-phy" ),COMPAT (SAMSUNG_EXYNOS_TMU ,"samsung,exynos-tmu" ),COMPAT (SAMSUNG_EXYNOS_FIMD ,"samsung,exynos-fimd" ), +COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"), --1.8.3.2
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-bootRegards,
Ajay Kumar
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Best regards,
Piotr Wilczek
PATCH v3 3/12 video:exynos_fb:fdt: add additional fdt data
In reply to Piotr WilczekThis patch adds additional data parsing from DTB and adds the new exynos_lcd_panel_init() function for panel specific initialisation from the board file.
---
Changes for v3:
- none
Changes for v2:
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak) exynos_lcd_panel_init function for panel specific initialisation from board file
drivers/video/exynos_fb.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
drivers/video/exynos_fb.c +21 -0
@@ -104,6 +104,13 @@ void __exynos_backlight_reset(void)void exynos_backlight_reset (void ) __attribute__((weak,alias ("__exynos_backlight_reset" ))); +int __exynos_lcd_panel_init (vidinfo_t *vid) +{ +return 0 ; +} +int exynos_lcd_panel_init (vidinfo_t *vid) + __attribute__((weak,alias ("__exynos_lcd_panel_init" ))); +static void lcd_panel_on (vidinfo_t *vid) {udelay (vid->init_delay);
@@ -269,6 +276,15 @@ int exynos_fimd_parse_dt(const void *blob) panel_info.dual_lcd_enabled =fdtdec_get_int (blob, node,"samsung,dual-lcd-enabled" ,0 ); + panel_info.resolution =fdtdec_get_int (blob, node, +"samsung,resolution" ,0 ); + + panel_info.rgb_mode =fdtdec_get_int (blob, node, +"samsung,rgb-mode" ,0 ); + + panel_info.power_on_delay =fdtdec_get_int (blob, node, +"samsung,power-on-delay" ,0 ); + return 0; }#endif
@@ -281,10 +297,15 @@ void lcd_ctrl_init(void *lcdbase)#ifdef CONFIG_OF_CONTROL if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info); +#endif +exynos_lcd_panel_init (&panel_info);#else /* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);#endif + panel_width = panel_info.vl_width; panel_height = panel_info.vl_height;
Signature · 1 line
1.8.3.2
PATCH v3 3/12 video:exynos_fb:fdt: add additional fdt data
Hi Piotr,
Find my comments inline.
Quoted 25 lines · Piotr Wilczek
This patch adds additional data parsing from DTB and adds the new
exynos_lcd_panel_init()function for panel specific initialisation from the board file.Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v3:
- noneChanges for v2:
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak)exynos_lcd_panel_initfunction for panel specific initialisation from board filedrivers/video/exynos_fb.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)drivers/video/exynos_fb.c +0
-0@@ -104,6 +104,13 @@ void __exynos_backlight_reset(void)void exynos_backlight_reset (void )
drivers/video/exynos_fb.c void __exynos_backlight_reset(void) · line 114
Quoted 10 lines
drivers/video/exynos_fb.c +7
-0__attribute__((weak, alias("__exynos_backlight_reset"))); +int __exynos_lcd_panel_init (vidinfo_t *vid) +{ +return 0 ; +} +int exynos_lcd_panel_init (vidinfo_t *vid) + __attribute__((weak,alias ("__exynos_lcd_panel_init" ))); +
This is redundant! We already have exynos_cfg_lcd_gpio, exynos_lcd_power_on and other similar functions to support "panel init".
Please check board/samsung/smdk5250.c
Quoted 9 lines
drivers/video/exynos_fb.c +0
-0static void lcd_panel_on (vidinfo_t *vid) {udelay(vid->init_delay);drivers/video/exynos_fb.c +1
-0@@ -269,6 +276,15 @@ int exynos_fimd_parse_dt(const void *blob) panel_info.dual_lcd_enabled =fdtdec_get_int (blob, node,"samsung,dual-lcd-enabled" ,0 ); + panel_info.resolution = fdtdec_get_int(blob, node,
drivers/video/exynos_fb.c int exynos_fimd_parse_dt(const void *blob) · line 290
Quoted 10 lines
drivers/video/exynos_fb.c +8
-0+ "samsung,resolution", 0); + + panel_info.rgb_mode =fdtdec_get_int (blob, node, +"samsung,rgb-mode" ,0 ); + + panel_info.power_on_delay =fdtdec_get_int (blob, node, +"samsung,power-on-delay" ,0 ); +
All the above DT properties are already present in the same file! This are definitely duplicate entries.
For passing resolution, please use "samsung,vl-col" and "samsung,vl-row"
drivers/video/exynos_fb.c void lcd_ctrl_init(void *lcdbase) · line 304
Quoted 12 lines
return 0;}
#endifdrivers/video/exynos_fb.c +4
-0@@ -281,10 +297,15 @@ void lcd_ctrl_init(void *lcdbase)#ifdef CONFIG_OF_CONTROL if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info); +#endif +exynos_lcd_panel_init (&panel_info);
This is already present as part of lcd_enable in same file! Please check it.
Quoted 11 lines
drivers/video/exynos_fb.c +1
-1#else /* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);#endif + panel_width = panel_info.vl_width; panel_height = panel_info.vl_height; --1.8.3.2
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Regards,
Ajay Kumar
PATCH v3 3/12 video:exynos_fb:fdt: add additional fdt data
Piotr,
Adding more comments.
Quoted 68 lines · Ajay kumar
Hi Piotr,
Find my comments inline.Quoted 25 lines · Piotr Wilczek
This patch adds additional data parsing from DTB and adds the new
exynos_lcd_panel_init()function for panel specific initialisation from the board file.Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v3:
- noneChanges for v2:
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak)exynos_lcd_panel_initfunction for panel specific initialisation from board filedrivers/video/exynos_fb.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)drivers/video/exynos_fb.c +0
-0@@ -104,6 +104,13 @@ void __exynos_backlight_reset(void)void exynos_backlight_reset (void )drivers/video/exynos_fb.c void __exynos_backlight_reset(void) · line 114
Quoted 10 lines
drivers/video/exynos_fb.c +7
-0__attribute__((weak, alias("__exynos_backlight_reset"))); +int __exynos_lcd_panel_init (vidinfo_t *vid) +{ +return 0 ; +} +int exynos_lcd_panel_init (vidinfo_t *vid) + __attribute__((weak,alias ("__exynos_lcd_panel_init" ))); +This is redundant! We already have
exynos_cfg_lcd_gpio,exynos_lcd_power_onand other similar functions to support "panel init".
Please checkboard/samsung/smdk5250.cQuoted 9 lines
drivers/video/exynos_fb.c +0
-0static void lcd_panel_on (vidinfo_t *vid) {udelay(vid->init_delay);drivers/video/exynos_fb.c +1
-0@@ -269,6 +276,15 @@ int exynos_fimd_parse_dt(const void *blob) panel_info.dual_lcd_enabled =fdtdec_get_int (blob, node,"samsung,dual-lcd-enabled" ,0 ); + panel_info.resolution = fdtdec_get_int(blob, node,drivers/video/exynos_fb.c int exynos_fimd_parse_dt(const void *blob) · line 290
Quoted 10 lines
drivers/video/exynos_fb.c +8
-0+ "samsung,resolution", 0); + + panel_info.rgb_mode =fdtdec_get_int (blob, node, +"samsung,rgb-mode" ,0 ); + + panel_info.power_on_delay =fdtdec_get_int (blob, node, +"samsung,power-on-delay" ,0 ); +All the above DT properties are already present in the same file! This are definitely duplicate entries.
For passing resolution, please use "samsung,vl-col" and "samsung,vl-row"
Quoted 15 lines
drivers/video/exynos_fb.c void lcd_ctrl_init(void *lcdbase) · line 304
Quoted 12 lines
return 0;}
#endifdrivers/video/exynos_fb.c +4
-0@@ -281,10 +297,15 @@ void lcd_ctrl_init(void *lcdbase)#ifdef CONFIG_OF_CONTROL if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info); +#endif +exynos_lcd_panel_init (&panel_info);This is already present as part of
lcd_enablein same file! Please check it.
Ok. I just heard from MIPI-DSI engineer that MIPI-DSI should usually be initialized before FIMD video output starts.
Is that the reason why you are trying to do panel_init here? That seems ok, but definitely you should not be using a new function for that.
Use something like below snippet:
====================
/* exynos_fb.c */
.lcd_ctrl_init()
{.
.
.if(CONFIG_EXYNOS_MIPI...)
call lcd_panel_on /* MIPI-DSI to be initialized before FIMD init */ .
do exynos_lcd_init() /* FIMD init */
.
}
.
.
.
.lcd_enable()
{
.
.if(CONFIG_EXYNOS_DP...)
call lcd_panel_on /* DP to be initialized after FIMD init */ .
.
}
Quoted 18 lines
#else
Quoted 10 lines
drivers/video/exynos_fb.c +1
-1/* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);#endif + panel_width = panel_info.vl_width; panel_height = panel_info.vl_height; --1.8.3.2
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Quoted 3 lines
Regards,
Ajay Kumar
Regards,
Ajay Kumar
PATCH v3 3/12 video:exynos_fb:fdt: add additional fdt data
Hi Ajay,
Thank you for review. Please see answers below.
Quoted 49 lines · Ajay kumar
Piotr,
Adding more comments.
Quoted 43 lines · Ajay kumar
Hi Piotr,
Find my comments inline.Quoted 25 lines · Piotr Wilczek
This patch adds additional data parsing from DTB and adds the new
exynos_lcd_panel_init()function for panel specific initialisation from the board file.Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v3:
- noneChanges for v2:
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak)exynos_lcd_panel_initfunction for panel specific initialisation from board filedrivers/video/exynos_fb.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)drivers/video/exynos_fb.c +0
-0@@ -104,6 +104,13 @@ void __exynos_backlight_reset(void)void exynos_backlight_reset (void )drivers/video/exynos_fb.c void __exynos_backlight_reset(void) · line 114
Quoted 10 lines
drivers/video/exynos_fb.c +7
-0__attribute__((weak, alias("__exynos_backlight_reset"))); +int __exynos_lcd_panel_init (vidinfo_t *vid) +{ +return 0 ; +} +int exynos_lcd_panel_init (vidinfo_t *vid) + __attribute__((weak,alias ("__exynos_lcd_panel_init" ))); +This is redundant! We already have
exynos_cfg_lcd_gpio,exynos_lcd_power_onand other similar functions to support "panel init".
The 'init_panel_info' is used to init lcd panel from he board file. It is called when CONFIG_OF_CONTROL is not defined. When CONFIG_OF_CONTROL is defined then we init panel from DTB data in exynos_fimd_parse_dt function.
However, it may be necessary to do some additional initializations that are optional and board specific. That?s what 'exynos_lcd_panel_init' function is for.
Quoted 1 line
Quoted 1 line
Please check
board/samsung/smdk5250.c
smdk5250.c is compiled when CONFIG_OF_CONTROL is not defined. With CONFIG_OF_CONTROL enabled, the exynos5-dt.c is used but it does not implement 'init_panel_info' so I would get undefined reference to 'init_panel_info'. Tahts another reason that I introduced the above function.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/video/exynos_fb.c +0
-0static void lcd_panel_on (vidinfo_t *vid) {udelay(vid->init_delay);drivers/video/exynos_fb.c +0
-0@@ -269,6 +276,15 @@ int exynos_fimd_parse_dt(const void *blob) panel_info.dual_lcd_enabled =fdtdec_get_int (blob, node,"samsung,dual-lcd-enabled" ,0 );
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
drivers/video/exynos_fb.c +5
-0+ panel_info.resolution =fdtdec_get_int (blob, node, +"samsung,resolution" ,0 ); + + panel_info.rgb_mode =fdtdec_get_int (blob, node, +"samsung,rgb-mode" ,0 );Quoted 8 lines
drivers/video/exynos_fb.c int exynos_fimd_parse_dt(const void *blob)
Quoted 6 lines
drivers/video/exynos_fb.c +4
-0+ + panel_info.power_on_delay =fdtdec_get_int (blob, node, +"samsung,power-on-delay" ,0 ); +All the above DT properties are already present in the same file! This are definitely duplicate entries.
Right, rgb_mode and power_on_delay I was supposed to remove in the previous version but overlooked that, thanks.
Quoted 1 line
Quoted 1 line
For passing resolution, please use "samsung,vl-col" and "samsung,vl-row"
Previously HD_RESOLUTION was assigned to panel_info.resolution. It is defined as 0 in libtizen.h.
Quoted 16 lines
Quoted 16 lines
drivers/video/exynos_fb.c void lcd_ctrl_init(void *lcdbase) · line 304
Quoted 13 lines
return 0;}
#endifdrivers/video/exynos_fb.c +4
-0@@ -281,10 +297,15 @@ void lcd_ctrl_init(void *lcdbase)#ifdef CONFIG_OF_CONTROL if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info); +#endif +exynos_lcd_panel_init (&panel_info);This is already present as part of
lcd_enablein same file! Please check it.
Quoted 6 lines
Ok. I just heard from MIPI-DSI engineer that MIPI-DSI should usually be initialized before FIMD video output starts.
Is that the reason why you are trying to do
panel_inithere? That seems ok, but definitely you should not be using a new function for that.
exynos_lcd_panel_init function is supposed to do only additional (to exynos_fimd_parse_dt) initializations like ex: get_tizen_logo_info.
Quoted 56 lines
Use something like below snippet:
====================
/*exynos_fb.c*/
.lcd_ctrl_init()
{.
.
.if(CONFIG_EXYNOS_MIPI...)
calllcd_panel_on/* MIPI-DSI to be initialized before FIMD init */ .
doexynos_lcd_init()/* FIMD init */
.
}
.
.
.
.lcd_enable()
{
.
.if(CONFIG_EXYNOS_DP...)
calllcd_panel_on/* DP to be initialized after FIMD init */ .
.
}Quoted 18 lines
#elseQuoted 10 lines
drivers/video/exynos_fb.c +1
-1/* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);#endif + panel_width = panel_info.vl_width; panel_height = panel_info.vl_height; --1.8.3.2
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-bootQuoted 3 lines
Regards,
Ajay KumarRegards,
Ajay Kumar
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Best regards,
Piotr Wilczek
PATCH v3 4/12 drivers:mmc:sdhci: enable support for DT
In reply to Piotr WilczekThis patch enables support for device tree for sdhci driver. Non DT case is still supported.
---
Changes for v3:
- none
Changes for v2:
- fixed checking for SDMMC boundary
- fiex debug message
- fixed comment to 'pwr_gpio' struct filed
arch/arm/include/asm/arch-exynos/mmc.h | 7 ++ drivers/mmc/s5p_sdhci.c | 129 +++++++++++++++++++++++++++++++++ include/fdtdec.h | 1 + include/sdhci.h | 5 ++ lib/fdtdec.c | 1 + 5 files changed, 143 insertions(+)
arch/arm/include/asm/arch-exynos/mmc.h +7 -0
@@ -53,6 +53,8 @@#define SDHCI_CTRL4_DRIVE_MASK (_x) ((_x) << 16)#define SDHCI_CTRL4_DRIVE_SHIFT (16) +#define SDHCI_MAX_HOSTS 4 +int s5p_sdhci_init (u32 regbase,int index,int bus_width);static inline int s5p_mmc_init (int index,int bus_width)
@@ -62,4 +64,9 @@ static inline int s5p_mmc_init(int index, int bus_width) return s5p_sdhci_init(base, index, bus_width); } + +#ifdef CONFIG_OF_CONTROL +int exynos_mmc_init (const void *blob); +#endif +#endif
drivers/mmc/s5p_sdhci.c +129 -0
140 lines not on this page · raw message
include/fdtdec.h +1 -0
@@ -82,6 +82,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ +COMPAT_SAMSUNG_EXYNOS_MMC ,/* Exynos MMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL ,/* Exynos UART */ COMPAT_MAXIM_MAX77686_PMIC ,/* MAX77686 PMIC */ COMPAT_GENERIC_SPI_FLASH, /* Generic SPI Flash chip */
include/sdhci.h +5 -0
@@ -12,6 +12,7 @@#include <asm/io.h> #include <mmc.h> +#include <fdtdec.h> /* * Controller registers
@@ -244,6 +245,10 @@ struct sdhci_host {const struct sdhci_ops *ops;int index; +int bus_width; +struct fdt_gpio_state pwr_gpio;/* Power GPIO */ +struct fdt_gpio_state cd_gpio;/* Card Detect GPIO */ +void (*set_control_reg)(struct sdhci_host *host);void (*set_clock)(int dev_index,unsigned int div);uint voltages;
lib/fdtdec.c +1 -0
@@ -55,6 +55,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), +COMPAT (SAMSUNG_EXYNOS_MMC ,"samsung,exynos-mmc" ),COMPAT (SAMSUNG_EXYNOS_SERIAL ,"samsung,exynos4210-uart" ),COMPAT (MAXIM_MAX77686_PMIC ,"maxim,max77686_pmic" ), COMPAT(GENERIC_SPI_FLASH, "spi-flash"),
Signature · 1 line
1.8.3.2
PATCH v3 5/12 board:samsung: move checkboard to common file
In reply to Piotr WilczekThe checkboard function's implementation is common for all DT supporting boards and should be placed in the board common file.
---
Changes for v3:
- none
Changes for v2:
- new patch
board/samsung/common/board.c | 12 ++++++++++++ board/samsung/smdk5250/exynos5-dt.c | 15 --------------- board/samsung/smdk5420/smdk5420.c | 15 --------------- 3 files changed, 12 insertions(+), 30 deletions(-)
board/samsung/common/board.c +12 -0
@@ -377,7 +377,19 @@ int board_mmc_init(bd_t *bis)return ret; }#endif + +#ifdef CONFIG_DISPLAY_BOARDINFO +int checkboard (void ) +{ +const char *board_name; + + board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); +printf ("Board: %s\n" , board_name ? board_name :"unknown" ); + +return 0 ; +}#endif +#endif /* CONFIG_OF_CONTROL */ #ifdef CONFIG_BOARD_LATE_INIT int board_late_init (void )
board/samsung/smdk5250/exynos5-dt.c +0 -15
@@ -45,21 +45,6 @@ int exynos_init(void)return 0 ; } -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) -{ -const char *board_name; - - board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); -if (board_name ==NULL ) -printf ("\nUnknown Board\n" ); -else -printf ("\nBoard: %s\n" , board_name); - -return 0 ; -} -#endif -#ifdef CONFIG_LCD void exynos_cfg_lcd_gpio (void ) {
board/samsung/smdk5420/smdk5420.c +0 -15
@@ -142,18 +142,3 @@ int board_get_revision(void) {return 0 ; } - -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) -{ -const char *board_name; - - board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); -if (board_name ==NULL ) -printf ("\nUnknown Board\n" ); -else -printf ("\nBoard: %s\n" , board_name); - -return 0 ; -} -#endif
Signature · 1 line
1.8.3.2
PATCH v3 6/12 arm:exynos: add common DTS file for exynos 4
In reply to Piotr WilczekThis patch adds common dtsi file and config header for all Exynos 4 based boards.
Patch additionaly adds board specific (weak) functions for board_early_init_f and board_power_init functions.
---
Changes for v3:
- none
Changes for v2:
- reuse existing common board.c file
arch/arm/dts/exynos4.dtsi | 139 +++++++++++++++++++++++++++++ arch/arm/include/asm/arch-exynos/board.h | 12 +++ board/samsung/common/board.c | 18 +++- include/configs/exynos4-dt.h | 144 +++++++++++++++++++++++++++++++ 4 files changed, 311 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 include/configs/exynos4-dt.h
arch/arm/dts/exynos4.dtsi new file +139 -0
@@ -0,0 +1,139 @@ +/* + * Samsung's Exynos4 SoC common device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/include/ "skeleton.dtsi" + +/ { + + serial at 13800000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13800000 0x3c>; + id = <0>; + }; + + serial at 13810000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13810000 0x3c>; + id = <1>; + }; + + serial at 13820000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13820000 0x3c>; + id = <2>; + }; + + serial at 13830000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13830000 0x3c>; + id = <3>; + }; + + serial at 13840000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13840000 0x3c>; + id = <4>; + }; + + i2c at 13860000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <0 0 0>; + }; + + i2c at 13870000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <1 1 0>; + }; + + i2c at 13880000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <2 2 0>; + }; + + i2c at 13890000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <3 3 0>; + }; + + i2c at 138a0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <4 4 0>; + }; + + i2c at 138b0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <5 5 0>; + }; + + i2c at 138c0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <6 6 0>; + }; + + i2c at 138d0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <7 7 0>; + }; + + sdhci at 12510000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12510000 0x1000>; + interrupts = <0 75 0>; + }; + + sdhci at 12520000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12520000 0x1000>; + interrupts = <0 76 0>; + }; + + sdhci at 12530000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12530000 0x1000>; + interrupts = <0 77 0>; + }; + + sdhci at 12540000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12540000 0x1000>; + interrupts = <0 78 0>; + }; + + gpio: gpio { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; +};
arch/arm/include/asm/arch-exynos/board.h +12 -0
@@ -14,4 +14,16 @@*/ int exynos_init (void ); +/* +* Exynos board specific changes for +* board_early_init_f +*/ +int exynos_early_init_f (void ); + +/* +* Exynos board specific changes for +* board_power_init +*/ +int exynos_power_init (void ); +#endif /* EXYNOS_BOARD_H */
board/samsung/common/board.c +16 -2
@@ -33,6 +33,20 @@ struct local_info {static struct local_info local; +int __exynos_early_init_f (void ) +{ +return 0 ; +} +int exynos_early_init_f (void ) + __attribute__((weak,alias ("__exynos_early_init_f" ))); + +int __exynos_power_init (void ) +{ +return 0 ; +} +int exynos_power_init (void ) + __attribute__((weak,alias ("__exynos_power_init" ))); +#if definedCONFIG_EXYNOS_TMU /* Boot Time Thermal Analysis for SoC temperature threshold breach */ static void boot_temp_check (void )
@@ -140,7 +154,7 @@ int board_early_init_f(void)board_i2c_init (gd->fdt_blob);#endif - return err; + return exynos_early_init_f(); }#endif
@@ -284,7 +298,7 @@ int power_init_board(void) ret =max77686_init ();#endif - return ret; + return exynos_power_init(); }#endif
include/configs/exynos4-dt.h new file +144 -0
144 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v3 7/12 board:samsung:common: move max77686 init function
In reply to Piotr WilczekThis patch moves board specific max77686 init function from common board to smdk5250 board file.
---
Changes for v3:
- max77686 init function is moved to smdk5250 board file
Changes for v2:
- new patch
board/samsung/common/board.c | 120 ------------------------------------ board/samsung/smdk5250/smdk5250.c | 125 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 120 deletions(-)
board/samsung/common/board.c +0 -120
@@ -22,7 +22,6 @@#include <asm/arch/power.h> #include <power/pmic.h> #include <asm/arch/sromc.h> -#include <power/max77686_pmic.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -175,129 +174,10 @@ static int board_init_cros_ec_devices(const void *blob)#endif #if defined(CONFIG_POWER ) -#ifdef CONFIG_POWER_MAX77686 -static int pmic_reg_update (struct pmic *p,int reg,uint regval) -{ -u32 val; -int ret =0 ; - - ret =pmic_reg_read (p, reg, &val); -if (ret) { -debug ("%s: PMIC %d register read failed\n" , __func__, reg); -return -1 ; - } - val |= regval; - ret =pmic_reg_write (p, reg, val); -if (ret) { -debug ("%s: PMIC %d register write failed\n" , __func__, reg); -return -1 ; - } -return 0 ; -} - -static int max77686_init (void ) -{ -struct pmic *p; - -if (pmic_init (I2C_PMIC )) -return -1 ; - - p =pmic_get ("MAX77686_PMIC" ); -if (!p) -return -ENODEV ; - -if (pmic_probe (p)) -return -1 ; - -if (pmic_reg_update (p,MAX77686_REG_PMIC_32KHZ ,MAX77686_32KHCP_EN )) -return -1 ; - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BBAT , -MAX77686_BBCHOSTEN |MAX77686_BBCVS_3_5V )) -return -1 ; - -/* VDD_MIF */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK1OUT , -MAX77686_BUCK1OUT_1V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK1OUT ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK1CRTL , -MAX77686_BUCK1CTRL_EN )) -return -1 ; - -/* VDD_ARM */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK2DVS1 , -MAX77686_BUCK2DVS1_1_3V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK2DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK2CTRL1 , -MAX77686_BUCK2CTRL_ON )) -return -1 ; - -/* VDD_INT */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK3DVS1 , -MAX77686_BUCK3DVS1_1_0125V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK3DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK3CTRL , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_G3D */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK4DVS1 , -MAX77686_BUCK4DVS1_1_2V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK4DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK4CTRL1 , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_LDO2 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO2CTRL1 , -MAX77686_LD02CTRL1_1_5V |EN_LDO )) -return -1 ; - -/* VDD_LDO3 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO3CTRL1 , -MAX77686_LD03CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO5 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO5CTRL1 , -MAX77686_LD05CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO10 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO10CTRL1 , -MAX77686_LD10CTRL1_1_8V |EN_LDO )) -return -1 ; - -return 0 ; -} -#endif -int power_init_board (void ) { -int ret =0 ; -set_ps_hold_ctrl (); -#ifdef CONFIG_POWER_MAX77686 - ret =max77686_init (); -#endif -return exynos_power_init (); }#endif
board/samsung/smdk5250/smdk5250.c +125 -0
131 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v3 8/12 arm:exynos: enable sdhci and misc_init to common board
In reply to Piotr WilczekThis patch enables sdhci initialisation and misc_init_r in common board file for all exynos 4 based boards.
---
Changes for v3:
- none
Changes for v2:
- new patch
board/samsung/common/board.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
board/samsung/common/board.c +30 -0
@@ -22,6 +22,8 @@#include <asm/arch/power.h> #include <power/pmic.h> #include <asm/arch/sromc.h> +#include <lcd.h> +#include <samsung/misc.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -183,6 +185,7 @@ int power_init_board(void)#endif #ifdef CONFIG_OF_CONTROL +#ifdef CONFIG_SMC911X static int decode_sromc(const void *blob, struct fdt_sromc *config) { int err;
@@ -206,6 +209,7 @@ static int decode_sromc(const void *blob, struct fdt_sromc *config) }return 0 ; } +#endif int board_eth_init (bd_t *bis) {
@@ -263,10 +267,18 @@ int board_mmc_init(bd_t *bis) {int ret; +#ifdef CONFIG_SDHCI +/* mmc initializattion for available channels */ + ret =exynos_mmc_init (gd->fdt_blob); +if (ret) +debug ("mmc init failed\n" ); +#endif +#ifdef CONFIG_DWMMC /* dwmmc initializattion for available channels */ ret =exynos_dwmmc_init (gd->fdt_blob);if (ret)debug ("dwmmc init failed\n" ); +#endif return ret; }
@@ -315,3 +327,21 @@ int arch_early_init_r(void)return 0 ; } + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r (void ) +{ +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +set_board_info (); +#endif +#ifdef CONFIG_LCD_MENU +keys_init (); +check_boot_mode (); +#endif +#ifdef CONFIG_CMD_BMP +if (panel_info.logo_on) +draw_logo (); +#endif +return 0 ; +} +#endif
Signature · 1 line
1.8.3.2
PATCH v3 9/12 board:origen: Enable device tree on Origen
In reply to Piotr WilczekThis patch enables to run Origen board on device tree.
Uart, DRAM and MMC init functions are removed as their generic replacements form the common board file are used.
The config file is modified to contain only board specific options.
---
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- no changes
arch/arm/dts/Makefile | 2 + arch/arm/dts/exynos4210-origen.dts | 45 ++++++++++++++ board/samsung/origen/origen.c | 112 +++-------------------------------- include/configs/origen.h | 117 +++++++++++++------------------------ 4 files changed, 96 insertions(+), 180 deletions(-) create mode 100644 arch/arm/dts/exynos4210-origen.dts
arch/arm/dts/Makefile +2 -0
@@ -1,3 +1,5 @@ +dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb + dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \ exynos5250-smdk5250.dtb \
arch/arm/dts/exynos4210-origen.dts new file +45 -0
46 lines not on this page · raw message
board/samsung/origen/origen.c +9 -103
138 lines not on this page · raw message
include/configs/origen.h +40 -77
179 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v3 9/12 board:origen: Enable device tree on Origen
Quoted 387 lines · Piotr Wilczek
This patch enables to run Origen board on device tree.
Uart, DRAM and MMC init functions are removed as their generic replacements form the common board file are used.
The config file is modified to contain only board specific options.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Chander Kashyap <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v3:
- dts file moved toarch/arm/dtsChanges for v2:
- no changesarch/arm/dts/Makefile | 2 + arch/arm/dts/exynos4210-origen.dts | 45 ++++++++++++++ board/samsung/origen/origen.c | 112 +++-------------------------------- include/configs/origen.h | 117 +++++++++++++------------------------ 4 files changed, 96 insertions(+), 180 deletions(-) create mode 100644 arch/arm/dts/exynos4210-origen.dtsarch/arm/dts/Makefile +2
-0@@ -1,3 +1,5 @@ +dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb + dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \ exynos5250-smdk5250.dtb \arch/arm/dts/exynos4210-origen.dts new file +45
-0@@ -0,0 +1,45 @@ +/* + * Samsung's Exynos4210 based Origen board device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +/include/ "skeleton.dtsi" +/include/ "exynos4.dtsi" + +/ { + model = "Insignal Origen evaluation board based on Exynos4210"; + compatible = "insignal,origen", "samsung,exynos4210"; + + chosen { + bootargs =""; + }; + + aliases { + serial0 = "/serial at 13800000"; + console = "/serial at 13820000"; + mmc2 = "sdhci at 12530000"; + }; + + sdhci at 12510000 { + status = "disabled"; + }; + + sdhci at 12520000 { + status = "disabled"; + }; + + sdhci at 12530000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + cd-gpios = <&gpio 0x2008002 0>; + }; + + sdhci at 12540000 { + status = "disabled"; + }; +};board/samsung/origen/origen.c +9
-103@@ -11,129 +11,35 @@#include <asm/arch/mmc.h> #include <asm/arch/periph.h> #include <asm/arch/pinmux.h> +#include <usb.h> DECLARE_GLOBAL_DATA_PTR ; -struct exynos4_gpio_part1 *gpio1; -struct exynos4_gpio_part2 *gpio2; -int board_init (void ) +u32 get_board_rev (void ) { - gpio1 = (struct exynos4_gpio_part1 *)EXYNOS4_GPIO_PART1_BASE ; - gpio2 = (struct exynos4_gpio_part2 *)EXYNOS4_GPIO_PART2_BASE ; - - gd->bd->bi_boot_params = (PHYS_SDRAM_1 +0x100UL );return 0 ; } -static int board_uart_init (void ) +int exynos_init (void ) { -int err; - - err =exynos_pinmux_config (PERIPH_ID_UART0 ,PINMUX_FLAG_NONE ); -if (err) { -debug ("UART0 not configured\n" ); -return err; - } - - err =exynos_pinmux_config (PERIPH_ID_UART1 ,PINMUX_FLAG_NONE ); -if (err) { -debug ("UART1 not configured\n" ); -return err; - } - - err =exynos_pinmux_config (PERIPH_ID_UART2 ,PINMUX_FLAG_NONE ); -if (err) { -debug ("UART2 not configured\n" ); -return err; - } - - err =exynos_pinmux_config (PERIPH_ID_UART3 ,PINMUX_FLAG_NONE ); -if (err) { -debug ("UART3 not configured\n" ); -return err; - } -return 0 ; } -#ifdef CONFIG_BOARD_EARLY_INIT_F -int board_early_init_f (void ) -{ -int err; - err =board_uart_init (); -if (err) { -debug ("UART init failed\n" ); -return err; - } -return err; -} -#endif - -int dram_init (void ) +int board_usb_init (int index,enum usb_init_type init) { - gd->ram_size =get_ram_size ((long *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE ) - +get_ram_size ((long *)PHYS_SDRAM_2 ,PHYS_SDRAM_2_SIZE ) - +get_ram_size ((long *)PHYS_SDRAM_3 ,PHYS_SDRAM_3_SIZE ) - +get_ram_size ((long *)PHYS_SDRAM_4 ,PHYS_SDRAM_4_SIZE ); -return 0 ; } -void dram_init_banksize (void ) -{ - gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =get_ram_size ((long *)PHYS_SDRAM_1 , \ -PHYS_SDRAM_1_SIZE ); - gd->bd->bi_dram[1 ].start =PHYS_SDRAM_2 ; - gd->bd->bi_dram[1 ].size =get_ram_size ((long *)PHYS_SDRAM_2 , \ -PHYS_SDRAM_2_SIZE ); - gd->bd->bi_dram[2 ].start =PHYS_SDRAM_3 ; - gd->bd->bi_dram[2 ].size =get_ram_size ((long *)PHYS_SDRAM_3 , \ -PHYS_SDRAM_3_SIZE ); - gd->bd->bi_dram[3 ].start =PHYS_SDRAM_4 ; - gd->bd->bi_dram[3 ].size =get_ram_size ((long *)PHYS_SDRAM_4 , \ -PHYS_SDRAM_4_SIZE ); -} - -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) +#ifdef CONFIG_USB_CABLE_CHECK +int usb_cable_connected (void ) { -printf ("\nBoard: ORIGEN\n" );return 0 ; }#endif -#ifdef CONFIG_GENERIC_MMC -int board_mmc_init (bd_t *bis) +#ifdef CONFIG_BOARD_EARLY_INIT_F +int exynos_early_init_f (void ) { -int i, err; - -/* -* MMC2 SD card GPIO: -* -* GPK2[0] SD_2_CLK(2) -* GPK2[1] SD_2_CMD(2) -* GPK2[2] SD_2_CDn -* GPK2[3:6] SD_2_DATA[0:3](2) -*/ -for (i =0 ; i <7 ; i++) { -/* GPK2[0:6] special function 2 */ -s5p_gpio_cfg_pin (&gpio2->k2, i,GPIO_FUNC (0x2 )); - -/* GPK2[0:6] drv 4x */ -s5p_gpio_set_drv (&gpio2->k2, i,GPIO_DRV_4X ); - -/* GPK2[0:1] pull disable */ -if (i ==0 || i ==1 ) { -s5p_gpio_set_pull (&gpio2->k2, i,GPIO_PULL_NONE ); -continue ; - } - -/* GPK2[2:6] pull up */ -s5p_gpio_set_pull (&gpio2->k2, i,GPIO_PULL_UP ); - } - - err =s5p_mmc_init (2 ,4 ); -return err; +return 0 ; }#endif include/configs/origen.h +36
-72@@ -6,115 +6,79 @@* SPDX-License-Identifier: GPL-2.0+ */ -#ifndef __CONFIG_H -#define __CONFIG_H +#ifndef __CONFIG_ORIGEN_H +#define __CONFIG_ORIGEN_H + +#include <configs/exynos4-dt.h> + +#define CONFIG_SYS_PROMPT "ORIGEN # " + +#undef CONFIG_DEFAULT_DEVICE_TREE +#define CONFIG_DEFAULT_DEVICE_TREE exynos4210-origen/* High Level Configuration Options */ -#define CONFIG_SAMSUNG 1/* SAMSUNG core */ -#define CONFIG_S5P 1/* S5P Family */ #define CONFIG_EXYNOS4210 1/* which is a EXYNOS4210 SoC */ #define CONFIG_ORIGEN 1/* working with ORIGEN*/ -#include <asm/arch/cpu.h> /* get chip and board defs */ - -#define CONFIG_ARCH_CPU_INIT -#define CONFIG_DISPLAY_CPUINFO -#define CONFIG_DISPLAY_BOARDINFO -#define CONFIG_BOARD_EARLY_INIT_F -#define CONFIG_SYS_DCACHE_OFF 1 +/* ORIGEN has 4 bank of DRAM */ +#define CONFIG_NR_DRAM_BANKS 4#define CONFIG_SYS_SDRAM_BASE 0x40000000 -#define CONFIG_SYS_TEXT_BASE 0x43E00000 +#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE +#define SDRAM_BANK_SIZE (256 << 20)/* 256 MB */ -/* input clock of PLL: ORIGEN has 24MHz input clock */ -#define CONFIG_SYS_CLK_FREQ 24000000 +/* memtest works on */ +#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x6000000) +#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x3E00000) -#define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_CMDLINE_TAG -#define CONFIG_INITRD_TAG -#define CONFIG_CMDLINE_EDITING +#define CONFIG_SYS_TEXT_BASE 0x43E00000#define CONFIG_MACH_TYPE MACH_TYPE_ORIGEN -/* Power Down Modes */ -#define S5P_CHECK_SLEEP 0x00000BAD -#define S5P_CHECK_DIDLE 0xBAD00000 -#define S5P_CHECK_LPA 0xABAD0000 -/* Size of malloc() pool */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (1 << 20)) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (80 * SZ_1M))/* select serial console configuration */ -#define CONFIG_SERIAL2 1/* use SERIAL 2 */ +#define CONFIG_SERIAL2 #define CONFIG_BAUDRATE 115200 -#define EXYNOS4_DEFAULT_UART_OFFSET 0x020000 -#define CONFIG_SKIP_LOWLEVEL_INIT +/* Console configuration */ +#define CONFIG_SYS_CONSOLE_INFO_QUIET +#define CONFIG_SYS_CONSOLE_IS_IN_ENV + +#define CONFIG_BOOTARGS "Please use defined boot" +#define CONFIG_BOOTCOMMAND "run mmcboot" +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" -/* SD/MMC configuration */ -#define CONFIG_GENERIC_MMC -#define CONFIG_MMC -#define CONFIG_SDHCI -#define CONFIG_S5P_SDHCI +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ + - GENERATED_GBL_DATA_SIZE) -/* PWM */ -#define CONFIG_PWM 1 +#define CONFIG_SYS_MEM_TOP_HIDE (1 << 20)/* ram console */ -/* allow to overwrite serial and ethaddr */ -#define CONFIG_ENV_OVERWRITE +#define CONFIG_SYS_MONITOR_BASE 0x00000000 -/* Command definition*/ -#include <config_cmd_default.h> +/* Power Down Modes */ +#define S5P_CHECK_SLEEP 0x00000BAD +#define S5P_CHECK_DIDLE 0xBAD00000 +#define S5P_CHECK_LPA 0xABAD0000#undef CONFIG_CMD_PING#define CONFIG_CMD_ELF #define CONFIG_CMD_DHCP -#define CONFIG_CMD_MMC -#define CONFIG_CMD_FAT #undef CONFIG_CMD_NET#undef CONFIG_CMD_NFS -#define CONFIG_BOOTDELAY 3 -#define CONFIG_ZERO_BOOTDELAY_CHECK /* MMC SPL */ #define CONFIG_SPL #define COPY_BL2_FNPTR_ADDR 0x02020030#define CONFIG_SPL_TEXT_BASE 0x02021410 +#undef CONFIG_BOOTCOMMAND#define CONFIG_BOOTCOMMAND "fatload mmc 0 40007000 uImage; bootm 40007000" -/* Miscellaneous configurable options */ -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ -#define CONFIG_SYS_PROMPT "ORIGEN # " -#define CONFIG_SYS_CBSIZE 256/* Console I/O Buffer Size*/ -#define CONFIG_SYS_PBSIZE 384/* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 16/* max number of command args */ -#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" -/* Boot Argument Buffer Size */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE -/* memtest works on */ -#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE -#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x6000000) -#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x3E00000) - -/* ORIGEN has 4 bank of DRAM */ -#define CONFIG_NR_DRAM_BANKS 4 -#define SDRAM_BANK_SIZE (256UL << 20UL)/* 256 MB */ -#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE -#define PHYS_SDRAM_1_SIZE SDRAM_BANK_SIZE -#define PHYS_SDRAM_2 (CONFIG_SYS_SDRAM_BASE + SDRAM_BANK_SIZE) -#define PHYS_SDRAM_2_SIZE SDRAM_BANK_SIZE -#define PHYS_SDRAM_3 (CONFIG_SYS_SDRAM_BASE + (2 * SDRAM_BANK_SIZE)) -#define PHYS_SDRAM_3_SIZE SDRAM_BANK_SIZE -#define PHYS_SDRAM_4 (CONFIG_SYS_SDRAM_BASE + (3 * SDRAM_BANK_SIZE)) -#define PHYS_SDRAM_4_SIZE SDRAM_BANK_SIZE - -/* FLASH and environment organization */ -#define CONFIG_SYS_NO_FLASH 1 -#undef CONFIG_CMD_IMLS#define CONFIG_IDENT_STRING " for ORIGEN"#define CONFIG_CLK_1000_400_200
include/configs/origen.h line 89
Quoted 6 lines
include/configs/origen.h +1
-2@@ -122,17 +86,17 @@/* MIU (Memory Interleaving Unit) */ #define CONFIG_MIU_2BIT_21_7_INTERLEAVED -#define CONFIG_ENV_IS_IN_MMC 1 -#define CONFIG_SYS_MMC_ENV_DEV 0 +#undef CONFIG_ENV_SIZE
Sorry, I didn't catch it at v2 patch.
It's better define each boards than undef.
include/configs/origen.h line 93
Quoted 4 lines
include/configs/origen.h +1
-0#define CONFIG_ENV_SIZE (16 << 10)/* 16 KB */ #define RESERVE_BLOCK_SIZE (512)#define BL1_SIZE (16 << 10)/*16 K reserved for BL1*/ +#undef CONFIG_ENV_OFFSET
ditto.
include/configs/origen.h line 99
Quoted 7 lines
include/configs/origen.h +1
-1#define CONFIG_ENV_OFFSET (RESERVE_BLOCK_SIZE + BL1_SIZE) -#define CONFIG_DOS_PARTITION 1#define CONFIG_SPL_LDSCRIPT "board/samsung/common/exynos-uboot-spl.lds"#define CONFIG_SPL_MAX_FOOTPRINT (14 * 1024) +#undef CONFIG_SYS_INIT_SP_ADDR
ditto.
include/configs/origen.h line 107
Quoted 10 lines
include/configs/origen.h +1
-2#define CONFIG_SYS_INIT_SP_ADDR 0x02040000/* U-boot copy size from boot Media to DRAM.*/ @@ -140,7 +104,6 @@#define BL2_START_OFFSET ((CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)/512)#define BL2_SIZE_BLOC_COUNT (COPY_BL2_SIZE/512) -/* Enable devicetree support */ -#define CONFIG_OF_LIBFDT +#undef CONFIG_CMD_I2C
ditto.
Thanks,
Minkyu Kang.
PATCH v3 10/12 board:universal: Enable device tree on Universal
In reply to Piotr WilczekThis patch enables to run Universal board on device tree.
---
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- no changes
arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos4210-universal_c210.dts | 83 ++++++++++++ board/samsung/universal_c210/universal.c | 204 ++++++++--------------------- include/configs/s5pc210_universal.h | 145 ++++++-------------- 4 files changed, 178 insertions(+), 257 deletions(-) create mode 100644 arch/arm/dts/exynos4210-universal_c210.dts
arch/arm/dts/Makefile +2 -1
@@ -1,4 +1,5 @@ -dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb +dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ + exynos4210-universal_c210.dtb dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \
arch/arm/dts/exynos4210-universal_c210.dts new file +83 -0
83 lines not on this page · raw message
board/samsung/universal_c210/universal.c +53 -151
271 lines not on this page · raw message
include/configs/s5pc210_universal.h +40 -105
193 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v3 11/12 board:trats: Enable device tree on Trats
In reply to Piotr WilczekThis patch enables to run Trats board on device tree.
---
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- no changes
arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos4210-trats.dts | 120 +++++++++++++++++++++ board/samsung/trats/trats.c | 213 ++------------------------------------ include/configs/trats.h | 192 ++++++++-------------------------- 4 files changed, 174 insertions(+), 354 deletions(-) create mode 100644 arch/arm/dts/exynos4210-trats.dts
arch/arm/dts/Makefile +2 -1
@@ -1,5 +1,6 @@ dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ - exynos4210-universal_c210.dtb + exynos4210-universal_c210.dtb \ + exynos4210-trats.dtb dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \
arch/arm/dts/exynos4210-trats.dts new file +120 -0
121 lines not on this page · raw message
board/samsung/trats/trats.c +10 -203
299 lines not on this page · raw message
include/configs/trats.h +42 -150
257 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v3 12/12 board:trats2: Enable device tree on Trats2
In reply to Piotr WilczekThis patch enables to run Trats2 board on device tree.
---
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- fixed mmc2 address in DT
arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++++++++++++++++++ board/samsung/trats2/trats2.c | 233 +------------------- include/configs/trats2.h | 198 +++-------------- 4 files changed, 476 insertions(+), 392 deletions(-) create mode 100644 arch/arm/dts/exynos4412-trats2.dts
arch/arm/dts/Makefile +2 -1
@@ -1,6 +1,7 @@ dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ exynos4210-universal_c210.dtb \ - exynos4210-trats.dtb + exynos4210-trats.dtb \ + exynos4412-trats2.dtb dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \
arch/arm/dts/exynos4412-trats2.dts new file +434 -0
434 lines not on this page · raw message
board/samsung/trats2/trats2.c +10 -223
294 lines not on this page · raw message
include/configs/trats2.h +30 -168
245 lines not on this page · raw message
Signature · 1 line
1.8.3.2
v4 cover Exynos4: add support for device tree
In reply to Piotr WilczekThis patch set enables support for device tree on all Exynos4 based boards.
DT support is enabled on Exynos mipi dsim and sdhci drives. Common board.c file is reused for all functions common for Exynos4 boards. Board specific files are implemented in the board files. Origen, Universal, Trats and Trats2 boards are modifed to support device tree.
This patch series depends on:
[U-Boot] sizes.h - consolidate for all architectures
http://patchwork.ozlabs.org/patch/324427/
Changes for v4:
- define CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, CONFIG_CMD_I2C at each board
- use "-" hypen in DT bindings
- remove duplicated DT properties at exynos_fb.c file
Changes for v3:
- moved max77686 init function to smdk5250 board file
- board DTS files moved to arch/arm/dts
- rebased on the latest tree
Changes for v2:
- removed incorrectly implemented check for invalid peripheral id
- removed unnecesary white space
- removed panel specific init function 's6e8ax0_init' to the board file
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak) exynos_lcd_panel_init function for panel specific initialisation from board file
- fixed checking for SDMMC boundary
- fiex debug message
- fixed comment to 'pwr_gpio' struct filed
- new patch to move checkboard to common file
- reuse existing common board.c file
- new patch that removes unused max77686_init function
- fixed mmc2 addres in DT on Trats2
Piotr Wilczek (12):
exynos4:pinmux:fdt: decode peripheral id video:mipidsim:fdt: Add DT support for mipi dsim driver video:exynos_fb:fdt: add additional fdt data drivers:mmc:sdhci: enable support for DT board:samsung: move checkboard to common file arm:exynos: add common DTS file for exynos 4 board:samsung:common: move max77686 init function arm:exynos: enable sdhci and misc_init to common board board:origen: Enable device tree on Origen board:universal: Enable device tree on Universal board:trats: Enable device tree on Trats board:trats2: Enable device tree on Trats2
arch/arm/cpu/armv7/exynos/pinmux.c | 17 ++ arch/arm/dts/Makefile | 5 + arch/arm/dts/exynos4.dtsi | 138 +++++++++ arch/arm/dts/exynos4210-origen.dts | 45 +++ arch/arm/dts/exynos4210-trats.dts | 120 ++++++++ arch/arm/dts/exynos4210-universal_c210.dts | 83 +++++ arch/arm/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++++++++ arch/arm/include/asm/arch-exynos/board.h | 12 + arch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 + arch/arm/include/asm/arch-exynos/mmc.h | 7 + board/samsung/common/board.c | 180 ++++------- board/samsung/origen/origen.c | 112 +------ board/samsung/smdk5250/exynos5-dt.c | 15 - board/samsung/smdk5250/smdk5250.c | 125 ++++++++ board/samsung/smdk5420/smdk5420.c | 15 - board/samsung/trats/trats.c | 213 +------------ board/samsung/trats2/trats2.c | 233 +------------- board/samsung/universal_c210/universal.c | 204 ++++--------- drivers/mmc/s5p_sdhci.c | 129 ++++++++ drivers/video/exynos_fb.c | 15 + drivers/video/exynos_mipi_dsi.c | 96 ++++++ include/configs/exynos4-dt.h | 138 +++++++++ include/configs/origen.h | 110 ++----- include/configs/s5pc210_universal.h | 152 +++------- include/configs/trats.h | 206 ++++--------- include/configs/trats2.h | 204 +++---------- include/fdtdec.h | 2 + include/sdhci.h | 5 + lib/fdtdec.c | 2 + 29 files changed, 1686 insertions(+), 1336 deletions(-) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 arch/arm/dts/exynos4210-origen.dts create mode 100644 arch/arm/dts/exynos4210-trats.dts create mode 100644 arch/arm/dts/exynos4210-universal_c210.dts create mode 100644 arch/arm/dts/exynos4412-trats2.dts create mode 100644 include/configs/exynos4-dt.h
Signature · 1 line
1.8.3.2
PATCH v4 1/12 exynos4:pinmux:fdt: decode peripheral id
This patch adds api to decode peripheral id based on interrupt number.
---
Changes for v4:
- none
Changes for v3:
- none
Changes for v2:
- removed incorrectly implemented check for invalid peripheral id
- removed unnecesary white space
arch/arm/cpu/armv7/exynos/pinmux.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/cpu/armv7/exynos/pinmux.c +17 -0
@@ -741,6 +741,21 @@ int exynos_pinmux_config(int peripheral, int flags) }#ifdef CONFIG_OF_CONTROL +static int exynos4_pinmux_decode_periph_id (const void *blob,int node) +{ +int err; +u32 cell[3 ]; + + err =fdtdec_get_int_array (blob, node,"interrupts" , cell, +ARRAY_SIZE (cell)); +if (err) { +debug (" invalid peripheral id\n" ); +return PERIPH_ID_NONE ; + } + +return cell[1 ]; +} +static int exynos5_pinmux_decode_periph_id (const void *blob,int node) {int err;
@@ -758,6 +773,8 @@ int pinmux_decode_periph_id(const void *blob, int node) {if (cpu_is_exynos5 ())return exynos5_pinmux_decode_periph_id (blob, node); +else if (cpu_is_exynos4 ()) +return exynos4_pinmux_decode_periph_id (blob, node);else return PERIPH_ID_NONE ; }
Signature · 1 line
1.8.3.2
PATCH v4 2/12 video:mipidsim:fdt: Add DT support for mipi dsim driver
In reply to Piotr WilczekThis patch enables parsing mipi data from device tree. Non device tree case is still supported.
---
Changes for v4:
- use "-" hypen for DT bindings
Changes for v3:
- none
Changes for v2:
- removed panel specific init function 's6e8ax0_init' to the board file
arch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 ++ drivers/video/exynos_mipi_dsi.c | 96 ++++++++++++++++++++++++++++ include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 4 files changed, 103 insertions(+)
arch/arm/include/asm/arch-exynos/mipi_dsim.h +5 -0
@@ -12,6 +12,7 @@#include <linux/list.h> #include <linux/fb.h> +#include <lcd.h> #define PANEL_NAME_SIZE (32)
@@ -368,8 +369,12 @@ int exynos_mipi_dsi_register_lcd_device(struct mipi_dsim_lcd_device *lcd_dev);void exynos_set_dsim_platform_data (struct exynos_platform_mipi_dsim *pd); +void exynos_init_dsim_platform_data (vidinfo_t *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void ); +#ifdef CONFIG_OF_CONTROL +extern int mipi_power (void ); +#endif #endif /* _DSIM_H */
drivers/video/exynos_mipi_dsi.c +96 -0
112 lines not on this page · raw message
include/fdtdec.h +1 -0
@@ -79,6 +79,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS5_USB3_PHY ,/* Exynos phy controller for usb3.0 */ COMPAT_SAMSUNG_EXYNOS_TMU ,/* Exynos TMU */ COMPAT_SAMSUNG_EXYNOS_FIMD ,/* Exynos Display controller */ +COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */
lib/fdtdec.c +1 -0
@@ -52,6 +52,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS5_USB3_PHY ,"samsung,exynos5250-usb3-phy" ),COMPAT (SAMSUNG_EXYNOS_TMU ,"samsung,exynos-tmu" ),COMPAT (SAMSUNG_EXYNOS_FIMD ,"samsung,exynos-fimd" ), +COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"),
Signature · 1 line
1.8.3.2
PATCH v4 2/12 video:mipidsim:fdt: Add DT support for mipi dsim driver
Piotr,
You need to add the documentation for the bindings you create. Please add a exynos_mipi_dsi.txt file under the directory:
doc/device-tree-bindings/video/
Regards,
Ajay Kumar
Quoted 208 lines · Piotr Wilczek
This patch enables parsing mipi data from device tree. Non device tree case is still supported.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v4:
- use "-" hypen for DT bindingsChanges for v3:
- noneChanges for v2:
- removed panel specific init function 's6e8ax0_init' to the board filearch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 ++ drivers/video/exynos_mipi_dsi.c | 96 ++++++++++++++++++++++++++++ include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 4 files changed, 103 insertions(+)arch/arm/include/asm/arch-exynos/mipi_dsim.h +1
-0@@ -12,6 +12,7 @@#include <linux/list.h> #include <linux/fb.h> +#include <lcd.h> #define PANEL_NAME_SIZE (32)@@ -368,8 +369,12 @@ int exynos_mipi_dsi_register_lcd_device(struct
mipi_dsim_lcd_device*lcd_dev);void
exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd);arch/arm/include/asm/arch-exynos/mipi_dsim.h +4
-0+void exynos_init_dsim_platform_data (vidinfo_t *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void ); +#ifdef CONFIG_OF_CONTROL +extern int mipi_power (void ); +#endif #endif /* _DSIM_H */ drivers/video/exynos_mipi_dsi.c +16
-0@@ -9,6 +9,8 @@#include <common.h> #include <malloc.h> +#include <fdtdec.h> +#include <libfdt.h> #include <linux/err.h> #include <asm/arch/dsim.h> #include <asm/arch/mipi_dsim.h> @@ -22,7 +24,14 @@#define master_to_driver (a) (a->dsim_lcd_drv)#define master_to_device (a) (a->dsim_lcd_dev) +DECLARE_GLOBAL_DATA_PTR ; +static struct exynos_platform_mipi_dsim *dsim_pd; +#ifdef CONFIG_OF_CONTROL +static struct mipi_dsim_config dsim_config_dt; +static struct exynos_platform_mipi_dsim dsim_platform_data_dt; +static struct mipi_dsim_lcd_device mipi_lcd_device_dt; +#endif struct mipi_dsim_ddi {int bus_id;@@ -238,3 +247,90 @@ void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd) dsim_pd = pd; } + +#ifdef CONFIG_OF_CONTROL +int exynos_dsim_config_parse_dt (const void *blob) +{ +int node; + + node = fdtdec_next_compatible(blob, 0,
COMPAT_SAMSUNG_EXYNOS_MIPI_DSI);drivers/video/exynos_mipi_dsi.c +2
-0+if (node <=0 ) { + printf("exynos_mipi_dsi: Can't get device node for mipidsi\n");
drivers/video/exynos_mipi_dsi.c +67
-0+return -ENODEV ; + } + + dsim_config_dt.e_interface =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-interface" ,0 ); + + dsim_config_dt.e_virtual_ch =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-virtual-ch" ,0 ); + + dsim_config_dt.e_pixel_format =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-pixel-format" ,0 ); + + dsim_config_dt.e_burst_mode =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-burst-mode" ,0 ); + + dsim_config_dt.e_no_data_lane =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-no-data-lane" ,0 ); + + dsim_config_dt.e_byte_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-byte-clk" ,0 ); + + dsim_config_dt.hfp =fdtdec_get_int (blob, node, +"samsung,dsim-config-hfp" ,0 ); + + dsim_config_dt.p =fdtdec_get_int (blob, node, +"samsung,dsim-config-p" ,0 ); + dsim_config_dt.m =fdtdec_get_int (blob, node, +"samsung,dsim-config-m" ,0 ); + dsim_config_dt.s =fdtdec_get_int (blob, node, +"samsung,dsim-config-s" ,0 ); + + dsim_config_dt.pll_stable_time =fdtdec_get_int (blob, node, +"samsung,dsim-config-pll-stable-time" ,0 ); + + dsim_config_dt.esc_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-esc-clk" ,0 ); + + dsim_config_dt.stop_holding_cnt =fdtdec_get_int (blob, node, +"samsung,dsim-config-stop-holding-cnt" ,0 ); + + dsim_config_dt.bta_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-bta-timeout" ,0 ); + + dsim_config_dt.rx_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-rx-timeout" ,0 ); + + mipi_lcd_device_dt.name =fdtdec_get_config_string (blob, +"samsung,dsim-device-name" ); + + mipi_lcd_device_dt.id =fdtdec_get_int (blob, node, +"samsung,dsim-device-id" ,0 ); + + mipi_lcd_device_dt.bus_id =fdtdec_get_int (blob, node, +"samsung,dsim-device-bus_id" ,0 ); + + mipi_lcd_device_dt.reverse_panel =fdtdec_get_int (blob, node, +"samsung,dsim-device-reverse-panel" ,0 ); + +return 0 ; +} + +void exynos_init_dsim_platform_data (vidinfo_t *vid) +{ +if (exynos_dsim_config_parse_dt (gd->fdt_blob)) +debug ("Can't get proper dsim config.\n" ); + + strcpy(dsim_platform_data_dt.lcd_panel_name,mipi_lcd_device_dt.name);
drivers/video/exynos_mipi_dsi.c +11
-0+ dsim_platform_data_dt.dsim_config = &dsim_config_dt; + dsim_platform_data_dt.mipi_power = mipi_power; + dsim_platform_data_dt.phy_enable = set_mipi_phy_ctrl; + dsim_platform_data_dt.lcd_panel_info = (void *)vid; + + mipi_lcd_device_dt.platform_data = (void *)&dsim_platform_data_dt; +exynos_mipi_dsi_register_lcd_device (&mipi_lcd_device_dt); + + dsim_pd = &dsim_platform_data_dt; +} +#endif include/fdtdec.h +0
-0@@ -79,6 +79,7 @@ enum fdt_compat_id { COMPAT_SAMSUNG_EXYNOS5_USB3_PHY,/* Exynos phy controller forusb3.0 */
COMPAT_SAMSUNG_EXYNOS_TMU, /* Exynos TMU */
COMPAT_SAMSUNG_EXYNOS_FIMD, /* Exynos Display controller */
+COMPAT_SAMSUNG_EXYNOS_MIPI_DSI, /* Exynos mipi dsi */
COMPAT_SAMSUNG_EXYNOS5_DP, /* Exynos Display port controller
*/
COMPAT_SAMSUNG_EXYNOS5_DWMMC, /* Exynos5 DWMMC controller */
COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */lib/fdtdec.c +1
-1@@ -52,6 +52,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS5_USB3_PHY ,"samsung,exynos5250-usb3-phy" ),COMPAT (SAMSUNG_EXYNOS_TMU ,"samsung,exynos-tmu" ),COMPAT (SAMSUNG_EXYNOS_FIMD ,"samsung,exynos-fimd" ), +COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"), --1.8.3.2
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v4 2/12 video:mipidsim:fdt: Add DT support for mipi dsim driver
Hi Ajay,
Quoted 6 lines · Ajay kumar
Piotr,
You need to add the documentation for the bindings you create. Please add a exynos_mipi_dsi.txt file under the directory:
doc/device-tree-bindings/video/
Yes, I completely overlook that, thanks.
Best regards,
Piotr Wilczek
Quoted 222 lines
Regards,
Ajay KumarQuoted 203 lines · Piotr Wilczek
This patch enables parsing mipi data from device tree. Non device tree case is still supported.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v4:
- use "-" hypen for DT bindingsChanges for v3:
- noneChanges for v2:
- removed panel specific init function 's6e8ax0_init' to the board filearch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 ++ drivers/video/exynos_mipi_dsi.c | 96 ++++++++++++++++++++++++++++ include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 4 files changed, 103 insertions(+)arch/arm/include/asm/arch-exynos/mipi_dsim.h +1
-0@@ -12,6 +12,7 @@#include <linux/list.h> #include <linux/fb.h> +#include <lcd.h> #define PANEL_NAME_SIZE (32)@@ -368,8 +369,12 @@ int exynos_mipi_dsi_register_lcd_device(struct
mipi_dsim_lcd_device*lcd_dev);void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd);arch/arm/include/asm/arch-exynos/mipi_dsim.h +4
-0+void exynos_init_dsim_platform_data (vidinfo_t *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void ); +#ifdef CONFIG_OF_CONTROL +extern int mipi_power (void ); +#endif #endif /* _DSIM_H */ drivers/video/exynos_mipi_dsi.c +16
-0@@ -9,6 +9,8 @@#include <common.h> #include <malloc.h> +#include <fdtdec.h> +#include <libfdt.h> #include <linux/err.h> #include <asm/arch/dsim.h> #include <asm/arch/mipi_dsim.h> @@ -22,7 +24,14 @@#define master_to_driver (a) (a->dsim_lcd_drv)#define master_to_device (a) (a->dsim_lcd_dev) +DECLARE_GLOBAL_DATA_PTR ; +static struct exynos_platform_mipi_dsim *dsim_pd; +#ifdef CONFIG_OF_CONTROL +static struct mipi_dsim_config dsim_config_dt; +static struct exynos_platform_mipi_dsim dsim_platform_data_dt; +static struct mipi_dsim_lcd_device mipi_lcd_device_dt; +#endif struct mipi_dsim_ddi {int bus_id;@@ -238,3 +247,90 @@ void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd) dsim_pd = pd; } + +#ifdef CONFIG_OF_CONTROL +int exynos_dsim_config_parse_dt (const void *blob) +{ +int node; + + node = fdtdec_next_compatible(blob, 0,
COMPAT_SAMSUNG_EXYNOS_MIPI_DSI);drivers/video/exynos_mipi_dsi.c +2
-0+if (node <=0 ) { + printf("exynos_mipi_dsi: Can't get device node for mipidsi\n");
drivers/video/exynos_mipi_dsi.c +67
-0+return -ENODEV ; + } + + dsim_config_dt.e_interface =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-interface" ,0 ); + + dsim_config_dt.e_virtual_ch =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-virtual-ch" ,0 ); + + dsim_config_dt.e_pixel_format =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-pixel-format" ,0 ); + + dsim_config_dt.e_burst_mode =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-burst-mode" ,0 ); + + dsim_config_dt.e_no_data_lane =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-no-data-lane" ,0 ); + + dsim_config_dt.e_byte_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-e-byte-clk" ,0 ); + + dsim_config_dt.hfp =fdtdec_get_int (blob, node, +"samsung,dsim-config-hfp" ,0 ); + + dsim_config_dt.p =fdtdec_get_int (blob, node, +"samsung,dsim-config-p" ,0 ); + dsim_config_dt.m =fdtdec_get_int (blob, node, +"samsung,dsim-config-m" ,0 ); + dsim_config_dt.s =fdtdec_get_int (blob, node, +"samsung,dsim-config-s" ,0 ); + + dsim_config_dt.pll_stable_time =fdtdec_get_int (blob, node, +"samsung,dsim-config-pll-stable-time" ,0 ); + + dsim_config_dt.esc_clk =fdtdec_get_int (blob, node, +"samsung,dsim-config-esc-clk" ,0 ); + + dsim_config_dt.stop_holding_cnt =fdtdec_get_int (blob, node, +"samsung,dsim-config-stop-holding-cnt" ,0 ); + + dsim_config_dt.bta_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-bta-timeout" ,0 ); + + dsim_config_dt.rx_timeout =fdtdec_get_int (blob, node, +"samsung,dsim-config-rx-timeout" ,0 ); + + mipi_lcd_device_dt.name =fdtdec_get_config_string (blob, +"samsung,dsim-device-name" ); + + mipi_lcd_device_dt.id =fdtdec_get_int (blob, node, +"samsung,dsim-device-id" ,0 ); + + mipi_lcd_device_dt.bus_id =fdtdec_get_int (blob, node, +"samsung,dsim-device-bus_id" ,0 ); + + mipi_lcd_device_dt.reverse_panel =fdtdec_get_int (blob, node, +"samsung,dsim-device-reverse-panel" ,0 ); + +return 0 ; +} + +void exynos_init_dsim_platform_data (vidinfo_t *vid) +{ +if (exynos_dsim_config_parse_dt (gd->fdt_blob)) +debug ("Can't get proper dsim config.\n" ); + + strcpy(dsim_platform_data_dt.lcd_panel_name,mipi_lcd_device_dt.name);
drivers/video/exynos_mipi_dsi.c +11
-0+ dsim_platform_data_dt.dsim_config = &dsim_config_dt; + dsim_platform_data_dt.mipi_power = mipi_power; + dsim_platform_data_dt.phy_enable = set_mipi_phy_ctrl; + dsim_platform_data_dt.lcd_panel_info = (void *)vid; + + mipi_lcd_device_dt.platform_data = (void *)&dsim_platform_data_dt; +exynos_mipi_dsi_register_lcd_device (&mipi_lcd_device_dt); + + dsim_pd = &dsim_platform_data_dt; +} +#endif include/fdtdec.h +0
-0@@ -79,6 +79,7 @@ enum fdt_compat_id { COMPAT_SAMSUNG_EXYNOS5_USB3_PHY,/* Exynos phy controller forusb3.0 */
COMPAT_SAMSUNG_EXYNOS_TMU, /* Exynos TMU */
COMPAT_SAMSUNG_EXYNOS_FIMD, /* Exynos Display controller */
+COMPAT_SAMSUNG_EXYNOS_MIPI_DSI, /* Exynos mipi dsi */
COMPAT_SAMSUNG_EXYNOS5_DP, /* Exynos Display port controller
*/
COMPAT_SAMSUNG_EXYNOS5_DWMMC, /* Exynos5 DWMMC controller */
COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */lib/fdtdec.c +1
-1@@ -52,6 +52,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS5_USB3_PHY ,"samsung,exynos5250-usb3-phy" ),COMPAT (SAMSUNG_EXYNOS_TMU ,"samsung,exynos-tmu" ),COMPAT (SAMSUNG_EXYNOS_FIMD ,"samsung,exynos-fimd" ), +COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"), --1.8.3.2
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v4 3/12 video:exynos_fb:fdt: add additional fdt data
In reply to Piotr WilczekThis patch adds additional data parsing from DTB and adds the new exynos_lcd_panel_init() function for panel specific initialisation from the board file.
---
Changes for v4:
- remove duplicated DT properties at exynos_fb.c file
Changes for v3:
- none
Changes for v2:
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak) exynos_lcd_panel_init function for panel specific initialisation from board file
drivers/video/exynos_fb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/video/exynos_fb.c +15 -0
@@ -104,6 +104,13 @@ void __exynos_backlight_reset(void)void exynos_backlight_reset (void ) __attribute__((weak,alias ("__exynos_backlight_reset" ))); +int __exynos_lcd_panel_init (vidinfo_t *vid) +{ +return 0 ; +} +int exynos_lcd_panel_init (vidinfo_t *vid) + __attribute__((weak,alias ("__exynos_lcd_panel_init" ))); +static void lcd_panel_on (vidinfo_t *vid) {udelay (vid->init_delay);
@@ -269,6 +276,9 @@ int exynos_fimd_parse_dt(const void *blob) panel_info.dual_lcd_enabled =fdtdec_get_int (blob, node,"samsung,dual-lcd-enabled" ,0 ); + panel_info.resolution =fdtdec_get_int (blob, node, +"samsung,resolution" ,0 ); + return 0; }#endif
@@ -281,10 +291,15 @@ void lcd_ctrl_init(void *lcdbase)#ifdef CONFIG_OF_CONTROL if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info); +#endif +exynos_lcd_panel_init (&panel_info);#else /* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);#endif + panel_width = panel_info.vl_width; panel_height = panel_info.vl_height;
Signature · 1 line
1.8.3.2
PATCH v4 3/12 video:exynos_fb:fdt: add additional fdt data
Piotr,
Sorry for late reply.
Can you change the name of exynos_lcd_panel_init
to exynos_lcd_misc_init. panel_init definitely gives a wrong meaning.
And, can you let me know where you are actually using "panel_info.resolution"? Is it needed for FIMD or is it needed by MIPI-DSI? If it is MIPI specific, then it should come as a DT entry from MIPI-DSI node.
Also, if you add a new DT entry, please update the following file:doc/device-tree-bindings/video/exynos-fb.txt
Regards,
Ajay Kumar
Quoted 75 lines · Piotr Wilczek
This patch adds additional data parsing from DTB and adds the new
exynos_lcd_panel_init()function for panel specific initialisation from the board file.Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v4:
- remove duplicated DT properties atexynos_fb.cfileChanges for v3:
- noneChanges for v2:
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak)exynos_lcd_panel_initfunction for panel specific initialisation from board filedrivers/video/exynos_fb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/video/exynos_fb.c +10
-0@@ -104,6 +104,13 @@ void __exynos_backlight_reset(void)void exynos_backlight_reset (void ) __attribute__((weak,alias ("__exynos_backlight_reset" ))); +int __exynos_lcd_panel_init (vidinfo_t *vid) +{ +return 0 ; +} +int exynos_lcd_panel_init (vidinfo_t *vid) + __attribute__((weak,alias ("__exynos_lcd_panel_init" ))); +static void lcd_panel_on (vidinfo_t *vid) {udelay (vid->init_delay);@@ -269,6 +276,9 @@ int exynos_fimd_parse_dt(const void *blob) panel_info.dual_lcd_enabled =fdtdec_get_int (blob, node,"samsung,dual-lcd-enabled" ,0 ); + panel_info.resolution =fdtdec_get_int (blob, node, +"samsung,resolution" ,0 ); +return 0 ; }#endif
drivers/video/exynos_fb.c +5
-1@@ -281,10 +291,15 @@ void lcd_ctrl_init(void *lcdbase)#ifdef CONFIG_OF_CONTROL if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info); +#endif +exynos_lcd_panel_init (&panel_info);#else /* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);#endif + panel_width = panel_info.vl_width; panel_height = panel_info.vl_height; --1.8.3.2
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v4 3/12 video:exynos_fb:fdt: add additional fdt data
Hi Ajay,
Quoted 6 lines · Ajay kumar
Piotr,
Sorry for late reply.
Can you change the name ofexynos_lcd_panel_init
toexynos_lcd_misc_init.panel_initdefinitely gives a wrong meaning.
Yes, I can.
Quoted 5 lines
And, can you let me know where you are actually using "panel_info.resolution"? Is it needed for FIMD or is it needed by MIPI-DSI? If it is MIPI specific, then it should come as a DT entry from MIPI-DSI node.
Well, it looks like it is not used any more. I will remove it completely.
Quoted 3 lines
Also, if you add a new DT entry, please update the following file:
doc/device-tree-bindings/video/exynos-fb.txt
Ok.
Quoted 4 lines
Regards,
Ajay Kumar
Best regards,
Piotr Wilczek
Quoted 86 lines · Piotr Wilczek
Quoted 71 lines
This patch adds additional data parsing from DTB and adds the new
exynos_lcd_panel_init()function for panel specific initialisation from the board file.Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Minkyu Kang <[email protected]>---
Changes for v4:
- remove duplicated DT properties atexynos_fb.cfileChanges for v3:
- noneChanges for v2:
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak)exynos_lcd_panel_initfunction for panel specific initialisation from board filedrivers/video/exynos_fb.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/video/exynos_fb.c +10
-0@@ -104,6 +104,13 @@ void __exynos_backlight_reset(void)void exynos_backlight_reset (void ) __attribute__((weak,alias ("__exynos_backlight_reset" ))); +int __exynos_lcd_panel_init (vidinfo_t *vid) +{ +return 0 ; +} +int exynos_lcd_panel_init (vidinfo_t *vid) + __attribute__((weak,alias ("__exynos_lcd_panel_init" ))); +static void lcd_panel_on (vidinfo_t *vid) {udelay (vid->init_delay);@@ -269,6 +276,9 @@ int exynos_fimd_parse_dt(const void *blob) panel_info.dual_lcd_enabled =fdtdec_get_int (blob, node,"samsung,dual-lcd-enabled" ,0 ); + panel_info.resolution =fdtdec_get_int (blob, node, +"samsung,resolution" ,0 ); +return 0 ; }#endifdrivers/video/exynos_fb.c +5
-1@@ -281,10 +291,15 @@ void lcd_ctrl_init(void *lcdbase)#ifdef CONFIG_OF_CONTROL if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info); +#endif +exynos_lcd_panel_init (&panel_info);#else /* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);#endif + panel_width = panel_info.vl_width; panel_height = panel_info.vl_height; --1.8.3.2
Quoted 5 lines
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v4 4/12 drivers:mmc:sdhci: enable support for DT
In reply to Piotr WilczekThis patch enables support for device tree for sdhci driver. Non DT case is still supported.
---
Changes for v4:
- none
Changes for v3:
- none
Changes for v2:
- fixed checking for SDMMC boundary
- fiex debug message
- fixed comment to 'pwr_gpio' struct filed
arch/arm/include/asm/arch-exynos/mmc.h | 7 ++ drivers/mmc/s5p_sdhci.c | 129 +++++++++++++++++++++++++++++++++ include/fdtdec.h | 1 + include/sdhci.h | 5 ++ lib/fdtdec.c | 1 + 5 files changed, 143 insertions(+)
arch/arm/include/asm/arch-exynos/mmc.h +7 -0
@@ -53,6 +53,8 @@#define SDHCI_CTRL4_DRIVE_MASK (_x) ((_x) << 16)#define SDHCI_CTRL4_DRIVE_SHIFT (16) +#define SDHCI_MAX_HOSTS 4 +int s5p_sdhci_init (u32 regbase,int index,int bus_width);static inline int s5p_mmc_init (int index,int bus_width)
@@ -62,4 +64,9 @@ static inline int s5p_mmc_init(int index, int bus_width) return s5p_sdhci_init(base, index, bus_width); } + +#ifdef CONFIG_OF_CONTROL +int exynos_mmc_init (const void *blob); +#endif +#endif
drivers/mmc/s5p_sdhci.c +129 -0
140 lines not on this page · raw message
include/fdtdec.h +1 -0
@@ -82,6 +82,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ +COMPAT_SAMSUNG_EXYNOS_MMC ,/* Exynos MMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL ,/* Exynos UART */ COMPAT_MAXIM_MAX77686_PMIC ,/* MAX77686 PMIC */ COMPAT_GENERIC_SPI_FLASH, /* Generic SPI Flash chip */
include/sdhci.h +5 -0
@@ -12,6 +12,7 @@#include <asm/io.h> #include <mmc.h> +#include <fdtdec.h> /* * Controller registers
@@ -244,6 +245,10 @@ struct sdhci_host {const struct sdhci_ops *ops;int index; +int bus_width; +struct fdt_gpio_state pwr_gpio;/* Power GPIO */ +struct fdt_gpio_state cd_gpio;/* Card Detect GPIO */ +void (*set_control_reg)(struct sdhci_host *host);void (*set_clock)(int dev_index,unsigned int div);uint voltages;
lib/fdtdec.c +1 -0
@@ -55,6 +55,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), +COMPAT (SAMSUNG_EXYNOS_MMC ,"samsung,exynos-mmc" ),COMPAT (SAMSUNG_EXYNOS_SERIAL ,"samsung,exynos4210-uart" ),COMPAT (MAXIM_MAX77686_PMIC ,"maxim,max77686_pmic" ), COMPAT(GENERIC_SPI_FLASH, "spi-flash"),
Signature · 1 line
1.8.3.2
PATCH v4 5/12 board:samsung: move checkboard to common file
In reply to Piotr WilczekThe checkboard function's implementation is common for all DT supporting boards and should be placed in the board common file.
---
Changes for v4:
- none
Changes for v3:
- none
Changes for v2:
- new patch
board/samsung/common/board.c | 12 ++++++++++++ board/samsung/smdk5250/exynos5-dt.c | 15 --------------- board/samsung/smdk5420/smdk5420.c | 15 --------------- 3 files changed, 12 insertions(+), 30 deletions(-)
board/samsung/common/board.c +12 -0
@@ -377,7 +377,19 @@ int board_mmc_init(bd_t *bis)return ret; }#endif + +#ifdef CONFIG_DISPLAY_BOARDINFO +int checkboard (void ) +{ +const char *board_name; + + board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); +printf ("Board: %s\n" , board_name ? board_name :"unknown" ); + +return 0 ; +}#endif +#endif /* CONFIG_OF_CONTROL */ #ifdef CONFIG_BOARD_LATE_INIT int board_late_init (void )
board/samsung/smdk5250/exynos5-dt.c +0 -15
@@ -45,21 +45,6 @@ int exynos_init(void)return 0 ; } -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) -{ -const char *board_name; - - board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); -if (board_name ==NULL ) -printf ("\nUnknown Board\n" ); -else -printf ("\nBoard: %s\n" , board_name); - -return 0 ; -} -#endif -#ifdef CONFIG_LCD void exynos_cfg_lcd_gpio (void ) {
board/samsung/smdk5420/smdk5420.c +0 -15
@@ -142,18 +142,3 @@ int board_get_revision(void) {return 0 ; } - -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) -{ -const char *board_name; - - board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); -if (board_name ==NULL ) -printf ("\nUnknown Board\n" ); -else -printf ("\nBoard: %s\n" , board_name); - -return 0 ; -} -#endif
Signature · 1 line
1.8.3.2
PATCH v4 6/12 arm:exynos: add common DTS file for exynos 4
In reply to Piotr WilczekThis patch adds common dtsi file and config header for all Exynos 4 based boards.
Patch additionaly adds board specific (weak) functions for board_early_init_f and board_power_init functions.
---
Changes for v4:
- none
Changes for v3:
- none
Changes for v2:
- reuse existing common board.c file
arch/arm/dts/exynos4.dtsi | 138 +++++++++++++++++++++++++++++++ arch/arm/include/asm/arch-exynos/board.h | 12 +++ board/samsung/common/board.c | 18 +++- include/configs/exynos4-dt.h | 138 +++++++++++++++++++++++++++++++ 4 files changed, 304 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 include/configs/exynos4-dt.h
arch/arm/dts/exynos4.dtsi new file +138 -0
@@ -0,0 +1,138 @@ +/* + * Samsung's Exynos4 SoC common device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/include/ "skeleton.dtsi" + +/ { + serial at 13800000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13800000 0x3c>; + id = <0>; + }; + + serial at 13810000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13810000 0x3c>; + id = <1>; + }; + + serial at 13820000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13820000 0x3c>; + id = <2>; + }; + + serial at 13830000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13830000 0x3c>; + id = <3>; + }; + + serial at 13840000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13840000 0x3c>; + id = <4>; + }; + + i2c at 13860000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <0 0 0>; + }; + + i2c at 13870000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <1 1 0>; + }; + + i2c at 13880000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <2 2 0>; + }; + + i2c at 13890000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <3 3 0>; + }; + + i2c at 138a0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <4 4 0>; + }; + + i2c at 138b0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <5 5 0>; + }; + + i2c at 138c0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <6 6 0>; + }; + + i2c at 138d0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <7 7 0>; + }; + + sdhci at 12510000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12510000 0x1000>; + interrupts = <0 75 0>; + }; + + sdhci at 12520000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12520000 0x1000>; + interrupts = <0 76 0>; + }; + + sdhci at 12530000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12530000 0x1000>; + interrupts = <0 77 0>; + }; + + sdhci at 12540000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12540000 0x1000>; + interrupts = <0 78 0>; + }; + + gpio: gpio { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; +};
arch/arm/include/asm/arch-exynos/board.h +12 -0
@@ -14,4 +14,16 @@*/ int exynos_init (void ); +/* +* Exynos board specific changes for +* board_early_init_f +*/ +int exynos_early_init_f (void ); + +/* +* Exynos board specific changes for +* board_power_init +*/ +int exynos_power_init (void ); +#endif /* EXYNOS_BOARD_H */
board/samsung/common/board.c +16 -2
@@ -33,6 +33,20 @@ struct local_info {static struct local_info local; +int __exynos_early_init_f (void ) +{ +return 0 ; +} +int exynos_early_init_f (void ) + __attribute__((weak,alias ("__exynos_early_init_f" ))); + +int __exynos_power_init (void ) +{ +return 0 ; +} +int exynos_power_init (void ) + __attribute__((weak,alias ("__exynos_power_init" ))); +#if definedCONFIG_EXYNOS_TMU /* Boot Time Thermal Analysis for SoC temperature threshold breach */ static void boot_temp_check (void )
@@ -140,7 +154,7 @@ int board_early_init_f(void)board_i2c_init (gd->fdt_blob);#endif - return err; + return exynos_early_init_f(); }#endif
@@ -284,7 +298,7 @@ int power_init_board(void) ret =max77686_init ();#endif - return ret; + return exynos_power_init(); }#endif
include/configs/exynos4-dt.h new file +138 -0
138 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v4 7/12 board:samsung:common: move max77686 init function
In reply to Piotr WilczekThis patch moves board specific max77686 init function from common board to smdk5250 board file.
---
Changes for v4:
- none
Changes for v3:
- max77686 init function is moved to smdk5250 board file
Changes for v2:
- new patch
board/samsung/common/board.c | 120 ------------------------------------ board/samsung/smdk5250/smdk5250.c | 125 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 120 deletions(-)
board/samsung/common/board.c +0 -120
@@ -22,7 +22,6 @@#include <asm/arch/power.h> #include <power/pmic.h> #include <asm/arch/sromc.h> -#include <power/max77686_pmic.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -175,129 +174,10 @@ static int board_init_cros_ec_devices(const void *blob)#endif #if defined(CONFIG_POWER ) -#ifdef CONFIG_POWER_MAX77686 -static int pmic_reg_update (struct pmic *p,int reg,uint regval) -{ -u32 val; -int ret =0 ; - - ret =pmic_reg_read (p, reg, &val); -if (ret) { -debug ("%s: PMIC %d register read failed\n" , __func__, reg); -return -1 ; - } - val |= regval; - ret =pmic_reg_write (p, reg, val); -if (ret) { -debug ("%s: PMIC %d register write failed\n" , __func__, reg); -return -1 ; - } -return 0 ; -} - -static int max77686_init (void ) -{ -struct pmic *p; - -if (pmic_init (I2C_PMIC )) -return -1 ; - - p =pmic_get ("MAX77686_PMIC" ); -if (!p) -return -ENODEV ; - -if (pmic_probe (p)) -return -1 ; - -if (pmic_reg_update (p,MAX77686_REG_PMIC_32KHZ ,MAX77686_32KHCP_EN )) -return -1 ; - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BBAT , -MAX77686_BBCHOSTEN |MAX77686_BBCVS_3_5V )) -return -1 ; - -/* VDD_MIF */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK1OUT , -MAX77686_BUCK1OUT_1V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK1OUT ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK1CRTL , -MAX77686_BUCK1CTRL_EN )) -return -1 ; - -/* VDD_ARM */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK2DVS1 , -MAX77686_BUCK2DVS1_1_3V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK2DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK2CTRL1 , -MAX77686_BUCK2CTRL_ON )) -return -1 ; - -/* VDD_INT */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK3DVS1 , -MAX77686_BUCK3DVS1_1_0125V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK3DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK3CTRL , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_G3D */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK4DVS1 , -MAX77686_BUCK4DVS1_1_2V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK4DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK4CTRL1 , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_LDO2 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO2CTRL1 , -MAX77686_LD02CTRL1_1_5V |EN_LDO )) -return -1 ; - -/* VDD_LDO3 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO3CTRL1 , -MAX77686_LD03CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO5 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO5CTRL1 , -MAX77686_LD05CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO10 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO10CTRL1 , -MAX77686_LD10CTRL1_1_8V |EN_LDO )) -return -1 ; - -return 0 ; -} -#endif -int power_init_board (void ) { -int ret =0 ; -set_ps_hold_ctrl (); -#ifdef CONFIG_POWER_MAX77686 - ret =max77686_init (); -#endif -return exynos_power_init (); }#endif
board/samsung/smdk5250/smdk5250.c +125 -0
131 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v4 8/12 arm:exynos: enable sdhci and misc_init to common board
In reply to Piotr WilczekThis patch enables sdhci initialisation and misc_init_r in common board file for all exynos 4 based boards.
---
Changes for v4:
- none
Changes for v3:
- none
Changes for v2:
- new patch
board/samsung/common/board.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
board/samsung/common/board.c +30 -0
@@ -22,6 +22,8 @@#include <asm/arch/power.h> #include <power/pmic.h> #include <asm/arch/sromc.h> +#include <lcd.h> +#include <samsung/misc.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -183,6 +185,7 @@ int power_init_board(void)#endif #ifdef CONFIG_OF_CONTROL +#ifdef CONFIG_SMC911X static int decode_sromc(const void *blob, struct fdt_sromc *config) { int err;
@@ -206,6 +209,7 @@ static int decode_sromc(const void *blob, struct fdt_sromc *config) }return 0 ; } +#endif int board_eth_init (bd_t *bis) {
@@ -263,10 +267,18 @@ int board_mmc_init(bd_t *bis) {int ret; +#ifdef CONFIG_SDHCI +/* mmc initializattion for available channels */ + ret =exynos_mmc_init (gd->fdt_blob); +if (ret) +debug ("mmc init failed\n" ); +#endif +#ifdef CONFIG_DWMMC /* dwmmc initializattion for available channels */ ret =exynos_dwmmc_init (gd->fdt_blob);if (ret)debug ("dwmmc init failed\n" ); +#endif return ret; }
@@ -315,3 +327,21 @@ int arch_early_init_r(void)return 0 ; } + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r (void ) +{ +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +set_board_info (); +#endif +#ifdef CONFIG_LCD_MENU +keys_init (); +check_boot_mode (); +#endif +#ifdef CONFIG_CMD_BMP +if (panel_info.logo_on) +draw_logo (); +#endif +return 0 ; +} +#endif
Signature · 1 line
1.8.3.2
PATCH v4 9/12 board:origen: Enable device tree on Origen
In reply to Piotr WilczekThis patch enables to run Origen board on device tree.
Uart, DRAM and MMC init functions are removed as their generic replacements form the common board file are used.
The config file is modified to contain only board specific options.
---
Changes for v4:
- define CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, CONFIG_CMD_I2C at each board
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- no changes
arch/arm/dts/Makefile | 2 + arch/arm/dts/exynos4210-origen.dts | 45 +++++++++++++++ board/samsung/origen/origen.c | 112 +++---------------------------------- include/configs/origen.h | 110 ++++++++++-------------------------- 4 files changed, 87 insertions(+), 182 deletions(-) create mode 100644 arch/arm/dts/exynos4210-origen.dts
arch/arm/dts/Makefile +2 -0
@@ -1,3 +1,5 @@ +dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb + dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \ exynos5250-smdk5250.dtb \
arch/arm/dts/exynos4210-origen.dts new file +45 -0
46 lines not on this page · raw message
board/samsung/origen/origen.c +9 -103
138 lines not on this page · raw message
include/configs/origen.h +31 -79
166 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v4 10/12 board:universal: Enable device tree on Universal
In reply to Piotr WilczekThis patch enables to run Universal board on device tree.
---
Changes for v4:
- define CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, CONFIG_CMD_I2C at each board
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- no changes
arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos4210-universal_c210.dts | 83 ++++++++++++ board/samsung/universal_c210/universal.c | 204 ++++++++--------------------- include/configs/s5pc210_universal.h | 152 +++++++-------------- 4 files changed, 185 insertions(+), 257 deletions(-) create mode 100644 arch/arm/dts/exynos4210-universal_c210.dts
arch/arm/dts/Makefile +2 -1
@@ -1,4 +1,5 @@ -dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb +dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ + exynos4210-universal_c210.dtb dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \
arch/arm/dts/exynos4210-universal_c210.dts new file +83 -0
83 lines not on this page · raw message
board/samsung/universal_c210/universal.c +53 -151
271 lines not on this page · raw message
include/configs/s5pc210_universal.h +47 -105
210 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v4 11/12 board:trats: Enable device tree on Trats
In reply to Piotr WilczekThis patch enables to run Trats board on device tree.
---
Changes for v4:
- use "-" hypen in DT bindings
- define CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, CONFIG_CMD_I2C at each board
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- no changes
arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos4210-trats.dts | 120 +++++++++++++++++++++ board/samsung/trats/trats.c | 213 ++------------------------------------ include/configs/trats.h | 206 ++++++++++-------------------------- 4 files changed, 185 insertions(+), 357 deletions(-) create mode 100644 arch/arm/dts/exynos4210-trats.dts
arch/arm/dts/Makefile +2 -1
@@ -1,5 +1,6 @@ dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ - exynos4210-universal_c210.dtb + exynos4210-universal_c210.dtb \ + exynos4210-trats.dtb dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \
arch/arm/dts/exynos4210-trats.dts new file +120 -0
121 lines not on this page · raw message
board/samsung/trats/trats.c +10 -203
299 lines not on this page · raw message
include/configs/trats.h +53 -153
276 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v4 12/12 board:trats2: Enable device tree on Trats2
In reply to Piotr WilczekThis patch enables to run Trats2 board on device tree.
---
Changes for v4:
- use "-" hypen in DT bindings
- define CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, CONFIG_CMD_I2C at each board
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- fixed mmc2 address in DT
arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++++++++++++++++++ board/samsung/trats2/trats2.c | 233 +------------------- include/configs/trats2.h | 204 ++++------------- 4 files changed, 483 insertions(+), 391 deletions(-) create mode 100644 arch/arm/dts/exynos4412-trats2.dts
arch/arm/dts/Makefile +2 -1
@@ -1,6 +1,7 @@ dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ exynos4210-universal_c210.dtb \ - exynos4210-trats.dtb + exynos4210-trats.dtb \ + exynos4412-trats2.dtb dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \
arch/arm/dts/exynos4412-trats2.dts new file +434 -0
434 lines not on this page · raw message
board/samsung/trats2/trats2.c +10 -223
294 lines not on this page · raw message
include/configs/trats2.h +37 -167
255 lines not on this page · raw message
Signature · 1 line
1.8.3.2
v5 cover Exynos4: add support for device tree
In reply to Piotr WilczekThis patch set enables support for device tree on all Exynos4 based boards.
DT support is enabled on Exynos mipi dsim and sdhci drives. Common board.c file is reused for all functions common for Exynos4 boards. Board specific files are implemented in the board files. Origen, Universal, Trats and Trats2 boards are modifed to support device tree.
This patch series depends on:
[U-Boot] sizes.h - consolidate for all architectures
http://patchwork.ozlabs.org/patch/324427/
Changes for v5:
- add exynos_mipi_dsi.txt file with documented bindings
- changed the name of exynos_lcd_panel_init to exynos_lcd_misc_init
- removed unused panel_info.resolution binding
Changes for v4:
- define CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, CONFIG_CMD_I2C at each board
- use "-" hypen in DT bindings
- remove duplicated DT properties at exynos_fb.c file
Changes for v3:
- moved max77686 init function to smdk5250 board file
- board DTS files moved to arch/arm/dts
- rebased on the latest tree
Changes for v2:
- removed incorrectly implemented check for invalid peripheral id
- removed unnecesary white space
- removed panel specific init function 's6e8ax0_init' to the board file
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak) exynos_lcd_panel_init function for panel specific initialisation from board file
- fixed checking for SDMMC boundary
- fiex debug message
- fixed comment to 'pwr_gpio' struct filed
- new patch to move checkboard to common file
- reuse existing common board.c file
- new patch that removes unused max77686_init function
- fixed mmc2 addres in DT on Trats2
Piotr Wilczek (12):
exynos4:pinmux:fdt: decode peripheral id video:mipidsim:fdt: Add DT support for mipi dsim driver video:exynos_fb:fdt: add additional fdt data drivers:mmc:sdhci: enable support for DT board:samsung: move checkboard to common file arm:exynos: add common DTS file for exynos 4 board:samsung:common: move max77686 init function arm:exynos: enable sdhci and misc_init to common board board:origen: Enable device tree on Origen board:universal: Enable device tree on Universal board:trats: Enable device tree on Trats board:trats2: Enable device tree on Trats2
arch/arm/cpu/armv7/exynos/pinmux.c | 17 + arch/arm/dts/Makefile | 5 + arch/arm/dts/exynos4.dtsi | 138 +++++++ arch/arm/dts/exynos4210-origen.dts | 45 +++ arch/arm/dts/exynos4210-trats.dts | 120 ++++++ arch/arm/dts/exynos4210-universal_c210.dts | 83 ++++ arch/arm/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++ arch/arm/include/asm/arch-exynos/board.h | 12 + arch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 + arch/arm/include/asm/arch-exynos/mmc.h | 7 + board/samsung/common/board.c | 180 +++------ board/samsung/origen/origen.c | 112 +----- board/samsung/smdk5250/exynos5-dt.c | 15 - board/samsung/smdk5250/smdk5250.c | 125 ++++++ board/samsung/smdk5420/smdk5420.c | 15 - board/samsung/trats/trats.c | 213 +--------- board/samsung/trats2/trats2.c | 233 +---------- board/samsung/universal_c210/universal.c | 204 +++------- doc/device-tree-bindings/video/exynos_mipi_dsi.txt | 82 ++++ drivers/mmc/s5p_sdhci.c | 129 ++++++ drivers/video/exynos_fb.c | 12 + drivers/video/exynos_mipi_dsi.c | 96 +++++ include/configs/exynos4-dt.h | 138 +++++++ include/configs/origen.h | 110 ++---- include/configs/s5pc210_universal.h | 152 +++----- include/configs/trats.h | 206 +++------- include/configs/trats2.h | 204 ++-------- include/fdtdec.h | 2 + include/sdhci.h | 5 + lib/fdtdec.c | 2 + 30 files changed, 1765 insertions(+), 1336 deletions(-) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 arch/arm/dts/exynos4210-origen.dts create mode 100644 arch/arm/dts/exynos4210-trats.dts create mode 100644 arch/arm/dts/exynos4210-universal_c210.dts create mode 100644 arch/arm/dts/exynos4412-trats2.dts create mode 100644 doc/device-tree-bindings/video/exynos_mipi_dsi.txt create mode 100644 include/configs/exynos4-dt.h
Signature · 1 line
1.8.3.2
PATCH v5 1/12 exynos4:pinmux:fdt: decode peripheral id
This patch adds api to decode peripheral id based on interrupt number.
---
Changes for v5:
- none
Changes for v4:
- none
Changes for v3:
- none
Changes for v2:
- removed incorrectly implemented check for invalid peripheral id
- removed unnecesary white space
arch/arm/cpu/armv7/exynos/pinmux.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/cpu/armv7/exynos/pinmux.c +17 -0
@@ -741,6 +741,21 @@ int exynos_pinmux_config(int peripheral, int flags) }#ifdef CONFIG_OF_CONTROL +static int exynos4_pinmux_decode_periph_id (const void *blob,int node) +{ +int err; +u32 cell[3 ]; + + err =fdtdec_get_int_array (blob, node,"interrupts" , cell, +ARRAY_SIZE (cell)); +if (err) { +debug (" invalid peripheral id\n" ); +return PERIPH_ID_NONE ; + } + +return cell[1 ]; +} +static int exynos5_pinmux_decode_periph_id (const void *blob,int node) {int err;
@@ -758,6 +773,8 @@ int pinmux_decode_periph_id(const void *blob, int node) {if (cpu_is_exynos5 ())return exynos5_pinmux_decode_periph_id (blob, node); +else if (cpu_is_exynos4 ()) +return exynos4_pinmux_decode_periph_id (blob, node);else return PERIPH_ID_NONE ; }
Signature · 1 line
1.8.3.2
PATCH v5 2/12 video:mipidsim:fdt: Add DT support for mipi dsim driver
In reply to Piotr WilczekThis patch enables parsing mipi data from device tree. Non device tree case is still supported.
---
Changes for v5:
- add exynos_mipi_dsi.txt file with documented bindings
Changes for v4:
- use "-" hypen for DT bindings
Changes for v3:
- none
Changes for v2:
- removed panel specific init function 's6e8ax0_init' to the board file
arch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 ++ doc/device-tree-bindings/video/exynos_mipi_dsi.txt | 82 ++++++++++++++++++ drivers/video/exynos_mipi_dsi.c | 96 ++++++++++++++++++++++ include/fdtdec.h | 1 + lib/fdtdec.c | 1 + 5 files changed, 185 insertions(+) create mode 100644 doc/device-tree-bindings/video/exynos_mipi_dsi.txt
arch/arm/include/asm/arch-exynos/mipi_dsim.h +5 -0
@@ -12,6 +12,7 @@#include <linux/list.h> #include <linux/fb.h> +#include <lcd.h> #define PANEL_NAME_SIZE (32)
@@ -368,8 +369,12 @@ int exynos_mipi_dsi_register_lcd_device(struct mipi_dsim_lcd_device *lcd_dev);void exynos_set_dsim_platform_data (struct exynos_platform_mipi_dsim *pd); +void exynos_init_dsim_platform_data (vidinfo_t *vid);/* panel driver init based on mipi dsi interface */ void s6e8ax0_init (void ); +#ifdef CONFIG_OF_CONTROL +extern int mipi_power (void ); +#endif #endif /* _DSIM_H */
doc/device-tree-bindings/video/exynos_mipi_dsi.txt new file +82 -0
82 lines not on this page · raw message
drivers/video/exynos_mipi_dsi.c +96 -0
112 lines not on this page · raw message
include/fdtdec.h +1 -0
@@ -79,6 +79,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS5_USB3_PHY ,/* Exynos phy controller for usb3.0 */ COMPAT_SAMSUNG_EXYNOS_TMU ,/* Exynos TMU */ COMPAT_SAMSUNG_EXYNOS_FIMD ,/* Exynos Display controller */ +COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */
lib/fdtdec.c +1 -0
@@ -52,6 +52,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS5_USB3_PHY ,"samsung,exynos5250-usb3-phy" ),COMPAT (SAMSUNG_EXYNOS_TMU ,"samsung,exynos-tmu" ),COMPAT (SAMSUNG_EXYNOS_FIMD ,"samsung,exynos-fimd" ), +COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"),
Signature · 1 line
1.8.3.2
PATCH v5 3/12 video:exynos_fb:fdt: add additional fdt data
In reply to Piotr WilczekThis patch adds the new exynos_lcd_misc_init() function for optional lcd specific initialisation.
---
Changes for v5:
- changed the name of exynos_lcd_panel_init to exynos_lcd_misc_init
- removed unused panel_info.resolution binding
Changes for v4:
- remove duplicated DT properties at exynos_fb.c file
Changes for v3:
- none
Changes for v2:
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak) exynos_lcd_panel_init function for panel specific initialisation from board file
drivers/video/exynos_fb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/video/exynos_fb.c +12 -0
@@ -104,6 +104,13 @@ void __exynos_backlight_reset(void)void exynos_backlight_reset (void ) __attribute__((weak,alias ("__exynos_backlight_reset" ))); +int __exynos_lcd_misc_init (vidinfo_t *vid) +{ +return 0 ; +} +int exynos_lcd_misc_init (vidinfo_t *vid) + __attribute__((weak,alias ("__exynos_lcd_misc_init" ))); +static void lcd_panel_on (vidinfo_t *vid) {udelay (vid->init_delay);
@@ -281,10 +288,15 @@ void lcd_ctrl_init(void *lcdbase)#ifdef CONFIG_OF_CONTROL if (exynos_fimd_parse_dt (gd->fdt_blob))debug ("Can't get proper panel info\n" ); +#ifdef CONFIG_EXYNOS_MIPI_DSIM +exynos_init_dsim_platform_data (&panel_info); +#endif +exynos_lcd_misc_init (&panel_info);#else /* initialize parameters which is specific to panel. */ init_panel_info (&panel_info);#endif + panel_width = panel_info.vl_width; panel_height = panel_info.vl_height;
Signature · 1 line
1.8.3.2
PATCH v5 4/12 drivers:mmc:sdhci: enable support for DT
In reply to Piotr WilczekThis patch enables support for device tree for sdhci driver. Non DT case is still supported.
---
Changes for v5:
- none
Changes for v4:
- none
Changes for v3:
- none
Changes for v2:
- fixed checking for SDMMC boundary
- fiex debug message
- fixed comment to 'pwr_gpio' struct filed
arch/arm/include/asm/arch-exynos/mmc.h | 7 ++ drivers/mmc/s5p_sdhci.c | 129 +++++++++++++++++++++++++++++++++ include/fdtdec.h | 1 + include/sdhci.h | 5 ++ lib/fdtdec.c | 1 + 5 files changed, 143 insertions(+)
arch/arm/include/asm/arch-exynos/mmc.h +7 -0
@@ -53,6 +53,8 @@#define SDHCI_CTRL4_DRIVE_MASK (_x) ((_x) << 16)#define SDHCI_CTRL4_DRIVE_SHIFT (16) +#define SDHCI_MAX_HOSTS 4 +int s5p_sdhci_init (u32 regbase,int index,int bus_width);static inline int s5p_mmc_init (int index,int bus_width)
@@ -62,4 +64,9 @@ static inline int s5p_mmc_init(int index, int bus_width) return s5p_sdhci_init(base, index, bus_width); } + +#ifdef CONFIG_OF_CONTROL +int exynos_mmc_init (const void *blob); +#endif +#endif
drivers/mmc/s5p_sdhci.c +129 -0
140 lines not on this page · raw message
include/fdtdec.h +1 -0
@@ -82,6 +82,7 @@ enum fdt_compat_id {COMPAT_SAMSUNG_EXYNOS_MIPI_DSI ,/* Exynos mipi dsi */ COMPAT_SAMSUNG_EXYNOS5_DP ,/* Exynos Display port controller */ COMPAT_SAMSUNG_EXYNOS5_DWMMC ,/* Exynos5 DWMMC controller */ +COMPAT_SAMSUNG_EXYNOS_MMC ,/* Exynos MMC controller */ COMPAT_SAMSUNG_EXYNOS_SERIAL ,/* Exynos UART */ COMPAT_MAXIM_MAX77686_PMIC ,/* MAX77686 PMIC */ COMPAT_GENERIC_SPI_FLASH, /* Generic SPI Flash chip */
include/sdhci.h +5 -0
@@ -12,6 +12,7 @@#include <asm/io.h> #include <mmc.h> +#include <fdtdec.h> /* * Controller registers
@@ -244,6 +245,10 @@ struct sdhci_host {const struct sdhci_ops *ops;int index; +int bus_width; +struct fdt_gpio_state pwr_gpio;/* Power GPIO */ +struct fdt_gpio_state cd_gpio;/* Card Detect GPIO */ +void (*set_control_reg)(struct sdhci_host *host);void (*set_clock)(int dev_index,unsigned int div);uint voltages;
lib/fdtdec.c +1 -0
@@ -55,6 +55,7 @@ static const char * const compat_names[COMPAT_COUNT] = {COMPAT (SAMSUNG_EXYNOS_MIPI_DSI ,"samsung,exynos-mipi-dsi" ),COMPAT (SAMSUNG_EXYNOS5_DP ,"samsung,exynos5-dp" ),COMPAT (SAMSUNG_EXYNOS5_DWMMC ,"samsung,exynos5250-dwmmc" ), +COMPAT (SAMSUNG_EXYNOS_MMC ,"samsung,exynos-mmc" ),COMPAT (SAMSUNG_EXYNOS_SERIAL ,"samsung,exynos4210-uart" ),COMPAT (MAXIM_MAX77686_PMIC ,"maxim,max77686_pmic" ), COMPAT(GENERIC_SPI_FLASH, "spi-flash"),
Signature · 1 line
1.8.3.2
PATCH v5 5/12 board:samsung: move checkboard to common file
In reply to Piotr WilczekThe checkboard function's implementation is common for all DT supporting boards and should be placed in the board common file.
---
Changes for v5:
- none
Changes for v4:
- none
Changes for v3:
- none
Changes for v2:
- new patch
board/samsung/common/board.c | 12 ++++++++++++ board/samsung/smdk5250/exynos5-dt.c | 15 --------------- board/samsung/smdk5420/smdk5420.c | 15 --------------- 3 files changed, 12 insertions(+), 30 deletions(-)
board/samsung/common/board.c +12 -0
@@ -377,7 +377,19 @@ int board_mmc_init(bd_t *bis)return ret; }#endif + +#ifdef CONFIG_DISPLAY_BOARDINFO +int checkboard (void ) +{ +const char *board_name; + + board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); +printf ("Board: %s\n" , board_name ? board_name :"unknown" ); + +return 0 ; +}#endif +#endif /* CONFIG_OF_CONTROL */ #ifdef CONFIG_BOARD_LATE_INIT int board_late_init (void )
board/samsung/smdk5250/exynos5-dt.c +0 -15
@@ -45,21 +45,6 @@ int exynos_init(void)return 0 ; } -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) -{ -const char *board_name; - - board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); -if (board_name ==NULL ) -printf ("\nUnknown Board\n" ); -else -printf ("\nBoard: %s\n" , board_name); - -return 0 ; -} -#endif -#ifdef CONFIG_LCD void exynos_cfg_lcd_gpio (void ) {
board/samsung/smdk5420/smdk5420.c +0 -15
@@ -142,18 +142,3 @@ int board_get_revision(void) {return 0 ; } - -#ifdef CONFIG_DISPLAY_BOARDINFO -int checkboard (void ) -{ -const char *board_name; - - board_name =fdt_getprop (gd->fdt_blob,0 ,"model" ,NULL ); -if (board_name ==NULL ) -printf ("\nUnknown Board\n" ); -else -printf ("\nBoard: %s\n" , board_name); - -return 0 ; -} -#endif
Signature · 1 line
1.8.3.2
PATCH v5 6/12 arm:exynos: add common DTS file for exynos 4
In reply to Piotr WilczekThis patch adds common dtsi file and config header for all Exynos 4 based boards.
Patch additionaly adds board specific (weak) functions for board_early_init_f and board_power_init functions.
---
Changes for v5:
- none
Changes for v4:
- none
Changes for v3:
- none
Changes for v2:
- reuse existing common board.c file
arch/arm/dts/exynos4.dtsi | 138 +++++++++++++++++++++++++++++++ arch/arm/include/asm/arch-exynos/board.h | 12 +++ board/samsung/common/board.c | 18 +++- include/configs/exynos4-dt.h | 138 +++++++++++++++++++++++++++++++ 4 files changed, 304 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 include/configs/exynos4-dt.h
arch/arm/dts/exynos4.dtsi new file +138 -0
@@ -0,0 +1,138 @@ +/* + * Samsung's Exynos4 SoC common device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/include/ "skeleton.dtsi" + +/ { + serial at 13800000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13800000 0x3c>; + id = <0>; + }; + + serial at 13810000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13810000 0x3c>; + id = <1>; + }; + + serial at 13820000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13820000 0x3c>; + id = <2>; + }; + + serial at 13830000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13830000 0x3c>; + id = <3>; + }; + + serial at 13840000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x13840000 0x3c>; + id = <4>; + }; + + i2c at 13860000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <0 0 0>; + }; + + i2c at 13870000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <1 1 0>; + }; + + i2c at 13880000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <2 2 0>; + }; + + i2c at 13890000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <3 3 0>; + }; + + i2c at 138a0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <4 4 0>; + }; + + i2c at 138b0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <5 5 0>; + }; + + i2c at 138c0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <6 6 0>; + }; + + i2c at 138d0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,s3c2440-i2c"; + interrupts = <7 7 0>; + }; + + sdhci at 12510000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12510000 0x1000>; + interrupts = <0 75 0>; + }; + + sdhci at 12520000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12520000 0x1000>; + interrupts = <0 76 0>; + }; + + sdhci at 12530000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12530000 0x1000>; + interrupts = <0 77 0>; + }; + + sdhci at 12540000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "samsung,exynos-mmc"; + reg = <0x12540000 0x1000>; + interrupts = <0 78 0>; + }; + + gpio: gpio { + gpio-controller; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + }; +};
arch/arm/include/asm/arch-exynos/board.h +12 -0
@@ -14,4 +14,16 @@*/ int exynos_init (void ); +/* +* Exynos board specific changes for +* board_early_init_f +*/ +int exynos_early_init_f (void ); + +/* +* Exynos board specific changes for +* board_power_init +*/ +int exynos_power_init (void ); +#endif /* EXYNOS_BOARD_H */
board/samsung/common/board.c +16 -2
@@ -33,6 +33,20 @@ struct local_info {static struct local_info local; +int __exynos_early_init_f (void ) +{ +return 0 ; +} +int exynos_early_init_f (void ) + __attribute__((weak,alias ("__exynos_early_init_f" ))); + +int __exynos_power_init (void ) +{ +return 0 ; +} +int exynos_power_init (void ) + __attribute__((weak,alias ("__exynos_power_init" ))); +#if definedCONFIG_EXYNOS_TMU /* Boot Time Thermal Analysis for SoC temperature threshold breach */ static void boot_temp_check (void )
@@ -140,7 +154,7 @@ int board_early_init_f(void)board_i2c_init (gd->fdt_blob);#endif - return err; + return exynos_early_init_f(); }#endif
@@ -284,7 +298,7 @@ int power_init_board(void) ret =max77686_init ();#endif - return ret; + return exynos_power_init(); }#endif
include/configs/exynos4-dt.h new file +138 -0
138 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v5 7/12 board:samsung:common: move max77686 init function
In reply to Piotr WilczekThis patch moves board specific max77686 init function from common board to smdk5250 board file.
---
Changes for v5:
- none
Changes for v4:
- none
Changes for v3:
- max77686 init function is moved to smdk5250 board file
Changes for v2:
- new patch
board/samsung/common/board.c | 120 ------------------------------------ board/samsung/smdk5250/smdk5250.c | 125 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 120 deletions(-)
board/samsung/common/board.c +0 -120
@@ -22,7 +22,6 @@#include <asm/arch/power.h> #include <power/pmic.h> #include <asm/arch/sromc.h> -#include <power/max77686_pmic.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -175,129 +174,10 @@ static int board_init_cros_ec_devices(const void *blob)#endif #if defined(CONFIG_POWER ) -#ifdef CONFIG_POWER_MAX77686 -static int pmic_reg_update (struct pmic *p,int reg,uint regval) -{ -u32 val; -int ret =0 ; - - ret =pmic_reg_read (p, reg, &val); -if (ret) { -debug ("%s: PMIC %d register read failed\n" , __func__, reg); -return -1 ; - } - val |= regval; - ret =pmic_reg_write (p, reg, val); -if (ret) { -debug ("%s: PMIC %d register write failed\n" , __func__, reg); -return -1 ; - } -return 0 ; -} - -static int max77686_init (void ) -{ -struct pmic *p; - -if (pmic_init (I2C_PMIC )) -return -1 ; - - p =pmic_get ("MAX77686_PMIC" ); -if (!p) -return -ENODEV ; - -if (pmic_probe (p)) -return -1 ; - -if (pmic_reg_update (p,MAX77686_REG_PMIC_32KHZ ,MAX77686_32KHCP_EN )) -return -1 ; - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BBAT , -MAX77686_BBCHOSTEN |MAX77686_BBCVS_3_5V )) -return -1 ; - -/* VDD_MIF */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK1OUT , -MAX77686_BUCK1OUT_1V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK1OUT ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK1CRTL , -MAX77686_BUCK1CTRL_EN )) -return -1 ; - -/* VDD_ARM */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK2DVS1 , -MAX77686_BUCK2DVS1_1_3V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK2DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK2CTRL1 , -MAX77686_BUCK2CTRL_ON )) -return -1 ; - -/* VDD_INT */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK3DVS1 , -MAX77686_BUCK3DVS1_1_0125V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK3DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK3CTRL , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_G3D */ -if (pmic_reg_write (p,MAX77686_REG_PMIC_BUCK4DVS1 , -MAX77686_BUCK4DVS1_1_2V )) { -debug ("%s: PMIC %d register write failed\n" , __func__, -MAX77686_REG_PMIC_BUCK4DVS1 ); -return -1 ; - } - -if (pmic_reg_update (p,MAX77686_REG_PMIC_BUCK4CTRL1 , -MAX77686_BUCK3CTRL_ON )) -return -1 ; - -/* VDD_LDO2 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO2CTRL1 , -MAX77686_LD02CTRL1_1_5V |EN_LDO )) -return -1 ; - -/* VDD_LDO3 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO3CTRL1 , -MAX77686_LD03CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO5 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO5CTRL1 , -MAX77686_LD05CTRL1_1_8V |EN_LDO )) -return -1 ; - -/* VDD_LDO10 */ -if (pmic_reg_update (p,MAX77686_REG_PMIC_LDO10CTRL1 , -MAX77686_LD10CTRL1_1_8V |EN_LDO )) -return -1 ; - -return 0 ; -} -#endif -int power_init_board (void ) { -int ret =0 ; -set_ps_hold_ctrl (); -#ifdef CONFIG_POWER_MAX77686 - ret =max77686_init (); -#endif -return exynos_power_init (); }#endif
board/samsung/smdk5250/smdk5250.c +125 -0
131 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v5 8/12 arm:exynos: enable sdhci and misc_init to common board
In reply to Piotr WilczekThis patch enables sdhci initialisation and misc_init_r in common board file for all exynos 4 based boards.
---
Changes for v5:
- none
Changes for v4:
- none
Changes for v3:
- none
Changes for v2:
- new patch
board/samsung/common/board.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
board/samsung/common/board.c +30 -0
@@ -22,6 +22,8 @@#include <asm/arch/power.h> #include <power/pmic.h> #include <asm/arch/sromc.h> +#include <lcd.h> +#include <samsung/misc.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -183,6 +185,7 @@ int power_init_board(void)#endif #ifdef CONFIG_OF_CONTROL +#ifdef CONFIG_SMC911X static int decode_sromc(const void *blob, struct fdt_sromc *config) { int err;
@@ -206,6 +209,7 @@ static int decode_sromc(const void *blob, struct fdt_sromc *config) }return 0 ; } +#endif int board_eth_init (bd_t *bis) {
@@ -263,10 +267,18 @@ int board_mmc_init(bd_t *bis) {int ret; +#ifdef CONFIG_SDHCI +/* mmc initializattion for available channels */ + ret =exynos_mmc_init (gd->fdt_blob); +if (ret) +debug ("mmc init failed\n" ); +#endif +#ifdef CONFIG_DWMMC /* dwmmc initializattion for available channels */ ret =exynos_dwmmc_init (gd->fdt_blob);if (ret)debug ("dwmmc init failed\n" ); +#endif return ret; }
@@ -315,3 +327,21 @@ int arch_early_init_r(void)return 0 ; } + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r (void ) +{ +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +set_board_info (); +#endif +#ifdef CONFIG_LCD_MENU +keys_init (); +check_boot_mode (); +#endif +#ifdef CONFIG_CMD_BMP +if (panel_info.logo_on) +draw_logo (); +#endif +return 0 ; +} +#endif
Signature · 1 line
1.8.3.2
PATCH v5 9/12 board:origen: Enable device tree on Origen
In reply to Piotr WilczekThis patch enables to run Origen board on device tree.
Uart, DRAM and MMC init functions are removed as their generic replacements form the common board file are used.
The config file is modified to contain only board specific options.
---
Changes for v5:
- no changes
Changes for v4:
- define CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, CONFIG_CMD_I2C at each board
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- no changes
arch/arm/dts/Makefile | 2 + arch/arm/dts/exynos4210-origen.dts | 45 +++++++++++++++ board/samsung/origen/origen.c | 112 +++---------------------------------- include/configs/origen.h | 110 ++++++++++-------------------------- 4 files changed, 87 insertions(+), 182 deletions(-) create mode 100644 arch/arm/dts/exynos4210-origen.dts
arch/arm/dts/Makefile +2 -0
@@ -1,3 +1,5 @@ +dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb + dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \ exynos5250-smdk5250.dtb \
arch/arm/dts/exynos4210-origen.dts new file +45 -0
46 lines not on this page · raw message
board/samsung/origen/origen.c +9 -103
138 lines not on this page · raw message
include/configs/origen.h +31 -79
166 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v5 10/12 board:universal: Enable device tree on Universal
In reply to Piotr WilczekThis patch enables to run Universal board on device tree.
---
Changes for v5:
- changed the name of exynos_lcd_panel_init to exynos_lcd_misc_init
Changes for v4:
- define CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, CONFIG_CMD_I2C at each board
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- no changes
arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos4210-universal_c210.dts | 83 ++++++++++++ board/samsung/universal_c210/universal.c | 204 ++++++++--------------------- include/configs/s5pc210_universal.h | 152 +++++++-------------- 4 files changed, 185 insertions(+), 257 deletions(-) create mode 100644 arch/arm/dts/exynos4210-universal_c210.dts
arch/arm/dts/Makefile +2 -1
@@ -1,4 +1,5 @@ -dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb +dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ + exynos4210-universal_c210.dtb dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \
arch/arm/dts/exynos4210-universal_c210.dts new file +83 -0
83 lines not on this page · raw message
board/samsung/universal_c210/universal.c +53 -151
271 lines not on this page · raw message
include/configs/s5pc210_universal.h +47 -105
210 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v5 11/12 board:trats: Enable device tree on Trats
In reply to Piotr WilczekThis patch enables to run Trats board on device tree.
---
Changes for v5:
- changed the name of exynos_lcd_panel_init to exynos_lcd_misc_init
Changes for v4:
- use "-" hypen in DT bindings
- define CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, CONFIG_CMD_I2C at each board
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- no changes
arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos4210-trats.dts | 120 +++++++++++++++++++++ board/samsung/trats/trats.c | 213 ++------------------------------------ include/configs/trats.h | 206 ++++++++++-------------------------- 4 files changed, 185 insertions(+), 357 deletions(-) create mode 100644 arch/arm/dts/exynos4210-trats.dts
arch/arm/dts/Makefile +2 -1
@@ -1,5 +1,6 @@ dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ - exynos4210-universal_c210.dtb + exynos4210-universal_c210.dtb \ + exynos4210-trats.dtb dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \
arch/arm/dts/exynos4210-trats.dts new file +120 -0
121 lines not on this page · raw message
board/samsung/trats/trats.c +10 -203
299 lines not on this page · raw message
include/configs/trats.h +53 -153
276 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v5 12/12 board:trats2: Enable device tree on Trats2
In reply to Piotr WilczekThis patch enables to run Trats2 board on device tree.
---
Changes for v5:
- changed the name of exynos_lcd_panel_init to exynos_lcd_misc_init
Changes for v4:
- use "-" hypen in DT bindings
- define CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, CONFIG_CMD_I2C at each board
Changes for v3:
- dts file moved to arch/arm/dts
Changes for v2:
- fixed mmc2 address in DT
arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++++++++++++++++++ board/samsung/trats2/trats2.c | 233 +------------------- include/configs/trats2.h | 204 ++++------------- 4 files changed, 483 insertions(+), 391 deletions(-) create mode 100644 arch/arm/dts/exynos4412-trats2.dts
arch/arm/dts/Makefile +2 -1
@@ -1,6 +1,7 @@ dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ exynos4210-universal_c210.dtb \ - exynos4210-trats.dtb + exynos4210-trats.dtb \ + exynos4412-trats2.dtb dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \
arch/arm/dts/exynos4412-trats2.dts new file +434 -0
434 lines not on this page · raw message
board/samsung/trats2/trats2.c +10 -223
294 lines not on this page · raw message
include/configs/trats2.h +37 -167
255 lines not on this page · raw message
Signature · 1 line
1.8.3.2
v5 cover Exynos4: add support for device tree
In reply to Piotr WilczekQuoted 85 lines · Piotr Wilczek
This patch set enables support for device tree on all Exynos4 based boards.
DT support is enabled on Exynos mipi dsim and sdhci drives. Common
board.cfile is reused for all functions common for Exynos4 boards. Board specific files are implemented in the board files. Origen, Universal, Trats and Trats2 boards are modifed to support device tree.This patch series depends on:
[U-Boot]sizes.h- consolidate for all architectures
http://patchwork.ozlabs.org/patch/324427/Changes for v5:
- add exynos_mipi_dsi.txt file with documented bindings
- changed the name ofexynos_lcd_panel_inittoexynos_lcd_misc_init
- removed unused panel_info.resolution bindingChanges for v4:
- defineCONFIG_ENV_SIZE,CONFIG_ENV_OFFSET,CONFIG_CMD_I2Cat each board
- use "-" hypen in DT bindings
- remove duplicated DT properties atexynos_fb.cfileChanges for v3:
- moved max77686 init function to smdk5250 board file
- board DTS files moved toarch/arm/dts
- rebased on the latest treeChanges for v2:
- removed incorrectly implemented check for invalid peripheral id
- removed unnecesary white space
- removed panel specific init function 's6e8ax0_init' to the board file
- removed duplicate DTB node parsing for panel_info.logo_on
- added (weak)exynos_lcd_panel_initfunction for panel specific initialisation from board file
- fixed checking for SDMMC boundary
- fiex debug message
- fixed comment to 'pwr_gpio' struct filed
- new patch to move checkboard to common file
- reuse existing commonboard.cfile
- new patch that removes unusedmax77686_initfunction
- fixed mmc2 addres in DT on Trats2Piotr Wilczek (12):
exynos4:pinmux:fdt: decode peripheral id video:mipidsim:fdt: Add DT support for mipi dsim driver video:exynos_fb:fdt: add additional fdt data drivers:mmc:sdhci: enable support for DT board:samsung: move checkboard to common file arm:exynos: add common DTS file for exynos 4 board:samsung:common: move max77686 init function arm:exynos: enable sdhci andmisc_initto common board board:origen: Enable device tree on Origen board:universal: Enable device tree on Universal board:trats: Enable device tree on Trats board:trats2: Enable device tree on Trats2arch/arm/cpu/armv7/exynos/pinmux.c | 17 + arch/arm/dts/Makefile | 5 + arch/arm/dts/exynos4.dtsi | 138 +++++++ arch/arm/dts/exynos4210-origen.dts | 45 +++ arch/arm/dts/exynos4210-trats.dts | 120 ++++++ arch/arm/dts/exynos4210-universal_c210.dts | 83 ++++ arch/arm/dts/exynos4412-trats2.dts | 434 +++++++++++++++++++++ arch/arm/include/asm/arch-exynos/board.h | 12 + arch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 + arch/arm/include/asm/arch-exynos/mmc.h | 7 + board/samsung/common/board.c | 180 +++------ board/samsung/origen/origen.c | 112 +----- board/samsung/smdk5250/exynos5-dt.c | 15 - board/samsung/smdk5250/smdk5250.c | 125 ++++++ board/samsung/smdk5420/smdk5420.c | 15 - board/samsung/trats/trats.c | 213 +--------- board/samsung/trats2/trats2.c | 233 +---------- board/samsung/universal_c210/universal.c | 204 +++------- doc/device-tree-bindings/video/exynos_mipi_dsi.txt | 82 ++++ drivers/mmc/s5p_sdhci.c | 129 ++++++ drivers/video/exynos_fb.c | 12 + drivers/video/exynos_mipi_dsi.c | 96 +++++ include/configs/exynos4-dt.h | 138 +++++++ include/configs/origen.h | 110 ++---- include/configs/s5pc210_universal.h | 152 +++----- include/configs/trats.h | 206 +++------- include/configs/trats2.h | 204 ++-------- include/fdtdec.h | 2 + include/sdhci.h | 5 + lib/fdtdec.c | 2 +
Quoted 9 lines
30 files changed, 1765 insertions(+), 1336 deletions(-) create mode 100644 arch/arm/dts/exynos4.dtsi create mode 100644 arch/arm/dts/exynos4210-origen.dts create mode 100644 arch/arm/dts/exynos4210-trats.dts create mode 100644 arch/arm/dts/exynos4210-universal_c210.dts create mode 100644 arch/arm/dts/exynos4412-trats2.dts create mode 100644 doc/device-tree-bindings/video/exynos_mipi_dsi.txt create mode 100644 include/configs/exynos4-dt.h
applied to u-boot-samsung.
Thanks,
Minkyu Kang.