Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751855AbdLAHyg (ORCPT ); Fri, 1 Dec 2017 02:54:36 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:55199 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751066AbdLAHyd (ORCPT ); Fri, 1 Dec 2017 02:54:33 -0500 Date: Fri, 1 Dec 2017 08:54:21 +0100 From: Maxime Ripard To: Jagan Teki Cc: Chen-Yu Tsai , Icenowy Zheng , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Janoff , Stuart Westerman , linux-sunxi@googlegroups.com, Jagan Teki Subject: Re: [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support Message-ID: <20171201075421.33pgum4jjcvjxuju@flea.lan> References: <1512067334-12761-1-git-send-email-jagan@amarulasolutions.com> <1512067334-12761-2-git-send-email-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5yhfpj3mopnykck3" Content-Disposition: inline In-Reply-To: <1512067334-12761-2-git-send-email-jagan@amarulasolutions.com> User-Agent: NeoMutt/20171027 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9537 Lines: 331 --5yhfpj3mopnykck3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 01, 2017 at 12:12:14AM +0530, Jagan Teki wrote: > Brava Keller is A64 based IoT device, which support > - Allwinner A64 Cortex-A53 > - AXP803 PMIC > - 1GB DDR3 RAM > - 8GB eMMC > - Mali-400MP2 GPU > - AP6330 Wifi/BLE > - Camera OV5640 > - USB Host and OTG >=20 > Signed-off-by: Jagan Teki > --- > Note: Need to test it on hardware > =20 > arch/arm64/boot/dts/allwinner/Makefile | 1 + > .../boot/dts/allwinner/sun50i-a64-brava-keller.dts | 244 +++++++++++++++= ++++++ > 2 files changed, 245 insertions(+) > create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller= =2Edts >=20 > diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts= /allwinner/Makefile > index f505227..af80ca0 100644 > --- a/arch/arm64/boot/dts/allwinner/Makefile > +++ b/arch/arm64/boot/dts/allwinner/Makefile > @@ -1,5 +1,6 @@ > # SPDX-License-Identifier: GPL-2.0 > dtb-$(CONFIG_ARCH_SUNXI) +=3D sun50i-a64-bananapi-m64.dtb > +dtb-$(CONFIG_ARCH_SUNXI) +=3D sun50i-a64-brava-keller.dtb > dtb-$(CONFIG_ARCH_SUNXI) +=3D sun50i-a64-nanopi-a64.dtb > dtb-$(CONFIG_ARCH_SUNXI) +=3D sun50i-a64-olinuxino.dtb > dtb-$(CONFIG_ARCH_SUNXI) +=3D sun50i-a64-orangepi-win.dtb > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts b/= arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts > new file mode 100644 > index 0000000..f5303a3 > --- /dev/null > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts > @@ -0,0 +1,244 @@ > +/* > + * Copyright (C) 2017 Jagan Teki > + * > + * 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 > + > +/ { > + model =3D "Brava Keller"; > + compatible =3D "brava,brava-keller", "allwinner,sun50i-a64"; > + > + aliases { > + serial2 =3D &uart2; > + }; > + > + chosen { > + stdout-path =3D "serial0:115200n8"; > + }; Same comment than on U-Boot. > + wifi_pwrseq: wifi_pwrseq { > + compatible =3D "mmc-pwrseq-simple"; > + pinctrl-names =3D "default"; > + reset-gpios =3D <&pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */ > + post-power-on-delay-ms =3D <200>; > + }; > +}; > + > +&ehci0 { > + status =3D "okay"; > +}; > + > +&ehci1 { > + status =3D "okay"; > +}; > + > +&mmc1 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&mmc1_pins>; > + vmmc-supply =3D <®_dcdc1>; > + vqmmc-supply =3D <®_dldo4>; > + mmc-pwrseq =3D <&wifi_pwrseq>; > + bus-width =3D <4>; > + non-removable; > + status =3D "okay"; > + > + brcmf: wifi@1 { > + reg =3D <1>; > + compatible =3D "brcm,bcm4329-fmac"; > + interrupt-parent =3D <&r_pio>; > + interrupts =3D <0 7 IRQ_TYPE_LEVEL_LOW>; /* WL-WAKE-AP: PL3 */ > + interrupt-names =3D "host-wake"; > + }; > +}; > + > +&mmc2 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&mmc2_pins>; > + vmmc-supply =3D <®_dcdc1>; You probably have a vqmmc tosetup too. > + bus-width =3D <8>; > + non-removable; > + cap-mmc-hw-reset; > + status =3D "okay"; > +}; > + > +&ohci0 { > + status =3D "okay"; > +}; > + > +&ohci1 { > + status =3D "okay"; > +}; > + > +&r_rsb { > + status =3D "okay"; > + > + axp803: pmic@3a3 { > + compatible =3D "x-powers,axp803"; > + reg =3D <0x3a3>; > + interrupt-parent =3D <&r_intc>; > + interrupts =3D <0 IRQ_TYPE_LEVEL_LOW>; > + }; > +}; > + > +#include "axp803.dtsi" > + > +®_aldo1 { > + regulator-always-on; > + regulator-min-microvolt =3D <1800000>; > + regulator-max-microvolt =3D <3300000>; > + regulator-name =3D "avdd-csi"; > +}; > + > +®_aldo2 { > + regulator-always-on; > + regulator-min-microvolt =3D <1800000>; > + regulator-max-microvolt =3D <1800000>; > + regulator-name =3D "vcc-pl"; > +}; > + > +®_aldo3 { > + regulator-always-on; > + regulator-min-microvolt =3D <3000000>; > + regulator-max-microvolt =3D <3000000>; > + regulator-name =3D "vcc-pll-avcc"; > +}; > + > +®_dcdc1 { > + regulator-always-on; > + regulator-min-microvolt =3D <3300000>; > + regulator-max-microvolt =3D <3300000>; > + regulator-name =3D "vcc-3v3"; > +}; > + > +®_dcdc2 { > + regulator-always-on; > + regulator-min-microvolt =3D <1040000>; > + regulator-max-microvolt =3D <1300000>; > + regulator-name =3D "vdd-cpux"; > +}; > + > +/* DCDC3 is polyphased with DCDC2 */ > + > +®_dcdc5 { > + regulator-always-on; > + regulator-min-microvolt =3D <1500000>; > + regulator-max-microvolt =3D <1500000>; > + regulator-name =3D "vcc-dram"; > +}; > + > +®_dcdc6 { > + regulator-always-on; > + regulator-min-microvolt =3D <1100000>; > + regulator-max-microvolt =3D <1100000>; > + regulator-name =3D "vdd-sys"; > +}; > + > +®_dldo1 { > + regulator-min-microvolt =3D <3300000>; > + regulator-max-microvolt =3D <3300000>; > + regulator-name =3D "vcc-hdmi-dsi-sensor"; > +}; > + > +®_dldo2 { > + regulator-min-microvolt =3D <3300000>; > + regulator-max-microvolt =3D <3300000>; > + regulator-name =3D "vcc-mipi"; > +}; > + > +®_dldo3 { > + regulator-min-microvolt =3D <2800000>; > + regulator-max-microvolt =3D <2800000>; > + regulator-name =3D "vcc-gen"; > +}; > + > +®_dldo4 { > + regulator-min-microvolt =3D <3300000>; > + regulator-max-microvolt =3D <3300000>; > + regulator-name =3D "vcc-wifi-io"; > +}; > + > +®_eldo1 { > + regulator-min-microvolt =3D <1800000>; > + regulator-max-microvolt =3D <1800000>; > + regulator-name =3D "cpvdd"; > +}; > + > +®_fldo1 { > + regulator-min-microvolt =3D <1200000>; > + regulator-max-microvolt =3D <1200000>; > + regulator-name =3D "vcc-1v2-hsic"; > +}; > + > +/* > + * The A64 chip cannot work without this regulator off, although > + * it seems to be only driving the AR100 core. > + * Maybe we don't still know well about CPUs domain. > + */ > +®_fldo2 { > + regulator-always-on; > + regulator-min-microvolt =3D <1100000>; > + regulator-max-microvolt =3D <1100000>; > + regulator-name =3D "vdd-cpus"; > +}; > + > +®_rtc_ldo { > + regulator-name =3D "vcc-rtc"; > +}; > + > +&uart1 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&uart1_pins>, <&uart1_rts_cts_pins>; > + status =3D "okay"; > +}; I guess this is a BT device, please use the serdev binding here. > +&uart2 { > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&uart2_pins>; > + status =3D "okay"; > +}; > + > +&usbphy { > + status =3D "okay"; And please tie in the regulators here. > +}; > --=20 > 2.7.4 >=20 --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --5yhfpj3mopnykck3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlohCqoACgkQ0rTAlCFN r3TOxQ/+P93jBdn0ow6YCTk/MfozSfJDny9MMxszyJNI3IZjpj+A+/xueWwbSScP ElNr+DyX0AhDKgqmzW7SgkpvOfQ9YC4cO6oSDdQpp+4lFYT1VQw19swdOQnx6aeJ 5Xv756gUh0V2abCuMM2Dq99jpHJaTIxFXFMFAXy47sKI/zvfSTymf1IGcxTeBfa7 nFPrYQYCiQK+QGTpD67/RxZHOJO93IsuWqgoONjXqkFnz6j05+MqW9OV1WfmAPW5 9uqmqqderzEiNESEP0CyjK9zSSdouHkm3O7V2yVt96/M+NOPJwRZRhQWKhWXpuFK t37Q6ptIH6V2L99vNUV27PPXP0Yrx/o6jrZUs5OiGsuBZexqLFyWr5viXSt5gEAw ur9uPJGEP/J36tRolnJCSxUVtTi5CCgIaYqEaWOrdV/9UBiD4aUUUSyc2Rk1w6Zx nShnaO2m8pz38QgBGaeyVJMGmhI//tYJ5RmGfM2BvgIGch/1ey9jKsr/GKV+MIwn ZzFUDl9e+sziXYPGUrVzMF0QhlI3RYolWJtQ6DsGD87+EfbvTHPGeWXuvPautLey /cP1DzKxSeWlGRcfci9B7LjGa0naF+j3DFPWbu9giwdWrdHClmmlpHdHw1B3AghF MYDRhhY7/jD9T0fYaAUhjc1Fo0dULB/PtqxNxW1yBD2cbHhLfzA= =Za2F -----END PGP SIGNATURE----- --5yhfpj3mopnykck3--