Allwinner H6 support (w/ SPL)
Subsystems (7)
v2 cover Allwinner H6 support (w/ SPL)
This patchset trys to add support for Allwinner H6 SoC to U-Boot.
Allwinner H6 is a quite new Allwinner SoC, with several parts changed a lot (memory map, DRAM controller, CCU, so on). The position which SPL will be loaded (SRAM A1) also changed to 0x20000.
The Pine H64 board support comes with this patchset, as this is the first H6 board that I can get (being early bird).
Icenowy Zheng (13):
sunxi: change SUNXI_HIGH_SRAM option to SUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at 0x20000 on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 board
arch/arm/dts/Makefile | 2 + arch/arm/dts/sun50i-h6-pine-h64.dts | 185 +++++ arch/arm/dts/sun50i-h6.dtsi | 288 +++++++ arch/arm/include/asm/arch-sunxi/boot0.h | 4 + arch/arm/include/asm/arch-sunxi/clock.h | 2 + .../include/asm/arch-sunxi/clock_sun50i_h6.h | 320 ++++++++ arch/arm/include/asm/arch-sunxi/cpu.h | 2 + .../include/asm/arch-sunxi/cpu_sun50i_h6.h | 73 ++ arch/arm/include/asm/arch-sunxi/dram.h | 2 + .../include/asm/arch-sunxi/dram_sun50i_h6.h | 297 +++++++ arch/arm/include/asm/arch-sunxi/gpio.h | 1 + arch/arm/include/asm/arch-sunxi/mmc.h | 2 +- arch/arm/include/asm/arch-sunxi/spl.h | 6 +- arch/arm/include/asm/arch-sunxi/timer.h | 2 +- arch/arm/mach-sunxi/Kconfig | 37 +- arch/arm/mach-sunxi/Makefile | 2 + arch/arm/mach-sunxi/board.c | 6 +- arch/arm/mach-sunxi/clock_sun50i_h6.c | 94 +++ arch/arm/mach-sunxi/cpu_info.c | 2 + arch/arm/mach-sunxi/dram_sun50i_h6.c | 754 ++++++++++++++++++ arch/arm/mach-sunxi/rmr_switch.S | 6 + board/sunxi/MAINTAINERS | 5 + board/sunxi/board.c | 7 + board/sunxi/mksunxi_fit_atf.sh | 10 +- common/spl/Kconfig | 2 +- configs/pine_h64_defconfig | 15 + drivers/mmc/sunxi_mmc.c | 13 +- include/configs/sun50i.h | 5 + include/configs/sunxi-common.h | 24 +- include/dt-bindings/clock/sun50i-h6-ccu.h | 125 +++ include/dt-bindings/clock/sun50i-h6-r-ccu.h | 24 + include/dt-bindings/reset/sun50i-h6-ccu.h | 73 ++ include/dt-bindings/reset/sun50i-h6-r-ccu.h | 17 + 33 files changed, 2377 insertions(+), 30 deletions(-) create mode 100644 arch/arm/dts/sun50i-h6-pine-h64.dts create mode 100644 arch/arm/dts/sun50i-h6.dtsi create mode 100644 arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h create mode 100644 arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h create mode 100644 arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h create mode 100644 arch/arm/mach-sunxi/clock_sun50i_h6.c create mode 100644 arch/arm/mach-sunxi/dram_sun50i_h6.c create mode 100644 configs/pine_h64_defconfig create mode 100644 include/dt-bindings/clock/sun50i-h6-ccu.h create mode 100644 include/dt-bindings/clock/sun50i-h6-r-ccu.h create mode 100644 include/dt-bindings/reset/sun50i-h6-ccu.h create mode 100644 include/dt-bindings/reset/sun50i-h6-r-ccu.h
Signature · 1 line
2.17.1
PATCH v2 1/13 sunxi: change SUNXI_HIGH_SRAM option to SUNXI_SRAM_ADDRESS
The new Allwinner H6 SoC has its SRAM A1 at neither 0x0 nor 0x10000, but it's at 0x20000. Thus the SUNXI_HIGH_SRAM option needs to be refactored to support this new configuration.
Change it to SUNXI_SRAM_ADDRESS, which holds the real address of SRAM A1 in the memory map.
---
Changes in v2:
- Added Maxime's Acked-by and Andre's Reviewed-by tags.
arch/arm/include/asm/arch-sunxi/spl.h | 6 +----- arch/arm/mach-sunxi/Kconfig | 14 +++++--------- include/configs/sunxi-common.h | 19 +++++++++++-------- 3 files changed, 17 insertions(+), 22 deletions(-)
arch/arm/include/asm/arch-sunxi/spl.h +1 -5
@@ -11,11 +11,7 @@#define SPL_SIGNATURE "SPL"/* marks "sunxi" SPL header */ #define SPL_HEADER_VERSION 2 -#ifdef CONFIG_SUNXI_HIGH_SRAM -#define SPL_ADDR 0x10000 -#else -#define SPL_ADDR 0x0 -#endif +#define SPL_ADDR CONFIG_SUNXI_SRAM_ADDRESS/* The low 8-bits of the 'boot_media' field in the SPL header */ #define SUNXI_BOOTED_FROM_MMC0 0
arch/arm/mach-sunxi/Kconfig +5 -9
@@ -73,16 +73,15 @@ config SUN8I_RSB with various RSB based devices, such as AXP223, AXP8XX PMICs, and AC100/AC200 ICs. -config SUNXI_HIGH_SRAM - bool - default n +config SUNXI_SRAM_ADDRESS + hex + default 0x10000 if MACH_SUN9I || MACH_SUN50I || MACH_SUN50I_H5 + default 0x0 ---help--- Older Allwinner SoCs have their mask boot ROM mapped just below 4GB, with the first SRAM region being located at address 0. Some newer SoCs map the boot ROM at address 0 instead and move the - SRAM to 64KB, just behind the mask ROM. - Chips using the latter setup are supposed to select this option to - adjust the addresses accordingly. + SRAM to a different address. config SUNXI_A64_TIMER_ERRATUM bool
@@ -257,7 +256,6 @@ config MACH_SUN9I select CPU_V7A select DRAM_SUN9I select SUN6I_PRCM - select SUNXI_HIGH_SRAM select SUNXI_GEN_SUN6I select SUN8I_RSB select SUPPORT_SPL
@@ -269,7 +267,6 @@ config MACH_SUN50I select PHY_SUN4I_USB select SUNXI_DE2 select SUNXI_GEN_SUN6I - select SUNXI_HIGH_SRAM select SUPPORT_SPL select SUNXI_DRAM_DW select SUNXI_DRAM_DW_32BIT
@@ -281,7 +278,6 @@ config MACH_SUN50I_H5 bool "sun50i (Allwinner H5)" select ARM64 select MACH_SUNXI_H3_H5 - select SUNXI_HIGH_SRAM select FIT select SPL_LOAD_FIT
include/configs/sunxi-common.h +11 -8
@@ -82,20 +82,19 @@#define CONFIG_SPL_BSS_MAX_SIZE 0x00080000/* 512 KiB */ -#ifdef CONFIG_SUNXI_HIGH_SRAM /* * The A80's A1 sram starts at 0x00010000 rather then at 0x00000000 and is * slightly bigger. Note that it is possible to map the first 32 KiB of the * A1 at 0x00000000 like with older SoCs by writing 0x16aa0001 to the * undocumented 0x008000e0 SYS_CTRL register. Where the 16aa is a key and * the 1 actually activates the mapping of the first 32 KiB to 0x00000000. +* A64 and H5 also has SRAM A1 at 0x00010000, but no magic remap register +* is known yet. +* H6 has SRAM A1 at 0x00020000. */ -#define CONFIG_SYS_INIT_RAM_ADDR 0x10000 -#define CONFIG_SYS_INIT_RAM_SIZE 0x08000/* FIXME: 40 KiB ? */ -#else -#define CONFIG_SYS_INIT_RAM_ADDR 0x0 -#define CONFIG_SYS_INIT_RAM_SIZE 0x8000/* 32 KiB */ -#endif +#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SUNXI_SRAM_ADDRESS +/* FIXME: this may be larger on some SoCs */ +#define CONFIG_SYS_INIT_RAM_SIZE 0x8000/* 32 KiB */ #define CONFIG_SYS_INIT_SP_OFFSET \ (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
@@ -187,7 +186,11 @@#define CONFIG_SPL_BOARD_LOAD_IMAGE #endif -#ifdef CONFIG_SUNXI_HIGH_SRAM +/* +* We cannot use expressions here, because expressions won't be evaluated in +* autoconf.mk. +*/ +#if CONFIG_SUNXI_SRAM_ADDRESS ==0x10000 #define CONFIG_SPL_TEXT_BASE 0x10060/* sram start+header */ #define CONFIG_SPL_MAX_SIZE 0x7fa0/* 32 KiB */ #ifdef CONFIG_ARM64
Signature · 1 line
2.17.1
PATCH v2 2/13 sunxi: add basic memory map definitions of H6 SoC
In reply to Icenowy ZhengThe Allwinner H6 SoC come with a totally new memory map.
Add basical definition of the new memory map into a header file, and let the cpu.h header include it in the situation of H6.
---
Changes in v2:
- Change SRAM A1 address to CONFIG_SUNXI_SRAM_ADDRESS.
- Added Andre's Reviewed-by tag.
arch/arm/include/asm/arch-sunxi/cpu.h | 2 + .../include/asm/arch-sunxi/cpu_sun50i_h6.h | 73 +++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h
arch/arm/include/asm/arch-sunxi/cpu.h +2 -0
@@ -8,6 +8,8 @@#if defined(CONFIG_MACH_SUN9I )#include <asm/arch/cpu_sun9i.h> +#elif defined(CONFIG_MACH_SUN50I_H6 ) +#include <asm/arch/cpu_sun50i_h6.h> #else #include <asm/arch/cpu_sun4i.h> #endif
arch/arm/include/asm/arch-sunxi/cpu_sun50i_h6.h new file +73 -0
73 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v2 2/13 sunxi: add basic memory map definitions of H6 SoC
Quoted 7 lines · Icenowy Zheng
The Allwinner H6 SoC come with a totally new memory map.
Add basical definition of the new memory map into a header file, and let the
cpu.hheader include it in the situation of H6.Signed-off-by Icenowy Zheng <[email protected]>Reviewed-by Andre Przywara <[email protected]>
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/2fa90bad/attachment.sig>
PATCH v2 3/13 sunxi: change RMR64's RVBAR address for H6
In reply to Icenowy ZhengAllwinner H6 has a different RVBAR address with A64/H5.
Add conditional RVBAR configuration into the code which does RMR switch.
---
Changes in v2:
- Added Andre's Reviewed-by tag.
arch/arm/include/asm/arch-sunxi/boot0.h | 4 ++++ arch/arm/mach-sunxi/rmr_switch.S | 6 ++++++ 2 files changed, 10 insertions(+)
arch/arm/include/asm/arch-sunxi/boot0.h +4 -0
@@ -26,7 +26,11 @@ .word 0xf57ff06f // isb sy .word 0xe320f003 // wfi .word 0xeafffffd // b @wfi +#ifndef CONFIG_MACH_SUN50I_H6 .word 0x017000a0 // writeable RVBAR mapping address +#else + .word 0x09010040 // writeable RVBAR mapping address +#endif#ifdef CONFIG_SPL_BUILD .word CONFIG_SPL_TEXT_BASE#else
arch/arm/mach-sunxi/rmr_switch.S +6 -0
@@ -26,9 +26,15 @@ @ reference and to be able to regenerate a (probably fixed) version of this @ code found in encoded form in boot0.h. +#include <config.h> + .text +#ifndef CONFIG_MACH_SUN50I_H6 ldr r1, =0x017000a0 @ MMIO mapped RVBAR[0] register +#else + ldr r1, =0x09010040 @ MMIO mapped RVBAR[0] register +#endif ldr r0, =0x57aA7add @ start address, to be replaced str r0, [r1] dsb sy
Signature · 1 line
2.17.1
PATCH v2 3/13 sunxi: change RMR64's RVBAR address for H6
Quoted 6 lines · Icenowy Zheng
Allwinner H6 has a different RVBAR address with A64/H5.
Add conditional RVBAR configuration into the code which does RMR switch.
Signed-off-by Icenowy Zheng <[email protected]>Reviewed-by Andre Przywara <[email protected]>
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/7b60c3a9/attachment.sig>
PATCH v2 4/13 sunxi: change ATF position for H6
In reply to Icenowy ZhengH6 has different SRAM A2 address, so the ATF load address is also different.
Add judgment code to sunxi 64-bit FIT generation script. It will judge the SoC by the device tree's name.
---
Changes in v2:
- Use CONFIG_MACH_SUN50I_H6 rather than DT prefix to judge H6.
board/sunxi/mksunxi_fit_atf.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
board/sunxi/mksunxi_fit_atf.sh +8 -2
@@ -13,6 +13,12 @@ if [ ! -f $BL31 ]; then BL31=/dev/null fi +if grep -q "^CONFIG_MACH_SUN50I_H6=y" .config; then + BL31_ADDR=0x104000 +else + BL31_ADDR=0x44000 +fi + cat << __HEADER_EOF /dts-v1/;
@@ -35,8 +41,8 @@ cat << __HEADER_EOF type = "firmware"; arch = "arm64"; compression = "none"; - load = <0x44000>; - entry = <0x44000>; + load = <$BL31_ADDR>; + entry = <$BL31_ADDR>; }; __HEADER_EOF
Signature · 1 line
2.17.1
PATCH v2 4/13 sunxi: change ATF position for H6
Hi,
Quoted 5 lines · Icenowy Zheng
H6 has different SRAM A2 address, so the ATF load address is also different.
Add judgment code to sunxi 64-bit FIT generation script. It will judge the SoC by the device tree's name.
This might need to become more flexible in the future, where the ATF might need to reside somewhere else, even for the existing SoCs, but it's good enough for now.
Thanks,
Andre.
Quoted 37 lines
Signed-off-by Icenowy Zheng <[email protected]>---
Changes in v2:
- UseCONFIG_MACH_SUN50I_H6rather than DT prefix to judge H6.board/sunxi/mksunxi_fit_atf.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)board/sunxi/mksunxi_fit_atf.sh +8
-2@@ -13,6 +13,12 @@ if [ ! -f $BL31 ]; then BL31=/dev/null fi +if grep -q "^CONFIG_MACH_SUN50I_H6=y" .config; then + BL31_ADDR=0x104000 +else + BL31_ADDR=0x44000 +fi + cat << __HEADER_EOF /dts-v1/;@@ -35,8 +41,8 @@ cat << __HEADER_EOF type = "firmware"; arch = "arm64"; compression = "none"; - load = <0x44000>; - entry = <0x44000>; + load = <$BL31_ADDR>; + entry = <$BL31_ADDR>; }; __HEADER_EOF
PATCH v2 4/13 sunxi: change ATF position for H6
In reply to Icenowy ZhengQuoted 7 lines · Icenowy Zheng
H6 has different SRAM A2 address, so the ATF load address is also different.
Add judgment code to sunxi 64-bit FIT generation script. It will judge the SoC by the device tree's name.
Signed-off-by Icenowy Zheng <[email protected]>
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/94786c72/attachment.sig>
PATCH v2 5/13 sunxi: add config for SPL at 0x20000 on H6
In reply to Icenowy ZhengOn the new Allwinner H6 SoC, the SRAM A2 address (SPL load address) is at 0x20000, which is different with any old Allwinner SoCs.
Add SPL position and size configuration for this.
---
Changes in v2:
- Added Andre's Reviewed-by tag.
include/configs/sunxi-common.h | 5 +++++ 1 file changed, 5 insertions(+)
include/configs/sunxi-common.h +5 -0
@@ -199,6 +199,11 @@#else #define LOW_LEVEL_SRAM_STACK 0x00018000#endif /* !CONFIG_ARM64 */ +#elif CONFIG_SUNXI_SRAM_ADDRESS == 0x20000 +#define CONFIG_SPL_TEXT_BASE 0x20060/* sram start+header */ +#define CONFIG_SPL_MAX_SIZE 0x7fa0/* 32 KiB */ +/* end of SRAM A2 on H6 for now */ +#define LOW_LEVEL_SRAM_STACK 0x00118000#else #define CONFIG_SPL_TEXT_BASE 0x60/* sram start+header */ #define CONFIG_SPL_MAX_SIZE 0x5fa0/* 24KB on sun4i/sun7i */
Signature · 1 line
2.17.1
PATCH v2 5/13 sunxi: add config for SPL at 0x20000 on H6
Quoted 19 lines · Icenowy Zheng
On the new Allwinner H6 SoC, the SRAM A2 address (SPL load address) is at
0x20000, which is different with any old Allwinner SoCs.Add SPL position and size configuration for this.
Signed-off-by Icenowy Zheng <[email protected]>Reviewed-by Andre Przywara <[email protected]>---
Changes in v2:
- Added Andre's Reviewed-by tag.include/configs/sunxi-common.h | 5 +++++ 1 file changed, 5 insertions(+)include/configs/sunxi-common.h +0
-0
include/configs/sunxi-common.h line 206
Quoted 8 lines
include/configs/sunxi-common.h +5
-0@@ -199,6 +199,11 @@#else #define LOW_LEVEL_SRAM_STACK 0x00018000#endif /* !CONFIG_ARM64 */ +#elif CONFIG_SUNXI_SRAM_ADDRESS == 0x20000 +#define CONFIG_SPL_TEXT_BASE 0x20060/* sram start+header */ +#define CONFIG_SPL_MAX_SIZE 0x7fa0/* 32 KiB */ +/* end of SRAM A2 on H6 for now */ +#define LOW_LEVEL_SRAM_STACK 0x00118000
Can't we move those options to Kconfig, and deal with those changes there instead?
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/2c2dc414/attachment.sig>
PATCH v2 5/13 sunxi: add config for SPL at 0x20000 on H6
于 2018年7月24日 GMT+08:00 下午4:34:52, Maxime Ripard <[email protected]> 写到:
Quoted 18 lines · Icenowy Zheng
Quoted 1 line
On the new Allwinner H6 SoC, the SRAM A2 address (SPL load address)
is
Quoted 6 lines
at
0x20000, which is different with any old Allwinner SoCs.Add SPL position and size configuration for this.
Signed-off-by Icenowy Zheng <[email protected]>Reviewed-by Andre Przywara <[email protected]>Review
Quoted 8 lines
---
Changes in v2:
- Added Andre's Reviewed-by tag.include/configs/sunxi-common.h | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/include/configs/sunxi-common.h
Quoted 15 lines
include/configs/sunxi-common.h line 206
Quoted 12 lines
index
1b5daa8928..4db770d69d100644include/configs/sunxi-common.h +5
-0@@ -199,6 +199,11 @@#else #define LOW_LEVEL_SRAM_STACK 0x00018000#endif /* !CONFIG_ARM64 */ +#elif CONFIG_SUNXI_SRAM_ADDRESS == 0x20000 +#define CONFIG_SPL_TEXT_BASE 0x20060/* sram start+header */ +#define CONFIG_SPL_MAX_SIZE 0x7fa0/* 32 KiB */ +/* end of SRAM A2 on H6 for now */ +#define LOW_LEVEL_SRAM_STACK 0x00118000Can't we move those options to
Kconfig, and deal with those changes there instead?
It's possible, but not any cleaner.
It will still be a hugh set of default xxx if xxx.
Quoted 2 lines
Maxime
[U-Boot] [linux-sunxi] Re: [PATCH v2 05/13] sunxi: add config for SPL at 0x20000 on H6
Quoted 37 lines · Icenowy Zheng
于 2018年7月24日 GMT+08:00 下午4:34:52, Maxime Ripard <[email protected]> 写到:
Quoted 18 lines · Icenowy Zheng
Quoted 1 line
On the new Allwinner H6 SoC, the SRAM A2 address (SPL load address)
is
Quoted 6 lines
at
0x20000, which is different with any old Allwinner SoCs.Add SPL position and size configuration for this.
Signed-off-by Icenowy Zheng <[email protected]>Reviewed-by Andre Przywara <[email protected]>Review
Quoted 8 lines
---
Changes in v2:
- Added Andre's Reviewed-by tag.include/configs/sunxi-common.h | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/include/configs/sunxi-common.hQuoted 15 lines
include/configs/sunxi-common.h line 206
Quoted 12 lines
index
1b5daa8928..4db770d69d100644include/configs/sunxi-common.h +5
-0@@ -199,6 +199,11 @@#else #define LOW_LEVEL_SRAM_STACK 0x00018000#endif /* !CONFIG_ARM64 */ +#elif CONFIG_SUNXI_SRAM_ADDRESS == 0x20000 +#define CONFIG_SPL_TEXT_BASE 0x20060/* sram start+header */ +#define CONFIG_SPL_MAX_SIZE 0x7fa0/* 32 KiB */ +/* end of SRAM A2 on H6 for now */ +#define LOW_LEVEL_SRAM_STACK 0x00118000Can't we move those options to
Kconfig, and deal with those changes there instead?
Quoted 3 lines
It's possible, but not any cleaner.
It will still be a hugh set of default xxx if xxx.
It's fine. we can do it. LOW_LEVEL_SRAM_STACK doesn't seem like CONFIG item so moving them to kconfig and assugn to SPL_STACK would be better.
PATCH v2 6/13 sunxi: change GIC address on H6
In reply to Icenowy ZhengAs the Allwinner H6 chip has a new memory map, its GIC MMIO address is thus different.
Change the address on H6.
---
Changes in v2:
- Added Andre's Reviewed-by tag.
include/configs/sun50i.h | 5 +++++ 1 file changed, 5 insertions(+)
include/configs/sun50i.h +5 -0
@@ -17,8 +17,13 @@#define CONFIG_SUNXI_USB_PHYS 1 +#ifndef CONFIG_MACH_SUN50I_H6 #define GICD_BASE 0x1c81000#define GICC_BASE 0x1c82000 +#else +#define GICD_BASE 0x3021000 +#define GICC_BASE 0x3022000 +#endif /* * Include common sunxi configuration where most the settings are
Signature · 1 line
2.17.1
PATCH v2 6/13 sunxi: change GIC address on H6
Quoted 7 lines · Icenowy Zheng
As the Allwinner H6 chip has a new memory map, its GIC MMIO address is thus different.
Change the address on H6.
Signed-off-by Icenowy Zheng <[email protected]>Reviewed-by Andre Przywara <[email protected]>
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/c895bc03/attachment.sig>
PATCH v2 7/13 sunxi: add clock code for H6
In reply to Icenowy ZhengThe new Allwinner H6 SoC has a brand new CCU layout.
Add clock code for it.
---
Changes in v2:
- Move the /4 divider in clk_get_pll6() to prevent possible overflow.
arch/arm/include/asm/arch-sunxi/clock.h | 2 + .../include/asm/arch-sunxi/clock_sun50i_h6.h | 320 ++++++++++++++++++ arch/arm/mach-sunxi/Makefile | 1 + arch/arm/mach-sunxi/clock_sun50i_h6.c | 94 +++++ 4 files changed, 417 insertions(+) create mode 100644 arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h create mode 100644 arch/arm/mach-sunxi/clock_sun50i_h6.c
arch/arm/include/asm/arch-sunxi/clock.h +2 -0
@@ -16,6 +16,8 @@/* clock control module regs definition */ #if defined(CONFIG_MACH_SUN8I_A83T )#include <asm/arch/clock_sun8i_a83t.h> +#elif defined(CONFIG_MACH_SUN50I_H6 ) +#include <asm/arch/clock_sun50i_h6.h> #elif defined(CONFIG_MACH_SUN6I ) || defined(CONFIG_MACH_SUN8I ) || \ defined(CONFIG_MACH_SUN50I )#include <asm/arch/clock_sun6i.h>
arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h new file +320 -0
320 lines not on this page · raw message
arch/arm/mach-sunxi/Makefile +1 -0
@@ -26,6 +26,7 @@ else obj-$(CONFIG_MACH_SUN8I) += clock_sun6i.o endif obj-$(CONFIG_MACH_SUN9I) += clock_sun9i.o gtbus_sun9i.o +obj-$(CONFIG_MACH_SUN50I_H6) += clock_sun50i_h6.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o
arch/arm/mach-sunxi/clock_sun50i_h6.c new file +94 -0
94 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v2 7/13 sunxi: add clock code for H6
Quoted 5 lines · Icenowy Zheng
The new Allwinner H6 SoC has a brand new CCU layout.
Add clock code for it.
Signed-off-by Icenowy Zheng <[email protected]>
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/62329bdb/attachment.sig>
PATCH v2 8/13 sunxi: use sun6i-style watchdog for H6
In reply to Icenowy ZhengThe H6 SoC has a sun6i-style watchdog in its timer part.
Enable the usage of it.
--- arch/arm/include/asm/arch-sunxi/timer.h | 2 +- arch/arm/mach-sunxi/board.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-sunxi/timer.h +1 -1
@@ -76,7 +76,7 @@ struct sunxi_timer_reg {struct sunxi_tgp tgp[4 ];u8 res5[8 ];u32 cpu_cfg; -#elif defined(CONFIG_SUNXI_GEN_SUN6I ) +#elif defined(CONFIG_SUNXI_GEN_SUN6I ) || defined(CONFIG_MACH_SUN50I_H6 )u8 res3[16 ];struct sunxi_wdog wdog[5 ];/* We have 5 watchdogs */ #endif
arch/arm/mach-sunxi/board.c +1 -1
@@ -282,7 +282,7 @@ void reset_cpu(ulong addr)/* sun5i sometimes gets stuck without this */ writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode); } -#elif defined(CONFIG_SUNXI_GEN_SUN6I) +#elif defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_MACH_SUN50I_H6)static const struct sunxi_wdog *wdog = ((struct sunxi_timer_reg *)SUNXI_TIMER_BASE )->wdog;
Signature · 1 line
2.17.1
PATCH v2 8/13 sunxi: use sun6i-style watchdog for H6
Quoted 5 lines · Icenowy Zheng
The H6 SoC has a sun6i-style watchdog in its timer part.
Enable the usage of it.
Signed-off-by Icenowy Zheng <[email protected]>
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/56b27ff1/attachment.sig>
PATCH v2 9/13 sunxi: add UART0 setup for H6
In reply to Icenowy ZhengThe UART0 on H6 is available at PH bank (and PF bank, but the PF one is muxed with SD card).
Add pinmux configuration.
---
Changes in v2:
- Added Andre's Reviewed-by tag.
arch/arm/include/asm/arch-sunxi/gpio.h | 1 + arch/arm/mach-sunxi/board.c | 4 ++++ 2 files changed, 5 insertions(+)
arch/arm/include/asm/arch-sunxi/gpio.h +1 -0
@@ -198,6 +198,7 @@ enum sunxi_gpio_number {#define SUN6I_GPH_TWI2 2#define SUN6I_GPH_UART0 2#define SUN9I_GPH_UART0 2 +#define SUN50I_H6_GPH_UART0 2#define SUNXI_GPI_SDC3 2#define SUN7I_GPI_TWI3 3
arch/arm/mach-sunxi/board.c +4 -0
@@ -107,6 +107,10 @@ static int gpio_init(void)sunxi_gpio_set_cfgpin (SUNXI_GPB (8 ),SUN50I_GPB_UART0 );sunxi_gpio_set_cfgpin (SUNXI_GPB (9 ),SUN50I_GPB_UART0 );sunxi_gpio_set_pull (SUNXI_GPB (9 ),SUNXI_GPIO_PULL_UP ); +#elif CONFIG_CONS_INDEX ==1 && defined(CONFIG_MACH_SUN50I_H6 ) +sunxi_gpio_set_cfgpin (SUNXI_GPH (0 ),SUN50I_H6_GPH_UART0 ); +sunxi_gpio_set_cfgpin (SUNXI_GPH (1 ),SUN50I_H6_GPH_UART0 ); +sunxi_gpio_set_pull (SUNXI_GPH (1 ),SUNXI_GPIO_PULL_UP );#elif CONFIG_CONS_INDEX ==1 && defined(CONFIG_MACH_SUN8I_A83T )sunxi_gpio_set_cfgpin (SUNXI_GPB (9 ),SUN8I_A83T_GPB_UART0 );sunxi_gpio_set_cfgpin (SUNXI_GPB (10 ),SUN8I_A83T_GPB_UART0 );
Signature · 1 line
2.17.1
PATCH v2 9/13 sunxi: add UART0 setup for H6
Quoted 7 lines · Icenowy Zheng
The UART0 on H6 is available at PH bank (and PF bank, but the PF one is muxed with SD card).
Add pinmux configuration.
Signed-off-by Icenowy Zheng <[email protected]>Reviewed-by Andre Przywara <[email protected]>
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/cd521a75/attachment.sig>
PATCH v2 10/13 sunxi: add MMC support for H6
In reply to Icenowy ZhengThe Allwinner H6 SoC has 3 MMC controllers like the ones in A64, with the MMC2 come with the capability to do crypto by EMCE.
Add MMC support for H6. EMCE support is not added yet.
--- arch/arm/include/asm/arch-sunxi/mmc.h | 2 +- board/sunxi/board.c | 7 +++++++ drivers/mmc/sunxi_mmc.c | 13 ++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-sunxi/mmc.h +1 -1
@@ -45,7 +45,7 @@ struct sunxi_mmc {u32 chda;/* 0x90 */ u32 cbda;/* 0x94 */ u32 res2[26 ]; -#ifdef CONFIG_SUNXI_GEN_SUN6I +#if defined(CONFIG_SUNXI_GEN_SUN6I ) || defined(CONFIG_MACH_SUN50I_H6 )u32 res3[64 ];#endif u32 fifo;/* 0x100 / 0x200 FIFO access address */
board/sunxi/board.c +7 -0
@@ -443,6 +443,13 @@ static void mmc_pinmux_setup(int sdc)sunxi_gpio_set_pull (pin,SUNXI_GPIO_PULL_UP ); sunxi_gpio_set_drv(pin, 2); } +#elif defined(CONFIG_MACH_SUN50I_H6) +/* SDC2: PC4-PC14 */ +for (pin =SUNXI_GPC (4 ); pin <=SUNXI_GPC (14 ); pin++) { +sunxi_gpio_set_cfgpin (pin,SUNXI_GPC_SDC2 ); +sunxi_gpio_set_pull (pin,SUNXI_GPIO_PULL_UP ); +sunxi_gpio_set_drv (pin,2 ); + }#elif defined(CONFIG_MACH_SUN9I)/* SDC2: PC6-PC16 */ for (pin =SUNXI_GPC (6 ); pin <=SUNXI_GPC (16 ); pin++) {
drivers/mmc/sunxi_mmc.c +12 -1
@@ -70,10 +70,12 @@ static int mmc_resource_init(int sdc_no) priv->reg = (struct sunxi_mmc *)SUNXI_MMC2_BASE ; priv->mclkreg = &ccm->sd2_clk_cfg;break ; +#ifdef SUNXI_MMC3_BASE case 3 : priv->reg = (struct sunxi_mmc *)SUNXI_MMC3_BASE ; priv->mclkreg = &ccm->sd3_clk_cfg;break ; +#endif default :printf ("Wrong mmc number %d\n" , sdc_no);return -1 ;
@@ -116,6 +118,9 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz)#ifdef CONFIG_MACH_SUN9I pll =CCM_MMC_CTRL_PLL_PERIPH0 ; pll_hz =clock_get_pll4_periph0 (); +#elif defined(CONFIG_MACH_SUN50I_H6 ) + pll =CCM_MMC_CTRL_PLL6X2 ; + pll_hz =clock_get_pll6 () *2 ;#else pll =CCM_MMC_CTRL_PLL6 ; pll_hz =clock_get_pll6 ();
@@ -494,7 +499,7 @@ struct mmc *sunxi_mmc_init(int sdc_no) cfg->voltages =MMC_VDD_32_33 |MMC_VDD_33_34 ; cfg->host_caps =MMC_MODE_4BIT ; -#if defined(CONFIG_MACH_SUN50I ) || defined(CONFIG_MACH_SUN8I ) +#if defined(CONFIG_MACH_SUN50I ) || defined(CONFIG_MACH_SUN8I ) || defined(CONFIG_MACH_SUN50I_H6 )if (sdc_no ==2 ) cfg->host_caps =MMC_MODE_8BIT ;#endif
@@ -509,6 +514,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)/* config ahb clock */ debug ("init mmc %d clock and io\n" , sdc_no); +#if !defined(CONFIG_MACH_SUN50I_H6 )setbits_le32 (&ccm->ahb_gate0,1 <<AHB_GATE_OFFSET_MMC (sdc_no));#ifdef CONFIG_SUNXI_GEN_SUN6I
@@ -519,6 +525,11 @@ struct mmc *sunxi_mmc_init(int sdc_no)/* sun9i has a mmc-common module, also set the gate and reset there */ writel (SUNXI_MMC_COMMON_CLK_GATE |SUNXI_MMC_COMMON_RESET ,SUNXI_MMC_COMMON_BASE +4 * sdc_no); +#endif +#else /* CONFIG_MACH_SUN50I_H6 */ +setbits_le32 (&ccm->sd_gate_reset,1 << sdc_no); +/* unassert reset */ +setbits_le32 (&ccm->sd_gate_reset,1 << (RESET_SHIFT + sdc_no));#endif ret =mmc_set_mod_clk (priv,24000000 );if (ret)
Signature · 1 line
2.17.1
PATCH v2 10/13 sunxi: add MMC support for H6
Quoted 89 lines · Icenowy Zheng
The Allwinner H6 SoC has 3 MMC controllers like the ones in A64, with the MMC2 come with the capability to do crypto by EMCE.
Add MMC support for H6. EMCE support is not added yet.
Signed-off-by Icenowy Zheng <[email protected]>--- arch/arm/include/asm/arch-sunxi/mmc.h | 2 +- board/sunxi/board.c | 7 +++++++ drivers/mmc/sunxi_mmc.c | 13 ++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-)arch/arm/include/asm/arch-sunxi/mmc.h +1
-1@@ -45,7 +45,7 @@ struct sunxi_mmc {u32 chda;/* 0x90 */ u32 cbda;/* 0x94 */ u32 res2[26 ]; -#ifdef CONFIG_SUNXI_GEN_SUN6I +#if defined(CONFIG_SUNXI_GEN_SUN6I ) || defined(CONFIG_MACH_SUN50I_H6 )u32 res3[64 ];#endif u32 fifo;/* 0x100 / 0x200 FIFO access address */ board/sunxi/board.c +7
-0@@ -443,6 +443,13 @@ static void mmc_pinmux_setup(int sdc)sunxi_gpio_set_pull (pin,SUNXI_GPIO_PULL_UP ); sunxi_gpio_set_drv(pin, 2); } +#elif defined(CONFIG_MACH_SUN50I_H6) +/* SDC2: PC4-PC14 */ +for (pin =SUNXI_GPC (4 ); pin <=SUNXI_GPC (14 ); pin++) { +sunxi_gpio_set_cfgpin (pin,SUNXI_GPC_SDC2 ); +sunxi_gpio_set_pull (pin,SUNXI_GPIO_PULL_UP ); +sunxi_gpio_set_drv (pin,2 ); + }#elif defined(CONFIG_MACH_SUN9I)/* SDC2: PC6-PC16 */ for (pin =SUNXI_GPC (6 ); pin <=SUNXI_GPC (16 ); pin++) {drivers/mmc/sunxi_mmc.c +7
-1@@ -70,10 +70,12 @@ static int mmc_resource_init(int sdc_no) priv->reg = (struct sunxi_mmc *)SUNXI_MMC2_BASE ; priv->mclkreg = &ccm->sd2_clk_cfg;break ; +#ifdef SUNXI_MMC3_BASE case 3 : priv->reg = (struct sunxi_mmc *)SUNXI_MMC3_BASE ; priv->mclkreg = &ccm->sd3_clk_cfg;break ; +#endif default :printf ("Wrong mmc number %d\n" , sdc_no);return -1 ;@@ -116,6 +118,9 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz)#ifdef CONFIG_MACH_SUN9I pll =CCM_MMC_CTRL_PLL_PERIPH0 ; pll_hz =clock_get_pll4_periph0 (); +#elif defined(CONFIG_MACH_SUN50I_H6 ) + pll =CCM_MMC_CTRL_PLL6X2 ; + pll_hz =clock_get_pll6 () *2 ;#else pll =CCM_MMC_CTRL_PLL6 ; pll_hz =clock_get_pll6 ();@@ -494,7 +499,7 @@ struct mmc *sunxi_mmc_init(int sdc_no) cfg->voltages =MMC_VDD_32_33 |MMC_VDD_33_34 ; cfg->host_caps =MMC_MODE_4BIT ; -#if defined(CONFIG_MACH_SUN50I ) || defined(CONFIG_MACH_SUN8I ) +#if defined(CONFIG_MACH_SUN50I ) || defined(CONFIG_MACH_SUN8I ) || defined(CONFIG_MACH_SUN50I_H6 )if (sdc_no ==2 ) cfg->host_caps =MMC_MODE_8BIT ;#endif @@ -509,6 +514,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)/* config ahb clock */ debug ("init mmc %d clock and io\n" , sdc_no); +#if !defined(CONFIG_MACH_SUN50I_H6 )setbits_le32 (&ccm->ahb_gate0,1 <<AHB_GATE_OFFSET_MMC (sdc_no));#ifdef CONFIG_SUNXI_GEN_SUN6I @@ -519,6 +525,11 @@ struct mmc *sunxi_mmc_init(int sdc_no)/* sun9i has a mmc-common module, also set the gate and reset there */
drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 535
Quoted 10 lines
drivers/mmc/sunxi_mmc.c +5
-0writel (SUNXI_MMC_COMMON_CLK_GATE |SUNXI_MMC_COMMON_RESET ,SUNXI_MMC_COMMON_BASE +4 * sdc_no); +#endif +#else /* CONFIG_MACH_SUN50I_H6 */ +setbits_le32 (&ccm->sd_gate_reset,1 << sdc_no); +/* unassert reset */ +setbits_le32 (&ccm->sd_gate_reset,1 << (RESET_SHIFT + sdc_no));#endif ret =mmc_set_mod_clk (priv,24000000 );if (ret)
You should use the DM instead.
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/902ee2ff/attachment.sig>
[U-Boot] [linux-sunxi] Re: [PATCH v2 10/13] sunxi: add MMC support for H6
于 2018年7月24日 GMT+08:00 下午4:37:43, Maxime Ripard <[email protected]> 写到:
Quoted 95 lines · Icenowy Zheng
Quoted 5 lines
The Allwinner H6 SoC has 3 MMC controllers like the ones in A64, with the MMC2 come with the capability to do crypto by EMCE.
Add MMC support for H6. EMCE support is not added yet.
Review
Quoted 8 lines
Signed-off-by Icenowy Zheng <[email protected]>--- arch/arm/include/asm/arch-sunxi/mmc.h | 2 +- board/sunxi/board.c | 7 +++++++ drivers/mmc/sunxi_mmc.c | 13 ++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/arch/arm/include/asm/arch-sunxi/mmc.harch/arm/include/asm/arch-sunxi/mmc.h struct sunxi_mmc { · line 48
Quoted 9 lines
index
1574b8e8fe..d98c53faaa100644arch/arm/include/asm/arch-sunxi/mmc.h +1
-1@@ -45,7 +45,7 @@ struct sunxi_mmc {u32 chda;/* 0x90 */ u32 cbda;/* 0x94 */ u32 res2[26 ]; -#ifdef CONFIG_SUNXI_GEN_SUN6I +#if defined(CONFIG_SUNXI_GEN_SUN6I) ||
defined(CONFIG_MACH_SUN50I_H6)drivers/mmc/sunxi_mmc.c static int mmc_set_mod_clk(struct sunxi_mmc_priv
Quoted 39 lines
arch/arm/include/asm/arch-sunxi/mmc.h +0
-0u32 res3[64 ];#endif u32 fifo;/* 0x100 / 0x200 FIFO access address */ board/sunxi/board.c +7
-0@@ -443,6 +443,13 @@ static void mmc_pinmux_setup(int sdc)sunxi_gpio_set_pull (pin,SUNXI_GPIO_PULL_UP ); sunxi_gpio_set_drv(pin, 2); } +#elif defined(CONFIG_MACH_SUN50I_H6) +/* SDC2: PC4-PC14 */ +for (pin =SUNXI_GPC (4 ); pin <=SUNXI_GPC (14 ); pin++) { +sunxi_gpio_set_cfgpin (pin,SUNXI_GPC_SDC2 ); +sunxi_gpio_set_pull (pin,SUNXI_GPIO_PULL_UP ); +sunxi_gpio_set_drv (pin,2 ); + }#elif defined(CONFIG_MACH_SUN9I)/* SDC2: PC6-PC16 */ for (pin =SUNXI_GPC (6 ); pin <=SUNXI_GPC (16 ); pin++) {drivers/mmc/sunxi_mmc.c +2
-0@@ -70,10 +70,12 @@ static int mmc_resource_init(int sdc_no) priv->reg = (struct sunxi_mmc *)SUNXI_MMC2_BASE ; priv->mclkreg = &ccm->sd2_clk_cfg;break ; +#ifdef SUNXI_MMC3_BASE case 3 : priv->reg = (struct sunxi_mmc *)SUNXI_MMC3_BASE ; priv->mclkreg = &ccm->sd3_clk_cfg;break ; +#endif default :printf ("Wrong mmc number %d\n" , sdc_no);return -1 ;@@ -116,6 +118,9 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv*priv, unsigned int hz)
Quoted 10 lines
drivers/mmc/sunxi_mmc.c +3
-0#ifdef CONFIG_MACH_SUN9I pll =CCM_MMC_CTRL_PLL_PERIPH0 ; pll_hz =clock_get_pll4_periph0 (); +#elif defined(CONFIG_MACH_SUN50I_H6 ) + pll =CCM_MMC_CTRL_PLL6X2 ; + pll_hz =clock_get_pll6 () *2 ;#else pll =CCM_MMC_CTRL_PLL6 ; pll_hz =clock_get_pll6 ();drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 502
Quoted 5 lines
drivers/mmc/sunxi_mmc.c +1
-1@@ -494,7 +499,7 @@ struct mmc *sunxi_mmc_init(int sdc_no) cfg->voltages =MMC_VDD_32_33 |MMC_VDD_33_34 ; cfg->host_caps =MMC_MODE_4BIT ; -#if defined(CONFIG_MACH_SUN50I ) || defined(CONFIG_MACH_SUN8I ) +#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN8I) ||
defined(CONFIG_MACH_SUN50I_H6)drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 525
Quoted 13 lines
drivers/mmc/sunxi_mmc.c +1
-0if (sdc_no ==2 ) cfg->host_caps =MMC_MODE_8BIT ;#endif @@ -509,6 +514,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)/* config ahb clock */ debug ("init mmc %d clock and io\n" , sdc_no); +#if !defined(CONFIG_MACH_SUN50I_H6 )setbits_le32 (&ccm->ahb_gate0,1 <<AHB_GATE_OFFSET_MMC (sdc_no));#ifdef CONFIG_SUNXI_GEN_SUN6I @@ -519,6 +525,11 @@ struct mmc *sunxi_mmc_init(int sdc_no)/* sun9i has a mmc-common module, also set the gate and reset there */
Quoted 12 lines
drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 535
Quoted 10 lines
drivers/mmc/sunxi_mmc.c +5
-0writel (SUNXI_MMC_COMMON_CLK_GATE |SUNXI_MMC_COMMON_RESET ,SUNXI_MMC_COMMON_BASE +4 * sdc_no); +#endif +#else /* CONFIG_MACH_SUN50I_H6 */ +setbits_le32 (&ccm->sd_gate_reset,1 << sdc_no); +/* unassert reset */ +setbits_le32 (&ccm->sd_gate_reset,1 << (RESET_SHIFT + sdc_no));#endif ret =mmc_set_mod_clk (priv,24000000 );if (ret)You should use the DM instead.
Then we still need the DM-less ver for SPL.
Quoted 2 lines
Maxime
PATCH v2 10/13 sunxi: add MMC support for H6
In reply to Icenowy ZhengQuoted 88 lines · Icenowy Zheng
The Allwinner H6 SoC has 3 MMC controllers like the ones in A64, with the MMC2 come with the capability to do crypto by EMCE.
Add MMC support for H6. EMCE support is not added yet.
Signed-off-by Icenowy Zheng <[email protected]>--- arch/arm/include/asm/arch-sunxi/mmc.h | 2 +- board/sunxi/board.c | 7 +++++++ drivers/mmc/sunxi_mmc.c | 13 ++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-)arch/arm/include/asm/arch-sunxi/mmc.h +1
-1@@ -45,7 +45,7 @@ struct sunxi_mmc {u32 chda;/* 0x90 */ u32 cbda;/* 0x94 */ u32 res2[26 ]; -#ifdef CONFIG_SUNXI_GEN_SUN6I +#if defined(CONFIG_SUNXI_GEN_SUN6I ) || defined(CONFIG_MACH_SUN50I_H6 )u32 res3[64 ];#endif u32 fifo;/* 0x100 / 0x200 FIFO access address */ board/sunxi/board.c +7
-0@@ -443,6 +443,13 @@ static void mmc_pinmux_setup(int sdc)sunxi_gpio_set_pull (pin,SUNXI_GPIO_PULL_UP ); sunxi_gpio_set_drv(pin, 2); } +#elif defined(CONFIG_MACH_SUN50I_H6) +/* SDC2: PC4-PC14 */ +for (pin =SUNXI_GPC (4 ); pin <=SUNXI_GPC (14 ); pin++) { +sunxi_gpio_set_cfgpin (pin,SUNXI_GPC_SDC2 ); +sunxi_gpio_set_pull (pin,SUNXI_GPIO_PULL_UP ); +sunxi_gpio_set_drv (pin,2 ); + }#elif defined(CONFIG_MACH_SUN9I)/* SDC2: PC6-PC16 */ for (pin =SUNXI_GPC (6 ); pin <=SUNXI_GPC (16 ); pin++) {drivers/mmc/sunxi_mmc.c +7
-1@@ -70,10 +70,12 @@ static int mmc_resource_init(int sdc_no) priv->reg = (struct sunxi_mmc *)SUNXI_MMC2_BASE ; priv->mclkreg = &ccm->sd2_clk_cfg;break ; +#ifdef SUNXI_MMC3_BASE case 3 : priv->reg = (struct sunxi_mmc *)SUNXI_MMC3_BASE ; priv->mclkreg = &ccm->sd3_clk_cfg;break ; +#endif default :printf ("Wrong mmc number %d\n" , sdc_no);return -1 ;@@ -116,6 +118,9 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz)#ifdef CONFIG_MACH_SUN9I pll =CCM_MMC_CTRL_PLL_PERIPH0 ; pll_hz =clock_get_pll4_periph0 (); +#elif defined(CONFIG_MACH_SUN50I_H6 ) + pll =CCM_MMC_CTRL_PLL6X2 ; + pll_hz =clock_get_pll6 () *2 ;#else pll =CCM_MMC_CTRL_PLL6 ; pll_hz =clock_get_pll6 ();@@ -494,7 +499,7 @@ struct mmc *sunxi_mmc_init(int sdc_no) cfg->voltages =MMC_VDD_32_33 |MMC_VDD_33_34 ; cfg->host_caps =MMC_MODE_4BIT ; -#if defined(CONFIG_MACH_SUN50I ) || defined(CONFIG_MACH_SUN8I ) +#if defined(CONFIG_MACH_SUN50I ) || defined(CONFIG_MACH_SUN8I ) || defined(CONFIG_MACH_SUN50I_H6 )if (sdc_no ==2 ) cfg->host_caps =MMC_MODE_8BIT ;#endif @@ -509,6 +514,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)/* config ahb clock */ debug ("init mmc %d clock and io\n" , sdc_no); +#if !defined(CONFIG_MACH_SUN50I_H6 )setbits_le32 (&ccm->ahb_gate0,1 <<AHB_GATE_OFFSET_MMC (sdc_no));#ifdef CONFIG_SUNXI_GEN_SUN6I
drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 532
Quoted 8 lines
drivers/mmc/sunxi_mmc.c +5
-0@@ -519,6 +525,11 @@ struct mmc *sunxi_mmc_init(int sdc_no)/* sun9i has a mmc-common module, also set the gate and reset there */ writel (SUNXI_MMC_COMMON_CLK_GATE |SUNXI_MMC_COMMON_RESET ,SUNXI_MMC_COMMON_BASE +4 * sdc_no); +#endif +#else /* CONFIG_MACH_SUN50I_H6 */ +setbits_le32 (&ccm->sd_gate_reset,1 << sdc_no); +/* unassert reset */ +setbits_le32 (&ccm->sd_gate_reset,1 << (RESET_SHIFT + sdc_no));
Set the ahb and reset directly in one call since we have a provision of having same register in H6.
PATCH v2 10/13 sunxi: add MMC support for H6
于 2018年7月26日 GMT+08:00 下午1:56:02, Jagan Teki <[email protected]> 写到:
Quoted 108 lines · Icenowy Zheng
Quoted 5 lines
The Allwinner H6 SoC has 3 MMC controllers like the ones in A64, with the MMC2 come with the capability to do crypto by EMCE.
Add MMC support for H6. EMCE support is not added yet.
Review
Quoted 8 lines
Signed-off-by Icenowy Zheng <[email protected]>--- arch/arm/include/asm/arch-sunxi/mmc.h | 2 +- board/sunxi/board.c | 7 +++++++ drivers/mmc/sunxi_mmc.c | 13 ++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/arch/arm/include/asm/arch-sunxi/mmc.harch/arm/include/asm/arch-sunxi/mmc.h struct sunxi_mmc { · line 48
Quoted 9 lines
index
1574b8e8fe..d98c53faaa100644arch/arm/include/asm/arch-sunxi/mmc.h +1
-1@@ -45,7 +45,7 @@ struct sunxi_mmc {u32 chda;/* 0x90 */ u32 cbda;/* 0x94 */ u32 res2[26 ]; -#ifdef CONFIG_SUNXI_GEN_SUN6I +#if defined(CONFIG_SUNXI_GEN_SUN6I) ||
defined(CONFIG_MACH_SUN50I_H6)arch/arm/include/asm/arch-sunxi/mmc.h struct sunxi_mmc {
Quoted 3 lines
arch/arm/include/asm/arch-sunxi/mmc.h +0
-0u32 res3[64 ];#endif u32 fifo;/* 0x100 / 0x200 FIFO access address */
board/sunxi/board.c static void mmc_pinmux_setup(int sdc) · line 448
Quoted 11 lines
board/sunxi/board.c +3
-0@@ -443,6 +443,13 @@ static void mmc_pinmux_setup(int sdc)sunxi_gpio_set_pull (pin,SUNXI_GPIO_PULL_UP ); sunxi_gpio_set_drv(pin, 2); } +#elif defined(CONFIG_MACH_SUN50I_H6) +/* SDC2: PC4-PC14 */ +for (pin =SUNXI_GPC (4 ); pin <=SUNXI_GPC (14 ); pin++){
board/sunxi/board.c static void mmc_pinmux_setup(int sdc)
Quoted 7 lines
board/sunxi/board.c +4
-0+sunxi_gpio_set_cfgpin (pin,SUNXI_GPC_SDC2 ); +sunxi_gpio_set_pull (pin,SUNXI_GPIO_PULL_UP ); + sunxi_gpio_set_drv(pin, 2); + }#elif defined(CONFIG_MACH_SUN9I)/* SDC2: PC6-PC16 */ for (pin =SUNXI_GPC (6 ); pin <=SUNXI_GPC (16 ); pin++){
drivers/mmc/sunxi_mmc.c static int mmc_set_mod_clk(struct sunxi_mmc_priv
Quoted 18 lines
drivers/mmc/sunxi_mmc.c +2
-0@@ -70,10 +70,12 @@ static int mmc_resource_init(int sdc_no) priv->reg = (struct sunxi_mmc *)SUNXI_MMC2_BASE ; priv->mclkreg = &ccm->sd2_clk_cfg;break ; +#ifdef SUNXI_MMC3_BASE case 3 : priv->reg = (struct sunxi_mmc *)SUNXI_MMC3_BASE ; priv->mclkreg = &ccm->sd3_clk_cfg;break ; +#endif default :printf ("Wrong mmc number %d\n" , sdc_no);return -1 ;@@ -116,6 +118,9 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv*priv, unsigned int hz)
Quoted 10 lines
drivers/mmc/sunxi_mmc.c +3
-0#ifdef CONFIG_MACH_SUN9I pll =CCM_MMC_CTRL_PLL_PERIPH0 ; pll_hz =clock_get_pll4_periph0 (); +#elif defined(CONFIG_MACH_SUN50I_H6 ) + pll =CCM_MMC_CTRL_PLL6X2 ; + pll_hz =clock_get_pll6 () *2 ;#else pll =CCM_MMC_CTRL_PLL6 ; pll_hz =clock_get_pll6 ();drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 502
Quoted 5 lines
drivers/mmc/sunxi_mmc.c +1
-1@@ -494,7 +499,7 @@ struct mmc *sunxi_mmc_init(int sdc_no) cfg->voltages =MMC_VDD_32_33 |MMC_VDD_33_34 ; cfg->host_caps =MMC_MODE_4BIT ; -#if defined(CONFIG_MACH_SUN50I ) || defined(CONFIG_MACH_SUN8I ) +#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN8I) ||
defined(CONFIG_MACH_SUN50I_H6)drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 518
Quoted 9 lines
drivers/mmc/sunxi_mmc.c +1
-0if (sdc_no ==2 ) cfg->host_caps =MMC_MODE_8BIT ;#endif @@ -509,6 +514,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)/* config ahb clock */ debug ("init mmc %d clock and io\n" , sdc_no); +#if !defined(CONFIG_MACH_SUN50I_H6 ) setbits_le32(&ccm->ahb_gate0, 1 <<
AHB_GATE_OFFSET_MMC(sdc_no));drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 525
Quoted 4 lines
drivers/mmc/sunxi_mmc.c +0
-0#ifdef CONFIG_SUNXI_GEN_SUN6I @@ -519,6 +525,11 @@ struct mmc *sunxi_mmc_init(int sdc_no)/* sun9i has a mmc-common module, also set the gate and reset there */
drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no)
Quoted 7 lines
drivers/mmc/sunxi_mmc.c +5
-0writel (SUNXI_MMC_COMMON_CLK_GATE |SUNXI_MMC_COMMON_RESET ,SUNXI_MMC_COMMON_BASE +4 * sdc_no); +#endif +#else /* CONFIG_MACH_SUN50I_H6 */ +setbits_le32 (&ccm->sd_gate_reset,1 << sdc_no); +/* unassert reset */ + setbits_le32(&ccm->sd_gate_reset, 1 << (RESET_SHIFT +
sdc_no));
Quoted 2 lines
Set the ahb and reset directly in one call since we have a provision of having same register in H6.
Programming guideline at User Manual's 3.3.3.4 suggests a sequence.
Quoted 2 lines
Reviewed-by Jagan Teki <[email protected]>
PATCH v2 11/13 sunxi: add DRAM support to H6
In reply to Icenowy ZhengThe Allwinner H6 SoC comes with a set of new DRAM controller+PHY combo. Both the controller and the PHY seem to be originate from DesignWare, and are similar to the ones in ZynqMP SoCs.
This commit introduces an initial DRAM driver for H6, which contains only LPDDR3 support. The currently known SBCs with H6 all come with LPDDR3 memory, including Pine H64 and several Orange Pi's.
The BSP DRAM initialization code is closed source and violates GPL. Code in this commit is written by experimenting, referring the code/document of other users of the IPs (mainly the ZynqMP, as it's the only found PHY reference) and disassebling the BSP blob.
Thanks for Jernej Skrabec for review and fix some issues in this driver (including the most critical one which made it to work), and rewrite some code from register dump!
---
Changes in v2:
- Change timing to make it more close to BSP.
- Add single-rank support.
- Added a huge section of comment to describe the structure of the H6 DRAM controller.
arch/arm/include/asm/arch-sunxi/dram.h | 2 + .../include/asm/arch-sunxi/dram_sun50i_h6.h | 297 +++++++ arch/arm/mach-sunxi/Kconfig | 6 + arch/arm/mach-sunxi/Makefile | 1 + arch/arm/mach-sunxi/dram_sun50i_h6.c | 754 ++++++++++++++++++ 5 files changed, 1060 insertions(+) create mode 100644 arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h create mode 100644 arch/arm/mach-sunxi/dram_sun50i_h6.c
arch/arm/include/asm/arch-sunxi/dram.h +2 -0
@@ -27,6 +27,8 @@#include <asm/arch/dram_sunxi_dw.h> #elif defined(CONFIG_MACH_SUN9I )#include <asm/arch/dram_sun9i.h> +#elif defined(CONFIG_MACH_SUN50I_H6 ) +#include <asm/arch/dram_sun50i_h6.h> #else #include <asm/arch/dram_sun4i.h> #endif
arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h new file +297 -0
297 lines not on this page · raw message
arch/arm/mach-sunxi/Kconfig +6 -0
@@ -42,6 +42,12 @@ config DRAM_SUN9I Select this dram controller driver for Sun9i platforms, like A80. +config DRAM_SUN50I_H6 + bool + help + Select this dram controller driver for some sun50i platforms, + like H6. + config SUN6I_P2WI bool "Allwinner sun6i internal P2WI controller" help
arch/arm/mach-sunxi/Makefile +1 -0
@@ -38,4 +38,5 @@ obj-$(CONFIG_DRAM_SUN9I) += dram_sun9i.o obj-$(CONFIG_SPL_SPI_SUNXI) += spl_spi_sunxi.o obj-$(CONFIG_SUNXI_DRAM_DW) += dram_sunxi_dw.o obj-$(CONFIG_SUNXI_DRAM_DW) += dram_timings/ +obj-$(CONFIG_DRAM_SUN50I_H6) += dram_sun50i_h6.o endif
arch/arm/mach-sunxi/dram_sun50i_h6.c new file +754 -0
754 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v2 11/13 sunxi: add DRAM support to H6
The Allwinner H6 SoC comes with a set of new DRAM controller+PHY combo. Both the controller and the PHY seem to be originate from DesignWare, and are similar to the ones in ZynqMP SoCs.
This commit introduces an initial DRAM driver for H6, which contains only LPDDR3 support. The currently known SBCs with H6 all come with LPDDR3 memory, including Pine H64 and several Orange Pi's.
The BSP DRAM initialization code is closed source and violates GPL. Code in this commit is written by experimenting, referring the code/document of other users of the IPs (mainly the ZynqMP, as it's the only found PHY reference) and disassebling the BSP blob.
Thanks for Jernej Skrabec for review and fix some issues in this driver (including the most critical one which made it to work), and rewrite some code from register dump!
---
This is a fix of "[PATCH v2 11/13] sunxi: add DRAM support to H6", which dropped some timing tweaks that makes the driver unstable.
arch/arm/include/asm/arch-sunxi/dram.h | 2 + .../include/asm/arch-sunxi/dram_sun50i_h6.h | 297 +++++++ arch/arm/mach-sunxi/Kconfig | 6 + arch/arm/mach-sunxi/Makefile | 1 + arch/arm/mach-sunxi/dram_sun50i_h6.c | 755 ++++++++++++++++++ 5 files changed, 1061 insertions(+) create mode 100644 arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h create mode 100644 arch/arm/mach-sunxi/dram_sun50i_h6.c
arch/arm/include/asm/arch-sunxi/dram.h +2 -0
@@ -27,6 +27,8 @@#include <asm/arch/dram_sunxi_dw.h> #elif defined(CONFIG_MACH_SUN9I )#include <asm/arch/dram_sun9i.h> +#elif defined(CONFIG_MACH_SUN50I_H6 ) +#include <asm/arch/dram_sun50i_h6.h> #else #include <asm/arch/dram_sun4i.h> #endif
arch/arm/include/asm/arch-sunxi/dram_sun50i_h6.h new file +297 -0
297 lines not on this page · raw message
arch/arm/mach-sunxi/Kconfig +6 -0
@@ -42,6 +42,12 @@ config DRAM_SUN9I Select this dram controller driver for Sun9i platforms, like A80. +config DRAM_SUN50I_H6 + bool + help + Select this dram controller driver for some sun50i platforms, + like H6. + config SUN6I_P2WI bool "Allwinner sun6i internal P2WI controller" help
arch/arm/mach-sunxi/Makefile +1 -0
@@ -38,4 +38,5 @@ obj-$(CONFIG_DRAM_SUN9I) += dram_sun9i.o obj-$(CONFIG_SPL_SPI_SUNXI) += spl_spi_sunxi.o obj-$(CONFIG_SUNXI_DRAM_DW) += dram_sunxi_dw.o obj-$(CONFIG_SUNXI_DRAM_DW) += dram_timings/ +obj-$(CONFIG_DRAM_SUN50I_H6) += dram_sun50i_h6.o endif
arch/arm/mach-sunxi/dram_sun50i_h6.c new file +755 -0
755 lines not on this page · raw message
Signature · 1 line
2.18.0
PATCH 11/13 sunxi: add DRAM support to H6
Quoted 13 lines · Icenowy Zheng
The Allwinner H6 SoC comes with a set of new DRAM controller+PHY combo. Both the controller and the PHY seem to be originate from DesignWare, and are similar to the ones in ZynqMP SoCs.
This commit introduces an initial DRAM driver for H6, which contains only LPDDR3 support. The currently known SBCs with H6 all come with LPDDR3 memory, including Pine H64 and several Orange Pi's.
The BSP DRAM initialization code is closed source and violates GPL. Code in this commit is written by experimenting, referring the code/document of other users of the IPs (mainly the ZynqMP, as it's the only found PHY reference) and disassebling the BSP blob.
Quoted 5 lines
Thanks for Jernej Skrabec for review and fix some issues in this driver (including the most critical one which made it to work), and rewrite some code from register dump!
Signed-off-by Icenowy Zheng <[email protected]>
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/a9648f1d/attachment.sig>
PATCH v2 12/13 sunxi: add support for Allwinner H6 SoC
In reply to Icenowy ZhengAllwinner H6 is a new SoC from Allwinner features USB3 and PCIe interfaces.
This patch adds support for it.
The corresponding DTSI file, from Linux next-20180720, is also introduced.
---
Changes in v2:
- Sync device tree to next-20180720.
arch/arm/dts/sun50i-h6.dtsi | 288 ++++++++++++++++++++ arch/arm/mach-sunxi/Kconfig | 17 +- arch/arm/mach-sunxi/cpu_info.c | 2 + common/spl/Kconfig | 2 +- include/dt-bindings/clock/sun50i-h6-ccu.h | 125 +++++++++ include/dt-bindings/clock/sun50i-h6-r-ccu.h | 24 ++ include/dt-bindings/reset/sun50i-h6-ccu.h | 73 +++++ include/dt-bindings/reset/sun50i-h6-r-ccu.h | 17 ++ 8 files changed, 546 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/sun50i-h6.dtsi create mode 100644 include/dt-bindings/clock/sun50i-h6-ccu.h create mode 100644 include/dt-bindings/clock/sun50i-h6-r-ccu.h create mode 100644 include/dt-bindings/reset/sun50i-h6-ccu.h create mode 100644 include/dt-bindings/reset/sun50i-h6-r-ccu.h
arch/arm/dts/sun50i-h6.dtsi new file +288 -0
@@ -0,0 +1,288 @@ +// SPDX-License-Identifier: (GPL-2.0+ or MIT) +/* + * Copyright (C) 2017 Icenowy Zheng <[email protected]> + */ + +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/clock/sun50i-h6-ccu.h> +#include <dt-bindings/clock/sun50i-h6-r-ccu.h> +#include <dt-bindings/reset/sun50i-h6-ccu.h> +#include <dt-bindings/reset/sun50i-h6-r-ccu.h> + +/ { + interrupt-parent = <&gic>; + #address-cells = <1>; + #size-cells = <1>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu at 0 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <0>; + enable-method = "psci"; + }; + + cpu1: cpu at 1 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <1>; + enable-method = "psci"; + }; + + cpu2: cpu at 2 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <2>; + enable-method = "psci"; + }; + + cpu3: cpu at 3 { + compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <3>; + enable-method = "psci"; + }; + }; + + iosc: internal-osc-clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <16000000>; + clock-accuracy = <300000000>; + clock-output-names = "iosc"; + }; + + osc24M: osc24M_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "osc24M"; + }; + + osc32k: osc32k_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <32768>; + clock-output-names = "osc32k"; + }; + + psci { + compatible = "arm,psci-0.2"; + method = "smc"; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, + <GIC_PPI 14 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, + <GIC_PPI 11 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, + <GIC_PPI 10 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + ccu: clock at 3001000 { + compatible = "allwinner,sun50i-h6-ccu"; + reg = <0x03001000 0x1000>; + clocks = <&osc24M>, <&osc32k>, <&iosc>; + clock-names = "hosc", "losc", "iosc"; + #clock-cells = <1>; + #reset-cells = <1>; + }; + + gic: interrupt-controller at 3021000 { + compatible = "arm,gic-400"; + reg = <0x03021000 0x1000>, + <0x03022000 0x2000>, + <0x03024000 0x2000>, + <0x03026000 0x2000>; + interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; + interrupt-controller; + #interrupt-cells = <3>; + }; + + pio: pinctrl at 300b000 { + compatible = "allwinner,sun50i-h6-pinctrl"; + reg = <0x0300b000 0x400>; + interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ccu CLK_APB1>, <&osc24M>, <&osc32k>; + clock-names = "apb", "hosc", "losc"; + gpio-controller; + #gpio-cells = <3>; + interrupt-controller; + #interrupt-cells = <3>; + + mmc0_pins: mmc0-pins { + pins = "PF0", "PF1", "PF2", "PF3", + "PF4", "PF5"; + function = "mmc0"; + drive-strength = <30>; + bias-pull-up; + }; + + mmc2_pins: mmc2-pins { + pins = "PC1", "PC4", "PC5", "PC6", + "PC7", "PC8", "PC9", "PC10", + "PC11", "PC12", "PC13", "PC14"; + function = "mmc2"; + drive-strength = <30>; + bias-pull-up; + }; + + uart0_ph_pins: uart0-ph { + pins = "PH0", "PH1"; + function = "uart0"; + }; + }; + + mmc0: mmc at 4020000 { + compatible = "allwinner,sun50i-h6-mmc", + "allwinner,sun50i-a64-mmc"; + reg = <0x04020000 0x1000>; + clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>; + clock-names = "ahb", "mmc"; + resets = <&ccu RST_BUS_MMC0>; + reset-names = "ahb"; + interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + mmc1: mmc at 4021000 { + compatible = "allwinner,sun50i-h6-mmc", + "allwinner,sun50i-a64-mmc"; + reg = <0x04021000 0x1000>; + clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>; + clock-names = "ahb", "mmc"; + resets = <&ccu RST_BUS_MMC1>; + reset-names = "ahb"; + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + mmc2: mmc at 4022000 { + compatible = "allwinner,sun50i-h6-emmc", + "allwinner,sun50i-a64-emmc"; + reg = <0x04022000 0x1000>; + clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>; + clock-names = "ahb", "mmc"; + resets = <&ccu RST_BUS_MMC2>; + reset-names = "ahb"; + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + uart0: serial at 5000000 { + compatible = "snps,dw-apb-uart"; + reg = <0x05000000 0x400>; + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&ccu CLK_BUS_UART0>; + resets = <&ccu RST_BUS_UART0>; + status = "disabled"; + }; + + uart1: serial at 5000400 { + compatible = "snps,dw-apb-uart"; + reg = <0x05000400 0x400>; + interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&ccu CLK_BUS_UART1>; + resets = <&ccu RST_BUS_UART1>; + status = "disabled"; + }; + + uart2: serial at 5000800 { + compatible = "snps,dw-apb-uart"; + reg = <0x05000800 0x400>; + interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&ccu CLK_BUS_UART2>; + resets = <&ccu RST_BUS_UART2>; + status = "disabled"; + }; + + uart3: serial at 5000c00 { + compatible = "snps,dw-apb-uart"; + reg = <0x05000c00 0x400>; + interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&ccu CLK_BUS_UART3>; + resets = <&ccu RST_BUS_UART3>; + status = "disabled"; + }; + + r_ccu: clock at 7010000 { + compatible = "allwinner,sun50i-h6-r-ccu"; + reg = <0x07010000 0x400>; + clocks = <&osc24M>, <&osc32k>, <&iosc>, + <&ccu CLK_PLL_PERIPH0>; + clock-names = "hosc", "losc", "iosc", "pll-periph"; + #clock-cells = <1>; + #reset-cells = <1>; + }; + + r_intc: interrupt-controller at 7021000 { + compatible = "allwinner,sun50i-h6-r-intc", + "allwinner,sun6i-a31-r-intc"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x07021000 0x400>; + interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>; + }; + + r_pio: pinctrl at 7022000 { + compatible = "allwinner,sun50i-h6-r-pinctrl"; + reg = <0x07022000 0x400>; + interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&r_ccu CLK_R_APB1>, <&osc24M>, <&osc32k>; + clock-names = "apb", "hosc", "losc"; + gpio-controller; + #gpio-cells = <3>; + interrupt-controller; + #interrupt-cells = <3>; + + r_i2c_pins: r-i2c { + pins = "PL0", "PL1"; + function = "s_i2c"; + }; + }; + + r_i2c: i2c at 7081400 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x07081400 0x400>; + interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&r_ccu CLK_R_APB2_I2C>; + resets = <&r_ccu RST_R_APB2_I2C>; + pinctrl-names = "default"; + pinctrl-0 = <&r_i2c_pins>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + }; +};
arch/arm/mach-sunxi/Kconfig +16 -1
@@ -82,6 +82,7 @@ config SUN8I_RSB config SUNXI_SRAM_ADDRESS hex default 0x10000 if MACH_SUN9I || MACH_SUN50I || MACH_SUN50I_H5 + default 0x20000 if MACH_SUN50I_H6 default 0x0 ---help--- Older Allwinner SoCs have their mask boot ROM mapped just below 4GB,
@@ -287,6 +288,14 @@ config MACH_SUN50I_H5 select FIT select SPL_LOAD_FIT +config MACH_SUN50I_H6 + bool "sun50i (Allwinner H6)" + select ARM64 + select SUPPORT_SPL + select FIT + select SPL_LOAD_FIT + select DRAM_SUN50I_H6 + endchoice # The sun8i SoCs share a lot, this helps to avoid a lot of "if A23 || A33"
@@ -380,6 +389,7 @@ config DRAM_CLK default 360 if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || \ MACH_SUN8I_V3S default 672 if MACH_SUN50I + default 744 if MACH_SUN50I_H6 ---help--- Set the dram clock speed, valid range 240 - 480 (prior to sun9i), must be a multiple of 24. For the sun9i (A80), the tested values
@@ -399,7 +409,7 @@ config DRAM_ZQ default 123 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || MACH_SUN8I default 127 if MACH_SUN7I default 14779 if MACH_SUN8I_V3S - default 3881979 if MACH_SUN8I_R40 + default 3881979 if MACH_SUN8I_R40 || MACH_SUN50I_H6 default 4145117 if MACH_SUN9I default 3881915 if MACH_SUN50I ---help---
@@ -411,6 +421,7 @@ config DRAM_ODT_EN default y if MACH_SUN8I_A23 default y if MACH_SUN8I_R40 default y if MACH_SUN50I + default y if MACH_SUN50I_H6 ---help--- Select this to enable dram odt (on die termination).
@@ -501,6 +512,7 @@ config SYS_CLK_FREQ default 816000000 if MACH_SUN50I || MACH_SUN50I_H5 default 1008000000 if MACH_SUN8I default 1008000000 if MACH_SUN9I + default 888000000 if MACH_SUN50I_H6 config SYS_CONFIG_NAME default "sun4i" if MACH_SUN4I
@@ -510,6 +522,7 @@ config SYS_CONFIG_NAME default "sun8i" if MACH_SUN8I default "sun9i" if MACH_SUN9I default "sun50i" if MACH_SUN50I + default "sun50i" if MACH_SUN50I_H6 config SYS_BOARD default "sunxi"
@@ -715,6 +728,7 @@ config VIDEO_SUNXI depends on !MACH_SUN8I_V3S depends on !MACH_SUN9I depends on !MACH_SUN50I + depends on !MACH_SUN50I_H6 select VIDEO imply VIDEO_DT_SIMPLEFB default y
@@ -947,6 +961,7 @@ config SPL_STACK_R_ADDR default 0x4fe00000 if MACH_SUN8I default 0x2fe00000 if MACH_SUN9I default 0x4fe00000 if MACH_SUN50I + default 0x4fe00000 if MACH_SUN50I_H6 config SPL_SPI_SUNXI bool "Support for SPI Flash on Allwinner SoCs in SPL"
arch/arm/mach-sunxi/cpu_info.c +2 -0
@@ -96,6 +96,8 @@ int print_cpuinfo(void)puts ("CPU: Allwinner A64 (SUN50I)\n" );#elif definedCONFIG_MACH_SUN50I_H5 puts ("CPU: Allwinner H5 (SUN50I)\n" ); +#elif definedCONFIG_MACH_SUN50I_H6 +puts ("CPU: Allwinner H6 (SUN50I)\n" );#else #warning Please update cpu_info.c with correct CPU informationputs ("CPU: SUNXI Family\n" );
common/spl/Kconfig +1 -1
@@ -256,7 +256,7 @@ config SPL_SHA256_SUPPORT config SPL_FIT_IMAGE_TINY bool "Remove functionality from SPL FIT loading to reduce size" depends on SPL_FIT - default y if MACH_SUN50I || MACH_SUN50I_H5 + default y if MACH_SUN50I || MACH_SUN50I_H5 || MACH_SUN50I_H6 help Enable this to reduce the size of the FIT image loading code in SPL, if space for the SPL binary is very tight.
include/dt-bindings/clock/sun50i-h6-ccu.h new file +125 -0
125 lines not on this page · raw message
include/dt-bindings/clock/sun50i-h6-r-ccu.h new file +24 -0
@@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (c) 2017 Icenowy Zheng <[email protected]> +*/ + +#ifndef _DT_BINDINGS_CLK_SUN50I_H6_R_CCU_H_ +#define _DT_BINDINGS_CLK_SUN50I_H6_R_CCU_H_ + +#define CLK_AR100 0 + +#define CLK_R_APB1 2 + +#define CLK_R_APB1_TIMER 4 +#define CLK_R_APB1_TWD 5 +#define CLK_R_APB1_PWM 6 +#define CLK_R_APB2_UART 7 +#define CLK_R_APB2_I2C 8 +#define CLK_R_APB1_IR 9 +#define CLK_R_APB1_W1 10 + +#define CLK_IR 11 +#define CLK_W1 12 + +#endif /* _DT_BINDINGS_CLK_SUN50I_H6_R_CCU_H_ */
include/dt-bindings/reset/sun50i-h6-ccu.h new file +73 -0
73 lines not on this page · raw message
include/dt-bindings/reset/sun50i-h6-r-ccu.h new file +17 -0
@@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */ +/* +* Copyright (C) 2016 Icenowy Zheng <[email protected]> +*/ + +#ifndef _DT_BINDINGS_RST_SUN50I_H6_R_CCU_H_ +#define _DT_BINDINGS_RST_SUN50I_H6_R_CCU_H_ + +#define RST_R_APB1_TIMER 0 +#define RST_R_APB1_TWD 1 +#define RST_R_APB1_PWM 2 +#define RST_R_APB2_UART 3 +#define RST_R_APB2_I2C 4 +#define RST_R_APB1_IR 5 +#define RST_R_APB1_W1 6 + +#endif /* _DT_BINDINGS_RST_SUN50I_H6_R_CCU_H_ */
Signature · 1 line
2.17.1
PATCH v2 12/13 sunxi: add support for Allwinner H6 SoC
Quoted 9 lines · Icenowy Zheng
Allwinner H6 is a new SoC from Allwinner features USB3 and PCIe interfaces.
This patch adds support for it.
The corresponding DTSI file, from Linux next-20180720, is also introduced.
Signed-off-by Icenowy Zheng <[email protected]>
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/49abc4a8/attachment.sig>
PATCH v2 13/13 sunxi: add support for Pine H64 board
In reply to Icenowy ZhengPine H64 is a SBC with Allwinner H6 SoC produced by Pine64. It features 1GiB/2GiB/4GiB(3GiB usable) DRAM, two USB 2.0 ports, one USB 3.0 port and a mPCIE slot.
Add support for it.
The device tree is from Linux next-20180720.
---
Changes in v2:
- Sync device tree to next-20180720.
arch/arm/dts/Makefile | 2 + arch/arm/dts/sun50i-h6-pine-h64.dts | 185 ++++++++++++++++++++++++++++ board/sunxi/MAINTAINERS | 5 + configs/pine_h64_defconfig | 15 +++ 4 files changed, 207 insertions(+) create mode 100644 arch/arm/dts/sun50i-h6-pine-h64.dts create mode 100644 configs/pine_h64_defconfig
arch/arm/dts/Makefile +2 -0
@@ -385,6 +385,8 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \ sun50i-h5-orangepi-pc2.dtb \ sun50i-h5-orangepi-prime.dtb \ sun50i-h5-orangepi-zero-plus2.dtb +dtb-$(CONFIG_MACH_SUN50I_H6) += \ + sun50i-h6-pine-h64.dtb dtb-$(CONFIG_MACH_SUN50I) += \ sun50i-a64-amarula-relic.dtb \ sun50i-a64-bananapi-m64.dtb \
arch/arm/dts/sun50i-h6-pine-h64.dts new file +185 -0
185 lines not on this page · raw message
board/sunxi/MAINTAINERS +5 -0
@@ -370,6 +370,11 @@ M: Andre Przywara <[email protected]> S: Maintained F: configs/pine64_plus_defconfig +PINE H64 BOARD +M: Icenowy Zheng <[email protected]> +S: Maintained +F: configs/pine_h64_defconfig + R16 EVB PARROT BOARD M: Quentin Schulz <[email protected]> S: Maintained
configs/pine_h64_defconfig new file +15 -0
@@ -0,0 +1,15 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_MACH_SUN50I_H6=y +CONFIG_DRAM_ODT_EN=y +CONFIG_MMC0_CD_PIN="PF6" +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +# CONFIG_PSCI_RESET is not set +CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-pine-h64" +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SPL=y +# CONFIG_CMD_FLASH is not set +# CONFIG_CMD_FPGA is not set +# CONFIG_SPL_DOS_PARTITION is not set +# CONFIG_SPL_ISO_PARTITION is not set +# CONFIG_SPL_EFI_PARTITION is not set
Signature · 1 line
2.17.1
PATCH v2 13/13 sunxi: add support for Pine H64 board
Quoted 9 lines · Icenowy Zheng
Pine H64 is a SBC with Allwinner H6 SoC produced by Pine64. It features 1GiB/2GiB/4GiB(3GiB usable) DRAM, two USB 2.0 ports, one USB 3.0 port and a mPCIE slot.
Add support for it.
The device tree is from Linux next-20180720.
Signed-off-by Icenowy Zheng <[email protected]>
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180724/3f0fa86c/attachment.sig>
v2 cover Allwinner H6 support (w/ SPL)
In reply to Icenowy ZhengQuoted 9 lines · Icenowy Zheng
This patchset trys to add support for Allwinner H6 SoC to U-Boot.
Allwinner H6 is a quite new Allwinner SoC, with several parts changed a lot (memory map, DRAM controller, CCU, so on). The position which SPL will be loaded (SRAM A1) also changed to
0x20000.The Pine H64 board support comes with this patchset, as this is the first H6 board that I can get (being early bird).
Quoted 14 lines
Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 board
Observing SPL hang during relocation switch to board_init_r with orangepi board[1], will pine boot? look like both seem similar LPDDR3 configs atleast from schematics.
U-Boot SPL 2018.07-00382-g2e8302784f-dirty (Jul 26 2018 - 12:13:35 +0530)
DRAM: 1024 MiB
sunxi_board_init...done!
v2 cover Allwinner H6 support (w/ SPL)
于 2018年7月26日 GMT+08:00 下午3:02:50, Jagan Teki <[email protected]> 写到:
Quoted 26 lines · Icenowy Zheng
Quoted 3 lines
This patchset trys to add support for Allwinner H6 SoC to U-Boot.
Allwinner H6 is a quite new Allwinner SoC, with several parts changed
a
Quoted 6 lines
lot (memory map, DRAM controller, CCU, so on). The position which SPL will be loaded (SRAM A1) also changed to
0x20000.The Pine H64 board support comes with this patchset, as this is the first H6 board that I can get (being early bird).
Quoted 14 lines
Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 board
Quoted 3 lines
Observing SPL hang during relocation switch to
board_init_rwith orangepi board[1], will pine boot? look like both seem similar LPDDR3 configs atleast from schematics.
Use v2.1 DRAM patch.
Quoted 7 lines
U-Boot SPL 2018.07-00382-g2e8302784f-dirty (Jul 26 2018 - 12:13:35 +0530)
DRAM: 1024 MiB
sunxi_board_init...done!
v2 cover Allwinner H6 support (w/ SPL)
Quoted 28 lines · Icenowy Zheng
于 2018年7月26日 GMT+08:00 下午3:02:50, Jagan Teki <[email protected]> 写到:
Quoted 25 lines · Icenowy Zheng
Quoted 3 lines
This patchset trys to add support for Allwinner H6 SoC to U-Boot.
Allwinner H6 is a quite new Allwinner SoC, with several parts changed
a
Quoted 20 lines
lot (memory map, DRAM controller, CCU, so on). The position which SPL will be loaded (SRAM A1) also changed to
0x20000.The Pine H64 board support comes with this patchset, as this is the first H6 board that I can get (being early bird).
Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 board
Quoted 6 lines
Quoted 4 lines
Observing SPL hang during relocation switch to
board_init_rwith orangepi board[1], will pine boot? look like both seem similar LPDDR3 configs atleast from schematics.Use v2.1 DRAM patch.
Thanks.
v2 cover Allwinner H6 support (w/ SPL)
Quoted 38 lines · 在 2018-07-27五的 18:48 +0530,Jagan Teki写道:
Quoted 35 lines · Icenowy Zheng
于 2018年7月26日 GMT+08:00 下午3:02:50, Jagan Teki <
jagan at amarulasolutions.com> 写到:Quoted 31 lines
Quoted 5 lines · Icenowy Zheng
This patchset trys to add support for Allwinner H6 SoC to U- Boot.
Allwinner H6 is a quite new Allwinner SoC, with several parts changed
a
Quoted 22 lines
lot (memory map, DRAM controller, CCU, so on). The position which SPL
will be loaded (SRAM A1) also changed to0x20000.The Pine H64 board support comes with this patchset, as this is the
first H6 board that I can get (being early bird).Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 board
Quoted 1 line
Reviewed-by Jagan Teki <[email protected]>
Do you consider merge it now?
Quoted 13 lines
Quoted 8 lines
Quoted 6 lines
Observing SPL hang during relocation switch to
board_init_rwith orangepi board[1], will pine boot? look like both seem similar LPDDR3
configs atleast from schematics.Use v2.1 DRAM patch.
Thanks.
Tested-by Jagan Teki <[email protected]>
v2 cover Allwinner H6 support (w/ SPL)
Quoted 39 lines · Icenowy Zheng
Quoted 38 lines · 在 2018-07-27五的 18:48 +0530,Jagan Teki写道:
Quoted 35 lines · Icenowy Zheng
于 2018年7月26日 GMT+08:00 下午3:02:50, Jagan Teki <
jagan at amarulasolutions.com> 写到:Quoted 31 lines
Quoted 5 lines · Icenowy Zheng
This patchset trys to add support for Allwinner H6 SoC to U- Boot.
Allwinner H6 is a quite new Allwinner SoC, with several parts changed
a
Quoted 22 lines
lot (memory map, DRAM controller, CCU, so on). The position which SPL
will be loaded (SRAM A1) also changed to0x20000.The Pine H64 board support comes with this patchset, as this is the
first H6 board that I can get (being early bird).Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 board
Quoted 3 lines
Quoted 1 line
Reviewed-by Jagan Teki <[email protected]>Do you consider merge it now?
Yes, but there is a comment about kconfig move [1], I'm OK to send the change later since it can effect all SoC. what do you think?
v2 cover Allwinner H6 support (w/ SPL)
于 2018年7月31日 GMT+08:00 下午1:42:46, Jagan Teki <[email protected]> 写到:
Quoted 41 lines · Icenowy Zheng
Quoted 15 lines · 在 2018-07-27五的 18:48 +0530,Jagan Teki写道:
Quoted 14 lines
Quoted 12 lines · Icenowy Zheng
于 2018年7月26日 GMT+08:00 下午3:02:50, Jagan Teki <
jagan at amarulasolutions.com> 写到:Quoted 8 lines
Quoted 5 lines · Icenowy Zheng
This patchset trys to add support for Allwinner H6 SoC to U- Boot.
Allwinner H6 is a quite new Allwinner SoC, with several parts changed
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
a
Quoted 5 lines
lot (memory map, DRAM controller, CCU, so on). The position which SPL
will be loaded (SRAM A1) also changed to0x20000.The Pine H64 board support comes with this patchset, as this
is
Quoted 18 lines
Quoted 18 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
the
first H6 board that I can get (being early bird).Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 board
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Reviewed-by Jagan Teki <[email protected]>Do you consider merge it now?
Yes, but there is a comment about kconfig move [1], I'm OK to send the change later since it can effect all SoC.
Yes I suppose so.
Also apply for the DM MMC change.
BTW Are you working on some DM clock driver?
what do you think?
Quoted 2 lines
v2 cover Allwinner H6 support (w/ SPL)
Quoted 44 lines · Icenowy Zheng
于 2018年7月31日 GMT+08:00 下午1:42:46, Jagan Teki <[email protected]> 写到:
Quoted 41 lines · Icenowy Zheng
Quoted 15 lines · 在 2018-07-27五的 18:48 +0530,Jagan Teki写道:
Quoted 14 lines
Quoted 12 lines · Icenowy Zheng
于 2018年7月26日 GMT+08:00 下午3:02:50, Jagan Teki <
jagan at amarulasolutions.com> 写到:Quoted 8 lines
Quoted 5 lines · Icenowy Zheng
This patchset trys to add support for Allwinner H6 SoC to U- Boot.
Allwinner H6 is a quite new Allwinner SoC, with several parts changed
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
a
Quoted 5 lines
lot (memory map, DRAM controller, CCU, so on). The position which SPL
will be loaded (SRAM A1) also changed to0x20000.The Pine H64 board support comes with this patchset, as this
is
Quoted 18 lines
Quoted 18 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
the
first H6 board that I can get (being early bird).Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 board
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Reviewed-by Jagan Teki <[email protected]>Do you consider merge it now?
Yes, but there is a comment about kconfig move [1], I'm OK to send the change later since it can effect all SoC.
Yes I suppose so.
Thanks.
Quoted 2 lines
Also apply for the DM MMC change.
Which change, can you point?
Quoted 2 lines
BTW Are you working on some DM clock driver?
Yes.
v2 cover Allwinner H6 support (w/ SPL)
于 2018年7月31日 GMT+08:00 下午1:49:18, Jagan Teki <[email protected]> 写到:
Quoted 58 lines
Quoted 3 lines · Icenowy Zheng
于 2018年7月31日 GMT+08:00 下午1:42:46, Jagan Teki
<[email protected]> 写到:
Quoted 1 line
Quoted 1 line
On Sun, Jul 29, 2018 at 6:54 PM, Icenowy Zheng <[email protected]>
Quoted 8 lines · wrote:
Quoted 8 lines
Quoted 8 lines · 在 2018-07-27五的 18:48 +0530,Jagan Teki写道:
Quoted 7 lines
Quoted 5 lines · Icenowy Zheng
于 2018年7月26日 GMT+08:00 下午3:02:50, Jagan Teki <
jagan at amarulasolutions.com> 写到:Quoted 1 line
On Sat, Jul 21, 2018 at 1:50 PM, Icenowy Zheng
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines · wrote:
This patchset trys to add support for Allwinner H6 SoC to U- Boot.
Allwinner H6 is a quite new Allwinner SoC, with several
parts
Quoted 27 lines
Quoted 27 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
changed
a
Quoted 5 lines
lot (memory map, DRAM controller, CCU, so on). The position which SPL
will be loaded (SRAM A1) also changed to0x20000.The Pine H64 board support comes with this patchset, as this
is
Quoted 18 lines
Quoted 18 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
the
first H6 board that I can get (being early bird).Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 boardQuoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Reviewed-by Jagan Teki <[email protected]>Do you consider merge it now?
Yes, but there is a comment about kconfig move [1], I'm OK to send
the
Quoted 2 lines
Quoted 1 line
change later since it can effect all SoC.
Quoted 8 lines
Quoted 1 line
Yes I suppose so.
Thanks.
Quoted 2 lines
Also apply for the DM MMC change.
Which change, can you point?
Migrate MMC driver to DM (currently the DM sunxi_mmc driver part only work for A10/13/20)
Quoted 5 lines
Quoted 3 lines
BTW Are you working on some DM clock driver?
Yes.
v2 cover Allwinner H6 support (w/ SPL)
Quoted 66 lines · Icenowy Zheng
于 2018年7月31日 GMT+08:00 下午1:49:18, Jagan Teki <[email protected]> 写到:
Quoted 63 lines
Quoted 3 lines · Icenowy Zheng
于 2018年7月31日 GMT+08:00 下午1:42:46, Jagan Teki
<[email protected]> 写到:
Quoted 1 line
Quoted 1 line
On Sun, Jul 29, 2018 at 6:54 PM, Icenowy Zheng <[email protected]>
Quoted 8 lines · wrote:
Quoted 8 lines
Quoted 8 lines · 在 2018-07-27五的 18:48 +0530,Jagan Teki写道:
Quoted 7 lines
Quoted 5 lines · Icenowy Zheng
于 2018年7月26日 GMT+08:00 下午3:02:50, Jagan Teki <
jagan at amarulasolutions.com> 写到:Quoted 1 line
On Sat, Jul 21, 2018 at 1:50 PM, Icenowy Zheng
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines · wrote:
This patchset trys to add support for Allwinner H6 SoC to U- Boot.
Allwinner H6 is a quite new Allwinner SoC, with several
parts
Quoted 27 lines
Quoted 27 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
changed
a
Quoted 5 lines
lot (memory map, DRAM controller, CCU, so on). The position which SPL
will be loaded (SRAM A1) also changed to0x20000.The Pine H64 board support comes with this patchset, as this
is
Quoted 18 lines
Quoted 18 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
the
first H6 board that I can get (being early bird).Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 boardQuoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Reviewed-by Jagan Teki <[email protected]>Do you consider merge it now?
Yes, but there is a comment about kconfig move [1], I'm OK to send
the
Quoted 3 lines
Quoted 1 line
change later since it can effect all SoC.
Yes I suppose so.
Thanks.
Quoted 1 line
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Also apply for the DM MMC change.
Which change, can you point?
Migrate MMC driver to DM (currently the DM
sunxi_mmcdriver part only work for A10/13/20)
Yes I will add H6 changes as part of this series in next version.
v2 cover Allwinner H6 support (w/ SPL)
于 2018年7月31日 GMT+08:00 下午1:57:45, Jagan Teki <[email protected]> 写到:
Quoted 74 lines
Quoted 3 lines · Icenowy Zheng
于 2018年7月31日 GMT+08:00 下午1:49:18, Jagan Teki
<[email protected]> 写到:
Quoted 10 lines
Quoted 10 lines
Quoted 3 lines · Icenowy Zheng
于 2018年7月31日 GMT+08:00 下午1:42:46, Jagan Teki
<[email protected]> 写到:
Quoted 1 line
Quoted 1 line
On Sun, Jul 29, 2018 at 6:54 PM, Icenowy Zheng <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines · 在 2018-07-27五的 18:48 +0530,Jagan Teki写道:
Quoted 1 line
On Thu, Jul 26, 2018 at 12:35 PM, Icenowy Zheng
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines · wrote:
于 2018年7月26日 GMT+08:00 下午3:02:50, Jagan Teki <
jagan at amarulasolutions.com> 写到:Quoted 1 line
On Sat, Jul 21, 2018 at 1:50 PM, Icenowy Zheng
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line · wrote:
This patchset trys to add support for Allwinner H6 SoC to
U-
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Boot.
Allwinner H6 is a quite new Allwinner SoC, with several
parts
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
changed
a
Quoted 1 line
lot (memory map, DRAM controller, CCU, so on). The
position
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
which SPL
will be loaded (SRAM A1) also changed to0x20000.The Pine H64 board support comes with this patchset, as
this
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
is
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
the
first H6 board that I can get (being early bird).Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption to
SUNXI_SRAM_ADDRESSQuoted 26 lines
Quoted 26 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 boardQuoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Reviewed-by Jagan Teki <[email protected]>Do you consider merge it now?
Yes, but there is a comment about kconfig move [1], I'm OK to send
the
Quoted 3 lines
Quoted 1 line
change later since it can effect all SoC.
Yes I suppose so.
Thanks.
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Also apply for the DM MMC change.
Which change, can you point?
Migrate MMC driver to DM (currently the DM
sunxi_mmcdriver part only work for A10/13/20)Yes I will add H6 changes as part of this series in next version.
Thanks for taking it!
Quoted 2 lines
v2 cover Allwinner H6 support (w/ SPL)
In reply to Icenowy ZhengQuoted 9 lines · Icenowy Zheng
This patchset trys to add support for Allwinner H6 SoC to U-Boot.
Allwinner H6 is a quite new Allwinner SoC, with several parts changed a lot (memory map, DRAM controller, CCU, so on). The position which SPL will be loaded (SRAM A1) also changed to
0x20000.The Pine H64 board support comes with this patchset, as this is the first H6 board that I can get (being early bird).
Quoted 12 lines
Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
Replaced with v2.1 [3]
Quoted 2 lines
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 board
Applied to u-boot-sunxi/master
[3] https://patchwork.ozlabs.org/patch/947557/
Jagan.
v2 cover Allwinner H6 support (w/ SPL)
Quoted 26 lines · 在 2018-07-31二的 11:30 +0530,Jagan Teki写道:
Quoted 11 lines · Icenowy Zheng
This patchset trys to add support for Allwinner H6 SoC to U-Boot.
Allwinner H6 is a quite new Allwinner SoC, with several parts changed a
lot (memory map, DRAM controller, CCU, so on). The position which SPL
will be loaded (SRAM A1) also changed to0x20000.The Pine H64 board support comes with this patchset, as this is the first H6 board that I can get (being early bird).
Quoted 12 lines
Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6
Quoted 8 lines
Replaced with v2.1 [3]
Quoted 2 lines
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 boardApplied to u-boot-sunxi/master
I tried to build 89a897fc4d ("board: sun50i: h6: Add OrangePi One Plus initial support"), and with GCC 7.3.0 and binutils 2.3.0 I got "region `.sram' overflowed by 56 bytes".
Quoted 2 lines
Jagan.
v2 cover Allwinner H6 support (w/ SPL)
Quoted 32 lines · Icenowy Zheng
Quoted 31 lines · 在 2018-07-31二的 11:30 +0530,Jagan Teki写道:
Quoted 11 lines · Icenowy Zheng
This patchset trys to add support for Allwinner H6 SoC to U-Boot.
Allwinner H6 is a quite new Allwinner SoC, with several parts changed a
lot (memory map, DRAM controller, CCU, so on). The position which SPL
will be loaded (SRAM A1) also changed to0x20000.The Pine H64 board support comes with this patchset, as this is the first H6 board that I can get (being early bird).
Quoted 12 lines
Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6Replaced with v2.1 [3]
Quoted 2 lines
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 board
Quoted 7 lines
Quoted 3 lines
Applied to u-boot-sunxi/master
I tried to build
89a897fc4d("board: sun50i: h6: Add OrangePi One Plus initial support"), and with GCC 7.3.0 and binutils 2.3.0 I got "region `.sram' overflowed by 56 bytes".
Yes, with pine_h64 with 7.3 [1]
aarch64-linux-gnu-ld.bfd: u-boot-spl section .u_boot_list' will not fit in region .sram'
aarch64-linux-gnu-ld.bfd: region `.sram' overflowed by 16 bytes make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2
Any inputs?
v2 cover Allwinner H6 support (w/ SPL)
于 2018年8月5日 GMT+08:00 上午12:36:14, Jagan Teki <[email protected]> 写到:
Quoted 44 lines · Icenowy Zheng
Quoted 5 lines · 在 2018-07-31二的 11:30 +0530,Jagan Teki写道:
Quoted 4 lines
Quoted 2 lines · Icenowy Zheng
This patchset trys to add support for Allwinner H6 SoC to U-Boot.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Allwinner H6 is a quite new Allwinner SoC, with several parts changed a
lot (memory map, DRAM controller, CCU, so on). The position which SPL
will be loaded (SRAM A1) also changed to0x20000.The Pine H64 board support comes with this patchset, as this is
the
Quoted 17 lines
Quoted 17 lines
Quoted 14 lines
first H6 board that I can get (being early bird).
Icenowy Zheng (13):
sunxi: changeSUNXI_HIGH_SRAMoption toSUNXI_SRAM_ADDRESS
sunxi: add basic memory map definitions of H6 SoC
sunxi: change RMR64's RVBAR address for H6
sunxi: change ATF position for H6
sunxi: add config for SPL at0x20000on H6
sunxi: change GIC address on H6
sunxi: add clock code for H6
sunxi: use sun6i-style watchdog for H6
sunxi: add UART0 setup for H6
sunxi: add MMC support for H6
sunxi: add DRAM support to H6Replaced with v2.1 [3]
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
sunxi: add support for Allwinner H6 SoC
sunxi: add support for Pine H64 boardApplied to u-boot-sunxi/master
I tried to build
89a897fc4d("board: sun50i: h6: Add OrangePi OnePlus
Quoted 1 line
initial support"), and with GCC 7.3.0 and binutils 2.3.0 I got
"region
Quoted 1 line
`.sram' overflowed by 56 bytes".
Quoted 7 lines
Yes, with
pine_h64with 7.3 [1]aarch64-linux-gnu-ld.bfd: u-boot-spl section
.u_boot_list' will not fit in region.sram'
aarch64-linux-gnu-ld.bfd: region `.sram' overflowed by 16 bytes make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2
With 8.2 from bootlin (glibc variant, 2018.07-3 bleeding edge), I successfully built it for pine h64.