[U-Boot] [PATCH v4 13/19] sunxi: DT: A64: update board .dts files from Linux

Jagan Teki jagannadh.teki at gmail.com
Fri Mar 23 18:14:13 UTC 2018


On Wed, Mar 14, 2018 at 7:27 AM, Andre Przywara <andre.przywara at arm.com> wrote:
> Update the .dts files for the various boards with an Allwinner A64 SoC.
> This is as of v4.15-rc9, exactly Linux commit:
> commit bdfe4cebea11476d278b1b98dd0f7cdac8269d62
> Author: Icenowy Zheng <icenowy at aosc.io>
> Date:   Fri Nov 10 17:26:54 2017 +0800
>     arm64: allwinner: a64: add Ethernet PHY regulator for several boards
>
> 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.
>
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> Acked-by: Maxime Ripard <maxime.ripard at bootlin.com>
> ---
>  arch/arm/dts/axp803.dtsi                        | 150 ++++++++++++++++++++
>  arch/arm/dts/sun50i-a64-bananapi-m64.dts        | 161 +++++++++++++++++++--
>  arch/arm/dts/sun50i-a64-nanopi-a64.dts          | 108 ++++++++++++--
>  arch/arm/dts/sun50i-a64-olinuxino.dts           | 131 +++++++++++++++--
>  arch/arm/dts/sun50i-a64-orangepi-win.dts        |   7 +-
>  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              | 178 +++++++++++++++++++++++-
>  8 files changed, 716 insertions(+), 56 deletions(-)
>  create mode 100644 arch/arm/dts/axp803.dtsi
>  delete mode 100644 arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi
>
> diff --git a/arch/arm/dts/axp803.dtsi b/arch/arm/dts/axp803.dtsi
> new file mode 100644
> index 0000000000..ff8af52743
> --- /dev/null
> +++ b/arch/arm/dts/axp803.dtsi
> @@ -0,0 +1,150 @@
> +/*
> + * Copyright 2017 Icenowy Zheng <icenowy at aosc.xyz>
> + *
> + * 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";
> +               };
> +       };
> +};
> diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64.dts b/arch/arm/dts/sun50i-a64-bananapi-m64.dts
> index 02db114113..4a8d3f83a3 100644
> --- a/arch/arm/dts/sun50i-a64-bananapi-m64.dts
> +++ b/arch/arm/dts/sun50i-a64-bananapi-m64.dts
> @@ -1,6 +1,5 @@
>  /*
>   * Copyright (c) 2016 ARM Ltd.
> - * Copyright (C) 2017 Jagan Teki <jteki at openedev.com>
>   *
>   * 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
> @@ -52,6 +51,7 @@
>         compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64";
>
>         aliases {
> +               ethernet0 = &emac;
>                 serial0 = &uart0;
>                 serial1 = &uart1;
>         };
> @@ -60,14 +60,25 @@
>                 stdout-path = "serial0:115200n8";
>         };
>
> -       reg_vcc3v3: vcc3v3 {
> -               compatible = "regulator-fixed";
> -               regulator-name = "vcc3v3";
> -               regulator-min-microvolt = <3300000>;
> -               regulator-max-microvolt = <3300000>;
> +       wifi_pwrseq: wifi_pwrseq {
> +               compatible = "mmc-pwrseq-simple";
> +               reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
>         };
>  };
>
> +&ehci1 {
> +       status = "okay";
> +};
> +
> +&emac {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&rgmii_pins>;
> +       phy-mode = "rgmii";
> +       phy-handle = <&ext_rgmii_phy>;
> +       phy-supply = <&reg_dc1sw>;
> +       status = "okay";
> +};
> +
>  &i2c1 {
>         pinctrl-names = "default";
>         pinctrl-0 = <&i2c1_pins>;
> @@ -78,10 +89,17 @@
>         bias-pull-up;
>  };
>
> +&mdio {
> +       ext_rgmii_phy: ethernet-phy at 1 {
> +               compatible = "ethernet-phy-ieee802.3-c22";
> +               reg = <1>;
> +       };
> +};
> +
>  &mmc0 {
>         pinctrl-names = "default";
>         pinctrl-0 = <&mmc0_pins>;
> -       vmmc-supply = <&reg_vcc3v3>;
> +       vmmc-supply = <&reg_dcdc1>;
>         cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
>         cd-inverted;
>         disable-wp;
> @@ -92,22 +110,143 @@
>  &mmc1 {
>         pinctrl-names = "default";
>         pinctrl-0 = <&mmc1_pins>;
> -       vmmc-supply = <&reg_vcc3v3>;
> +       vmmc-supply = <&reg_dldo2>;
> +       vqmmc-supply = <&reg_dldo4>;
> +       mmc-pwrseq = <&wifi_pwrseq>;
>         bus-width = <4>;
>         non-removable;
>         status = "okay";
> +
> +       brcmf: wifi at 1 {
> +               reg = <1>;
> +               compatible = "brcm,bcm4329-fmac";
> +               interrupt-parent = <&r_pio>;
> +               interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
> +               interrupt-names = "host-wake";
> +       };
>  };
>
>  &mmc2 {
>         pinctrl-names = "default";
>         pinctrl-0 = <&mmc2_pins>;
> -       vmmc-supply = <&reg_vcc3v3>;
> +       vmmc-supply = <&reg_dcdc1>;

These AXP regulator stuff need to wait until the relevant driver
supported through dt otherwise moving to DM_MMC might fail to get the
regulator? [1]

[1] https://patchwork.ozlabs.org/patch/887405/

Jagan.


More information about the U-Boot mailing list