basic support for Allwinner A83T SOC.
Subsystems (3)
v2 cover basic support for Allwinner A83T SOC.
This patch v2 of series that adds basic support for Allwinner A83T SOC with review comments addressed.
Allwinner A83T is octa-core cortex-a7 based SoC.
It's clock control unit and prcm, pinmux are different from previous sun8i series.
Its processor cores are arragned in two clusters 4 cores each, similar to A80.
Only basic clocks are enabled pll1, pll5, pll6. SMP, display, other peripherals support is not yet supported.
This enables booting kernel with initramfs, kernel patch v1 have been sent. I'll send v2 with comments addressed.
Changes from v1-> v2:
1. removed CPU_V7_HAS_NONSEC, CPU_V7_HAS_VIRT, ARMV7_BOOT_SEC_DEFAULT as no smo support is added yet.
2. added AXP818 voltages description.
3. used AXP223 address for AXP818.
4. corrected the reg filed in dtsi(100 to 0x100).
Vishnu Patekar (9):
sunxi: Add Machine Support for A83T SOC
sunxi: Add support for UART0 in PB pin group on A83T
sunxi: power: axp818: add support for axp818 driver
sunxi: power: enabled support for axp818
sunxi: do not enable smp for A83T
sunxi: clk: add basic clocks for A83T
sunxi: Add support for Allwinner A83T DRAM
sunxi: dts: sun8i: Add Allwinner A83T dtsi
sunxi: Add suport for A83T HomletV2 Board by Allwinner
arch/arm/cpu/armv7/sunxi/Makefile | 7 + arch/arm/cpu/armv7/sunxi/board.c | 8 +- arch/arm/cpu/armv7/sunxi/clock_sun8i_a83t.c | 133 +++++++ arch/arm/cpu/armv7/sunxi/cpu_info.c | 2 + arch/arm/cpu/armv7/sunxi/dram_sun8i_a83t.c | 424 +++++++++++++++++++++ arch/arm/cpu/armv7/sunxi/pmic_bus.c | 7 +- arch/arm/dts/Makefile | 2 + arch/arm/dts/sun8i-a83t-allwinner-h8homlet-v2.dts | 64 ++++ arch/arm/dts/sun8i-a83t.dtsi | 247 ++++++++++++ arch/arm/include/asm/arch-sunxi/clock.h | 4 +- arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h | 304 +++++++++++++++ arch/arm/include/asm/arch-sunxi/dram.h | 2 + arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h | 201 ++++++++++ arch/arm/include/asm/arch-sunxi/gpio.h | 1 + board/sunxi/Kconfig | 9 +- board/sunxi/MAINTAINERS | 5 + board/sunxi/board.c | 13 +- configs/h8_homlet_v2_defconfig | 24 ++ drivers/power/Kconfig | 44 ++- drivers/power/Makefile | 1 + drivers/power/axp818.c | 132 +++++++ include/axp818.h | 75 ++++ include/axp_pmic.h | 3 + include/configs/sun8i.h | 4 + include/configs/sunxi-common.h | 3 +- 25 files changed, 1693 insertions(+), 26 deletions(-) create mode 100644 arch/arm/cpu/armv7/sunxi/clock_sun8i_a83t.c create mode 100644 arch/arm/cpu/armv7/sunxi/dram_sun8i_a83t.c create mode 100644 arch/arm/dts/sun8i-a83t-allwinner-h8homlet-v2.dts create mode 100644 arch/arm/dts/sun8i-a83t.dtsi create mode 100644 arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h create mode 100644 arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h create mode 100644 configs/h8_homlet_v2_defconfig create mode 100644 drivers/power/axp818.c create mode 100644 include/axp818.h
Signature · 1 line
1.9.1
PATCH v2 1/9 sunxi: Add Machine Support for A83T SOC
Allwinner A83T is octa-core cortex-a7 SOC.
This enables support for A83T.
SMP is not yet supported.
--- arch/arm/cpu/armv7/sunxi/cpu_info.c | 2 ++ board/sunxi/Kconfig | 9 ++++++++- include/configs/sun8i.h | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-)
arch/arm/cpu/armv7/sunxi/cpu_info.c +2 -0
@@ -71,6 +71,8 @@ int print_cpuinfo(void)puts ("CPU: Allwinner A33 (SUN8I)\n" );#elif definedCONFIG_MACH_SUN9I puts ("CPU: Allwinner A80 (SUN9I)\n" ); +#elif definedCONFIG_MACH_SUN8I_A83T +puts ("CPU: Allwinner A83T (SUN8I)\n" );#else #warning Please update cpu_info.c with correct CPU informationputs ("CPU: SUNXI Family\n" );
board/sunxi/Kconfig +8 -1
@@ -68,6 +68,12 @@ config MACH_SUN8I_A33 select SUPPORT_SPL select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT +config MACH_SUN8I_A83T + bool "sun8i (Allwinner A83T)" + select CPU_V7 + select SUNXI_GEN_SUN6I + select SUPPORT_SPL + config MACH_SUN9I bool "sun9i (Allwinner A80)" select CPU_V7
@@ -78,7 +84,7 @@ endchoice # The sun8i SoCs share a lot, this helps to avoid a lot of "if A23 || A33" config MACH_SUN8I bool - default y if MACH_SUN8I_A23 || MACH_SUN8I_A33 + default y if MACH_SUN8I_A23 || MACH_SUN8I_A33 || MACH_SUN8I_A83T config DRAM_CLK
@@ -367,6 +373,7 @@ config AXP_GPIO config VIDEO boolean "Enable graphical uboot console on HDMI, LCD or VGA" + depends on !MACH_SUN8I_A83T default y ---help--- Say Y here to add support for using a cfb console on the HDMI, LCD
include/configs/sun8i.h +4 -0
@@ -20,6 +20,8 @@#define CONFIG_SUNXI_USB_PHYS 2 + +#ifndef CONFIG_MACH_SUN8I_A83T #define CONFIG_ARMV7_PSCI 1#if defined(CONFIG_MACH_SUN8I_A23 )#define CONFIG_ARMV7_PSCI_NR_CPUS 2
@@ -28,6 +30,8 @@#else #error Unsupported sun8i variant#endif +#endif +#define CONFIG_TIMER_CLK_FREQ 24000000/*
Signature · 1 line
1.9.1
PATCH v2 2/9 sunxi: Add support for UART0 in PB pin group on A83T
In reply to Vishnu PatekarOn A83T, PB9,PB10 are UART0 pins.
On allwinner A83T Dev board(h8homlet), this uart0 serial connector is exposed.
--- arch/arm/cpu/armv7/sunxi/board.c | 4 ++++ arch/arm/include/asm/arch-sunxi/gpio.h | 1 + 2 files changed, 5 insertions(+)
arch/arm/cpu/armv7/sunxi/board.c +4 -0
@@ -72,6 +72,10 @@ static int gpio_init(void)sunxi_gpio_set_cfgpin (SUNXI_GPB (0 ),SUN8I_A33_GPB_UART0 );sunxi_gpio_set_cfgpin (SUNXI_GPB (1 ),SUN8I_A33_GPB_UART0 );sunxi_gpio_set_pull (SUNXI_GPB (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 ); +sunxi_gpio_set_pull (SUNXI_GPB (10 ),SUNXI_GPIO_PULL_UP );#elif CONFIG_CONS_INDEX ==1 && defined(CONFIG_MACH_SUN9I )sunxi_gpio_set_cfgpin (SUNXI_GPH (12 ),SUN9I_GPH_UART0 );sunxi_gpio_set_cfgpin (SUNXI_GPH (13 ),SUN9I_GPH_UART0 );
arch/arm/include/asm/arch-sunxi/gpio.h +1 -0
@@ -157,6 +157,7 @@ enum sunxi_gpio_number {#define SUN5I_GPB_UART0 2#define SUN8I_GPB_UART2 2#define SUN8I_A33_GPB_UART0 3 +#define SUN8I_A83T_GPB_UART0 2#define SUNXI_GPC_NAND 2#define SUNXI_GPC_SDC2 3
Signature · 1 line
1.9.1
PATCH v2 3/9 sunxi: power: axp818: add support for axp818 driver
In reply to Vishnu PatekarAXP818 is rsb based PMIC and used on Allwinner A83T H8 Homlet dev board. It's registers are different and calculating reg config is different than that of earlier axp power ICs.
DCDC1, DCDC2, DCDC3 and DCDC5 is implemented at the moment. all other voltages can be added subsequently.
AXP datasheet is uploaded to wiki:
http://linux-sunxi.org/File:AXP818_datasheet_Revision1.0.pdf
--- drivers/power/Kconfig | 44 ++++++++++++----- drivers/power/Makefile | 1 + drivers/power/axp818.c | 132 +++++++++++++++++++++++++++++++++++++++++++++++++ include/axp818.h | 75 ++++++++++++++++++++++++++++ include/axp_pmic.h | 3 ++ 5 files changed, 242 insertions(+), 13 deletions(-) create mode 100644 drivers/power/axp818.c create mode 100644 include/axp818.h
drivers/power/Kconfig +31 -13
@@ -8,7 +8,8 @@ choice prompt "Select Sunxi PMIC Variant" depends on ARCH_SUNXI default AXP209_POWER if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I - default AXP221_POWER if MACH_SUN6I || MACH_SUN8I + default AXP221_POWER if MACH_SUN6I || MACH_SUN8I_A23 || MACH_SUN8I_A33 + default AXP818_POWER if MACH_SUN8I_A83T config SUNXI_NO_PMIC boolean "board without a pmic"
@@ -31,27 +32,37 @@ config AXP209_POWER config AXP221_POWER boolean "axp221 / axp223 pmic support" - depends on MACH_SUN6I || MACH_SUN8I + depends on MACH_SUN6I || MACH_SUN8I_A23 || MACH_SUN8I_A33 ---help--- Select this to enable support for the axp221/axp223 pmic found on most A23 and A31 boards. +config AXP818_POWER + boolean "axp818 pmic support" + depends on MACH_SUN8I_A83T + ---help--- + Say y here to enable support for the axp818 pmic found on + A83T dev board. + endchoice config AXP_DCDC1_VOLT int "axp pmic dcdc1 voltage" - depends on AXP221_POWER + depends on AXP221_POWER || AXP818_POWER + default 3300 if AXP818_POWER default 3000 if MACH_SUN6I || MACH_SUN8I ---help--- Set the voltage (mV) to program the axp pmic dcdc1 at, set to 0 to disable dcdc1. On A23 / A31 / A33 (axp221) boards dcdc1 is used for generic 3.3V IO voltage for external devices like the lcd-panal and sdcard interfaces, etc. On most boards dcdc1 is undervolted to 3.0V to - safe battery. On A31 devices dcdc1 is also used for VCC-IO. + safe battery. On A31 devices dcdc1 is also used for VCC-IO. On A83T + dcdc1 is used for VCC-IO, nand, usb0, sd , etc. config AXP_DCDC2_VOLT int "axp pmic dcdc2 voltage" - depends on AXP152_POWER || AXP209_POWER || AXP221_POWER + depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || AXP818_POWER + default 900 if AXP818_POWER default 1400 if AXP152_POWER || AXP209_POWER default 1200 if MACH_SUN6I default 1100 if MACH_SUN8I
@@ -61,10 +72,12 @@ config AXP_DCDC2_VOLT On A10(s) / A13 / A20 boards dcdc2 is VDD-CPU and should be 1.4V. On A31 boards dcdc2 is used for VDD-GPU and should be 1.2V. On A23/A33 boards dcdc2 is used for VDD-SYS and should be 1.1V. + On A83T boards dcdc2 is used for VDD-CPUA(cluster 0) and should be 0.9V. config AXP_DCDC3_VOLT int "axp pmic dcdc3 voltage" - depends on AXP152_POWER || AXP209_POWER || AXP221_POWER + depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || AXP818_POWER + default 900 if AXP818_POWER default 1500 if AXP152_POWER default 1250 if AXP209_POWER default 1200 if MACH_SUN6I || MACH_SUN8I
@@ -75,10 +88,11 @@ config AXP_DCDC3_VOLT should be 1.25V. On A10s boards with an axp152 dcdc3 is VCC-DRAM and should be 1.5V. On A23 / A31 / A33 boards dcdc3 is VDD-CPU and should be 1.2V. + On A83T boards dcdc3 is used for VDD-CPUB(cluster 1) and should be 0.9V. config AXP_DCDC4_VOLT int "axp pmic dcdc4 voltage" - depends on AXP152_POWER || AXP221_POWER + depends on AXP152_POWER || AXP221_POWER || AXP818_POWER default 1250 if AXP152_POWER default 1200 if MACH_SUN6I default 0 if MACH_SUN8I
@@ -88,15 +102,18 @@ config AXP_DCDC4_VOLT On A10s boards with an axp152 dcdc4 is VDD-INT-DLL and should be 1.25V. On A31 boards dcdc4 is used for VDD-SYS and should be 1.2V. On A23 / A33 boards dcdc4 is unused and should be disabled. + On A83T boards dcdc4 is used for VDD-GPU. config AXP_DCDC5_VOLT int "axp pmic dcdc5 voltage" - depends on AXP221_POWER + depends on AXP221_POWER || AXP818_POWER + default 1800 if AXP818_POWER default 1500 if MACH_SUN6I || MACH_SUN8I ---help--- Set the voltage (mV) to program the axp pmic dcdc5 at, set to 0 to disable dcdc5. - On A23 / A31 / A33 boards dcdc5 is VCC-DRAM and should be 1.5V. + On A23 / A31 / A33 / A83T boards dcdc5 is VCC-DRAM and should be 1.5V, + 1.8V for A83T. config AXP_ALDO1_VOLT int "axp pmic (a)ldo1 voltage"
@@ -111,7 +128,7 @@ config AXP_ALDO1_VOLT config AXP_ALDO2_VOLT int "axp pmic (a)ldo2 voltage" - depends on AXP152_POWER || AXP209_POWER || AXP221_POWER + depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || AXP818_POWER default 3000 if AXP152_POWER || AXP209_POWER default 0 if MACH_SUN6I default 2500 if MACH_SUN8I
@@ -125,14 +142,15 @@ config AXP_ALDO2_VOLT config AXP_ALDO3_VOLT int "axp pmic (a)ldo3 voltage" - depends on AXP209_POWER || AXP221_POWER - default 0 if AXP209_POWER + depends on AXP209_POWER || AXP221_POWER || AXP818_POWER + default 0 if AXP209_POWER || AXP818_POWER default 3000 if MACH_SUN6I || MACH_SUN8I ---help--- Set the voltage (mV) to program the axp pmic aldo3 at, set to 0 to disable aldo3. On A10(s) / A13 / A20 boards aldo3 should be 2.8V. On A23 / A31 / A33 boards aldo3 is VCC-PLL and AVCC and should be 3.0V. + On A83T aldo3 is used for LVDS, DSI, MIPI, HDMI, etc. config AXP_ALDO4_VOLT int "axp pmic (a)ldo4 voltage"
@@ -171,7 +189,7 @@ config AXP_DLDO3_VOLT config AXP_DLDO4_VOLT int "axp pmic dldo4 voltage" - depends on AXP221_POWER + depends on AXP221_POWER || AXP818_POWER default 0 ---help--- Set the voltage (mV) to program the axp pmic dldo4 at, set to 0 to
drivers/power/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-$(CONFIG_AS3722_POWER) += as3722.o obj-$(CONFIG_AXP152_POWER) += axp152.o obj-$(CONFIG_AXP209_POWER) += axp209.o obj-$(CONFIG_AXP221_POWER) += axp221.o +obj-$(CONFIG_AXP818_POWER) += axp818.o obj-$(CONFIG_EXYNOS_TMU) += exynos-tmu.o obj-$(CONFIG_FTPMU010_POWER) += ftpmu010.o obj-$(CONFIG_TPS6586X_POWER) += tps6586x.o
drivers/power/axp818.c new file +132 -0
132 lines not on this page · raw message
include/axp818.h new file +75 -0
75 lines not on this page · raw message
include/axp_pmic.h +3 -0
@@ -16,6 +16,9 @@#ifdef CONFIG_AXP221_POWER #include <axp221.h> #endif +#ifdef CONFIG_AXP818_POWER +#include <axp818.h> +#endif int axp_set_dcdc1 (unsigned int mvolt);int axp_set_dcdc2 (unsigned int mvolt);
Signature · 1 line
1.9.1
PATCH v2 4/9 sunxi: power: enabled support for axp818
In reply to Vishnu PatekarEnabled support for AXP818 in SPL and u-boot.
DCDC1, DCDC2, DCDC3 and DCSC5 are enabled.
--- arch/arm/cpu/armv7/sunxi/Makefile | 1 + arch/arm/cpu/armv7/sunxi/pmic_bus.c | 7 ++++--- board/sunxi/board.c | 13 ++++++++----- include/configs/sunxi-common.h | 3 ++- 4 files changed, 15 insertions(+), 9 deletions(-)
arch/arm/cpu/armv7/sunxi/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_MACH_SUN6I) += tzpc.o obj-$(CONFIG_AXP152_POWER) += pmic_bus.o obj-$(CONFIG_AXP209_POWER) += pmic_bus.o obj-$(CONFIG_AXP221_POWER) += pmic_bus.o +obj-$(CONFIG_AXP818_POWER) += pmic_bus.o ifndef CONFIG_SPL_BUILD ifdef CONFIG_ARMV7_PSCI
arch/arm/cpu/armv7/sunxi/pmic_bus.c +4 -3
@@ -23,6 +23,7 @@#define AXP221_CTRL_ADDR 0x3e#define AXP221_INIT_DATA 0x3e +/* AXP818 device and runtime addresses are same as AXP223 */ #define AXP223_DEVICE_ADDR 0x3a3#define AXP223_RUNTIME_ADDR 0x2d
@@ -35,7 +36,7 @@ int pmic_bus_init(void)if (!needs_init)return 0 ; -#ifdef CONFIG_AXP221_POWER +#if definedCONFIG_AXP221_POWER || definedCONFIG_AXP818_POWER # ifdef CONFIG_MACH_SUN6I p2wi_init (); ret = p2wi_change_to_p2wi_mode(AXP221_CHIP_ADDR, AXP221_CTRL_ADDR,
@@ -61,7 +62,7 @@ int pmic_bus_read(u8 reg, u8 *data)return i2c_read (AXP152_I2C_ADDR , reg,1 , data,1 );#elif definedCONFIG_AXP209_POWER return i2c_read (AXP209_I2C_ADDR , reg,1 , data,1 ); -#elif definedCONFIG_AXP221_POWER +#elif definedCONFIG_AXP221_POWER || definedCONFIG_AXP818_POWER # ifdef CONFIG_MACH_SUN6I return p2wi_read (reg, data);# else
@@ -76,7 +77,7 @@ int pmic_bus_write(u8 reg, u8 data)return i2c_write (AXP152_I2C_ADDR , reg,1 , &data,1 );#elif definedCONFIG_AXP209_POWER return i2c_write (AXP209_I2C_ADDR , reg,1 , &data,1 ); -#elif definedCONFIG_AXP221_POWER +#elif definedCONFIG_AXP221_POWER || definedCONFIG_AXP818_POWER # ifdef CONFIG_MACH_SUN6I return p2wi_write (reg, data);# else
board/sunxi/board.c +8 -5
@@ -430,26 +430,29 @@ void sunxi_board_init(void)int power_failed =0 ;unsigned long ramsize; -#if definedCONFIG_AXP152_POWER || definedCONFIG_AXP209_POWER || definedCONFIG_AXP221_POWER +#if definedCONFIG_AXP152_POWER || definedCONFIG_AXP209_POWER || \ + definedCONFIG_AXP221_POWER || definedCONFIG_AXP818_POWER power_failed =axp_init (); -#ifdef CONFIG_AXP221_POWER +#if definedCONFIG_AXP221_POWER || definedCONFIG_AXP818_POWER power_failed |=axp_set_dcdc1 (CONFIG_AXP_DCDC1_VOLT );#endif power_failed |=axp_set_dcdc2 (CONFIG_AXP_DCDC2_VOLT ); power_failed |=axp_set_dcdc3 (CONFIG_AXP_DCDC3_VOLT ); -#ifndef CONFIG_AXP209_POWER +#if !defined(CONFIG_AXP209_POWER ) && !defined(CONFIG_AXP818_POWER ) power_failed |=axp_set_dcdc4 (CONFIG_AXP_DCDC4_VOLT );#endif -#ifdef CONFIG_AXP221_POWER +#if definedCONFIG_AXP221_POWER || definedCONFIG_AXP818_POWER power_failed |=axp_set_dcdc5 (CONFIG_AXP_DCDC5_VOLT );#endif #ifdef CONFIG_AXP221_POWER power_failed |=axp_set_aldo1 (CONFIG_AXP_ALDO1_VOLT );#endif +#ifndef CONFIG_AXP818_POWER power_failed |=axp_set_aldo2 (CONFIG_AXP_ALDO2_VOLT ); -#ifndef CONFIG_AXP152_POWER +#endif +#if !defined(CONFIG_AXP152_POWER ) && !defined(CONFIG_AXP818_POWER ) power_failed |=axp_set_aldo3 (CONFIG_AXP_ALDO3_VOLT );#endif #ifdef CONFIG_AXP209_POWER
include/configs/sunxi-common.h +2 -1
@@ -243,7 +243,8 @@ extern int soft_i2c_gpio_scl;#endif /* PMU */ -#if definedCONFIG_AXP152_POWER || definedCONFIG_AXP209_POWER || definedCONFIG_AXP221_POWER +#if definedCONFIG_AXP152_POWER || definedCONFIG_AXP209_POWER || \ + definedCONFIG_AXP221_POWER || definedCONFIG_AXP818_POWER #define CONFIG_SPL_POWER_SUPPORT #endif
Signature · 1 line
1.9.1
PATCH v2 5/9 sunxi: do not enable smp for A83T
In reply to Vishnu PatekarWhen smp is enabled for A83T, intermittent hang is observed after booting kernel. for now do not enable the smp for CPU0. This has to be fixed.
Also, fixed the space at line start warning at these two lines.
--- arch/arm/cpu/armv7/sunxi/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/sunxi/board.c +2 -2
@@ -113,8 +113,8 @@ void s_init(void)setbits_le32 (SUNXI_SRAMC_BASE +0x44 ,0x1800 );#endif #if definedCONFIG_MACH_SUN6I || \ - definedCONFIG_MACH_SUN7I || \ - definedCONFIG_MACH_SUN8I + definedCONFIG_MACH_SUN7I || \ + definedCONFIG_MACH_SUN8I && !(CONFIG_MACH_SUN8I_A83T )/* Enable SMP mode for CPU0, by setting bit 6 of Auxiliary Ctl reg */ asmvolatile ( "mrc p15, 0, r0, c1, c0, 1\n"
Signature · 1 line
1.9.1
PATCH v2 5/9 sunxi: do not enable smp for A83T
Hi,
Quoted 3 lines
When smp is enabled for A83T, intermittent hang is observed after booting kernel. for now do not enable the smp for CPU0. This has to be fixed.
Also, fixed the space at line start warning at these two lines.
Is this still needed now that we bring up only one CPU anyways?
Regards,
Hans
PATCH v2 6/9 sunxi: clk: add basic clocks for A83T
In reply to Vishnu PatekarAdd basic clocks pll1, pll5, and some default values from allwinner u-boot.
--- arch/arm/cpu/armv7/sunxi/Makefile | 4 + arch/arm/cpu/armv7/sunxi/clock_sun8i_a83t.c | 133 +++++++++ arch/arm/include/asm/arch-sunxi/clock.h | 4 +- arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h | 304 +++++++++++++++++++++ 4 files changed, 444 insertions(+), 1 deletion(-) create mode 100644 arch/arm/cpu/armv7/sunxi/clock_sun8i_a83t.c create mode 100644 arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h
arch/arm/cpu/armv7/sunxi/Makefile +4 -0
@@ -26,7 +26,11 @@ obj-$(CONFIG_MACH_SUN4I) += clock_sun4i.o obj-$(CONFIG_MACH_SUN5I) += clock_sun4i.o obj-$(CONFIG_MACH_SUN6I) += clock_sun6i.o obj-$(CONFIG_MACH_SUN7I) += clock_sun4i.o +ifdef CONFIG_MACH_SUN8I_A83T +obj-y += clock_sun8i_a83t.o +else obj-$(CONFIG_MACH_SUN8I) += clock_sun6i.o +endif obj-$(CONFIG_MACH_SUN9I) += clock_sun9i.o obj-$(CONFIG_MACH_SUN6I) += tzpc.o
arch/arm/cpu/armv7/sunxi/clock_sun8i_a83t.c new file +133 -0
133 lines not on this page · raw message
arch/arm/include/asm/arch-sunxi/clock.h +3 -1
@@ -15,7 +15,9 @@#define CLK_GATE_CLOSE 0x0/* clock control module regs definition */ -#if defined(CONFIG_MACH_SUN6I ) || defined(CONFIG_MACH_SUN8I ) +#if defined(CONFIG_MACH_SUN8I_A83T ) +#include <asm/arch/clock_sun8i_a83t.h> +#elif defined(CONFIG_MACH_SUN6I ) || defined(CONFIG_MACH_SUN8I )#include <asm/arch/clock_sun6i.h> #elif defined(CONFIG_MACH_SUN9I )#include <asm/arch/clock_sun9i.h>
arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h new file +304 -0
304 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 7/9 sunxi: Add support for Allwinner A83T DRAM
In reply to Vishnu PatekarAdd support for A83T dram. Register are different from sun8i A33. init code is similar to A33 dram init.
hope we'll shift duplicate code in dram_sun8i_*
to dram helper in future.
--- arch/arm/cpu/armv7/sunxi/Makefile | 2 + arch/arm/cpu/armv7/sunxi/dram_sun8i_a83t.c | 424 ++++++++++++++++++++++ arch/arm/include/asm/arch-sunxi/dram.h | 2 + arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h | 201 ++++++++++ 4 files changed, 629 insertions(+) create mode 100644 arch/arm/cpu/armv7/sunxi/dram_sun8i_a83t.c create mode 100644 arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h
arch/arm/cpu/armv7/sunxi/Makefile +2 -0
@@ -54,5 +54,7 @@ obj-$(CONFIG_MACH_SUN6I) += dram_sun6i.o obj-$(CONFIG_MACH_SUN7I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o +obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o + obj-y += fel_utils.o endif
arch/arm/cpu/armv7/sunxi/dram_sun8i_a83t.c new file +424 -0
424 lines not on this page · raw message
arch/arm/include/asm/arch-sunxi/dram.h +2 -0
@@ -22,6 +22,8 @@#include <asm/arch/dram_sun8i_a23.h> #elif defined(CONFIG_MACH_SUN8I_A33 )#include <asm/arch/dram_sun8i_a33.h> +#elif defined(CONFIG_MACH_SUN8I_A83T ) +#include <asm/arch/dram_sun8i_a83t.h> #else #include <asm/arch/dram_sun4i.h> #endif
arch/arm/include/asm/arch-sunxi/dram_sun8i_a83t.h new file +201 -0
201 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v2 8/9 sunxi: dts: sun8i: Add Allwinner A83T dtsi
In reply to Vishnu PatekarAllwinner A83T is new octa-core cortex-a7 SOC.
This adds the basic dtsi, the clocks differs from
earlier sun8i SOCs.
This is not yet included in kernel.
--- arch/arm/dts/sun8i-a83t.dtsi | 247 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 arch/arm/dts/sun8i-a83t.dtsi
arch/arm/dts/sun8i-a83t.dtsi new file +247 -0
@@ -0,0 +1,247 @@ +/* + * Copyright 2015 Vishnu Patekar + * + * Vishnu Patekar <[email protected]> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + + */ + +#include "skeleton.dtsi" + +#include <dt-bindings/interrupt-controller/arm-gic.h> + +#include <dt-bindings/pinctrl/sun4i-a10.h> + +/ { + interrupt-parent = <&gic>; + + chosen { + #address-cells = <1>; + #size-cells = <1>; + ranges; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu at 0 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <0>; + }; + + cpu at 1 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <1>; + }; + + cpu at 2 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <2>; + }; + + cpu at 3 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <3>; + }; + cpu at 100 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <0x100>; + }; + + cpu at 101 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <0x101>; + }; + cpu at 102 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <0x102>; + }; + + cpu at 103 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <0x103>; + }; + }; + + memory { + reg = <0x40000000 0x80000000>; + }; + + timer { + compatible = "arm,armv7-timer"; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; + clock-frequency = <24000000>; + arm,cpu-registers-not-fw-configured; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + 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"; + }; + }; + + soc at 01c00000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + gic: interrupt-controller at 01c81000 { + compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; + reg = <0x01c81000 0x1000>, + <0x01c82000 0x1000>, + <0x01c84000 0x2000>, + <0x01c86000 0x2000>; + interrupt-controller; + #interrupt-cells = <3>; + interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; + }; + + pio: pinctrl at 01c20800 { + compatible = "allwinner,sun8i-a83t-pinctrl"; + interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; + reg = <0x01c20800 0x400>; + clocks = <&osc24M>; + gpio-controller; + interrupt-controller; + #interrupt-cells = <3>; + #gpio-cells = <3>; + + i2c0_pins_a: i2c0 at 0 { + allwinner,pins = "PH0", "PH1"; + allwinner,function = "i2c0"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + i2c1_pins_a: i2c1 at 0 { + allwinner,pins = "PH2", "PH3"; + allwinner,function = "i2c1"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + i2c2_pins_a: i2c2 at 0 { + allwinner,pins = "PH4", "PH5"; + allwinner,function = "i2c2"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + mmc0_pins_a: mmc0 at 0 { + allwinner,pins = "PF0", "PF1", "PF2", + "PF3", "PF4", "PF5"; + allwinner,function = "mmc0"; + allwinner,drive = <SUN4I_PINCTRL_30_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + mmc1_pins_a: mmc1 at 0 { + allwinner,pins = "PG0", "PG1", "PG2", + "PG3", "PG4", "PG5"; + allwinner,function = "mmc1"; + allwinner,drive = <SUN4I_PINCTRL_30_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + mmc2_8bit_pins: mmc2_8bit { + allwinner,pins = "PC5", "PC6", "PC8", + "PC9", "PC10", "PC11", + "PC12", "PC13", "PC14", + "PC15"; + allwinner,function = "mmc2"; + allwinner,drive = <SUN4I_PINCTRL_30_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + uart0_pins_a: uart0 at 0 { + allwinner,pins = "PF2", "PF4"; + allwinner,function = "uart0"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + uart0_pins_b: uart0 at 1 { + allwinner,pins = "PB9", "PB10"; + allwinner,function = "uart0"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + }; + + uart0: serial at 01c28000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c28000 0x400>; + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&osc24M>; + status = "disabled"; + }; + }; +};
Signature · 1 line
1.9.1
PATCH v2 9/9 sunxi: Add suport for A83T HomletV2 Board by Allwinner
In reply to Vishnu PatekarAdd dts and defconfig for h8homletv2 board.
H8Homlet Proto v2.0 Board is A83T Dev Board by Allwinner. It has UART, ethernet, USB, HDMI, etc ports on it. A83T patches are tested on this board.
For FEL mode it needs USB A-A(Male) cable. I used uart0 which is multiplexed to microsd pins PF2 and PF4.
Enabled UART0 Header(PB9, PB10 pins).
--- arch/arm/dts/Makefile | 2 + arch/arm/dts/sun8i-a83t-allwinner-h8homlet-v2.dts | 64 +++++++++++++++++++++++ board/sunxi/MAINTAINERS | 5 ++ configs/h8_homlet_v2_defconfig | 24 +++++++++ 4 files changed, 95 insertions(+) create mode 100644 arch/arm/dts/sun8i-a83t-allwinner-h8homlet-v2.dts create mode 100644 configs/h8_homlet_v2_defconfig
arch/arm/dts/Makefile +2 -0
@@ -157,6 +157,8 @@ dtb-$(CONFIG_MACH_SUN8I_A33) += \ sun8i-a33-ga10h-v1.1.dtb \ sun8i-a33-q8-tablet.dtb \ sun8i-a33-sinlinx-sina33.dtb +dtb-$(CONFIG_MACH_SUN8I_A83T) += \ + sun8i-a83t-allwinner-h8homlet-v2.dtb dtb-$(CONFIG_MACH_SUN9I) += \ sun9i-a80-optimus.dtb \ sun9i-a80-cubieboard4.dtb
arch/arm/dts/sun8i-a83t-allwinner-h8homlet-v2.dts new file +64 -0
64 lines not on this page · raw message
board/sunxi/MAINTAINERS +5 -0
@@ -99,6 +99,11 @@ M: Priit Laes <[email protected]> S: Maintained F: configs/sunxi_Gemei_G9_defconfig +H8HOMLET PROTO A83T BOARD +M: VishnuPatekar <[email protected]> +S: Maintained +F: configs/h8_homlet_v2_defconfig + HUMMINGBIRD-A31 BOARD M: Chen-Yu Tsai <[email protected]> S: Maintained
configs/h8_homlet_v2_defconfig new file +24 -0
@@ -0,0 +1,24 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_MACH_SUN8I_A83T=y +CONFIG_DRAM_CLK=480 +CONFIG_DRAM_ZQ=15355 +CONFIG_DRAM_ODT_EN=y +#CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE" +#CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT" +CONFIG_AXP_GPIO=y +#CONFIG_USB_MUSB_HOST=y +CONFIG_DEFAULT_DEVICE_TREE="sun8i-a83t-allwinner-h8homlet-v2" +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SPL=y +# CONFIG_CMD_IMLS is not set +# CONFIG_CMD_FLASH is not set +# CONFIG_CMD_FPGA is not set +CONFIG_AXP_DCDC1_VOLT=3000 +CONFIG_AXP_DCDC2_VOLT=900 +CONFIG_AXP_DCDC3_VOLT=900 +CONFIG_AXP_DCDC4_VOLT=0 +CONFIG_AXP_DCDC5_VOLT=1500 +CONFIG_AXP_ALDO2_VOLT=0 +CONFIG_AXP_ALDO3_VOLT=0 +CONFIG_AXP_DLDO4_VOLT=0
Signature · 1 line
1.9.1
v2 cover basic support for Allwinner A83T SOC.
In reply to Vishnu PatekarHi Vishnu,
Quoted 2 lines
This patch v2 of series that adds basic support for Allwinner A83T SOC with review comments addressed.
Can you provide some quick instructions on how to test this on the A83T HomletV2 ?
With v1 of these patches I tried to just build them and dd them to the sdcard, but that did not work.
In the mean time I've figured out that I can get a serial console with the firmware in the nand using a sdcard breakout board, so I should be able to enter FEL mode by pressing 2 there, but it would be really nice if the board would just boot from sdcard...
Regards,
Hans
v2 cover basic support for Allwinner A83T SOC.
Hello Hans,
Quoted 9 lines · Hans de Goede
Hi Vishnu,
Quoted 3 lines
This patch v2 of series that adds basic support for Allwinner A83T SOC with
review comments addressed.Can you provide some quick instructions on how to test this on the A83T HomletV2 ?
Quoted 8 lines
With v1 of these patches I tried to just build them and dd them to the sdcard, but that did not work.
In the mean time I've figured out that I can get a serial console with the firmware in the nand using a sdcard breakout board, so I should be able to enter FEL mode by pressing 2 there, but it would be really nice if the board would just boot from sdcard...
I broke microsd connector of my A83T board, so boot from microsd not tested.
As you have microSD breakout UART working, you can set CONFIG_UART0_PORT_F=y and use FEL mode, commands as below sunxi-fel spl u-boot-sunxi-with-spl.bin sunxi-fel write 0x4a000000 u-boot-dtb.bin
This is how i have tested it for now.
Quoted 7 lines
Regards,
Hans
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
v2 cover basic support for Allwinner A83T SOC.
Hi,
Quoted 22 lines · Vishnu Patekar
Hello Hans,
Quoted 9 lines · Hans de Goede
Hi Vishnu,
Quoted 3 lines
This patch v2 of series that adds basic support for Allwinner A83T SOC with
review comments addressed.Can you provide some quick instructions on how to test this on the A83T HomletV2 ?
Quoted 8 lines
With v1 of these patches I tried to just build them and dd them to the sdcard, but that did not work.
In the mean time I've figured out that I can get a serial console with the firmware in the nand using a sdcard breakout board, so I should be able to enter FEL mode by pressing 2 there, but it would be really nice if the board would just boot from sdcard...
Quoted 8 lines
I broke microsd connector of my A83T board, so boot from microsd not tested.
As you have microSD breakout UART working, you can set
CONFIG_UART0_PORT_F=yand use FEL mode, commands as below sunxi-fel spl u-boot-sunxi-with-spl.bin sunxi-fel write0x4a000000u-boot-dtb.binThis is how i have tested it for now.
Ok, that is unfortunate, because regular sd-card boot does not seem to be working. I think you may be relying on some reset / clocks being enabled by boot0 before it passes control to the FEL ROM based on you pressing 2 on the serial console. The reason I believe this is that not even the SPL header is printing, which points to an uart pin / clk / reset setup problem.
I will see if I can get things working with sdcard boot tonight.
Regards,
Hans
v2 cover basic support for Allwinner A83T SOC.
In reply to Vishnu PatekarHi,
Quoted 22 lines · Vishnu Patekar
Hello Hans,
Quoted 9 lines · Hans de Goede
Hi Vishnu,
Quoted 3 lines
This patch v2 of series that adds basic support for Allwinner A83T SOC with
review comments addressed.Can you provide some quick instructions on how to test this on the A83T HomletV2 ?
Quoted 8 lines
With v1 of these patches I tried to just build them and dd them to the sdcard, but that did not work.
In the mean time I've figured out that I can get a serial console with the firmware in the nand using a sdcard breakout board, so I should be able to enter FEL mode by pressing 2 there, but it would be really nice if the board would just boot from sdcard...
Quoted 8 lines
I broke microsd connector of my A83T board, so boot from microsd not tested.
As you have microSD breakout UART working, you can set
CONFIG_UART0_PORT_F=yand use FEL mode, commands as below sunxi-fel spl u-boot-sunxi-with-spl.bin sunxi-fel write0x4a000000u-boot-dtb.binThis is how i have tested it for now.
Ok, I've managed to get things to work actually cold booting from the sdcard slot (so as to not rely on earlier setup done by boot0 before it enters FEL mode when pressin '2'). In order to get the sdcard + cold booting to work I had to make some changes to the clk code:
https://github.com/jwrdegoede/u-boot-sunxi/commit/03cf8b8354f732fe34fc34ef44fecd79190f019e
With these fixes A83 support seems to work well, good job!
I've merged this into my sunxi-wip tree now and I'm preparing a pull-req to send this upstream.
Regards,
Hans
p.s.
Next time please make sure to base your patches on the latest official master, when you posted these patches master already had H3 support, and I had to do quite a but of manual conflict resolving because of that.
v2 cover basic support for Allwinner A83T SOC.
Hello Hans,
Nice to see it boots from SD, after clock stable changes.:)
Quoted 54 lines · Hans de Goede
Hi,
Quoted 29 lines · Vishnu Patekar
Hello Hans,
Quoted 11 lines · Hans de Goede
Hi Vishnu,
Quoted 3 lines
This patch v2 of series that adds basic support for Allwinner A83T SOC with
review comments addressed.Can you provide some quick instructions on how to test this on the A83T HomletV2 ?
Quoted 8 lines
With v1 of these patches I tried to just build them and dd them to the sdcard, but that did not work.
In the mean time I've figured out that I can get a serial console with the firmware in the nand using a sdcard breakout board, so I should be able to enter FEL mode by pressing 2 there, but it would be really nice if the board would just boot from sdcard...
I broke microsd connector of my A83T board, so boot from microsd not tested.
Quoted 6 lines
As you have microSD breakout UART working, you can set
CONFIG_UART0_PORT_F=yand use FEL mode, commands as below sunxi-fel spl u-boot-sunxi-with-spl.bin sunxi-fel write0x4a000000u-boot-dtb.binThis is how i have tested it for now.
Ok, I've managed to get things to work actually cold booting from the sdcard slot (so as to not rely on earlier setup done by boot0 before it enters FEL mode when pressin '2'). In order to get the sdcard + cold booting to work I had to make some changes to the clk code:
https://github.com/jwrdegoede/u-boot-sunxi/commit/03cf8b8354f732fe34fc34ef44fecd79190f019e
With these fixes A83 support seems to work well, good job!
I've merged this into my sunxi-wip tree now and I'm preparing a pull-req to send this upstream.
Regards,
Quoted 8 lines
Hans
p.s.
Next time please make sure to base your patches on the latest official master, when you posted these patches master already had H3 support, and I had to do quite a but of manual conflict resolving because of that.
Sorry about that, I'll take care of this in future.
Regards,
Vishnu