ARM64: dts: hi3798cv200-poplar: add device tree bindings
Subsystems (5)
PATCH v2 1/5 ARM64: dts: hi3798cv200-poplar: add device tree bindings
pulled from linux-next tag 20170505
--- arch/arm/dts/hi3798cv200-poplar.dts | 162 +++++++++++++ arch/arm/dts/hi3798cv200.dtsi | 411 ++++++++++++++++++++++++++++++++ include/dt-bindings/clock/histb-clock.h | 66 +++++ include/dt-bindings/reset/ti-syscon.h | 38 +++ 4 files changed, 677 insertions(+) create mode 100644 arch/arm/dts/hi3798cv200-poplar.dts create mode 100644 arch/arm/dts/hi3798cv200.dtsi create mode 100644 include/dt-bindings/clock/histb-clock.h create mode 100644 include/dt-bindings/reset/ti-syscon.h
arch/arm/dts/hi3798cv200-poplar.dts new file +162 -0
@@ -0,0 +1,162 @@ +/* + * DTS File for HiSilicon Poplar Development Board + * + * Copyright (c) 2016-2017 HiSilicon Technologies Co., Ltd. + * + * Released under the GPLv2 only. + * SPDX-License-Identifier: GPL-2.0 + */ + +/dts-v1/; + +#include <dt-bindings/gpio/gpio.h> +#include "hi3798cv200.dtsi" + +/ { + model = "HiSilicon Poplar Development Board"; + compatible = "hisilicon,hi3798cv200-poplar", "hisilicon,hi3798cv200"; + + aliases { + serial0 = &uart0; + serial2 = &uart2; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x80000000>; + }; + + leds { + compatible = "gpio-leds"; + + user-led0 { + label = "USER-LED0"; + gpios = <&gpio6 3 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + default-state = "off"; + }; + + user-led1 { + label = "USER-LED1"; + gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; + linux,default-trigger = "mmc0"; + default-state = "off"; + }; + + user-led2 { + label = "USER-LED2"; + gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "none"; + default-state = "off"; + }; + + user-led3 { + label = "USER-LED3"; + gpios = <&gpio10 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "cpu0"; + default-state = "off"; + }; + }; +}; + +&gmac1 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + phy-handle = <ð_phy1>; + phy-mode = "rgmii"; + hisilicon,phy-reset-delays-us = <10000 10000 30000>; + + eth_phy1: phy at 3 { + reg = <3>; + }; +}; + +&gpio1 { + status = "okay"; + gpio-line-names = "LS-GPIO-E", "", + "", "", + "", "LS-GPIO-F", + "", "LS-GPIO-J"; +}; + +&gpio2 { + status = "okay"; + gpio-line-names = "LS-GPIO-H", "LS-GPIO-I", + "LS-GPIO-L", "LS-GPIO-G", + "LS-GPIO-K", "", + "", ""; +}; + +&gpio3 { + status = "okay"; + gpio-line-names = "", "", + "", "", + "LS-GPIO-C", "", + "", "LS-GPIO-B"; +}; + +&gpio4 { + status = "okay"; + gpio-line-names = "", "", + "", "", + "", "LS-GPIO-D", + "", ""; +}; + +&gpio5 { + status = "okay"; + gpio-line-names = "", "USER-LED-1", + "USER-LED-2", "", + "", "LS-GPIO-A", + "", ""; +}; + +&gpio6 { + status = "okay"; + gpio-line-names = "", "", + "", "USER-LED-0", + "", "", + "", ""; +}; + +&gpio10 { + status = "okay"; + gpio-line-names = "", "", + "", "", + "", "", + "USER-LED-3", ""; +}; + +&i2c0 { + status = "okay"; + label = "LS-I2C0"; +}; + +&i2c2 { + status = "okay"; + label = "LS-I2C1"; +}; + +&ir { + status = "okay"; +}; + +&spi0 { + status = "okay"; + label = "LS-SPI0"; +}; + +&uart0 { + status = "okay"; +}; + +&uart2 { + status = "okay"; + label = "LS-UART0"; +}; +/* No optional LS-UART1 on Low Speed Expansion Connector. */
arch/arm/dts/hi3798cv200.dtsi new file +411 -0
411 lines not on this page · raw message
include/dt-bindings/clock/histb-clock.h new file +66 -0
66 lines not on this page · raw message
include/dt-bindings/reset/ti-syscon.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* TI Syscon Reset definitions +* +* Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/ +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#ifndef __DT_BINDINGS_RESET_TI_SYSCON_H__ +#define __DT_BINDINGS_RESET_TI_SYSCON_H__ + +/* +* The reset does not support the feature and corresponding +* values are not valid +*/ +#define ASSERT_NONE (1 << 0) +#define DEASSERT_NONE (1 << 1) +#define STATUS_NONE (1 << 2) + +/* When set this function is activated by setting(vs clearing) this bit */ +#define ASSERT_SET (1 << 3) +#define DEASSERT_SET (1 << 4) +#define STATUS_SET (1 << 5) + +/* The following are the inverse of the above and are added for consistency */ +#define ASSERT_CLEAR (0 << 3) +#define DEASSERT_CLEAR (0 << 4) +#define STATUS_CLEAR (0 << 5) + +#endif
Signature · 1 line
2.7.4
PATCH v2 2/5 ARM64: dts: poplar: add usb-ehci node
--- arch/arm/dts/hi3798cv200-poplar.dts | 5 +++++ arch/arm/dts/hi3798cv200.dtsi | 6 ++++++ 2 files changed, 11 insertions(+)
arch/arm/dts/hi3798cv200-poplar.dts +5 -0
@@ -76,6 +76,10 @@ }; }; +&usb_ehci { + status = "okay"; +}; + &gpio1 { status = "okay"; gpio-line-names = "LS-GPIO-E", "",
@@ -159,4 +163,5 @@ status = "okay"; label = "LS-UART0"; }; + /* No optional LS-UART1 on Low Speed Expansion Connector. */
arch/arm/dts/hi3798cv200.dtsi +6 -0
@@ -106,6 +106,12 @@ #reset-cells = <2>; }; + usb_ehci:ehci at 9890000 { + compatible = "generic-ehci"; + reg = <0x9890000 0x100>; + status = "disabled"; + }; + uart0: serial at 8b00000 { compatible = "arm,pl011", "arm,primecell"; reg = <0x8b00000 0x1000>;
Signature · 1 line
2.7.4
PATCH v2 3/5 ARM64: dts: poplar: add clock frequency to the console node
In reply to Jorge Ramirez-Ortiz--- arch/arm/dts/hi3798cv200.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/dts/hi3798cv200.dtsi +1 -0
@@ -116,6 +116,7 @@ compatible = "arm,pl011", "arm,primecell"; reg = <0x8b00000 0x1000>; interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + clock = <75000000>; clocks = <&sysctrl HISTB_UART0_CLK>; clock-names = "apb_pclk"; status = "disabled";
Signature · 1 line
2.7.4
PATCH v2 4/5 driver: mmc: update debug info
In reply to Jorge Ramirez-OrtizThis driver is used in another board; remove board information from the driver debug log.
--- drivers/mmc/hi6220_dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/hi6220_dw_mmc.c +1 -1
@@ -20,7 +20,7 @@static int hi6220_dwmci_core_init (struct dwmci_host *host,int index) { - host->name ="HiKey DWMMC" ; + host->name ="Hisilicon DWMMC" ; host->dev_index = index;
Signature · 1 line
2.7.4
PATCH v2 4/5 driver: mmc: update debug info
Quoted 4 lines · Jorge Ramirez-Ortiz
This driver is used in another board; remove board information from the driver debug log.
Signed-off-by Jorge Ramirez-Ortiz <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170508/f232b5ab/attachment.sig>
PATCH v2 5/5 ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards
In reply to Jorge Ramirez-OrtizThis port adds support for:
1) Serial
2) eMMC
3) USB
It has been tested with ARM TRUSTED FIRMWARE running u-boot as the BL33 executable [see board's README]
eMMC has been tested for reading and booting the loader[1] and linux kernels as well as saving the u-boot environment.
USB has been tested with ASIX networking adapter and SanDisk 7.4GB drive.
PSCI has been tested via the reset call.
The firwmare upgrade process has been tested via TFTP and USB FAT filesystem containing the fastboot.bin image in one of the partitions.
--- arch/arm/Kconfig | 12 ++ arch/arm/include/asm/arch-hi3798cv200/dwmmc.h | 13 ++ .../arm/include/asm/arch-hi3798cv200/hi3798cv200.h | 52 +++++ board/hisilicon/poplar/Kconfig | 15 ++ board/hisilicon/poplar/MAINTAINERS | 6 + board/hisilicon/poplar/Makefile | 7 + board/hisilicon/poplar/README | 232 +++++++++++++++++++++ board/hisilicon/poplar/poplar.c | 166 +++++++++++++++ configs/poplar_defconfig | 26 +++ include/configs/poplar.h | 113 ++++++++++ 10 files changed, 642 insertions(+) create mode 100644 arch/arm/include/asm/arch-hi3798cv200/dwmmc.h create mode 100644 arch/arm/include/asm/arch-hi3798cv200/hi3798cv200.h create mode 100644 board/hisilicon/poplar/Kconfig create mode 100644 board/hisilicon/poplar/MAINTAINERS create mode 100644 board/hisilicon/poplar/Makefile create mode 100644 board/hisilicon/poplar/README create mode 100644 board/hisilicon/poplar/poplar.c create mode 100644 configs/poplar_defconfig create mode 100644 include/configs/poplar.h
arch/arm/Kconfig +12 -0
@@ -816,6 +816,17 @@ config TARGET_HIKEY Support for HiKey 96boards platform. It features a HI6220 SoC, with 8xA53 CPU, mali450 gpu, and 1GB RAM. +config TARGET_POPLAR + bool "Support Poplar 96boards Enterprise Edition Platform" + select ARM64 + select DM + select OF_CONTROL + select DM_SERIAL + select DM_USB + help + Support for Poplar 96boards EE platform. It features a HI3798cv200 + SoC, with 4xA53 CPU, MaliT720 GPU, and 1GB RAM. + config TARGET_LS1012AQDS bool "Support ls1012aqds" select ARCH_LS1012A
@@ -1145,6 +1156,7 @@ source "board/grinn/chiliboard/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig" source "board/hisilicon/hikey/Kconfig" +source "board/hisilicon/poplar/Kconfig" source "board/imx31_phycore/Kconfig" source "board/isee/igep0033/Kconfig" source "board/olimex/mx23_olinuxino/Kconfig"
arch/arm/include/asm/arch-hi3798cv200/dwmmc.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* (C) Copyright 2017 Linaro +* Jorge Ramirez-Ortiz <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef _HI3798cv200_DWMMC_H_ +#define _HI3798cv200_DWMMC_H_ + +int hi6220_dwmci_add_port (int index,u32 regbase,int bus_width); + +#endif /* _HI3798cv200_DWMMC_H_ */
arch/arm/include/asm/arch-hi3798cv200/hi3798cv200.h new file +52 -0
52 lines not on this page · raw message
board/hisilicon/poplar/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +if TARGET_POPLAR + +config SYS_BOARD + default "poplar" + +config SYS_VENDOR + default "hisilicon" + +config SYS_SOC + default "hi3798cv200" + +config SYS_CONFIG_NAME + default "poplar" + +endif
board/hisilicon/poplar/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +Poplar BOARD +M: Jorge Ramirez-Ortiz <[email protected]> +S: Maintained +F: board/hisilicon/poplar +F: include/configs/poplar.h +F: configs/poplar_defconfig
board/hisilicon/poplar/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# +# (C) Copyright 2017 Linaro +# Jorge Ramirez-Ortiz <[email protected]> +# +# SPDX-License-Identifier: GPL-2.0+ +# +obj-y := poplar.o
board/hisilicon/poplar/README new file +232 -0
232 lines not on this page · raw message
board/hisilicon/poplar/poplar.c new file +166 -0
166 lines not on this page · raw message
configs/poplar_defconfig new file +26 -0
@@ -0,0 +1,26 @@ +CONFIG_ARM=y +CONFIG_TARGET_POPLAR=y +CONFIG_IDENT_STRING="poplar" +CONFIG_DEFAULT_DEVICE_TREE="hi3798cv200-poplar" +CONFIG_SYS_PROMPT="poplar# " +CONFIG_DISTRO_DEFAULTS=y +CONFIG_DISPLAY_CPUINFO=n +CONFIG_DISPLAY_BOARDINFO=y +CONFIG_ISO_PARTITION=n +CONFIG_MMC_DW=y +CONFIG_MMC_DW_K3=y +CONFIG_PL011_SERIAL=y +CONFIG_PSCI_RESET=y +CONFIG_USB=y +CONFIG_USB_EHCI=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_GENERIC=y +CONFIG_USB_STORAGE=y +CONFIG_NET=y +# CONFIG_CMD_IMLS is not set +# CONFIG_DM_GPIO is not set +CONFIG_LIB_RAND=y +CONFIG_CMD_UNZIP=y +CONFIG_CMD_MMC=y +CONFIG_CMD_USB=y +
include/configs/poplar.h new file +113 -0
113 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 5/5 ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards
board/hisilicon/poplar/poplar.c line 76
Quoted 4 lines · Jorge Ramirez-Ortiz
board/hisilicon/poplar/poplar.c new file +4
-0+static inline void usb2_phy_write (u32 val) +{ +writel (val,PERI_CTRL_USB0 ); +clrsetbits_le32 (PERI_CTRL_USB0 ,BIT (21 ),BIT (20 ) |BIT (22 ));
Just noticed that the write below is unnecessary
will remove this inline function and fix it on v3
Quoted 29 lines
board/hisilicon/poplar/poplar.c new file +29
-0+writel (val,PERI_CTRL_USB0 ); + +udelay (20 ); +} + +static void usb2_phy_config (void ) +{ +const u32 config[] = { +/* close EOP pre-emphasis. open data pre-emphasis */ +0xa1001c , +/* Rcomp = 150mW, increase DC level */ +0xa00607 , +/* keep Rcomp working */ +0xa10700 , +/* Icomp = 212mW, increase current drive */ +0xa00aab , +/* EMI fix: rx_active not stay 1 when error packets received */ +0xa11140 , +/* Comp mode select */ +0xa11041 , +/* adjust eye diagram */ +0xa0098c , +/* adjust eye diagram */ +0xa10a0a , + }; +int i; + +for (i =0 ; i <ARRAY_SIZE (config); i++) +
PATCH v2 5/5 ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards
In reply to Jorge Ramirez-OrtizQuoted 4 lines · Jorge Ramirez-Ortiz
This port adds support for:
1) Serial
2) eMMC
3) USB
[snip]
include/configs/poplar.h
Quoted 5 lines
include/configs/poplar.h new file +0
-0
So, a general problem here. Please figure out ways to change things like:
include/configs/poplar.h line 28
Quoted 3 lines
include/configs/poplar.h new file +3
-0+/* memory */ +#define PHYS_SDRAM_1 0x00000000 +#define PHYS_SDRAM_1_SIZE 0x40000000
To either not be needed, or use the value directly. We want to be able to drop include/configs/*.h in due time. So for example:
include/configs/poplar.h line 35
Quoted 7 lines
include/configs/poplar.h new file +7
-0+#define CONFIG_NR_DRAM_BANKS 4 +#define DRAM_BANK_SIZE 0x10000000 + +/* sys */ +#define CONFIG_SYS_BOOTM_LEN 0x1400000 +#define CONFIG_SYS_INIT_RAM_SIZE 0x100000 +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
This can just use 0x00000000
Quoted 1 line
+#define
CONFIG_SYS_INIT_SP_ADDR(PHYS_SDRAM_1+0x200000)
We aren't using some sort of SRAM/IRAM/etc ?
include/configs/poplar.h line 38
Quoted 2 lines
include/configs/poplar.h new file +2
-0+#define CONFIG_SYS_LOAD_ADDR (PHYS_SDRAM_1 + 0x800000) +#define CONFIG_SYS_MALLOC_LEN (PHYS_SDRAM_1 + SZ_8M)
This should just be SZ_8M (or really, larger, 32M most likely).
include/configs/poplar.h line 48
Quoted 6 lines
include/configs/poplar.h new file +6
-0+/* generic gimer */ +#define COUNTER_FREQUENCY 19000000 + +/* generic interrupt controller definitions */ +#define GICD_BASE 0xF1001000 +#define GICC_BASE 0xF1002000
These probably belong elsewhere, arch/arm/include/asm/arch-.../
include/configs/poplar.h line 69
Quoted 7 lines
include/configs/poplar.h new file +7
-0+/***************************************************************************** +* Initial environment variables +*****************************************************************************/ + +#define CONFIG_NETMASK 255.255.255.0 +#define CONFIG_SERVERIP 192.168.1.4 +#define CONFIG_GATEWAYIP 192.168.1.1
NAK. We really should be dropping these entirely I believe. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170508/42f14b82/attachment.sig>
PATCH v2 5/5 ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards
Quoted 5 lines · Tom Rini
include/configs/poplar.h line 69
Quoted 4 lines
include/configs/poplar.h new file +4
-0+ +#define CONFIG_NETMASK 255.255.255.0 +#define CONFIG_SERVERIP 192.168.1.4 +#define CONFIG_GATEWAYIP 192.168.1.1NAK. We really should be dropping these entirely I believe. Thanks!
ok..
fixed in v3
PATCH v2 1/5 ARM64: dts: hi3798cv200-poplar: add device tree bindings
In reply to Jorge Ramirez-OrtizQuoted 1 line · Jorge Ramirez-Ortiz
pulled from linux-next tag 20170505
OK, but linux-next isn't stable. Do you know if for example this is expected to be pulled in for v4.12? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170508/c92ee95d/attachment.sig>
PATCH v2 1/5 ARM64: dts: hi3798cv200-poplar: add device tree bindings
Quoted 5 lines · Tom Rini
Quoted 1 line · Jorge Ramirez-Ortiz
pulled from linux-next tag 20170505
OK, but linux-next isn't stable. Do you know if for example this is expected to be pulled in for v4.12? Thanks!
yes, that is my understanding. But I'll let Alex Elder v-in copy- confirm.