[U-Boot] [PATCH 0/4] Topic board support updates

There have been hardware changes to a few topic-miami boards, these are included in these commits (the production version of the "lite" became cheaper, the "plus" was made faster). Also improvements for usability.
@Michal: These also apply cleanly to u-boot-xlnx, it'd be great if they could be included there as well.
Mike Looijmans (4): topic-miamiplus: Run CPU at 800MHz for speedgrade-2 board: topic_miamilite: Support cost-reduced version configs/topic_miami.h: Use same partitioning for USB boot as for SD board: topic-miamiplus: Run IO PLL at 1000 MHz
arch/arm/dts/zynq-topic-miamilite.dts | 7 +++-- arch/arm/dts/zynq-topic-miamiplus.dts | 9 ++++++ .../topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c | 14 ++++----- board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt | 14 ++++----- .../topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c | 34 ++++++++++------------ include/configs/topic_miami.h | 19 +++++++----- include/configs/topic_miamilite.h | 11 +++++++ 7 files changed, 65 insertions(+), 43 deletions(-) create mode 100644 include/configs/topic_miamilite.h

The miamiplus contains a speedgrade-2 device, which may run the CPU at 800MHz. Change the PLL setting to 800MHz, and adapt the setpoints in the devicetree.
Signed-off-by: Mike Looijmans mike.looijmans@topic.nl --- arch/arm/dts/zynq-topic-miamiplus.dts | 9 +++++++++ board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/zynq-topic-miamiplus.dts b/arch/arm/dts/zynq-topic-miamiplus.dts index c0ccea9..df53886 100644 --- a/arch/arm/dts/zynq-topic-miamiplus.dts +++ b/arch/arm/dts/zynq-topic-miamiplus.dts @@ -11,6 +11,15 @@ compatible = "topic,miamiplus", "xlnx,zynq-7000"; };
+/* The miamiplus contains a speedgrade-2 device and runs at 800MHz */ +&cpu0 { + operating-points = < + /* kHz uV */ + 800000 1000000 + 400000 1000000 + >; +}; + &qspi { is-dual = <1>; }; diff --git a/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c b/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c index c1cc1df..fd5846a 100644 --- a/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c +++ b/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c @@ -8,8 +8,8 @@
static unsigned long ps7_pll_init_data_3_0[] = { EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU, 0x0000DF0DU), - EMIT_MASKWRITE(0XF8000110, 0x003FFFF0U, 0x000FA220U), - EMIT_MASKWRITE(0XF8000100, 0x0007F000U, 0x00028000U), + EMIT_MASKWRITE(0XF8000110, 0x003FFFF0U, 0x000FA240U), + EMIT_MASKWRITE(0XF8000100, 0x0007F000U, 0x00030000U), EMIT_MASKWRITE(0XF8000100, 0x00000010U, 0x00000010U), EMIT_MASKWRITE(0XF8000100, 0x00000001U, 0x00000001U), EMIT_MASKWRITE(0XF8000100, 0x00000001U, 0x00000000U),

On 24.8.2018 14:00, Mike Looijmans wrote:
The miamiplus contains a speedgrade-2 device, which may run the CPU at 800MHz. Change the PLL setting to 800MHz, and adapt the setpoints in the devicetree.
Signed-off-by: Mike Looijmans mike.looijmans@topic.nl
arch/arm/dts/zynq-topic-miamiplus.dts | 9 +++++++++ board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/zynq-topic-miamiplus.dts b/arch/arm/dts/zynq-topic-miamiplus.dts index c0ccea9..df53886 100644 --- a/arch/arm/dts/zynq-topic-miamiplus.dts +++ b/arch/arm/dts/zynq-topic-miamiplus.dts @@ -11,6 +11,15 @@ compatible = "topic,miamiplus", "xlnx,zynq-7000"; };
+/* The miamiplus contains a speedgrade-2 device and runs at 800MHz */ +&cpu0 {
- operating-points = <
/* kHz uV */
800000 1000000
400000 1000000
;+};
&qspi { is-dual = <1>; }; diff --git a/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c b/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c index c1cc1df..fd5846a 100644 --- a/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c +++ b/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c @@ -8,8 +8,8 @@
static unsigned long ps7_pll_init_data_3_0[] = { EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU, 0x0000DF0DU),
- EMIT_MASKWRITE(0XF8000110, 0x003FFFF0U, 0x000FA220U),
- EMIT_MASKWRITE(0XF8000100, 0x0007F000U, 0x00028000U),
- EMIT_MASKWRITE(0XF8000110, 0x003FFFF0U, 0x000FA240U),
- EMIT_MASKWRITE(0XF8000100, 0x0007F000U, 0x00030000U), EMIT_MASKWRITE(0XF8000100, 0x00000010U, 0x00000010U), EMIT_MASKWRITE(0XF8000100, 0x00000001U, 0x00000001U), EMIT_MASKWRITE(0XF8000100, 0x00000001U, 0x00000000U),
This is fine. M

To reduce board cost, the topic-miamilite board hardware was adapted. It now only has single QSPI NOR flash and a single DDR RAM chip. This reduces the memory interface to 16-bit and halves the available RAM and flash.
Signed-off-by: Mike Looijmans mike.looijmans@topic.nl --- arch/arm/dts/zynq-topic-miamilite.dts | 7 ++++--- board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c | 14 +++++++------- board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt | 14 +++++++------- include/configs/topic_miami.h | 7 +++++-- include/configs/topic_miamilite.h | 11 +++++++++++ 5 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 include/configs/topic_miamilite.h
diff --git a/arch/arm/dts/zynq-topic-miamilite.dts b/arch/arm/dts/zynq-topic-miamilite.dts index 366fd5b..c06549c 100644 --- a/arch/arm/dts/zynq-topic-miamilite.dts +++ b/arch/arm/dts/zynq-topic-miamilite.dts @@ -9,8 +9,9 @@ / { model = "Topic Miami Lite Zynq Board"; compatible = "topic,miamilite", "xlnx,zynq-7000"; -};
-&qspi { - is-dual = <1>; + memory@0 { + device_type = "memory"; + reg = <0x0 0x20000000>; + }; }; diff --git a/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c b/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c index afec403..28670bd 100644 --- a/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c +++ b/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c @@ -59,7 +59,7 @@ static unsigned long ps7_clock_init_data_3_0[] = { };
static unsigned long ps7_ddr_init_data_3_0[] = { - EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000080U), + EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000084U), EMIT_MASKWRITE(0xF8006004, 0x0007FFFFU, 0x00001081U), EMIT_MASKWRITE(0xF8006008, 0x03FFFFFFU, 0x03C0780FU), EMIT_MASKWRITE(0xF800600C, 0x03FFFFFFU, 0x02001001U), @@ -74,9 +74,9 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF8006030, 0xFFFFFFFFU, 0x00040930U), EMIT_MASKWRITE(0xF8006034, 0x13FF3FFFU, 0x000116D4U), EMIT_MASKWRITE(0xF8006038, 0x00000003U, 0x00000000U), - EMIT_MASKWRITE(0xF800603C, 0x000FFFFFU, 0x00000777U), - EMIT_MASKWRITE(0xF8006040, 0xFFFFFFFFU, 0xFFF00000U), - EMIT_MASKWRITE(0xF8006044, 0x0FFFFFFFU, 0x0F666666U), + EMIT_MASKWRITE(0xF800603C, 0x000FFFFFU, 0x00000666U), + EMIT_MASKWRITE(0xF8006040, 0xFFFFFFFFU, 0xFFFF0000U), + EMIT_MASKWRITE(0xF8006044, 0x0FFFFFFFU, 0x0F555555U), EMIT_MASKWRITE(0xF8006048, 0x0003F03FU, 0x0003C008U), EMIT_MASKWRITE(0xF8006050, 0xFF0F8FFFU, 0x77010800U), EMIT_MASKWRITE(0xF8006058, 0x00010000U, 0x00000000U), @@ -102,8 +102,8 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF8006114, 0x000000FFU, 0x00000000U), EMIT_MASKWRITE(0xF8006118, 0x7FFFFFCFU, 0x40000001U), EMIT_MASKWRITE(0xF800611C, 0x7FFFFFCFU, 0x40000001U), - EMIT_MASKWRITE(0xF8006120, 0x7FFFFFCFU, 0x40000001U), - EMIT_MASKWRITE(0xF8006124, 0x7FFFFFCFU, 0x40000001U), + EMIT_MASKWRITE(0xF8006120, 0x7FFFFFCFU, 0x40000000U), + EMIT_MASKWRITE(0xF8006124, 0x7FFFFFCFU, 0x40000000U), EMIT_MASKWRITE(0xF800612C, 0x000FFFFFU, 0x0003482CU), EMIT_MASKWRITE(0xF8006130, 0x000FFFFFU, 0x00033032U), EMIT_MASKWRITE(0xF8006134, 0x000FFFFFU, 0x0002E81FU), @@ -140,7 +140,7 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF80062B0, 0x003FFFFFU, 0x00005125U), EMIT_MASKWRITE(0xF80062B4, 0x0003FFFFU, 0x000012A8U), EMIT_MASKPOLL(0xF8000B74, 0x00002000U), - EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000081U), + EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000085U), EMIT_MASKPOLL(0xF8006054, 0x00000007U), EMIT_EXIT(), }; diff --git a/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt b/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt index db6e642..08d5344 100644 --- a/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt +++ b/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt @@ -1,5 +1,5 @@ 0xF8000120 0x1F000200 // ARM_CLK_CTRL - divisor = 2 433 MHz (?) -0xf8000700 0x202 +0xf8000700 0x200 0xf8000704 0x202 0xf8000708 0x202 0xf800070c 0x202 @@ -8,11 +8,11 @@ 0xf8000718 0x202 0xf800071c 0x200 0xf8000720 0x202 -0xf8000724 0x202 -0xf8000728 0x202 -0xf800072c 0x202 -0xf8000730 0x202 -0xf8000734 0x202 +0xf8000724 0x200 +0xf8000728 0x200 +0xf800072c 0x200 +0xf8000730 0x200 +0xf8000734 0x200 0xf8000738 0x12e1 0xf800073c 0x12e0 0xf8000740 0x1200 @@ -58,4 +58,4 @@ 0xF800014C 0x00000621 // LQSPI_CLK_CTRL - ARMPLL/6 (200 MHz) 0xE000D000 0x800238C1 // QSPI config - divide-by-2 0xE000D038 0x00000020 // QSPI loopback - internal, 0 delay -0xE000D0A0 0xE2FF06EB // LQSPI_CFG - Quad read, dual flash +0xE000D0A0 0x82FF04EB // LQSPI_CFG - QIOREAD mode, Numonyx/Micron diff --git a/include/configs/topic_miami.h b/include/configs/topic_miami.h index f14c4ee..c32c63c 100644 --- a/include/configs/topic_miami.h +++ b/include/configs/topic_miami.h @@ -57,9 +57,12 @@ /* Setup proper boot sequences for Miami boards */
#if defined(CONFIG_USB) +# ifndef ENV_USB_RESET +# define ENV_USB_RESET "i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\ + "i2c mw 41 1 fe && i2c mw 41 1 ff" +# endif # define EXTRA_ENV_USB \ - "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\ - "i2c mw 41 1 fe && i2c mw 41 1 ff\0" \ + "usbreset=" ENV_USB_RESET "\0" \ "usbboot=run usbreset && if usb start; then " \ "echo Booting from USB... && " \ "if load usb 0 0x1900000 ${bootscript}; then "\ diff --git a/include/configs/topic_miamilite.h b/include/configs/topic_miamilite.h new file mode 100644 index 0000000..7ec48d4 --- /dev/null +++ b/include/configs/topic_miamilite.h @@ -0,0 +1,11 @@ +/* + * (C) Copyright 2017 Topic Embedded Products + * + * Configuration for Miami Lite Zynq Evaluation and Development Board + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* USB reset is on GPIO signal instead of expander */ +#define ENV_USB_RESET "gpio clear 0 && gpio set 0" +#include "topic_miami.h"

On 24.8.2018 14:00, Mike Looijmans wrote:
To reduce board cost, the topic-miamilite board hardware was adapted. It now only has single QSPI NOR flash and a single DDR RAM chip. This reduces the memory interface to 16-bit and halves the available RAM and flash.
Signed-off-by: Mike Looijmans mike.looijmans@topic.nl
arch/arm/dts/zynq-topic-miamilite.dts | 7 ++++--- board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c | 14 +++++++------- board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt | 14 +++++++------- include/configs/topic_miami.h | 7 +++++-- include/configs/topic_miamilite.h | 11 +++++++++++ 5 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 include/configs/topic_miamilite.h
diff --git a/arch/arm/dts/zynq-topic-miamilite.dts b/arch/arm/dts/zynq-topic-miamilite.dts index 366fd5b..c06549c 100644 --- a/arch/arm/dts/zynq-topic-miamilite.dts +++ b/arch/arm/dts/zynq-topic-miamilite.dts @@ -9,8 +9,9 @@ / { model = "Topic Miami Lite Zynq Board"; compatible = "topic,miamilite", "xlnx,zynq-7000"; -};
-&qspi {
- is-dual = <1>;
- memory@0 {
device_type = "memory";
reg = <0x0 0x20000000>;
- };
}; diff --git a/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c b/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c index afec403..28670bd 100644 --- a/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c +++ b/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c @@ -59,7 +59,7 @@ static unsigned long ps7_clock_init_data_3_0[] = { };
static unsigned long ps7_ddr_init_data_3_0[] = {
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000080U),
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000084U), EMIT_MASKWRITE(0xF8006004, 0x0007FFFFU, 0x00001081U), EMIT_MASKWRITE(0xF8006008, 0x03FFFFFFU, 0x03C0780FU), EMIT_MASKWRITE(0xF800600C, 0x03FFFFFFU, 0x02001001U),
@@ -74,9 +74,9 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF8006030, 0xFFFFFFFFU, 0x00040930U), EMIT_MASKWRITE(0xF8006034, 0x13FF3FFFU, 0x000116D4U), EMIT_MASKWRITE(0xF8006038, 0x00000003U, 0x00000000U),
- EMIT_MASKWRITE(0xF800603C, 0x000FFFFFU, 0x00000777U),
- EMIT_MASKWRITE(0xF8006040, 0xFFFFFFFFU, 0xFFF00000U),
- EMIT_MASKWRITE(0xF8006044, 0x0FFFFFFFU, 0x0F666666U),
- EMIT_MASKWRITE(0xF800603C, 0x000FFFFFU, 0x00000666U),
- EMIT_MASKWRITE(0xF8006040, 0xFFFFFFFFU, 0xFFFF0000U),
- EMIT_MASKWRITE(0xF8006044, 0x0FFFFFFFU, 0x0F555555U), EMIT_MASKWRITE(0xF8006048, 0x0003F03FU, 0x0003C008U), EMIT_MASKWRITE(0xF8006050, 0xFF0F8FFFU, 0x77010800U), EMIT_MASKWRITE(0xF8006058, 0x00010000U, 0x00000000U),
@@ -102,8 +102,8 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF8006114, 0x000000FFU, 0x00000000U), EMIT_MASKWRITE(0xF8006118, 0x7FFFFFCFU, 0x40000001U), EMIT_MASKWRITE(0xF800611C, 0x7FFFFFCFU, 0x40000001U),
- EMIT_MASKWRITE(0xF8006120, 0x7FFFFFCFU, 0x40000001U),
- EMIT_MASKWRITE(0xF8006124, 0x7FFFFFCFU, 0x40000001U),
- EMIT_MASKWRITE(0xF8006120, 0x7FFFFFCFU, 0x40000000U),
- EMIT_MASKWRITE(0xF8006124, 0x7FFFFFCFU, 0x40000000U), EMIT_MASKWRITE(0xF800612C, 0x000FFFFFU, 0x0003482CU), EMIT_MASKWRITE(0xF8006130, 0x000FFFFFU, 0x00033032U), EMIT_MASKWRITE(0xF8006134, 0x000FFFFFU, 0x0002E81FU),
@@ -140,7 +140,7 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF80062B0, 0x003FFFFFU, 0x00005125U), EMIT_MASKWRITE(0xF80062B4, 0x0003FFFFU, 0x000012A8U), EMIT_MASKPOLL(0xF8000B74, 0x00002000U),
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000081U),
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000085U), EMIT_MASKPOLL(0xF8006054, 0x00000007U), EMIT_EXIT(),
}; diff --git a/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt b/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt index db6e642..08d5344 100644 --- a/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt +++ b/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt @@ -1,5 +1,5 @@ 0xF8000120 0x1F000200 // ARM_CLK_CTRL - divisor = 2 433 MHz (?) -0xf8000700 0x202 +0xf8000700 0x200 0xf8000704 0x202 0xf8000708 0x202 0xf800070c 0x202 @@ -8,11 +8,11 @@ 0xf8000718 0x202 0xf800071c 0x200 0xf8000720 0x202 -0xf8000724 0x202 -0xf8000728 0x202 -0xf800072c 0x202 -0xf8000730 0x202 -0xf8000734 0x202 +0xf8000724 0x200 +0xf8000728 0x200 +0xf800072c 0x200 +0xf8000730 0x200 +0xf8000734 0x200 0xf8000738 0x12e1 0xf800073c 0x12e0 0xf8000740 0x1200 @@ -58,4 +58,4 @@ 0xF800014C 0x00000621 // LQSPI_CLK_CTRL - ARMPLL/6 (200 MHz) 0xE000D000 0x800238C1 // QSPI config - divide-by-2 0xE000D038 0x00000020 // QSPI loopback - internal, 0 delay -0xE000D0A0 0xE2FF06EB // LQSPI_CFG - Quad read, dual flash +0xE000D0A0 0x82FF04EB // LQSPI_CFG - QIOREAD mode, Numonyx/Micron diff --git a/include/configs/topic_miami.h b/include/configs/topic_miami.h index f14c4ee..c32c63c 100644 --- a/include/configs/topic_miami.h +++ b/include/configs/topic_miami.h @@ -57,9 +57,12 @@ /* Setup proper boot sequences for Miami boards */
#if defined(CONFIG_USB) +# ifndef ENV_USB_RESET +# define ENV_USB_RESET "i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
"i2c mw 41 1 fe && i2c mw 41 1 ff"
+# endif # define EXTRA_ENV_USB \
- "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
"i2c mw 41 1 fe && i2c mw 41 1 ff\0" \
- "usbreset=" ENV_USB_RESET "\0" \ "usbboot=run usbreset && if usb start; then " \ "echo Booting from USB... && " \ "if load usb 0 0x1900000 ${bootscript}; then "\
diff --git a/include/configs/topic_miamilite.h b/include/configs/topic_miamilite.h new file mode 100644 index 0000000..7ec48d4 --- /dev/null +++ b/include/configs/topic_miamilite.h @@ -0,0 +1,11 @@ +/*
- (C) Copyright 2017 Topic Embedded Products
- Configuration for Miami Lite Zynq Evaluation and Development Board
- SPDX-License-Identifier: GPL-2.0+
- */
+/* USB reset is on GPIO signal instead of expander */ +#define ENV_USB_RESET "gpio clear 0 && gpio set 0" +#include "topic_miami.h"
I would prefer if you can use CONFIG_SYS_EXTRA_OPTIONS and do not create additional file just for this.
Just use any GPIO_USB_RESET or similar
#if !defined() expander #else gpio #endif
Thanks, Michal

On 07-09-18 11:30, Michal Simek wrote:
On 24.8.2018 14:00, Mike Looijmans wrote:
To reduce board cost, the topic-miamilite board hardware was adapted. It now only has single QSPI NOR flash and a single DDR RAM chip. This reduces the memory interface to 16-bit and halves the available RAM and flash.
Signed-off-by: Mike Looijmans mike.looijmans@topic.nl
arch/arm/dts/zynq-topic-miamilite.dts | 7 ++++--- board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c | 14 +++++++------- board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt | 14 +++++++------- include/configs/topic_miami.h | 7 +++++-- include/configs/topic_miamilite.h | 11 +++++++++++ 5 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 include/configs/topic_miamilite.h
diff --git a/arch/arm/dts/zynq-topic-miamilite.dts b/arch/arm/dts/zynq-topic-miamilite.dts index 366fd5b..c06549c 100644 --- a/arch/arm/dts/zynq-topic-miamilite.dts +++ b/arch/arm/dts/zynq-topic-miamilite.dts @@ -9,8 +9,9 @@ / { model = "Topic Miami Lite Zynq Board"; compatible = "topic,miamilite", "xlnx,zynq-7000"; -};
-&qspi {
- is-dual = <1>;
- memory@0 {
device_type = "memory";
reg = <0x0 0x20000000>;
- }; };
diff --git a/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c b/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c index afec403..28670bd 100644 --- a/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c +++ b/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c @@ -59,7 +59,7 @@ static unsigned long ps7_clock_init_data_3_0[] = { };
static unsigned long ps7_ddr_init_data_3_0[] = {
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000080U),
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000084U), EMIT_MASKWRITE(0xF8006004, 0x0007FFFFU, 0x00001081U), EMIT_MASKWRITE(0xF8006008, 0x03FFFFFFU, 0x03C0780FU), EMIT_MASKWRITE(0xF800600C, 0x03FFFFFFU, 0x02001001U),
@@ -74,9 +74,9 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF8006030, 0xFFFFFFFFU, 0x00040930U), EMIT_MASKWRITE(0xF8006034, 0x13FF3FFFU, 0x000116D4U), EMIT_MASKWRITE(0xF8006038, 0x00000003U, 0x00000000U),
- EMIT_MASKWRITE(0xF800603C, 0x000FFFFFU, 0x00000777U),
- EMIT_MASKWRITE(0xF8006040, 0xFFFFFFFFU, 0xFFF00000U),
- EMIT_MASKWRITE(0xF8006044, 0x0FFFFFFFU, 0x0F666666U),
- EMIT_MASKWRITE(0xF800603C, 0x000FFFFFU, 0x00000666U),
- EMIT_MASKWRITE(0xF8006040, 0xFFFFFFFFU, 0xFFFF0000U),
- EMIT_MASKWRITE(0xF8006044, 0x0FFFFFFFU, 0x0F555555U), EMIT_MASKWRITE(0xF8006048, 0x0003F03FU, 0x0003C008U), EMIT_MASKWRITE(0xF8006050, 0xFF0F8FFFU, 0x77010800U), EMIT_MASKWRITE(0xF8006058, 0x00010000U, 0x00000000U),
@@ -102,8 +102,8 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF8006114, 0x000000FFU, 0x00000000U), EMIT_MASKWRITE(0xF8006118, 0x7FFFFFCFU, 0x40000001U), EMIT_MASKWRITE(0xF800611C, 0x7FFFFFCFU, 0x40000001U),
- EMIT_MASKWRITE(0xF8006120, 0x7FFFFFCFU, 0x40000001U),
- EMIT_MASKWRITE(0xF8006124, 0x7FFFFFCFU, 0x40000001U),
- EMIT_MASKWRITE(0xF8006120, 0x7FFFFFCFU, 0x40000000U),
- EMIT_MASKWRITE(0xF8006124, 0x7FFFFFCFU, 0x40000000U), EMIT_MASKWRITE(0xF800612C, 0x000FFFFFU, 0x0003482CU), EMIT_MASKWRITE(0xF8006130, 0x000FFFFFU, 0x00033032U), EMIT_MASKWRITE(0xF8006134, 0x000FFFFFU, 0x0002E81FU),
@@ -140,7 +140,7 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF80062B0, 0x003FFFFFU, 0x00005125U), EMIT_MASKWRITE(0xF80062B4, 0x0003FFFFU, 0x000012A8U), EMIT_MASKPOLL(0xF8000B74, 0x00002000U),
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000081U),
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000085U), EMIT_MASKPOLL(0xF8006054, 0x00000007U), EMIT_EXIT(), };
diff --git a/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt b/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt index db6e642..08d5344 100644 --- a/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt +++ b/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt @@ -1,5 +1,5 @@ 0xF8000120 0x1F000200 // ARM_CLK_CTRL - divisor = 2 433 MHz (?) -0xf8000700 0x202 +0xf8000700 0x200 0xf8000704 0x202 0xf8000708 0x202 0xf800070c 0x202 @@ -8,11 +8,11 @@ 0xf8000718 0x202 0xf800071c 0x200 0xf8000720 0x202 -0xf8000724 0x202 -0xf8000728 0x202 -0xf800072c 0x202 -0xf8000730 0x202 -0xf8000734 0x202 +0xf8000724 0x200 +0xf8000728 0x200 +0xf800072c 0x200 +0xf8000730 0x200 +0xf8000734 0x200 0xf8000738 0x12e1 0xf800073c 0x12e0 0xf8000740 0x1200 @@ -58,4 +58,4 @@ 0xF800014C 0x00000621 // LQSPI_CLK_CTRL - ARMPLL/6 (200 MHz) 0xE000D000 0x800238C1 // QSPI config - divide-by-2 0xE000D038 0x00000020 // QSPI loopback - internal, 0 delay -0xE000D0A0 0xE2FF06EB // LQSPI_CFG - Quad read, dual flash +0xE000D0A0 0x82FF04EB // LQSPI_CFG - QIOREAD mode, Numonyx/Micron diff --git a/include/configs/topic_miami.h b/include/configs/topic_miami.h index f14c4ee..c32c63c 100644 --- a/include/configs/topic_miami.h +++ b/include/configs/topic_miami.h @@ -57,9 +57,12 @@ /* Setup proper boot sequences for Miami boards */
#if defined(CONFIG_USB) +# ifndef ENV_USB_RESET +# define ENV_USB_RESET "i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
"i2c mw 41 1 fe && i2c mw 41 1 ff"
+# endif # define EXTRA_ENV_USB \
- "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
"i2c mw 41 1 fe && i2c mw 41 1 ff\0" \
- "usbreset=" ENV_USB_RESET "\0" \ "usbboot=run usbreset && if usb start; then " \ "echo Booting from USB... && " \ "if load usb 0 0x1900000 ${bootscript}; then "\
diff --git a/include/configs/topic_miamilite.h b/include/configs/topic_miamilite.h new file mode 100644 index 0000000..7ec48d4 --- /dev/null +++ b/include/configs/topic_miamilite.h @@ -0,0 +1,11 @@ +/*
- (C) Copyright 2017 Topic Embedded Products
- Configuration for Miami Lite Zynq Evaluation and Development Board
- SPDX-License-Identifier: GPL-2.0+
- */
+/* USB reset is on GPIO signal instead of expander */ +#define ENV_USB_RESET "gpio clear 0 && gpio set 0" +#include "topic_miami.h"
I would prefer if you can use CONFIG_SYS_EXTRA_OPTIONS and do not create additional file just for this.
Just use any GPIO_USB_RESET or similar
#if !defined() expander #else gpio #endif
I was implementing this, but in README.kconfig it was stated that: ... Eventually CONFIG_SYS_EXTRA_OPTIONS will go away. CONFIG_SYS_EXTRA_OPTIONS should not be used for new boards...
I haven't yet been able to come up with a solution that doesn't require an extra header file.

On 18. 01. 19 9:34, Mike Looijmans wrote:
On 07-09-18 11:30, Michal Simek wrote:
On 24.8.2018 14:00, Mike Looijmans wrote:
To reduce board cost, the topic-miamilite board hardware was adapted. It now only has single QSPI NOR flash and a single DDR RAM chip. This reduces the memory interface to 16-bit and halves the available RAM and flash.
Signed-off-by: Mike Looijmans mike.looijmans@topic.nl
arch/arm/dts/zynq-topic-miamilite.dts | 7 ++++--- board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c | 14 +++++++------- board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt | 14 +++++++------- include/configs/topic_miami.h | 7 +++++-- include/configs/topic_miamilite.h | 11 +++++++++++ 5 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 include/configs/topic_miamilite.h
diff --git a/arch/arm/dts/zynq-topic-miamilite.dts b/arch/arm/dts/zynq-topic-miamilite.dts index 366fd5b..c06549c 100644 --- a/arch/arm/dts/zynq-topic-miamilite.dts +++ b/arch/arm/dts/zynq-topic-miamilite.dts @@ -9,8 +9,9 @@ / { model = "Topic Miami Lite Zynq Board"; compatible = "topic,miamilite", "xlnx,zynq-7000"; -};
-&qspi {
- is-dual = <1>;
- memory@0 {
device_type = "memory";
reg = <0x0 0x20000000>;
- }; };
diff --git a/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c b/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c index afec403..28670bd 100644 --- a/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c +++ b/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c @@ -59,7 +59,7 @@ static unsigned long ps7_clock_init_data_3_0[] = { };
static unsigned long ps7_ddr_init_data_3_0[] = {
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000080U),
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000084U), EMIT_MASKWRITE(0xF8006004, 0x0007FFFFU, 0x00001081U), EMIT_MASKWRITE(0xF8006008, 0x03FFFFFFU, 0x03C0780FU), EMIT_MASKWRITE(0xF800600C, 0x03FFFFFFU, 0x02001001U),
@@ -74,9 +74,9 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF8006030, 0xFFFFFFFFU, 0x00040930U), EMIT_MASKWRITE(0xF8006034, 0x13FF3FFFU, 0x000116D4U), EMIT_MASKWRITE(0xF8006038, 0x00000003U, 0x00000000U),
- EMIT_MASKWRITE(0xF800603C, 0x000FFFFFU, 0x00000777U),
- EMIT_MASKWRITE(0xF8006040, 0xFFFFFFFFU, 0xFFF00000U),
- EMIT_MASKWRITE(0xF8006044, 0x0FFFFFFFU, 0x0F666666U),
- EMIT_MASKWRITE(0xF800603C, 0x000FFFFFU, 0x00000666U),
- EMIT_MASKWRITE(0xF8006040, 0xFFFFFFFFU, 0xFFFF0000U),
- EMIT_MASKWRITE(0xF8006044, 0x0FFFFFFFU, 0x0F555555U), EMIT_MASKWRITE(0xF8006048, 0x0003F03FU, 0x0003C008U), EMIT_MASKWRITE(0xF8006050, 0xFF0F8FFFU, 0x77010800U), EMIT_MASKWRITE(0xF8006058, 0x00010000U, 0x00000000U),
@@ -102,8 +102,8 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF8006114, 0x000000FFU, 0x00000000U), EMIT_MASKWRITE(0xF8006118, 0x7FFFFFCFU, 0x40000001U), EMIT_MASKWRITE(0xF800611C, 0x7FFFFFCFU, 0x40000001U),
- EMIT_MASKWRITE(0xF8006120, 0x7FFFFFCFU, 0x40000001U),
- EMIT_MASKWRITE(0xF8006124, 0x7FFFFFCFU, 0x40000001U),
- EMIT_MASKWRITE(0xF8006120, 0x7FFFFFCFU, 0x40000000U),
- EMIT_MASKWRITE(0xF8006124, 0x7FFFFFCFU, 0x40000000U), EMIT_MASKWRITE(0xF800612C, 0x000FFFFFU, 0x0003482CU), EMIT_MASKWRITE(0xF8006130, 0x000FFFFFU, 0x00033032U), EMIT_MASKWRITE(0xF8006134, 0x000FFFFFU, 0x0002E81FU),
@@ -140,7 +140,7 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0xF80062B0, 0x003FFFFFU, 0x00005125U), EMIT_MASKWRITE(0xF80062B4, 0x0003FFFFU, 0x000012A8U), EMIT_MASKPOLL(0xF8000B74, 0x00002000U),
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000081U),
- EMIT_MASKWRITE(0xF8006000, 0x0001FFFFU, 0x00000085U), EMIT_MASKPOLL(0xF8006054, 0x00000007U), EMIT_EXIT(), };
diff --git a/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt b/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt index db6e642..08d5344 100644 --- a/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt +++ b/board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt @@ -1,5 +1,5 @@ 0xF8000120 0x1F000200 // ARM_CLK_CTRL - divisor = 2 433 MHz (?) -0xf8000700 0x202 +0xf8000700 0x200 0xf8000704 0x202 0xf8000708 0x202 0xf800070c 0x202 @@ -8,11 +8,11 @@ 0xf8000718 0x202 0xf800071c 0x200 0xf8000720 0x202 -0xf8000724 0x202 -0xf8000728 0x202 -0xf800072c 0x202 -0xf8000730 0x202 -0xf8000734 0x202 +0xf8000724 0x200 +0xf8000728 0x200 +0xf800072c 0x200 +0xf8000730 0x200 +0xf8000734 0x200 0xf8000738 0x12e1 0xf800073c 0x12e0 0xf8000740 0x1200 @@ -58,4 +58,4 @@ 0xF800014C 0x00000621 // LQSPI_CLK_CTRL - ARMPLL/6 (200 MHz) 0xE000D000 0x800238C1 // QSPI config - divide-by-2 0xE000D038 0x00000020 // QSPI loopback - internal, 0 delay -0xE000D0A0 0xE2FF06EB // LQSPI_CFG - Quad read, dual flash +0xE000D0A0 0x82FF04EB // LQSPI_CFG - QIOREAD mode, Numonyx/Micron diff --git a/include/configs/topic_miami.h b/include/configs/topic_miami.h index f14c4ee..c32c63c 100644 --- a/include/configs/topic_miami.h +++ b/include/configs/topic_miami.h @@ -57,9 +57,12 @@ /* Setup proper boot sequences for Miami boards */
#if defined(CONFIG_USB) +# ifndef ENV_USB_RESET +# define ENV_USB_RESET "i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
"i2c mw 41 1 fe && i2c mw 41 1 ff"
+# endif # define EXTRA_ENV_USB \
- "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\
"i2c mw 41 1 fe && i2c mw 41 1 ff\0" \
- "usbreset=" ENV_USB_RESET "\0" \ "usbboot=run usbreset && if usb start; then " \ "echo Booting from USB... && " \ "if load usb 0 0x1900000 ${bootscript}; then "\
diff --git a/include/configs/topic_miamilite.h b/include/configs/topic_miamilite.h new file mode 100644 index 0000000..7ec48d4 --- /dev/null +++ b/include/configs/topic_miamilite.h @@ -0,0 +1,11 @@ +/*
- (C) Copyright 2017 Topic Embedded Products
- Configuration for Miami Lite Zynq Evaluation and Development Board
- SPDX-License-Identifier: GPL-2.0+
- */
+/* USB reset is on GPIO signal instead of expander */ +#define ENV_USB_RESET "gpio clear 0 && gpio set 0" +#include "topic_miami.h"
I would prefer if you can use CONFIG_SYS_EXTRA_OPTIONS and do not create additional file just for this.
Just use any GPIO_USB_RESET or similar
#if !defined() expander #else gpio #endif
I was implementing this, but in README.kconfig it was stated that: ... Eventually CONFIG_SYS_EXTRA_OPTIONS will go away. CONFIG_SYS_EXTRA_OPTIONS should not be used for new boards...
I haven't yet been able to come up with a solution that doesn't require an extra header file.
right now you have an option to write a driver for it. Is it any i2c-gpio controller on the board for that?
Thanks, Michal

Use the same partitioning as the SD card by default. This allows to insert an SD card into a USB reader or use an USB drive with the same partitioning and boot using that instead of requiring a ramdisk image.
Signed-off-by: Mike Looijmans mike.looijmans@topic.nl --- include/configs/topic_miami.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/configs/topic_miami.h b/include/configs/topic_miami.h index c32c63c..6f8f2b4 100644 --- a/include/configs/topic_miami.h +++ b/include/configs/topic_miami.h @@ -63,15 +63,15 @@ # endif # define EXTRA_ENV_USB \ "usbreset=" ENV_USB_RESET "\0" \ - "usbboot=run usbreset && if usb start; then " \ + "usbboot=run usbreset; if usb start; then " \ "echo Booting from USB... && " \ "if load usb 0 0x1900000 ${bootscript}; then "\ "source 0x1900000; fi; " \ - "load usb 0 ${kernel_addr} ${kernel_image} && " \ - "load usb 0 ${devicetree_addr} ${devicetree_image} && " \ - "load usb 0 ${ramdisk_load_address} ${ramdisk_image} && " \ - "bootm ${kernel_addr} ${ramdisk_load_address} "\ - "${devicetree_addr}; " \ + "setenv bootargs console=ttyPS0,115200 " \ + "root=/dev/sda2 rw rootfstype=ext4 rootwait quiet; " \ + "load usb 0 ${kernel_addr} ${kernel_image}&& " \ + "load usb 0 ${devicetree_addr} ${devicetree_image}&& " \ + "bootm ${kernel_addr} - ${devicetree_addr}; " \ "fi\0" /* Note that addresses here should match the addresses in the env */ # undef DFU_ALT_INFO

On 24.8.2018 14:00, Mike Looijmans wrote:
Use the same partitioning as the SD card by default. This allows to insert an SD card into a USB reader or use an USB drive with the same partitioning and boot using that instead of requiring a ramdisk image.
Signed-off-by: Mike Looijmans mike.looijmans@topic.nl
include/configs/topic_miami.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/configs/topic_miami.h b/include/configs/topic_miami.h index c32c63c..6f8f2b4 100644 --- a/include/configs/topic_miami.h +++ b/include/configs/topic_miami.h @@ -63,15 +63,15 @@ # endif # define EXTRA_ENV_USB \ "usbreset=" ENV_USB_RESET "\0" \
- "usbboot=run usbreset && if usb start; then " \
- "usbboot=run usbreset; if usb start; then " \ "echo Booting from USB... && " \ "if load usb 0 0x1900000 ${bootscript}; then "\ "source 0x1900000; fi; " \
"load usb 0 ${kernel_addr} ${kernel_image} && " \
"load usb 0 ${devicetree_addr} ${devicetree_image} && " \
"load usb 0 ${ramdisk_load_address} ${ramdisk_image} && " \
"bootm ${kernel_addr} ${ramdisk_load_address} "\
"${devicetree_addr}; " \
"setenv bootargs console=ttyPS0,115200 " \
"root=/dev/sda2 rw rootfstype=ext4 rootwait quiet; " \
"load usb 0 ${kernel_addr} ${kernel_image}&& " \
"load usb 0 ${devicetree_addr} ${devicetree_image}&& " \
"fi\0" /* Note that addresses here should match the addresses in the env */"bootm ${kernel_addr} - ${devicetree_addr}; " \
# undef DFU_ALT_INFO
This is fine. M

The miamiplus can use GEM0 through MIO pins, which requires a 125 MHz TX clock to be generated. With the IO PLL at 1200 MHz this isn't possible, so change it to run at 1000 and adjust the divisors accordingly. Also set the GEM0 clock source to MIO instead of EMIO.
Signed-off-by: Mike Looijmans mike.looijmans@topic.nl --- .../topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c | 30 ++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c b/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c index fd5846a..d90a350 100644 --- a/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c +++ b/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c @@ -24,8 +24,8 @@ static unsigned long ps7_pll_init_data_3_0[] = { EMIT_MASKPOLL(0XF800010C, 0x00000002U), EMIT_MASKWRITE(0XF8000104, 0x00000010U, 0x00000000U), EMIT_MASKWRITE(0XF8000124, 0xFFF00003U, 0x0C200003U), - EMIT_MASKWRITE(0XF8000118, 0x003FFFF0U, 0x00113220U), - EMIT_MASKWRITE(0XF8000108, 0x0007F000U, 0x00024000U), + EMIT_MASKWRITE(0XF8000118, 0x003FFFF0U, 0x001452C0U), + EMIT_MASKWRITE(0XF8000108, 0x0007F000U, 0x0001E000U), EMIT_MASKWRITE(0XF8000108, 0x00000010U, 0x00000010U), EMIT_MASKWRITE(0XF8000108, 0x00000001U, 0x00000001U), EMIT_MASKWRITE(0XF8000108, 0x00000001U, 0x00000000U), @@ -37,20 +37,18 @@ static unsigned long ps7_pll_init_data_3_0[] = {
static unsigned long ps7_clock_init_data_3_0[] = { EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU, 0x0000DF0DU), - EMIT_MASKWRITE(0XF8000128, 0x03F03F01U, 0x00302301U), - EMIT_MASKWRITE(0XF8000138, 0x00000011U, 0x00000011U), + EMIT_MASKWRITE(0XF8000128, 0x03F03F01U, 0x00700F01U), + EMIT_MASKWRITE(0XF8000138, 0x00000011U, 0x00000001U), EMIT_MASKWRITE(0XF800013C, 0x00000011U, 0x00000011U), - EMIT_MASKWRITE(0XF8000140, 0x03F03F71U, 0x00100141U), - EMIT_MASKWRITE(0XF8000144, 0x03F03F71U, 0x00100141U), - EMIT_MASKWRITE(0XF8000148, 0x00003F31U, 0x00000C01U), - EMIT_MASKWRITE(0XF800014C, 0x00003F31U, 0x00000601U), - EMIT_MASKWRITE(0XF8000150, 0x00003F33U, 0x00001803U), - EMIT_MASKWRITE(0XF8000154, 0x00003F33U, 0x00000C03U), - EMIT_MASKWRITE(0XF8000158, 0x00003F33U, 0x00000601U), - EMIT_MASKWRITE(0XF8000168, 0x00003F31U, 0x00000601U), - EMIT_MASKWRITE(0XF8000170, 0x03F03F30U, 0x00100C00U), - EMIT_MASKWRITE(0XF8000180, 0x03F03F30U, 0x00100C00U), - EMIT_MASKWRITE(0XF8000190, 0x03F03F30U, 0x00100600U), + EMIT_MASKWRITE(0XF8000140, 0x03F03F71U, 0x00100801U), + EMIT_MASKWRITE(0XF800014C, 0x00003F31U, 0x00000501U), + EMIT_MASKWRITE(0XF8000150, 0x00003F33U, 0x00000A01U), + EMIT_MASKWRITE(0XF8000154, 0x00003F33U, 0x00000A03U), + EMIT_MASKWRITE(0XF8000158, 0x00003F33U, 0x00000501U), + EMIT_MASKWRITE(0XF8000168, 0x00003F31U, 0x00000501U), + EMIT_MASKWRITE(0XF8000170, 0x03F03F30U, 0x00200500U), + EMIT_MASKWRITE(0XF8000180, 0x03F03F30U, 0x00100700U), + EMIT_MASKWRITE(0XF8000190, 0x03F03F30U, 0x00100500U), EMIT_MASKWRITE(0XF80001A0, 0x03F03F30U, 0x00101800U), EMIT_MASKWRITE(0XF80001C4, 0x00000001U, 0x00000001U), EMIT_MASKWRITE(0XF800012C, 0x01FFCCCDU, 0x01FC4C4DU), @@ -88,7 +86,7 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0XF8006078, 0x03FFFFFFU, 0x00466111U), EMIT_MASKWRITE(0XF800607C, 0x000FFFFFU, 0x00032222U), EMIT_MASKWRITE(0XF80060A4, 0xFFFFFFFFU, 0x10200802U), - EMIT_MASKWRITE(0XF80060A8, 0x0FFFFFFFU, 0x0690CB73U), + EMIT_MASKWRITE(0XF80060A8, 0x0FFFFFFFU, 0x0690CB52U), EMIT_MASKWRITE(0XF80060AC, 0x000001FFU, 0x000001FEU), EMIT_MASKWRITE(0XF80060B0, 0x1FFFFFFFU, 0x1CFFFFFFU), EMIT_MASKWRITE(0XF80060B4, 0x00000200U, 0x00000200U),

On 24.8.2018 14:00, Mike Looijmans wrote:
The miamiplus can use GEM0 through MIO pins, which requires a 125 MHz TX clock to be generated. With the IO PLL at 1200 MHz this isn't possible, so change it to run at 1000 and adjust the divisors accordingly. Also set the GEM0 clock source to MIO instead of EMIO.
Signed-off-by: Mike Looijmans mike.looijmans@topic.nl
.../topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c | 30 ++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c b/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c index fd5846a..d90a350 100644 --- a/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c +++ b/board/topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c @@ -24,8 +24,8 @@ static unsigned long ps7_pll_init_data_3_0[] = { EMIT_MASKPOLL(0XF800010C, 0x00000002U), EMIT_MASKWRITE(0XF8000104, 0x00000010U, 0x00000000U), EMIT_MASKWRITE(0XF8000124, 0xFFF00003U, 0x0C200003U),
- EMIT_MASKWRITE(0XF8000118, 0x003FFFF0U, 0x00113220U),
- EMIT_MASKWRITE(0XF8000108, 0x0007F000U, 0x00024000U),
- EMIT_MASKWRITE(0XF8000118, 0x003FFFF0U, 0x001452C0U),
- EMIT_MASKWRITE(0XF8000108, 0x0007F000U, 0x0001E000U), EMIT_MASKWRITE(0XF8000108, 0x00000010U, 0x00000010U), EMIT_MASKWRITE(0XF8000108, 0x00000001U, 0x00000001U), EMIT_MASKWRITE(0XF8000108, 0x00000001U, 0x00000000U),
@@ -37,20 +37,18 @@ static unsigned long ps7_pll_init_data_3_0[] = {
static unsigned long ps7_clock_init_data_3_0[] = { EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU, 0x0000DF0DU),
- EMIT_MASKWRITE(0XF8000128, 0x03F03F01U, 0x00302301U),
- EMIT_MASKWRITE(0XF8000138, 0x00000011U, 0x00000011U),
- EMIT_MASKWRITE(0XF8000128, 0x03F03F01U, 0x00700F01U),
- EMIT_MASKWRITE(0XF8000138, 0x00000011U, 0x00000001U), EMIT_MASKWRITE(0XF800013C, 0x00000011U, 0x00000011U),
- EMIT_MASKWRITE(0XF8000140, 0x03F03F71U, 0x00100141U),
- EMIT_MASKWRITE(0XF8000144, 0x03F03F71U, 0x00100141U),
- EMIT_MASKWRITE(0XF8000148, 0x00003F31U, 0x00000C01U),
- EMIT_MASKWRITE(0XF800014C, 0x00003F31U, 0x00000601U),
- EMIT_MASKWRITE(0XF8000150, 0x00003F33U, 0x00001803U),
- EMIT_MASKWRITE(0XF8000154, 0x00003F33U, 0x00000C03U),
- EMIT_MASKWRITE(0XF8000158, 0x00003F33U, 0x00000601U),
- EMIT_MASKWRITE(0XF8000168, 0x00003F31U, 0x00000601U),
- EMIT_MASKWRITE(0XF8000170, 0x03F03F30U, 0x00100C00U),
- EMIT_MASKWRITE(0XF8000180, 0x03F03F30U, 0x00100C00U),
- EMIT_MASKWRITE(0XF8000190, 0x03F03F30U, 0x00100600U),
- EMIT_MASKWRITE(0XF8000140, 0x03F03F71U, 0x00100801U),
- EMIT_MASKWRITE(0XF800014C, 0x00003F31U, 0x00000501U),
- EMIT_MASKWRITE(0XF8000150, 0x00003F33U, 0x00000A01U),
- EMIT_MASKWRITE(0XF8000154, 0x00003F33U, 0x00000A03U),
- EMIT_MASKWRITE(0XF8000158, 0x00003F33U, 0x00000501U),
- EMIT_MASKWRITE(0XF8000168, 0x00003F31U, 0x00000501U),
- EMIT_MASKWRITE(0XF8000170, 0x03F03F30U, 0x00200500U),
- EMIT_MASKWRITE(0XF8000180, 0x03F03F30U, 0x00100700U),
- EMIT_MASKWRITE(0XF8000190, 0x03F03F30U, 0x00100500U), EMIT_MASKWRITE(0XF80001A0, 0x03F03F30U, 0x00101800U), EMIT_MASKWRITE(0XF80001C4, 0x00000001U, 0x00000001U), EMIT_MASKWRITE(0XF800012C, 0x01FFCCCDU, 0x01FC4C4DU),
@@ -88,7 +86,7 @@ static unsigned long ps7_ddr_init_data_3_0[] = { EMIT_MASKWRITE(0XF8006078, 0x03FFFFFFU, 0x00466111U), EMIT_MASKWRITE(0XF800607C, 0x000FFFFFU, 0x00032222U), EMIT_MASKWRITE(0XF80060A4, 0xFFFFFFFFU, 0x10200802U),
- EMIT_MASKWRITE(0XF80060A8, 0x0FFFFFFFU, 0x0690CB73U),
- EMIT_MASKWRITE(0XF80060A8, 0x0FFFFFFFU, 0x0690CB52U), EMIT_MASKWRITE(0XF80060AC, 0x000001FFU, 0x000001FEU), EMIT_MASKWRITE(0XF80060B0, 0x1FFFFFFFU, 0x1CFFFFFFU), EMIT_MASKWRITE(0XF80060B4, 0x00000200U, 0x00000200U),
also good.
M
participants (3)
-
Michal Simek
-
Michal Simek
-
Mike Looijmans