sunxi: sync H3, H5, A64 DTs from mainline Linux
Subsystems (6)
v6 cover sunxi: sync H3, H5, A64 DTs from mainline Linux
This is an updated version of the series which brings the exact mainline Linux device tree files for various Allwinner boards into U-Boot. Apart from using the usually more correct reference DT files, this offers the big benefit of being able to use U-Boot's DT copy for directly passing it to the kernel. This avoids to actually load a .dtb file from somewhere, and allows seamless and automatic UEFI booting, so distribution installer images should just work (TM).
This cover the ARMv8 SoCs (H5, A64), but also all boards with the H3, as this is somewhat married to the H5 and can only be updated together. The H3 and H5 DT files have diverged quite a bit, but as U-Boot's own usage of the DT is (yet) quite limited, there should be no regressions. The patches are split to first update the SoC .dtsi file, then the board .dts files in a second patch. They are grouped to handle the A64 first, then the H5 and H3. I put the respective kernel commit IDs in the commit messages.
Patch 6 brings in the mainline DT for the SoPine baseboard, for which we didn't have a separate .dts in U-Boot so far.
Patch 7 adds a separate .dts file for the Pine64-LTS board, which is virtually identical to the SoPine baseboard, but, due to the SoC being named differently, deserves a separate file.
This is based on origin/master (ca70cbabdcd1).
Maxime, I kept you Acked-by: from the previous posts, as I literally just updated to the latest Linux master, which went through your review anyway. Hope that's OK for you.
Cheers,
Andre.
Changelog v5 .. v6:
- bring back DT update patches
- update to Linux v4.17-rc5
Changelog v4 .. v5:
- drop Linux DT update patches for now
- fix minor checkpatch complaints
Changelog v3 .. v4:
- remove MMC environment for all Allwinner boards (including 32 bit ones)
- keep MMC environment offset to the old values
- drop DT adjustments to use fixed MMC regulator
Changelog v2 .. v3:
01: added, was on the list before
02: drop redundant H5 line
03-08: unchanged
09-20: added
Changelog v1 .. v2:
01, 02, 03: unchanged
04, 05, 06, 07: added
Andre Przywara (7):
sunxi: DT: A64: update device tree file for Allwinner A64 SoC
sunxi: DT: A64: update board .dts files from Linux
sunxi: DT: update device tree files for Allwinner H3 and H5 SoCs
sunxi: DT: H5: update board .dts files from Linux
sunxi: DT: H3: update board .dts files from Linux
sunxi: DT: A64: add proper SoPine baseboard device tree
sunxi: DT: A64: add Pine64-LTS support
arch/arm/dts/Makefile | 4 +- arch/arm/dts/axp803.dtsi | 150 +++++ arch/arm/dts/sun50i-a64-bananapi-m64.dts | 200 +++++- arch/arm/dts/sun50i-a64-nanopi-a64.dts | 111 +++- arch/arm/dts/sun50i-a64-olinuxino.dts | 153 ++++- arch/arm/dts/sun50i-a64-orangepi-win.dts | 135 +++- arch/arm/dts/sun50i-a64-pine64-lts.dts | 13 + arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi | 59 -- arch/arm/dts/sun50i-a64-pine64-plus.dts | 17 +- arch/arm/dts/sun50i-a64-pine64.dts | 186 +++++- arch/arm/dts/sun50i-a64-sopine-baseboard.dts | 150 +++++ arch/arm/dts/sun50i-a64-sopine.dtsi | 142 ++++ arch/arm/dts/sun50i-a64.dtsi | 303 ++++++++- arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts | 122 +++- arch/arm/dts/sun50i-h5-nanopi-neo2.dts | 91 ++- arch/arm/dts/sun50i-h5-orangepi-pc2.dts | 186 +++++- arch/arm/dts/sun50i-h5-orangepi-prime.dts | 189 +++++- arch/arm/dts/sun50i-h5-orangepi-zero-plus2.dts | 64 +- arch/arm/dts/sun50i-h5.dtsi | 36 +- arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 55 +- arch/arm/dts/sun8i-h3-bananapi-m2-plus.dts | 109 ++- arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts | 78 +++ arch/arm/dts/sun8i-h3-nanopi-m1.dts | 42 ++ arch/arm/dts/sun8i-h3-nanopi-neo-air.dts | 28 +- arch/arm/dts/sun8i-h3-nanopi-neo.dts | 17 + arch/arm/dts/sun8i-h3-nanopi.dtsi | 13 +- arch/arm/dts/sun8i-h3-orangepi-2.dts | 92 ++- arch/arm/dts/sun8i-h3-orangepi-lite.dts | 57 +- arch/arm/dts/sun8i-h3-orangepi-one.dts | 94 ++- arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts | 11 +- arch/arm/dts/sun8i-h3-orangepi-pc.dts | 113 +++- arch/arm/dts/sun8i-h3-orangepi-plus.dts | 29 +- arch/arm/dts/sun8i-h3-orangepi-plus2e.dts | 15 +- arch/arm/dts/sun8i-h3.dtsi | 544 ++------------- arch/arm/dts/sunxi-h3-h5.dtsi | 842 ++++++++++++++++++++++++ arch/arm/dts/sunxi-libretech-all-h3-cc.dtsi | 2 - configs/sopine_baseboard_defconfig | 3 +- include/dt-bindings/clock/sun8i-de2.h | 18 + include/dt-bindings/clock/sun8i-r-ccu.h | 59 ++ include/dt-bindings/reset/sun8i-de2.h | 14 + include/dt-bindings/reset/sun8i-r-ccu.h | 53 ++ 41 files changed, 3703 insertions(+), 896 deletions(-) create mode 100644 arch/arm/dts/axp803.dtsi create mode 100644 arch/arm/dts/sun50i-a64-pine64-lts.dts delete mode 100644 arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi create mode 100644 arch/arm/dts/sun50i-a64-sopine-baseboard.dts create mode 100644 arch/arm/dts/sun50i-a64-sopine.dtsi create mode 100644 arch/arm/dts/sunxi-h3-h5.dtsi create mode 100644 include/dt-bindings/clock/sun8i-de2.h create mode 100644 include/dt-bindings/clock/sun8i-r-ccu.h create mode 100644 include/dt-bindings/reset/sun8i-de2.h create mode 100644 include/dt-bindings/reset/sun8i-r-ccu.h
Signature · 1 line
2.14.1
PATCH v6 1/7 sunxi: DT: A64: update device tree file for Allwinner A64 SoC
Updates the device tree file from the the Linux tree as of v4.17-rc5, exactly Linux commit:
commit c1cff65f9b16b31e731e2e75bbe06638c86e1996
Author: Harald Geyer <[email protected]> Date: Thu Mar 15 16:25:08 2018 +0000
arm64: dts: allwinner: a64: add simplefb for A64 SoC
This also pulls in the newly required include files for the clock and reset bindings, also removes the now redundant part from our *-u-boot.dtsi overlay file.
--- arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi | 61 +---- arch/arm/dts/sun50i-a64.dtsi | 303 +++++++++++++++++++++--- include/dt-bindings/clock/sun8i-r-ccu.h | 59 +++++ include/dt-bindings/reset/sun8i-r-ccu.h | 53 +++++ 4 files changed, 398 insertions(+), 78 deletions(-) create mode 100644 include/dt-bindings/clock/sun8i-r-ccu.h create mode 100644 include/dt-bindings/reset/sun8i-r-ccu.h
arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi +11 -50
@@ -2,58 +2,19 @@ aliases { ethernet0 = &emac; }; - - soc { - syscon: syscon at 1c00000 { - compatible = "allwinner,sun50i-a64-system-controller", - "syscon"; - reg = <0x01c00000 0x1000>; - }; - - emac: ethernet at 1c30000 { - compatible = "allwinner,sun50i-a64-emac"; - syscon = <&syscon>; - reg = <0x01c30000 0x10000>; - interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "macirq"; - resets = <&ccu RST_BUS_EMAC>; - reset-names = "stmmaceth"; - clocks = <&ccu CLK_BUS_EMAC>; - clock-names = "stmmaceth"; - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii_pins>; - phy-mode = "rgmii"; - phy-handle = <&ext_rgmii_phy>; - status = "okay"; - - mdio: mdio { - compatible = "snps,dwmac-mdio"; - #address-cells = <1>; - #size-cells = <0>; - ext_rgmii_phy: ethernet-phy at 1 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <1>; - }; - }; - }; - }; }; -&pio { - rmii_pins: rmii_pins { - pins = "PD10", "PD11", "PD13", "PD14", "PD17", - "PD18", "PD19", "PD20", "PD22", "PD23"; - function = "emac"; - drive-strength = <40>; - }; +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + status = "okay"; +}; - rgmii_pins: rgmii_pins { - pins = "PD8", "PD9", "PD10", "PD11", "PD12", - "PD13", "PD15", "PD16", "PD17", "PD18", - "PD19", "PD20", "PD21", "PD22", "PD23"; - function = "emac"; - drive-strength = <40>; +&mdio { + ext_rgmii_phy: ethernet-phy at 1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; }; };
arch/arm/dts/sun50i-a64.dtsi +275 -28
459 lines not on this page · raw message
include/dt-bindings/clock/sun8i-r-ccu.h new file +59 -0
59 lines not on this page · raw message
include/dt-bindings/reset/sun8i-r-ccu.h new file +53 -0
53 lines not on this page · raw message
Signature · 1 line
2.14.1
PATCH v6 2/7 sunxi: DT: A64: update board .dts files from Linux
In reply to Andre PrzywaraUpdate the .dts files for the various boards with an Allwinner A64 SoC. This is as of v4.17-rc5, exactly Linux commit:
commit b75cb68d83fd55584b96380a2274de59bb1e6406
Author: Tuomas Tynkkynen <[email protected]> Date: Fri Dec 22 22:57:38 2017 +0200
arm64: dts: sunxi: Switch MMC nodes away from cd-inverted property
It updates the existing DT files, adds the newly added axp803.dtsi and removes our temporary kludge file to get Ethernet support in U-Boot.
--- arch/arm/dts/axp803.dtsi | 150 ++++++++++++++++++ arch/arm/dts/sun50i-a64-bananapi-m64.dts | 200 ++++++++++++++++++++++-- arch/arm/dts/sun50i-a64-nanopi-a64.dts | 111 +++++++++++-- arch/arm/dts/sun50i-a64-olinuxino.dts | 153 +++++++++++++++++- arch/arm/dts/sun50i-a64-orangepi-win.dts | 135 ++++++++++++++-- arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi | 20 --- arch/arm/dts/sun50i-a64-pine64-plus.dts | 17 +- arch/arm/dts/sun50i-a64-pine64.dts | 186 ++++++++++++++++++++-- 8 files changed, 900 insertions(+), 72 deletions(-) create mode 100644 arch/arm/dts/axp803.dtsi delete mode 100644 arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi
arch/arm/dts/axp803.dtsi new file +150 -0
@@ -0,0 +1,150 @@ +/* + * Copyright 2017 Icenowy Zheng <[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. + */ + +/* + * AXP803 Integrated Power Management Chip + * http://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf + */ + +&axp803 { + interrupt-controller; + #interrupt-cells = <1>; + + regulators { + /* Default work frequency for buck regulators */ + x-powers,dcdc-freq = <3000>; + + reg_aldo1: aldo1 { + regulator-name = "aldo1"; + }; + + reg_aldo2: aldo2 { + regulator-name = "aldo2"; + }; + + reg_aldo3: aldo3 { + regulator-name = "aldo3"; + }; + + reg_dc1sw: dc1sw { + regulator-name = "dc1sw"; + }; + + reg_dcdc1: dcdc1 { + regulator-name = "dcdc1"; + }; + + reg_dcdc2: dcdc2 { + regulator-name = "dcdc2"; + }; + + reg_dcdc3: dcdc3 { + regulator-name = "dcdc3"; + }; + + reg_dcdc4: dcdc4 { + regulator-name = "dcdc4"; + }; + + reg_dcdc5: dcdc5 { + regulator-name = "dcdc5"; + }; + + reg_dcdc6: dcdc6 { + regulator-name = "dcdc6"; + }; + + reg_dldo1: dldo1 { + regulator-name = "dldo1"; + }; + + reg_dldo2: dldo2 { + regulator-name = "dldo2"; + }; + + reg_dldo3: dldo3 { + regulator-name = "dldo3"; + }; + + reg_dldo4: dldo4 { + regulator-name = "dldo4"; + }; + + reg_eldo1: eldo1 { + regulator-name = "eldo1"; + }; + + reg_eldo2: eldo2 { + regulator-name = "eldo2"; + }; + + reg_eldo3: eldo3 { + regulator-name = "eldo3"; + }; + + reg_fldo1: fldo1 { + regulator-name = "fldo1"; + }; + + reg_fldo2: fldo2 { + regulator-name = "fldo2"; + }; + + reg_ldo_io0: ldo-io0 { + regulator-name = "ldo-io0"; + status = "disabled"; + }; + + reg_ldo_io1: ldo-io1 { + regulator-name = "ldo-io1"; + status = "disabled"; + }; + + reg_rtc_ldo: rtc-ldo { + /* RTC_LDO is a fixed, always-on regulator */ + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "rtc-ldo"; + }; + }; +};
arch/arm/dts/sun50i-a64-bananapi-m64.dts +189 -11
252 lines not on this page · raw message
arch/arm/dts/sun50i-a64-nanopi-a64.dts +101 -10
129 lines not on this page · raw message
arch/arm/dts/sun50i-a64-olinuxino.dts +145 -8
170 lines not on this page · raw message
arch/arm/dts/sun50i-a64-orangepi-win.dts +122 -13
157 lines not on this page · raw message
arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi deleted +0 -20
@@ -1,20 +0,0 @@ -/ { - aliases { - ethernet0 = &emac; - }; -}; - -&emac { - pinctrl-names = "default"; - pinctrl-0 = <&rgmii_pins>; - phy-mode = "rgmii"; - phy-handle = <&ext_rgmii_phy>; - status = "okay"; -}; - -&mdio { - ext_rgmii_phy: ethernet-phy at 1 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <1>; - }; -};
arch/arm/dts/sun50i-a64-pine64-plus.dts +16 -1
@@ -46,5 +46,20 @@ model = "Pine64+"; compatible = "pine64,pine64-plus", "allwinner,sun50i-a64"; - /* TODO: Camera, Ethernet PHY, touchscreen, etc. */ + /* TODO: Camera, touchscreen, etc. */ +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + status = "okay"; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy at 1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; };
arch/arm/dts/sun50i-a64-pine64.dts +177 -9
229 lines not on this page · raw message
Signature · 1 line
2.14.1
PATCH v6 3/7 sunxi: DT: update device tree files for Allwinner H3 and H5 SoCs
In reply to Andre PrzywaraUpdate the device tree files from the Linux tree as of v4.17-rc5, exactly Linux commit:
commit c235edcb34651023c9eb1c5c4a7cdcaf7250d02c
Author: Giulio Benetti <[email protected]> Date: Tue Mar 13 11:16:45 2018 +0100
ARM: dts: sun8i-h3: Add Mali node
Since the H3 and H5 are very similar (aside from the actual ARM cores), they share most the SoC .dtsi and thus have to be updated together. One tiny change is the removal of the "arm/" prefix from the include path in the sun50i-h5.dtsi, which is needed because we don't share the same sophisticated DT directory layout of Linux.
Also we need to (temporarily) fix up the BananaPi-M2 board .dts, to maintain bisectability.
--- arch/arm/dts/sun50i-h5.dtsi | 36 +- arch/arm/dts/sun8i-h3-bananapi-m2-plus.dts | 2 +- arch/arm/dts/sun8i-h3.dtsi | 544 +++---------------- arch/arm/dts/sunxi-h3-h5.dtsi | 842 +++++++++++++++++++++++++++++ include/dt-bindings/clock/sun8i-de2.h | 18 + include/dt-bindings/reset/sun8i-de2.h | 14 + 6 files changed, 971 insertions(+), 485 deletions(-) create mode 100644 arch/arm/dts/sunxi-h3-h5.dtsi create mode 100644 include/dt-bindings/clock/sun8i-de2.h create mode 100644 include/dt-bindings/reset/sun8i-de2.h
arch/arm/dts/sun50i-h5.dtsi +29 -7
@@ -1,17 +1,17 @@ /* - * Copyright (c) 2016 ARM Ltd. + * Copyright (C) 2016 ARM Ltd. * * 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 + * 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 library is distributed in the hope that it will be useful, + * 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.
@@ -40,24 +40,38 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "sun8i-h3.dtsi" +#include <sunxi-h3-h5.dtsi> / { cpus { + #address-cells = <1>; + #size-cells = <0>; + cpu at 0 { compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <0>; enable-method = "psci"; }; + cpu at 1 { compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <1>; enable-method = "psci"; }; + cpu at 2 { compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <2>; enable-method = "psci"; }; + cpu at 3 { compatible = "arm,cortex-a53", "arm,armv8"; + device_type = "cpu"; + reg = <3>; enable-method = "psci"; }; };
@@ -69,6 +83,14 @@ timer { compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; }; };
@@ -76,8 +98,8 @@ compatible = "allwinner,sun50i-h5-ccu"; }; -&gic { - compatible = "arm,gic-400"; +&display_clocks { + compatible = "allwinner,sun50i-h5-de2-clk"; }; &mmc0 {
@@ -104,6 +126,6 @@ &pio { interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>; + <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>; compatible = "allwinner,sun50i-h5-pinctrl"; };
arch/arm/dts/sun8i-h3-bananapi-m2-plus.dts +1 -1
@@ -185,7 +185,7 @@ &uart1 { pinctrl-names = "default"; - pinctrl-0 = <&uart1_pins_a>; + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; status = "okay"; };
arch/arm/dts/sun8i-h3.dtsi +67 -477
564 lines not on this page · raw message
arch/arm/dts/sunxi-h3-h5.dtsi new file +842 -0
842 lines not on this page · raw message
include/dt-bindings/clock/sun8i-de2.h new file +18 -0
@@ -0,0 +1,18 @@ +/* +* Copyright (C) 2016 Icenowy Zheng <[email protected]> +* +* SPDX-License-Identifier: (GPL-2.0+ OR MIT) +*/ + +#ifndef _DT_BINDINGS_CLOCK_SUN8I_DE2_H_ +#define _DT_BINDINGS_CLOCK_SUN8I_DE2_H_ + +#define CLK_BUS_MIXER0 0 +#define CLK_BUS_MIXER1 1 +#define CLK_BUS_WB 2 + +#define CLK_MIXER0 6 +#define CLK_MIXER1 7 +#define CLK_WB 8 + +#endif /* _DT_BINDINGS_CLOCK_SUN8I_DE2_H_ */
include/dt-bindings/reset/sun8i-de2.h new file +14 -0
@@ -0,0 +1,14 @@ +/* +* Copyright (C) 2016 Icenowy Zheng <[email protected]> +* +* SPDX-License-Identifier: (GPL-2.0+ OR MIT) +*/ + +#ifndef _DT_BINDINGS_RESET_SUN8I_DE2_H_ +#define _DT_BINDINGS_RESET_SUN8I_DE2_H_ + +#define RST_MIXER0 0 +#define RST_MIXER1 1 +#define RST_WB 2 + +#endif /* _DT_BINDINGS_RESET_SUN8I_DE2_H_ */
Signature · 1 line
2.14.1
PATCH v6 4/7 sunxi: DT: H5: update board .dts files from Linux
In reply to Andre PrzywaraUpdate the .dts file for the various boards with an Allwinner H5 SoC. This is as of v4.17-rc5, exactly Linux commit:
commit 2282197547d5373644e702f7f49c2aa92ef15817
Author: Jernej Skrabec <[email protected]> Date: Thu Mar 1 22:34:42 2018 +0100
ARM64: dts: sun50i: h5: Enable HDMI output on H5 boards
--- arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts | 122 ++++++++++++++-- arch/arm/dts/sun50i-h5-nanopi-neo2.dts | 91 ++++++++++-- arch/arm/dts/sun50i-h5-orangepi-pc2.dts | 186 +++++++++++++++++++----- arch/arm/dts/sun50i-h5-orangepi-prime.dts | 189 ++++++++++++++++++++++--- arch/arm/dts/sun50i-h5-orangepi-zero-plus2.dts | 64 +++++++-- 5 files changed, 570 insertions(+), 82 deletions(-)
arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts +111 -11
@@ -1,18 +1,18 @@ /* * Copyright (C) 2017 Antony Antony <[email protected]> - * Copyright (c) 2016 ARM Ltd. + * Copyright (C) 2016 ARM Ltd. * * 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 + * 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 library is distributed in the hope that it will be useful, + * 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.
@@ -42,16 +42,18 @@ */ /dts-v1/; - #include "sun50i-h5.dtsi" #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/pinctrl/sun4i-a10.h> / { - model = "FriendlyARM NanoPi NEO Plus 2"; + model = "FriendlyARM NanoPi NEO Plus2"; compatible = "friendlyarm,nanopi-neo-plus2", "allwinner,sun50i-h5"; aliases { + ethernet0 = &emac; serial0 = &uart0; };
@@ -59,28 +61,116 @@ stdout-path = "serial0:115200n8"; }; + leds { + compatible = "gpio-leds"; + + pwr { + label = "nanopi:green:pwr"; + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + status { + label = "nanopi:red:status"; + gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; + }; + }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; + }; + reg_vcc3v3: vcc3v3 { compatible = "regulator-fixed"; regulator-name = "vcc3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; + + vdd_cpux: gpio-regulator { + compatible = "regulator-gpio"; + pinctrl-names = "default"; + regulator-name = "vdd-cpux"; + regulator-type = "voltage"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <50>; /* 4ms */ + gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; + gpios-states = <0x1>; + states = <1100000 0x0 + 1300000 0x1>; + }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ + post-power-on-delay-ms = <200>; + }; }; -&ehci1 { +&codec { + allwinner,audio-routing = + "Line Out", "LINEOUT", + "MIC1", "Mic", + "Mic", "MBIAS"; status = "okay"; }; -&mmc0 { +&ehci0 { + status = "okay"; +}; + +&ehci3 { + status = "okay"; +}; + +&emac { pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; + pinctrl-0 = <&emac_rgmii_pins>; + phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; + phy-mode = "rgmii"; + status = "okay"; +}; + +&external_mdio { + ext_rgmii_phy: ethernet-phy at 7 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <7>; + }; +}; + +&mmc0 { vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; - cd-inverted; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ status = "okay"; }; +&mmc1 { + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + brcmf: wifi at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; + &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_8bit_pins>;
@@ -91,7 +181,11 @@ status = "okay"; }; -&ohci1 { +&ohci0 { + status = "okay"; +}; + +&ohci3 { status = "okay"; };
@@ -101,6 +195,12 @@ status = "okay"; }; +&usb_otg { + dr_mode = "host"; + status = "okay"; +}; + &usbphy { + /* USB Type-A ports' VBUS is always on */ status = "okay"; };
arch/arm/dts/sun50i-h5-nanopi-neo2.dts +82 -9
141 lines not on this page · raw message
arch/arm/dts/sun50i-h5-orangepi-pc2.dts +152 -34
246 lines not on this page · raw message
arch/arm/dts/sun50i-h5-orangepi-prime.dts +169 -20
248 lines not on this page · raw message
arch/arm/dts/sun50i-h5-orangepi-zero-plus2.dts +56 -8
91 lines not on this page · raw message
Signature · 1 line
2.14.1
PATCH v6 5/7 sunxi: DT: H3: update board .dts files from Linux
In reply to Andre PrzywaraUpdate the .dts file for the various boards with an Allwinner H3 SoC. This is as of v4.17-rc5, exactly Linux commit:
commit f0842bc5637c45dec92b0c911d586279267559bf
Author: Jernej Skrabec <[email protected]> Date: Thu Mar 1 22:34:41 2018 +0100
ARM: dts: sun8i: h3: Enable HDMI output on H3 boards
This also includes the OrangePi Zero .dts, which technically has an Allwinner H2+ SoC.
This doesn't pull in the mainline DTs for the Libretech H2+/H3 boards, as they would un-optimise work of Chen-Yu. I expect the kernel to get something close to the U-Boot solution, so we can sync later. But we need a small adjustment in the shared .dtsi for the two boards.
--- arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 55 +++++++++++-- arch/arm/dts/sun8i-h3-bananapi-m2-plus.dts | 107 +++++++++++++++++-------- arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts | 78 ++++++++++++++++++ arch/arm/dts/sun8i-h3-nanopi-m1.dts | 42 ++++++++++ arch/arm/dts/sun8i-h3-nanopi-neo-air.dts | 28 +++++-- arch/arm/dts/sun8i-h3-nanopi-neo.dts | 17 ++++ arch/arm/dts/sun8i-h3-nanopi.dtsi | 13 ++- arch/arm/dts/sun8i-h3-orangepi-2.dts | 92 +++++++++++++++------- arch/arm/dts/sun8i-h3-orangepi-lite.dts | 57 ++++++++------ arch/arm/dts/sun8i-h3-orangepi-one.dts | 94 +++++++++++++++++----- arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts | 11 ++- arch/arm/dts/sun8i-h3-orangepi-pc.dts | 113 +++++++++++++++++++++------ arch/arm/dts/sun8i-h3-orangepi-plus.dts | 29 +++---- arch/arm/dts/sun8i-h3-orangepi-plus2e.dts | 15 +--- arch/arm/dts/sunxi-libretech-all-h3-cc.dtsi | 2 - 15 files changed, 565 insertions(+), 188 deletions(-)
arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts +47 -8
@@ -49,7 +49,6 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> -#include <dt-bindings/pinctrl/sun4i-a10.h> / { model = "Xunlong Orange Pi Zero";
@@ -58,6 +57,7 @@ aliases { serial0 = &uart0; /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */ + ethernet0 = &emac; ethernet1 = &xr819; };
@@ -92,9 +92,14 @@ wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; + post-power-on-delay-ms = <200>; }; }; +&ehci0 { + status = "okay"; +}; + &ehci1 { status = "okay"; };
@@ -107,18 +112,13 @@ }; &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ - cd-inverted; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ status = "okay"; }; &mmc1 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc1_pins_a>; vmmc-supply = <®_vcc_wifi>; mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>;
@@ -134,17 +134,56 @@ }; }; +&ohci0 { + status = "okay"; +}; + &ohci1 { status = "okay"; }; +&spi0 { + /* Disable SPI NOR by default: it optional on Orange Pi Zero boards */ + status = "disabled"; + + flash at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mxicy,mx25l1606e", "winbond,w25q128"; + reg = <0>; + spi-max-frequency = <40000000>; + }; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + status = "disabled"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + status = "disabled"; +}; + +&usb_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + &usbphy { - /* USB VBUS is always on */ + /* + * USB Type-A port VBUS is always on. However, MicroUSB VBUS can only + * power up the board; when it's used as OTG port, this VBUS is + * always off even if the board is powered via GPIO pins. + */ status = "okay"; + usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ };
arch/arm/dts/sun8i-h3-bananapi-m2-plus.dts +74 -33
189 lines not on this page · raw message
arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts +78 -0
93 lines not on this page · raw message
arch/arm/dts/sun8i-h3-nanopi-m1.dts +42 -0
54 lines not on this page · raw message
arch/arm/dts/sun8i-h3-nanopi-neo-air.dts +23 -5
@@ -45,7 +45,6 @@ #include "sunxi-common-regulators.dtsi" #include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/pinctrl/sun4i-a10.h> / { model = "FriendlyARM NanoPi NEO Air";
@@ -73,16 +72,35 @@ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ }; }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ + }; }; &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ - cd-inverted; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + status = "okay"; +}; + +&mmc1 { + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; status = "okay"; + + brcmf: bcrmf at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&pio>; + interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ + interrupt-names = "host-wake"; + }; }; &uart0 {
arch/arm/dts/sun8i-h3-nanopi-neo.dts +17 -0
@@ -47,9 +47,26 @@ compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3"; }; +&ehci0 { + status = "okay"; +}; + &emac { phy-handle = <&int_mii_phy>; phy-mode = "mii"; allwinner,leds-active-low; status = "okay"; }; + +&ohci0 { + status = "okay"; +}; + +&usb_otg { + status = "okay"; + dr_mode = "peripheral"; +}; + +&usbphy { + usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ +};
arch/arm/dts/sun8i-h3-nanopi.dtsi +5 -8
@@ -81,7 +81,7 @@ pinctrl-names = "default"; pinctrl-0 = <&sw_r_npi>; - k1 at 0 { + k1 { label = "k1"; linux,code = <KEY_POWER>; gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
@@ -95,10 +95,7 @@ &mmc0 { bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; - cd-inverted; - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; status = "okay"; vmmc-supply = <®_vcc3v3>; };
@@ -108,19 +105,19 @@ }; &pio { - leds_npi: led_pins at 0 { + leds_npi: led_pins { pins = "PA10"; function = "gpio_out"; }; }; &r_pio { - leds_r_npi: led_pins at 0 { + leds_r_npi: led_pins { pins = "PL10"; function = "gpio_out"; }; - sw_r_npi: key_pins at 0 { + sw_r_npi: key_pins { pins = "PL3"; function = "gpio_in"; };
arch/arm/dts/sun8i-h3-orangepi-2.dts +63 -29
148 lines not on this page · raw message
arch/arm/dts/sun8i-h3-orangepi-lite.dts +35 -22
105 lines not on this page · raw message
arch/arm/dts/sun8i-h3-orangepi-one.dts +73 -21
145 lines not on this page · raw message
arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts +7 -4
@@ -53,9 +53,12 @@ }; }; +&emac { + /* LEDs changed to active high on the plus */ + /delete-property/ allwinner,leds-active-low; +}; + &mmc1 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc1_pins_a>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; non-removable;
@@ -82,7 +85,7 @@ &mmc2_8bit_pins { /* Increase drive strength for DDR modes */ - allwinner,drive = <SUN4I_PINCTRL_40_MA>; + drive-strength = <40>; /* eMMC is missing pull-ups */ - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; + bias-pull-up; };
arch/arm/dts/sun8i-h3-orangepi-pc.dts +87 -26
168 lines not on this page · raw message
arch/arm/dts/sun8i-h3-orangepi-plus.dts +12 -17
@@ -47,10 +47,12 @@ model = "Xunlong Orange Pi Plus / Plus 2"; compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3"; + aliases { + ethernet0 = &emac; + }; + reg_gmac_3v3: gmac-3v3 { compatible = "regulator-fixed"; - pinctrl-names = "default"; - pinctrl-0 = <&gmac_power_pin_orangepi>; regulator-name = "gmac-3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
@@ -77,11 +79,13 @@ }; &emac { - /* The Orange Pi Plus uses an external phy */ pinctrl-names = "default"; pinctrl-0 = <&emac_rgmii_pins>; phy-supply = <®_gmac_3v3>; + phy-handle = <&ext_rgmii_phy>; phy-mode = "rgmii"; + + status = "okay"; }; &external_mdio {
@@ -103,24 +107,15 @@ &mmc2_8bit_pins { /* Increase drive strength for DDR modes */ - allwinner,drive = <SUN4I_PINCTRL_40_MA>; + drive-strength = <40>; /* eMMC is missing pull-ups */ - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; + bias-pull-up; }; &pio { - gmac_power_pin_orangepi: gmac_power_pin at 0 { - allwinner,pins = "PD6"; - allwinner,function = "gpio_out"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; - }; - - usb3_vbus_pin_a: usb3_vbus_pin at 0 { - allwinner,pins = "PG11"; - allwinner,function = "gpio_out"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + usb3_vbus_pin_a: usb3_vbus_pin { + pins = "PG11"; + function = "gpio_out"; }; };
arch/arm/dts/sun8i-h3-orangepi-plus2e.dts +2 -13
@@ -53,24 +53,22 @@ reg_gmac_3v3: gmac-3v3 { compatible = "regulator-fixed"; - pinctrl-names = "default"; - pinctrl-0 = <&gmac_power_pin_orangepi>; regulator-name = "gmac-3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; startup-delay-us = <100000>; enable-active-high; - gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ }; }; &emac { - /* The Orange Pi Plus 2E uses an external gbit phy */ pinctrl-names = "default"; pinctrl-0 = <&emac_rgmii_pins>; phy-supply = <®_gmac_3v3>; phy-handle = <&ext_rgmii_phy>; phy-mode = "rgmii"; + status = "okay"; }; &external_mdio {
@@ -79,12 +77,3 @@ reg = <1>; }; }; - -&pio { - gmac_power_pin_orangepi: gmac_power_pin at 0 { - allwinner,pins = "PD6"; - allwinner,function = "gpio_out"; - allwinner,drive = <SUN4I_PINCTRL_10_MA>; - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; - }; -};
arch/arm/dts/sunxi-libretech-all-h3-cc.dtsi +0 -2
@@ -131,8 +131,6 @@ }; &mmc0 { - pinctrl-names = "default"; - pinctrl-0 = <&mmc0_pins_a>; vmmc-supply = <®_vcc_io>; bus-width = <4>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
Signature · 1 line
2.14.1
PATCH v6 6/7 sunxi: DT: A64: add proper SoPine baseboard device tree
In reply to Andre PrzywaraWhen the defconfig for the SoPine baseboard was added, there wasn't any proper DT for the board yet, so we used the Pine64 DT as a placeholder. Copy the DT file(s) meanwhile added in Linux over to U-Boot, and use them in our defconfig.
--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/sun50i-a64-sopine-baseboard.dts | 150 +++++++++++++++++++++++++++ arch/arm/dts/sun50i-a64-sopine.dtsi | 142 +++++++++++++++++++++++++ configs/sopine_baseboard_defconfig | 2 +- 4 files changed, 295 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/sun50i-a64-sopine-baseboard.dts create mode 100644 arch/arm/dts/sun50i-a64-sopine.dtsi
arch/arm/dts/Makefile +2 -1
@@ -386,7 +386,8 @@ dtb-$(CONFIG_MACH_SUN50I) += \ sun50i-a64-olinuxino.dtb \ sun50i-a64-orangepi-win.dtb \ sun50i-a64-pine64-plus.dtb \ - sun50i-a64-pine64.dtb + sun50i-a64-pine64.dtb \ + sun50i-a64-sopine-baseboard.dtb dtb-$(CONFIG_MACH_SUN9I) += \ sun9i-a80-optimus.dtb \ sun9i-a80-cubieboard4.dtb \
arch/arm/dts/sun50i-a64-sopine-baseboard.dts new file +150 -0
150 lines not on this page · raw message
arch/arm/dts/sun50i-a64-sopine.dtsi new file +142 -0
142 lines not on this page · raw message
configs/sopine_baseboard_defconfig +1 -1
@@ -10,7 +10,7 @@ CONFIG_DRAM_ODT_EN=y CONFIG_MMC0_CD_PIN="" CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_SPL_SPI_SUNXI=y -CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-sopine-baseboard" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set
Signature · 1 line
2.14.1
PATCH v6 7/7 sunxi: DT: A64: add Pine64-LTS support
In reply to Andre PrzywaraThe Pine64-LTS board is a new board version of the Pine64, though actually it's a non-SoM version of the SoPine and its baseboard. In contrast to the original Pine64 it features LPDDR3 DRAM, an eMMC socket and a SPI flash chip for storing firmware (like U-Boot). Add it as a variant to the existing SoPine defconfig, since from a software point of view they are really not different.
--- arch/arm/dts/Makefile | 1 + arch/arm/dts/sun50i-a64-pine64-lts.dts | 13 +++++++++++++ configs/sopine_baseboard_defconfig | 1 + 3 files changed, 15 insertions(+) create mode 100644 arch/arm/dts/sun50i-a64-pine64-lts.dts
arch/arm/dts/Makefile +1 -0
@@ -385,6 +385,7 @@ dtb-$(CONFIG_MACH_SUN50I) += \ sun50i-a64-nanopi-a64.dtb \ sun50i-a64-olinuxino.dtb \ sun50i-a64-orangepi-win.dtb \ + sun50i-a64-pine64-lts.dtb \ sun50i-a64-pine64-plus.dtb \ sun50i-a64-pine64.dtb \ sun50i-a64-sopine-baseboard.dtb
arch/arm/dts/sun50i-a64-pine64-lts.dts new file +13 -0
@@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: (GPL-2.0+ OR MIT) + * + * Copyright (c) 2018 ARM Ltd. + */ + +#include "sun50i-a64-sopine-baseboard.dts" + +/ { + model = "Pine64 LTS"; + compatible = "pine64,pine64-lts", "allwinner,sun50i-r18", + "allwinner,sun50i-a64"; +};
configs/sopine_baseboard_defconfig +1 -0
@@ -11,6 +11,7 @@ CONFIG_MMC0_CD_PIN="" CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_SPL_SPI_SUNXI=y CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-sopine-baseboard" +CONFIG_OF_LIST="sun50i-a64-sopine-baseboard sun50i-a64-pine64-lts" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set # CONFIG_CMD_FLASH is not set # CONFIG_SPL_DOS_PARTITION is not set
Signature · 1 line
2.14.1
PATCH v6 7/7 sunxi: DT: A64: add Pine64-LTS support
Hi Andre,
Quoted 8 lines · Andre Przywara
The Pine64-LTS board is a new board version of the Pine64, though actually it's a non-SoM version of the SoPine and its baseboard. In contrast to the original Pine64 it features LPDDR3 DRAM, an eMMC socket and a SPI flash chip for storing firmware (like U-Boot). Add it as a variant to the existing SoPine defconfig, since from a software point of view they are really not different.
Signed-off-by Andre Przywara <[email protected]>
I'm mostly fine with the changes you made, there's just one thing that worries me a bit: the discoverability of the defconfig is pretty bad.
If you don't know it already, it's very difficult to see that the defconfig you should use for the Pine64 LTS is the SoPine Baseboard one.
Maybe we can add a symbolic link from the pine64_lts_defconfig to the sopine one to make that obvious?
The bonus would be that if we ever need to split them for whatever reason, we can do that without breaking each and every user setup.
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180518/7477445f/attachment.sig>
v6 cover sunxi: sync H3, H5, A64 DTs from mainline Linux
In reply to Andre PrzywaraQuoted 28 lines · Andre Przywara
This is an updated version of the series which brings the exact mainline Linux device tree files for various Allwinner boards into U-Boot. Apart from using the usually more correct reference DT files, this offers the big benefit of being able to use U-Boot's DT copy for directly passing it to the kernel. This avoids to actually load a .dtb file from somewhere, and allows seamless and automatic UEFI booting, so distribution installer images should just work (TM).
This cover the ARMv8 SoCs (H5, A64), but also all boards with the H3, as this is somewhat married to the H5 and can only be updated together. The H3 and H5 DT files have diverged quite a bit, but as U-Boot's own usage of the DT is (yet) quite limited, there should be no regressions. The patches are split to first update the SoC .dtsi file, then the board .dts files in a second patch. They are grouped to handle the A64 first, then the H5 and H3. I put the respective kernel commit IDs in the commit messages.
Patch 6 brings in the mainline DT for the SoPine baseboard, for which we didn't have a separate .dts in U-Boot so far.
Patch 7 adds a separate .dts file for the Pine64-LTS board, which is virtually identical to the SoPine baseboard, but, due to the SoC being named differently, deserves a separate file.This is based on origin/master (
ca70cbabdcd1).Maxime, I kept you Acked-by: from the previous posts, as I literally just updated to the latest Linux master, which went through your review anyway. Hope that's OK for you.
Quoted 6 lines
Cheers,
Andre.Changelog v5 .. v6:
- bring back DT update patches
- update to Linux v4.17-rc5
Are these based purely on 4.17rc5 because I don't see sun50i-a64-pine64-lts.dts in Linus's upstream.
Peter
Quoted 88 lines
Changelog v4 .. v5:
- drop Linux DT update patches for now
- fix minor checkpatch complaintsChangelog v3 .. v4:
- remove MMC environment for all Allwinner boards (including 32 bit ones)
- keep MMC environment offset to the old values
- drop DT adjustments to use fixed MMC regulatorChangelog v2 .. v3:
01: added, was on the list before
02: drop redundant H5 line
03-08: unchanged
09-20: addedChangelog v1 .. v2:
01, 02, 03: unchanged
04, 05, 06, 07: addedAndre Przywara (7):
sunxi: DT: A64: update device tree file for Allwinner A64 SoC
sunxi: DT: A64: update board .dts files from Linux
sunxi: DT: update device tree files for Allwinner H3 and H5 SoCs
sunxi: DT: H5: update board .dts files from Linux
sunxi: DT: H3: update board .dts files from Linux
sunxi: DT: A64: add proper SoPine baseboard device tree
sunxi: DT: A64: add Pine64-LTS supportarch/arm/dts/Makefile | 4 +- arch/arm/dts/axp803.dtsi | 150 +++++ arch/arm/dts/sun50i-a64-bananapi-m64.dts | 200 +++++- arch/arm/dts/sun50i-a64-nanopi-a64.dts | 111 +++- arch/arm/dts/sun50i-a64-olinuxino.dts | 153 ++++- arch/arm/dts/sun50i-a64-orangepi-win.dts | 135 +++- arch/arm/dts/sun50i-a64-pine64-lts.dts | 13 + arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi | 59 -- arch/arm/dts/sun50i-a64-pine64-plus.dts | 17 +- arch/arm/dts/sun50i-a64-pine64.dts | 186 +++++- arch/arm/dts/sun50i-a64-sopine-baseboard.dts | 150 +++++ arch/arm/dts/sun50i-a64-sopine.dtsi | 142 ++++ arch/arm/dts/sun50i-a64.dtsi | 303 ++++++++- arch/arm/dts/sun50i-h5-nanopi-neo-plus2.dts | 122 +++- arch/arm/dts/sun50i-h5-nanopi-neo2.dts | 91 ++- arch/arm/dts/sun50i-h5-orangepi-pc2.dts | 186 +++++- arch/arm/dts/sun50i-h5-orangepi-prime.dts | 189 +++++- arch/arm/dts/sun50i-h5-orangepi-zero-plus2.dts | 64 +- arch/arm/dts/sun50i-h5.dtsi | 36 +- arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 55 +- arch/arm/dts/sun8i-h3-bananapi-m2-plus.dts | 109 ++- arch/arm/dts/sun8i-h3-nanopi-m1-plus.dts | 78 +++ arch/arm/dts/sun8i-h3-nanopi-m1.dts | 42 ++ arch/arm/dts/sun8i-h3-nanopi-neo-air.dts | 28 +- arch/arm/dts/sun8i-h3-nanopi-neo.dts | 17 + arch/arm/dts/sun8i-h3-nanopi.dtsi | 13 +- arch/arm/dts/sun8i-h3-orangepi-2.dts | 92 ++- arch/arm/dts/sun8i-h3-orangepi-lite.dts | 57 +- arch/arm/dts/sun8i-h3-orangepi-one.dts | 94 ++- arch/arm/dts/sun8i-h3-orangepi-pc-plus.dts | 11 +- arch/arm/dts/sun8i-h3-orangepi-pc.dts | 113 +++- arch/arm/dts/sun8i-h3-orangepi-plus.dts | 29 +- arch/arm/dts/sun8i-h3-orangepi-plus2e.dts | 15 +- arch/arm/dts/sun8i-h3.dtsi | 544 ++------------- arch/arm/dts/sunxi-h3-h5.dtsi | 842 ++++++++++++++++++++++++ arch/arm/dts/sunxi-libretech-all-h3-cc.dtsi | 2 - configs/sopine_baseboard_defconfig | 3 +- include/dt-bindings/clock/sun8i-de2.h | 18 + include/dt-bindings/clock/sun8i-r-ccu.h | 59 ++ include/dt-bindings/reset/sun8i-de2.h | 14 + include/dt-bindings/reset/sun8i-r-ccu.h | 53 ++ 41 files changed, 3703 insertions(+), 896 deletions(-) create mode 100644 arch/arm/dts/axp803.dtsi create mode 100644 arch/arm/dts/sun50i-a64-pine64-lts.dts delete mode 100644 arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi create mode 100644 arch/arm/dts/sun50i-a64-sopine-baseboard.dts create mode 100644 arch/arm/dts/sun50i-a64-sopine.dtsi create mode 100644 arch/arm/dts/sunxi-h3-h5.dtsi create mode 100644 include/dt-bindings/clock/sun8i-de2.h create mode 100644 include/dt-bindings/clock/sun8i-r-ccu.h create mode 100644 include/dt-bindings/reset/sun8i-de2.h create mode 100644 include/dt-bindings/reset/sun8i-r-ccu.h--
2.14.1_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
v6 cover sunxi: sync H3, H5, A64 DTs from mainline Linux
Hi,
Quoted 32 lines · Peter Robinson
Quoted 31 lines · Andre Przywara
This is an updated version of the series which brings the exact mainline Linux device tree files for various Allwinner boards into U-Boot. Apart from using the usually more correct reference DT files, this offers the big benefit of being able to use U-Boot's DT copy for directly passing it to the kernel. This avoids to actually load a .dtb file from somewhere, and allows seamless and automatic UEFI booting, so distribution installer images should just work (TM).
This cover the ARMv8 SoCs (H5, A64), but also all boards with the H3, as this is somewhat married to the H5 and can only be updated together. The H3 and H5 DT files have diverged quite a bit, but as U-Boot's own usage of the DT is (yet) quite limited, there should be no regressions. The patches are split to first update the SoC .dtsi file, then the board .dts files in a second patch. They are grouped to handle the A64 first, then the H5 and H3. I put the respective kernel commit IDs in the commit messages.
Patch 6 brings in the mainline DT for the SoPine baseboard, for which we didn't have a separate .dts in U-Boot so far.
Patch 7 adds a separate .dts file for the Pine64-LTS board, which is virtually identical to the SoPine baseboard, but, due to the SoC being named differently, deserves a separate file.This is based on origin/master (
ca70cbabdcd1).Maxime, I kept you Acked-by: from the previous posts, as I literally just updated to the latest Linux master, which went through your review anyway. Hope that's OK for you.
Cheers,
Andre.
Quoted 6 lines
Quoted 3 lines
Changelog v5 .. v6:
- bring back DT update patches
- update to Linux v4.17-rc5Are these based purely on 4.17rc5 because I don't see
sun50i-a64-pine64-lts.dtsin Linus's upstream.
Well, yes, I added this trivial wrapper. I can (and probably will) post it to Linux, but actually it would be sufficient to have some DT in U-Boot (and on the SPI flash!), so that one can just use $fdtcontroladdr and be done.
In case you wonder about (other) differences between mainline and this
series: There is this one path name change in the sun50i-h5.dtsi, mentioned in the 3/7 commit message, plus I left in the common libretech .dtsi Chen-Yu created for U-Boot. I guess we will see this sooner or later in Linux and can then sync this back, if needed.
Cheers,
Andre.
v6 cover sunxi: sync H3, H5, A64 DTs from mainline Linux
In reply to Andre PrzywaraQuoted 54 lines · Andre Przywara
This is an updated version of the series which brings the exact mainline Linux device tree files for various Allwinner boards into U-Boot. Apart from using the usually more correct reference DT files, this offers the big benefit of being able to use U-Boot's DT copy for directly passing it to the kernel. This avoids to actually load a .dtb file from somewhere, and allows seamless and automatic UEFI booting, so distribution installer images should just work (TM).
This cover the ARMv8 SoCs (H5, A64), but also all boards with the H3, as this is somewhat married to the H5 and can only be updated together. The H3 and H5 DT files have diverged quite a bit, but as U-Boot's own usage of the DT is (yet) quite limited, there should be no regressions. The patches are split to first update the SoC .dtsi file, then the board .dts files in a second patch. They are grouped to handle the A64 first, then the H5 and H3. I put the respective kernel commit IDs in the commit messages.
Patch 6 brings in the mainline DT for the SoPine baseboard, for which we didn't have a separate .dts in U-Boot so far.
Patch 7 adds a separate .dts file for the Pine64-LTS board, which is virtually identical to the SoPine baseboard, but, due to the SoC being named differently, deserves a separate file.This is based on origin/master (
ca70cbabdcd1).Maxime, I kept you Acked-by: from the previous posts, as I literally just updated to the latest Linux master, which went through your review anyway. Hope that's OK for you.
Cheers,
Andre.Changelog v5 .. v6:
- bring back DT update patches
- update to Linux v4.17-rc5Changelog v4 .. v5:
- drop Linux DT update patches for now
- fix minor checkpatch complaintsChangelog v3 .. v4:
- remove MMC environment for all Allwinner boards (including 32 bit ones)
- keep MMC environment offset to the old values
- drop DT adjustments to use fixed MMC regulatorChangelog v2 .. v3:
01: added, was on the list before
02: drop redundant H5 line
03-08: unchanged
09-20: addedChangelog v1 .. v2:
01, 02, 03: unchanged
04, 05, 06, 07: added
Quoted 7 lines
Andre Przywara (7):
sunxi: DT: A64: update device tree file for Allwinner A64 SoC
sunxi: DT: A64: update board .dts files from Linux
sunxi: DT: update device tree files for Allwinner H3 and H5 SoCs
sunxi: DT: H5: update board .dts files from Linux
sunxi: DT: H3: update board .dts files from Linux
sunxi: DT: A64: add proper SoPine baseboard device tree
Please rebase on master and send, files from A64, H5 and H3 has changed a bit.
v6 cover sunxi: sync H3, H5, A64 DTs from mainline Linux
Hi,
Quoted 63 lines · Jagan Teki
Quoted 54 lines · Andre Przywara
This is an updated version of the series which brings the exact mainline Linux device tree files for various Allwinner boards into U-Boot. Apart from using the usually more correct reference DT files, this offers the big benefit of being able to use U-Boot's DT copy for directly passing it to the kernel. This avoids to actually load a .dtb file from somewhere, and allows seamless and automatic UEFI booting, so distribution installer images should just work (TM).
This cover the ARMv8 SoCs (H5, A64), but also all boards with the H3, as this is somewhat married to the H5 and can only be updated together. The H3 and H5 DT files have diverged quite a bit, but as U-Boot's own usage of the DT is (yet) quite limited, there should be no regressions. The patches are split to first update the SoC .dtsi file, then the board .dts files in a second patch. They are grouped to handle the A64 first, then the H5 and H3. I put the respective kernel commit IDs in the commit messages.
Patch 6 brings in the mainline DT for the SoPine baseboard, for which we didn't have a separate .dts in U-Boot so far.
Patch 7 adds a separate .dts file for the Pine64-LTS board, which is virtually identical to the SoPine baseboard, but, due to the SoC being named differently, deserves a separate file.This is based on origin/master (
ca70cbabdcd1).Maxime, I kept you Acked-by: from the previous posts, as I literally just updated to the latest Linux master, which went through your review anyway. Hope that's OK for you.
Cheers,
Andre.Changelog v5 .. v6:
- bring back DT update patches
- update to Linux v4.17-rc5Changelog v4 .. v5:
- drop Linux DT update patches for now
- fix minor checkpatch complaintsChangelog v3 .. v4:
- remove MMC environment for all Allwinner boards (including 32 bit ones)
- keep MMC environment offset to the old values
- drop DT adjustments to use fixed MMC regulatorChangelog v2 .. v3:
01: added, was on the list before
02: drop redundant H5 line
03-08: unchanged
09-20: addedChangelog v1 .. v2:
01, 02, 03: unchanged
04, 05, 06, 07: addedQuoted 7 lines
Andre Przywara (7):
sunxi: DT: A64: update device tree file for Allwinner A64 SoC
sunxi: DT: A64: update board .dts files from Linux
sunxi: DT: update device tree files for Allwinner H3 and H5 SoCs
sunxi: DT: H5: update board .dts files from Linux
sunxi: DT: H3: update board .dts files from Linux
sunxi: DT: A64: add proper SoPine baseboard device tree
Quoted 1 line
Reviewed-by Jagan Teki <[email protected]>
Thanks!
Quoted 1 line
Please rebase on master and send, files from A64, H5 and H3 has changed a bit.
Yes, I rebased already on Sunday against 4.18-rc1. There is an issue with the recent sunxi USB changes in U-Boot, as these patches here now enable all USB controllers, which U-Boot apparently doesn't like. Will debug this and then send ASAP.
Cheers,
Andre.