arm: dts: extend mt7623 support
Subsystems (5)
v5 cover arm: dts: extend mt7623 support
From: Sean Wang <[email protected]>
Change since v4:
- split mt6323 nodes as the independent item which tends to integration with other MediaTek SoCs
- enhanced commit log
- fixed up building warning shown in make dtsb
- added clock-frequency to CPU nodes to avoid warning in boot time
- added more nodes into the SoC-level file mt7623.dtsi such as CPU OPP table and thermal zone treating CPU as one of cooling devices
- cleaned up the file mt7623n-bananapi-bpi-r2.dts such as listing nodes in alphabetical order
Changes since v3:
- explain in the commit message why this binding is changed
- patches for dt-binding is reordered at the beginning of patch list
- be concise wigh using SPDX-License-Identifier in new dts file
Changes since v2:
- exclude those patch are already queued into v4.11-next/dts32
- exclude those patches already sent in separation
- add mt7623a SoC basic support
- update binding SoC for mt7623n and relevant boards
Changes since v1:
Continue the upstream journey based on the previous John Crispin's good work.
- add fixes for the v1 suggestion
- fix typo in the commit log
- add missing pinctrl bindings for mt7623
- reuse pinctrl driver for mt7623
- enhance existing nodes since the way for binding is changed e.g USB
- add more nodes which already gets support from the latest tree e.g MT7530 DSA
- add the dts file for Bananapi R2 (BPI-R2) board
John Crispin (4):
arm: dts: mt7623: add mt6323.dtsi file
arm: dts: mt7623: cleanup the mt7623n rfb uart nodes
arm: dts: mt7623: enable the usb device on the mt7623n rfb
arm: dts: mt7623: enable the nand device on the mt7623n nand rfb
Sean Wang (6):
dt-bindings: arm: mediatek: update for MT7623n SoC and relevant boards
dt-bindings: arm: mediatek: add bindings for mediatek MT7623a SoC
Platform
arm: dts: mt7623: rename mt7623-evb.dts to
arch/arm/boot/dts/mt7623n-rfb.dtsi
ARM: mediatek: add MT7623a smp bringup code
arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board
arm: dts: mt7623: add clock-frequency to CPU nodes
Documentation/devicetree/bindings/arm/mediatek.txt | 14 +- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/mt6323.dtsi | 241 +++++++++++ arch/arm/boot/dts/mt7623-evb.dts | 33 -- arch/arm/boot/dts/mt7623.dtsi | 132 +++++- arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 443 +++++++++++++++++++++ arch/arm/boot/dts/mt7623n-rfb-nand.dts | 109 +++++ arch/arm/boot/dts/mt7623n-rfb.dtsi | 92 +++++ arch/arm/mach-mediatek/mediatek.c | 2 + arch/arm/mach-mediatek/platsmp.c | 1 + 10 files changed, 1021 insertions(+), 49 deletions(-) create mode 100644 arch/arm/boot/dts/mt6323.dtsi delete mode 100644 arch/arm/boot/dts/mt7623-evb.dts create mode 100644 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts create mode 100644 arch/arm/boot/dts/mt7623n-rfb-nand.dts create mode 100644 arch/arm/boot/dts/mt7623n-rfb.dtsi
Signature · 1 line
2.7.4
PATCH v5 1/10 dt-bindings: arm: mediatek: update for MT7623n SoC and relevant boards
From: Sean Wang <[email protected]>
Because there are two versions of MT7623 SoC that is MT7623a and MT7623n respectively. So update the part of MT7623n bindings to allow that people tend to differentiate which MT7623 SoC the boards applies.
And "mediatek,mt7623-evb" can be safely changed to "mediatek,mt7623n-rfb-nand" because mt7623-evb is a kind of debug board internally in Mediatek which real users can't get. So instead we should indicate which variants it belongs to with more specific postfix as the adding here to let people easily know what board they use.
--- Documentation/devicetree/bindings/arm/mediatek.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/arm/mediatek.txt +5 -6
@@ -1,7 +1,6 @@ -MediaTek mt65xx, mt67xx & mt81xx Platforms Device Tree Bindings +MediaTek SoC based Platforms Device Tree Bindings -Boards with a MediaTek mt65xx/mt67xx/mt81xx SoC shall have the -following property: +Boards with a MediaTek SoC shall have the following property: Required root node property:
@@ -14,7 +13,7 @@ compatible: Must contain one of "mediatek,mt6795" "mediatek,mt6797" "mediatek,mt7622" - "mediatek,mt7623" + "mediatek,mt7623" which is referred to MT7623N SoC "mediatek,mt8127" "mediatek,mt8135" "mediatek,mt8173"
@@ -46,9 +45,9 @@ Supported boards: - Reference board variant 1 for MT7622: Required root node properties: - compatible = "mediatek,mt7622-rfb1", "mediatek,mt7622"; -- Evaluation board for MT7623: +- Reference board for MT7623n with NAND: Required root node properties: - - compatible = "mediatek,mt7623-evb", "mediatek,mt7623"; + - compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623"; - MTK mt8127 tablet moose EVB: Required root node properties: - compatible = "mediatek,mt8127-moose", "mediatek,mt8127";
Signature · 1 line
2.7.4
PATCH v5 2/10 dt-bindings: arm: mediatek: add bindings for mediatek MT7623a SoC Platform
In reply to [email protected]From: Sean Wang <[email protected]>
This adds DT binding documentation for Mediatek MT7623a
--- Documentation/devicetree/bindings/arm/mediatek.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/mediatek.txt +1 -0
@@ -14,6 +14,7 @@ compatible: Must contain one of "mediatek,mt6797" "mediatek,mt7622" "mediatek,mt7623" which is referred to MT7623N SoC + "mediatek,mt7623a" "mediatek,mt8127" "mediatek,mt8135" "mediatek,mt8173"
Signature · 1 line
2.7.4
PATCH v5 3/10 arm: dts: mt7623: add mt6323.dtsi file
In reply to [email protected]From: John Crispin <[email protected]>
MediaTek produces various PMICs. Which one is used depends on the actual circuit design. Instead of adding the correct PMIC node to every dts file we instead add a new intermediate dtsi file which adds the PMIC node. For those boards with the same PMIC, the intermediate mt6323.dtsi could be reused to save more redundant nodes created on each board device-tree files.
--- arch/arm/boot/dts/mt6323.dtsi | 241 +++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/mt7623-evb.dts | 29 +++++ arch/arm/boot/dts/mt7623.dtsi | 8 +- 3 files changed, 274 insertions(+), 4 deletions(-) create mode 100644 arch/arm/boot/dts/mt6323.dtsi
arch/arm/boot/dts/mt6323.dtsi new file +241 -0
@@ -0,0 +1,241 @@ +/* + * Copyright (c) 2017 MediaTek Inc. + * Author: John Crispin <[email protected]> + * Sean Wang <[email protected]> + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program 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. + */ + +&pwrap { + pmic: mt6323 { + compatible = "mediatek,mt6323"; + interrupt-parent = <&pio>; + interrupts = <150 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <2>; + + mt6323regulator: mt6323regulator{ + compatible = "mediatek,mt6323-regulator"; + + mt6323_vproc_reg: buck_vproc{ + regulator-name = "vproc"; + regulator-min-microvolt = < 700000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <12500>; + regulator-always-on; + regulator-boot-on; + }; + + mt6323_vsys_reg: buck_vsys{ + regulator-name = "vsys"; + regulator-min-microvolt = <1400000>; + regulator-max-microvolt = <2987500>; + regulator-ramp-delay = <25000>; + regulator-always-on; + regulator-boot-on; + }; + + mt6323_vpa_reg: buck_vpa{ + regulator-name = "vpa"; + regulator-min-microvolt = < 500000>; + regulator-max-microvolt = <3650000>; + }; + + mt6323_vtcxo_reg: ldo_vtcxo{ + regulator-name = "vtcxo"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-enable-ramp-delay = <90>; + regulator-always-on; + regulator-boot-on; + }; + + mt6323_vcn28_reg: ldo_vcn28{ + regulator-name = "vcn28"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-enable-ramp-delay = <185>; + }; + + mt6323_vcn33_bt_reg: ldo_vcn33_bt{ + regulator-name = "vcn33_bt"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3600000>; + regulator-enable-ramp-delay = <185>; + }; + + mt6323_vcn33_wifi_reg: ldo_vcn33_wifi{ + regulator-name = "vcn33_wifi"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3600000>; + regulator-enable-ramp-delay = <185>; + }; + + mt6323_va_reg: ldo_va{ + regulator-name = "va"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-enable-ramp-delay = <216>; + regulator-always-on; + regulator-boot-on; + }; + + mt6323_vcama_reg: ldo_vcama{ + regulator-name = "vcama"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <2800000>; + regulator-enable-ramp-delay = <216>; + }; + + mt6323_vio28_reg: ldo_vio28{ + regulator-name = "vio28"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-enable-ramp-delay = <216>; + regulator-always-on; + regulator-boot-on; + }; + + mt6323_vusb_reg: ldo_vusb{ + regulator-name = "vusb"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <216>; + regulator-boot-on; + }; + + mt6323_vmc_reg: ldo_vmc{ + regulator-name = "vmc"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <36>; + regulator-boot-on; + }; + + mt6323_vmch_reg: ldo_vmch{ + regulator-name = "vmch"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <36>; + regulator-boot-on; + }; + + mt6323_vemc3v3_reg: ldo_vemc3v3{ + regulator-name = "vemc3v3"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <36>; + regulator-boot-on; + }; + + mt6323_vgp1_reg: ldo_vgp1{ + regulator-name = "vgp1"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <216>; + }; + + mt6323_vgp2_reg: ldo_vgp2{ + regulator-name = "vgp2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3000000>; + regulator-enable-ramp-delay = <216>; + }; + + mt6323_vgp3_reg: ldo_vgp3{ + regulator-name = "vgp3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1800000>; + regulator-enable-ramp-delay = <216>; + }; + + mt6323_vcn18_reg: ldo_vcn18{ + regulator-name = "vcn18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-enable-ramp-delay = <216>; + }; + + mt6323_vsim1_reg: ldo_vsim1{ + regulator-name = "vsim1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3000000>; + regulator-enable-ramp-delay = <216>; + }; + + mt6323_vsim2_reg: ldo_vsim2{ + regulator-name = "vsim2"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3000000>; + regulator-enable-ramp-delay = <216>; + }; + + mt6323_vrtc_reg: ldo_vrtc{ + regulator-name = "vrtc"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-boot-on; + }; + + mt6323_vcamaf_reg: ldo_vcamaf{ + regulator-name = "vcamaf"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <216>; + }; + + mt6323_vibr_reg: ldo_vibr{ + regulator-name = "vibr"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <36>; + }; + + mt6323_vrf18_reg: ldo_vrf18{ + regulator-name = "vrf18"; + regulator-min-microvolt = <1825000>; + regulator-max-microvolt = <1825000>; + regulator-enable-ramp-delay = <187>; + }; + + mt6323_vm_reg: ldo_vm{ + regulator-name = "vm"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1800000>; + regulator-enable-ramp-delay = <216>; + regulator-always-on; + regulator-boot-on; + }; + + mt6323_vio18_reg: ldo_vio18{ + regulator-name = "vio18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-enable-ramp-delay = <216>; + regulator-always-on; + regulator-boot-on; + }; + + mt6323_vcamd_reg: ldo_vcamd{ + regulator-name = "vcamd"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1800000>; + regulator-enable-ramp-delay = <216>; + }; + + mt6323_vcamio_reg: ldo_vcamio{ + regulator-name = "vcamio"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-enable-ramp-delay = <216>; + }; + }; + }; +};
arch/arm/boot/dts/mt7623-evb.dts +29 -0
@@ -14,6 +14,7 @@ /dts-v1/; #include "mt7623.dtsi" +#include "mt6323.dtsi" / { model = "MediaTek MT7623 evaluation board";
@@ -23,6 +24,24 @@ stdout-path = &uart2; }; + cpus { + cpu0 { + proc-supply = <&mt6323_vproc_reg>; + }; + + cpu1 { + proc-supply = <&mt6323_vproc_reg>; + }; + + cpu2 { + proc-supply = <&mt6323_vproc_reg>; + }; + + cpu3 { + proc-supply = <&mt6323_vproc_reg>; + }; + }; + memory { reg = <0 0x80000000 0 0x40000000>; };
@@ -31,3 +50,13 @@ &uart2 { status = "okay"; }; + +&mmc0 { + vmmc-supply = <&mt6323_vemc3v3_reg>; + vqmmc-supply = <&mt6323_vio18_reg>; +}; + +&mmc1 { + vmmc-supply = <&mt6323_vmch_reg>; + vqmmc-supply = <&mt6323_vmc_reg>; +};
arch/arm/boot/dts/mt7623.dtsi +4 -4
@@ -32,22 +32,22 @@ #size-cells = <0>; enable-method = "mediatek,mt6589-smp"; - cpu at 0 { + cpu0: cpu at 0 { device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0x0>; }; - cpu at 1 { + cpu1: cpu at 1 { device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0x1>; }; - cpu at 2 { + cpu2: cpu at 2 { device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0x2>; }; - cpu at 3 { + cpu3: cpu at 3 { device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0x3>;
Signature · 1 line
2.7.4
Re: [PATCH v5 03/10] arm: dts: mt7623: add mt6323.dtsi file
On Mon, 2017-07-31 at 15:36 +0800, sean.wang at mediatek.com wrote:
<...>
Quoted 41 lines
arch/arm/boot/dts/mt7623-evb.dts +19
-0@@ -14,6 +14,7 @@ /dts-v1/; #include "mt7623.dtsi" +#include "mt6323.dtsi" / { model = "MediaTek MT7623 evaluation board";@@ -23,6 +24,24 @@ stdout-path = &uart2; }; + cpus { + cpu0 { + proc-supply = <&mt6323_vproc_reg>; + }; + + cpu1 { + proc-supply = <&mt6323_vproc_reg>; + }; + + cpu2 { + proc-supply = <&mt6323_vproc_reg>; + }; + + cpu3 { + proc-supply = <&mt6323_vproc_reg>; + }; + }; + memory { reg = <0 0x80000000 0 0x40000000>; };@@ -31,3 +50,13 @@ &uart2 { status = "okay"; };
arch/arm/boot/dts/mt7623-evb.dts line 62
Quoted 10 lines
arch/arm/boot/dts/mt7623-evb.dts +10
-0+ +&mmc0 { + vmmc-supply = <&mt6323_vemc3v3_reg>; + vqmmc-supply = <&mt6323_vio18_reg>; +}; + +&mmc1 { + vmmc-supply = <&mt6323_vmch_reg>; + vqmmc-supply = <&mt6323_vmc_reg>; +};
Please keep nodes sorted.
Joe.C
Re: [PATCH v5 03/10] arm: dts: mt7623: add mt6323.dtsi file
Quoted 56 lines · Yingjoe Chen
On Mon, 2017-07-31 at 15:36 +0800, sean.wang at mediatek.com wrote:
<...>Quoted 41 lines
arch/arm/boot/dts/mt7623-evb.dts +19
-0@@ -14,6 +14,7 @@ /dts-v1/; #include "mt7623.dtsi" +#include "mt6323.dtsi" / { model = "MediaTek MT7623 evaluation board";@@ -23,6 +24,24 @@ stdout-path = &uart2; }; + cpus { + cpu0 { + proc-supply = <&mt6323_vproc_reg>; + }; + + cpu1 { + proc-supply = <&mt6323_vproc_reg>; + }; + + cpu2 { + proc-supply = <&mt6323_vproc_reg>; + }; + + cpu3 { + proc-supply = <&mt6323_vproc_reg>; + }; + }; + memory { reg = <0 0x80000000 0 0x40000000>; };@@ -31,3 +50,13 @@ &uart2 { status = "okay"; };arch/arm/boot/dts/mt7623-evb.dts line 62
Quoted 10 lines
arch/arm/boot/dts/mt7623-evb.dts +10
-0+ +&mmc0 { + vmmc-supply = <&mt6323_vemc3v3_reg>; + vqmmc-supply = <&mt6323_vio18_reg>; +}; + +&mmc1 { + vmmc-supply = <&mt6323_vmch_reg>; + vqmmc-supply = <&mt6323_vmc_reg>; +};Please keep nodes sorted.
Quoted 3 lines
Joe.C
Hi, Joe.C
I will have note for this. Those would be fixed up along with following patches when mt7623a dts is introduced.
Sean
PATCH v5 4/10 arm: dts: mt7623: rename mt7623-evb.dts to arch/arm/boot/dts/mt7623n-rfb.dtsi
In reply to [email protected]From: Sean Wang <[email protected]>
There are 2 versions of the MT7623 SoC, the one is MT7623N and the other is MT7623A. MT7623N is almost identical to MT7623A but has some additional multimedia features. The reference boards are available as NAND or MMC and might have a different ethernet setup. In order to reduce the duplication of devicetree code we add an intermediate dtsi file for these reference boards. Additionally MediaTek pointed out, that the EVB is yet another board and the board in question is infact the RFB. Take this into account while renaming the files.
---
arch/arm/boot/dts/Makefile | 2 +-
arch/arm/boot/dts/mt7623n-rfb-nand.dts | 21 +++++++++++++++++++++
.../boot/dts/{mt7623-evb.dts => mt7623n-rfb.dtsi} | 8 +++-----
3 files changed, 25 insertions(+), 6 deletions(-)
create mode 100644 arch/arm/boot/dts/mt7623n-rfb-nand.dts
rename arch/arm/boot/dts/{mt7623-evb.dts => mt7623n-rfb.dtsi} (87%)arch/arm/boot/dts/Makefile +1 -1
@@ -1049,7 +1049,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt6580-evbp1.dtb \ mt6589-aquaris5.dtb \ mt6592-evb.dtb \ - mt7623-evb.dtb \ + mt7623n-rfb-nand.dtb \ mt8127-moose.dtb \ mt8135-evbp1.dtb dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
arch/arm/boot/dts/mt7623n-rfb-nand.dts new file +21 -0
@@ -0,0 +1,21 @@ +/* + * Copyright (c) 2017 MediaTek Inc. + * Author: John Crispin <[email protected]> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program 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. + */ + +/dts-v1/; +#include "mt7623n-rfb.dtsi" + +/ { + model = "MediaTek MT7623N NAND reference board"; + compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623"; +};
arch/arm/boot/dts/mt7623n-rfb.dtsi renamed from arch/arm/boot/dts/mt7623-evb.dts +3 -5
@@ -1,6 +1,7 @@ /* - * Copyright (c) 2016 MediaTek Inc. + * Copyright (c) 2017 MediaTek Inc. * Author: John Crispin <[email protected]> + * Sean Wang <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -17,9 +18,6 @@ #include "mt6323.dtsi" / { - model = "MediaTek MT7623 evaluation board"; - compatible = "mediatek,mt7623-evb", "mediatek,mt7623"; - chosen { stdout-path = &uart2; };
@@ -42,7 +40,7 @@ }; }; - memory { + memory at 80000000 { reg = <0 0x80000000 0 0x40000000>; }; };
Signature · 1 line
2.7.4
PATCH v5 5/10 ARM: mediatek: add MT7623a smp bringup code
In reply to [email protected]From: Sean Wang <[email protected]>
Add support for booting secondary CPUs on MT7623a.
--- arch/arm/mach-mediatek/mediatek.c | 2 ++ arch/arm/mach-mediatek/platsmp.c | 1 + 2 files changed, 3 insertions(+)
arch/arm/mach-mediatek/mediatek.c +2 -0
@@ -30,6 +30,7 @@ static void __init mediatek_timer_init(void)if (of_machine_is_compatible ("mediatek,mt6589" ) ||of_machine_is_compatible ("mediatek,mt7623" ) || +of_machine_is_compatible ("mediatek,mt7623a" ) ||of_machine_is_compatible ("mediatek,mt8135" ) ||of_machine_is_compatible ("mediatek,mt8127" )) {/* turn on GPT6 which ungates arch timer clocks */
@@ -49,6 +50,7 @@ static const char * const mediatek_board_dt_compat[] = {"mediatek,mt6589" ,"mediatek,mt6592" ,"mediatek,mt7623" , +"mediatek,mt7623a" ,"mediatek,mt8127" ,"mediatek,mt8135" , NULL,
arch/arm/mach-mediatek/platsmp.c +1 -0
@@ -59,6 +59,7 @@ static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = {static const struct of_device_id mtk_smp_boot_infos[]__initconst = { { .compatible ="mediatek,mt6589" , .data = &mtk_mt6589_boot }, { .compatible ="mediatek,mt7623" , .data = &mtk_mt7623_boot }, + { .compatible ="mediatek,mt7623a" , .data = &mtk_mt7623_boot }, };static void __iomem *mtk_smp_base;
Signature · 1 line
2.7.4
PATCH v5 6/10 arm: dts: mt7623: cleanup the mt7623n rfb uart nodes
In reply to [email protected]From: John Crispin <[email protected]>
This patch does a cleanup of the uart nodes in the dts file of the RFB. It adds aliases, enables 2 more uarts and explicitly sets the uart mode of the console.
--- arch/arm/boot/dts/mt7623n-rfb.dtsi | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
arch/arm/boot/dts/mt7623n-rfb.dtsi +15 -1
@@ -19,7 +19,7 @@ / { chosen { - stdout-path = &uart2; + stdout-path = "serial2:115200n8"; }; cpus {
@@ -43,6 +43,20 @@ memory at 80000000 { reg = <0 0x80000000 0 0x40000000>; }; + + aliases { + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; + }; +}; + +&uart0 { + status = "okay"; +}; + +&uart1 { + status = "okay"; }; &uart2 {
Signature · 1 line
2.7.4
PATCH v5 7/10 arm: dts: mt7623: enable the usb device on the mt7623n rfb
In reply to [email protected]From: John Crispin <[email protected]>
All versions of the mt7623n RFB have an USB port so enable the device. There is a gpio that gets used to power up the port supply. Add support for this gpio using the fixed-regulator driver.
--- arch/arm/boot/dts/mt7623n-rfb.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm/boot/dts/mt7623n-rfb.dtsi +18 -0
@@ -49,6 +49,15 @@ serial1 = &uart1; serial2 = &uart2; }; + + usb_p1_vbus: regulator at 0 { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&pio 135 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; &uart0 {
@@ -72,3 +81,12 @@ vmmc-supply = <&mt6323_vmch_reg>; vqmmc-supply = <&mt6323_vmc_reg>; }; + +&usb1 { + vbus-supply = <&usb_p1_vbus>; + status = "okay"; +}; + +&u3phy1 { + status = "okay"; +};
Signature · 1 line
2.7.4
PATCH v5 8/10 arm: dts: mt7623: enable the nand device on the mt7623n nand rfb
In reply to [email protected]From: John Crispin <[email protected]>
Enable the nand device and setup pinmux on the mt7632m rfb with nand support.
--- arch/arm/boot/dts/mt7623n-rfb-nand.dts | 88 ++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+)
arch/arm/boot/dts/mt7623n-rfb-nand.dts +88 -0
@@ -19,3 +19,91 @@ model = "MediaTek MT7623N NAND reference board"; compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623"; }; + +&pio { + nand_pins_default: nanddefault { + pins_dat { + pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_NLD7>, + <MT7623_PIN_112_MSDC0_DAT6_FUNC_NLD6>, + <MT7623_PIN_114_MSDC0_DAT4_FUNC_NLD4>, + <MT7623_PIN_118_MSDC0_DAT3_FUNC_NLD3>, + <MT7623_PIN_121_MSDC0_DAT0_FUNC_NLD0>, + <MT7623_PIN_120_MSDC0_DAT1_FUNC_NLD1>, + <MT7623_PIN_113_MSDC0_DAT5_FUNC_NLD5>, + <MT7623_PIN_115_MSDC0_RSTB_FUNC_NLD8>, + <MT7623_PIN_119_MSDC0_DAT2_FUNC_NLD2>; + input-enable; + drive-strength = <MTK_DRIVE_8mA>; + bias-pull-up; + }; + + pins_we { + pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_NWEB>; + drive-strength = <MTK_DRIVE_8mA>; + bias-pull-up = <MTK_PUPD_SET_R1R0_10>; + }; + + pins_ale { + pinmux = <MT7623_PIN_116_MSDC0_CMD_FUNC_NALE>; + drive-strength = <MTK_DRIVE_8mA>; + bias-pull-down = <MTK_PUPD_SET_R1R0_10>; + }; + }; +}; + +&nandc { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&nand_pins_default>; + nand at 0 { + reg = <0>; + spare_per_sector = <64>; + nand-ecc-mode = "hw"; + nand-ecc-strength = <12>; + nand-ecc-step-size = <1024>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "preloader"; + reg = <0x0 0x40000>; + }; + + partition at 40000 { + label = "uboot"; + reg = <0x40000 0x80000>; + }; + + partition at C0000 { + label = "uboot-env"; + reg = <0xC0000 0x40000>; + }; + + partition at 140000 { + label = "bootimg"; + reg = <0x140000 0x2000000>; + }; + + partition at 2140000 { + label = "recovery"; + reg = <0x2140000 0x2000000>; + }; + + partition at 4140000 { + label = "rootfs"; + reg = <0x4140000 0x1000000>; + }; + + partition at 5140000 { + label = "usrdata"; + reg = <0x5140000 0x1000000>; + }; + }; + }; +}; + +&bch { + status = "okay"; +};
Signature · 1 line
2.7.4
PATCH v5 9/10 arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board
In reply to [email protected]From: Sean Wang <[email protected]>
Add support for the Bananapi R2 (BPI-R2) development board from BIPAI KEJI. Detailed hardware information for BPI-R2 which could be found on http://www.banana-pi.org/r2.html
The patch added nodes into the SoC-level file mt7623.dtsi such as CPU OPP table and thermal zone treating CPU as one of cooling devices and also added nodes into board-level file mt7623n-bananapi-bpi-r2.dts such as MediaTek GMAC, MT7530 Switch, the crypto engine, USB, IR, I2S, I2C, UART, SPI, PWM, GPIO keys, GPIO LEDs and PMIC LEDs. As to the other missing hardware and peripherals, they would be added and integrated continuously.
--- Documentation/devicetree/bindings/arm/mediatek.txt | 2 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/mt7623.dtsi | 120 +++++- arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 443 +++++++++++++++++++++ 4 files changed, 561 insertions(+), 5 deletions(-) create mode 100644 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
Documentation/devicetree/bindings/arm/mediatek.txt +2 -0
@@ -49,6 +49,8 @@ Supported boards: - Reference board for MT7623n with NAND: Required root node properties: - compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623"; +- Bananapi BPI-R2 board: + - compatible = "bananapi,bpi-r2", "mediatek,mt7623"; - MTK mt8127 tablet moose EVB: Required root node properties: - compatible = "mediatek,mt8127-moose", "mediatek,mt8127";
arch/arm/boot/dts/Makefile +1 -0
@@ -1050,6 +1050,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt6589-aquaris5.dtb \ mt6592-evb.dtb \ mt7623n-rfb-nand.dtb \ + mt7623n-bananapi-bpi-r2.dtb \ mt8127-moose.dtb \ mt8135-evbp1.dtb dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
arch/arm/boot/dts/mt7623.dtsi +115 -5
189 lines not on this page · raw message
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts new file +443 -0
443 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v5 10/10 arm: dts: mt7623: add clock-frequency to CPU nodes
In reply to [email protected]From: Sean Wang <[email protected]>
Add clock-frequency property to CPU nodes. Avoids warnings like
[ 0.001568] /cpus/cpu at 0 missing clock-frequency property [ 0.001588] /cpus/cpu at 1 missing clock-frequency property [ 0.001601] /cpus/cpu at 2 missing clock-frequency property [ 0.001614] /cpus/cpu at 3 missing clock-frequency property
at boot time
--- arch/arm/boot/dts/mt7623.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/mt7623.dtsi +4 -0
@@ -89,24 +89,28 @@ #cooling-cells = <2>; cooling-min-level = <0>; cooling-max-level = <7>; + clock-frequency = <1300000000>; }; cpu1: cpu at 1 { device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0x1>; operating-points-v2 = <&cpu_opp_table>; + clock-frequency = <1300000000>; }; cpu2: cpu at 2 { device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0x2>; operating-points-v2 = <&cpu_opp_table>; + clock-frequency = <1300000000>; }; cpu3: cpu at 3 { device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0x3>; operating-points-v2 = <&cpu_opp_table>; + clock-frequency = <1300000000>; }; };
Signature · 1 line
2.7.4
Matthias Brugger
maintainerQuoted 45 lines · sean.wang at mediatek.com
From: Sean Wang <[email protected]>
Change since v4:
- split mt6323 nodes as the independent item which tends to integration with other MediaTek SoCs
- enhanced commit log
- fixed up building warning shown in make dtsb
- added clock-frequency to CPU nodes to avoid warning in boot time
- added more nodes into the SoC-level filemt7623.dtsisuch as CPU OPP table and thermal zone treating CPU as one of cooling devices
- cleaned up the filemt7623n-bananapi-bpi-r2.dtssuch as listing nodes in alphabetical orderChanges since v3:
- explain in the commit message why this binding is changed
- patches for dt-binding is reordered at the beginning of patch list
- be concise wigh using SPDX-License-Identifier in new dts fileChanges since v2:
- exclude those patch are already queued into v4.11-next/dts32
- exclude those patches already sent in separation
- add mt7623a SoC basic support
- update binding SoC for mt7623n and relevant boardsChanges since v1:
Continue the upstream journey based on the previous John Crispin's good work.
- add fixes for the v1 suggestion
- fix typo in the commit log
- add missing pinctrl bindings for mt7623
- reuse pinctrl driver for mt7623
- enhance existing nodes since the way for binding is changed e.g USB
- add more nodes which already gets support from the latest tree e.g MT7530 DSA
- add the dts file for Bananapi R2 (BPI-R2) boardJohn Crispin (4):
arm: dts: mt7623: addmt6323.dtsifile
arm: dts: mt7623: cleanup the mt7623n rfb uart nodes
arm: dts: mt7623: enable the usb device on the mt7623n rfb
arm: dts: mt7623: enable the nand device on the mt7623n nand rfbSean Wang (6):
dt-bindings: arm: mediatek: update for MT7623n SoC and relevant boards
dt-bindings: arm: mediatek: add bindings for mediatek MT7623a SoC
Platform
arm: dts: mt7623: renamemt7623-evb.dtsto
Quoted 5 lines
arch/arm/boot/dts/mt7623n-rfb.dtsiARM: mediatek: add MT7623a smp bringup code
arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board
arm: dts: mt7623: add clock-frequency to CPU nodes
All but patch 5 pushed to v4.13-next/dts32
Patch 5 went to v4.13-next/soc
Thanks,
Matthias
Quoted 17 lines
Documentation/devicetree/bindings/arm/mediatek.txt | 14 +- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/mt6323.dtsi | 241 +++++++++++ arch/arm/boot/dts/mt7623-evb.dts | 33 -- arch/arm/boot/dts/mt7623.dtsi | 132 +++++- arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 443 +++++++++++++++++++++ arch/arm/boot/dts/mt7623n-rfb-nand.dts | 109 +++++ arch/arm/boot/dts/mt7623n-rfb.dtsi | 92 +++++ arch/arm/mach-mediatek/mediatek.c | 2 + arch/arm/mach-mediatek/platsmp.c | 1 + 10 files changed, 1021 insertions(+), 49 deletions(-)create mode 100644
arch/arm/boot/dts/mt6323.dtsidelete mode 100644arch/arm/boot/dts/mt7623-evb.dtscreate mode 100644arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtscreate mode 100644arch/arm/boot/dts/mt7623n-rfb-nand.dtscreate mode 100644arch/arm/boot/dts/mt7623n-rfb.dtsi