ARM: sunxi: Introduce CHIP support
Subsystems (3)
cover ARM: sunxi: Introduce CHIP support
Hi,
Here is a serie introducing the support for the Allwinner R8 and the Nextthing's CHIP.
The only missing parts for now are the display on the composite output and the NAND support that will come in due time.
Everything else should work just fine, including the USB gadget and host support.
Let me know what you think,
Maxime
Maxime Ripard (6):
sunxi: Add an option to disable MMC
fastboot: Implement OEM format only when we have MMC support
sunxi: Add the R8 DTSI
ARM: sun5i: dt: Move uart3 pinctrl node to common DTSI
ARM: sun5i: dt: Add UART3 CTS and RTS pins
sunxi: Add CHIP support
arch/arm/cpu/armv7/sunxi/board.c | 6 + arch/arm/dts/Makefile | 3 +- arch/arm/dts/sun5i-a10s.dtsi | 7 -- arch/arm/dts/sun5i-r8-chip.dts | 261 +++++++++++++++++++++++++++++++++++++++ arch/arm/dts/sun5i-r8.dtsi | 61 +++++++++ arch/arm/dts/sun5i.dtsi | 14 +++ configs/CHIP_defconfig | 14 +++ drivers/usb/gadget/f_fastboot.c | 2 +- include/configs/sunxi-common.h | 7 +- 9 files changed, 364 insertions(+), 11 deletions(-) create mode 100644 arch/arm/dts/sun5i-r8-chip.dts create mode 100644 arch/arm/dts/sun5i-r8.dtsi create mode 100644 configs/CHIP_defconfig
Signature · 1 line
2.5.1
PATCH 1/6 sunxi: Add an option to disable MMC
Some devices don't have any MMC devices, so it doesn't really make sense to enable the MMC related functions and options for them.
Add an option to disable the MMC support entirely.
--- arch/arm/cpu/armv7/sunxi/board.c | 6 ++++++ include/configs/sunxi-common.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/sunxi/board.c +6 -0
@@ -135,7 +135,9 @@ DECLARE_GLOBAL_DATA_PTR;*/ u32 spl_boot_device (void ) { +#ifdef CONFIG_MMC struct mmc *mmc0, *mmc1; +#endif /* * When booting from the SD card or NAND memory, the "eGON.BT0" * signature is expected to be found in memory at the address 0x0004
@@ -156,15 +158,18 @@ u32 spl_boot_device(void)return BOOT_DEVICE_BOARD ;/* The BROM will try to boot from mmc0 first, so try that first. */ +#ifdef CONFIG_MMC mmc_initialize (gd->bd); mmc0 =find_mmc_device (0 );if (sunxi_mmc_has_egon_boot_signature (mmc0))return BOOT_DEVICE_MMC1 ; +#endif /* Fallback to booting NAND if enabled. */ if (IS_ENABLED (CONFIG_SPL_NAND_SUPPORT ))return BOOT_DEVICE_NAND ; +#ifdef CONFIG_MMC if (CONFIG_MMC_SUNXI_SLOT_EXTRA ==2 ) { mmc1 =find_mmc_device (1 );if (sunxi_mmc_has_egon_boot_signature (mmc1)) {
@@ -178,6 +183,7 @@ u32 spl_boot_device(void) return BOOT_DEVICE_MMC2; } } +#endif panic ("Could not determine boot source\n" );return -1 ;/* Never reached */
include/configs/sunxi-common.h +5 -2
@@ -142,7 +142,7 @@#endif /* mmc config */ -#if !defined(CONFIG_UART0_PORT_F ) +#if !defined(CONFIG_UART0_PORT_F ) && !defined(CONFIG_NO_MMC )#define CONFIG_MMC #define CONFIG_GENERIC_MMC #define CONFIG_CMD_MMC
@@ -199,7 +199,7 @@#define CONFIG_SPL_LIBDISK_SUPPORT -#if !defined(CONFIG_UART0_PORT_F ) +#if !defined(CONFIG_UART0_PORT_F ) && !defined(CONFIG_NO_MMC )#define CONFIG_SPL_MMC_SUPPORT #endif
@@ -360,9 +360,12 @@ extern int soft_i2c_gpio_scl;#define CONFIG_FASTBOOT_BUF_SIZE 0x2000000#define CONFIG_FASTBOOT_FLASH + +#ifdef CONFIG_MMC #define CONFIG_FASTBOOT_FLASH_MMC_DEV 0#define CONFIG_EFI_PARTITION #endif +#endif #ifdef CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_CMD_USB_MASS_STORAGE
Signature · 1 line
2.5.1
PATCH 1/6 sunxi: Add an option to disable MMC
Hi,
First if all, thanks for the patches for this. I've a couple of comments on a few of them (including this one) I'll reply to the one I've comments on. no reply means I think it is fine :)
Quoted 57 lines · Maxime Ripard
Some devices don't have any MMC devices, so it doesn't really make sense to enable the MMC related functions and options for them.
Add an option to disable the MMC support entirely.
Signed-off-by Maxime Ripard <[email protected]>--- arch/arm/cpu/armv7/sunxi/board.c | 6 ++++++ include/configs/sunxi-common.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-)arch/arm/cpu/armv7/sunxi/board.c +6
-0@@ -135,7 +135,9 @@ DECLARE_GLOBAL_DATA_PTR;*/ u32 spl_boot_device (void ) { +#ifdef CONFIG_MMC struct mmc *mmc0, *mmc1; +#endif /* * When booting from the SD card or NAND memory, the "eGON.BT0" * signature is expected to be found in memory at the address 0x0004 @@ -156,15 +158,18 @@ u32 spl_boot_device(void)return BOOT_DEVICE_BOARD ;/* The BROM will try to boot from mmc0 first, so try that first. */ +#ifdef CONFIG_MMC mmc_initialize (gd->bd); mmc0 =find_mmc_device (0 );if (sunxi_mmc_has_egon_boot_signature (mmc0))return BOOT_DEVICE_MMC1 ; +#endif /* Fallback to booting NAND if enabled. */ if (IS_ENABLED (CONFIG_SPL_NAND_SUPPORT ))return BOOT_DEVICE_NAND ; +#ifdef CONFIG_MMC if (CONFIG_MMC_SUNXI_SLOT_EXTRA ==2 ) { mmc1 =find_mmc_device (1 );if (sunxi_mmc_has_egon_boot_signature (mmc1)) {@@ -178,6 +183,7 @@ u32 spl_boot_device(void) return BOOT_DEVICE_MMC2; } } +#endif panic ("Could not determine boot source\n" );return -1 ;/* Never reached */ include/configs/sunxi-common.h +0
-0
include/configs/sunxi-common.h line 145
Quoted 5 lines
include/configs/sunxi-common.h +1
-1@@ -142,7 +142,7 @@#endif /* mmc config */ -#if !defined(CONFIG_UART0_PORT_F ) +#if !defined(CONFIG_UART0_PORT_F ) && !defined(CONFIG_NO_MMC )
You're introducing a CONFIG_NO_MMC here, and setting that using EXTRA_OPTIONS. EXTRA_OPTIONS has been deprecated, and adding new options there is something which we do not want to do.
Instead I think it would be better to Kconfig-ify CONFIG_MMC, the problem with doing this is that CONFIG_MMC gets used by almost all SoCs supported by u-boot, and moving all of them to use Kconfig for this at once is not ideal.
What u-boot has been doing so far for this is using a construct like this:
config SYS_CLK_FREQ
depends on ARC || ARCH_SUNXI
int "CPU clock frequency"
help
TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture
So for mmc we would get something like this in drivers/mmc/Kconfig:
config MMC
depends on ARCH_SUNXI
bool "Enable MMC support"
help
TODO: Move CONFIG_MMC for all the architecture
And in board/sunxi/Kconfig
config MMC
default y if ARCH_SUNXI && !UART0_PORT_F
We need the if ARCH_SUNXI to make "make savedefconfig" not cry out on non SUNXI archs.
And then in sunxi-common.h we can just do:
#ifdef CONFIG_MMC
#define CONFIG_GENERIC_MMC
...
include/configs/sunxi-common.h line 205
Quoted 12 lines
include/configs/sunxi-common.h +1
-1#define CONFIG_MMC #define CONFIG_GENERIC_MMC #define CONFIG_CMD_MMC @@ -199,7 +199,7 @@#define CONFIG_SPL_LIBDISK_SUPPORT -#if !defined(CONFIG_UART0_PORT_F ) +#if !defined(CONFIG_UART0_PORT_F ) && !defined(CONFIG_NO_MMC )#define CONFIG_SPL_MMC_SUPPORT #endif
And this would become #ifdef CONFIG_MMC too
Quoted 4 lines
include/configs/sunxi-common.h +0
-0@@ -360,9 +360,12 @@ extern int soft_i2c_gpio_scl;#define CONFIG_FASTBOOT_BUF_SIZE 0x2000000
include/configs/sunxi-common.h extern int soft_i2c_gpio_scl; · line 371
Quoted 10 lines
include/configs/sunxi-common.h +3
-0#define CONFIG_FASTBOOT_FLASH + +#ifdef CONFIG_MMC #define CONFIG_FASTBOOT_FLASH_MMC_DEV 0#define CONFIG_EFI_PARTITION #endif +#endif #ifdef CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_CMD_USB_MASS_STORAGE
Regards,
Hans
PATCH 1/6 sunxi: Add an option to disable MMC
Hi Hans,
Quoted 117 lines · Hans de Goede
Hi,
First if all, thanks for the patches for this. I've a couple of comments on a few of them (including this one) I'll reply to the one I've comments on. no reply means I think it is fine :)
Quoted 57 lines · Maxime Ripard
Some devices don't have any MMC devices, so it doesn't really make sense to enable the MMC related functions and options for them.
Add an option to disable the MMC support entirely.
Signed-off-by Maxime Ripard <[email protected]>--- arch/arm/cpu/armv7/sunxi/board.c | 6 ++++++ include/configs/sunxi-common.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-)arch/arm/cpu/armv7/sunxi/board.c +6
-0@@ -135,7 +135,9 @@ DECLARE_GLOBAL_DATA_PTR;*/ u32 spl_boot_device (void ) { +#ifdef CONFIG_MMC struct mmc *mmc0, *mmc1; +#endif /* * When booting from the SD card or NAND memory, the "eGON.BT0" * signature is expected to be found in memory at the address 0x0004 @@ -156,15 +158,18 @@ u32 spl_boot_device(void)return BOOT_DEVICE_BOARD ;/* The BROM will try to boot from mmc0 first, so try that first. */ +#ifdef CONFIG_MMC mmc_initialize (gd->bd); mmc0 =find_mmc_device (0 );if (sunxi_mmc_has_egon_boot_signature (mmc0))return BOOT_DEVICE_MMC1 ; +#endif /* Fallback to booting NAND if enabled. */ if (IS_ENABLED (CONFIG_SPL_NAND_SUPPORT ))return BOOT_DEVICE_NAND ; +#ifdef CONFIG_MMC if (CONFIG_MMC_SUNXI_SLOT_EXTRA ==2 ) { mmc1 =find_mmc_device (1 );if (sunxi_mmc_has_egon_boot_signature (mmc1)) {@@ -178,6 +183,7 @@ u32 spl_boot_device(void) return BOOT_DEVICE_MMC2; } } +#endif panic ("Could not determine boot source\n" );return -1 ;/* Never reached */ include/configs/sunxi-common.h +0
-0include/configs/sunxi-common.h line 145
Quoted 5 lines
include/configs/sunxi-common.h +1
-1@@ -142,7 +142,7 @@#endif /* mmc config */ -#if !defined(CONFIG_UART0_PORT_F ) +#if !defined(CONFIG_UART0_PORT_F ) && !defined(CONFIG_NO_MMC )You're introducing a
CONFIG_NO_MMChere, and setting that usingEXTRA_OPTIONS.EXTRA_OPTIONShas been deprecated, and adding new options there is something which we do not want to do.Instead I think it would be better to Kconfig-ify
CONFIG_MMC, the problem with doing this is thatCONFIG_MMCgets used by almost all SoCs supported by u-boot, and moving all of them to useKconfigfor this at once is not ideal.What u-boot has been doing so far for this is using a construct like this:
config
SYS_CLK_FREQ
depends on ARC ||ARCH_SUNXI
int "CPU clock frequency"
help
TODO: MoveCONFIG_SYS_CLK_FREQfor all the architectureSo for mmc we would get something like this in
drivers/mmc/Kconfig:config MMC
depends onARCH_SUNXI
bool "Enable MMC support"
help
TODO: MoveCONFIG_MMCfor all the architectureAnd in board/sunxi/Kconfig
config MMC
default y if ARCH_SUNXI && !UART0_PORT_FWe need the if
ARCH_SUNXIto make "make savedefconfig" not cry out on non SUNXI archs.And then in
sunxi-common.hwe can just do:#ifdef
CONFIG_MMC
#defineCONFIG_GENERIC_MMC
...Quoted 7 lines
include/configs/sunxi-common.h +0
-0#define CONFIG_MMC #define CONFIG_GENERIC_MMC #define CONFIG_CMD_MMC @@ -199,7 +199,7 @@#define CONFIG_SPL_LIBDISK_SUPPORT
Quoted 7 lines
include/configs/sunxi-common.h line 205
Quoted 5 lines
include/configs/sunxi-common.h +1
-1-#if !defined(CONFIG_UART0_PORT_F ) +#if !defined(CONFIG_UART0_PORT_F ) && !defined(CONFIG_NO_MMC )#define CONFIG_SPL_MMC_SUPPORT #endif And this would become #ifdef
CONFIG_MMCtoo
That sounds great. I'll switch to that.
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- 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/20150922/eebefde2/attachment.sig>
PATCH 1/6 sunxi: Add an option to disable MMC
In reply to Maxime RipardQuoted 16 lines · Maxime Ripard
Some devices don't have any MMC devices, so it doesn't really make sense to enable the MMC related functions and options for them.
Add an option to disable the MMC support entirely.
Signed-off-by Maxime Ripard <[email protected]>--- arch/arm/cpu/armv7/sunxi/board.c | 6 ++++++ include/configs/sunxi-common.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-)arch/arm/cpu/armv7/sunxi/board.c +0
-0
arch/arm/cpu/armv7/sunxi/board.c DECLARE_GLOBAL_DATA_PTR; · line 143
Quoted 9 lines
arch/arm/cpu/armv7/sunxi/board.c +2
-0@@ -135,7 +135,9 @@ DECLARE_GLOBAL_DATA_PTR;*/ u32 spl_boot_device (void ) { +#ifdef CONFIG_MMC struct mmc *mmc0, *mmc1; +#endif /* * When booting from the SD card or NAND memory, the "eGON.BT0" * signature is expected to be found in memory at the address 0x0004
Just __maybe_unused here, if that's fine with Hans.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150918/7f1dc91e/attachment.sig>
PATCH 1/6 sunxi: Add an option to disable MMC
Hi,
Quoted 13 lines · Tom Rini
Quoted 11 lines · Maxime Ripard
Some devices don't have any MMC devices, so it doesn't really make sense to enable the MMC related functions and options for them.
Add an option to disable the MMC support entirely.
Signed-off-by Maxime Ripard <[email protected]>--- arch/arm/cpu/armv7/sunxi/board.c | 6 ++++++ include/configs/sunxi-common.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-)
Quoted 16 lines
Quoted 5 lines
arch/arm/cpu/armv7/sunxi/board.c +0
-0arch/arm/cpu/armv7/sunxi/board.c DECLARE_GLOBAL_DATA_PTR; · line 143
Quoted 9 lines
arch/arm/cpu/armv7/sunxi/board.c +2
-0@@ -135,7 +135,9 @@ DECLARE_GLOBAL_DATA_PTR;*/ u32 spl_boot_device (void ) { +#ifdef CONFIG_MMC struct mmc *mmc0, *mmc1; +#endif /* * When booting from the SD card or NAND memory, the "eGON.BT0" * signature is expected to be found in memory at the address 0x0004 Just
__maybe_unusedhere, if that's fine with Hans.
Yes that works for me.
Regards,
Hans
PATCH 1/6 sunxi: Add an option to disable MMC
In reply to Tom RiniQuoted 13 lines · Tom Rini
Quoted 11 lines · Maxime Ripard
Some devices don't have any MMC devices, so it doesn't really make sense to enable the MMC related functions and options for them.
Add an option to disable the MMC support entirely.
Signed-off-by Maxime Ripard <[email protected]>--- arch/arm/cpu/armv7/sunxi/board.c | 6 ++++++ include/configs/sunxi-common.h | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-)
Quoted 16 lines
Quoted 5 lines
arch/arm/cpu/armv7/sunxi/board.c +0
-0arch/arm/cpu/armv7/sunxi/board.c DECLARE_GLOBAL_DATA_PTR; · line 143
Quoted 9 lines
arch/arm/cpu/armv7/sunxi/board.c +2
-0@@ -135,7 +135,9 @@ DECLARE_GLOBAL_DATA_PTR;*/ u32 spl_boot_device (void ) { +#ifdef CONFIG_MMC struct mmc *mmc0, *mmc1; +#endif /* * When booting from the SD card or NAND memory, the "eGON.BT0" * signature is expected to be found in memory at the address 0x0004 Just
__maybe_unusedhere, if that's fine with Hans.
Ack.
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- 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/20150922/1edb12a6/attachment.sig>
PATCH 2/6 fastboot: Implement OEM format only when we have MMC support
In reply to Maxime RipardThe current fastboot support assumes that CONFIG_FASTBOOT_FLASH implies that we have an MMC in our system, which might not be the case if we have some other storage device.
Change the configuration option protecting that call to FASTBOOT_FLASH_MMC_DEV, that makes much more sense.
--- drivers/usb/gadget/f_fastboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/f_fastboot.c +1 -1
@@ -554,7 +554,7 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) static void cb_oem(struct usb_ep *ep, struct usb_request *req) { char *cmd = req->buf; -#ifdef CONFIG_FASTBOOT_FLASH +#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV if (strncmp("format", cmd + 4, 6) == 0) { char cmdbuf[32]; sprintf(cmdbuf, "gpt write mmc %x $partitions",
Signature · 1 line
2.5.1
PATCH 2/6 fastboot: Implement OEM format only when we have MMC support
Hi,
Quoted 8 lines · Maxime Ripard
The current fastboot support assumes that
CONFIG_FASTBOOT_FLASHimplies that we have an MMC in our system, which might not be the case if we have some other storage device.Change the configuration option protecting that call to
FASTBOOT_FLASH_MMC_DEV, that makes much more sense.Signed-off-by Maxime Ripard <[email protected]>
Note I'm not going to take this one upstream through the sunxi tree, other then that it looks fine to me.
Regards,
Hans
Quoted 18 lines
--- drivers/usb/gadget/f_fastboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/gadget/f_fastboot.c +1
-1@@ -554,7 +554,7 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) static void cb_oem(struct usb_ep *ep, struct usb_request *req) { char *cmd = req->buf; -#ifdef CONFIG_FASTBOOT_FLASH +#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV if (strncmp("format", cmd + 4, 6) == 0) { char cmdbuf[32]; sprintf(cmdbuf, "gpt write mmc %x $partitions",
PATCH 2/6 fastboot: Implement OEM format only when we have MMC support
Hi Hans,
Quoted 7 lines · Hans de Goede
Hi,
Quoted 4 lines · Maxime Ripard
The current fastboot support assumes that
CONFIG_FASTBOOT_FLASHimplies that we have an MMC in our system, which might not be the case if we have some other storage device.
Quoted 7 lines
Quoted 4 lines
Change the configuration option protecting that call to
FASTBOOT_FLASH_MMC_DEV, that makes much more sense.Signed-off-by Maxime Ripard <[email protected]>Note I'm not going to take this one upstream through the sunxi tree, other then that it looks fine to me.
Yes, I was kind of expecting that, this is why Marek and Lukasz are in Cc.
However, IIRC, there is some compilation breakage in fastboot when CONFIG_MMC is not there, so that might be trickier to merge.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- 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/20150922/5a0fc472/attachment.sig>
PATCH 2/6 fastboot: Implement OEM format only when we have MMC support
In reply to Maxime RipardQuoted 8 lines · Maxime Ripard
The current fastboot support assumes that
CONFIG_FASTBOOT_FLASHimplies that we have an MMC in our system, which might not be the case if we have some other storage device.Change the configuration option protecting that call to
FASTBOOT_FLASH_MMC_DEV, that makes much more sense.Signed-off-by Maxime Ripard <[email protected]>
Until this gets cleaned up to support oem flash on non-MMC:
Or do you have patches that will add that support as part of the fastboot / sparse image stuff you already posted? If so, we should just do that then and not need this patch.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150918/1620305c/attachment.sig>
PATCH 2/6 fastboot: Implement OEM format only when we have MMC support
Hi Tom,
Quoted 11 lines · Tom Rini
Quoted 8 lines · Maxime Ripard
The current fastboot support assumes that
CONFIG_FASTBOOT_FLASHimplies that we have an MMC in our system, which might not be the case if we have some other storage device.Change the configuration option protecting that call to
FASTBOOT_FLASH_MMC_DEV, that makes much more sense.Signed-off-by Maxime Ripard <[email protected]>
Quoted 7 lines
Until this gets cleaned up to support oem flash on non-MMC:
Reviewed-by Tom Rini <[email protected]>Or do you have patches that will add that support as part of the fastboot / sparse image stuff you already posted? If so, we should just do that then and not need this patch.
I'm a bit unclear on what oem format should do on an NAND (since there's no on-storage partition table), but yeah, that should be adressed by my other fastboot serie.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- 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/20150922/d667fe0d/attachment.sig>
PATCH 3/6 sunxi: Add the R8 DTSI
In reply to Maxime RipardThe R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Add a DTSI based on the A13's to hold those differences.
--- arch/arm/dts/sun5i-r8.dtsi | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 arch/arm/dts/sun5i-r8.dtsi
arch/arm/dts/sun5i-r8.dtsi new file +61 -0
@@ -0,0 +1,61 @@ +/* + * Copyright 2015 Free Electrons + * Copyright 2015 NextThing Co + * + * Maxime Ripard <[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 "sun5i-a13.dtsi" + +/ { + chosen { + framebuffer at 1 { + compatible = "allwinner,simple-framebuffer", + "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0-tve0"; + clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>, + <&ahb_gates 44>; + status = "disabled"; + }; + }; +};
Signature · 1 line
2.5.1
PATCH 3/6 sunxi: Add the R8 DTSI
Quoted 6 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Add a DTSI based on the A13's to hold those differences.
Signed-off-by Maxime Ripard <[email protected]>
Other than needing to use SPDX tags instead:
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150918/fcf57531/attachment.sig>
[U-Boot] [linux-sunxi] Re: [PATCH 3/6] sunxi: Add the R8 DTSI
Hi,
Quoted 11 lines · Tom Rini
Quoted 6 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Add a DTSI based on the A13's to hold those differences.
Signed-off-by Maxime Ripard <[email protected]>Other than needing to use SPDX tags instead:
Reviewed-by Tom Rini <[email protected]>
This is in essence a partial sync with the kernel tree wrt the dts files, so no SPDX tags.
Regards,
Hans
[U-Boot] [linux-sunxi] Re: [PATCH 3/6] sunxi: Add the R8 DTSI
Quoted 10 lines · Hans de Goede
Hi,
Quoted 7 lines · Tom Rini
Quoted 5 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Add a DTSI based on the A13's to hold those differences.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Maxime Ripard <[email protected]>Other than needing to use SPDX tags instead:
Reviewed-by Tom Rini <[email protected]>This is in essence a partial sync with the kernel tree wrt the dts files, so no SPDX tags.
Really? I'd have sworn that we were doing that even on kernel files, but it's not a huge deal if we aren't I suppose..
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150918/8c7e13a4/attachment.sig>
[U-Boot] [linux-sunxi] Re: [PATCH 3/6] sunxi: Add the R8 DTSI
Hi,
Quoted 13 lines · Tom Rini
Quoted 12 lines · Hans de Goede
Hi,
Quoted 9 lines · Tom Rini
Quoted 6 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Add a DTSI based on the A13's to hold those differences.
Signed-off-by Maxime Ripard <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Other than needing to use SPDX tags instead:
Reviewed-by Tom Rini <[email protected]>This is in essence a partial sync with the kernel tree wrt the dts files, so no SPDX tags.
Really? I'd have sworn that we were doing that even on kernel files,
I don't know. I'm fine either way, but I do not think we should be adding SPDX tags on the u-boot side only for these files, since those will just get overwritten (removed) on the next sync with the kernel.
Regards,
Hans
[U-Boot] [linux-sunxi] Re: [PATCH 3/6] sunxi: Add the R8 DTSI
Quoted 19 lines · Hans de Goede
Hi,
Quoted 16 lines · Tom Rini
Quoted 15 lines · Hans de Goede
Hi,
Quoted 11 lines · Tom Rini
Quoted 6 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Add a DTSI based on the A13's to hold those differences.
Signed-off-by Maxime Ripard <[email protected]>Other than needing to use SPDX tags instead:
Reviewed-by Tom Rini <[email protected]>
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
This is in essence a partial sync with the kernel tree wrt the dts files, so no SPDX tags.
Really? I'd have sworn that we were doing that even on kernel files,
I don't know. I'm fine either way, but I do not think we should be adding SPDX tags on the u-boot side only for these files, since those will just get overwritten (removed) on the next sync with the kernel.
Given the current (and it's going to need some work to acheive and then keep) goal of just re-using kernel dts files, yeah, lets avoid noise here. I think the other places we sync have enough other stuff going on that it's not just a drop-in.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150918/f1f2c4ce/attachment.sig>
[U-Boot] [linux-sunxi] Re: [PATCH 3/6] sunxi: Add the R8 DTSI
In reply to Hans de GoedeHi,
Quoted 28 lines · Hans de Goede
Hi,
Quoted 25 lines · Tom Rini
Quoted 21 lines · Hans de Goede
Hi,
Quoted 6 lines · Tom Rini
Quoted 3 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Quoted 7 lines
Quoted 3 lines
Add a DTSI based on the A13's to hold those differences.
Signed-off-by Maxime Ripard <[email protected]>Other than needing to use SPDX tags instead:
Reviewed-by Tom Rini <[email protected]>This is in essence a partial sync with the kernel tree wrt the dts files, so no SPDX tags.
Quoted 6 lines
Quoted 1 line
Really? I'd have sworn that we were doing that even on kernel files,
I don't know. I'm fine either way, but I do not think we should be adding SPDX tags on the u-boot side only for these files, since those will just get overwritten (removed) on the next sync with the kernel.
Would it make sense to just add them kernel side?
Thanks,
Signature · 4 lines
Julian Calaby Email: julian.calaby at gmail.com Profile: http://www.google.com/profiles/julian.calaby/
[U-Boot] [linux-sunxi] Re: [PATCH 3/6] sunxi: Add the R8 DTSI
Quoted 31 lines · Julian Calaby
Hi,
Quoted 28 lines · Hans de Goede
Hi,
Quoted 25 lines · Tom Rini
Quoted 21 lines · Hans de Goede
Hi,
Quoted 6 lines · Tom Rini
Quoted 3 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Quoted 7 lines
Quoted 3 lines
Add a DTSI based on the A13's to hold those differences.
Signed-off-by Maxime Ripard <[email protected]>Other than needing to use SPDX tags instead:
Reviewed-by Tom Rini <[email protected]>This is in essence a partial sync with the kernel tree wrt the dts files, so no SPDX tags.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Really? I'd have sworn that we were doing that even on kernel files,
I don't know. I'm fine either way, but I do not think we should be adding SPDX tags on the u-boot side only for these files, since those will just get overwritten (removed) on the next sync with the kernel.
Would it make sense to just add them kernel side?
No because we use them instead of the big boiler-plate version of the license.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150919/2163c37a/attachment.sig>
[U-Boot] [linux-sunxi] Re: [PATCH 3/6] sunxi: Add the R8 DTSI
Quoted 35 lines · Tom Rini
Quoted 34 lines · Julian Calaby
Hi,
Quoted 31 lines · Hans de Goede
Hi,
Quoted 26 lines · Tom Rini
Quoted 15 lines · Hans de Goede
Hi,
Quoted 11 lines · Tom Rini
Quoted 6 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Add a DTSI based on the A13's to hold those differences.
Signed-off-by Maxime Ripard <[email protected]>Quoted 6 lines
Quoted 2 lines
Other than needing to use SPDX tags instead:
Reviewed-by Tom Rini <[email protected]>This is in essence a partial sync with the kernel tree wrt the dts files, so no SPDX tags.
Really? I'd have sworn that we were doing that even on kernel files,
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
I don't know. I'm fine either way, but I do not think we should be adding SPDX tags on the u-boot side only for these files, since those will just get overwritten (removed) on the next sync with the kernel.
Would it make sense to just add them kernel side?
No because we use them instead of the big boiler-plate version of the license.
I guess his point is that the DT in the kernel should have it. I'm not sure if it's something we use in the krenel. I've seen GKH nak some suggestions on this, but maybe the DT are an exception.
I'll ask the arm soc maintainers, and change if they agree.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- 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/20150922/f3262631/attachment.sig>
PATCH 3/6 sunxi: Add the R8 DTSI
In reply to Maxime RipardQuoted 4 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Add a DTSI based on the A13's to hold those differences.
Is this a direct import of one from the Linux tree?
Quoted 77 lines
Signed-off-by Maxime Ripard <[email protected]>--- arch/arm/dts/sun5i-r8.dtsi | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 arch/arm/dts/sun5i-r8.dtsiarch/arm/dts/sun5i-r8.dtsi new file +14
-0@@ -0,0 +1,61 @@ +/* + * Copyright 2015 Free Electrons + * Copyright 2015 NextThing Co + * + * Maxime Ripard <[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 ofthe
+ * 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.+ */
arch/arm/dts/sun5i-r8.dtsi new file +12
-0+ +#include "skeleton.dtsi" + +#include "sun5i-a13.dtsi" + +/ { + chosen { + framebuffer at 1 { + compatible = "allwinner,simple-framebuffer", + "simple-framebuffer"; + allwinner,pipeline = "de_be0-lcd0-tve0"; + clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates36>,
arch/arm/dts/sun5i-r8.dtsi new file +5
-0+ <&ahb_gates 44>; + status = "disabled"; + }; + }; +};
PATCH 3/6 sunxi: Add the R8 DTSI
Hi Ian,
Quoted 7 lines · Ian Campbell
Quoted 4 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Add a DTSI based on the A13's to hold those differences.
Is this a direct import of one from the Linux tree?
Yes, it has been submitted here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-September/371010.html
It has some reviews, so it will likely change.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- 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/20150922/dd67401f/attachment.sig>
PATCH 3/6 sunxi: Add the R8 DTSI
Quoted 9 lines · Maxime Ripard
Hi Ian,
Quoted 6 lines · Ian Campbell
Quoted 4 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Add a DTSI based on the A13's to hold those differences.
Quoted 7 lines
Quoted 1 line
Is this a direct import of one from the Linux tree?
Yes, it has been submitted here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-September/3710
10.htmlIt has some reviews, so it will likely change.
Thanks, we should wait until it is queued up for Linux before applying then.
Hans usually says "The dts is identical to the dts submitted to the upstream kernel." or similar in the commit message which is useful.
Ian.
PATCH 3/6 sunxi: Add the R8 DTSI
Quoted 12 lines · Ian Campbell
Quoted 11 lines · Maxime Ripard
Hi Ian,
Quoted 7 lines · Ian Campbell
Quoted 4 lines · Maxime Ripard
The R8 is very close to the A13, but it still has a few differences, notably a composite output, which the A13 lacks.
Add a DTSI based on the A13's to hold those differences.
Is this a direct import of one from the Linux tree?
Quoted 8 lines
Quoted 5 lines
Yes, it has been submitted here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-September/3710
10.htmlIt has some reviews, so it will likely change.
Thanks, we should wait until it is queued up for Linux before applying then.
Yep.
Quoted 2 lines
Hans usually says "The dts is identical to the dts submitted to the upstream kernel." or similar in the commit message which is useful.
Ok, I'll add that.
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- 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/20150922/863d7690/attachment.sig>
PATCH 4/6 ARM: sun5i: dt: Move uart3 pinctrl node to common DTSI
In reply to Maxime RipardThe uart3 pins are shared between the A10s and A13, move the pinctrl node to the common DTSI to avoid duplication.
--- arch/arm/dts/sun5i-a10s.dtsi | 7 ------- arch/arm/dts/sun5i.dtsi | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/dts/sun5i-a10s.dtsi +0 -7
@@ -176,13 +176,6 @@ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; - uart3_pins_a: uart3 at 0 { - allwinner,pins = "PG9", "PG10"; - allwinner,function = "uart3"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; - }; - emac_pins_a: emac0 at 0 { allwinner,pins = "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6",
arch/arm/dts/sun5i.dtsi +7 -0
@@ -528,6 +528,13 @@ allwinner,drive = <SUN4I_PINCTRL_30_MA>; allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; }; + + uart3_pins_a: uart3 at 0 { + allwinner,pins = "PG9", "PG10"; + allwinner,function = "uart3"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; }; timer at 01c20c00 {
Signature · 1 line
2.5.1
PATCH 4/6 ARM: sun5i: dt: Move uart3 pinctrl node to common DTSI
Quoted 4 lines · Maxime Ripard
The uart3 pins are shared between the A10s and A13, move the pinctrl node to the common DTSI to avoid duplication.
Signed-off-by Maxime Ripard <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150918/085e5795/attachment.sig>
PATCH 5/6 ARM: sun5i: dt: Add UART3 CTS and RTS pins
In reply to Maxime RipardAdd a separate pinctrl node for the UART3 CTS and RTS pins shared between the A10s and A13.
--- arch/arm/dts/sun5i.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/dts/sun5i.dtsi +7 -0
@@ -535,6 +535,13 @@ allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; + + uart3_pins_cts_rts_a: uart3-cts-rts at 0 { + allwinner,pins = "PG11", "PG12"; + allwinner,function = "uart3"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; }; timer at 01c20c00 {
Signature · 1 line
2.5.1
PATCH 5/6 ARM: sun5i: dt: Add UART3 CTS and RTS pins
Quoted 4 lines · Maxime Ripard
Add a separate pinctrl node for the UART3 CTS and RTS pins shared between the A10s and A13.
Signed-off-by Maxime Ripard <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150918/9f23d06a/attachment.sig>
PATCH 6/6 sunxi: Add CHIP support
In reply to Maxime RipardThe C.H.I.P. is a small SBC with an Allwinner R8, 8GB of NAND, 512MB of RAM, USB host and OTG, a wifi / bluetooth combo chip, an audio/video jack and two connectors to plug additional boards on top of it.
--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/sun5i-r8-chip.dts | 261 +++++++++++++++++++++++++++++++++++++++++ configs/CHIP_defconfig | 14 +++ 3 files changed, 277 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/sun5i-r8-chip.dts create mode 100644 configs/CHIP_defconfig
arch/arm/dts/Makefile +2 -1
@@ -111,7 +111,8 @@ dtb-$(CONFIG_MACH_SUN5I) += \ sun5i-a13-olinuxino-micro.dtb \ sun5i-a13-q8-tablet.dtb \ sun5i-a13-tzx-q8-713b7.dtb \ - sun5i-a13-utoo-p66.dtb + sun5i-a13-utoo-p66.dtb \ + sun5i-r8-chip.dtb dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31-app4-evb1.dtb \ sun6i-a31-colombus.dtb \
arch/arm/dts/sun5i-r8-chip.dts new file +261 -0
261 lines not on this page · raw message
configs/CHIP_defconfig new file +14 -0
@@ -0,0 +1,14 @@ +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2,AXP209_POWER,NO_MMC" +CONFIG_DEFAULT_DEVICE_TREE="sun5i-r8-chip" +CONFIG_USB_MUSB_GADGET=y +CONFIG_USB_MUSB_SUNXI=y +CONFIG_USB0_VBUS_PIN="PB10" +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_MACH_SUN5I=y +CONFIG_DRAM_CLK=360 +CONFIG_DRAM_ZQ=123 +CONFIG_DRAM_EMR1=4 +CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_1333J=y +# CONFIG_CMD_IMLS is not set
Signature · 1 line
2.5.1
PATCH 6/6 sunxi: Add CHIP support
Hi,
Quoted 300 lines · Maxime Ripard
The C.H.I.P. is a small SBC with an Allwinner R8, 8GB of NAND, 512MB of RAM, USB host and OTG, a wifi / bluetooth combo chip, an audio/video jack and two connectors to plug additional boards on top of it.
Signed-off-by Maxime Ripard <[email protected]>--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/sun5i-r8-chip.dts | 261 +++++++++++++++++++++++++++++++++++++++++ configs/CHIP_defconfig | 14 +++ 3 files changed, 277 insertions(+), 1 deletion(-)create mode 100644
arch/arm/dts/sun5i-r8-chip.dtscreate mode 100644 configs/CHIP_defconfigarch/arm/dts/Makefile +2
-1@@ -111,7 +111,8 @@ dtb-$(CONFIG_MACH_SUN5I) += \ sun5i-a13-olinuxino-micro.dtb \ sun5i-a13-q8-tablet.dtb \ sun5i-a13-tzx-q8-713b7.dtb \ - sun5i-a13-utoo-p66.dtb + sun5i-a13-utoo-p66.dtb \ + sun5i-r8-chip.dtb dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31-app4-evb1.dtb \ sun6i-a31-colombus.dtb \arch/arm/dts/sun5i-r8-chip.dts new file +261
-0@@ -0,0 +1,261 @@ +/* + * Copyright 2015 Free Electrons + * Copyright 2015 NextThing Co + * + * Maxime Ripard <[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. + */ + +/dts-v1/; +#include "sun5i-a13.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/ { + model = "NextThing C.H.I.P."; + compatible = "nextthing,chip", "allwinner,sun5i-r8"; + + aliases { + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c2 = &i2c2; + serial0 = &uart1; + serial1 = &uart3; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + dram_vcc: dram_vcc { + compatible = "regulator-fixed"; + regulator-name = "dram-vcc"; + regulator-min-microvolt = <1600000>; + regulator-max-microvolt = <1600000>; + vin-supply = <&ipsout>; + regulator-always-on; + }; + + ipsout: ipsout { + compatible = "regulator-fixed"; + regulator-name = "ipsout"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + + usb0_vbus: usb0_vbus { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&chip_vbus_pin>; + + regulator-name = "vbus-usb0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc_5v0>; + gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>; /* PB10 */ + enable-active-high; + }; + + vcc_3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&ipsout>; + regulator-always-on; + }; + + vcc_5v0: vcc5v0 { + compatible = "regulator-fixed"; + regulator-name = "vcc-5v0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&ipsout>; + regulator-always-on; + }; +}; + +&ehci0 { + status = "okay"; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + + axp209: pmic at 34 { + reg = <0x34>; + + /* + * The interrupt is routed through the "External Fast + * Interrupt Request" pin (ball G13 of the module) + * directly to the main interrupt controller, without + * any other controller interfering. + */ + interrupts = <0>; + }; +}; + +#include "axp209.dtsi" + +/* + * i2c1 is routed to the external pins and doesn't have any device + * attached to it on the C.H.I.P itself. + */ +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins_a>; + status = "okay"; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins_a>; + status = "okay"; + + xio: gpio at 38 { + compatible = "nxp,pcf8574a"; + reg = <0x38>; + + gpio-controller; + #gpio-cells = <2>; + + interrupt-parent = <&pio>; + interrupts = <6 0 IRQ_TYPE_EDGE_FALLING>; + interrupt-controller; + #interrupt-cells = <2>; + }; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>; + vmmc-supply = <&vcc_3v3>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&otg_sram { + status = "okay"; +}; + +&pio { + chip_vbus_pin: chip_vbus_pin at 0 { + allwinner,pins = "PB10"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + + chip_id_det_pin: chip_id_det_pin at 0 { + allwinner,pins = "PG2"; + allwinner,function = "gpio_in"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; +}; + +®_dcdc2 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-name = "cpuvdd"; + regulator-always-on; +}; + +®_dcdc3 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1300000>; + regulator-name = "corevdd"; + regulator-always-on; +}; + +®_ldo1 { + regulator-name = "rtcvdd"; +}; + +®_ldo2 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "avcc"; + regulator-always-on; +}; + +®_ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "vcc-1v8"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins_b>; + status = "okay"; +}; + +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins_a>, + <&uart3_pins_cts_rts_a>; + status = "okay"; +}; + +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&usbphy { + pinctrl-names = "default"; + pinctrl-0 = <&chip_id_det_pin>; + status = "okay"; + + usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ + + usb0_vbus-supply = <&usb0_vbus>; + usb1_vbus-supply = <&vcc_5v0>; +};configs/CHIP_defconfig new file +0
-0
configs/CHIP_defconfig line 2
Quoted 2 lines
configs/CHIP_defconfig new file +2
-0@@ -0,0 +1,14 @@ +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2,AXP209_POWER,NO_MMC"
The NO_MMC bit needs to be replaced with:
# CONFIG_MMC is not set
Other then that this one looks good to me.
Regards,
Hans
Quoted 13 lines
configs/CHIP_defconfig new file +12
-0+CONFIG_DEFAULT_DEVICE_TREE="sun5i-r8-chip" +CONFIG_USB_MUSB_GADGET=y +CONFIG_USB_MUSB_SUNXI=y +CONFIG_USB0_VBUS_PIN="PB10" +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_MACH_SUN5I=y +CONFIG_DRAM_CLK=360 +CONFIG_DRAM_ZQ=123 +CONFIG_DRAM_EMR1=4 +CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_1333J=y +# CONFIG_CMD_IMLS is not set
PATCH 6/6 sunxi: Add CHIP support
In reply to Maxime RipardQuoted 5 lines · Maxime Ripard
The C.H.I.P. is a small SBC with an Allwinner R8, 8GB of NAND, 512MB of RAM, USB host and OTG, a wifi / bluetooth combo chip, an audio/video jack and two connectors to plug additional boards on top of it.
Signed-off-by Maxime Ripard <[email protected]>
Other than needing to use SPDX tags instead:
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150918/091113c5/attachment.sig>