Re: [linux-sunxi] [PATCH v2 5/6] arm64: allwinner: h6: add the basical Allwinner H6 DTSI file

2018-02-11 Thread André Przywara
Hi,

On 03/02/18 15:49, Icenowy Zheng wrote:
> Allwinner H6 is a new SoC with Cortex-A53 cores from Allwinner, with its
> memory map fully reworked and some high-speed peripherals (PCIe, USB
> 3.0) introduced.
> 
> This commit adds the basical DTSI file of it, including the clock
> support and UART support.

Checked the MMIO addresses and the interrupt numbers against the manual.

> Signed-off-by: Icenowy Zheng 

Reviewed-by: Andre Przywara 

Thanks!
Andre.

> ---
> Changes in v2:
> - Add APB1 clock as PIO's APB clock.
> - Switched to SPDX license identifier.
> 
>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 178 
> +++
>  1 file changed, 178 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi 
> b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> new file mode 100644
> index ..d4697bb42496
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> @@ -0,0 +1,178 @@
> +/*
> + * Copyright (C) 2017 Icenowy Zheng 
> + *
> + * SPDX-License-Identifier: (GPL-2.0+ or MIT)
> + */
> +
> +#include 
> +#include 
> +#include 
> +
> +/ {
> + interrupt-parent = <&gic>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + cpu0: cpu@0 {
> + compatible = "arm,cortex-a53", "arm,armv8";
> + device_type = "cpu";
> + reg = <0>;
> + enable-method = "psci";
> + };
> +
> + cpu1: cpu@1 {
> + compatible = "arm,cortex-a53", "arm,armv8";
> + device_type = "cpu";
> + reg = <1>;
> + enable-method = "psci";
> + };
> +
> + cpu2: cpu@2 {
> + compatible = "arm,cortex-a53", "arm,armv8";
> + device_type = "cpu";
> + reg = <2>;
> + enable-method = "psci";
> + };
> +
> + cpu3: cpu@3 {
> + compatible = "arm,cortex-a53", "arm,armv8";
> + device_type = "cpu";
> + reg = <3>;
> + enable-method = "psci";
> + };
> + };
> +
> + iosc: internal-osc-clk {
> + #clock-cells = <0>;
> + compatible = "fixed-clock";
> + clock-frequency = <1600>;
> + clock-accuracy = <3>;
> + clock-output-names = "iosc";
> + };
> +
> + osc24M: osc24M_clk {
> + #clock-cells = <0>;
> + compatible = "fixed-clock";
> + clock-frequency = <2400>;
> + clock-output-names = "osc24M";
> + };
> +
> + osc32k: osc32k_clk {
> + #clock-cells = <0>;
> + compatible = "fixed-clock";
> + clock-frequency = <32768>;
> + clock-output-names = "osc32k";
> + };
> +
> + psci {
> + compatible = "arm,psci-0.2";
> + method = "smc";
> + };
> +
> + timer {
> + compatible = "arm,armv8-timer";
> + interrupts =  + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
> +   + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
> +   + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
> +   + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
> + };
> +
> + soc {
> + compatible = "simple-bus";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + ccu: clock@3001000 {
> + compatible = "allwinner,sun50i-h6-ccu";
> + reg = <0x03001000 0x1000>;
> + clocks = <&osc24M>, <&osc32k>;
> + clock-names = "hosc", "losc";
> + #clock-cells = <1>;
> + #reset-cells = <1>;
> + };
> +
> + gic: interrupt-controller@3021000 {
> + compatible = "arm,gic-400";
> + reg = <0x03021000 0x1000>,
> +   <0x03022000 0x2000>,
> +   <0x03024000 0x2000>,
> +   <0x03026000 0x2000>;
> + interrupts =  IRQ_TYPE_LEVEL_HIGH)>;
> + interrupt-controller;
> + #interrupt-cells = <3>;
> + };
> +
> + pio: pinctrl@300b000 {
> + compatible = "allwinner,sun50i-h6-pinctrl";
> + reg = <0x0300b000 0x400>;
> + interrupts = ,
> +  ,
> +  ,
> +  ;
> +  

Re: [linux-sunxi] [PATCH v2 6/6] arm64: allwinner: h6: add support for Pine H64 board

2018-02-11 Thread André Przywara
Hi,

On 03/02/18 15:49, Icenowy Zheng wrote:
> Pine H64 is an Allwinner H6-based SBC from Pine64, with the following
> features:
> 
> - 1GiB/2GiB/4GiB LPDDR3 DRAM (in 4GiB situation only 3GiB is
> accessible)
> - AXP805 PMIC
> - Raspberry-Pi-compatible GPIO header, "Euler" GPIO header (not
> compatible with the "Euler" on Pine A64) and "Expansion" pin header
> - 2 USB 2.0 ports and 1 USB 3.0 ports
> - Audio jack
> - MicroSD slot and eMMC module slot
> - on-board SPI NOR flash
> - 1Gbps Ethernet port (via RTL8211E PHY)
> - HDMI port
> 
> Adds initial support for it, including the UART on the Expansion pin
> header.
> 
> Signed-off-by: Icenowy Zheng 

I booted this to the point where the kernel complained about the missing
rootfs, also with an initrd to the prompt. So:

Reviewed-by: Andre Przywara 
Tested-by: Andre Przywara 

Thanks!
Andre.

> ---
> Changes in v2:
> - Switch to SPDX license identifier.
> 
>  arch/arm64/boot/dts/allwinner/Makefile |  1 +
>  .../boot/dts/allwinner/sun50i-h6-pine-h64.dts  | 30 
> ++
>  2 files changed, 31 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
> 
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile 
> b/arch/arm64/boot/dts/allwinner/Makefile
> index f505227b0250..addf245226f6 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -10,3 +10,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts 
> b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
> new file mode 100644
> index ..dc850a1c0885
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
> @@ -0,0 +1,30 @@
> +/*
> + * Copyright (c) 2017 Icenowy Zheng 
> + *
> + * SPDX-License-Identifier: (GPL-2.0+ or MIT)
> + */
> +
> +/dts-v1/;
> +
> +#include "sun50i-h6.dtsi"
> +
> +#include 
> +
> +/ {
> + model = "Pine H64";
> + compatible = "pine64,pine-h64", "allwinner,sun50i-h6";
> +
> + aliases {
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +};
> +
> +&uart0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&uart0_ph_pins>;
> + status = "okay";
> +};
> 

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH 1/3] arm: dts: sun6i: a31s: bpi-m2: update mmc supply nodes

2018-02-11 Thread Philipp Rossak
Am Freitag, den 09.02.2018, 18:52 +0100 schrieb Philipp Rossak:
> This patch updates the vmmc-supply properties on the mmc0 and mmc2
> node to use the allready existent regulators.
> We can now remove the sunxi-common-regulators.dtsi include since we
> don't need it anymore.
> 
> Signed-off-by: Philipp Rossak 
> ---
>  arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
> b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
> index 51e6f1d21c32..a8d86211c8f3 100644
> --- a/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
> +++ b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
> @@ -42,7 +42,6 @@
>  
>  /dts-v1/;
>  #include "sun6i-a31s.dtsi"
> -#include "sunxi-common-regulators.dtsi"
>  #include 
>  
>  / {
> @@ -118,7 +117,7 @@
>  &mmc0 {
>   pinctrl-names = "default";
>   pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bpi_m2>;
> - vmmc-supply = <®_vcc3v0>;
> + vmmc-supply = <®_dcdc1>;
>   bus-width = <4>;
>   cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
>   cd-inverted;
> @@ -132,7 +131,7 @@
>  &mmc2 {
>   pinctrl-names = "default";
>   pinctrl-0 = <&mmc2_pins_a>;
> - vmmc-supply = <®_vcc3v0>;
> + vmmc-supply = <®_dcdc1>;
^^
this here is wrong! this should be ®_aldo1
>   mmc-pwrseq = <&mmc2_pwrseq>;
>   bus-width = <4>;
>   non-removable;

Philipp

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] EOMA68 project at Fosdem

2018-02-11 Thread Benjamin Henrion
Hi,

I was viewing this, Luke mentions the sunxi community in there:

https://www.youtube.com/watch?v=ETjvP5Vd_vc

Best,

--
Benjamin Henrion (zoobab)
Email: zoobab at gmail.com
Mobile: +32-484-566109
Web: http://www.zoobab.com
FFII.org Brussels
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH 0/3] Fix broken bananapi m2 devicetree/regulators

2018-02-11 Thread Philipp Rossak
Am Sonntag, den 11.02.2018, 10:55 +0300 schrieb Sergey Suloev:
> On 02/11/2018 01:07 AM, Philipp Rossak wrote:
> > 
> > 
> > On 10.02.2018 22:08, Sergey Suloev wrote:
> > > On 02/11/2018 12:01 AM, Philipp Rossak wrote:
> > > > Hey Sergey,
> > > > 
> > > > Thanks for mentioning, but I think the problem has nothing to
> > > > do 
> > > > with those patches. I tested them with the v4.15.0 Kernel since
> > > > this 
> > > > is the last stable release and we are right now in the merging
> > > > window.
> > > > 
> > > > I tested the latest mainline, without those patches and the
> > > > kernel 
> > > > is not booting (I can't see any uart output).
> > > > 
> > > > Thanks,
> > > > Philipp
> > > > 
> > > > On 10.02.2018 14:56, Sergey Suloev wrote:
> > > > > On 02/09/2018 08:52 PM, Philipp Rossak wrote:
> > > > > > This patchseries fixes the bananapi m1 devicetree, to be
> > > > > > able to 
> > > > > > boot again.
> > > > > > The first two patches update/improve the devicetree and the
> > > > > > last 
> > > > > > patch adds
> > > > > > all missing regulators.
> > > > > > 
> > > > > > Regards,
> > > > > > Philipp
> > > > > > 
> > > > > > Philipp Rossak (3):
> > > > > >    arm: dts: sun6i: a31s: bpi-m2: update mmc supply nodes
> > > > > >    arm: dts: sun6i: a31s: bpi-m2: improve pmic properties
> > > > > >    arm: dts: sun6i: a31s: fix: bpi-m2: add missing
> > > > > > regulators
> > > > > > 
> > > > > >   arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 70 
> > > > > > +++-
> > > > > >   1 file changed, 67 insertions(+), 3 deletions(-)
> > > > > > 
> > > > > 
> > > > > patches are not working
> > > > > 
> > > > > Thanks
> > > > > 
> > > 
> > > same problem, but after applying the patches my device is till
> > > hanging.
> > > 
> > > 
> > 
> > Can you please share a bootlog? Here is mine [1]. As you can see
> > I'm 
> > able to boot.
> > I build it with this branch [2]. For testing you should replace
> > the 
> > dtb and the uImage/zImage
> > 
> > Philipp
> > 
> > 
> > [1]: https://pastebin.com/mVjv3LDf
> > [2]: 
> > https://github.com/embed-3d/linux/tree/testing/bpi-m2-regulator-tes
> > t-2
> 
> My dmesg is very similar to yours unless it hangs on the last line
> [1]. 
> For this test I used kernel from tag v4.15 with no additional
> patching.
> 
> [1] https://pastebin.com/3a6bk5Dk
> 
> 

For me it looks like you have a different kernel and also an different
dtb that you patch! And you are applying also a fixup script.
These patches should be applied on top of linux mainline. 

fixup script:
Applying kernel provided DT fixup script (sun6i-a31s-fixup.scr)


Linux versions:
4.15.0-3-g1bbe5edde691   vs   4.15.0-sunxi-dirty

In addition to that you are also booting into fb/hdmi.

If you use my branch (uImage and dtb) and replace the current boot.cmd
with this (to get the boot.scr you need to use mkimage) it should work:

setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait
panic=10
load mmc 0:1 0x4300 ${fdtfile} || load mmc 0:1 0x4300
boot/${fdtfile}
load mmc 0:1 0x4200 uImage || load mmc 0:1 0x4200 boot/uImage
bootm 0x4200 - 0x4300

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.