[PATCH v1 0/2] Add support for the A64-uQ7 modules

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH v1 0/2] Add support for the A64-uQ7 modules

Philipp Tomsich
This changeset adds support for the A64-uQ7 modules from Theobroma
Systems, which is based on Allwinner's A64 (sun50iw1p1).

It depends on the device-model support for the sunxi subarchitecture
and the DM-based, dual-IO capable SPI driver which we submitted over
the last couple of days.

Given that these other patches are unmerged, this will (at this stage)
mainly serve as a reference point to better point these other
patchsets into perspective.


Philipp Tomsich (2):
  dts: lynx: add sun50i-a64-lynx.dts for the A64-uQ7
  lynx_defconfig: add defconfig for A64-uQ7 module

 arch/arm/dts/Makefile            |   1 +
 arch/arm/dts/sun50i-a64-lynx.dts | 247 +++++++++++++++++++++++++++++++++++++++
 configs/lynx_defconfig           |  84 +++++++++++++
 3 files changed, 332 insertions(+)
 create mode 100644 arch/arm/dts/sun50i-a64-lynx.dts
 create mode 100644 configs/lynx_defconfig

--
1.9.1

_______________________________________________
U-Boot mailing list
[hidden email]
http://lists.denx.de/mailman/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH v1 1/2] dts: lynx: add sun50i-a64-lynx.dts for the A64-uQ7

Philipp Tomsich
---
 arch/arm/dts/Makefile            |   1 +
 arch/arm/dts/sun50i-a64-lynx.dts | 247 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 248 insertions(+)
 create mode 100644 arch/arm/dts/sun50i-a64-lynx.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index da99eb4..5520529 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -297,6 +297,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
  sun8i-h3-orangepi-plus2e.dtb \
  sun8i-h3-nanopi-neo.dtb
 dtb-$(CONFIG_MACH_SUN50I) += \
+ sun50i-a64-lynx.dtb \
  sun50i-a64-pine64-plus.dtb \
  sun50i-a64-pine64.dtb
 dtb-$(CONFIG_MACH_SUN9I) += \
diff --git a/arch/arm/dts/sun50i-a64-lynx.dts b/arch/arm/dts/sun50i-a64-lynx.dts
new file mode 100644
index 0000000..f968c5f
--- /dev/null
+++ b/arch/arm/dts/sun50i-a64-lynx.dts
@@ -0,0 +1,247 @@
+/*
+ * Copyright (c) 2016 ARM Ltd.
+ * Copyright (c) 2016-2017, Theobroma Systems Design und Consulting GmbH
+ *
+ * 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 library 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 library 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 "sun50i-a64.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "Theobroma Systems A64-uQ7 (Lynx)";
+ compatible = "tsd,lynx", "allwinner,sun50i-a64";
+
+ aliases {
+ serial0 = &uart0;
+ ethernet0 = &emac;
+ spi0 = &spi0;
+ spi1 = &spi1;
+ };
+
+ soc {
+ reg_vcc3v3: vcc3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ /* There is a model with 2GB of DRAM, but U-Boot fixes this for us. */
+ memory: memory@40000000 {
+ reg = <0x40000000 0x40000000>;
+ };
+
+ config {
+ u-boot,boot-led = "lynx:orange:power";
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_pins_power>, <&led_pins_sdio>;
+
+ sdio {
+ label = "lynx:blue:sdio";
+ gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>;
+ };
+
+ power {
+ label = "lynx:orange:power";
+ gpios = <&pio 9 11 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&pio {
+ led_pins_sdio: led_pins_sdio {
+ allwinner,pins = "PH10";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_20_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
+ ethphy_reset_pin: ethphy_reset_pin {
+ allwinner,pins = "PD24";
+ allwinner,function = "gpio_out";
+ drive-strength = < 20 >;
+ bias-disable;
+ };
+
+ spi1_cs_pins: spi1_cs_pins {
+ allwinner,pins = "PD4";
+ allwinner,function = "gpio_out";
+ drive-strength = < 20 >;
+ bias-disable;
+ };
+};
+
+&r_pio {
+ led_pins_power: led_pins_power {
+ allwinner,pins = "PL11";
+ allwinner,function = "gpio_out";
+ allwinner,drive = <SUN4I_PINCTRL_20_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+};
+
+&mmc0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc0_pins>, <&mmc0_default_cd_pin>;
+ vmmc-supply = <&reg_vcc3v3>;
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+ cd-inverted;
+ status = "okay";
+};
+
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_8bit_pins>;
+ vmmc-supply = <&reg_vcc3v3>;
+ power-gpios = <&pio 2 16 GPIO_ACTIVE_HIGH>;
+ bus-width = <8>;
+ non-removable;
+ status = "okay";
+};
+
+&emac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii_pins>, <&ethphy_reset_pin>;
+ phy-mode = "rgmii";
+ phy = <&phy1>;
+ status = "okay";
+
+ allwinner,reset-gpio = <&pio 3 24 GPIO_ACTIVE_LOW>;
+ allwinner,reset-active-low;
+ allwinner,reset-delays-us = <0 10000 30000>;
+
+ rxc-skew-ps = <1800>;
+ txc-skew-ps = <1800>;
+
+ phy1: ethernet-phy@1 {
+ reg = <6>;
+ };
+};
+
+/*
+&usb_otg {
+ dr_mode = "gadget";
+ status = "okay";
+};
+*/
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins_a>;
+ status = "okay";
+};
+
+&i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0_pins>;
+ status = "okay";
+};
+
+&i2c1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
+ status = "okay";
+};
+
+&i2c2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_pins>;
+ status = "okay";
+};
+
+&usbphy {
+ status = "okay";
+};
+
+&ohci1 {
+ /* EHCI1 connects to on-module USB 2.0 hubs (which takes care
+ * of transaction translation for us), so we don't need OHCI1.
+ */
+
+       status = "disabled";
+};
+
+&ehci1 {
+ enable-gpios = <&pio 6 9 GPIO_ACTIVE_HIGH>, <&pio 4 4 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+};
+
+&spi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_pins>;
+
+ spi-deactivate-delay = <10>;
+
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ w25q80bl: w25q80bl@0 {
+ compatible = "spi-flash";
+ reg = <0>;
+ spi-max-frequency = <100000000>;
+ spi-rx-bus-width = <2>;
+ spi-cpol;
+ spi-cpha;
+ };
+};
+
+&spi1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi1_pins>, <&spi1_cs_pins>;
+ num-cs = <2>;
+ cs-gpios = <0>, <&pio 3 4 GPIO_ACTIVE_LOW>;
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+};
+
+
--
1.9.1

_______________________________________________
U-Boot mailing list
[hidden email]
http://lists.denx.de/mailman/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH v1 2/2] lynx_defconfig: add defconfig for A64-uQ7 module

Philipp Tomsich
In reply to this post by Philipp Tomsich
Signed-off-by: Philipp Tomsich <[hidden email]>
---
 arch/arm/dts/sun50i-a64-lynx.dts |  2 +-
 configs/lynx_defconfig           | 84 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+), 1 deletion(-)
 create mode 100644 configs/lynx_defconfig

diff --git a/arch/arm/dts/sun50i-a64-lynx.dts b/arch/arm/dts/sun50i-a64-lynx.dts
index f968c5f..bc642b9 100644
--- a/arch/arm/dts/sun50i-a64-lynx.dts
+++ b/arch/arm/dts/sun50i-a64-lynx.dts
@@ -91,7 +91,7 @@
 
  power {
  label = "lynx:orange:power";
- gpios = <&pio 9 11 GPIO_ACTIVE_HIGH>;
+ gpios = <&r_pio 0 11 GPIO_ACTIVE_HIGH>;
  };
  };
 };
diff --git a/configs/lynx_defconfig b/configs/lynx_defconfig
new file mode 100644
index 0000000..7b773f1
--- /dev/null
+++ b/configs/lynx_defconfig
@@ -0,0 +1,84 @@
+CONFIG_ARM=y
+CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN50I=y
+CONFIG_PINCTRL=y
+CONFIG_SUNXI_PINCTRL=y
+CONFIG_CLK=y
+CONFIG_DM_RESET=y
+CONFIG_RESET_SUNXI=y
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-lynx"
+CONFIG_OF_LIST="sun50i-a64-lynx"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_CONSOLE_MUX=y
+CONFIG_SPL=y
+CONFIG_FIT=y
+CONFIG_SPL_FIT=y
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_OF_LIBFDT=y
+# CONFIG_SPL_LIBDISK_SUPPORT is not set
+# CONFIG_SPL_POWER_SUPPORT is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
+
+CONFIG_CMD_MMC=y
+CONFIG_DM_MMC=y
+CONFIG_DM_MMC_OPS=y
+# CONFIG_BLK is not set
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+
+CONFIG_CMD_I2C=y
+CONFIG_I2C0_ENABLE=y
+CONFIG_I2C1_ENABLE=y
+CONFIG_I2C2_ENABLE=y
+CONFIG_R_I2C_ENABLE=y
+
+CONFIG_DM_SPI=y
+CONFIG_SUNXI_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_FLASH=y
+
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_SF_DEFAULT_BUS=0
+CONFIG_SF_DEFAULT_CS=0
+CONFIG_SF_DEFAULT_SPEED=16000000
+CONFIG_SF_DEFAULT_MODE=0
+
+# Support for running the dual-role controller in device-mode
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_USB0_ID_DET="PG4"
+CONFIG_USB0_VBUS_DET="PG8"
+CONFIG_USB0_VBUS_PIN="PH11"
+
+CONFIG_G_DNL_MANUFACTURER="Theobroma Systems"
+CONFIG_G_DNL_VENDOR_NUM=0x18D1
+CONFIG_G_DNL_PRODUCT_NUM=0x4EE0
+
+# Support for USB mass storage emulation ('ums' command)
+CONFIG_CMD_USB_MASS_STORAGE=y
+
+#
+# Fastboot support
+#
+CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_FASTBOOT_BUF_ADDR=0x42000000
+CONFIG_FASTBOOT_BUF_SIZE=0x8000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=1
+CONFIG_FASTBOOT_GPT_NAME="gpt"
+CONFIG_FASTBOOT_MBR_NAME="mbr"
--
1.9.1

_______________________________________________
U-Boot mailing list
[hidden email]
http://lists.denx.de/mailman/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH v1 0/2] Add support for the A64-uQ7 modules

Jagan Teki
In reply to this post by Philipp Tomsich
On Tue, Feb 21, 2017 at 5:17 AM, Philipp Tomsich
<[hidden email]> wrote:

> This changeset adds support for the A64-uQ7 modules from Theobroma
> Systems, which is based on Allwinner's A64 (sun50iw1p1).
>
> It depends on the device-model support for the sunxi subarchitecture
> and the DM-based, dual-IO capable SPI driver which we submitted over
> the last couple of days.
>
> Given that these other patches are unmerged, this will (at this stage)
> mainly serve as a reference point to better point these other
> patchsets into perspective.
>
>
> Philipp Tomsich (2):
>   dts: lynx: add sun50i-a64-lynx.dts for the A64-uQ7
>   lynx_defconfig: add defconfig for A64-uQ7 module
>
>  arch/arm/dts/Makefile            |   1 +
>  arch/arm/dts/sun50i-a64-lynx.dts | 247 +++++++++++++++++++++++++++++++++++++++

Need to wait till Linux upstream accept this new dts and resend the series.

thanks!
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Loading...