ARM: ccxmx53: Add support for Digi ccxmx53 board.
Subsystems (4)
PATCH 1/4 ARM: ccxmx53: Add support for Digi ccxmx53 board.
Add support for Digi ConnectCore ccxmx53 board based on the i.MX53 SoC.
Tested with a 512M and 1GB module on a JSK dev board.
--- arch/arm/boards/Makefile | 1 + arch/arm/boards/ccxmx53/Makefile | 3 + arch/arm/boards/ccxmx53/board.c | 101 +++++++++ .../ccxmx53/flash-header-imx53-ccxmx53.imxcfg | 67 ++++++ arch/arm/boards/ccxmx53/lowlevel.c | 19 ++ arch/arm/dts/Makefile | 1 + arch/arm/dts/imx53-ccxmx53.dts | 15 ++ arch/arm/dts/imx53-ccxmx53.dtsi | 35 ++++ arch/arm/mach-imx/Kconfig | 8 + dts/src/arm/imx53-ccxmx53.dts | 102 ++++++++++ dts/src/arm/imx53-ccxmx53.dtsi | 226 +++++++++++++++++++++ images/Makefile.imx | 5 + 12 files changed, 583 insertions(+) create mode 100644 arch/arm/boards/ccxmx53/Makefile create mode 100644 arch/arm/boards/ccxmx53/board.c create mode 100644 arch/arm/boards/ccxmx53/flash-header-imx53-ccxmx53.imxcfg create mode 100644 arch/arm/boards/ccxmx53/lowlevel.c create mode 100644 arch/arm/dts/imx53-ccxmx53.dts create mode 100644 arch/arm/dts/imx53-ccxmx53.dtsi create mode 100644 dts/src/arm/imx53-ccxmx53.dts create mode 100644 dts/src/arm/imx53-ccxmx53.dtsi
arch/arm/boards/Makefile +1 -0
@@ -17,6 +17,7 @@ obj-$(CONFIG_MACH_CANON_A1100) += canon-a1100/ obj-$(CONFIG_MACH_CM_FX6) += cm-fx6/ obj-$(CONFIG_MACH_NITROGEN6X) += boundarydevices-nitrogen6x/ obj-$(CONFIG_MACH_CCMX51) += ccxmx51/ +obj-$(CONFIG_MACH_CCMX53) += ccxmx53/ obj-$(CONFIG_MACH_CFA10036) += crystalfontz-cfa10036/ obj-$(CONFIG_MACH_CHUMBY) += chumby_falconwing/ obj-$(CONFIG_MACH_CLEP7212) += clep7212/
arch/arm/boards/ccxmx53/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-y += board.o flash-header-imx53-ccxmx53.dcd.o +extra-y += flash-header-imx53-ccxmx53.dcd.S flash-header-imx53-ccxmx53.dcd +lwl-y += lowlevel.o
arch/arm/boards/ccxmx53/board.c new file +101 -0
101 lines not on this page · raw message
arch/arm/boards/ccxmx53/flash-header-imx53-ccxmx53.imxcfg new file +67 -0
67 lines not on this page · raw message
arch/arm/boards/ccxmx53/lowlevel.c new file +19 -0
@@ -0,0 +1,19 @@ +#include <common.h> +#include <mach/esdctl.h> +#include <mach/generic.h> +#include <asm/barebox-arm-head.h> +#include <asm/barebox-arm.h> + +extern char __dtb_imx53_ccxmx53_start[]; + +ENTRY_FUNCTION(start_imx53_ccxmx53, r0, r1, r2) +{ +void *fdt; + +imx5_cpu_lowlevel_init (); +arm_setup_stack (0xf8020000 -8 ); + + fdt = __dtb_imx53_ccxmx53_start -get_runtime_offset (); + +imx53_barebox_entry (fdt); +}
arch/arm/dts/Makefile +1 -0
@@ -18,6 +18,7 @@ pbl-dtb-$(CONFIG_MACH_EMBEST_RIOTBOARD) += imx6s-riotboard.dtb.o pbl-dtb-$(CONFIG_MACH_EMBEDSKY_E9) += imx6q-embedsky-e9.dtb.o pbl-dtb-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o pbl-dtb-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o imx53-qsrb.dtb.o +pbl-dtb-$(CONFIG_MACH_CCMX53) += imx53-ccxmx53.dtb.o pbl-dtb-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += imx53-voipac-bsb.dtb.o pbl-dtb-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o pbl-dtb-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += kirkwood-guruplug-server-plus-bb.dtb.o
arch/arm/dts/imx53-ccxmx53.dts new file +15 -0
@@ -0,0 +1,15 @@ +/* + * Copyright 2011 Freescale Semiconductor, Inc. + * Copyright 2011 Linaro Ltd. + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include <arm/imx53-ccxmx53.dts> +#include "imx53-ccxmx53.dtsi" +#include "imx53.dtsi"
arch/arm/dts/imx53-ccxmx53.dtsi new file +35 -0
@@ -0,0 +1,35 @@ +/ { + chosen { + linux,stdout-path = &uart1; + + environment@0 { + compatible = "barebox,environment"; + device-path = &nfc, "partname:environment"; + }; + }; +}; + +&nfc { + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "barebox"; + reg = <0x0 0x80000>; + }; + + partition@1 { + label = "environment"; + reg = <0x80000 0x80000>; + }; + + partition@2 { + label = "kernel"; + reg = <0x100000 0x400000>; + }; + + partition@3 { + label = "rootfs"; + reg = <0x500000 0x07B00000>; + }; +};
arch/arm/mach-imx/Kconfig +8 -0
@@ -27,6 +27,7 @@ config ARCH_TEXT_BASE default 0x7ff00000 if MACH_TQMA53 default 0x97f00000 if MACH_TX51 default 0x97f00000 if MACH_CCMX51 + default 0x7ff00000 if MACH_CCMX53 default 0x4fc00000 if MACH_SABRELITE default 0x8fe00000 if MACH_TX53 default 0x97f00000 if MACH_EFIKA_MX_SMARTBOOK
@@ -246,6 +247,13 @@ config MACH_FREESCALE_MX51_PDK select DRIVER_SPI_IMX select MFD_MC13XXX +config MACH_CCMX53 + bool "Digi ConnectCore i.MX53" + select ARCH_IMX53 + help + Say Y here if you are using the Digi ConnectCore ccxmx53 + series SoM + config MACH_FREESCALE_MX53_LOCO bool "Freescale i.MX53 LOCO" select ARCH_IMX53
dts/src/arm/imx53-ccxmx53.dts new file +102 -0
102 lines not on this page · raw message
dts/src/arm/imx53-ccxmx53.dtsi new file +226 -0
226 lines not on this page · raw message
images/Makefile.imx +5 -0
@@ -76,6 +76,11 @@ CFG_start_imx53_loco_r.pblx.imximg = $(board)/freescale-mx53-qsb/flash-header-im FILE_barebox-freescale-imx53-loco-r.img = start_imx53_loco_r.pblx.imximg image-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += barebox-freescale-imx53-loco-r.img +pblx-$(CONFIG_MACH_CCMX53) += start_imx53_ccxmx53 +CFG_start_imx53_ccxmx53.pblx.imximg = $(board)/ccxmx53/flash-header-imx53-ccxmx53.imxcfg +FILE_barebox-imx53-ccxmx53.img = start_imx53_ccxmx53.pblx.imximg +image-$(CONFIG_MACH_CCMX53) += barebox-imx53-ccxmx53.img + pblx-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += start_imx53_vmx53 CFG_start_imx53_vmx53.pblx.imximg = $(board)/freescale-mx53-vmx53/flash-header-imx53-vmx53.imxcfg FILE_barebox-freescale-imx53-vmx53.img = start_imx53_vmx53.pblx.imximg
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/4 ARM: ccxmx53: Added memory detection
Add module identification table.
Tested with a 512M and 1GB module on a JSK dev board.
--- arch/arm/boards/ccxmx53/board.c | 92 +++++++++++++++++++++++++++++++++++++++++ dts/src/arm/imx53-ccxmx53.dtsi | 4 +- 2 files changed, 94 insertions(+), 2 deletions(-)
arch/arm/boards/ccxmx53/board.c +92 -0
@@ -25,8 +25,47 @@#include <mach/imx5.h> #include <mach/generic.h> #include <mach/imx53-regs.h> +#include <mach/esdctl.h> #include <asm/armlinux.h> #include <mach/bbu.h> +#include <mach/iim.h> + +struct ccwmx53_hwid { +u8 variant; +u8 version; +u32 sn; +char mloc; +}; + +struct ccwmx53_ident { +const char *id_string; +const int mem_sz; +const char industrial; +const char eth0; +const char eth1; +const char wless; +}; + +static struct ccwmx53_ident ccwmx53_ids[] = { +/* 0x00 - 5500xxxx-xx */ {"Unknown" ,0 ,0 ,0 ,0 ,0 }, +/* 0x01 - 5500xxxx-xx */ {"Not supported" ,0 ,0 ,0 ,0 ,0 }, +/* 0x02 - 55001604-01 */ {"i.MX535@1000MHz, Wireless, PHY, Ext. Eth, Accel" ,SZ_512M ,0 ,1 ,1 ,1 }, +/* 0x03 - 55001605-01 */ {"i.MX535@1000MHz, PHY, Accel" ,SZ_512M ,0 ,1 ,0 ,0 }, +/* 0x04 - 55001604-02 */ {"i.MX535@1000MHz, Wireless, PHY, Ext. Eth, Accel" ,SZ_512M ,0 ,1 ,1 ,1 }, +/* 0x05 - 5500xxxx-xx */ {"i.MX535@1000MHz, PHY, Ext. Eth, Accel" ,SZ_512M ,0 ,1 ,1 ,0 }, +/* 0x06 - 55001604-03 */ {"i.MX535@1000MHz, Wireless, PHY, Accel" ,SZ_512M ,0 ,1 ,0 ,1 }, +/* 0x07 - 5500xxxx-xx */ {"i.MX535@1000MHz, PHY, Accel" ,SZ_512M ,0 ,1 ,0 ,0 }, +/* 0x08 - 55001604-04 */ {"i.MX537@800MHz, Wireless, PHY, Accel" ,SZ_512M ,1 ,1 ,0 ,1 }, +/* 0x09 - 55001605-02 */ {"i.MX537@800MHz, PHY, Accel" ,SZ_512M ,1 ,1 ,0 ,0 }, +/* 0x0a - 5500xxxx-xx */ {"i.MX537@800MHz, Wireless, PHY, Ext. Eth, Accel" ,SZ_512M ,1 ,1 ,1 ,1 }, +/* 0x0b - 55001605-03 */ {"i.MX537@800MHz, PHY, Ext. Eth, Accel" ,SZ_1G ,1 ,1 ,1 ,0 }, +/* 0x0c - 5500xxxx-xx */ {"Reserved for future use" ,0 ,0 ,0 ,0 ,0 }, +/* 0x0d - 55001605-05 */ {"i.MX537@800MHz, PHY, Accel" ,SZ_1G ,1 ,1 ,0 ,0 }, +/* 0x0e - 5500xxxx-xx */ {"Reserved for future use" ,0 ,0 ,0 ,0 ,0 }, +/* 0x0f - 5500xxxx-xx */ {"Reserved for future use" ,0 ,0 ,0 ,0 ,0 }, +}; + +struct ccwmx53_ident *ccwmx53_id;#define ccwmx53_FEC_PHY_RST IMX_GPIO_NR(7, 6)
@@ -37,6 +76,59 @@ static void ccwmx53_fec_reset(void)gpio_set_value (ccwmx53_FEC_PHY_RST,1 ); } +/* +* On this board the SDRAM is always configured for 512Mib in dt. The real +* size is determined by the board id read from the IIM module. +*/ + +static int ccwmx53_devices_init (void ) +{ +u8 hwid[6 ] = {0 }; +char manloc =0 ; + +if ((imx_iim_read (1 ,9 , hwid,sizeof (hwid)) !=sizeof (hwid)) || (hwid[0 ] <0x02 ) || (hwid[0 ] >=ARRAY_SIZE (ccwmx53_ids))) + { +printf ("Module Variant: Unknown (0x%02x) (0x%02x) (0x%02x) (0x%02x) (0x%02x) (0x%02x)\n" , hwid[0 ],hwid[1 ],hwid[2 ],hwid[3 ],hwid[4 ],hwid[5 ]); +memset (hwid,0x00 ,sizeof (hwid)); + } + + ccwmx53_id = &ccwmx53_ids[hwid[0 ]]; +printf ("Module Variant: %s (0x%02x)\n" , ccwmx53_id->id_string, hwid[0 ]); + +if (hwid[0 ]) { +printf ("Module HW Rev : %02x\n" , hwid[1 ] +1 ); +switch (hwid[2 ] &0xc0 ) { +case 0x00 : + manloc ='B' ; +break ; +case 0x40 : + manloc ='W' ; +break ; +case 0x80 : + manloc ='S' ; +break ; +default : + manloc ='N' ; +break ; + } +printf ("Module Serial : %c%d\n" , manloc, ((hwid[2 ] &0x3f ) <<24 ) | (hwid[3 ] <<16 ) | (hwid[4 ] <<8 ) | hwid[5 ]); +printf ("Module RAM : %dK\n" , (ccwmx53_id->mem_sz)/1024 ); +if ((ccwmx53_id->mem_sz -SZ_512M ) >0 ) + { +arm_add_mem_device ("ram1" ,MX53_CSD0_BASE_ADDR +SZ_512M , ccwmx53_id->mem_sz-SZ_512M ); + } + }else { +return -ENOSYS ; + } + +ccwmx53_fec_reset (); + +armlinux_set_architecture (MACH_TYPE_CCWMX53 ); + +return 0 ; +} +device_initcall (ccwmx53_devices_init); +static int ccxmx53_reg_init (void ) {unsigned char value =0 ;
dts/src/arm/imx53-ccxmx53.dtsi +2 -2
@@ -17,8 +17,8 @@ compatible = "digi,imx53-ccxmx53", "fsl,imx53"; memory { - reg = <0x70000000 0x20000000>, - <0xb0000000 0x20000000>; + device_type = "memory"; + reg = <0x70000000 0x20000000>; }; };
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/4 ARM: ccxmx53: Add 512MB and 1GB boards.
In reply to Jason CobhamTested with a 512M and 1GB module on a JSK dev board.
---
arch/arm/boards/ccxmx53/Makefile | 3 +-
arch/arm/boards/ccxmx53/board.c | 27 ++++-----
...xcfg => flash-header-imx53-ccxmx53_1gib.imxcfg} | 0
.../flash-header-imx53-ccxmx53_512mb.imxcfg | 67 ++++++++++++++++++++++
arch/arm/boards/ccxmx53/lowlevel.c | 44 ++++++++++++--
arch/arm/configs/imx_v7_defconfig | 1 +
dts/src/arm/imx53-ccxmx53.dts | 3 +-
dts/src/arm/imx53-ccxmx53.dtsi | 7 +--
images/Makefile.imx | 13 +++--
9 files changed, 132 insertions(+), 33 deletions(-)
rename arch/arm/boards/ccxmx53/{flash-header-imx53-ccxmx53.imxcfg => flash-header-imx53-ccxmx53_1gib.imxcfg} (100%)
create mode 100644 arch/arm/boards/ccxmx53/flash-header-imx53-ccxmx53_512mb.imxcfgarch/arm/boards/ccxmx53/Makefile +1 -2
@@ -1,3 +1,2 @@ -obj-y += board.o flash-header-imx53-ccxmx53.dcd.o -extra-y += flash-header-imx53-ccxmx53.dcd.S flash-header-imx53-ccxmx53.dcd +obj-y += board.o lwl-y += lowlevel.o
arch/arm/boards/ccxmx53/board.c +11 -16
@@ -30,12 +30,6 @@#include <mach/bbu.h> #include <mach/iim.h> -struct ccwmx53_hwid { -u8 variant; -u8 version; -u32 sn; -char mloc; -};struct ccwmx53_ident {const char *id_string;
@@ -47,9 +41,9 @@ struct ccwmx53_ident { };static struct ccwmx53_ident ccwmx53_ids[] = { -/* 0x00 - 5500xxxx-xx */ {"Unknown" ,0 ,0 ,0 ,0 ,0 }, -/* 0x01 - 5500xxxx-xx */ {"Not supported" ,0 ,0 ,0 ,0 ,0 }, -/* 0x02 - 55001604-01 */ {"i.MX535@1000MHz, Wireless, PHY, Ext. Eth, Accel" ,SZ_512M ,0 ,1 ,1 ,1 }, +/* 0x00 - 5500xxxx-xx */ {"Unknown" ,0 ,0 ,0 ,0 ,0 }, +/* 0x01 - 5500xxxx-xx */ {"Not supported" ,0 ,0 ,0 ,0 ,0 }, +/* 0x02 - 55001604-01 */ {"i.MX535@1000MHz, Wireless, PHY, Ext. Eth, Accel" ,SZ_512M ,0 ,1 ,1 ,1 },/* 0x03 - 55001605-01 */ {"i.MX535@1000MHz, PHY, Accel" ,SZ_512M ,0 ,1 ,0 ,0 },/* 0x04 - 55001604-02 */ {"i.MX535@1000MHz, Wireless, PHY, Ext. Eth, Accel" ,SZ_512M ,0 ,1 ,1 ,1 },/* 0x05 - 5500xxxx-xx */ {"i.MX535@1000MHz, PHY, Ext. Eth, Accel" ,SZ_512M ,0 ,1 ,1 ,0 },
@@ -59,10 +53,10 @@ static struct ccwmx53_ident ccwmx53_ids[] = { /* 0x09 - 55001605-02 */ { "i.MX537@800MHz, PHY, Accel", SZ_512M, 1, 1, 0, 0}, /* 0x0a - 5500xxxx-xx */ { "i.MX537@800MHz, Wireless, PHY, Ext. Eth, Accel", SZ_512M, 1, 1, 1, 1}, /* 0x0b - 55001605-03 */ { "i.MX537@800MHz, PHY, Ext. Eth, Accel", SZ_1G, 1, 1, 1, 0}, -/* 0x0c - 5500xxxx-xx */ { "Reserved for future use", 0, 0, 0, 0, 0}, -/* 0x0d - 55001605-05 */ { "i.MX537@800MHz, PHY, Accel", SZ_1G, 1, 1, 0, 0}, -/* 0x0e - 5500xxxx-xx */ { "Reserved for future use", 0, 0, 0, 0, 0}, -/* 0x0f - 5500xxxx-xx */ { "Reserved for future use", 0, 0, 0, 0, 0}, +/* 0x0c - 5500xxxx-xx */ { "Reserved for future use", 0, 0, 0, 0, 0}, +/* 0x0d - 55001605-05 */ { "i.MX537@800MHz, PHY, Accel", SZ_1G, 1, 1, 0, 0}, +/* 0x0e - 5500xxxx-xx */ { "Reserved for future use", 0, 0, 0, 0, 0}, +/* 0x0f - 5500xxxx-xx */ { "Reserved for future use", 0, 0, 0, 0, 0}, };struct ccwmx53_ident *ccwmx53_id;
@@ -77,8 +71,9 @@ static void ccwmx53_fec_reset(void) }/* -* On this board the SDRAM is always configured for 512Mib in dt. The real -* size is determined by the board id read from the IIM module. +* Configure this board for 256Mb. The real +* size is determined by the board id read from the IIM module +* and added as ram1. */ static int ccwmx53_devices_init (void )
@@ -115,7 +110,7 @@ static int ccwmx53_devices_init(void)printf ("Module RAM : %dK\n" , (ccwmx53_id->mem_sz)/1024 );if ((ccwmx53_id->mem_sz -SZ_512M ) >0 ) { -arm_add_mem_device ("ram1" ,MX53_CSD0_BASE_ADDR +SZ_512M , ccwmx53_id->mem_sz-SZ_512M ); +//arm_add_mem_device("ram1", MX53_CSD0_BASE_ADDR + SZ_512M, (ccwmx53_id->mem_sz)-SZ_512M); } }else {return -ENOSYS ;
arch/arm/boards/ccxmx53/flash-header-imx53-ccxmx53_1gib.imxcfg renamed from arch/arm/boards/ccxmx53/flash-header-imx53-ccxmx53.imxcfg +0 -0
arch/arm/boards/ccxmx53/flash-header-imx53-ccxmx53_512mb.imxcfg new file +67 -0
67 lines not on this page · raw message
arch/arm/boards/ccxmx53/lowlevel.c +39 -5
58 lines not on this page · raw message
arch/arm/configs/imx_v7_defconfig +1 -0
@@ -4,6 +4,7 @@ CONFIG_MACH_EFIKA_MX_SMARTBOOK=y CONFIG_MACH_EMBEDSKY_E9=y CONFIG_MACH_FREESCALE_MX51_PDK=y CONFIG_MACH_FREESCALE_MX53_LOCO=y +CONFIG_MACH_CCMX53=y CONFIG_MACH_TQMA53=y CONFIG_MACH_FREESCALE_MX53_VMX53=y CONFIG_MACH_PCAAXL3=y
dts/src/arm/imx53-ccxmx53.dts +2 -1
@@ -14,7 +14,8 @@ #include "imx53-ccxmx53.dtsi" / { - + model = "Digi ConnectCore ccxmx53"; + compatible = "digi,imx53-ccxmx53", "fsl,imx53"; }; &iomuxc {
dts/src/arm/imx53-ccxmx53.dtsi +2 -5
@@ -13,13 +13,10 @@ #include "imx53.dtsi" / { - model = "Digi ConnectCore ccxmx53"; - compatible = "digi,imx53-ccxmx53", "fsl,imx53"; - memory { - device_type = "memory"; - reg = <0x70000000 0x20000000>; + reg = <0x70000000 0x40000000>; }; + }; &iomuxc {
images/Makefile.imx +9 -4
@@ -76,10 +76,15 @@ CFG_start_imx53_loco_r.pblx.imximg = $(board)/freescale-mx53-qsb/flash-header-im FILE_barebox-freescale-imx53-loco-r.img = start_imx53_loco_r.pblx.imximg image-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += barebox-freescale-imx53-loco-r.img -pblx-$(CONFIG_MACH_CCMX53) += start_imx53_ccxmx53 -CFG_start_imx53_ccxmx53.pblx.imximg = $(board)/ccxmx53/flash-header-imx53-ccxmx53.imxcfg -FILE_barebox-imx53-ccxmx53.img = start_imx53_ccxmx53.pblx.imximg -image-$(CONFIG_MACH_CCMX53) += barebox-imx53-ccxmx53.img +pblx-$(CONFIG_MACH_CCMX53) += start_ccxmx53_512mb +CFG_start_ccxmx53_512mb.pblx.imximg = $(board)/ccxmx53/flash-header-imx53-ccxmx53_512mb.imxcfg +FILE_barebox-imx53-ccxmx53_512mb.img = start_ccxmx53_512mb.pblx.imximg +image-$(CONFIG_MACH_CCMX53) += barebox-imx53-ccxmx53_512mb.img + +pblx-$(CONFIG_MACH_CCMX53) += start_ccxmx53_1gib +CFG_start_ccxmx53_1gib.pblx.imximg = $(board)/ccxmx53/flash-header-imx53-ccxmx53_1gib.imxcfg +FILE_barebox-imx53-ccxmx53_1gib.img = start_ccxmx53_1gib.pblx.imximg +image-$(CONFIG_MACH_CCMX53) += barebox-imx53-ccxmx53_1gib.img pblx-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += start_imx53_vmx53 CFG_start_imx53_vmx53.pblx.imximg = $(board)/freescale-mx53-vmx53/flash-header-imx53-vmx53.imxcfg
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/4 ARM: ccxmx53: Formatting changes and remove un-used code.
In reply to Jason CobhamTested with a 512M and 1GB module on a JSK dev board.
--- arch/arm/boards/ccxmx53/board.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
arch/arm/boards/ccxmx53/board.c +5 -11
@@ -70,12 +70,9 @@ static void ccwmx53_fec_reset(void)gpio_set_value (ccwmx53_FEC_PHY_RST,1 ); } -/* -* Configure this board for 256Mb. The real -* size is determined by the board id read from the IIM module -* and added as ram1. -*/ - +/* On these boards, memory information is encoded in the MAC address. +* Print device memory, and option info from lookup table. +* */ static int ccwmx53_devices_init (void ) {u8 hwid[6 ] = {0 };
@@ -108,10 +105,7 @@ static int ccwmx53_devices_init(void) }printf ("Module Serial : %c%d\n" , manloc, ((hwid[2 ] &0x3f ) <<24 ) | (hwid[3 ] <<16 ) | (hwid[4 ] <<8 ) | hwid[5 ]);printf ("Module RAM : %dK\n" , (ccwmx53_id->mem_sz)/1024 ); -if ((ccwmx53_id->mem_sz -SZ_512M ) >0 ) - { -//arm_add_mem_device("ram1", MX53_CSD0_BASE_ADDR + SZ_512M, (ccwmx53_id->mem_sz)-SZ_512M); - } + }else {return -ENOSYS ; }
@@ -146,7 +140,7 @@ static int ccxmx53_reg_init(void) client.adapter = adapter; client.addr = addr; -/* Enable 3.3V ext regulator. This is not supported in dt */ +/* Enable 3.3V ext regulator. */ value =0xfa ;if (i2c_write_reg (&client,0x19 , &value,1 ) <0 ){printf ("****I2C write failed\n" );
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 4/4] ARM: ccxmx53: Formatting changes and remove un-used code.
Quoted 4 lines · Jason Cobham
Tested with a 512M and 1GB module on a JSK dev board.
Signed-off-by Jason Cobham <[email protected]>--- arch/arm/boards/ccxmx53/board.c | 16 +++++-----------
this file is added in patch 1 of this series. You should squash this accordingly.
Best regards
Uwe
Signature · 7 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerQuoted 82 lines · Jason Cobham
Add support for Digi ConnectCore ccxmx53 board based on the i.MX53 SoC.
Tested with a 512M and 1GB module on a JSK dev board.
Signed-off-by Jason Cobham <[email protected]>--- arch/arm/boards/Makefile | 1 + arch/arm/boards/ccxmx53/Makefile | 3 + arch/arm/boards/ccxmx53/board.c | 101 +++++++++ .../ccxmx53/flash-header-imx53-ccxmx53.imxcfg | 67 ++++++ arch/arm/boards/ccxmx53/lowlevel.c | 19 ++ arch/arm/dts/Makefile | 1 + arch/arm/dts/imx53-ccxmx53.dts | 15 ++ arch/arm/dts/imx53-ccxmx53.dtsi | 35 ++++ arch/arm/mach-imx/Kconfig | 8 + dts/src/arm/imx53-ccxmx53.dts | 102 ++++++++++ dts/src/arm/imx53-ccxmx53.dtsi | 226 +++++++++++++++++++++ images/Makefile.imx | 5 + 12 files changed, 583 insertions(+) create mode 100644 arch/arm/boards/ccxmx53/Makefile create mode 100644 arch/arm/boards/ccxmx53/board.c create mode 100644 arch/arm/boards/ccxmx53/flash-header-imx53-ccxmx53.imxcfg create mode 100644 arch/arm/boards/ccxmx53/lowlevel.c create mode 100644 arch/arm/dts/imx53-ccxmx53.dts create mode 100644 arch/arm/dts/imx53-ccxmx53.dtsi create mode 100644 dts/src/arm/imx53-ccxmx53.dts create mode 100644 dts/src/arm/imx53-ccxmx53.dtsiarch/arm/boards/Makefile +1
-0@@ -17,6 +17,7 @@ obj-$(CONFIG_MACH_CANON_A1100) += canon-a1100/ obj-$(CONFIG_MACH_CM_FX6) += cm-fx6/ obj-$(CONFIG_MACH_NITROGEN6X) += boundarydevices-nitrogen6x/ obj-$(CONFIG_MACH_CCMX51) += ccxmx51/ +obj-$(CONFIG_MACH_CCMX53) += ccxmx53/ obj-$(CONFIG_MACH_CFA10036) += crystalfontz-cfa10036/ obj-$(CONFIG_MACH_CHUMBY) += chumby_falconwing/ obj-$(CONFIG_MACH_CLEP7212) += clep7212/arch/arm/boards/ccxmx53/Makefile new file +3
-0@@ -0,0 +1,3 @@ +obj-y += board.o flash-header-imx53-ccxmx53.dcd.o +extra-y += flash-header-imx53-ccxmx53.dcd.S flash-header-imx53-ccxmx53.dcd +lwl-y += lowlevel.oarch/arm/boards/ccxmx53/board.c new file +28
-0@@ -0,0 +1,101 @@ +/* +* Copyright (C) 2015 Jason Cobham <[email protected]> +* +* Board specific file for the Digi ConnectCore ccxmx53 SoM +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +*/ + +#include <common.h> +#include <init.h> +#include <linux/sizes.h> +#include <i2c/i2c.h> +#include <gpio.h> + +#include <generated/mach-types.h> +#include <mach/imx5.h> +#include <mach/generic.h> +#include <mach/imx53-regs.h> +#include <asm/armlinux.h>
arch/arm/boards/ccxmx53/board.c line 38
Quoted 10 lines
arch/arm/boards/ccxmx53/board.c new file +10
-0+#include <mach/bbu.h> + +#define ccwmx53_FEC_PHY_RST IMX_GPIO_NR(7, 6) + +static void ccwmx53_fec_reset (void ) +{ +gpio_direction_output (ccwmx53_FEC_PHY_RST,0 ); +mdelay (1 ); +gpio_set_value (ccwmx53_FEC_PHY_RST,1 ); +}
The phy reset pin can be specified in the device tree, then the fec driver can handle this automatically. See the phy-reset-gpio property in dts/Bindings/net/fsl-fec.txt
Quoted 25 lines
arch/arm/boards/ccxmx53/board.c new file +25
-0+ +static int ccxmx53_reg_init (void ) +{ +unsigned char value =0 ; +struct i2c_adapter *adapter =NULL ; +struct i2c_client client; +int addr =-1 , bus =0 ; + +/* I2C0 bus */ + bus =0 ; + +/* da9053 device address is 0x68 */ + addr =0x68 ; + + adapter =i2c_get_adapter (bus); +if (!adapter){ +printf ("****No I2C Adapter\n" ); +return -ENODEV ; + } + + client.adapter = adapter; + client.addr = addr; + +/* Enable 3.3V ext regulator. This is not supported in dt */ + value =0xfa ;
arch/arm/boards/ccxmx53/board.c line 73
Quoted 10 lines
arch/arm/boards/ccxmx53/board.c new file +10
-0+if (i2c_write_reg (&client,0x19 , &value,1 ) <0 ){ +printf ("****I2C write failed\n" ); +return -ENOSYS ; + } + +ccwmx53_fec_reset (); + +return 0 ; +} +device_initcall (ccxmx53_reg_init);
This function misses the of_machine_is_compatible() protection. Instead of adding it you can merge the code from ccxmx53_late_init() and ccxmx53_reg_init() into a single ccxmx53_init().
arch/arm/mach-imx/Kconfig config ARCH_TEXT_BASE · line 30
Quoted 9 lines
arch/arm/mach-imx/Kconfig +1
-0@@ -27,6 +27,7 @@ config ARCH_TEXT_BASE default 0x7ff00000 if MACH_TQMA53 default 0x97f00000 if MACH_TX51 default 0x97f00000 if MACH_CCMX51 + default 0x7ff00000 if MACH_CCMX53
You don't need this. (Shouldn't be needed for a bunch of other boards here aswell)
You can merge all patches in this series into a single patch.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
dts/src/arm/imx53-ccxmx53.dts line 86
Quoted 8 lines · Jason Cobham
dts/src/arm/imx53-ccxmx53.dts new file +8
-0+ +&esdhc3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_esdhc3>; + bus-width = <4>,<8>; + non-removable; + status = "okay"; +};
Neither barebox nor the kernel support a list of values for bus-width.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 13 lines · Trent Piepho
dts/src/arm/imx53-ccxmx53.dts line 86
Quoted 8 lines · Jason Cobham
dts/src/arm/imx53-ccxmx53.dts new file +8
-0+ +&esdhc3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_esdhc3>; + bus-width = <4>,<8>; + non-removable; + status = "okay"; +};Neither barebox nor the kernel support a list of values for bus-width.
Thanks, I'll fix this in v2.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox