[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1578646330.18795.4.camel@mtksdaap41>
Date: Fri, 10 Jan 2020 16:52:10 +0800
From: Yingjoe Chen <yingjoe.chen@...iatek.com>
To: Hsin-Yi Wang <hsinyi@...omium.org>
CC: <linux-arm-kernel@...ts.infradead.org>,
Mark Rutland <mark.rutland@....com>,
<devicetree@...r.kernel.org>,
Nicolas Boichat <drinkcat@...omium.org>,
<linux-kernel@...r.kernel.org>,
"Enric Balletbo i Serra" <enric.balletbo@...labora.com>,
Rob Herring <robh+dt@...nel.org>,
<linux-mediatek@...ts.infradead.org>,
Matthias Brugger <matthias.bgg@...il.com>
Subject: Re: [PATCH v2 2/2] arm64: dts: mediatek: add mt8173 elm and hana
board
On Fri, 2020-01-10 at 15:37 +0800, Hsin-Yi Wang wrote:
> Elm is Acer Chromebook R13. Hana is Lenovo Chromebook. Both uses mt8173
> SoC.
>
> Signed-off-by: Hsin-Yi Wang <hsinyi@...omium.org>
> ---
> Changes in v2:
> - remove downstream nodes and unused nodes
> - use GPIO_ACTIVE_LOW for ps8640 gpios
> - move trackpad to hana
> ---
> arch/arm64/boot/dts/mediatek/Makefile | 3 +
> .../dts/mediatek/mt8173-elm-hana-rev7.dts | 27 +
> .../boot/dts/mediatek/mt8173-elm-hana.dts | 16 +
> .../boot/dts/mediatek/mt8173-elm-hana.dtsi | 60 +
> arch/arm64/boot/dts/mediatek/mt8173-elm.dts | 15 +
> arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 1040 +++++++++++++++++
> 6 files changed, 1161 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8173-elm.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
>
> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> index 458bbc422a94..b45a45a565a1 100644
> --- a/arch/arm64/boot/dts/mediatek/Makefile
> +++ b/arch/arm64/boot/dts/mediatek/Makefile
> @@ -6,5 +6,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm-hana.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm-hana-rev7.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-evb.dtb
> diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dts b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dts
> new file mode 100644
> index 000000000000..a3616bc3d859
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dts
> @@ -0,0 +1,27 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright 2019 MediaTek Inc.
> + */
> +
> +/dts-v1/;
> +#include "mt8173-elm-hana.dtsi"
> +
> +/ {
> + model = "Mediatek Hana rev7 board";
> + compatible = "google,hana-rev7", "mediatek,mt8173";
> +};
> +
> +&cpu_thermal {
> + trips {
> + cpu_crit: cpu_crit@0 {
> + temperature = <100000>;
> + type = "critical";
> + };
> + };
> +};
> +
> +&gpio_keys {
> + /delete-node/tablet_mode;
> + /delete-node/volume_down;
> + /delete-node/volume_up;
> +};
> \ No newline at end of file
nit: Please add a newline at end of file for all files in this patch.
> diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dts b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dts
> new file mode 100644
> index 000000000000..8cbcc75192e3
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dts
> @@ -0,0 +1,16 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright 2016 MediaTek Inc.
> + */
> +
> +/dts-v1/;
> +#include "mt8173-elm-hana.dtsi"
> +
> +/ {
> + model = "Mediatek Hana rev0 board";
> + compatible = "google,hana-rev6",
> + "google,hana-rev5", "google,hana-rev4",
> + "google,hana-rev3", "google,hana-rev2",
> + "google,hana-rev1", "google,hana-rev0",
> + "google,hana", "mediatek,mt8173";
> +};
> \ No newline at end of file
<...>
> +
> +&pwrap {
> + pmic: mt6397 {
> + compatible = "mediatek,mt6397";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + interrupt-parent = <&pio>;
> + interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> +
> + mt6397rtc: mt6397rtc {
> + compatible = "mediatek,mt6397-rtc";
> + };
> +
> + syscfg_pctl_pmic: syscfg_pctl_pmic@...0 {
> + compatible = "mediatek,mt6397-pctl-pmic-syscfg",
> + "syscon";
> + reg = <0 0x0000c000 0 0x0108>;
> + };
> +
> + pio6397: pinctrl@...0 {
> + compatible = "mediatek,mt6397-pinctrl";
> + pins-are-numbered;
> + gpio-controller;
> + #gpio-cells = <2>;
> + };
> +
> + mt6397clock: mt6397clock {
> + compatible = "mediatek,mt6397-clk";
> + #clock-cells = <1>;
> + };
> +
> + mt6397regulator: mt6397regulator {
> + compatible = "mediatek,mt6397-regulator";
> +
> + mt6397_vpca15_reg: buck_vpca15 {
> + regulator-compatible = "buck_vpca15";
> + regulator-name = "vpca15";
> + regulator-min-microvolt = < 700000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-ramp-delay = <12500>;
> + regulator-always-on;
> + regulator-allowed-modes = <0 1>;
> + };
> +
> + mt6397_vpca7_reg: buck_vpca7 {
> + regulator-compatible = "buck_vpca7";
> + regulator-name = "vpca7";
> + regulator-min-microvolt = < 700000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-ramp-delay = <12500>;
> + regulator-enable-ramp-delay = <115>;
> + regulator-always-on;
> + };
> +
> + mt6397_vsramca15_reg: buck_vsramca15 {
> + regulator-compatible = "buck_vsramca15";
> + regulator-name = "vsramca15";
> + regulator-min-microvolt = < 700000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-ramp-delay = <12500>;
> + regulator-always-on;
> + };
> +
> + mt6397_vsramca7_reg: buck_vsramca7 {
> + regulator-compatible = "buck_vsramca7";
> + regulator-name = "vsramca7";
> + regulator-min-microvolt = < 700000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-ramp-delay = <12500>;
> + regulator-always-on;
> + };
> +
> + mt6397_vcore_reg: buck_vcore {
> + regulator-compatible = "buck_vcore";
> + regulator-name = "vcore";
> + regulator-min-microvolt = < 700000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-ramp-delay = <12500>;
> + regulator-always-on;
> + };
> +
> + mt6397_vgpu_reg: buck_vgpu {
> + regulator-compatible = "buck_vgpu";
> + regulator-name = "vgpu";
> + regulator-min-microvolt = < 700000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-ramp-delay = <12500>;
> + regulator-enable-ramp-delay = <115>;
> + };
> +
> + mt6397_vdrm_reg: buck_vdrm {
> + regulator-compatible = "buck_vdrm";
> + regulator-name = "vdrm";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <1400000>;
> + regulator-ramp-delay = <12500>;
> + regulator-always-on;
> + };
> +
> + mt6397_vio18_reg: buck_vio18 {
> + regulator-compatible = "buck_vio18";
> + regulator-name = "vio18";
> + regulator-min-microvolt = <1620000>;
> + regulator-max-microvolt = <1980000>;
> + regulator-ramp-delay = <12500>;
> + regulator-always-on;
> + };
> +
> + mt6397_vtcxo_reg: ldo_vtcxo {
> + regulator-compatible = "ldo_vtcxo";
> + regulator-name = "vtcxo";
> + regulator-always-on;
> + };
> +
> + mt6397_va28_reg: ldo_va28 {
> + regulator-compatible = "ldo_va28";
> + regulator-name = "va28";
> + };
> +
> + mt6397_vcama_reg: ldo_vcama {
> + regulator-compatible = "ldo_vcama";
> + regulator-name = "vcama";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-enable-ramp-delay = <218>;
> + };
> +
> + mt6397_vio28_reg: ldo_vio28 {
> + regulator-compatible = "ldo_vio28";
> + regulator-name = "vio28";
> + regulator-always-on;
> + };
> +
> + mt6397_vusb_reg: ldo_vusb {
> + regulator-compatible = "ldo_vusb";
> + regulator-name = "vusb";
> + };
> +
> + mt6397_vmc_reg: ldo_vmc {
> + regulator-compatible = "ldo_vmc";
> + regulator-name = "vmc";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-enable-ramp-delay = <218>;
> + };
> +
> + mt6397_vmch_reg: ldo_vmch {
> + regulator-compatible = "ldo_vmch";
> + regulator-name = "vmch";
> + regulator-min-microvolt = <3000000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-enable-ramp-delay = <218>;
> + };
> +
> + mt6397_vemc_3v3_reg: ldo_vemc3v3 {
> + regulator-compatible = "ldo_vemc3v3";
> + regulator-name = "vemc_3v3";
> + regulator-min-microvolt = <3000000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-enable-ramp-delay = <218>;
> + };
> +
> + mt6397_vgp1_reg: ldo_vgp1 {
> + regulator-compatible = "ldo_vgp1";
> + regulator-name = "vcamd";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-enable-ramp-delay = <240>;
> + };
> +
> + mt6397_vgp2_reg: ldo_vgp2 {
> + regulator-compatible = "ldo_vgp2";
> + regulator-name = "vcamio";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-enable-ramp-delay = <218>;
> + };
> +
> + mt6397_vgp3_reg: ldo_vgp3 {
> + regulator-compatible = "ldo_vgp3";
> + regulator-name = "vcamaf";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-enable-ramp-delay = <218>;
> + };
> +
> + mt6397_vgp4_reg: ldo_vgp4 {
> + regulator-compatible = "ldo_vgp4";
> + regulator-name = "vgp4";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-enable-ramp-delay = <218>;
> + };
> +
> + mt6397_vgp5_reg: ldo_vgp5 {
> + regulator-compatible = "ldo_vgp5";
> + regulator-name = "vgp5";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <3000000>;
> + regulator-enable-ramp-delay = <218>;
> + };
> +
> + mt6397_vgp6_reg: ldo_vgp6 {
> + regulator-compatible = "ldo_vgp6";
> + regulator-name = "vgp6";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-enable-ramp-delay = <218>;
> + regulator-always-on;
> + };
> +
> + mt6397_vibr_reg: ldo_vibr {
> + regulator-compatible = "ldo_vibr";
> + regulator-name = "vibr";
> + regulator-min-microvolt = <1300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-enable-ramp-delay = <218>;
> + };
> + };
> + };
> +};
> +
> +&spi {
> + pinctrl-names = "default";
> + pinctrl-0 = <&spi_pins_a>;
> + mediatek,pad-select = <1>;
> + status = "okay";
> + /* clients */
> + cros_ec: ec@0 {
> + compatible = "google,cros-ec-spi";
> + reg = <0x0>;
> + spi-max-frequency = <12000000>;
> + interrupt-parent = <&pio>;
> + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> + google,cros-ec-spi-msg-delay = <500>;
> +
> + i2c_tunnel: i2c-tunnel@0 {
> + compatible = "google,cros-ec-i2c-tunnel";
> + google,remote-bus = <0>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + battery: sbs-battery@b {
> + compatible = "sbs,sbs-battery";
> + reg = <0xb>;
> + sbs,i2c-retry-count = <2>;
> + sbs,poll-retry-count = <1>;
> + };
> + };
> + };
> +};
> +
> +&thermal {
> + bank0-supply = <&mt6397_vpca15_reg>;
> + bank1-supply = <&da9211_vcpu_reg>;
> +};
> +
> +&uart0 {
> + status = "okay";
> +};
> +
> +&ssusb {
sorting according to name, please put this before thermal.
Joe.C
Powered by blists - more mailing lists