[U-Boot] [PATCH v2] board: sun50i: Add Amarula A64 Relic initial support

Amarula A64 Relic is A64 based IoT device, which support - Allwinner A64 Cortex-A53 - Mali-400MP2 GPU - AXP803 PMIC - 1GB DDR3 RAM - 8GB eMMC - AP6330 Wifi/BLE - MIPI-DSI - CSI: OV5640 sensor - USB OTG - 12V DC power supply
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- Changes for v2: - Rename dts name to sun50i-a64-relic.dts which is simple to use - Rename defconfig to a64_relic_defconfig - Use licence year as 2018
Note: Maxime, I saw your previous comments about CONFIG_CMD_USB_MASS_STORAGE defining in defconfig, may I know why we can't enable it in defconfig file?
arch/arm/dts/Makefile | 3 +- arch/arm/dts/sun50i-a64-relic.dts | 65 +++++++++++++++++++++++++++++++++++++++ board/sunxi/MAINTAINERS | 6 ++++ configs/a64_relic_defconfig | 18 +++++++++++ 4 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/sun50i-a64-relic.dts create mode 100644 configs/a64_relic_defconfig
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 289e11551a..676d7944c0 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -381,7 +381,8 @@ dtb-$(CONFIG_MACH_SUN50I) += \ sun50i-a64-olinuxino.dtb \ sun50i-a64-orangepi-win.dtb \ sun50i-a64-pine64-plus.dtb \ - sun50i-a64-pine64.dtb + sun50i-a64-pine64.dtb \ + sun50i-a64-relic.dtb dtb-$(CONFIG_MACH_SUN9I) += \ sun9i-a80-optimus.dtb \ sun9i-a80-cubieboard4.dtb \ diff --git a/arch/arm/dts/sun50i-a64-relic.dts b/arch/arm/dts/sun50i-a64-relic.dts new file mode 100644 index 0000000000..0320fd01b4 --- /dev/null +++ b/arch/arm/dts/sun50i-a64-relic.dts @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2018 Amarula Solutions B.V. + * Author: Jagan Teki jagan@amarulasolutions.com + */ + +/dts-v1/; + +#include "sun50i-a64.dtsi" + +#include <dt-bindings/gpio/gpio.h> + +/ { + model = "Amarula A64 Relic"; + compatible = "amarula,a64-relic", "allwinner,sun50i-a64"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + reg_vcc3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; +}; + +&ehci0 { + status = "okay"; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_pins>; + vmmc-supply = <®_vcc3v3>; + bus-width = <8>; + non-removable; + cap-mmc-hw-reset; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&usb_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&usbphy { + usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ + status = "okay"; +}; diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS index 6dd48c0265..603dc1287e 100644 --- a/board/sunxi/MAINTAINERS +++ b/board/sunxi/MAINTAINERS @@ -116,6 +116,12 @@ M: Paul Kocialkowski contact@paulk.fr S: Maintained F: configs/Ainol_AW1_defconfig
+AMARULA A64 RELIC +M: Jagan Teki jagan@amarulasolutions.com +S: Maintained +F: configs/a64_relic_defconfig +F: arch/arm/dts/sun50i-a64-relic.dts + AMPE A76 BOARD M: Paul Kocialkowski contact@paulk.fr S: Maintained diff --git a/configs/a64_relic_defconfig b/configs/a64_relic_defconfig new file mode 100644 index 0000000000..385a11a437 --- /dev/null +++ b/configs/a64_relic_defconfig @@ -0,0 +1,18 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_SPL=y +CONFIG_MACH_SUN50I=y +CONFIG_DRAM_ODT_EN=y +CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-relic" +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +# CONFIG_VIDEO_DE2 is not set +# CONFIG_CMD_FLASH is not set +# CONFIG_CMD_FPGA is not set +# CONFIG_SPL_DOS_PARTITION is not set +CONFIG_CMD_USB_MASS_STORAGE=y +# CONFIG_SPL_ISO_PARTITION is not set +# CONFIG_SPL_EFI_PARTITION is not set +CONFIG_USB_MUSB_GADGET=y +CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y

On 05/11/2018 07:47 AM, Jagan Teki wrote:
Amarula A64 Relic is A64 based IoT device, which support
- Allwinner A64 Cortex-A53
- Mali-400MP2 GPU
- AXP803 PMIC
- 1GB DDR3 RAM
- 8GB eMMC
- AP6330 Wifi/BLE
- MIPI-DSI
- CSI: OV5640 sensor
- USB OTG
- 12V DC power supply
Signed-off-by: Jagan Teki jagan@amarulasolutions.com
Changes for v2:
- Rename dts name to sun50i-a64-relic.dts which is simple to use
- Rename defconfig to a64_relic_defconfig
- Use licence year as 2018
Note: Maxime, I saw your previous comments about CONFIG_CMD_USB_MASS_STORAGE defining in defconfig, may I know why we can't enable it in defconfig file?
We can IMO

On Fri, May 11, 2018 at 11:17:11AM +0530, Jagan Teki wrote:
Amarula A64 Relic is A64 based IoT device, which support
- Allwinner A64 Cortex-A53
- Mali-400MP2 GPU
- AXP803 PMIC
- 1GB DDR3 RAM
- 8GB eMMC
- AP6330 Wifi/BLE
- MIPI-DSI
- CSI: OV5640 sensor
- USB OTG
- 12V DC power supply
Signed-off-by: Jagan Teki jagan@amarulasolutions.com
Changes for v2:
- Rename dts name to sun50i-a64-relic.dts which is simple to use
- Rename defconfig to a64_relic_defconfig
- Use licence year as 2018
Note: Maxime, I saw your previous comments about CONFIG_CMD_USB_MASS_STORAGE defining in defconfig, may I know why we can't enable it in defconfig file?
If you make a case about why that would be needed, then yes. But since we have so few boards defining it, and no one really asked for it either, I'm not sure this belongs in a *default* configuration. We can definitely make it easier to select in menuconfig if it's harder than it should be though.
Maxime
participants (3)
-
Jagan Teki
-
Marek Vasut
-
Maxime Ripard