diff mbox

[5/6] ARM: dts: sun6i: Add support for Sinlinx A31s SDK board

Message ID 1440755679-8266-6-git-send-email-wens@csie.org (mailing list archive)
State New, archived
Headers show

Commit Message

Chen-Yu Tsai Aug. 28, 2015, 9:54 a.m. UTC
The Sinlinx A31s SDK is a A31s based module/baseboard development kit.

The core module has the SoC, PMIC, DRAM, eMMC and supporting components.
There are also pads for UART0, JTAG and I2S.

The baseboard has 100 Mbps Ethernet, 5x USB 2.0 host ports via a USB 2.0
hub chip, MMC, HDMI, SPDIF, CIR, audio jacks, 2 tablet-like volume
buttons, RS232 style UART and USB OTG (though VBUS is not connected).
Various headers are available for other addon modules, such as SDIO
WiFi, LCD display, camera sensor, UARTs, I2C, SPI and GPIOs.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/Makefile                     |   3 +-
 arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi | 131 ++++++++++++++++++++++
 arch/arm/boot/dts/sun6i-a31s-sina31s.dts       | 149 +++++++++++++++++++++++++
 3 files changed, 282 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi
 create mode 100644 arch/arm/boot/dts/sun6i-a31s-sina31s.dts

Comments

Maxime Ripard Aug. 28, 2015, 12:34 p.m. UTC | #1
On Fri, Aug 28, 2015 at 05:54:38PM +0800, Chen-Yu Tsai wrote:
> The Sinlinx A31s SDK is a A31s based module/baseboard development kit.
> 
> The core module has the SoC, PMIC, DRAM, eMMC and supporting components.
> There are also pads for UART0, JTAG and I2S.

Can you use that core module without that baseboard?

> The baseboard has 100 Mbps Ethernet, 5x USB 2.0 host ports via a USB 2.0
> hub chip, MMC, HDMI, SPDIF, CIR, audio jacks, 2 tablet-like volume
> buttons, RS232 style UART and USB OTG (though VBUS is not connected).
> Various headers are available for other addon modules, such as SDIO
> WiFi, LCD display, camera sensor, UARTs, I2C, SPI and GPIOs.

Can the baseboard be used with our core modules?

Thanks,
Maxime
Chen-Yu Tsai Sept. 14, 2015, 7:24 a.m. UTC | #2
On Fri, Aug 28, 2015 at 8:34 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Fri, Aug 28, 2015 at 05:54:38PM +0800, Chen-Yu Tsai wrote:
>> The Sinlinx A31s SDK is a A31s based module/baseboard development kit.
>>
>> The core module has the SoC, PMIC, DRAM, eMMC and supporting components.
>> There are also pads for UART0, JTAG and I2S.
>
> Can you use that core module without that baseboard?

You could just solder 5v, gnd, and uart, and it should work.
Not that I actually tried it.

>> The baseboard has 100 Mbps Ethernet, 5x USB 2.0 host ports via a USB 2.0
>> hub chip, MMC, HDMI, SPDIF, CIR, audio jacks, 2 tablet-like volume
>> buttons, RS232 style UART and USB OTG (though VBUS is not connected).
>> Various headers are available for other addon modules, such as SDIO
>> WiFi, LCD display, camera sensor, UARTs, I2C, SPI and GPIOs.
>
> Can the baseboard be used with our core modules?

Doubtful. The baseboard is more like a demonstration platform for the
core board.

What do you suggest?


ChenYu
Maxime Ripard Sept. 16, 2015, 6:20 a.m. UTC | #3
On Mon, Sep 14, 2015 at 03:24:47PM +0800, Chen-Yu Tsai wrote:
> On Fri, Aug 28, 2015 at 8:34 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Fri, Aug 28, 2015 at 05:54:38PM +0800, Chen-Yu Tsai wrote:
> >> The Sinlinx A31s SDK is a A31s based module/baseboard development kit.
> >>
> >> The core module has the SoC, PMIC, DRAM, eMMC and supporting components.
> >> There are also pads for UART0, JTAG and I2S.
> >
> > Can you use that core module without that baseboard?
> 
> You could just solder 5v, gnd, and uart, and it should work.
> Not that I actually tried it.
> 
> >> The baseboard has 100 Mbps Ethernet, 5x USB 2.0 host ports via a USB 2.0
> >> hub chip, MMC, HDMI, SPDIF, CIR, audio jacks, 2 tablet-like volume
> >> buttons, RS232 style UART and USB OTG (though VBUS is not connected).
> >> Various headers are available for other addon modules, such as SDIO
> >> WiFi, LCD display, camera sensor, UARTs, I2C, SPI and GPIOs.
> >
> > Can the baseboard be used with our core modules?
> 
> Doubtful. The baseboard is more like a demonstration platform for the
> core board.
> 
> What do you suggest?

Nothing then, I was just trying to understand the possible
combinations, but it looks like there's none :)

Maxime
Chen-Yu Tsai Sept. 18, 2015, 9:36 a.m. UTC | #4
On Wed, Sep 16, 2015 at 2:20 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Mon, Sep 14, 2015 at 03:24:47PM +0800, Chen-Yu Tsai wrote:
>> On Fri, Aug 28, 2015 at 8:34 PM, Maxime Ripard
>> <maxime.ripard@free-electrons.com> wrote:
>> > On Fri, Aug 28, 2015 at 05:54:38PM +0800, Chen-Yu Tsai wrote:
>> >> The Sinlinx A31s SDK is a A31s based module/baseboard development kit.
>> >>
>> >> The core module has the SoC, PMIC, DRAM, eMMC and supporting components.
>> >> There are also pads for UART0, JTAG and I2S.
>> >
>> > Can you use that core module without that baseboard?
>>
>> You could just solder 5v, gnd, and uart, and it should work.
>> Not that I actually tried it.
>>
>> >> The baseboard has 100 Mbps Ethernet, 5x USB 2.0 host ports via a USB 2.0
>> >> hub chip, MMC, HDMI, SPDIF, CIR, audio jacks, 2 tablet-like volume
>> >> buttons, RS232 style UART and USB OTG (though VBUS is not connected).
>> >> Various headers are available for other addon modules, such as SDIO
>> >> WiFi, LCD display, camera sensor, UARTs, I2C, SPI and GPIOs.
>> >
>> > Can the baseboard be used with our core modules?
>>
>> Doubtful. The baseboard is more like a demonstration platform for the
>> core board.
>>
>> What do you suggest?
>
> Nothing then, I was just trying to understand the possible
> combinations, but it looks like there's none :)

OK then. I'll fix up the gpu regulator stuff, and resend the series sans
the primo81 patch after the axp221 supply renaming patches are merged.

The primo81 LCD and backlight need some more work. No PWM and SSD2825
MIPI bridge support in the kernel yet.


Regards,
ChenYu
diff mbox

Patch

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f830e1f12716..ada5156fdd49 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -578,7 +578,8 @@  dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-i7.dtb \
 	sun6i-a31-m9.dtb \
 	sun6i-a31-mele-a1000g-quad.dtb \
-	sun6i-a31s-cs908.dtb
+	sun6i-a31s-cs908.dtb \
+	sun6i-a31s-sina31s.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-bananapi.dtb \
 	sun7i-a20-bananapro.dtb \
diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi b/arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi
new file mode 100644
index 000000000000..409b31ec647c
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi
@@ -0,0 +1,131 @@ 
+/*
+ * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
+ *
+ * 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 "sun6i-a31s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+	model = "Sinlinx SinA31s Core Board";
+	compatible = "sinlinx,sina31s", "allwinner,sun6i-a31s";
+
+	aliases {
+		serial0 = &uart0;
+	};
+};
+
+/* eMMC on core board */
+&mmc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc2_8bit_emmc_pins>;
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <8>;
+	non-removable;
+	status = "okay";
+};
+
+/* AXP221s PMIC on core board */
+&p2wi {
+	status = "okay";
+
+	axp221: pmic@68 {
+		reg = <0x68>;
+		interrupt-parent = <&nmi_intc>;
+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
+
+#include "axp221.dtsi"
+
+&reg_dcdc1 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <700000>;
+	regulator-max-microvolt = <1320000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <700000>;
+	regulator-max-microvolt = <1320000>;
+	regulator-name = "vdd-gpu";
+};
+
+&reg_dcdc4 {
+	regulator-always-on;
+	/* This board is not stable at recommended 1.1 V */
+	regulator-min-microvolt = <1200000>;
+	regulator-max-microvolt = <1200000>;
+	regulator-name = "vdd-sys";
+};
+
+&reg_dcdc5 {
+	regulator-always-on;
+	regulator-min-microvolt = <1500000>;
+	regulator-max-microvolt = <1500000>;
+	regulator-name = "vcc-dram";
+};
+
+&reg_aldo3 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+/* UART0 pads available on core board */
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
new file mode 100644
index 000000000000..47b517d7b8a1
--- /dev/null
+++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
@@ -0,0 +1,149 @@ 
+/*
+ * Copyright 2015 Chen-Yu Tsai <wens@csie.org>
+ *
+ * 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.
+ */
+
+/* The SinA31s development board has the SinA31s core board soldered on */
+#include "sun6i-a31s-sina31s-core.dtsi"
+
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Sinlinx SinA31s Development Board";
+	compatible = "sinlinx,sina31s-sdk", "allwinner,sun6i-a31s";
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&ehci0 {
+	/* USB 2.0 4 port hub IC */
+	status = "okay";
+};
+
+&ehci1 {
+	status = "okay";
+};
+
+&gmac {
+	pinctrl-names = "default";
+	pinctrl-0 = <&gmac_pins_mii_a>;
+	phy = <&phy1>;
+	phy-mode = "mii";
+	phy-supply = <&reg_dldo1>;
+	status = "okay";
+
+	phy1: ethernet-phy@1 {
+		reg = <1>;
+	};
+};
+
+&i2c0 {
+	/* Available on camera header */
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins_a>;
+	status = "okay";
+};
+
+&i2c1 {
+	/* Available on LCD header */
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins_a>;
+	status = "okay";
+};
+
+&ir {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ir_pins_a>;
+	status = "okay";
+};
+
+&lradc {
+	vref-supply = <&reg_vcc3v0>;
+	status = "okay";
+
+	button@158 {
+		label = "Volume Up";
+		linux,code = <KEY_VOLUMEUP>;
+		channel = <0>;
+		voltage = <158730>;
+	};
+
+	button@349 {
+		label = "Volume Down";
+		linux,code = <KEY_VOLUMEDOWN>;
+		channel = <0>;
+		voltage = <349206>;
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina31s>;
+	vmmc-supply = <&reg_vcc3v0>;
+	bus-width = <4>;
+	cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
+	cd-inverted;
+	status = "okay";
+};
+
+&ohci1 {
+	status = "okay";
+};
+
+&pio {
+	mmc0_cd_pin_sina31s: mmc0_cd_pin@0 {
+		allwinner,pins = "PA4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+};
+
+&reg_dldo1 {
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc_gmac_phy";
+};
+
+&usbphy {
+	status = "okay";
+};