Skip to contentSkip to conversation

arm64: mediatek: add support for Pumpkin MT8516 board

PATCH Applied Fabien Parent 14 participants 75 messages Mar 23, 2019 – May 3, 2019 5 messages not in the archive

Subsystems (16)

v1 of 4 Applied Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover arm64: mediatek: add support for Pumpkin MT8516 board

The pumpkin board is designed by Gossamer Engineering and is using a MediaTek SoC. The board currently comes in two available
version: MT8516 SoC and MT8167 SoC.

The board provides the following IOs: eMMC, NAND, SD card, USB 2 type-A, Ethernet, Wi-Fi, Bluetooth, Audio (jack out, 2 PDM port, 1 analog in), serial over USB, and an expansion header.

This patch series adds the basic board support to be able to boot on the eMMC of the MT8516 based Pumpkin board.

The board is using a MT6392 PMIC.

Fabien Parent (24):
dt-bindings: regulator: add support for MT6392
regulator: mt6392: Add support for MT6392 regulator
dt-bindings: pwrap: mediatek: add pwrap support for MT8516
soc: mediatek: pwrap: add missing check on rstc
soc: mediatek: pwrap: add support for MT8516 pwrap
mfd: mt6397: Add support for MT6397 pmic
arm64: dts: mt6392: Add PMIC mt6392 dtsi
dt-bindings: mmc: mtk-sd: add mtk-sd support for MT8516
mmc: mtk-sd: check for valid optional memory resource
mmc: mtk-sd: add support for MT8516
dt-bindings: mediatek: topckgen: add support for MT8516
dt-bindings: mediatek: infracfg: add support for MT8516
dt-bindings: mediatek: apmixedsys: add support for MT8516
clk: mediatek: add clock driver for MT8516
dt-bindings: pinctrl: pinctrl-mt65xx: add support for MT8516
pinctrl: mediatek: Add MT8516 Pinctrl driver
dt-bindings: wdog: mtk-wdt: add support for MT851
dt-bindings: timer: mtk-timer: add support for MT8516
dt-bindings: spi: spi-mt65xx: add support for MT8516
dt-bindings: serial: mtk-uart: add support for MT8516
dt-bindings: irq: mtk,sysirq: add support for MT8516
dt-bindings: i2c: i2c-mtk: add support for MT8516
arm64: dts: mediatek: add dtsi for MT8516
arm64: dts: mediatek: add pumpkin board dts

 .../arm/mediatek/mediatek,apmixedsys.txt      |    1 +
 .../arm/mediatek/mediatek,infracfg.txt        |    1 +
 .../arm/mediatek/mediatek,topckgen.txt        |    1 +
 .../devicetree/bindings/i2c/i2c-mtk.txt       |    1 +
 .../interrupt-controller/mediatek,sysirq.txt  |    3 +-
 .../devicetree/bindings/mmc/mtk-sd.txt        |    1 +
 .../bindings/pinctrl/pinctrl-mt65xx.txt       |    1 +
 .../bindings/regulator/mt6392-regulator.txt   |  220 +++
 .../devicetree/bindings/serial/mtk-uart.txt   |    1 +
 .../bindings/soc/mediatek/pwrap.txt           |    1 +
 .../devicetree/bindings/spi/spi-mt65xx.txt    |    1 +
 .../bindings/timer/mediatek,mtk-timer.txt     |    1 +
 .../devicetree/bindings/watchdog/mtk-wdt.txt  |    1 +
 arch/arm64/boot/dts/mediatek/Makefile         |    1 +
 arch/arm64/boot/dts/mediatek/mt6392.dtsi      |  208 +++
 arch/arm64/boot/dts/mediatek/mt8516-pinfunc.h |  663 +++++++++
 .../boot/dts/mediatek/mt8516-pumpkin.dts      |   19 +
 arch/arm64/boot/dts/mediatek/mt8516.dtsi      |  409 ++++++
 .../boot/dts/mediatek/pumpkin-common.dtsi     |  210 +++
 .../dts/mediatek/pumpkin-emmc-common.dtsi     |   75 ++
 drivers/clk/mediatek/Kconfig                  |    9 +
 drivers/clk/mediatek/Makefile                 |    1 +
 drivers/clk/mediatek/clk-mt8516.c             |  815 ++++++++++++
 drivers/mfd/mt6397-core.c                     |   96 ++
 drivers/mmc/host/mtk-sd.c                     |   19 +-
 drivers/pinctrl/mediatek/Kconfig              |    7 +
 drivers/pinctrl/mediatek/Makefile             |    1 +
 drivers/pinctrl/mediatek/pinctrl-mt8516.c     |  384 ++++++
 drivers/pinctrl/mediatek/pinctrl-mtk-mt8516.h | 1182 +++++++++++++++++
 drivers/regulator/Kconfig                     |    9 +
 drivers/regulator/Makefile                    |    1 +
 drivers/regulator/mt6392-regulator.c          |  490 +++++++
 drivers/soc/mediatek/mtk-pmic-wrap.c          |  109 +-
 include/dt-bindings/clock/mt8516-clk.h        |  211 +++
 include/linux/mfd/mt6392/core.h               |   42 +
 include/linux/mfd/mt6392/registers.h          |  487 +++++++
 include/linux/regulator/mt6392-regulator.h    |   40 +
 37 files changed, 5717 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/mt6392-regulator.txt
 create mode 100644 arch/arm64/boot/dts/mediatek/mt6392.dtsi
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8516-pinfunc.h
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8516-pumpkin.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8516.dtsi
 create mode 100644 arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi
 create mode 100644 arch/arm64/boot/dts/mediatek/pumpkin-emmc-common.dtsi
 create mode 100644 drivers/clk/mediatek/clk-mt8516.c
 create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt8516.c
 create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt8516.h
 create mode 100644 drivers/regulator/mt6392-regulator.c
 create mode 100644 include/dt-bindings/clock/mt8516-clk.h
 create mode 100644 include/linux/mfd/mt6392/core.h
 create mode 100644 include/linux/mfd/mt6392/registers.h
 create mode 100644 include/linux/regulator/mt6392-regulator.h
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/24 dt-bindings: regulator: add support for MT6392

Add binding documentation of the regulator for MT6392 SoCs.

---
 .../bindings/regulator/mt6392-regulator.txt   | 220 ++++++++++++++++++
 1 file changed, 220 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/mt6392-regulator.txt
Documentation/devicetree/bindings/regulator/mt6392-regulator.txt new file +220 -0
new file mode 100644
index 000000000000..edf207c838dc
@@ -0,0 +1,220 @@
+Mediatek MT6392 Regulator
+
+Required properties:
+- compatible: "mediatek,mt6392-regulator"
+- mt6392regulator: List of regulators provided by this controller. It is named
+  according to its regulator type, buck_<name> and ldo_<name>.
+  The definition for each of these nodes is defined using the standard binding
+  for regulators at Documentation/devicetree/bindings/regulator/regulator.txt.
+
+The valid names for regulators are::
+BUCK:
+  buck_vproc, buck_vsys, buck_vcore
+LDO:
+  ldo_vxo22, ldo_vaud22, ldo_vcama, ldo_vaud28, ldo_vadc18, ldo_vcn35,
+  ldo_vio28. ldo_vusb, ldo_vmc, ldo_vmch, ldo_vemc3v3, ldo_vgp1, ldo_vgp2,
+  ldo_vcn18, ldo_vcamaf, ldo_vm, ldo_vio18, ldo_vcamd, ldo_vcamio, ldo_vm25,
+  ldo_vefuse
+
+Example:
+	pmic: mt6392 {
+		compatible = "mediatek,mt6392", "mediatek,mt6323";
+		mediatek,system-power-controller;
+
+		mt6392_regulator: mt6392_regulator {
+			compatible = "mediatek,mt6392-regulator";
+
+			mt6392_vproc_reg: buck_vproc {
+				regulator-name = "buck_vproc";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vsys_reg: buck_vsys {
+				regulator-name = "buck_vsys";
+				regulator-min-microvolt = <1400000>;
+				regulator-max-microvolt = <2987500>;
+				regulator-ramp-delay = <25000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vcore_reg: buck_vcore {
+				regulator-name = "buck_vcore";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vxo22_reg: ldo_vxo22 {
+				regulator-name = "ldo_vxo22";
+				regulator-min-microvolt = <2200000>;
+				regulator-max-microvolt = <2200000>;
+				regulator-enable-ramp-delay = <110>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vaud22_reg: ldo_vaud22 {
+				regulator-name = "ldo_vaud22";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <2200000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vcama_reg: ldo_vcama {
+				regulator-name = "ldo_vcama";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vaud28_reg: ldo_vaud28 {
+				regulator-name = "ldo_vaud28";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vadc18_reg: ldo_vadc18 {
+				regulator-name = "ldo_vadc18";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vcn35_reg: ldo_vcn35 {
+				regulator-name = "ldo_vcn35";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3600000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vio28_reg: ldo_vio28 {
+				regulator-name = "ldo_vio28";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vusb_reg: ldo_vusb {
+				regulator-name = "ldo_vusb";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vmc_reg: ldo_vmc {
+				regulator-name = "ldo_vmc";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-boot-on;
+			};
+
+			mt6392_vmch_reg: ldo_vmch {
+				regulator-name = "ldo_vmch";
+				regulator-min-microvolt = <3000000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-boot-on;
+			};
+
+			mt6392_vemc3v3_reg: ldo_vemc3v3 {
+				regulator-name = "ldo_vemc3v3";
+				regulator-min-microvolt = <3000000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-boot-on;
+			};
+
+			mt6392_vgp1_reg: ldo_vgp1 {
+				regulator-name = "ldo_vgp1";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vgp2_reg: ldo_vgp2 {
+				regulator-name = "ldo_vgp2";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vcn18_reg: ldo_vcn18 {
+				regulator-name = "ldo_vcn18";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vcamaf_reg: ldo_vcamaf {
+				regulator-name = "ldo_vcamaf";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vm_reg: ldo_vm {
+				regulator-name = "ldo_vm";
+				regulator-min-microvolt = <1240000>;
+				regulator-max-microvolt = <1390000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vio18_reg: ldo_vio18 {
+				regulator-name = "ldo_vio18";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vcamd_reg: ldo_vcamd {
+				regulator-name = "ldo_vcamd";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vcamio_reg: ldo_vcamio {
+				regulator-name = "ldo_vcamio";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vm25_reg: ldo_vm25 {
+				regulator-name = "ldo_vm25";
+				regulator-min-microvolt = <2500000>;
+				regulator-max-microvolt = <2500000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vefuse_reg: ldo_vefuse {
+				regulator-name = "ldo_vefuse";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <2000000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+		};
+	};
Signature · 1 line
2.20.1
#2 lore raw

Re: [PATCH 01/24] dt-bindings: regulator: add support for MT6392

Quoted 25 lines · Fabien Parent

Add binding documentation of the regulator for MT6392 SoCs.

---
 .../bindings/regulator/mt6392-regulator.txt   | 220 ++++++++++++++++++
 1 file changed, 220 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/mt6392-regulator.txt
Documentation/devicetree/bindings/regulator/mt6392-regulator.txt new file +10 -0
new file mode 100644
index 000000000000..edf207c838dc
@@ -0,0 +1,220 @@
+Mediatek MT6392 Regulator
+
+Required properties:
+- compatible: "mediatek,mt6392-regulator"
+- mt6392regulator: List of regulators provided by this controller. It is named
+  according to its regulator type, buck_<name> and ldo_<name>.
+  The definition for each of these nodes is defined using the standard binding
+  for regulators at Documentation/devicetree/bindings/regulator/regulator.txt.
+
+The valid names for regulators are::

Documentation/devicetree/bindings/regulator/mt6392-regulator.txt line 20

Quoted 10 lines
Documentation/devicetree/bindings/regulator/mt6392-regulator.txt new file +10 -0
+BUCK:
+  buck_vproc, buck_vsys, buck_vcore
+LDO:
+  ldo_vxo22, ldo_vaud22, ldo_vcama, ldo_vaud28, ldo_vadc18, ldo_vcn35,
+  ldo_vio28. ldo_vusb, ldo_vmc, ldo_vmch, ldo_vemc3v3, ldo_vgp1, ldo_vgp2,
+  ldo_vcn18, ldo_vcamaf, ldo_vm, ldo_vio18, ldo_vcamd, ldo_vcamio, ldo_vm25,
+  ldo_vefuse
+
+Example:
+       pmic: mt6392 {

pmic {

Documentation/devicetree/bindings/regulator/mt6392-regulator.txt line 24

Quoted 4 lines
Documentation/devicetree/bindings/regulator/mt6392-regulator.txt new file +4 -0
+               compatible = "mediatek,mt6392", "mediatek,mt6323";
+               mediatek,system-power-controller;
+
+               mt6392_regulator: mt6392_regulator {

regulators {

Documentation/devicetree/bindings/regulator/mt6392-regulator.txt line 27

Quoted 3 lines
Documentation/devicetree/bindings/regulator/mt6392-regulator.txt new file +3 -0
+                       compatible = "mediatek,mt6392-regulator";
+
+                       mt6392_vproc_reg: buck_vproc {

buck-vproc {

And similar for the rest.

Quoted 196 lines
Documentation/devicetree/bindings/regulator/mt6392-regulator.txt new file +193 -1
+                               regulator-name = "buck_vproc";
+                               regulator-min-microvolt = < 700000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-ramp-delay = <12500>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vsys_reg: buck_vsys {
+                               regulator-name = "buck_vsys";
+                               regulator-min-microvolt = <1400000>;
+                               regulator-max-microvolt = <2987500>;
+                               regulator-ramp-delay = <25000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vcore_reg: buck_vcore {
+                               regulator-name = "buck_vcore";
+                               regulator-min-microvolt = < 700000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-ramp-delay = <12500>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vxo22_reg: ldo_vxo22 {
+                               regulator-name = "ldo_vxo22";
+                               regulator-min-microvolt = <2200000>;
+                               regulator-max-microvolt = <2200000>;
+                               regulator-enable-ramp-delay = <110>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vaud22_reg: ldo_vaud22 {
+                               regulator-name = "ldo_vaud22";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <2200000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vcama_reg: ldo_vcama {
+                               regulator-name = "ldo_vcama";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vaud28_reg: ldo_vaud28 {
+                               regulator-name = "ldo_vaud28";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vadc18_reg: ldo_vadc18 {
+                               regulator-name = "ldo_vadc18";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vcn35_reg: ldo_vcn35 {
+                               regulator-name = "ldo_vcn35";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3600000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vio28_reg: ldo_vio28 {
+                               regulator-name = "ldo_vio28";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vusb_reg: ldo_vusb {
+                               regulator-name = "ldo_vusb";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vmc_reg: ldo_vmc {
+                               regulator-name = "ldo_vmc";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vmch_reg: ldo_vmch {
+                               regulator-name = "ldo_vmch";
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vemc3v3_reg: ldo_vemc3v3 {
+                               regulator-name = "ldo_vemc3v3";
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vgp1_reg: ldo_vgp1 {
+                               regulator-name = "ldo_vgp1";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vgp2_reg: ldo_vgp2 {
+                               regulator-name = "ldo_vgp2";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vcn18_reg: ldo_vcn18 {
+                               regulator-name = "ldo_vcn18";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vcamaf_reg: ldo_vcamaf {
+                               regulator-name = "ldo_vcamaf";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vm_reg: ldo_vm {
+                               regulator-name = "ldo_vm";
+                               regulator-min-microvolt = <1240000>;
+                               regulator-max-microvolt = <1390000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vio18_reg: ldo_vio18 {
+                               regulator-name = "ldo_vio18";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vcamd_reg: ldo_vcamd {
+                               regulator-name = "ldo_vcamd";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vcamio_reg: ldo_vcamio {
+                               regulator-name = "ldo_vcamio";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vm25_reg: ldo_vm25 {
+                               regulator-name = "ldo_vm25";
+                               regulator-min-microvolt = <2500000>;
+                               regulator-max-microvolt = <2500000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vefuse_reg: ldo_vefuse {
+                               regulator-name = "ldo_vefuse";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <2000000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+               };
+       };
--

2.20.1

#3 lore raw

PATCH 2/24 regulator: mt6392: Add support for MT6392 regulator

In reply to Fabien Parent

The MT6392 is a regulator found on boards based on the MediaTek MT8167, MT8516, and probably other SoCs. It is a so called PMIC and connectcts as a slave to a SoC using SPI, wrapped inside PWRAP.

---
 drivers/regulator/Kconfig                  |   9 +
 drivers/regulator/Makefile                 |   1 +
 drivers/regulator/mt6392-regulator.c       | 490 +++++++++++++++++++++
 include/linux/regulator/mt6392-regulator.h |  40 ++
 4 files changed, 540 insertions(+)
 create mode 100644 drivers/regulator/mt6392-regulator.c
 create mode 100644 include/linux/regulator/mt6392-regulator.h
drivers/regulator/Kconfig +9 -0
index b7f249ee5e68..c0109005128c 100644
@@ -624,6 +624,15 @@ config REGULATOR_MT6380
 	  This driver supports the control of different power rails of device
 	  through regulator interface.
 
+config REGULATOR_MT6392
+	tristate "MediaTek MT6392 PMIC"
+	depends on MFD_MT6397
+	help
+	  Say y here to select this option to enable the power regulator of
+	  MediaTek MT6392 PMIC.
+	  This driver supports the control of different power rails of device
+	  through regulator interface.
+
 config REGULATOR_MT6397
 	tristate "MediaTek MT6397 PMIC"
 	depends on MFD_MT6397
drivers/regulator/Makefile +1 -0
index 1169f8a27d91..5b8da206412e 100644
@@ -80,6 +80,7 @@ obj-$(CONFIG_REGULATOR_MCP16502) += mcp16502.o
 obj-$(CONFIG_REGULATOR_MT6311) += mt6311-regulator.o
 obj-$(CONFIG_REGULATOR_MT6323)	+= mt6323-regulator.o
 obj-$(CONFIG_REGULATOR_MT6380)	+= mt6380-regulator.o
+obj-$(CONFIG_REGULATOR_MT6392)	+= mt6392-regulator.o
 obj-$(CONFIG_REGULATOR_MT6397)	+= mt6397-regulator.o
 obj-$(CONFIG_REGULATOR_QCOM_RPM) += qcom_rpm-regulator.o
 obj-$(CONFIG_REGULATOR_QCOM_RPMH) += qcom-rpmh-regulator.o
drivers/regulator/mt6392-regulator.c new file +490 -0

490 lines not on this page · raw message

include/linux/regulator/mt6392-regulator.h new file +40 -0
new file mode 100644
index 000000000000..dfcbcacb5ad4
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2019 MediaTek Inc.
+ * Author: Chen Zhong <[email protected]>
+ */
+
+#ifndef __LINUX_REGULATOR_MT6392_H
+#define __LINUX_REGULATOR_MT6392_H
+
+enum {
+	MT6392_ID_VPROC = 0,
+	MT6392_ID_VSYS,
+	MT6392_ID_VCORE,
+	MT6392_ID_VXO22,
+	MT6392_ID_VAUD22,
+	MT6392_ID_VCAMA,
+	MT6392_ID_VAUD28,
+	MT6392_ID_VADC18,
+	MT6392_ID_VCN35,
+	MT6392_ID_VIO28,
+	MT6392_ID_VUSB = 10,
+	MT6392_ID_VMC,
+	MT6392_ID_VMCH,
+	MT6392_ID_VEMC3V3,
+	MT6392_ID_VGP1,
+	MT6392_ID_VGP2,
+	MT6392_ID_VCN18,
+	MT6392_ID_VCAMAF,
+	MT6392_ID_VM,
+	MT6392_ID_VIO18,
+	MT6392_ID_VCAMD,
+	MT6392_ID_VCAMIO,
+	MT6392_ID_VM25,
+	MT6392_ID_VEFUSE,
+	MT6392_ID_RG_MAX,
+};
+
+#define MT6392_MAX_REGULATOR	MT6392_ID_RG_MAX
+
+#endif /* __LINUX_REGULATOR_MT6392_H */
Signature · 1 line
2.20.1
#4 lore raw

PATCH 3/24 dt-bindings: pwrap: mediatek: add pwrap support for MT8516

In reply to Fabien Parent

Add binding documentation of pwrap for MT8516 SoCs.

---
 Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/soc/mediatek/pwrap.txt +1 -0
index 5a2ef1726e2a..7a32404c6114 100644
@@ -25,6 +25,7 @@ Required properties in pwrap device node.
 	"mediatek,mt8135-pwrap" for MT8135 SoCs
 	"mediatek,mt8173-pwrap" for MT8173 SoCs
 	"mediatek,mt8183-pwrap" for MT8183 SoCs
+	"mediatek,mt8516-pwrap" for MT8516 SoCs
 - interrupts: IRQ for pwrap in SOC
 - reg-names: Must include the following entries:
   "pwrap": Main registers base
Signature · 1 line
2.20.1
maintainer Applied
#6 lore raw

Re: [PATCH 03/24] dt-bindings: pwrap: mediatek: add pwrap support for MT8516

In reply to Fabien Parent
Quoted 6 lines · Fabien Parent

Add binding documentation of pwrap for MT8516 SoCs.

---
 Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 +
 1 file changed, 1 insertion(+)

applied to v5.1-next/soc

Thanks!

Quoted 14 lines
Documentation/devicetree/bindings/soc/mediatek/pwrap.txt +1 -0
index 5a2ef1726e2a..7a32404c6114 100644
@@ -25,6 +25,7 @@ Required properties in pwrap device node.
 	"mediatek,mt8135-pwrap" for MT8135 SoCs
 	"mediatek,mt8173-pwrap" for MT8173 SoCs
 	"mediatek,mt8183-pwrap" for MT8183 SoCs
+	"mediatek,mt8516-pwrap" for MT8516 SoCs
 - interrupts: IRQ for pwrap in SOC
 - reg-names: Must include the following entries:
   "pwrap": Main registers base
#7 lore raw

PATCH 4/24 soc: mediatek: pwrap: add missing check on rstc

In reply to Fabien Parent

The variable rstc is set only when the SoC PWRAP have the PWRAP_CAP_RESET capability. Check whether rstc is set before using it to avoid errors.

---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/mediatek/mtk-pmic-wrap.c +2 -1
index 8236a6c87e19..b3ba2301f569 100644
@@ -1478,7 +1478,8 @@ static int pwrap_init(struct pmic_wrapper *wrp)
 {
 	int ret;
 
-	reset_control_reset(wrp->rstc);
+	if (wrp->rstc)
+		reset_control_reset(wrp->rstc);
 	if (wrp->rstc_bridge)
 		reset_control_reset(wrp->rstc_bridge);
 
Signature · 1 line
2.20.1
maintainer Applied
#8 lore raw

Re: [PATCH 04/24] soc: mediatek: pwrap: add missing check on rstc

Quoted 8 lines · Fabien Parent

The variable rstc is set only when the SoC PWRAP have the PWRAP_CAP_RESET capability. Check whether rstc is set before using it to avoid errors.

---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

applied to v5.1-next/soc

Thanks!

Quoted 16 lines
drivers/soc/mediatek/mtk-pmic-wrap.c +2 -1
index 8236a6c87e19..b3ba2301f569 100644
@@ -1478,7 +1478,8 @@ static int pwrap_init(struct pmic_wrapper *wrp)
 {
 	int ret;
 
-	reset_control_reset(wrp->rstc);
+	if (wrp->rstc)
+		reset_control_reset(wrp->rstc);
 	if (wrp->rstc_bridge)
 		reset_control_reset(wrp->rstc_bridge);
 
#9 lore raw

PATCH 5/24 soc: mediatek: pwrap: add support for MT8516 pwrap

In reply to Fabien Parent

Add the code to support the pwrap IP on the MediaTek MT8516 SoC.

---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 106 +++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)
drivers/soc/mediatek/mtk-pmic-wrap.c +106 -0
index b3ba2301f569..73f0be0567bd 100644
@@ -381,6 +381,10 @@ enum pwrap_regs {
 	PWRAP_EXT_GPS_AUXADC_RDATA_ADDR,
 	PWRAP_GPSINF_0_STA,
 	PWRAP_GPSINF_1_STA,
+
+	/* MT8516 only regs */
+	PWRAP_OP_TYPE,
+	PWRAP_MSB_FIRST,
 };
 
 static int mt2701_regs[] = {
@@ -852,6 +856,91 @@ static int mt8183_regs[] = {
 	[PWRAP_WACS2_VLDCLR] =			0xC28,
 };
 
+static int mt8516_regs[] = {
+	[PWRAP_MUX_SEL] =		0x0,
+	[PWRAP_WRAP_EN] =		0x4,
+	[PWRAP_DIO_EN] =		0x8,
+	[PWRAP_SIDLY] =			0xc,
+	[PWRAP_RDDMY] =			0x10,
+	[PWRAP_SI_CK_CON] =		0x14,
+	[PWRAP_CSHEXT_WRITE] =		0x18,
+	[PWRAP_CSHEXT_READ] =		0x1c,
+	[PWRAP_CSLEXT_START] =		0x20,
+	[PWRAP_CSLEXT_END] =		0x24,
+	[PWRAP_STAUPD_PRD] =		0x28,
+	[PWRAP_STAUPD_GRPEN] =		0x2c,
+	[PWRAP_STAUPD_MAN_TRIG] =	0x40,
+	[PWRAP_STAUPD_STA] =		0x44,
+	[PWRAP_WRAP_STA] =		0x48,
+	[PWRAP_HARB_INIT] =		0x4c,
+	[PWRAP_HARB_HPRIO] =		0x50,
+	[PWRAP_HIPRIO_ARB_EN] =		0x54,
+	[PWRAP_HARB_STA0] =		0x58,
+	[PWRAP_HARB_STA1] =		0x5c,
+	[PWRAP_MAN_EN] =		0x60,
+	[PWRAP_MAN_CMD] =		0x64,
+	[PWRAP_MAN_RDATA] =		0x68,
+	[PWRAP_MAN_VLDCLR] =		0x6c,
+	[PWRAP_WACS0_EN] =		0x70,
+	[PWRAP_INIT_DONE0] =		0x74,
+	[PWRAP_WACS0_CMD] =		0x78,
+	[PWRAP_WACS0_RDATA] =		0x7c,
+	[PWRAP_WACS0_VLDCLR] =		0x80,
+	[PWRAP_WACS1_EN] =		0x84,
+	[PWRAP_INIT_DONE1] =		0x88,
+	[PWRAP_WACS1_CMD] =		0x8c,
+	[PWRAP_WACS1_RDATA] =		0x90,
+	[PWRAP_WACS1_VLDCLR] =		0x94,
+	[PWRAP_WACS2_EN] =		0x98,
+	[PWRAP_INIT_DONE2] =		0x9c,
+	[PWRAP_WACS2_CMD] =		0xa0,
+	[PWRAP_WACS2_RDATA] =		0xa4,
+	[PWRAP_WACS2_VLDCLR] =		0xa8,
+	[PWRAP_INT_EN] =		0xac,
+	[PWRAP_INT_FLG_RAW] =		0xb0,
+	[PWRAP_INT_FLG] =		0xb4,
+	[PWRAP_INT_CLR] =		0xb8,
+	[PWRAP_SIG_ADR] =		0xbc,
+	[PWRAP_SIG_MODE] =		0xc0,
+	[PWRAP_SIG_VALUE] =		0xc4,
+	[PWRAP_SIG_ERRVAL] =		0xc8,
+	[PWRAP_CRC_EN] =		0xcc,
+	[PWRAP_TIMER_EN] =		0xd0,
+	[PWRAP_TIMER_STA] =		0xd4,
+	[PWRAP_WDT_UNIT] =		0xd8,
+	[PWRAP_WDT_SRC_EN] =		0xdc,
+	[PWRAP_WDT_FLG] =		0xe0,
+	[PWRAP_DEBUG_INT_SEL] =		0xe4,
+	[PWRAP_DVFS_ADR0] =		0xe8,
+	[PWRAP_DVFS_WDATA0] =		0xec,
+	[PWRAP_DVFS_ADR1] =		0xf0,
+	[PWRAP_DVFS_WDATA1] =		0xf4,
+	[PWRAP_DVFS_ADR2] =		0xf8,
+	[PWRAP_DVFS_WDATA2] =		0xfc,
+	[PWRAP_DVFS_ADR3] =		0x100,
+	[PWRAP_DVFS_WDATA3] =		0x104,
+	[PWRAP_DVFS_ADR4] =		0x108,
+	[PWRAP_DVFS_WDATA4] =		0x10c,
+	[PWRAP_DVFS_ADR5] =		0x110,
+	[PWRAP_DVFS_WDATA5] =		0x114,
+	[PWRAP_DVFS_ADR6] =		0x118,
+	[PWRAP_DVFS_WDATA6] =		0x11c,
+	[PWRAP_DVFS_ADR7] =		0x120,
+	[PWRAP_DVFS_WDATA7] =		0x124,
+	[PWRAP_SPMINF_STA] =		0x128,
+	[PWRAP_CIPHER_KEY_SEL] =	0x12c,
+	[PWRAP_CIPHER_IV_SEL] =		0x130,
+	[PWRAP_CIPHER_EN] =		0x134,
+	[PWRAP_CIPHER_RDY] =		0x138,
+	[PWRAP_CIPHER_MODE] =		0x13c,
+	[PWRAP_CIPHER_SWRST] =		0x140,
+	[PWRAP_DCM_EN] =		0x144,
+	[PWRAP_DCM_DBC_PRD] =		0x148,
+	[PWRAP_SW_RST] =		0x168,
+	[PWRAP_OP_TYPE] =		0x16c,
+	[PWRAP_MSB_FIRST] =		0x170,
+};
+
 enum pmic_type {
 	PMIC_MT6323,
 	PMIC_MT6351,
@@ -869,6 +958,7 @@ enum pwrap_type {
 	PWRAP_MT8135,
 	PWRAP_MT8173,
 	PWRAP_MT8183,
+	PWRAP_MT8516,
 };
 
 struct pmic_wrapper;
@@ -1297,6 +1387,7 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
 	case PWRAP_MT6765:
 	case PWRAP_MT6797:
 	case PWRAP_MT8173:
+	case PWRAP_MT8516:
 		pwrap_writel(wrp, 1, PWRAP_CIPHER_EN);
 		break;
 	case PWRAP_MT7622:
@@ -1765,6 +1856,18 @@ static const struct pmic_wrapper_type pwrap_mt8183 = {
 	.init_soc_specific = pwrap_mt8183_init_soc_specific,
 };
 
+static struct pmic_wrapper_type pwrap_mt8516 = {
+	.regs = mt8516_regs,
+	.type = PWRAP_MT8516,
+	.arb_en_all = 0xff,
+	.int_en_all = ~(u32)(BIT(31) | BIT(2)),
+	.spi_w = PWRAP_MAN_CMD_SPI_WRITE,
+	.wdt_src = PWRAP_WDT_SRC_MASK_ALL,
+	.caps = PWRAP_CAP_DCM,
+	.init_reg_clock = pwrap_mt2701_init_reg_clock,
+	.init_soc_specific = NULL,
+};
+
 static const struct of_device_id of_pwrap_match_tbl[] = {
 	{
 		.compatible = "mediatek,mt2701-pwrap",
@@ -1787,6 +1890,9 @@ static const struct of_device_id of_pwrap_match_tbl[] = {
 	}, {
 		.compatible = "mediatek,mt8183-pwrap",
 		.data = &pwrap_mt8183,
+	}, {
+		.compatible = "mediatek,mt8516-pwrap",
+		.data = &pwrap_mt8516,
 	}, {
 		/* sentinel */
 	}
Signature · 1 line
2.20.1
maintainer Applied
#10 lore raw

Re: [PATCH 05/24] soc: mediatek: pwrap: add support for MT8516 pwrap

Quoted 6 lines · Fabien Parent

Add the code to support the pwrap IP on the MediaTek MT8516 SoC.

---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 106 +++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

applied to v5.1-next/soc

Thanks!

Quoted 154 lines
drivers/soc/mediatek/mtk-pmic-wrap.c +106 -0
index b3ba2301f569..73f0be0567bd 100644
@@ -381,6 +381,10 @@ enum pwrap_regs {
 	PWRAP_EXT_GPS_AUXADC_RDATA_ADDR,
 	PWRAP_GPSINF_0_STA,
 	PWRAP_GPSINF_1_STA,
+
+	/* MT8516 only regs */
+	PWRAP_OP_TYPE,
+	PWRAP_MSB_FIRST,
 };
 
 static int mt2701_regs[] = {
@@ -852,6 +856,91 @@ static int mt8183_regs[] = {
 	[PWRAP_WACS2_VLDCLR] =			0xC28,
 };
 
+static int mt8516_regs[] = {
+	[PWRAP_MUX_SEL] =		0x0,
+	[PWRAP_WRAP_EN] =		0x4,
+	[PWRAP_DIO_EN] =		0x8,
+	[PWRAP_SIDLY] =			0xc,
+	[PWRAP_RDDMY] =			0x10,
+	[PWRAP_SI_CK_CON] =		0x14,
+	[PWRAP_CSHEXT_WRITE] =		0x18,
+	[PWRAP_CSHEXT_READ] =		0x1c,
+	[PWRAP_CSLEXT_START] =		0x20,
+	[PWRAP_CSLEXT_END] =		0x24,
+	[PWRAP_STAUPD_PRD] =		0x28,
+	[PWRAP_STAUPD_GRPEN] =		0x2c,
+	[PWRAP_STAUPD_MAN_TRIG] =	0x40,
+	[PWRAP_STAUPD_STA] =		0x44,
+	[PWRAP_WRAP_STA] =		0x48,
+	[PWRAP_HARB_INIT] =		0x4c,
+	[PWRAP_HARB_HPRIO] =		0x50,
+	[PWRAP_HIPRIO_ARB_EN] =		0x54,
+	[PWRAP_HARB_STA0] =		0x58,
+	[PWRAP_HARB_STA1] =		0x5c,
+	[PWRAP_MAN_EN] =		0x60,
+	[PWRAP_MAN_CMD] =		0x64,
+	[PWRAP_MAN_RDATA] =		0x68,
+	[PWRAP_MAN_VLDCLR] =		0x6c,
+	[PWRAP_WACS0_EN] =		0x70,
+	[PWRAP_INIT_DONE0] =		0x74,
+	[PWRAP_WACS0_CMD] =		0x78,
+	[PWRAP_WACS0_RDATA] =		0x7c,
+	[PWRAP_WACS0_VLDCLR] =		0x80,
+	[PWRAP_WACS1_EN] =		0x84,
+	[PWRAP_INIT_DONE1] =		0x88,
+	[PWRAP_WACS1_CMD] =		0x8c,
+	[PWRAP_WACS1_RDATA] =		0x90,
+	[PWRAP_WACS1_VLDCLR] =		0x94,
+	[PWRAP_WACS2_EN] =		0x98,
+	[PWRAP_INIT_DONE2] =		0x9c,
+	[PWRAP_WACS2_CMD] =		0xa0,
+	[PWRAP_WACS2_RDATA] =		0xa4,
+	[PWRAP_WACS2_VLDCLR] =		0xa8,
+	[PWRAP_INT_EN] =		0xac,
+	[PWRAP_INT_FLG_RAW] =		0xb0,
+	[PWRAP_INT_FLG] =		0xb4,
+	[PWRAP_INT_CLR] =		0xb8,
+	[PWRAP_SIG_ADR] =		0xbc,
+	[PWRAP_SIG_MODE] =		0xc0,
+	[PWRAP_SIG_VALUE] =		0xc4,
+	[PWRAP_SIG_ERRVAL] =		0xc8,
+	[PWRAP_CRC_EN] =		0xcc,
+	[PWRAP_TIMER_EN] =		0xd0,
+	[PWRAP_TIMER_STA] =		0xd4,
+	[PWRAP_WDT_UNIT] =		0xd8,
+	[PWRAP_WDT_SRC_EN] =		0xdc,
+	[PWRAP_WDT_FLG] =		0xe0,
+	[PWRAP_DEBUG_INT_SEL] =		0xe4,
+	[PWRAP_DVFS_ADR0] =		0xe8,
+	[PWRAP_DVFS_WDATA0] =		0xec,
+	[PWRAP_DVFS_ADR1] =		0xf0,
+	[PWRAP_DVFS_WDATA1] =		0xf4,
+	[PWRAP_DVFS_ADR2] =		0xf8,
+	[PWRAP_DVFS_WDATA2] =		0xfc,
+	[PWRAP_DVFS_ADR3] =		0x100,
+	[PWRAP_DVFS_WDATA3] =		0x104,
+	[PWRAP_DVFS_ADR4] =		0x108,
+	[PWRAP_DVFS_WDATA4] =		0x10c,
+	[PWRAP_DVFS_ADR5] =		0x110,
+	[PWRAP_DVFS_WDATA5] =		0x114,
+	[PWRAP_DVFS_ADR6] =		0x118,
+	[PWRAP_DVFS_WDATA6] =		0x11c,
+	[PWRAP_DVFS_ADR7] =		0x120,
+	[PWRAP_DVFS_WDATA7] =		0x124,
+	[PWRAP_SPMINF_STA] =		0x128,
+	[PWRAP_CIPHER_KEY_SEL] =	0x12c,
+	[PWRAP_CIPHER_IV_SEL] =		0x130,
+	[PWRAP_CIPHER_EN] =		0x134,
+	[PWRAP_CIPHER_RDY] =		0x138,
+	[PWRAP_CIPHER_MODE] =		0x13c,
+	[PWRAP_CIPHER_SWRST] =		0x140,
+	[PWRAP_DCM_EN] =		0x144,
+	[PWRAP_DCM_DBC_PRD] =		0x148,
+	[PWRAP_SW_RST] =		0x168,
+	[PWRAP_OP_TYPE] =		0x16c,
+	[PWRAP_MSB_FIRST] =		0x170,
+};
+
 enum pmic_type {
 	PMIC_MT6323,
 	PMIC_MT6351,
@@ -869,6 +958,7 @@ enum pwrap_type {
 	PWRAP_MT8135,
 	PWRAP_MT8173,
 	PWRAP_MT8183,
+	PWRAP_MT8516,
 };
 
 struct pmic_wrapper;
@@ -1297,6 +1387,7 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
 	case PWRAP_MT6765:
 	case PWRAP_MT6797:
 	case PWRAP_MT8173:
+	case PWRAP_MT8516:
 		pwrap_writel(wrp, 1, PWRAP_CIPHER_EN);
 		break;
 	case PWRAP_MT7622:
@@ -1765,6 +1856,18 @@ static const struct pmic_wrapper_type pwrap_mt8183 = {
 	.init_soc_specific = pwrap_mt8183_init_soc_specific,
 };
 
+static struct pmic_wrapper_type pwrap_mt8516 = {
+	.regs = mt8516_regs,
+	.type = PWRAP_MT8516,
+	.arb_en_all = 0xff,
+	.int_en_all = ~(u32)(BIT(31) | BIT(2)),
+	.spi_w = PWRAP_MAN_CMD_SPI_WRITE,
+	.wdt_src = PWRAP_WDT_SRC_MASK_ALL,
+	.caps = PWRAP_CAP_DCM,
+	.init_reg_clock = pwrap_mt2701_init_reg_clock,
+	.init_soc_specific = NULL,
+};
+
 static const struct of_device_id of_pwrap_match_tbl[] = {
 	{
 		.compatible = "mediatek,mt2701-pwrap",
@@ -1787,6 +1890,9 @@ static const struct of_device_id of_pwrap_match_tbl[] = {
 	}, {
 		.compatible = "mediatek,mt8183-pwrap",
 		.data = &pwrap_mt8183,
+	}, {
+		.compatible = "mediatek,mt8516-pwrap",
+		.data = &pwrap_mt8516,
 	}, {
 		/* sentinel */
 	}
#11 lore raw

PATCH 6/24 mfd: mt6397: Add support for MT6397 pmic

In reply to Fabien Parent

Update the MT6397 MFD driver to support the MT6392 PMIC.

---
 drivers/mfd/mt6397-core.c            |  96 ++++++
 include/linux/mfd/mt6392/core.h      |  42 +++
 include/linux/mfd/mt6392/registers.h | 487 +++++++++++++++++++++++++++
 3 files changed, 625 insertions(+)
 create mode 100644 include/linux/mfd/mt6392/core.h
 create mode 100644 include/linux/mfd/mt6392/registers.h
drivers/mfd/mt6397-core.c +96 -0
index ab24e176ef44..f5e74f4afcc4 100644
@@ -18,17 +18,38 @@
 #include <linux/of_irq.h>
 #include <linux/regmap.h>
 #include <linux/mfd/core.h>
+#include <linux/mfd/mt6392/core.h>
 #include <linux/mfd/mt6397/core.h>
 #include <linux/mfd/mt6323/core.h>
+#include <linux/mfd/mt6392/registers.h>
 #include <linux/mfd/mt6397/registers.h>
 #include <linux/mfd/mt6323/registers.h>
 
+#define MT6392_RTC_BASE		0x8000
+#define MT6392_RTC_SIZE		0x3e
 #define MT6397_RTC_BASE		0xe000
 #define MT6397_RTC_SIZE		0x3e
 
+#define MT6392_TYPEC_BASE	0x800
+#define MT6392_TYPEC_SIZE	0x100
+
 #define MT6323_CID_CODE		0x23
 #define MT6391_CID_CODE		0x91
 #define MT6397_CID_CODE		0x97
+#define MT6392_CID_CODE		0x92
+
+static const struct resource mt6392_rtc_resources[] = {
+	{
+		.start = MT6392_RTC_BASE,
+		.end   = MT6392_RTC_BASE + MT6392_RTC_SIZE,
+		.flags = IORESOURCE_MEM,
+	},
+	{
+		.start = MT6392_IRQ_STATUS_RTC,
+		.end   = MT6392_IRQ_STATUS_RTC,
+		.flags = IORESOURCE_IRQ,
+	},
+};
 
 static const struct resource mt6397_rtc_resources[] = {
 	{
@@ -43,6 +64,14 @@ static const struct resource mt6397_rtc_resources[] = {
 	},
 };
 
+static const struct resource mt6392_keys_resources[] = {
+	{
+		.start = MT6392_IRQ_STATUS_PWRKEY,
+		.end   = MT6392_IRQ_STATUS_RELEASE_FCHRKEY,
+		.flags = IORESOURCE_IRQ,
+	},
+};
+
 static const struct resource mt6323_keys_resources[] = {
 	DEFINE_RES_IRQ(MT6323_IRQ_STATUS_PWRKEY),
 	DEFINE_RES_IRQ(MT6323_IRQ_STATUS_FCHRKEY),
@@ -53,6 +82,58 @@ static const struct resource mt6397_keys_resources[] = {
 	DEFINE_RES_IRQ(MT6397_IRQ_HOMEKEY),
 };
 
+static const struct resource mt6392_typec_resources[] = {
+	{
+		.start = MT6392_TYPEC_BASE,
+		.end   = MT6392_TYPEC_BASE + MT6392_TYPEC_SIZE,
+		.flags = IORESOURCE_MEM,
+	},
+	{
+		.start = MT6392_IRQ_STATUS_TYPE_C_CC,
+		.end   = MT6392_IRQ_STATUS_TYPE_C_CC,
+		.flags = IORESOURCE_IRQ,
+	},
+};
+
+static const struct mfd_cell mt6392_devs[] = {
+	{
+		.name = "mt6392-pmic",
+		.of_compatible = "mediatek,mt6392-pmic",
+	}, {
+		.name = "mt6392-regulator",
+		.of_compatible = "mediatek,mt6392-regulator",
+	}, {
+		.name = "mt6392-pinctrl",
+		.of_compatible = "mediatek,mt6392-pinctrl",
+	}, {
+		.name = "mt6397-rtc",
+		.num_resources = ARRAY_SIZE(mt6392_rtc_resources),
+		.resources = mt6392_rtc_resources,
+		.of_compatible = "mediatek,mt6392-rtc",
+	}, {
+		.name = "mt6397-misc",
+		.num_resources = ARRAY_SIZE(mt6392_rtc_resources),
+		.resources = mt6392_rtc_resources,
+		.of_compatible = "mediatek,mt6392-misc",
+	}, {
+		.name = "mt6392-adc",
+		.of_compatible = "mediatek,mt6392-adc"
+	}, {
+		.name = "mtk-pmic-keys",
+		.num_resources = ARRAY_SIZE(mt6392_keys_resources),
+		.resources = mt6392_keys_resources,
+		.of_compatible = "mediatek,mt6392-keys"
+	}, {
+		.name = "mt6392-thermal",
+		.of_compatible = "mediatek,mt6392-thermal"
+	}, {
+		.name = "mt6392-typec",
+		.num_resources = ARRAY_SIZE(mt6392_typec_resources),
+		.resources = mt6392_typec_resources,
+		.of_compatible = "mediatek,mt6392-typec",
+	},
+};
+
 static const struct mfd_cell mt6323_devs[] = {
 	{
 		.name = "mt6323-regulator",
@@ -327,6 +408,20 @@ static int mt6397_probe(struct platform_device *pdev)
 					   0, pmic->irq_domain);
 		break;
 
+	case MT6392_CID_CODE:
+		pmic->int_con[0] = MT6392_INT_CON0;
+		pmic->int_con[1] = MT6392_INT_CON1;
+		pmic->int_status[0] = MT6392_INT_STATUS0;
+		pmic->int_status[1] = MT6392_INT_STATUS1;
+		ret = mt6397_irq_init(pmic);
+		if (ret)
+			return ret;
+
+		ret = devm_mfd_add_devices(&pdev->dev, -1, mt6392_devs,
+					   ARRAY_SIZE(mt6392_devs), NULL,
+					   0, NULL);
+		break;
+
 	default:
 		dev_err(&pdev->dev, "unsupported chip: %d\n", id);
 		return -ENODEV;
@@ -343,6 +438,7 @@ static int mt6397_probe(struct platform_device *pdev)
 static const struct of_device_id mt6397_of_match[] = {
 	{ .compatible = "mediatek,mt6397" },
 	{ .compatible = "mediatek,mt6323" },
+	{ .compatible = "mediatek,mt6392" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, mt6397_of_match);
include/linux/mfd/mt6392/core.h new file +42 -0

42 lines not on this page · raw message

include/linux/mfd/mt6392/registers.h new file +487 -0

487 lines not on this page · raw message

Signature · 1 line
2.20.1
#12 lore raw

PATCH 7/24 arm64: dts: mt6392: Add PMIC mt6392 dtsi

In reply to Fabien Parent

Add the regulator nodes for the MT6392 PMIC.

---
 arch/arm64/boot/dts/mediatek/mt6392.dtsi | 208 +++++++++++++++++++++++
 1 file changed, 208 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt6392.dtsi
arch/arm64/boot/dts/mediatek/mt6392.dtsi new file +208 -0
new file mode 100644
index 000000000000..e33a45fd52af
@@ -0,0 +1,208 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 MediaTek Inc.
+ */
+
+&pwrap {
+	pmic: mt6392 {
+		compatible = "mediatek,mt6392", "mediatek,mt6323";
+		mediatek,system-power-controller;
+
+		mt6392_regulator: mt6392_regulator {
+			compatible = "mediatek,mt6392-regulator";
+
+			mt6392_vproc_reg: buck_vproc {
+				regulator-name = "buck_vproc";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vsys_reg: buck_vsys {
+				regulator-name = "buck_vsys";
+				regulator-min-microvolt = <1400000>;
+				regulator-max-microvolt = <2987500>;
+				regulator-ramp-delay = <25000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vcore_reg: buck_vcore {
+				regulator-name = "buck_vcore";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vxo22_reg: ldo_vxo22 {
+				regulator-name = "ldo_vxo22";
+				regulator-min-microvolt = <2200000>;
+				regulator-max-microvolt = <2200000>;
+				regulator-enable-ramp-delay = <110>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vaud22_reg: ldo_vaud22 {
+				regulator-name = "ldo_vaud22";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <2200000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vcama_reg: ldo_vcama {
+				regulator-name = "ldo_vcama";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vaud28_reg: ldo_vaud28 {
+				regulator-name = "ldo_vaud28";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vadc18_reg: ldo_vadc18 {
+				regulator-name = "ldo_vadc18";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vcn35_reg: ldo_vcn35 {
+				regulator-name = "ldo_vcn35";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3600000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vio28_reg: ldo_vio28 {
+				regulator-name = "ldo_vio28";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vusb_reg: ldo_vusb {
+				regulator-name = "ldo_vusb";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vmc_reg: ldo_vmc {
+				regulator-name = "ldo_vmc";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-boot-on;
+			};
+
+			mt6392_vmch_reg: ldo_vmch {
+				regulator-name = "ldo_vmch";
+				regulator-min-microvolt = <3000000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-boot-on;
+			};
+
+			mt6392_vemc3v3_reg: ldo_vemc3v3 {
+				regulator-name = "ldo_vemc3v3";
+				regulator-min-microvolt = <3000000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-boot-on;
+			};
+
+			mt6392_vgp1_reg: ldo_vgp1 {
+				regulator-name = "ldo_vgp1";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vgp2_reg: ldo_vgp2 {
+				regulator-name = "ldo_vgp2";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vcn18_reg: ldo_vcn18 {
+				regulator-name = "ldo_vcn18";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vcamaf_reg: ldo_vcamaf {
+				regulator-name = "ldo_vcamaf";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vm_reg: ldo_vm {
+				regulator-name = "ldo_vm";
+				regulator-min-microvolt = <1240000>;
+				regulator-max-microvolt = <1390000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vio18_reg: ldo_vio18 {
+				regulator-name = "ldo_vio18";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-enable-ramp-delay = <264>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			mt6392_vcamd_reg: ldo_vcamd {
+				regulator-name = "ldo_vcamd";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vcamio_reg: ldo_vcamio {
+				regulator-name = "ldo_vcamio";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vm25_reg: ldo_vm25 {
+				regulator-name = "ldo_vm25";
+				regulator-min-microvolt = <2500000>;
+				regulator-max-microvolt = <2500000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+
+			mt6392_vefuse_reg: ldo_vefuse {
+				regulator-name = "ldo_vefuse";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <2000000>;
+				regulator-enable-ramp-delay = <264>;
+			};
+		};
+	};
+};
Signature · 1 line
2.20.1
#13 lore raw

Re: [PATCH 07/24] arm64: dts: mt6392: Add PMIC mt6392 dtsi

Quoted 15 lines · Fabien Parent

Add the regulator nodes for the MT6392 PMIC.

---
 arch/arm64/boot/dts/mediatek/mt6392.dtsi | 208 +++++++++++++++++++++++
 1 file changed, 208 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt6392.dtsi
arch/arm64/boot/dts/mediatek/mt6392.dtsi new file +0 -0
new file mode 100644
index 000000000000..e33a45fd52af

arch/arm64/boot/dts/mediatek/mt6392.dtsi line 7

Quoted 7 lines
arch/arm64/boot/dts/mediatek/mt6392.dtsi new file +7 -0
@@ -0,0 +1,208 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 MediaTek Inc.
+ */
+
+&pwrap {
+       pmic: mt6392 {

Same comments in binding example apply here.

Quoted 204 lines
arch/arm64/boot/dts/mediatek/mt6392.dtsi new file +201 -1
+               compatible = "mediatek,mt6392", "mediatek,mt6323";
+               mediatek,system-power-controller;
+
+               mt6392_regulator: mt6392_regulator {
+                       compatible = "mediatek,mt6392-regulator";
+
+                       mt6392_vproc_reg: buck_vproc {
+                               regulator-name = "buck_vproc";
+                               regulator-min-microvolt = < 700000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-ramp-delay = <12500>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vsys_reg: buck_vsys {
+                               regulator-name = "buck_vsys";
+                               regulator-min-microvolt = <1400000>;
+                               regulator-max-microvolt = <2987500>;
+                               regulator-ramp-delay = <25000>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vcore_reg: buck_vcore {
+                               regulator-name = "buck_vcore";
+                               regulator-min-microvolt = < 700000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-ramp-delay = <12500>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vxo22_reg: ldo_vxo22 {
+                               regulator-name = "ldo_vxo22";
+                               regulator-min-microvolt = <2200000>;
+                               regulator-max-microvolt = <2200000>;
+                               regulator-enable-ramp-delay = <110>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vaud22_reg: ldo_vaud22 {
+                               regulator-name = "ldo_vaud22";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <2200000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vcama_reg: ldo_vcama {
+                               regulator-name = "ldo_vcama";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vaud28_reg: ldo_vaud28 {
+                               regulator-name = "ldo_vaud28";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vadc18_reg: ldo_vadc18 {
+                               regulator-name = "ldo_vadc18";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vcn35_reg: ldo_vcn35 {
+                               regulator-name = "ldo_vcn35";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3600000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vio28_reg: ldo_vio28 {
+                               regulator-name = "ldo_vio28";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vusb_reg: ldo_vusb {
+                               regulator-name = "ldo_vusb";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vmc_reg: ldo_vmc {
+                               regulator-name = "ldo_vmc";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vmch_reg: ldo_vmch {
+                               regulator-name = "ldo_vmch";
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vemc3v3_reg: ldo_vemc3v3 {
+                               regulator-name = "ldo_vemc3v3";
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vgp1_reg: ldo_vgp1 {
+                               regulator-name = "ldo_vgp1";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vgp2_reg: ldo_vgp2 {
+                               regulator-name = "ldo_vgp2";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vcn18_reg: ldo_vcn18 {
+                               regulator-name = "ldo_vcn18";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vcamaf_reg: ldo_vcamaf {
+                               regulator-name = "ldo_vcamaf";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vm_reg: ldo_vm {
+                               regulator-name = "ldo_vm";
+                               regulator-min-microvolt = <1240000>;
+                               regulator-max-microvolt = <1390000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vio18_reg: ldo_vio18 {
+                               regulator-name = "ldo_vio18";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-enable-ramp-delay = <264>;
+                               regulator-always-on;
+                               regulator-boot-on;
+                       };
+
+                       mt6392_vcamd_reg: ldo_vcamd {
+                               regulator-name = "ldo_vcamd";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vcamio_reg: ldo_vcamio {
+                               regulator-name = "ldo_vcamio";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vm25_reg: ldo_vm25 {
+                               regulator-name = "ldo_vm25";
+                               regulator-min-microvolt = <2500000>;
+                               regulator-max-microvolt = <2500000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+
+                       mt6392_vefuse_reg: ldo_vefuse {
+                               regulator-name = "ldo_vefuse";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <2000000>;
+                               regulator-enable-ramp-delay = <264>;
+                       };
+               };
+       };
+};
--

2.20.1

#14 lore raw

PATCH 8/24 dt-bindings: mmc: mtk-sd: add mtk-sd support for MT8516

In reply to Fabien Parent

Add binding documentation of mtk-sd for MT8516 SoCs.

---
 Documentation/devicetree/bindings/mmc/mtk-sd.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mmc/mtk-sd.txt +1 -0
index f5bcda3980cc..91a2ec59e497 100644
@@ -11,6 +11,7 @@ Required properties:
 	"mediatek,mt8135-mmc": for mmc host ip compatible with mt8135
 	"mediatek,mt8173-mmc": for mmc host ip compatible with mt8173
 	"mediatek,mt8183-mmc": for mmc host ip compatible with mt8183
+	"mediatek,mt8516-mmc": for mmc host ip compatible with mt8516
 	"mediatek,mt2701-mmc": for mmc host ip compatible with mt2701
 	"mediatek,mt2712-mmc": for mmc host ip compatible with mt2712
 	"mediatek,mt7622-mmc": for MT7622 SoC
Signature · 1 line
2.20.1

A message that is not in the archive (sent off-list or not yet received): 20190323211612.860-9-fparent-rdvid1DuHRBWk0Htik3J/[email protected]

#16 lore raw

Re: [PATCH 08/24] dt-bindings: mmc: mtk-sd: add mtk-sd support for MT8516

- trimmed cc list

Quoted 4 lines · Fabien Parent

Add binding documentation of mtk-sd for MT8516 SoCs.

Applied for next, thanks!

Kind regards
Uffe

Quoted 19 lines
---
 Documentation/devicetree/bindings/mmc/mtk-sd.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mmc/mtk-sd.txt +1 -1
index f5bcda3980cc..91a2ec59e497 100644
@@ -11,6 +11,7 @@ Required properties:
        "mediatek,mt8135-mmc": for mmc host ip compatible with mt8135
        "mediatek,mt8173-mmc": for mmc host ip compatible with mt8173
        "mediatek,mt8183-mmc": for mmc host ip compatible with mt8183
+       "mediatek,mt8516-mmc": for mmc host ip compatible with mt8516
        "mediatek,mt2701-mmc": for mmc host ip compatible with mt2701
        "mediatek,mt2712-mmc": for mmc host ip compatible with mt2712
        "mediatek,mt7622-mmc": for MT7622 SoC
--

2.20.1

A message that is not in the archive (sent off-list or not yet received): CAPDyKFrAxmBv+1i3qJpD=M1Wq33U2PMfQv_99xDm9MLhLxSWYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#18 lore raw

Re: [PATCH 08/24] dt-bindings: mmc: mtk-sd: add mtk-sd support for MT8516

Hi Ulf,

Quoted 10 lines · Ulf Hansson

- trimmed cc list

Quoted 4 lines · Fabien Parent

Add binding documentation of mtk-sd for MT8516 SoCs.

Applied for next, thanks!

I think this patch got lost since I cannot see it in your tree.

Thanks,
Fabien

Quoted 24 lines

Kind regards
Uffe

Quoted 19 lines
---
 Documentation/devicetree/bindings/mmc/mtk-sd.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mmc/mtk-sd.txt +1 -1
index f5bcda3980cc..91a2ec59e497 100644
@@ -11,6 +11,7 @@ Required properties:
        "mediatek,mt8135-mmc": for mmc host ip compatible with mt8135
        "mediatek,mt8173-mmc": for mmc host ip compatible with mt8173
        "mediatek,mt8183-mmc": for mmc host ip compatible with mt8183
+       "mediatek,mt8516-mmc": for mmc host ip compatible with mt8516
        "mediatek,mt2701-mmc": for mmc host ip compatible with mt2701
        "mediatek,mt2712-mmc": for mmc host ip compatible with mt2712
        "mediatek,mt7622-mmc": for MT7622 SoC
--

2.20.1

A message that is not in the archive (sent off-list or not yet received): CAOwMV_z8RrmoK+bfEqgwOv97uJarnuTCUo7aczZz=gyvg8CDzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#20 lore raw

Re: [PATCH 08/24] dt-bindings: mmc: mtk-sd: add mtk-sd support for MT8516

Quoted 9 lines · Fabien Parent

Hi Ulf,

Quoted 5 lines · Ulf Hansson

- trimmed cc list

Quoted 1 line · Fabien Parent
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Add binding documentation of mtk-sd for MT8516 SoCs.

Applied for next, thanks!

I think this patch got lost since I cannot see it in your tree.

Thanks for telling me. I have picked it up (again?) and applied it for next.

[...]

Kind regards
Uffe

#21 lore raw

PATCH 9/24 mmc: mtk-sd: check for valid optional memory resource

In reply to Fabien Parent

'top_base' memory region is optional. Check that the resource is valid before using it. This avoid getting a "invalid resource" error message printed by the kernel.

---
 drivers/mmc/host/mtk-sd.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/mmc/host/mtk-sd.c +5 -3
index 833ef0590af8..573aa127d00b 100644
@@ -2123,9 +2123,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	host->top_base = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(host->top_base))
-		host->top_base = NULL;
+	if (ret) {
+		host->top_base = devm_ioremap_resource(&pdev->dev, res);
+		if (IS_ERR(host->top_base))
+			host->top_base = NULL;
+	}
 
 	ret = mmc_regulator_get_supply(mmc);
 	if (ret)
Signature · 1 line
2.20.1
#22 lore raw

Re: [PATCH 09/24] mmc: mtk-sd: check for valid optional memory resource

Quoted 14 lines · Fabien Parent

'top_base' memory region is optional. Check that the resource is valid before using it. This avoid getting a "invalid resource" error message printed by the kernel.

---
 drivers/mmc/host/mtk-sd.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/mmc/host/mtk-sd.c +0 -0
index 833ef0590af8..573aa127d00b 100644

drivers/mmc/host/mtk-sd.c static int msdc_drv_probe(struct platform_device *pdev) · line 2126

Quoted 7 lines
drivers/mmc/host/mtk-sd.c +1 -3
@@ -2123,9 +2123,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	host->top_base = devm_ioremap_resource(&pdev->dev, res);
-	if (IS_ERR(host->top_base))
-		host->top_base = NULL;
+	if (ret) {

This should be res?

Quoted 7 lines
drivers/mmc/host/mtk-sd.c +4 -0
+		host->top_base = devm_ioremap_resource(&pdev->dev, res);
+		if (IS_ERR(host->top_base))
+			host->top_base = NULL;
+	}
 
 	ret = mmc_regulator_get_supply(mmc);
 	if (ret)
#23 lore raw

Re: [PATCH 09/24] mmc: mtk-sd: check for valid optional memory resource

Quoted 18 lines · Yingjoe Chen
Quoted 16 lines · Fabien Parent

'top_base' memory region is optional. Check that the resource is valid before using it. This avoid getting a "invalid resource" error message printed by the kernel.

---
 drivers/mmc/host/mtk-sd.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/mmc/host/mtk-sd.c +0 -0
index 833ef0590af8..573aa127d00b 100644
@@ -2123,9 +2123,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
      }
 
Quoted 7 lines

drivers/mmc/host/mtk-sd.c static int msdc_drv_probe(struct platform_device *pdev) · line 2126

Quoted 5 lines
drivers/mmc/host/mtk-sd.c +1 -3
      res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-     host->top_base = devm_ioremap_resource(&pdev->dev, res);
-     if (IS_ERR(host->top_base))
-             host->top_base = NULL;
+     if (ret) {

This should be res?

Indeed. Thanks, I will fix it in v2.

Quoted 9 lines
Quoted 7 lines
drivers/mmc/host/mtk-sd.c +4 -0
+             host->top_base = devm_ioremap_resource(&pdev->dev, res);
+             if (IS_ERR(host->top_base))
+                     host->top_base = NULL;
+     }
 
      ret = mmc_regulator_get_supply(mmc);
      if (ret)

A message that is not in the archive (sent off-list or not yet received): CAOwMV_zkHMZv8y_8C9kRCUsPtSbm+vPkJUNzU-_LK5=OhTkiPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#25 lore raw

Re: [PATCH 09/24] mmc: mtk-sd: check for valid optional memory resource

-- trimmed cc-list

Quoted 9 lines · Fabien Parent
Quoted 7 lines · Yingjoe Chen
Quoted 5 lines · Fabien Parent

'top_base' memory region is optional. Check that the resource is valid before using it. This avoid getting a "invalid resource" error message printed by the kernel.

For the next version, please post it as a standalone patch and trim the cc/to list. Then I can pick it up.

Kind regards
Uffe

Quoted 30 lines
Quoted 11 lines
Quoted 11 lines
---
 drivers/mmc/host/mtk-sd.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/mmc/host/mtk-sd.c +0 -0
index 833ef0590af8..573aa127d00b 100644
@@ -2123,9 +2123,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
      }
 
Quoted 7 lines

drivers/mmc/host/mtk-sd.c static int msdc_drv_probe(struct platform_device *pdev) · line 2126

Quoted 5 lines
drivers/mmc/host/mtk-sd.c +1 -3
      res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-     host->top_base = devm_ioremap_resource(&pdev->dev, res);
-     if (IS_ERR(host->top_base))
-             host->top_base = NULL;
+     if (ret) {

This should be res?

Indeed. Thanks, I will fix it in v2.

Quoted 9 lines
Quoted 7 lines
drivers/mmc/host/mtk-sd.c +4 -0
+             host->top_base = devm_ioremap_resource(&pdev->dev, res);
+             if (IS_ERR(host->top_base))
+                     host->top_base = NULL;
+     }
 
      ret = mmc_regulator_get_supply(mmc);
      if (ret)
#26 lore raw

PATCH 10/24 mmc: mtk-sd: add support for MT8516

In reply to Fabien Parent

Add the MSDC configuration for the MT8516 SoC.

---
 drivers/mmc/host/mtk-sd.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/mmc/host/mtk-sd.c +11 -0
index 573aa127d00b..51139275b1b2 100644
@@ -507,6 +507,16 @@ static const struct mtk_mmc_compatible mt7622_compat = {
 	.support_64g = false,
 };
 
+static const struct mtk_mmc_compatible mt8516_compat = {
+	.clk_div_bits = 12,
+	.hs400_tune = false,
+	.pad_tune_reg = MSDC_PAD_TUNE0,
+	.async_fifo = true,
+	.data_tune = true,
+	.busy_check = true,
+	.stop_clk_fix = true,
+};
+
 static const struct of_device_id msdc_of_ids[] = {
 	{ .compatible = "mediatek,mt8135-mmc", .data = &mt8135_compat},
 	{ .compatible = "mediatek,mt8173-mmc", .data = &mt8173_compat},
@@ -514,6 +524,7 @@ static const struct of_device_id msdc_of_ids[] = {
 	{ .compatible = "mediatek,mt2701-mmc", .data = &mt2701_compat},
 	{ .compatible = "mediatek,mt2712-mmc", .data = &mt2712_compat},
 	{ .compatible = "mediatek,mt7622-mmc", .data = &mt7622_compat},
+	{ .compatible = "mediatek,mt8516-mmc", .data = &mt8516_compat},
 	{}
 };
 MODULE_DEVICE_TABLE(of, msdc_of_ids);
Signature · 1 line
2.20.1

A message that is not in the archive (sent off-list or not yet received): 20190323211612.860-11-fparent-rdvid1DuHRBWk0Htik3J/[email protected]

#28 lore raw

Re: [PATCH 10/24] mmc: mtk-sd: add support for MT8516

-- trimmed cc-list

Quoted 4 lines · Fabien Parent

Add the MSDC configuration for the MT8516 SoC.

Applied for next, thanks!

Kind regards
Uffe

Quoted 36 lines
---
 drivers/mmc/host/mtk-sd.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/mmc/host/mtk-sd.c +11 -1
index 573aa127d00b..51139275b1b2 100644
@@ -507,6 +507,16 @@ static const struct mtk_mmc_compatible mt7622_compat = {
        .support_64g = false,
 };
 
+static const struct mtk_mmc_compatible mt8516_compat = {
+       .clk_div_bits = 12,
+       .hs400_tune = false,
+       .pad_tune_reg = MSDC_PAD_TUNE0,
+       .async_fifo = true,
+       .data_tune = true,
+       .busy_check = true,
+       .stop_clk_fix = true,
+};
+
 static const struct of_device_id msdc_of_ids[] = {
        { .compatible = "mediatek,mt8135-mmc", .data = &mt8135_compat},
        { .compatible = "mediatek,mt8173-mmc", .data = &mt8173_compat},
@@ -514,6 +524,7 @@ static const struct of_device_id msdc_of_ids[] = {
        { .compatible = "mediatek,mt2701-mmc", .data = &mt2701_compat},
        { .compatible = "mediatek,mt2712-mmc", .data = &mt2712_compat},
        { .compatible = "mediatek,mt7622-mmc", .data = &mt7622_compat},
+       { .compatible = "mediatek,mt8516-mmc", .data = &mt8516_compat},
        {}
 };
 MODULE_DEVICE_TABLE(of, msdc_of_ids);
--

2.20.1

#29 lore raw

PATCH 11/24 dt-bindings: mediatek: topckgen: add support for MT8516

In reply to Fabien Parent

Add binding documentation of topckgen for MT8516 SoC.

---
 .../arm/mediatek/mediatek,topckgen.txt        |   1 +
 include/dt-bindings/clock/mt8516-clk.h        | 192 ++++++++++++++++++
 2 files changed, 193 insertions(+)
 create mode 100644 include/dt-bindings/clock/mt8516-clk.h
Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt +1 -0
index d160c2b4b6fe..0843d73a1282 100644
@@ -14,6 +14,7 @@ Required Properties:
 	- "mediatek,mt7629-topckgen"
 	- "mediatek,mt8135-topckgen"
 	- "mediatek,mt8173-topckgen"
+	- "mediatek,mt8516-topckgen"
 - #clock-cells: Must be 1
 
 The topckgen controller uses the common clk binding from
include/dt-bindings/clock/mt8516-clk.h new file +192 -0

192 lines not on this page · raw message

Signature · 1 line
2.20.1
Acked-by on v1 11/24
#30 lore raw

Re: [PATCH 11/24] dt-bindings: mediatek: topckgen: add support for MT8516

Quoted 9 lines · Fabien Parent

Add binding documentation of topckgen for MT8516 SoC.

---
 .../arm/mediatek/mediatek,topckgen.txt        |   1 +
 include/dt-bindings/clock/mt8516-clk.h        | 192 ++++++++++++++++++
 2 files changed, 193 insertions(+)
 create mode 100644 include/dt-bindings/clock/mt8516-clk.h
#32 lore raw

PATCH 12/24 dt-bindings: mediatek: infracfg: add support for MT8516

In reply to Fabien Parent

Add binding documentation of infracfg for MT8516 SoC.

---
 .../bindings/arm/mediatek/mediatek,infracfg.txt          | 1 +
 include/dt-bindings/clock/mt8516-clk.h                   | 9 +++++++++
 2 files changed, 10 insertions(+)
Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt +1 -0
index 417bd83d1378..cbc38a8ee985 100644
@@ -15,6 +15,7 @@ Required Properties:
 	- "mediatek,mt7629-infracfg", "syscon"
 	- "mediatek,mt8135-infracfg", "syscon"
 	- "mediatek,mt8173-infracfg", "syscon"
+	- "mediatek,mt8516-infracfg", "syscon"
 - #clock-cells: Must be 1
 - #reset-cells: Must be 1
 
include/dt-bindings/clock/mt8516-clk.h +9 -0
index 8d44cb32efba..956ee2c0748e 100644
@@ -8,6 +8,15 @@
 #ifndef _DT_BINDINGS_CLK_MT8516_H
 #define _DT_BINDINGS_CLK_MT8516_H
 
+/* INFRACFG */
+
+#define CLK_IFR_MUX1_SEL		0
+#define CLK_IFR_ETH_25M_SEL		1
+#define CLK_IFR_I2C0_SEL		2
+#define CLK_IFR_I2C1_SEL		3
+#define CLK_IFR_I2C2_SEL		4
+#define CLK_IFR_NR_CLK			5
+
 /* TOPCKGEN */
 
 #define CLK_TOP_CLK_NULL		0
Signature · 1 line
2.20.1
Acked-by on v1 12/24
#33 lore raw

Re: [PATCH 12/24] dt-bindings: mediatek: infracfg: add support for MT8516

Quoted 8 lines · Fabien Parent

Add binding documentation of infracfg for MT8516 SoC.

---
 .../bindings/arm/mediatek/mediatek,infracfg.txt          | 1 +
 include/dt-bindings/clock/mt8516-clk.h                   | 9 +++++++++
 2 files changed, 10 insertions(+)
#35 lore raw

PATCH 13/24 dt-bindings: mediatek: apmixedsys: add support for MT8516

In reply to Fabien Parent

Add binding documentation of apmixedsys for MT8516 SoC.

---
 .../bindings/arm/mediatek/mediatek,apmixedsys.txt      |  1 +
 include/dt-bindings/clock/mt8516-clk.h                 | 10 ++++++++++
 2 files changed, 11 insertions(+)
Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt +1 -0
index de4075413d91..c33d83f066c9 100644
@@ -14,6 +14,7 @@ Required Properties:
 	- "mediatek,mt7629-apmixedsys"
 	- "mediatek,mt8135-apmixedsys"
 	- "mediatek,mt8173-apmixedsys"
+	- "mediatek,mt8516-apmixedsys"
 - #clock-cells: Must be 1
 
 The apmixedsys controller uses the common clk binding from
include/dt-bindings/clock/mt8516-clk.h +10 -0
index 956ee2c0748e..9cfca53cd78d 100644
@@ -8,6 +8,16 @@
 #ifndef _DT_BINDINGS_CLK_MT8516_H
 #define _DT_BINDINGS_CLK_MT8516_H
 
+/* APMIXEDSYS */
+
+#define CLK_APMIXED_ARMPLL		0
+#define CLK_APMIXED_MAINPLL		1
+#define CLK_APMIXED_UNIVPLL		2
+#define CLK_APMIXED_MMPLL		3
+#define CLK_APMIXED_APLL1		4
+#define CLK_APMIXED_APLL2		5
+#define CLK_APMIXED_NR_CLK		6
+
 /* INFRACFG */
 
 #define CLK_IFR_MUX1_SEL		0
Signature · 1 line
2.20.1
Acked-by on v1 13/24
#36 lore raw

Re: [PATCH 13/24] dt-bindings: mediatek: apmixedsys: add support for MT8516

Quoted 8 lines · Fabien Parent

Add binding documentation of apmixedsys for MT8516 SoC.

---
 .../bindings/arm/mediatek/mediatek,apmixedsys.txt      |  1 +
 include/dt-bindings/clock/mt8516-clk.h                 | 10 ++++++++++
 2 files changed, 11 insertions(+)
#38 lore raw

PATCH 14/24 clk: mediatek: add clock driver for MT8516

In reply to Fabien Parent

Add the clock driver for the MT8516 SoC.

---
 drivers/clk/mediatek/Kconfig      |   9 +
 drivers/clk/mediatek/Makefile     |   1 +
 drivers/clk/mediatek/clk-mt8516.c | 815 ++++++++++++++++++++++++++++++
 3 files changed, 825 insertions(+)
 create mode 100644 drivers/clk/mediatek/clk-mt8516.c
drivers/clk/mediatek/Kconfig +9 -0
index 53edade25a1d..1e951ae49982 100644
@@ -216,4 +216,13 @@ config COMMON_CLK_MT8173
 	default ARCH_MEDIATEK
 	---help---
 	  This driver supports MediaTek MT8173 clocks.
+
+config COMMON_CLK_MT8516
+	bool "Clock driver for MediaTek MT8516"
+	depends on ARCH_MEDIATEK || COMPILE_TEST
+	select COMMON_CLK_MEDIATEK
+	default ARCH_MEDIATEK
+	help
+	  This driver supports MediaTek MT8516 clocks.
+
 endmenu
drivers/clk/mediatek/Makefile +1 -0
index ee4410ff43ab..c4f413ef5aad 100644
@@ -31,3 +31,4 @@ obj-$(CONFIG_COMMON_CLK_MT7629_ETHSYS) += clk-mt7629-eth.o
 obj-$(CONFIG_COMMON_CLK_MT7629_HIFSYS) += clk-mt7629-hif.o
 obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o
 obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o
+obj-$(CONFIG_COMMON_CLK_MT8516) += clk-mt8516.o
drivers/clk/mediatek/clk-mt8516.c new file +815 -0

815 lines not on this page · raw message

Signature · 1 line
2.20.1
maintainer Applied
#39 lore raw

Re: [PATCH 14/24] clk: mediatek: add clock driver for MT8516

Quoting Fabien Parent (2019-03-23 14:16:02)

Quoted 4 lines

Add the clock driver for the MT8516 SoC.

---

Applied to clk-next

#40 lore raw

PATCH 15/24 dt-bindings: pinctrl: pinctrl-mt65xx: add support for MT8516

In reply to Fabien Parent

Add binding documentation of pinctrl-mt65xx for MT8516 SoC.

---
 Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt +1 -0
index e7d6f81c227f..205be98ae078 100644
@@ -11,6 +11,7 @@ Required properties:
 	"mediatek,mt8127-pinctrl", compatible with mt8127 pinctrl.
 	"mediatek,mt8135-pinctrl", compatible with mt8135 pinctrl.
 	"mediatek,mt8173-pinctrl", compatible with mt8173 pinctrl.
+	"mediatek,mt8516-pinctrl", compatible with mt8516 pinctrl.
 - pins-are-numbered: Specify the subnodes are using numbered pinmux to
   specify pins.
 - gpio-controller : Marks the device node as a gpio controller.
Signature · 1 line
2.20.1
maintainer
#43 lore raw

Re: [PATCH 15/24] dt-bindings: pinctrl: pinctrl-mt65xx: add support for MT8516

Hi Linus,

Quoted 8 lines · Linus Walleij
Quoted 3 lines · Fabien Parent

Add binding documentation of pinctrl-mt65xx for MT8516 SoC.

Patch applied with Rob's ACK.

I don't see this in your for-next branch. Did the patch got lost?

Regards,
Matthias

#44 lore raw

Re: [PATCH 15/24] dt-bindings: pinctrl: pinctrl-mt65xx: add support for MT8516

Quoted 5 lines · Matthias Brugger

Hi Linus,

Quoted 2 lines · Linus Walleij

On Sat, Mar 23, 2019 at 10:17 PM Fabien Parent <[email protected]> wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Add binding documentation of pinctrl-mt65xx for MT8516 SoC.

Patch applied with Rob's ACK.

I don't see this in your for-next branch. Did the patch got lost?

I usually push the devel branch to be tested by the build robots and then mix down the for-next branch.

Recent week(s) the build robot was not responding so it got delayed.

Yours,
Linus Walleij

maintainer
#45 lore raw

Re: [PATCH 15/24] dt-bindings: pinctrl: pinctrl-mt65xx: add support for MT8516

Quoted 15 lines · Linus Walleij
Quoted 12 lines · Matthias Brugger

Hi Linus,

Quoted 8 lines · Linus Walleij
Quoted 3 lines · Fabien Parent

Add binding documentation of pinctrl-mt65xx for MT8516 SoC.

Patch applied with Rob's ACK.

Quoted 7 lines
Quoted 1 line

I don't see this in your for-next branch. Did the patch got lost?

I usually push the devel branch to be tested by the build robots and then mix down the for-next branch.

Recent week(s) the build robot was not responding so it got delayed.

I don't see it in the devel branch [1]. Can you please double check?

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=devel

#46 lore raw

PATCH 16/24 pinctrl: mediatek: Add MT8516 Pinctrl driver

In reply to Fabien Parent
---
 drivers/pinctrl/mediatek/Kconfig              |    7 +
 drivers/pinctrl/mediatek/Makefile             |    1 +
 drivers/pinctrl/mediatek/pinctrl-mt8516.c     |  384 ++++++
 drivers/pinctrl/mediatek/pinctrl-mtk-mt8516.h | 1182 +++++++++++++++++
 4 files changed, 1574 insertions(+)
 create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt8516.c
 create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt8516.h
drivers/pinctrl/mediatek/Kconfig +7 -0
index a005cbccb4f7..26ed5dca1460 100644
@@ -113,6 +113,13 @@ config PINCTRL_MT8183
 	default ARM64 && ARCH_MEDIATEK
 	select PINCTRL_MTK_PARIS
 
+config PINCTRL_MT8516
+	bool "Mediatek MT8516 pin control"
+	depends on OF
+	depends on ARM64 || COMPILE_TEST
+	default ARM64 && ARCH_MEDIATEK
+	select PINCTRL_MTK
+
 # For PMIC
 config PINCTRL_MT6397
 	bool "Mediatek MT6397 pin control"
drivers/pinctrl/mediatek/Makefile +1 -0
index 4b4e2eaf6f2d..a74325abd877 100644
@@ -17,4 +17,5 @@ obj-$(CONFIG_PINCTRL_MT7623)	+= pinctrl-mt7623.o
 obj-$(CONFIG_PINCTRL_MT7629)	+= pinctrl-mt7629.o
 obj-$(CONFIG_PINCTRL_MT8173)	+= pinctrl-mt8173.o
 obj-$(CONFIG_PINCTRL_MT8183)	+= pinctrl-mt8183.o
+obj-$(CONFIG_PINCTRL_MT8516)	+= pinctrl-mt8516.o
 obj-$(CONFIG_PINCTRL_MT6397)	+= pinctrl-mt6397.o
drivers/pinctrl/mediatek/pinctrl-mt8516.c new file +384 -0

384 lines not on this page · raw message

drivers/pinctrl/mediatek/pinctrl-mtk-mt8516.h new file +1182 -0

1,182 lines not on this page · raw message

Signature · 1 line
2.20.1
maintainer
#47 lore raw

Re: [PATCH 16/24] pinctrl: mediatek: Add MT8516 Pinctrl driver

Hi, Fabien

Quoted 383 lines · Fabien Parent
---
 drivers/pinctrl/mediatek/Kconfig              |    7 +
 drivers/pinctrl/mediatek/Makefile             |    1 +
 drivers/pinctrl/mediatek/pinctrl-mt8516.c     |  384 ++++++
 drivers/pinctrl/mediatek/pinctrl-mtk-mt8516.h | 1182 +++++++++++++++++
 4 files changed, 1574 insertions(+)
 create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt8516.c
 create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt8516.h
drivers/pinctrl/mediatek/Kconfig +7 -0
index a005cbccb4f7..26ed5dca1460 100644
@@ -113,6 +113,13 @@ config PINCTRL_MT8183
        default ARM64 && ARCH_MEDIATEK
        select PINCTRL_MTK_PARIS
 
+config PINCTRL_MT8516
+       bool "Mediatek MT8516 pin control"
+       depends on OF
+       depends on ARM64 || COMPILE_TEST
+       default ARM64 && ARCH_MEDIATEK
+       select PINCTRL_MTK
+
 # For PMIC
 config PINCTRL_MT6397
        bool "Mediatek MT6397 pin control"
drivers/pinctrl/mediatek/Makefile +1 -0
index 4b4e2eaf6f2d..a74325abd877 100644
@@ -17,4 +17,5 @@ obj-$(CONFIG_PINCTRL_MT7623)  += pinctrl-mt7623.o
 obj-$(CONFIG_PINCTRL_MT7629)   += pinctrl-mt7629.o
 obj-$(CONFIG_PINCTRL_MT8173)   += pinctrl-mt8173.o
 obj-$(CONFIG_PINCTRL_MT8183)   += pinctrl-mt8183.o
+obj-$(CONFIG_PINCTRL_MT8516)   += pinctrl-mt8516.o
 obj-$(CONFIG_PINCTRL_MT6397)   += pinctrl-mt6397.o
drivers/pinctrl/mediatek/pinctrl-mt8516.c new file +338 -0
new file mode 100644
index 000000000000..1e965f119eca
@@ -0,0 +1,384 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 MediaTek Inc.
+ * Author: Min.Guo <[email protected]>
+ */
+
+#include <dt-bindings/pinctrl/mt65xx.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/module.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+
+#include "pinctrl-mtk-common.h"
+#include "pinctrl-mtk-mt8516.h"
+
+static const struct mtk_drv_group_desc mt8516_drv_grp[] = {
+       /* 0E4E8SR 4/8/12/16 */
+       MTK_DRV_GRP(4, 16, 1, 2, 4),
+       /* 0E2E4SR  2/4/6/8 */
+       MTK_DRV_GRP(2, 8, 1, 2, 2),
+       /* E8E4E2  2/4/6/8/10/12/14/16 */
+       MTK_DRV_GRP(2, 16, 0, 2, 2)
+};
+
+static const struct mtk_pin_drv_grp mt8516_pin_drv[] = {
+       MTK_PIN_DRV_GRP(0, 0xd00, 0, 0),
+       MTK_PIN_DRV_GRP(1, 0xd00, 0, 0),
+       MTK_PIN_DRV_GRP(2, 0xd00, 0, 0),
+       MTK_PIN_DRV_GRP(3, 0xd00, 0, 0),
+       MTK_PIN_DRV_GRP(4, 0xd00, 0, 0),
+
+       MTK_PIN_DRV_GRP(5, 0xd00, 4, 0),
+       MTK_PIN_DRV_GRP(6, 0xd00, 4, 0),
+       MTK_PIN_DRV_GRP(7, 0xd00, 4, 0),
+       MTK_PIN_DRV_GRP(8, 0xd00, 4, 0),
+       MTK_PIN_DRV_GRP(9, 0xd00, 4, 0),
+       MTK_PIN_DRV_GRP(10, 0xd00, 4, 0),
+
+       MTK_PIN_DRV_GRP(11, 0xd00, 8, 0),
+       MTK_PIN_DRV_GRP(12, 0xd00, 8, 0),
+       MTK_PIN_DRV_GRP(13, 0xd00, 8, 0),
+
+       MTK_PIN_DRV_GRP(14, 0xd00, 12, 2),
+       MTK_PIN_DRV_GRP(15, 0xd00, 12, 2),
+       MTK_PIN_DRV_GRP(16, 0xd00, 12, 2),
+       MTK_PIN_DRV_GRP(17, 0xd00, 12, 2),
+
+       MTK_PIN_DRV_GRP(18, 0xd10, 0, 0),
+       MTK_PIN_DRV_GRP(19, 0xd10, 0, 0),
+       MTK_PIN_DRV_GRP(20, 0xd10, 0, 0),
+
+       MTK_PIN_DRV_GRP(21, 0xd00, 12, 2),
+       MTK_PIN_DRV_GRP(22, 0xd00, 12, 2),
+       MTK_PIN_DRV_GRP(23, 0xd00, 12, 2),
+
+       MTK_PIN_DRV_GRP(24, 0xd00, 8, 0),
+       MTK_PIN_DRV_GRP(25, 0xd00, 8, 0),
+
+       MTK_PIN_DRV_GRP(26, 0xd10, 4, 1),
+       MTK_PIN_DRV_GRP(27, 0xd10, 4, 1),
+       MTK_PIN_DRV_GRP(28, 0xd10, 4, 1),
+       MTK_PIN_DRV_GRP(29, 0xd10, 4, 1),
+       MTK_PIN_DRV_GRP(30, 0xd10, 4, 1),
+
+       MTK_PIN_DRV_GRP(31, 0xd10, 8, 1),
+       MTK_PIN_DRV_GRP(32, 0xd10, 8, 1),
+       MTK_PIN_DRV_GRP(33, 0xd10, 8, 1),
+
+       MTK_PIN_DRV_GRP(34, 0xd10, 12, 0),
+       MTK_PIN_DRV_GRP(35, 0xd10, 12, 0),
+
+       MTK_PIN_DRV_GRP(36, 0xd20, 0, 0),
+       MTK_PIN_DRV_GRP(37, 0xd20, 0, 0),
+       MTK_PIN_DRV_GRP(38, 0xd20, 0, 0),
+       MTK_PIN_DRV_GRP(39, 0xd20, 0, 0),
+
+       MTK_PIN_DRV_GRP(40, 0xd20, 4, 1),
+
+       MTK_PIN_DRV_GRP(41, 0xd20, 8, 1),
+       MTK_PIN_DRV_GRP(42, 0xd20, 8, 1),
+       MTK_PIN_DRV_GRP(43, 0xd20, 8, 1),
+
+       MTK_PIN_DRV_GRP(44, 0xd20, 12, 1),
+       MTK_PIN_DRV_GRP(45, 0xd20, 12, 1),
+       MTK_PIN_DRV_GRP(46, 0xd20, 12, 1),
+       MTK_PIN_DRV_GRP(47, 0xd20, 12, 1),
+
+       MTK_PIN_DRV_GRP(48, 0xd30, 0, 1),
+       MTK_PIN_DRV_GRP(49, 0xd30, 0, 1),
+       MTK_PIN_DRV_GRP(50, 0xd30, 0, 1),
+       MTK_PIN_DRV_GRP(51, 0xd30, 0, 1),
+
+       MTK_PIN_DRV_GRP(54, 0xd30, 8, 1),
+
+       MTK_PIN_DRV_GRP(55, 0xd30, 12, 1),
+       MTK_PIN_DRV_GRP(56, 0xd30, 12, 1),
+       MTK_PIN_DRV_GRP(57, 0xd30, 12, 1),
+
+       MTK_PIN_DRV_GRP(62, 0xd40, 8, 1),
+       MTK_PIN_DRV_GRP(63, 0xd40, 8, 1),
+       MTK_PIN_DRV_GRP(64, 0xd40, 8, 1),
+       MTK_PIN_DRV_GRP(65, 0xd40, 8, 1),
+       MTK_PIN_DRV_GRP(66, 0xd40, 8, 1),
+       MTK_PIN_DRV_GRP(67, 0xd40, 8, 1),
+
+       MTK_PIN_DRV_GRP(68, 0xd40, 12, 2),
+
+       MTK_PIN_DRV_GRP(69, 0xd50, 0, 2),
+
+       MTK_PIN_DRV_GRP(70, 0xd50, 4, 2),
+       MTK_PIN_DRV_GRP(71, 0xd50, 4, 2),
+       MTK_PIN_DRV_GRP(72, 0xd50, 4, 2),
+       MTK_PIN_DRV_GRP(73, 0xd50, 4, 2),
+
+       MTK_PIN_DRV_GRP(100, 0xd50, 8, 1),
+       MTK_PIN_DRV_GRP(101, 0xd50, 8, 1),
+       MTK_PIN_DRV_GRP(102, 0xd50, 8, 1),
+       MTK_PIN_DRV_GRP(103, 0xd50, 8, 1),
+
+       MTK_PIN_DRV_GRP(104, 0xd50, 12, 2),
+
+       MTK_PIN_DRV_GRP(105, 0xd60, 0, 2),
+
+       MTK_PIN_DRV_GRP(106, 0xd60, 4, 2),
+       MTK_PIN_DRV_GRP(107, 0xd60, 4, 2),
+       MTK_PIN_DRV_GRP(108, 0xd60, 4, 2),
+       MTK_PIN_DRV_GRP(109, 0xd60, 4, 2),
+
+       MTK_PIN_DRV_GRP(110, 0xd70, 0, 2),
+       MTK_PIN_DRV_GRP(111, 0xd70, 0, 2),
+       MTK_PIN_DRV_GRP(112, 0xd70, 0, 2),
+       MTK_PIN_DRV_GRP(113, 0xd70, 0, 2),
+
+       MTK_PIN_DRV_GRP(114, 0xd70, 4, 2),
+
+       MTK_PIN_DRV_GRP(115, 0xd60, 12, 2),
+
+       MTK_PIN_DRV_GRP(116, 0xd60, 8, 2),
+
+       MTK_PIN_DRV_GRP(117, 0xd70, 0, 2),
+       MTK_PIN_DRV_GRP(118, 0xd70, 0, 2),
+       MTK_PIN_DRV_GRP(119, 0xd70, 0, 2),
+       MTK_PIN_DRV_GRP(120, 0xd70, 0, 2),
+};
+
+static const struct mtk_pin_spec_pupd_set_samereg mt8516_spec_pupd[] = {
+       MTK_PIN_PUPD_SPEC_SR(14, 0xe50, 14, 13, 12),
+       MTK_PIN_PUPD_SPEC_SR(15, 0xe60, 2, 1, 0),
+       MTK_PIN_PUPD_SPEC_SR(16, 0xe60, 6, 5, 4),
+       MTK_PIN_PUPD_SPEC_SR(17, 0xe60, 10, 9, 8),
+
+       MTK_PIN_PUPD_SPEC_SR(21, 0xe60, 14, 13, 12),
+       MTK_PIN_PUPD_SPEC_SR(22, 0xe70, 2, 1, 0),
+       MTK_PIN_PUPD_SPEC_SR(23, 0xe70, 6, 5, 4),
+
+       MTK_PIN_PUPD_SPEC_SR(40, 0xe80, 2, 1, 0),
+       MTK_PIN_PUPD_SPEC_SR(41, 0xe80, 6, 5, 4),
+       MTK_PIN_PUPD_SPEC_SR(42, 0xe90, 2, 1, 0),
+       MTK_PIN_PUPD_SPEC_SR(43, 0xe90, 6, 5, 4),
+
+       MTK_PIN_PUPD_SPEC_SR(68, 0xe50, 10, 9, 8),
+       MTK_PIN_PUPD_SPEC_SR(69, 0xe50, 6, 5, 4),
+       MTK_PIN_PUPD_SPEC_SR(70, 0xe40, 6, 5, 4),
+       MTK_PIN_PUPD_SPEC_SR(71, 0xe40, 10, 9, 8),
+       MTK_PIN_PUPD_SPEC_SR(72, 0xe40, 14, 13, 12),
+       MTK_PIN_PUPD_SPEC_SR(73, 0xe50, 2, 1, 0),
+
+       MTK_PIN_PUPD_SPEC_SR(104, 0xe40, 2, 1, 0),
+       MTK_PIN_PUPD_SPEC_SR(105, 0xe30, 14, 13, 12),
+       MTK_PIN_PUPD_SPEC_SR(106, 0xe20, 14, 13, 12),
+       MTK_PIN_PUPD_SPEC_SR(107, 0xe30, 2, 1, 0),
+       MTK_PIN_PUPD_SPEC_SR(108, 0xe30, 6, 5, 4),
+       MTK_PIN_PUPD_SPEC_SR(109, 0xe30, 10, 9, 8),
+       MTK_PIN_PUPD_SPEC_SR(110, 0xe10, 14, 13, 12),
+       MTK_PIN_PUPD_SPEC_SR(111, 0xe10, 10, 9, 8),
+       MTK_PIN_PUPD_SPEC_SR(112, 0xe10, 6, 5, 4),
+       MTK_PIN_PUPD_SPEC_SR(113, 0xe10, 2, 1, 0),
+       MTK_PIN_PUPD_SPEC_SR(114, 0xe20, 10, 9, 8),
+       MTK_PIN_PUPD_SPEC_SR(115, 0xe20, 2, 1, 0),
+       MTK_PIN_PUPD_SPEC_SR(116, 0xe20, 6, 5, 4),
+       MTK_PIN_PUPD_SPEC_SR(117, 0xe00, 14, 13, 12),
+       MTK_PIN_PUPD_SPEC_SR(118, 0xe00, 10, 9, 8),
+       MTK_PIN_PUPD_SPEC_SR(119, 0xe00, 6, 5, 4),
+       MTK_PIN_PUPD_SPEC_SR(120, 0xe00, 2, 1, 0),
+};
+
+static int mt8516_spec_pull_set(struct regmap *regmap, unsigned int pin,
+                       unsigned char align, bool isup, unsigned int r1r0)
+{
+       return mtk_pctrl_spec_pull_set_samereg(regmap, mt8516_spec_pupd,
+               ARRAY_SIZE(mt8516_spec_pupd), pin, align, isup, r1r0);
+}
+
+static const struct mtk_pin_ies_smt_set mt8516_ies_set[] = {
+       MTK_PIN_IES_SMT_SPEC(0, 6, 0x900, 2),
+       MTK_PIN_IES_SMT_SPEC(7, 10, 0x900, 3),
+       MTK_PIN_IES_SMT_SPEC(11, 13, 0x900, 12),
+       MTK_PIN_IES_SMT_SPEC(14, 17, 0x900, 13),
+       MTK_PIN_IES_SMT_SPEC(18, 20, 0x910, 10),
+       MTK_PIN_IES_SMT_SPEC(21, 23, 0x900, 13),
+       MTK_PIN_IES_SMT_SPEC(24, 25, 0x900, 12),
+       MTK_PIN_IES_SMT_SPEC(26, 30, 0x900, 0),
+       MTK_PIN_IES_SMT_SPEC(31, 33, 0x900, 1),
+       MTK_PIN_IES_SMT_SPEC(34, 39, 0x900, 2),
+       MTK_PIN_IES_SMT_SPEC(40, 40, 0x910, 11),
+       MTK_PIN_IES_SMT_SPEC(41, 43, 0x900, 10),
+       MTK_PIN_IES_SMT_SPEC(44, 47, 0x900, 11),
+       MTK_PIN_IES_SMT_SPEC(48, 51, 0x900, 14),
+       MTK_PIN_IES_SMT_SPEC(52, 53, 0x910, 0),
+       MTK_PIN_IES_SMT_SPEC(54, 54, 0x910, 2),
+       MTK_PIN_IES_SMT_SPEC(55, 57, 0x910, 4),
+       MTK_PIN_IES_SMT_SPEC(58, 59, 0x900, 15),
+       MTK_PIN_IES_SMT_SPEC(60, 61, 0x910, 1),
+       MTK_PIN_IES_SMT_SPEC(62, 65, 0x910, 5),
+       MTK_PIN_IES_SMT_SPEC(66, 67, 0x910, 6),
+       MTK_PIN_IES_SMT_SPEC(68, 68, 0x930, 2),
+       MTK_PIN_IES_SMT_SPEC(69, 69, 0x930, 1),
+       MTK_PIN_IES_SMT_SPEC(70, 70, 0x930, 6),
+       MTK_PIN_IES_SMT_SPEC(71, 71, 0x930, 5),
+       MTK_PIN_IES_SMT_SPEC(72, 72, 0x930, 4),
+       MTK_PIN_IES_SMT_SPEC(73, 73, 0x930, 3),
+       MTK_PIN_IES_SMT_SPEC(100, 103, 0x910, 7),
+       MTK_PIN_IES_SMT_SPEC(104, 104, 0x920, 12),
+       MTK_PIN_IES_SMT_SPEC(105, 105, 0x920, 11),
+       MTK_PIN_IES_SMT_SPEC(106, 106, 0x930, 0),
+       MTK_PIN_IES_SMT_SPEC(107, 107, 0x920, 15),
+       MTK_PIN_IES_SMT_SPEC(108, 108, 0x920, 14),
+       MTK_PIN_IES_SMT_SPEC(109, 109, 0x920, 13),
+       MTK_PIN_IES_SMT_SPEC(110, 110, 0x920, 9),
+       MTK_PIN_IES_SMT_SPEC(111, 111, 0x920, 8),
+       MTK_PIN_IES_SMT_SPEC(112, 112, 0x920, 7),
+       MTK_PIN_IES_SMT_SPEC(113, 113, 0x920, 6),
+       MTK_PIN_IES_SMT_SPEC(114, 114, 0x920, 10),
+       MTK_PIN_IES_SMT_SPEC(115, 115, 0x920, 1),
+       MTK_PIN_IES_SMT_SPEC(116, 116, 0x920, 0),
+       MTK_PIN_IES_SMT_SPEC(117, 117, 0x920, 5),
+       MTK_PIN_IES_SMT_SPEC(118, 118, 0x920, 4),
+       MTK_PIN_IES_SMT_SPEC(119, 119, 0x920, 3),
+       MTK_PIN_IES_SMT_SPEC(120, 120, 0x920, 2),
+       MTK_PIN_IES_SMT_SPEC(121, 124, 0x910, 9),
+};
+
+static const struct mtk_pin_ies_smt_set mt8516_smt_set[] = {
+       MTK_PIN_IES_SMT_SPEC(0, 6, 0xA00, 2),
+       MTK_PIN_IES_SMT_SPEC(7, 10, 0xA00, 3),
+       MTK_PIN_IES_SMT_SPEC(11, 13, 0xA00, 12),
+       MTK_PIN_IES_SMT_SPEC(14, 17, 0xA00, 13),
+       MTK_PIN_IES_SMT_SPEC(18, 20, 0xA10, 10),
+       MTK_PIN_IES_SMT_SPEC(21, 23, 0xA00, 13),
+       MTK_PIN_IES_SMT_SPEC(24, 25, 0xA00, 12),
+       MTK_PIN_IES_SMT_SPEC(26, 30, 0xA00, 0),
+       MTK_PIN_IES_SMT_SPEC(31, 33, 0xA00, 1),
+       MTK_PIN_IES_SMT_SPEC(34, 39, 0xA900, 2),
+       MTK_PIN_IES_SMT_SPEC(40, 40, 0xA10, 11),
+       MTK_PIN_IES_SMT_SPEC(41, 43, 0xA00, 10),
+       MTK_PIN_IES_SMT_SPEC(44, 47, 0xA00, 11),
+       MTK_PIN_IES_SMT_SPEC(48, 51, 0xA00, 14),
+       MTK_PIN_IES_SMT_SPEC(52, 53, 0xA10, 0),
+       MTK_PIN_IES_SMT_SPEC(54, 54, 0xA10, 2),
+       MTK_PIN_IES_SMT_SPEC(55, 57, 0xA10, 4),
+       MTK_PIN_IES_SMT_SPEC(58, 59, 0xA00, 15),
+       MTK_PIN_IES_SMT_SPEC(60, 61, 0xA10, 1),
+       MTK_PIN_IES_SMT_SPEC(62, 65, 0xA10, 5),
+       MTK_PIN_IES_SMT_SPEC(66, 67, 0xA10, 6),
+       MTK_PIN_IES_SMT_SPEC(68, 68, 0xA30, 2),
+       MTK_PIN_IES_SMT_SPEC(69, 69, 0xA30, 1),
+       MTK_PIN_IES_SMT_SPEC(70, 70, 0xA30, 3),
+       MTK_PIN_IES_SMT_SPEC(71, 71, 0xA30, 4),
+       MTK_PIN_IES_SMT_SPEC(72, 72, 0xA30, 5),
+       MTK_PIN_IES_SMT_SPEC(73, 73, 0xA30, 6),
+
+       MTK_PIN_IES_SMT_SPEC(100, 103, 0xA10, 7),
+       MTK_PIN_IES_SMT_SPEC(104, 104, 0xA20, 12),
+       MTK_PIN_IES_SMT_SPEC(105, 105, 0xA20, 11),
+       MTK_PIN_IES_SMT_SPEC(106, 106, 0xA30, 13),
+       MTK_PIN_IES_SMT_SPEC(107, 107, 0xA20, 14),
+       MTK_PIN_IES_SMT_SPEC(108, 108, 0xA20, 15),
+       MTK_PIN_IES_SMT_SPEC(109, 109, 0xA30, 0),
+       MTK_PIN_IES_SMT_SPEC(110, 110, 0xA20, 9),
+       MTK_PIN_IES_SMT_SPEC(111, 111, 0xA20, 8),
+       MTK_PIN_IES_SMT_SPEC(112, 112, 0xA20, 7),
+       MTK_PIN_IES_SMT_SPEC(113, 113, 0xA20, 6),
+       MTK_PIN_IES_SMT_SPEC(114, 114, 0xA20, 10),
+       MTK_PIN_IES_SMT_SPEC(115, 115, 0xA20, 1),
+       MTK_PIN_IES_SMT_SPEC(116, 116, 0xA20, 0),
+       MTK_PIN_IES_SMT_SPEC(117, 117, 0xA20, 5),
+       MTK_PIN_IES_SMT_SPEC(118, 118, 0xA20, 4),
+       MTK_PIN_IES_SMT_SPEC(119, 119, 0xA20, 3),
+       MTK_PIN_IES_SMT_SPEC(120, 120, 0xA20, 2),
+       MTK_PIN_IES_SMT_SPEC(121, 124, 0xA10, 9),
+};
+
+static int mt8516_ies_smt_set(struct regmap *regmap, unsigned int pin,
+               unsigned char align, int value, enum pin_config_param arg)
+{
+       if (arg == PIN_CONFIG_INPUT_ENABLE)
+               return mtk_pconf_spec_set_ies_smt_range(regmap, mt8516_ies_set,
+                       ARRAY_SIZE(mt8516_ies_set), pin, align, value);
+       else if (arg == PIN_CONFIG_INPUT_SCHMITT_ENABLE)
+               return mtk_pconf_spec_set_ies_smt_range(regmap, mt8516_smt_set,
+                       ARRAY_SIZE(mt8516_smt_set), pin, align, value);
+       return -EINVAL;
+}
+
+static struct mtk_eint_regs mt8516_eint_regs = {
+       .stat = 0x000,
+       .ack = 0x040,
+       .mask = 0x080,
+       .mask_set = 0x0c0,
+       .mask_clr = 0x100,
+       .sens = 0x140,
+       .sens_set = 0x180,
+       .sens_clr = 0x1c0,
+       .soft = 0x200,
+       .soft_set = 0x240,
+       .soft_clr = 0x280,
+       .pol = 0x300,
+       .pol_set = 0x340,
+       .pol_clr = 0x380,
+       .dom_en = 0x400,
+       .dbnc_ctrl = 0x500,
+       .dbnc_set = 0x600,
+       .dbnc_clr = 0x700,
+};
+
+static const struct mtk_pinctrl_devdata mt8516_pinctrl_data = {
+       .pins = mtk_pins_mt8516,
+       .npins = ARRAY_SIZE(mtk_pins_mt8516),
+       .grp_desc = mt8516_drv_grp,
+       .n_grp_cls = ARRAY_SIZE(mt8516_drv_grp),
+       .pin_drv_grp = mt8516_pin_drv,
+       .n_pin_drv_grps = ARRAY_SIZE(mt8516_pin_drv),
+       .spec_pull_set = mt8516_spec_pull_set,
+       .spec_ies_smt_set = mt8516_ies_smt_set,
+       .dir_offset = 0x0000,
+       .pullen_offset = 0x0500,

drivers/pinctrl/mediatek/pinctrl-mt8516.c line 348

Quoted 10 lines
drivers/pinctrl/mediatek/pinctrl-mt8516.c new file +10 -0
+       .pullsel_offset = 0x0600,
+       .dout_offset = 0x0100,
+       .din_offset = 0x0200,
+       .pinmux_offset = 0x0300,
+       .type1_start = 125,
+       .type1_end = 125,
+       .port_shf = 4,
+       .port_mask = 0xf,
+       .port_align = 4,
+       .eint_regs = &mt8516_eint_regs,

The eint register layout seems definitely the same to the generic one. So mt8516_eint_regs struct defintions and the field assignment can be dropped. And then the driver will fall back to use a generic one "mtk_generic_eint_regs" which are currently common to all MediaTek pinctrls devices. Others look good to me.

Quoted 1,227 lines
drivers/pinctrl/mediatek/pinctrl-mt8516.c new file +36 -0
+       .eint_hw = {
+               .port_mask = 7,
+               .ports     = 6,
+               .ap_num    = 169,
+               .db_cnt    = 64,
+       },
+};
+
+static int mt8516_pinctrl_probe(struct platform_device *pdev)
+{
+       return mtk_pctrl_init(pdev, &mt8516_pinctrl_data, NULL);
+}
+
+static const struct of_device_id mt8516_pctrl_match[] = {
+       {
+               .compatible = "mediatek,mt8516-pinctrl",
+       },
+       {}
+};
+
+MODULE_DEVICE_TABLE(of, mt8516_pctrl_match);
+
+static struct platform_driver mtk_pinctrl_driver = {
+       .probe = mt8516_pinctrl_probe,
+       .driver = {
+               .name = "mediatek-mt8516-pinctrl",
+               .of_match_table = mt8516_pctrl_match,
+               .pm = &mtk_eint_pm_ops,
+       },
+};
+
+static int __init mtk_pinctrl_init(void)
+{
+       return platform_driver_register(&mtk_pinctrl_driver);
+}
+arch_initcall(mtk_pinctrl_init);
drivers/pinctrl/mediatek/pinctrl-mtk-mt8516.h new file +1182 -1
new file mode 100644
index 000000000000..f7a4c6e4a026
@@ -0,0 +1,1182 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2019 MediaTek Inc.
+ */
+#ifndef __PINCTRL_MTK_MT8516_H
+#define __PINCTRL_MTK_MT8516_H
+
+#include <linux/pinctrl/pinctrl.h>
+#include "pinctrl-mtk-common.h"
+
+static const struct mtk_desc_pin mtk_pins_mt8516[] = {
+       MTK_PIN(
+               PINCTRL_PIN(0, "EINT0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 0),
+               MTK_FUNCTION(0, "GPIO0"),
+               MTK_FUNCTION(1, "PWM_B"),
+               MTK_FUNCTION(3, "I2S2_BCK"),
+               MTK_FUNCTION(4, "EXT_TXD0"),
+               MTK_FUNCTION(6, "SQICS"),
+               MTK_FUNCTION(7, "DBG_MON_A[6]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(1, "EINT1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 1),
+               MTK_FUNCTION(0, "GPIO1"),
+               MTK_FUNCTION(1, "PWM_C"),
+               MTK_FUNCTION(3, "I2S2_DI"),
+               MTK_FUNCTION(4, "EXT_TXD1"),
+               MTK_FUNCTION(5, "CONN_MCU_TDO"),
+               MTK_FUNCTION(6, "SQISO"),
+               MTK_FUNCTION(7, "DBG_MON_A[7]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(2, "EINT2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 2),
+               MTK_FUNCTION(0, "GPIO2"),
+               MTK_FUNCTION(1, "CLKM0"),
+               MTK_FUNCTION(3, "I2S2_LRCK"),
+               MTK_FUNCTION(4, "EXT_TXD2"),
+               MTK_FUNCTION(5, "CONN_MCU_DBGACK_N"),
+               MTK_FUNCTION(6, "SQISI"),
+               MTK_FUNCTION(7, "DBG_MON_A[8]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(3, "EINT3"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 3),
+               MTK_FUNCTION(0, "GPIO3"),
+               MTK_FUNCTION(1, "CLKM1"),
+               MTK_FUNCTION(3, "SPI_MI"),
+               MTK_FUNCTION(4, "EXT_TXD3"),
+               MTK_FUNCTION(5, "CONN_MCU_DBGI_N"),
+               MTK_FUNCTION(6, "SQIWP"),
+               MTK_FUNCTION(7, "DBG_MON_A[9]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(4, "EINT4"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 4),
+               MTK_FUNCTION(0, "GPIO4"),
+               MTK_FUNCTION(1, "CLKM2"),
+               MTK_FUNCTION(3, "SPI_MO"),
+               MTK_FUNCTION(4, "EXT_TXC"),
+               MTK_FUNCTION(5, "CONN_MCU_TCK"),
+               MTK_FUNCTION(6, "CONN_MCU_AICE_JCKC"),
+               MTK_FUNCTION(7, "DBG_MON_A[10]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(5, "EINT5"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 5),
+               MTK_FUNCTION(0, "GPIO5"),
+               MTK_FUNCTION(1, "UCTS2"),
+               MTK_FUNCTION(3, "SPI_CSB"),
+               MTK_FUNCTION(4, "EXT_RXER"),
+               MTK_FUNCTION(5, "CONN_MCU_TDI"),
+               MTK_FUNCTION(6, "CONN_TEST_CK"),
+               MTK_FUNCTION(7, "DBG_MON_A[11]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(6, "EINT6"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 6),
+               MTK_FUNCTION(0, "GPIO6"),
+               MTK_FUNCTION(1, "URTS2"),
+               MTK_FUNCTION(3, "SPI_CLK"),
+               MTK_FUNCTION(4, "EXT_RXC"),
+               MTK_FUNCTION(5, "CONN_MCU_TRST_B"),
+               MTK_FUNCTION(7, "DBG_MON_A[12]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(7, "EINT7"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 7),
+               MTK_FUNCTION(0, "GPIO7"),
+               MTK_FUNCTION(1, "SQIRST"),
+               MTK_FUNCTION(3, "SDA1_0"),
+               MTK_FUNCTION(4, "EXT_RXDV"),
+               MTK_FUNCTION(5, "CONN_MCU_TMS"),
+               MTK_FUNCTION(6, "CONN_MCU_AICE_JMSC"),
+               MTK_FUNCTION(7, "DBG_MON_A[13]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(8, "EINT8"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 8),
+               MTK_FUNCTION(0, "GPIO8"),
+               MTK_FUNCTION(1, "SQICK"),
+               MTK_FUNCTION(2, "CLKM3"),
+               MTK_FUNCTION(3, "SCL1_0"),
+               MTK_FUNCTION(4, "EXT_RXD0"),
+               MTK_FUNCTION(5, "ANT_SEL0"),
+               MTK_FUNCTION(7, "DBG_MON_A[14]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(9, "EINT9"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 9),
+               MTK_FUNCTION(0, "GPIO9"),
+               MTK_FUNCTION(1, "CLKM4"),
+               MTK_FUNCTION(2, "SDA2_0"),
+               MTK_FUNCTION(3, "EXT_FRAME_SYNC"),
+               MTK_FUNCTION(4, "EXT_RXD1"),
+               MTK_FUNCTION(5, "ANT_SEL1"),
+               MTK_FUNCTION(7, "DBG_MON_A[15]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(10, "EINT10"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 10),
+               MTK_FUNCTION(0, "GPIO10"),
+               MTK_FUNCTION(1, "CLKM5"),
+               MTK_FUNCTION(2, "SCL2_0"),
+               MTK_FUNCTION(3, "EXT_FRAME_SYNC"),
+               MTK_FUNCTION(4, "EXT_RXD2"),
+               MTK_FUNCTION(5, "ANT_SEL2"),
+               MTK_FUNCTION(7, "DBG_MON_A[16]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(11, "EINT11"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 11),
+               MTK_FUNCTION(0, "GPIO11"),
+               MTK_FUNCTION(1, "CLKM4"),
+               MTK_FUNCTION(2, "PWM_C"),
+               MTK_FUNCTION(3, "CONN_TEST_CK"),
+               MTK_FUNCTION(4, "ANT_SEL3"),
+               MTK_FUNCTION(6, "EXT_RXD3"),
+               MTK_FUNCTION(7, "DBG_MON_A[17]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(12, "EINT12"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 12),
+               MTK_FUNCTION(0, "GPIO12"),
+               MTK_FUNCTION(1, "CLKM5"),
+               MTK_FUNCTION(2, "PWM_A"),
+               MTK_FUNCTION(3, "SPDIF_OUT"),
+               MTK_FUNCTION(4, "ANT_SEL4"),
+               MTK_FUNCTION(6, "EXT_TXEN"),
+               MTK_FUNCTION(7, "DBG_MON_A[18]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(13, "EINT13"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 13),
+               MTK_FUNCTION(0, "GPIO13"),
+               MTK_FUNCTION(3, "TSF_IN"),
+               MTK_FUNCTION(4, "ANT_SEL5"),
+               MTK_FUNCTION(6, "SPDIF_IN"),
+               MTK_FUNCTION(7, "DBG_MON_A[19]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(14, "EINT14"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 14),
+               MTK_FUNCTION(0, "GPIO14"),
+               MTK_FUNCTION(2, "I2S_8CH_DO1"),
+               MTK_FUNCTION(3, "TDM_RX_MCK"),
+               MTK_FUNCTION(4, "ANT_SEL1"),
+               MTK_FUNCTION(5, "CONN_MCU_DBGACK_N"),
+               MTK_FUNCTION(6, "NCLE"),
+               MTK_FUNCTION(7, "DBG_MON_B[8]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(15, "EINT15"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 15),
+               MTK_FUNCTION(0, "GPIO15"),
+               MTK_FUNCTION(2, "I2S_8CH_LRCK"),
+               MTK_FUNCTION(3, "TDM_RX_BCK"),
+               MTK_FUNCTION(4, "ANT_SEL2"),
+               MTK_FUNCTION(5, "CONN_MCU_DBGI_N"),
+               MTK_FUNCTION(6, "NCEB1"),
+               MTK_FUNCTION(7, "DBG_MON_B[9]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(16, "EINT16"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 16),
+               MTK_FUNCTION(0, "GPIO16"),
+               MTK_FUNCTION(2, "I2S_8CH_BCK"),
+               MTK_FUNCTION(3, "TDM_RX_LRCK"),
+               MTK_FUNCTION(4, "ANT_SEL3"),
+               MTK_FUNCTION(5, "CONN_MCU_TRST_B"),
+               MTK_FUNCTION(6, "NCEB0"),
+               MTK_FUNCTION(7, "DBG_MON_B[10]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(17, "EINT17"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 17),
+               MTK_FUNCTION(0, "GPIO17"),
+               MTK_FUNCTION(2, "I2S_8CH_MCK"),
+               MTK_FUNCTION(3, "TDM_RX_DI"),
+               MTK_FUNCTION(4, "IDDIG"),
+               MTK_FUNCTION(5, "ANT_SEL4"),
+               MTK_FUNCTION(6, "NREB"),
+               MTK_FUNCTION(7, "DBG_MON_B[11]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(18, "EINT18"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 18),
+               MTK_FUNCTION(0, "GPIO18"),
+               MTK_FUNCTION(2, "USB_DRVVBUS"),
+               MTK_FUNCTION(3, "I2S3_LRCK"),
+               MTK_FUNCTION(4, "CLKM1"),
+               MTK_FUNCTION(5, "ANT_SEL3"),
+               MTK_FUNCTION(6, "I2S2_BCK"),
+               MTK_FUNCTION(7, "DBG_MON_A[20]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(19, "EINT19"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 19),
+               MTK_FUNCTION(0, "GPIO19"),
+               MTK_FUNCTION(1, "UCTS1"),
+               MTK_FUNCTION(2, "IDDIG"),
+               MTK_FUNCTION(3, "I2S3_BCK"),
+               MTK_FUNCTION(4, "CLKM2"),
+               MTK_FUNCTION(5, "ANT_SEL4"),
+               MTK_FUNCTION(6, "I2S2_DI"),
+               MTK_FUNCTION(7, "DBG_MON_A[21]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(20, "EINT20"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 20),
+               MTK_FUNCTION(0, "GPIO20"),
+               MTK_FUNCTION(1, "URTS1"),
+               MTK_FUNCTION(3, "I2S3_DO"),
+               MTK_FUNCTION(4, "CLKM3"),
+               MTK_FUNCTION(5, "ANT_SEL5"),
+               MTK_FUNCTION(6, "I2S2_LRCK"),
+               MTK_FUNCTION(7, "DBG_MON_A[22]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(21, "EINT21"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 21),
+               MTK_FUNCTION(0, "GPIO21"),
+               MTK_FUNCTION(1, "NRNB"),
+               MTK_FUNCTION(2, "ANT_SEL0"),
+               MTK_FUNCTION(3, "I2S_8CH_DO4"),
+               MTK_FUNCTION(7, "DBG_MON_B[31]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(22, "EINT22"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 22),
+               MTK_FUNCTION(0, "GPIO22"),
+               MTK_FUNCTION(2, "I2S_8CH_DO2"),
+               MTK_FUNCTION(3, "TSF_IN"),
+               MTK_FUNCTION(4, "USB_DRVVBUS"),
+               MTK_FUNCTION(5, "SPDIF_OUT"),
+               MTK_FUNCTION(6, "NRE_C"),
+               MTK_FUNCTION(7, "DBG_MON_B[12]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(23, "EINT23"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 23),
+               MTK_FUNCTION(0, "GPIO23"),
+               MTK_FUNCTION(2, "I2S_8CH_DO3"),
+               MTK_FUNCTION(3, "CLKM0"),
+               MTK_FUNCTION(4, "IR"),
+               MTK_FUNCTION(5, "SPDIF_IN"),
+               MTK_FUNCTION(6, "NDQS_C"),
+               MTK_FUNCTION(7, "DBG_MON_B[13]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(24, "EINT24"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 24),
+               MTK_FUNCTION(0, "GPIO24"),
+               MTK_FUNCTION(3, "ANT_SEL1"),
+               MTK_FUNCTION(4, "UCTS2"),
+               MTK_FUNCTION(5, "PWM_A"),
+               MTK_FUNCTION(6, "I2S0_MCK"),
+               MTK_FUNCTION(7, "DBG_MON_A[0]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(25, "EINT25"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 25),
+               MTK_FUNCTION(0, "GPIO25"),
+               MTK_FUNCTION(3, "ANT_SEL0"),
+               MTK_FUNCTION(4, "URTS2"),
+               MTK_FUNCTION(5, "PWM_B"),
+               MTK_FUNCTION(6, "I2S_8CH_MCK"),
+               MTK_FUNCTION(7, "DBG_MON_A[1]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(26, "PWRAP_SPI0_MI"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 26),
+               MTK_FUNCTION(0, "GPIO26"),
+               MTK_FUNCTION(1, "PWRAP_SPI0_MO"),
+               MTK_FUNCTION(2, "PWRAP_SPI0_MI")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(27, "PWRAP_SPI0_MO"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 27),
+               MTK_FUNCTION(0, "GPIO27"),
+               MTK_FUNCTION(1, "PWRAP_SPI0_MI"),
+               MTK_FUNCTION(2, "PWRAP_SPI0_MO")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(28, "PWRAP_INT"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 28),
+               MTK_FUNCTION(0, "GPIO28"),
+               MTK_FUNCTION(1, "I2S0_MCK"),
+               MTK_FUNCTION(4, "I2S_8CH_MCK"),
+               MTK_FUNCTION(5, "I2S2_MCK"),
+               MTK_FUNCTION(6, "I2S3_MCK")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(29, "PWRAP_SPI0_CK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 29),
+               MTK_FUNCTION(0, "GPIO29"),
+               MTK_FUNCTION(1, "PWRAP_SPI0_CK")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(30, "PWRAP_SPI0_CSN"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 30),
+               MTK_FUNCTION(0, "GPIO30"),
+               MTK_FUNCTION(1, "PWRAP_SPI0_CSN")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(31, "RTC32K_CK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 31),
+               MTK_FUNCTION(0, "GPIO31"),
+               MTK_FUNCTION(1, "RTC32K_CK")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(32, "WATCHDOG"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 32),
+               MTK_FUNCTION(0, "GPIO32"),
+               MTK_FUNCTION(1, "WATCHDOG")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(33, "SRCLKENA"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 33),
+               MTK_FUNCTION(0, "GPIO33"),
+               MTK_FUNCTION(1, "SRCLKENA0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(34, "URXD2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 34),
+               MTK_FUNCTION(0, "GPIO34"),
+               MTK_FUNCTION(1, "URXD2"),
+               MTK_FUNCTION(3, "UTXD2"),
+               MTK_FUNCTION(4, "DBG_SCL"),
+               MTK_FUNCTION(6, "I2S2_MCK"),
+               MTK_FUNCTION(7, "DBG_MON_B[0]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(35, "UTXD2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 35),
+               MTK_FUNCTION(0, "GPIO35"),
+               MTK_FUNCTION(1, "UTXD2"),
+               MTK_FUNCTION(3, "URXD2"),
+               MTK_FUNCTION(4, "DBG_SDA"),
+               MTK_FUNCTION(6, "I2S3_MCK"),
+               MTK_FUNCTION(7, "DBG_MON_B[1]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(36, "MRG_CLK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 36),
+               MTK_FUNCTION(0, "GPIO36"),
+               MTK_FUNCTION(1, "MRG_CLK"),
+               MTK_FUNCTION(3, "I2S0_BCK"),
+               MTK_FUNCTION(4, "I2S3_BCK"),
+               MTK_FUNCTION(5, "PCM0_CLK"),
+               MTK_FUNCTION(6, "IR"),
+               MTK_FUNCTION(7, "DBG_MON_A[2]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(37, "MRG_SYNC"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 37),
+               MTK_FUNCTION(0, "GPIO37"),
+               MTK_FUNCTION(1, "MRG_SYNC"),
+               MTK_FUNCTION(3, "I2S0_LRCK"),
+               MTK_FUNCTION(4, "I2S3_LRCK"),
+               MTK_FUNCTION(5, "PCM0_SYNC"),
+               MTK_FUNCTION(6, "EXT_COL"),
+               MTK_FUNCTION(7, "DBG_MON_A[3]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(38, "MRG_DI"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 38),
+               MTK_FUNCTION(0, "GPIO38"),
+               MTK_FUNCTION(1, "MRG_DI"),
+               MTK_FUNCTION(3, "I2S0_DI"),
+               MTK_FUNCTION(4, "I2S3_DO"),
+               MTK_FUNCTION(5, "PCM0_DI"),
+               MTK_FUNCTION(6, "EXT_MDIO"),
+               MTK_FUNCTION(7, "DBG_MON_A[4]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(39, "MRG_DO"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 39),
+               MTK_FUNCTION(0, "GPIO39"),
+               MTK_FUNCTION(1, "MRG_DO"),
+               MTK_FUNCTION(3, "I2S0_MCK"),
+               MTK_FUNCTION(4, "I2S3_MCK"),
+               MTK_FUNCTION(5, "PCM0_DO"),
+               MTK_FUNCTION(6, "EXT_MDC"),
+               MTK_FUNCTION(7, "DBG_MON_A[5]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(40, "KPROW0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 40),
+               MTK_FUNCTION(0, "GPIO40"),
+               MTK_FUNCTION(1, "KPROW0"),
+               MTK_FUNCTION(7, "DBG_MON_B[4]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(41, "KPROW1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 41),
+               MTK_FUNCTION(0, "GPIO41"),
+               MTK_FUNCTION(1, "KPROW1"),
+               MTK_FUNCTION(2, "IDDIG"),
+               MTK_FUNCTION(3, "EXT_FRAME_SYNC"),
+               MTK_FUNCTION(7, "DBG_MON_B[5]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(42, "KPCOL0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 42),
+               MTK_FUNCTION(0, "GPIO42"),
+               MTK_FUNCTION(1, "KPCOL0"),
+               MTK_FUNCTION(7, "DBG_MON_B[6]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(43, "KPCOL1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 43),
+               MTK_FUNCTION(0, "GPIO43"),
+               MTK_FUNCTION(1, "KPCOL1"),
+               MTK_FUNCTION(2, "USB_DRVVBUS"),
+               MTK_FUNCTION(3, "EXT_FRAME_SYNC"),
+               MTK_FUNCTION(4, "TSF_IN"),
+               MTK_FUNCTION(7, "DBG_MON_B[7]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(44, "JTMS"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 44),
+               MTK_FUNCTION(0, "GPIO44"),
+               MTK_FUNCTION(1, "JTMS"),
+               MTK_FUNCTION(2, "CONN_MCU_TMS"),
+               MTK_FUNCTION(3, "CONN_MCU_AICE_JMSC")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(45, "JTCK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 45),
+               MTK_FUNCTION(0, "GPIO45"),
+               MTK_FUNCTION(1, "JTCK"),
+               MTK_FUNCTION(2, "CONN_MCU_TCK"),
+               MTK_FUNCTION(3, "CONN_MCU_AICE_JCKC")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(46, "JTDI"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 46),
+               MTK_FUNCTION(0, "GPIO46"),
+               MTK_FUNCTION(1, "JTDI"),
+               MTK_FUNCTION(2, "CONN_MCU_TDI")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(47, "JTDO"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 47),
+               MTK_FUNCTION(0, "GPIO47"),
+               MTK_FUNCTION(1, "JTDO"),
+               MTK_FUNCTION(2, "CONN_MCU_TDO")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(48, "SPI_CS"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 48),
+               MTK_FUNCTION(0, "GPIO48"),
+               MTK_FUNCTION(1, "SPI_CSB"),
+               MTK_FUNCTION(3, "I2S0_DI"),
+               MTK_FUNCTION(4, "I2S2_BCK"),
+               MTK_FUNCTION(7, "DBG_MON_A[23]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(49, "SPI_CK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 49),
+               MTK_FUNCTION(0, "GPIO49"),
+               MTK_FUNCTION(1, "SPI_CLK"),
+               MTK_FUNCTION(3, "I2S0_LRCK"),
+               MTK_FUNCTION(4, "I2S2_DI"),
+               MTK_FUNCTION(7, "DBG_MON_A[24]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(50, "SPI_MI"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 50),
+               MTK_FUNCTION(0, "GPIO50"),
+               MTK_FUNCTION(1, "SPI_MI"),
+               MTK_FUNCTION(2, "SPI_MO"),
+               MTK_FUNCTION(3, "I2S0_BCK"),
+               MTK_FUNCTION(4, "I2S2_LRCK"),
+               MTK_FUNCTION(7, "DBG_MON_A[25]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(51, "SPI_MO"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 51),
+               MTK_FUNCTION(0, "GPIO51"),
+               MTK_FUNCTION(1, "SPI_MO"),
+               MTK_FUNCTION(2, "SPI_MI"),
+               MTK_FUNCTION(3, "I2S0_MCK"),
+               MTK_FUNCTION(4, "I2S2_MCK"),
+               MTK_FUNCTION(7, "DBG_MON_A[26]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(52, "SDA1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 52),
+               MTK_FUNCTION(0, "GPIO52"),
+               MTK_FUNCTION(1, "SDA1_0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(53, "SCL1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 53),
+               MTK_FUNCTION(0, "GPIO53"),
+               MTK_FUNCTION(1, "SCL1_0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(54, "GPIO54"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 54),
+               MTK_FUNCTION(0, "GPIO54"),
+               MTK_FUNCTION(2, "PWM_B"),
+               MTK_FUNCTION(7, "DBG_MON_B[2]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(55, "I2S_DATA_IN"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 55),
+               MTK_FUNCTION(0, "GPIO55"),
+               MTK_FUNCTION(1, "I2S0_DI"),
+               MTK_FUNCTION(2, "UCTS0"),
+               MTK_FUNCTION(3, "I2S3_DO"),
+               MTK_FUNCTION(4, "I2S_8CH_DO1"),
+               MTK_FUNCTION(5, "PWM_A"),
+               MTK_FUNCTION(6, "I2S2_BCK"),
+               MTK_FUNCTION(7, "DBG_MON_A[28]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(56, "I2S_LRCK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 56),
+               MTK_FUNCTION(0, "GPIO56"),
+               MTK_FUNCTION(1, "I2S0_LRCK"),
+               MTK_FUNCTION(3, "I2S3_LRCK"),
+               MTK_FUNCTION(4, "I2S_8CH_LRCK"),
+               MTK_FUNCTION(5, "PWM_B"),
+               MTK_FUNCTION(6, "I2S2_DI"),
+               MTK_FUNCTION(7, "DBG_MON_A[29]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(57, "I2S_BCK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 57),
+               MTK_FUNCTION(0, "GPIO57"),
+               MTK_FUNCTION(1, "I2S0_BCK"),
+               MTK_FUNCTION(2, "URTS0"),
+               MTK_FUNCTION(3, "I2S3_BCK"),
+               MTK_FUNCTION(4, "I2S_8CH_BCK"),
+               MTK_FUNCTION(5, "PWM_C"),
+               MTK_FUNCTION(6, "I2S2_LRCK"),
+               MTK_FUNCTION(7, "DBG_MON_A[30]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(58, "SDA0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 58),
+               MTK_FUNCTION(0, "GPIO58"),
+               MTK_FUNCTION(1, "SDA0_0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(59, "SCL0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 59),
+               MTK_FUNCTION(0, "GPIO59"),
+               MTK_FUNCTION(1, "SCL0_0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(60, "SDA2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 60),
+               MTK_FUNCTION(0, "GPIO60"),
+               MTK_FUNCTION(1, "SDA2_0"),
+               MTK_FUNCTION(2, "PWM_B")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(61, "SCL2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 61),
+               MTK_FUNCTION(0, "GPIO61"),
+               MTK_FUNCTION(1, "SCL2_0"),
+               MTK_FUNCTION(2, "PWM_C")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(62, "URXD0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 62),
+               MTK_FUNCTION(0, "GPIO62"),
+               MTK_FUNCTION(1, "URXD0"),
+               MTK_FUNCTION(2, "UTXD0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(63, "UTXD0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 63),
+               MTK_FUNCTION(0, "GPIO63"),
+               MTK_FUNCTION(1, "UTXD0"),
+               MTK_FUNCTION(2, "URXD0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(64, "URXD1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 64),
+               MTK_FUNCTION(0, "GPIO64"),
+               MTK_FUNCTION(1, "URXD1"),
+               MTK_FUNCTION(2, "UTXD1"),
+               MTK_FUNCTION(7, "DBG_MON_A[27]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(65, "UTXD1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 65),
+               MTK_FUNCTION(0, "GPIO65"),
+               MTK_FUNCTION(1, "UTXD1"),
+               MTK_FUNCTION(2, "URXD1"),
+               MTK_FUNCTION(7, "DBG_MON_A[31]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(66, "LCM_RST"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 66),
+               MTK_FUNCTION(0, "GPIO66"),
+               MTK_FUNCTION(1, "LCM_RST"),
+               MTK_FUNCTION(3, "I2S0_MCK"),
+               MTK_FUNCTION(7, "DBG_MON_B[3]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(67, "GPIO67"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 67),
+               MTK_FUNCTION(0, "GPIO67"),
+               MTK_FUNCTION(3, "I2S_8CH_MCK"),
+               MTK_FUNCTION(7, "DBG_MON_B[14]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(68, "MSDC2_CMD"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 68),
+               MTK_FUNCTION(0, "GPIO68"),
+               MTK_FUNCTION(1, "MSDC2_CMD"),
+               MTK_FUNCTION(2, "I2S_8CH_DO4"),
+               MTK_FUNCTION(3, "SDA1_0"),
+               MTK_FUNCTION(5, "USB_SDA"),
+               MTK_FUNCTION(6, "I2S3_BCK"),
+               MTK_FUNCTION(7, "DBG_MON_B[15]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(69, "MSDC2_CLK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 69),
+               MTK_FUNCTION(0, "GPIO69"),
+               MTK_FUNCTION(1, "MSDC2_CLK"),
+               MTK_FUNCTION(2, "I2S_8CH_DO3"),
+               MTK_FUNCTION(3, "SCL1_0"),
+               MTK_FUNCTION(5, "USB_SCL"),
+               MTK_FUNCTION(6, "I2S3_LRCK"),
+               MTK_FUNCTION(7, "DBG_MON_B[16]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(70, "MSDC2_DAT0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 70),
+               MTK_FUNCTION(0, "GPIO70"),
+               MTK_FUNCTION(1, "MSDC2_DAT0"),
+               MTK_FUNCTION(2, "I2S_8CH_DO2"),
+               MTK_FUNCTION(5, "UTXD0"),
+               MTK_FUNCTION(6, "I2S3_DO"),
+               MTK_FUNCTION(7, "DBG_MON_B[17]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(71, "MSDC2_DAT1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 71),
+               MTK_FUNCTION(0, "GPIO71"),
+               MTK_FUNCTION(1, "MSDC2_DAT1"),
+               MTK_FUNCTION(2, "I2S_8CH_DO1"),
+               MTK_FUNCTION(3, "PWM_A"),
+               MTK_FUNCTION(4, "I2S3_MCK"),
+               MTK_FUNCTION(5, "URXD0"),
+               MTK_FUNCTION(6, "PWM_B"),
+               MTK_FUNCTION(7, "DBG_MON_B[18]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(72, "MSDC2_DAT2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 72),
+               MTK_FUNCTION(0, "GPIO72"),
+               MTK_FUNCTION(1, "MSDC2_DAT2"),
+               MTK_FUNCTION(2, "I2S_8CH_LRCK"),
+               MTK_FUNCTION(3, "SDA2_0"),
+               MTK_FUNCTION(5, "UTXD1"),
+               MTK_FUNCTION(6, "PWM_C"),
+               MTK_FUNCTION(7, "DBG_MON_B[19]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(73, "MSDC2_DAT3"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 73),
+               MTK_FUNCTION(0, "GPIO73"),
+               MTK_FUNCTION(1, "MSDC2_DAT3"),
+               MTK_FUNCTION(2, "I2S_8CH_BCK"),
+               MTK_FUNCTION(3, "SCL2_0"),
+               MTK_FUNCTION(4, "EXT_FRAME_SYNC"),
+               MTK_FUNCTION(5, "URXD1"),
+               MTK_FUNCTION(6, "PWM_A"),
+               MTK_FUNCTION(7, "DBG_MON_B[20]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(74, "TDN3"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 74),
+               MTK_FUNCTION(0, "GPIO74"),
+               MTK_FUNCTION(1, "TDN3")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(75, "TDP3"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 75),
+               MTK_FUNCTION(0, "GPIO75"),
+               MTK_FUNCTION(1, "TDP3")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(76, "TDN2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 76),
+               MTK_FUNCTION(0, "GPIO76"),
+               MTK_FUNCTION(1, "TDN2")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(77, "TDP2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 77),
+               MTK_FUNCTION(0, "GPIO77"),
+               MTK_FUNCTION(1, "TDP2")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(78, "TCN"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 78),
+               MTK_FUNCTION(0, "GPIO78"),
+               MTK_FUNCTION(1, "TCN")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(79, "TCP"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 79),
+               MTK_FUNCTION(0, "GPIO79"),
+               MTK_FUNCTION(1, "TCP")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(80, "TDN1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 80),
+               MTK_FUNCTION(0, "GPIO80"),
+               MTK_FUNCTION(1, "TDN1")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(81, "TDP1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 81),
+               MTK_FUNCTION(0, "GPIO81"),
+               MTK_FUNCTION(1, "TDP1")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(82, "TDN0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 82),
+               MTK_FUNCTION(0, "GPIO82"),
+               MTK_FUNCTION(1, "TDN0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(83, "TDP0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 83),
+               MTK_FUNCTION(0, "GPIO83"),
+               MTK_FUNCTION(1, "TDP0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(84, "RDN0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 84),
+               MTK_FUNCTION(0, "GPIO84"),
+               MTK_FUNCTION(1, "RDN0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(85, "RDP0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 85),
+               MTK_FUNCTION(0, "GPIO85"),
+               MTK_FUNCTION(1, "RDP0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(86, "RDN1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 86),
+               MTK_FUNCTION(0, "GPIO86"),
+               MTK_FUNCTION(1, "RDN1")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(87, "RDP1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 87),
+               MTK_FUNCTION(0, "GPIO87"),
+               MTK_FUNCTION(1, "RDP1")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(88, "RCN"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 88),
+               MTK_FUNCTION(0, "GPIO88"),
+               MTK_FUNCTION(1, "RCN")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(89, "RCP"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 89),
+               MTK_FUNCTION(0, "GPIO89"),
+               MTK_FUNCTION(1, "RCP")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(90, "RDN2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 90),
+               MTK_FUNCTION(0, "GPIO90"),
+               MTK_FUNCTION(1, "RDN2"),
+               MTK_FUNCTION(2, "CMDAT8")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(91, "RDP2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 91),
+               MTK_FUNCTION(0, "GPIO91"),
+               MTK_FUNCTION(1, "RDP2"),
+               MTK_FUNCTION(2, "CMDAT9")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(92, "RDN3"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 92),
+               MTK_FUNCTION(0, "GPIO92"),
+               MTK_FUNCTION(1, "RDN3"),
+               MTK_FUNCTION(2, "CMDAT4")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(93, "RDP3"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 93),
+               MTK_FUNCTION(0, "GPIO93"),
+               MTK_FUNCTION(1, "RDP3"),
+               MTK_FUNCTION(2, "CMDAT5")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(94, "RCN_A"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 94),
+               MTK_FUNCTION(0, "GPIO94"),
+               MTK_FUNCTION(1, "RCN_A"),
+               MTK_FUNCTION(2, "CMDAT6")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(95, "RCP_A"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 95),
+               MTK_FUNCTION(0, "GPIO95"),
+               MTK_FUNCTION(1, "RCP_A"),
+               MTK_FUNCTION(2, "CMDAT7")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(96, "RDN1_A"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 96),
+               MTK_FUNCTION(0, "GPIO96"),
+               MTK_FUNCTION(1, "RDN1_A"),
+               MTK_FUNCTION(2, "CMDAT2"),
+               MTK_FUNCTION(3, "CMCSD2")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(97, "RDP1_A"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 97),
+               MTK_FUNCTION(0, "GPIO97"),
+               MTK_FUNCTION(1, "RDP1_A"),
+               MTK_FUNCTION(2, "CMDAT3"),
+               MTK_FUNCTION(3, "CMCSD3")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(98, "RDN0_A"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 98),
+               MTK_FUNCTION(0, "GPIO98"),
+               MTK_FUNCTION(1, "RDN0_A"),
+               MTK_FUNCTION(2, "CMHSYNC")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(99, "RDP0_A"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 99),
+               MTK_FUNCTION(0, "GPIO99"),
+               MTK_FUNCTION(1, "RDP0_A"),
+               MTK_FUNCTION(2, "CMVSYNC")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(100, "CMDAT0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 100),
+               MTK_FUNCTION(0, "GPIO100"),
+               MTK_FUNCTION(1, "CMDAT0"),
+               MTK_FUNCTION(2, "CMCSD0"),
+               MTK_FUNCTION(3, "ANT_SEL2"),
+               MTK_FUNCTION(5, "TDM_RX_MCK"),
+               MTK_FUNCTION(7, "DBG_MON_B[21]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(101, "CMDAT1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 101),
+               MTK_FUNCTION(0, "GPIO101"),
+               MTK_FUNCTION(1, "CMDAT1"),
+               MTK_FUNCTION(2, "CMCSD1"),
+               MTK_FUNCTION(3, "ANT_SEL3"),
+               MTK_FUNCTION(4, "CMFLASH"),
+               MTK_FUNCTION(5, "TDM_RX_BCK"),
+               MTK_FUNCTION(7, "DBG_MON_B[22]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(102, "CMMCLK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 102),
+               MTK_FUNCTION(0, "GPIO102"),
+               MTK_FUNCTION(1, "CMMCLK"),
+               MTK_FUNCTION(3, "ANT_SEL4"),
+               MTK_FUNCTION(5, "TDM_RX_LRCK"),
+               MTK_FUNCTION(7, "DBG_MON_B[23]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(103, "CMPCLK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 103),
+               MTK_FUNCTION(0, "GPIO103"),
+               MTK_FUNCTION(1, "CMPCLK"),
+               MTK_FUNCTION(2, "CMCSK"),
+               MTK_FUNCTION(3, "ANT_SEL5"),
+               MTK_FUNCTION(5, " TDM_RX_DI"),
+               MTK_FUNCTION(7, "DBG_MON_B[24]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(104, "MSDC1_CMD"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 104),
+               MTK_FUNCTION(0, "GPIO104"),
+               MTK_FUNCTION(1, "MSDC1_CMD"),
+               MTK_FUNCTION(4, "SQICS"),
+               MTK_FUNCTION(7, "DBG_MON_B[25]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(105, "MSDC1_CLK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 105),
+               MTK_FUNCTION(0, "GPIO105"),
+               MTK_FUNCTION(1, "MSDC1_CLK"),
+               MTK_FUNCTION(4, "SQISO"),
+               MTK_FUNCTION(7, "DBG_MON_B[26]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(106, "MSDC1_DAT0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 106),
+               MTK_FUNCTION(0, "GPIO106"),
+               MTK_FUNCTION(1, "MSDC1_DAT0"),
+               MTK_FUNCTION(4, "SQISI"),
+               MTK_FUNCTION(7, "DBG_MON_B[27]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(107, "MSDC1_DAT1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 107),
+               MTK_FUNCTION(0, "GPIO107"),
+               MTK_FUNCTION(1, "MSDC1_DAT1"),
+               MTK_FUNCTION(4, "SQIWP"),
+               MTK_FUNCTION(7, "DBG_MON_B[28]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(108, "MSDC1_DAT2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 108),
+               MTK_FUNCTION(0, "GPIO108"),
+               MTK_FUNCTION(1, "MSDC1_DAT2"),
+               MTK_FUNCTION(4, "SQIRST"),
+               MTK_FUNCTION(7, "DBG_MON_B[29]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(109, "MSDC1_DAT3"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 109),
+               MTK_FUNCTION(0, "GPIO109"),
+               MTK_FUNCTION(1, "MSDC1_DAT3"),
+               MTK_FUNCTION(4, "SQICK"), /* WIP */
+               MTK_FUNCTION(7, "DBG_MON_B[30]")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(110, "MSDC0_DAT7"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 110),
+               MTK_FUNCTION(0, "GPIO110"),
+               MTK_FUNCTION(1, "MSDC0_DAT7"),
+               MTK_FUNCTION(4, "NLD7")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(111, "MSDC0_DAT6"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 111),
+               MTK_FUNCTION(0, "GPIO111"),
+               MTK_FUNCTION(1, "MSDC0_DAT6"),
+               MTK_FUNCTION(4, "NLD6")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(112, "MSDC0_DAT5"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 112),
+               MTK_FUNCTION(0, "GPIO112"),
+               MTK_FUNCTION(1, "MSDC0_DAT5"),
+               MTK_FUNCTION(4, "NLD4")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(113, "MSDC0_DAT4"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 113),
+               MTK_FUNCTION(0, "GPIO113"),
+               MTK_FUNCTION(1, "MSDC0_DAT4"),
+               MTK_FUNCTION(4, "NLD3")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(114, "MSDC0_RSTB"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 114),
+               MTK_FUNCTION(0, "GPIO114"),
+               MTK_FUNCTION(1, "MSDC0_RSTB"),
+               MTK_FUNCTION(4, "NLD0")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(115, "MSDC0_CMD"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 115),
+               MTK_FUNCTION(0, "GPIO115"),
+               MTK_FUNCTION(1, "MSDC0_CMD"),
+               MTK_FUNCTION(4, "NALE")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(116, "MSDC0_CLK"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 116),
+               MTK_FUNCTION(0, "GPIO116"),
+               MTK_FUNCTION(1, "MSDC0_CLK"),
+               MTK_FUNCTION(4, "NWEB")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(117, "MSDC0_DAT3"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 117),
+               MTK_FUNCTION(0, "GPIO117"),
+               MTK_FUNCTION(1, "MSDC0_DAT3"),
+               MTK_FUNCTION(4, "NLD1")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(118, "MSDC0_DAT2"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 118),
+               MTK_FUNCTION(0, "GPIO118"),
+               MTK_FUNCTION(1, "MSDC0_DAT2"),
+               MTK_FUNCTION(4, "NLD5")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(119, "MSDC0_DAT1"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 119),
+               MTK_FUNCTION(0, "GPIO119"),
+               MTK_FUNCTION(1, "MSDC0_DAT1"),
+               MTK_FUNCTION(4, "NLD8")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(120, "MSDC0_DAT0"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 120),
+               MTK_FUNCTION(0, "GPIO120"),
+               MTK_FUNCTION(1, "MSDC0_DAT0"),
+               MTK_FUNCTION(4, "WATCHDOG"),
+               MTK_FUNCTION(5, "NLD2")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(121, "GPIO121"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 121),
+               MTK_FUNCTION(0, "GPIO121")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(122, "GPIO122"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 122),
+               MTK_FUNCTION(0, "GPIO122")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(123, "GPIO123"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 123),
+               MTK_FUNCTION(0, "GPIO123")
+       ),
+       MTK_PIN(
+               PINCTRL_PIN(124, "GPIO124"),
+               NULL, "mt8516",
+               MTK_EINT_FUNCTION(0, 124),
+               MTK_FUNCTION(0, "GPIO124")
+       ),
+};
+
+#endif /* __PINCTRL_MTK_MT8516_H */
--

2.20.1

#48 lore raw

PATCH 17/24 dt-bindings: wdog: mtk-wdt: add support for MT851

In reply to Fabien Parent

Add binding documentation of mtk-wdt for MT8516 SoC.

---
 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +1 -0
index 8682d6a93e5b..fd380eb28df5 100644
@@ -9,6 +9,7 @@ Required properties:
 	"mediatek,mt7622-wdt", "mediatek,mt6589-wdt": for MT7622
 	"mediatek,mt7623-wdt", "mediatek,mt6589-wdt": for MT7623
 	"mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629
+	"mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516
 
 - reg : Specifies base physical address and size of the registers.
 
Signature · 1 line
2.20.1
maintainer Acked-by on v1 17/24
#49 lore raw

Re: [PATCH 17/24] dt-bindings: wdog: mtk-wdt: add support for MT851

Quoted 3 lines · Fabien Parent

Add binding documentation of mtk-wdt for MT8516 SoC.

Quoted 17 lines
---
  Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 1 +
  1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +1 -0
index 8682d6a93e5b..fd380eb28df5 100644
@@ -9,6 +9,7 @@ Required properties:
  	"mediatek,mt7622-wdt", "mediatek,mt6589-wdt": for MT7622
  	"mediatek,mt7623-wdt", "mediatek,mt6589-wdt": for MT7623
  	"mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629
+	"mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516
 
  - reg : Specifies base physical address and size of the registers.
 
#51 lore raw

PATCH 18/24 dt-bindings: timer: mtk-timer: add support for MT8516

In reply to Fabien Parent

Add binding documentation of mtk-timer for MT8516 SoC.

---
 Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt +1 -0
index ff7c567a7972..74c3eadad844 100644
@@ -17,6 +17,7 @@ Required properties:
 	* "mediatek,mt8127-timer" for MT8127 compatible timers (GPT)
 	* "mediatek,mt8135-timer" for MT8135 compatible timers (GPT)
 	* "mediatek,mt8173-timer" for MT8173 compatible timers (GPT)
+	* "mediatek,mt8516-timer" for MT8516 compatible timers (GPT)
 	* "mediatek,mt6577-timer" for MT6577 and all above compatible timers (GPT)
 
 	For those SoCs that use SYST
Signature · 1 line
2.20.1
maintainer Applied
#53 lore raw

Re: [PATCH 18/24] dt-bindings: timer: mtk-timer: add support for MT8516

In reply to Fabien Parent
Quoted 6 lines · Fabien Parent

Add binding documentation of mtk-timer for MT8516 SoC.

---
 Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | 1 +
 1 file changed, 1 insertion(+)

applied to v5.1-next/dts64

Daniel let me know if you want to take it through your tree and I drop the patch.

Quoted 14 lines
Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt +1 -0
index ff7c567a7972..74c3eadad844 100644
@@ -17,6 +17,7 @@ Required properties:
 	* "mediatek,mt8127-timer" for MT8127 compatible timers (GPT)
 	* "mediatek,mt8135-timer" for MT8135 compatible timers (GPT)
 	* "mediatek,mt8173-timer" for MT8173 compatible timers (GPT)
+	* "mediatek,mt8516-timer" for MT8516 compatible timers (GPT)
 	* "mediatek,mt6577-timer" for MT6577 and all above compatible timers (GPT)
 
 	For those SoCs that use SYST
#54 lore raw

Re: [PATCH 18/24] dt-bindings: timer: mtk-timer: add support for MT8516

Quoted 5 lines · Matthias Brugger
Quoted 2 lines · Fabien Parent

Add binding documentation of mtk-timer for MT8516 SoC.

Quoted 8 lines
Quoted 4 lines
---
 Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | 1 +
 1 file changed, 1 insertion(+)

applied to v5.1-next/dts64

Daniel let me know if you want to take it through your tree and I drop the patch.

It is ok.

Quoted 13 lines
Quoted 13 lines
Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt +1 -0
index ff7c567a7972..74c3eadad844 100644
@@ -17,6 +17,7 @@ Required properties:
 	* "mediatek,mt8127-timer" for MT8127 compatible timers (GPT)
 	* "mediatek,mt8135-timer" for MT8135 compatible timers (GPT)
 	* "mediatek,mt8173-timer" for MT8173 compatible timers (GPT)
+	* "mediatek,mt8516-timer" for MT8516 compatible timers (GPT)
 	* "mediatek,mt6577-timer" for MT6577 and all above compatible timers (GPT)
 
 	For those SoCs that use SYST
Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#55 lore raw

PATCH 19/24 dt-bindings: spi: spi-mt65xx: add support for MT8516

In reply to Fabien Parent

Add binding documentation of spi-mt65xx for MT8516 SoC.

---
 Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/spi/spi-mt65xx.txt +1 -0
index 69c356767cf8..69ac5976b952 100644
@@ -10,6 +10,7 @@ Required properties:
     - mediatek,mt8135-spi: for mt8135 platforms
     - mediatek,mt8173-spi: for mt8173 platforms
     - mediatek,mt8183-spi: for mt8183 platforms
+    - "mediatek,mt8516-spi", "mediatek,mt2701-spi": for mt8516 platforms
 
 - #address-cells: should be 1.
 
Signature · 1 line
2.20.1
maintainer Applied
#57 lore raw

Re: [PATCH 19/24] dt-bindings: spi: spi-mt65xx: add support for MT8516

In reply to Fabien Parent
Quoted 7 lines · Fabien Parent

Add binding documentation of spi-mt65xx for MT8516 SoC.

---
 Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 +
 1 file changed, 1 insertion(+)

applied to v5.1-next/dts64

Mark let me know if you want to take it through your tree and I drop the patch.

Quoted 13 lines
Documentation/devicetree/bindings/spi/spi-mt65xx.txt +1 -0
index 69c356767cf8..69ac5976b952 100644
@@ -10,6 +10,7 @@ Required properties:
     - mediatek,mt8135-spi: for mt8135 platforms
     - mediatek,mt8173-spi: for mt8173 platforms
     - mediatek,mt8183-spi: for mt8183 platforms
+    - "mediatek,mt8516-spi", "mediatek,mt2701-spi": for mt8516 platforms
 
 - #address-cells: should be 1.
 
#58 lore raw

Re: [PATCH 19/24] dt-bindings: spi: spi-mt65xx: add support for MT8516

Quoted 15 lines · Matthias Brugger
Quoted 7 lines · Fabien Parent

Add binding documentation of spi-mt65xx for MT8516 SoC.

---
 Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 +
 1 file changed, 1 insertion(+)

applied to v5.1-next/dts64

Mark let me know if you want to take it through your tree and I drop the patch.

Quoted 9 lines

Documentation/devicetree/bindings/spi/spi-mt65xx.txt Required properties: · line 13

Quoted 9 lines
Documentation/devicetree/bindings/spi/spi-mt65xx.txt +1 -0
index 69c356767cf8..69ac5976b952 100644
@@ -10,6 +10,7 @@ Required properties:
     - mediatek,mt8135-spi: for mt8135 platforms
     - mediatek,mt8173-spi: for mt8173 platforms
     - mediatek,mt8183-spi: for mt8183 platforms
+    - "mediatek,mt8516-spi", "mediatek,mt2701-spi": for mt8516 platforms

Hi Fabien,
mt8516 SPI design comes from mt2712 and it's different from mt2701. Here it should compatible with mt2712.

Quoted 9 lines

Documentation/devicetree/bindings/spi/spi-mt65xx.txt Required properties:

Quoted 4 lines
Documentation/devicetree/bindings/spi/spi-mt65xx.txt +0 -0
 - #address-cells: should be 1.
 
 

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

maintainer
#59 lore raw

Re: [PATCH 19/24] dt-bindings: spi: spi-mt65xx: add support for MT8516

Quoted 16 lines · lei liu
Quoted 15 lines · Matthias Brugger
Quoted 7 lines · Fabien Parent

Add binding documentation of spi-mt65xx for MT8516 SoC.

---
 Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 +
 1 file changed, 1 insertion(+)

applied to v5.1-next/dts64

Mark let me know if you want to take it through your tree and I drop the patch.

Quoted 13 lines
Quoted 9 lines

Documentation/devicetree/bindings/spi/spi-mt65xx.txt Required properties: · line 13

Quoted 9 lines
Documentation/devicetree/bindings/spi/spi-mt65xx.txt +1 -0
index 69c356767cf8..69ac5976b952 100644
@@ -10,6 +10,7 @@ Required properties:
     - mediatek,mt8135-spi: for mt8135 platforms
     - mediatek,mt8173-spi: for mt8173 platforms
     - mediatek,mt8183-spi: for mt8183 platforms
+    - "mediatek,mt8516-spi", "mediatek,mt2701-spi": for mt8516 platforms

Hi Fabien,
mt8516 SPI design comes from mt2712 and it's different from mt2701. Here it should compatible with mt2712.

Ok, please resend. I dropped the patch for now.

Quoted 11 lines
Quoted 9 lines

Documentation/devicetree/bindings/spi/spi-mt65xx.txt Required properties:

Quoted 4 lines
Documentation/devicetree/bindings/spi/spi-mt65xx.txt +0 -0
 - #address-cells: should be 1.
 
 

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

#60 lore raw

Re: [PATCH 19/24] dt-bindings: spi: spi-mt65xx: add support for MT8516

In reply to lei liu
Quoted 17 lines · lei liu
Quoted 15 lines · Matthias Brugger
Quoted 7 lines · Fabien Parent

Add binding documentation of spi-mt65xx for MT8516 SoC.

---
 Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 +
 1 file changed, 1 insertion(+)

applied to v5.1-next/dts64

Mark let me know if you want to take it through your tree and I drop the patch.

Quoted 12 lines
Quoted 9 lines

Documentation/devicetree/bindings/spi/spi-mt65xx.txt Required properties: · line 13

Quoted 9 lines
Documentation/devicetree/bindings/spi/spi-mt65xx.txt +1 -0
index 69c356767cf8..69ac5976b952 100644
@@ -10,6 +10,7 @@ Required properties:
     - mediatek,mt8135-spi: for mt8135 platforms
     - mediatek,mt8173-spi: for mt8173 platforms
     - mediatek,mt8183-spi: for mt8183 platforms
+    - "mediatek,mt8516-spi", "mediatek,mt2701-spi": for mt8516 platforms

Hi Fabien,
mt8516 SPI design comes from mt2712 and it's different from mt2701. Here it should compatible with mt2712.

Ok, thanks. I will retry with the mt2712 compatible.

Quoted 11 lines
Quoted 9 lines

Documentation/devicetree/bindings/spi/spi-mt65xx.txt Required properties:

Quoted 4 lines
Documentation/devicetree/bindings/spi/spi-mt65xx.txt +0 -0
 - #address-cells: should be 1.
 
 

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

#61 lore raw

Re: [PATCH 19/24] dt-bindings: spi: spi-mt65xx: add support for MT8516

Quoted 31 lines · Fabien Parent
Quoted 17 lines · lei liu
Quoted 15 lines · Matthias Brugger
Quoted 7 lines · Fabien Parent

Add binding documentation of spi-mt65xx for MT8516 SoC.

---
 Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 +
 1 file changed, 1 insertion(+)

applied to v5.1-next/dts64

Mark let me know if you want to take it through your tree and I drop the patch.

Quoted 12 lines
Quoted 9 lines

Documentation/devicetree/bindings/spi/spi-mt65xx.txt Required properties: · line 13

Quoted 9 lines
Documentation/devicetree/bindings/spi/spi-mt65xx.txt +1 -0
index 69c356767cf8..69ac5976b952 100644
@@ -10,6 +10,7 @@ Required properties:
     - mediatek,mt8135-spi: for mt8135 platforms
     - mediatek,mt8173-spi: for mt8173 platforms
     - mediatek,mt8183-spi: for mt8183 platforms
+    - "mediatek,mt8516-spi", "mediatek,mt2701-spi": for mt8516 platforms

Hi Fabien,
mt8516 SPI design comes from mt2712 and it's different from mt2701. Here it should compatible with mt2712.

Quoted 2 lines

Ok, thanks. I will retry with the mt2712 compatible.

Hi, I already send mt8516 spi patch and it's applied by Mark. Please don't do it again. Thanks.

Quoted 11 lines
Quoted 11 lines
Quoted 9 lines

Documentation/devicetree/bindings/spi/spi-mt65xx.txt Required properties:

Quoted 4 lines
Documentation/devicetree/bindings/spi/spi-mt65xx.txt +0 -0
 - #address-cells: should be 1.
 
 

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

maintainer
#62 lore raw

Re: [PATCH 19/24] dt-bindings: spi: spi-mt65xx: add support for MT8516

In reply to Matthias Brugger
Quoted 11 lines · Matthias Brugger
Quoted 6 lines · Fabien Parent

Add binding documentation of spi-mt65xx for MT8516 SoC.

---
 Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 +
 1 file changed, 1 insertion(+)

applied to v5.1-next/dts64

Mark let me know if you want to take it through your tree and I drop the patch.

Yes, DT bindings generally get reviewed in the subsystem :(

maintainer
#63 lore raw

Re: [PATCH 19/24] dt-bindings: spi: spi-mt65xx: add support for MT8516

Quoted 8 lines · Mark Brown
Quoted 6 lines · Matthias Brugger
Quoted 5 lines · Fabien Parent

Add binding documentation of spi-mt65xx for MT8516 SoC.

Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 + 1 file changed, 1 insertion(+)

Quoted 7 lines
Quoted 4 lines

applied to v5.1-next/dts64

Mark let me know if you want to take it through your tree and I drop the patch.

Yes, DT bindings generally get reviewed in the subsystem :(

I already dropped it due to some comments from Lei Liu:
https://patchwork.kernel.org/patch/10867251/

Regards,
Matthias

#64 lore raw

PATCH 20/24 dt-bindings: serial: mtk-uart: add support for MT8516

In reply to Fabien Parent

Add binding documentation of mtk-uart for MT8516 SoC.

---
 Documentation/devicetree/bindings/serial/mtk-uart.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/serial/mtk-uart.txt +1 -0
index 742cb470595b..1af981f7a33b 100644
@@ -16,6 +16,7 @@ Required properties:
   * "mediatek,mt8127-uart" for MT8127 compatible UARTS
   * "mediatek,mt8135-uart" for MT8135 compatible UARTS
   * "mediatek,mt8173-uart" for MT8173 compatible UARTS
+  * "mediatek,mt8516-uart" for MT8516 compatible UARTS
   * "mediatek,mt6577-uart" for MT6577 and all of the above
 
 - reg: The base address of the UART register bank.
Signature · 1 line
2.20.1
maintainer Applied
#66 lore raw

Re: [PATCH 20/24] dt-bindings: serial: mtk-uart: add support for MT8516

In reply to Fabien Parent
Quoted 7 lines · Fabien Parent

Add binding documentation of mtk-uart for MT8516 SoC.

---
 Documentation/devicetree/bindings/serial/mtk-uart.txt | 1 +
 1 file changed, 1 insertion(+)

applied to v5.1-next/dts64

Thanks.

Quoted 13 lines
Documentation/devicetree/bindings/serial/mtk-uart.txt +1 -0
index 742cb470595b..1af981f7a33b 100644
@@ -16,6 +16,7 @@ Required properties:
   * "mediatek,mt8127-uart" for MT8127 compatible UARTS
   * "mediatek,mt8135-uart" for MT8135 compatible UARTS
   * "mediatek,mt8173-uart" for MT8173 compatible UARTS
+  * "mediatek,mt8516-uart" for MT8516 compatible UARTS
   * "mediatek,mt6577-uart" for MT6577 and all of the above
 
 - reg: The base address of the UART register bank.
#67 lore raw

PATCH 21/24 dt-bindings: irq: mtk,sysirq: add support for MT8516

In reply to Fabien Parent

Add binding documentation of mediatek,sysirq for MT8516 SoC.

---
 .../bindings/interrupt-controller/mediatek,sysirq.txt          | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt +2 -1
index c5d589108a94..deaaba70d548 100644
@@ -1,10 +1,11 @@
-+Mediatek MT65xx/MT67xx/MT81xx sysirq
++Mediatek MT65xx/MT67xx/MT81xx/MT85xx sysirq
 
 Mediatek SOCs sysirq support controllable irq inverter for each GIC SPI
 interrupt.
 
 Required properties:
 - compatible: should be
+	"mediatek,mt8516-sysirq", "mediatek,mt6577-sysirq": for MT8516
 	"mediatek,mt8173-sysirq", "mediatek,mt6577-sysirq": for MT8173
 	"mediatek,mt8135-sysirq", "mediatek,mt6577-sysirq": for MT8135
 	"mediatek,mt8127-sysirq", "mediatek,mt6577-sysirq": for MT8127
Signature · 1 line
2.20.1
maintainer Applied
#69 lore raw

Re: [PATCH 21/24] dt-bindings: irq: mtk,sysirq: add support for MT8516

In reply to Fabien Parent
Quoted 6 lines · Fabien Parent

Add binding documentation of mediatek,sysirq for MT8516 SoC.

---
 .../bindings/interrupt-controller/mediatek,sysirq.txt          | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

applied to v5.1-next/dts64

Thanks

Quoted 19 lines
Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt +2 -1
index c5d589108a94..deaaba70d548 100644
@@ -1,10 +1,11 @@
-+Mediatek MT65xx/MT67xx/MT81xx sysirq
++Mediatek MT65xx/MT67xx/MT81xx/MT85xx sysirq
 
 Mediatek SOCs sysirq support controllable irq inverter for each GIC SPI
 interrupt.
 
 Required properties:
 - compatible: should be
+	"mediatek,mt8516-sysirq", "mediatek,mt6577-sysirq": for MT8516
 	"mediatek,mt8173-sysirq", "mediatek,mt6577-sysirq": for MT8173
 	"mediatek,mt8135-sysirq", "mediatek,mt6577-sysirq": for MT8135
 	"mediatek,mt8127-sysirq", "mediatek,mt6577-sysirq": for MT8127
#70 lore raw

PATCH 22/24 dt-bindings: i2c: i2c-mtk: add support for MT8516

In reply to Fabien Parent

Add binding documentation of i2c-mtk for MT8516 SoC.

---
 Documentation/devicetree/bindings/i2c/i2c-mtk.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/i2c/i2c-mtk.txt +1 -0
index ee4c32454198..aac7b56f251f 100644
@@ -12,6 +12,7 @@ Required properties:
       "mediatek,mt7623-i2c", "mediatek,mt6577-i2c": for MediaTek MT7623
       "mediatek,mt7629-i2c", "mediatek,mt2712-i2c": for MediaTek MT7629
       "mediatek,mt8173-i2c": for MediaTek MT8173
+      "mediatek,mt8516-i2c", "mediatek,mt2712-i2c": for MediaTek MT8516
   - reg: physical base address of the controller and dma base, length of memory
     mapped region.
   - interrupts: interrupt number to the cpu.
Signature · 1 line
2.20.1
maintainer Applied
#72 lore raw

Re: [PATCH 22/24] dt-bindings: i2c: i2c-mtk: add support for MT8516

In reply to Fabien Parent
Quoted 7 lines · Fabien Parent

Add binding documentation of i2c-mtk for MT8516 SoC.

---
 Documentation/devicetree/bindings/i2c/i2c-mtk.txt | 1 +
 1 file changed, 1 insertion(+)

applied to v5.1-next/dts64

Wolfram let me know if you want to take it through your tree and I drop the patch.

Quoted 13 lines
Documentation/devicetree/bindings/i2c/i2c-mtk.txt +1 -0
index ee4c32454198..aac7b56f251f 100644
@@ -12,6 +12,7 @@ Required properties:
       "mediatek,mt7623-i2c", "mediatek,mt6577-i2c": for MediaTek MT7623
       "mediatek,mt7629-i2c", "mediatek,mt2712-i2c": for MediaTek MT7629
       "mediatek,mt8173-i2c": for MediaTek MT8173
+      "mediatek,mt8516-i2c", "mediatek,mt2712-i2c": for MediaTek MT8516
   - reg: physical base address of the controller and dma base, length of memory
     mapped region.
   - interrupts: interrupt number to the cpu.
#73 lore raw

Re: [PATCH 22/24] dt-bindings: i2c: i2c-mtk: add support for MT8516

Quoted 12 lines · Matthias Brugger
Quoted 7 lines · Fabien Parent

Add binding documentation of i2c-mtk for MT8516 SoC.

---
 Documentation/devicetree/bindings/i2c/i2c-mtk.txt | 1 +
 1 file changed, 1 insertion(+)
Quoted 3 lines

applied to v5.1-next/dts64

Wolfram let me know if you want to take it through your tree and I drop the patch.

I'd like to take it via my tree to reduce conflicts. It already needs rebasing on top of i2c/for-next because of Qii's MT8183 patches.

maintainer
#74 lore raw

Re: [PATCH 22/24] dt-bindings: i2c: i2c-mtk: add support for MT8516

Quoted 12 lines · Wolfram Sang
Quoted 11 lines · Matthias Brugger
Quoted 6 lines · Fabien Parent

Add binding documentation of i2c-mtk for MT8516 SoC.

Documentation/devicetree/bindings/i2c/i2c-mtk.txt | 1 + 1 file changed, 1 insertion(+)

Quoted 8 lines
Quoted 4 lines

applied to v5.1-next/dts64

Wolfram let me know if you want to take it through your tree and I drop the patch.

I'd like to take it via my tree to reduce conflicts. It already needs rebasing on top of i2c/for-next because of Qii's MT8183 patches.

Ok, dropped, the patch is all yours :)

#76 lore raw

PATCH 23/24 arm64: dts: mediatek: add dtsi for MT8516

In reply to Fabien Parent

The MT8516 SoC provides the following peripherals: GPIO, UART, USB2, SPI, eMMC, SDIO, NAND, Flash, ADC, I2C, PWM, Timers, IR, Ethernet, and Audio (I2S, SPDIF, TDM).

This commit is adding the basic dtsi file with the support of the following IOs: GPIO, UART, SPI, eMMC, I2C, Timers.

---
 arch/arm64/boot/dts/mediatek/mt8516-pinfunc.h | 663 ++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt8516.dtsi      | 409 +++++++++++
 2 files changed, 1072 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8516-pinfunc.h
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8516.dtsi
arch/arm64/boot/dts/mediatek/mt8516-pinfunc.h new file +663 -0
new file mode 100644
index 000000000000..73339bb48f0d
@@ -0,0 +1,663 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2019 MediaTek Inc.
+ */
+#ifndef __DTS_MT8516_PINFUNC_H
+#define __DTS_MT8516_PINFUNC_H
+
+#include <dt-bindings/pinctrl/mt65xx.h>
+
+#define MT8516_PIN_0_EINT0__FUNC_GPIO0 (MTK_PIN_NO(0) | 0)
+#define MT8516_PIN_0_EINT0__FUNC_PWM_B (MTK_PIN_NO(0) | 1)
+#define MT8516_PIN_0_EINT0__FUNC_I2S2_BCK (MTK_PIN_NO(0) | 3)
+#define MT8516_PIN_0_EINT0__FUNC_EXT_TXD0 (MTK_PIN_NO(0) | 4)
+#define MT8516_PIN_0_EINT0__FUNC_SQICS (MTK_PIN_NO(0) | 6)
+#define MT8516_PIN_0_EINT0__FUNC_DBG_MON_A_6 (MTK_PIN_NO(0) | 7)
+
+#define MT8516_PIN_1_EINT1__FUNC_GPIO1 (MTK_PIN_NO(1) | 0)
+#define MT8516_PIN_1_EINT1__FUNC_PWM_C (MTK_PIN_NO(1) | 1)
+#define MT8516_PIN_1_EINT1__FUNC_I2S2_DI (MTK_PIN_NO(1) | 3)
+#define MT8516_PIN_1_EINT1__FUNC_EXT_TXD1 (MTK_PIN_NO(1) | 4)
+#define MT8516_PIN_1_EINT1__FUNC_CONN_MCU_TDO (MTK_PIN_NO(1) | 5)
+#define MT8516_PIN_1_EINT1__FUNC_SQISO (MTK_PIN_NO(1) | 6)
+#define MT8516_PIN_1_EINT1__FUNC_DBG_MON_A_7 (MTK_PIN_NO(1) | 7)
+
+#define MT8516_PIN_2_EINT2__FUNC_GPIO2 (MTK_PIN_NO(2) | 0)
+#define MT8516_PIN_2_EINT2__FUNC_CLKM0 (MTK_PIN_NO(2) | 1)
+#define MT8516_PIN_2_EINT2__FUNC_I2S2_LRCK (MTK_PIN_NO(2) | 3)
+#define MT8516_PIN_2_EINT2__FUNC_EXT_TXD2 (MTK_PIN_NO(2) | 4)
+#define MT8516_PIN_2_EINT2__FUNC_CONN_MCU_DBGACK_N (MTK_PIN_NO(2) | 5)
+#define MT8516_PIN_2_EINT2__FUNC_SQISI (MTK_PIN_NO(2) | 6)
+#define MT8516_PIN_2_EINT2__FUNC_DBG_MON_A_8 (MTK_PIN_NO(2) | 7)
+
+#define MT8516_PIN_3_EINT3__FUNC_GPIO3 (MTK_PIN_NO(3) | 0)
+#define MT8516_PIN_3_EINT3__FUNC_CLKM1 (MTK_PIN_NO(3) | 1)
+#define MT8516_PIN_3_EINT3__FUNC_SPI_MI (MTK_PIN_NO(3) | 3)
+#define MT8516_PIN_3_EINT3__FUNC_EXT_TXD3 (MTK_PIN_NO(3) | 4)
+#define MT8516_PIN_3_EINT3__FUNC_CONN_MCU_DBGI_N (MTK_PIN_NO(3) | 5)
+#define MT8516_PIN_3_EINT3__FUNC_SQIWP (MTK_PIN_NO(3) | 6)
+#define MT8516_PIN_3_EINT3__FUNC_DBG_MON_A_9 (MTK_PIN_NO(3) | 7)
+
+#define MT8516_PIN_4_EINT4__FUNC_GPIO4 (MTK_PIN_NO(4) | 0)
+#define MT8516_PIN_4_EINT4__FUNC_CLKM2 (MTK_PIN_NO(4) | 1)
+#define MT8516_PIN_4_EINT4__FUNC_SPI_MO (MTK_PIN_NO(4) | 3)
+#define MT8516_PIN_4_EINT4__FUNC_EXT_TXC (MTK_PIN_NO(4) | 4)
+#define MT8516_PIN_4_EINT4__FUNC_CONN_MCU_TCK (MTK_PIN_NO(4) | 5)
+#define MT8516_PIN_4_EINT4__FUNC_CONN_MCU_AICE_JCKC (MTK_PIN_NO(4) | 6)
+#define MT8516_PIN_4_EINT4__FUNC_DBG_MON_A_10 (MTK_PIN_NO(4) | 7)
+
+#define MT8516_PIN_5_EINT5__FUNC_GPIO5 (MTK_PIN_NO(5) | 0)
+#define MT8516_PIN_5_EINT5__FUNC_UCTS2 (MTK_PIN_NO(5) | 1)
+#define MT8516_PIN_5_EINT5__FUNC_SPI_CSB (MTK_PIN_NO(5) | 3)
+#define MT8516_PIN_5_EINT5__FUNC_EXT_RXER (MTK_PIN_NO(5) | 4)
+#define MT8516_PIN_5_EINT5__FUNC_CONN_MCU_TDI (MTK_PIN_NO(5) | 5)
+#define MT8516_PIN_5_EINT5__FUNC_CONN_TEST_CK (MTK_PIN_NO(5) | 6)
+#define MT8516_PIN_5_EINT5__FUNC_DBG_MON_A_11 (MTK_PIN_NO(5) | 7)
+
+#define MT8516_PIN_6_EINT6__FUNC_GPIO6 (MTK_PIN_NO(6) | 0)
+#define MT8516_PIN_6_EINT6__FUNC_URTS2 (MTK_PIN_NO(6) | 1)
+#define MT8516_PIN_6_EINT6__FUNC_SPI_CLK (MTK_PIN_NO(6) | 3)
+#define MT8516_PIN_6_EINT6__FUNC_EXT_RXC (MTK_PIN_NO(6) | 4)
+#define MT8516_PIN_6_EINT6__FUNC_CONN_MCU_TRST_B (MTK_PIN_NO(6) | 5)
+#define MT8516_PIN_6_EINT6__FUNC_DBG_MON_A_12 (MTK_PIN_NO(6) | 7)
+
+#define MT8516_PIN_7_EINT7__FUNC_GPIO7 (MTK_PIN_NO(7) | 0)
+#define MT8516_PIN_7_EINT7__FUNC_SQIRST (MTK_PIN_NO(7) | 1)
+#define MT8516_PIN_7_EINT7__FUNC_SDA1_0 (MTK_PIN_NO(7) | 3)
+#define MT8516_PIN_7_EINT7__FUNC_EXT_RXDV (MTK_PIN_NO(7) | 4)
+#define MT8516_PIN_7_EINT7__FUNC_CONN_MCU_TMS (MTK_PIN_NO(7) | 5)
+#define MT8516_PIN_7_EINT7__FUNC_CONN_MCU_AICE_JMSC (MTK_PIN_NO(7) | 6)
+#define MT8516_PIN_7_EINT7__FUNC_DBG_MON_A_13 (MTK_PIN_NO(7) | 7)
+
+#define MT8516_PIN_8_EINT8__FUNC_GPIO8 (MTK_PIN_NO(8) | 0)
+#define MT8516_PIN_8_EINT8__FUNC_SQICK (MTK_PIN_NO(8) | 1)
+#define MT8516_PIN_8_EINT8__FUNC_CLKM3 (MTK_PIN_NO(8) | 2)
+#define MT8516_PIN_8_EINT8__FUNC_SCL1_0 (MTK_PIN_NO(8) | 3)
+#define MT8516_PIN_8_EINT8__FUNC_EXT_RXD0 (MTK_PIN_NO(8) | 4)
+#define MT8516_PIN_8_EINT8__FUNC_ANT_SEL0 (MTK_PIN_NO(8) | 5)
+#define MT8516_PIN_8_EINT8__FUNC_DBG_MON_A_14 (MTK_PIN_NO(8) | 7)
+
+#define MT8516_PIN_9_EINT9__FUNC_GPIO9 (MTK_PIN_NO(9) | 0)
+#define MT8516_PIN_9_EINT9__FUNC_CLKM4 (MTK_PIN_NO(9) | 1)
+#define MT8516_PIN_9_EINT9__FUNC_SDA2_0 (MTK_PIN_NO(9) | 2)
+#define MT8516_PIN_9_EINT9__FUNC_EXT_FRAME_SYNC (MTK_PIN_NO(9) | 3)
+#define MT8516_PIN_9_EINT9__FUNC_EXT_RXD1 (MTK_PIN_NO(9) | 4)
+#define MT8516_PIN_9_EINT9__FUNC_ANT_SEL1 (MTK_PIN_NO(9) | 5)
+#define MT8516_PIN_9_EINT9__FUNC_DBG_MON_A_15 (MTK_PIN_NO(9) | 7)
+
+#define MT8516_PIN_10_EINT10__FUNC_GPIO10 (MTK_PIN_NO(10) | 0)
+#define MT8516_PIN_10_EINT10__FUNC_CLKM5 (MTK_PIN_NO(10) | 1)
+#define MT8516_PIN_10_EINT10__FUNC_SCL2_0 (MTK_PIN_NO(10) | 2)
+#define MT8516_PIN_10_EINT10__FUNC_EXT_FRAME_SYNC (MTK_PIN_NO(10) | 3)
+#define MT8516_PIN_10_EINT10__FUNC_EXT_RXD2 (MTK_PIN_NO(10) | 4)
+#define MT8516_PIN_10_EINT10__FUNC_ANT_SEL2 (MTK_PIN_NO(10) | 5)
+#define MT8516_PIN_10_EINT10__FUNC_DBG_MON_A_16 (MTK_PIN_NO(10) | 7)
+
+#define MT8516_PIN_11_EINT11__FUNC_GPIO11 (MTK_PIN_NO(11) | 0)
+#define MT8516_PIN_11_EINT11__FUNC_CLKM4 (MTK_PIN_NO(11) | 1)
+#define MT8516_PIN_11_EINT11__FUNC_PWM_C (MTK_PIN_NO(11) | 2)
+#define MT8516_PIN_11_EINT11__FUNC_CONN_TEST_CK (MTK_PIN_NO(11) | 3)
+#define MT8516_PIN_11_EINT11__FUNC_ANT_SEL3 (MTK_PIN_NO(11) | 4)
+#define MT8516_PIN_11_EINT11__FUNC_EXT_RXD3 (MTK_PIN_NO(11) | 6)
+#define MT8516_PIN_11_EINT11__FUNC_DBG_MON_A_17 (MTK_PIN_NO(11) | 7)
+
+#define MT8516_PIN_12_EINT12__FUNC_GPIO12 (MTK_PIN_NO(12) | 0)
+#define MT8516_PIN_12_EINT12__FUNC_CLKM5 (MTK_PIN_NO(12) | 1)
+#define MT8516_PIN_12_EINT12__FUNC_PWM_A (MTK_PIN_NO(12) | 2)
+#define MT8516_PIN_12_EINT12__FUNC_SPDIF_OUT (MTK_PIN_NO(12) | 3)
+#define MT8516_PIN_12_EINT12__FUNC_ANT_SEL4 (MTK_PIN_NO(12) | 4)
+#define MT8516_PIN_12_EINT12__FUNC_EXT_TXEN (MTK_PIN_NO(12) | 6)
+#define MT8516_PIN_12_EINT12__FUNC_DBG_MON_A_18 (MTK_PIN_NO(12) | 7)
+
+#define MT8516_PIN_13_EINT13__FUNC_GPIO13 (MTK_PIN_NO(13) | 0)
+#define MT8516_PIN_13_EINT13__FUNC_TSF_IN (MTK_PIN_NO(13) | 3)
+#define MT8516_PIN_13_EINT13__FUNC_ANT_SEL5 (MTK_PIN_NO(13) | 4)
+#define MT8516_PIN_13_EINT13__FUNC_SPDIF_IN (MTK_PIN_NO(13) | 6)
+#define MT8516_PIN_13_EINT13__FUNC_DBG_MON_A_19 (MTK_PIN_NO(13) | 7)
+
+#define MT8516_PIN_14_EINT14__FUNC_GPIO14 (MTK_PIN_NO(14) | 0)
+#define MT8516_PIN_14_EINT14__FUNC_I2S_8CH_DO1 (MTK_PIN_NO(14) | 2)
+#define MT8516_PIN_14_EINT14__FUNC_TDM_RX_MCK (MTK_PIN_NO(14) | 3)
+#define MT8516_PIN_14_EINT14__FUNC_ANT_SEL1 (MTK_PIN_NO(14) | 4)
+#define MT8516_PIN_14_EINT14__FUNC_CONN_MCU_DBGACK_N (MTK_PIN_NO(14) | 5)
+#define MT8516_PIN_14_EINT14__FUNC_NCLE (MTK_PIN_NO(14) | 6)
+#define MT8516_PIN_14_EINT14__FUNC_DBG_MON_B_8 (MTK_PIN_NO(14) | 7)
+
+#define MT8516_PIN_15_EINT15__FUNC_GPIO15 (MTK_PIN_NO(15) | 0)
+#define MT8516_PIN_15_EINT15__FUNC_I2S_8CH_LRCK (MTK_PIN_NO(15) | 2)
+#define MT8516_PIN_15_EINT15__FUNC_TDM_RX_BCK (MTK_PIN_NO(15) | 3)
+#define MT8516_PIN_15_EINT15__FUNC_ANT_SEL2 (MTK_PIN_NO(15) | 4)
+#define MT8516_PIN_15_EINT15__FUNC_CONN_MCU_DBGI_N (MTK_PIN_NO(15) | 5)
+#define MT8516_PIN_15_EINT15__FUNC_NCEB1 (MTK_PIN_NO(15) | 6)
+#define MT8516_PIN_15_EINT15__FUNC_DBG_MON_B_9 (MTK_PIN_NO(15) | 7)
+
+#define MT8516_PIN_16_EINT16__FUNC_GPIO16 (MTK_PIN_NO(16) | 0)
+#define MT8516_PIN_16_EINT16__FUNC_I2S_8CH_BCK (MTK_PIN_NO(16) | 2)
+#define MT8516_PIN_16_EINT16__FUNC_TDM_RX_LRCK (MTK_PIN_NO(16) | 3)
+#define MT8516_PIN_16_EINT16__FUNC_ANT_SEL3 (MTK_PIN_NO(16) | 4)
+#define MT8516_PIN_16_EINT16__FUNC_CONN_MCU_TRST_B (MTK_PIN_NO(16) | 5)
+#define MT8516_PIN_16_EINT16__FUNC_NCEB0 (MTK_PIN_NO(16) | 6)
+#define MT8516_PIN_16_EINT16__FUNC_DBG_MON_B_10 (MTK_PIN_NO(16) | 7)
+
+#define MT8516_PIN_17_EINT17__FUNC_GPIO17 (MTK_PIN_NO(17) | 0)
+#define MT8516_PIN_17_EINT17__FUNC_I2S_8CH_MCK (MTK_PIN_NO(17) | 2)
+#define MT8516_PIN_17_EINT17__FUNC_TDM_RX_DI (MTK_PIN_NO(17) | 3)
+#define MT8516_PIN_17_EINT17__FUNC_IDDIG (MTK_PIN_NO(17) | 4)
+#define MT8516_PIN_17_EINT17__FUNC_ANT_SEL4 (MTK_PIN_NO(17) | 5)
+#define MT8516_PIN_17_EINT17__FUNC_NREB (MTK_PIN_NO(17) | 6)
+#define MT8516_PIN_17_EINT17__FUNC_DBG_MON_B_11 (MTK_PIN_NO(17) | 7)
+
+#define MT8516_PIN_18_EINT18__FUNC_GPIO18 (MTK_PIN_NO(18) | 0)
+#define MT8516_PIN_18_EINT18__FUNC_USB_DRVVBUS (MTK_PIN_NO(18) | 2)
+#define MT8516_PIN_18_EINT18__FUNC_I2S3_LRCK (MTK_PIN_NO(18) | 3)
+#define MT8516_PIN_18_EINT18__FUNC_CLKM1 (MTK_PIN_NO(18) | 4)
+#define MT8516_PIN_18_EINT18__FUNC_ANT_SEL3 (MTK_PIN_NO(18) | 5)
+#define MT8516_PIN_18_EINT18__FUNC_I2S2_BCK (MTK_PIN_NO(18) | 6)
+#define MT8516_PIN_18_EINT18__FUNC_DBG_MON_A_20 (MTK_PIN_NO(18) | 7)
+
+#define MT8516_PIN_19_EINT19__FUNC_GPIO19 (MTK_PIN_NO(19) | 0)
+#define MT8516_PIN_19_EINT19__FUNC_UCTS1 (MTK_PIN_NO(19) | 1)
+#define MT8516_PIN_19_EINT19__FUNC_IDDIG (MTK_PIN_NO(19) | 2)
+#define MT8516_PIN_19_EINT19__FUNC_I2S3_BCK (MTK_PIN_NO(19) | 3)
+#define MT8516_PIN_19_EINT19__FUNC_CLKM2 (MTK_PIN_NO(19) | 4)
+#define MT8516_PIN_19_EINT19__FUNC_ANT_SEL4 (MTK_PIN_NO(19) | 5)
+#define MT8516_PIN_19_EINT19__FUNC_I2S2_DI (MTK_PIN_NO(19) | 6)
+#define MT8516_PIN_19_EINT19__FUNC_DBG_MON_A_21 (MTK_PIN_NO(19) | 7)
+
+#define MT8516_PIN_20_EINT20__FUNC_GPIO20 (MTK_PIN_NO(20) | 0)
+#define MT8516_PIN_20_EINT20__FUNC_URTS1 (MTK_PIN_NO(20) | 1)
+#define MT8516_PIN_20_EINT20__FUNC_I2S3_DO (MTK_PIN_NO(20) | 3)
+#define MT8516_PIN_20_EINT20__FUNC_CLKM3 (MTK_PIN_NO(20) | 4)
+#define MT8516_PIN_20_EINT20__FUNC_ANT_SEL5 (MTK_PIN_NO(20) | 5)
+#define MT8516_PIN_20_EINT20__FUNC_I2S2_LRCK (MTK_PIN_NO(20) | 6)
+#define MT8516_PIN_20_EINT20__FUNC_DBG_MON_A_22 (MTK_PIN_NO(20) | 7)
+
+#define MT8516_PIN_21_EINT21__FUNC_GPIO21 (MTK_PIN_NO(21) | 0)
+#define MT8516_PIN_21_EINT21__FUNC_NRNB (MTK_PIN_NO(21) | 1)
+#define MT8516_PIN_21_EINT21__FUNC_ANT_SEL0 (MTK_PIN_NO(21) | 2)
+#define MT8516_PIN_21_EINT21__FUNC_I2S_8CH_DO4 (MTK_PIN_NO(21) | 3)
+#define MT8516_PIN_21_EINT21__FUNC_DBG_MON_B_31 (MTK_PIN_NO(21) | 7)
+
+#define MT8516_PIN_22_EINT22__FUNC_GPIO22 (MTK_PIN_NO(22) | 0)
+#define MT8516_PIN_22_EINT22__FUNC_I2S_8CH_DO2 (MTK_PIN_NO(22) | 2)
+#define MT8516_PIN_22_EINT22__FUNC_TSF_IN (MTK_PIN_NO(22) | 3)
+#define MT8516_PIN_22_EINT22__FUNC_USB_DRVVBUS (MTK_PIN_NO(22) | 4)
+#define MT8516_PIN_22_EINT22__FUNC_SPDIF_OUT (MTK_PIN_NO(22) | 5)
+#define MT8516_PIN_22_EINT22__FUNC_NRE_C (MTK_PIN_NO(22) | 6)
+#define MT8516_PIN_22_EINT22__FUNC_DBG_MON_B_12 (MTK_PIN_NO(22) | 7)
+
+#define MT8516_PIN_23_EINT23__FUNC_GPIO23 (MTK_PIN_NO(23) | 0)
+#define MT8516_PIN_23_EINT23__FUNC_I2S_8CH_DO3 (MTK_PIN_NO(23) | 2)
+#define MT8516_PIN_23_EINT23__FUNC_CLKM0 (MTK_PIN_NO(23) | 3)
+#define MT8516_PIN_23_EINT23__FUNC_IR (MTK_PIN_NO(23) | 4)
+#define MT8516_PIN_23_EINT23__FUNC_SPDIF_IN (MTK_PIN_NO(23) | 5)
+#define MT8516_PIN_23_EINT23__FUNC_NDQS_C (MTK_PIN_NO(23) | 6)
+#define MT8516_PIN_23_EINT23__FUNC_DBG_MON_B_13 (MTK_PIN_NO(23) | 7)
+
+#define MT8516_PIN_24_EINT24__FUNC_GPIO24 (MTK_PIN_NO(24) | 0)
+#define MT8516_PIN_24_EINT24__FUNC_ANT_SEL1 (MTK_PIN_NO(24) | 3)
+#define MT8516_PIN_24_EINT24__FUNC_UCTS2 (MTK_PIN_NO(24) | 4)
+#define MT8516_PIN_24_EINT24__FUNC_PWM_A (MTK_PIN_NO(24) | 5)
+#define MT8516_PIN_24_EINT24__FUNC_I2S0_MCK (MTK_PIN_NO(24) | 6)
+#define MT8516_PIN_24_EINT24__FUNC_DBG_MON_A_0 (MTK_PIN_NO(24) | 7)
+
+#define MT8516_PIN_25_EINT25__FUNC_GPIO25 (MTK_PIN_NO(25) | 0)
+#define MT8516_PIN_25_EINT25__FUNC_ANT_SEL0 (MTK_PIN_NO(25) | 3)
+#define MT8516_PIN_25_EINT25__FUNC_URTS2 (MTK_PIN_NO(25) | 4)
+#define MT8516_PIN_25_EINT25__FUNC_PWM_B (MTK_PIN_NO(25) | 5)
+#define MT8516_PIN_25_EINT25__FUNC_I2S_8CH_MCK (MTK_PIN_NO(25) | 6)
+#define MT8516_PIN_25_EINT25__FUNC_DBG_MON_A_1 (MTK_PIN_NO(25) | 7)
+
+#define MT8516_PIN_26_PWRAP_SPI0_MI__FUNC_GPIO26 (MTK_PIN_NO(26) | 0)
+#define MT8516_PIN_26_PWRAP_SPI0_MI__FUNC_PWRAP_SPI0_MO (MTK_PIN_NO(26) | 1)
+#define MT8516_PIN_26_PWRAP_SPI0_MI__FUNC_PWRAP_SPI0_MI (MTK_PIN_NO(26) | 2)
+
+#define MT8516_PIN_27_PWRAP_SPI0_MO__FUNC_GPIO27 (MTK_PIN_NO(27) | 0)
+#define MT8516_PIN_27_PWRAP_SPI0_MO__FUNC_PWRAP_SPI0_MI (MTK_PIN_NO(27) | 1)
+#define MT8516_PIN_27_PWRAP_SPI0_MO__FUNC_PWRAP_SPI0_MO (MTK_PIN_NO(27) | 2)
+
+#define MT8516_PIN_28_PWRAP_INT__FUNC_GPIO28 (MTK_PIN_NO(28) | 0)
+#define MT8516_PIN_28_PWRAP_INT__FUNC_I2S0_MCK (MTK_PIN_NO(28) | 1)
+#define MT8516_PIN_28_PWRAP_INT__FUNC_I2S_8CH_MCK (MTK_PIN_NO(28) | 4)
+#define MT8516_PIN_28_PWRAP_INT__FUNC_I2S2_MCK (MTK_PIN_NO(28) | 5)
+#define MT8516_PIN_28_PWRAP_INT__FUNC_I2S3_MCK (MTK_PIN_NO(28) | 6)
+
+#define MT8516_PIN_29_PWRAP_SPI0_CK__FUNC_GPIO29 (MTK_PIN_NO(29) | 0)
+#define MT8516_PIN_29_PWRAP_SPI0_CK__FUNC_PWRAP_SPI0_CK (MTK_PIN_NO(29) | 1)
+
+#define MT8516_PIN_30_PWRAP_SPI0_CSN__FUNC_GPIO30 (MTK_PIN_NO(30) | 0)
+#define MT8516_PIN_30_PWRAP_SPI0_CSN__FUNC_PWRAP_SPI0_CSN (MTK_PIN_NO(30) | 1)
+
+#define MT8516_PIN_31_RTC32K_CK__FUNC_GPIO31 (MTK_PIN_NO(31) | 0)
+#define MT8516_PIN_31_RTC32K_CK__FUNC_RTC32K_CK (MTK_PIN_NO(31) | 1)
+
+#define MT8516_PIN_32_WATCHDOG__FUNC_GPIO32 (MTK_PIN_NO(32) | 0)
+#define MT8516_PIN_32_WATCHDOG__FUNC_WATCHDOG (MTK_PIN_NO(32) | 1)
+
+#define MT8516_PIN_33_SRCLKENA__FUNC_GPIO33 (MTK_PIN_NO(33) | 0)
+#define MT8516_PIN_33_SRCLKENA__FUNC_SRCLKENA0 (MTK_PIN_NO(33) | 1)
+
+#define MT8516_PIN_34_URXD2__FUNC_GPIO34 (MTK_PIN_NO(34) | 0)
+#define MT8516_PIN_34_URXD2__FUNC_URXD2 (MTK_PIN_NO(34) | 1)
+#define MT8516_PIN_34_URXD2__FUNC_UTXD2 (MTK_PIN_NO(34) | 3)
+#define MT8516_PIN_34_URXD2__FUNC_DBG_SCL (MTK_PIN_NO(34) | 4)
+#define MT8516_PIN_34_URXD2__FUNC_I2S2_MCK (MTK_PIN_NO(34) | 6)
+#define MT8516_PIN_34_URXD2__FUNC_DBG_MON_B_0 (MTK_PIN_NO(34) | 7)
+
+#define MT8516_PIN_35_UTXD2__FUNC_GPIO35 (MTK_PIN_NO(35) | 0)
+#define MT8516_PIN_35_UTXD2__FUNC_UTXD2 (MTK_PIN_NO(35) | 1)
+#define MT8516_PIN_35_UTXD2__FUNC_URXD2 (MTK_PIN_NO(35) | 3)
+#define MT8516_PIN_35_UTXD2__FUNC_DBG_SDA (MTK_PIN_NO(35) | 4)
+#define MT8516_PIN_35_UTXD2__FUNC_I2S3_MCK (MTK_PIN_NO(35) | 6)
+#define MT8516_PIN_35_UTXD2__FUNC_DBG_MON_B_1 (MTK_PIN_NO(35) | 7)
+
+#define MT8516_PIN_36_MRG_CLK__FUNC_GPIO36 (MTK_PIN_NO(36) | 0)
+#define MT8516_PIN_36_MRG_CLK__FUNC_MRG_CLK (MTK_PIN_NO(36) | 1)
+#define MT8516_PIN_36_MRG_CLK__FUNC_I2S0_BCK (MTK_PIN_NO(36) | 3)
+#define MT8516_PIN_36_MRG_CLK__FUNC_I2S3_BCK (MTK_PIN_NO(36) | 4)
+#define MT8516_PIN_36_MRG_CLK__FUNC_PCM0_CLK (MTK_PIN_NO(36) | 5)
+#define MT8516_PIN_36_MRG_CLK__FUNC_IR (MTK_PIN_NO(36) | 6)
+#define MT8516_PIN_36_MRG_CLK__FUNC_DBG_MON_A_2 (MTK_PIN_NO(36) | 7)
+
+#define MT8516_PIN_37_MRG_SYNC__FUNC_GPIO37 (MTK_PIN_NO(37) | 0)
+#define MT8516_PIN_37_MRG_SYNC__FUNC_MRG_SYNC (MTK_PIN_NO(37) | 1)
+#define MT8516_PIN_37_MRG_SYNC__FUNC_I2S0_LRCK (MTK_PIN_NO(37) | 3)
+#define MT8516_PIN_37_MRG_SYNC__FUNC_I2S3_LRCK (MTK_PIN_NO(37) | 4)
+#define MT8516_PIN_37_MRG_SYNC__FUNC_PCM0_SYNC (MTK_PIN_NO(37) | 5)
+#define MT8516_PIN_37_MRG_SYNC__FUNC_EXT_COL (MTK_PIN_NO(37) | 6)
+#define MT8516_PIN_37_MRG_SYNC__FUNC_DBG_MON_A_3 (MTK_PIN_NO(37) | 7)
+
+#define MT8516_PIN_38_MRG_DI__FUNC_GPIO38 (MTK_PIN_NO(38) | 0)
+#define MT8516_PIN_38_MRG_DI__FUNC_MRG_DI (MTK_PIN_NO(38) | 1)
+#define MT8516_PIN_38_MRG_DI__FUNC_I2S0_DI (MTK_PIN_NO(38) | 3)
+#define MT8516_PIN_38_MRG_DI__FUNC_I2S3_DO (MTK_PIN_NO(38) | 4)
+#define MT8516_PIN_38_MRG_DI__FUNC_PCM0_DI (MTK_PIN_NO(38) | 5)
+#define MT8516_PIN_38_MRG_DI__FUNC_EXT_MDIO (MTK_PIN_NO(38) | 6)
+#define MT8516_PIN_38_MRG_DI__FUNC_DBG_MON_A_4 (MTK_PIN_NO(38) | 7)
+
+#define MT8516_PIN_39_MRG_DO__FUNC_GPIO39 (MTK_PIN_NO(39) | 0)
+#define MT8516_PIN_39_MRG_DO__FUNC_MRG_DO (MTK_PIN_NO(39) | 1)
+#define MT8516_PIN_39_MRG_DO__FUNC_I2S0_MCK (MTK_PIN_NO(39) | 3)
+#define MT8516_PIN_39_MRG_DO__FUNC_I2S3_MCK (MTK_PIN_NO(39) | 4)
+#define MT8516_PIN_39_MRG_DO__FUNC_PCM0_DO (MTK_PIN_NO(39) | 5)
+#define MT8516_PIN_39_MRG_DO__FUNC_EXT_MDC (MTK_PIN_NO(39) | 6)
+#define MT8516_PIN_39_MRG_DO__FUNC_DBG_MON_A_5 (MTK_PIN_NO(39) | 7)
+
+#define MT8516_PIN_40_KPROW0__FUNC_GPIO40 (MTK_PIN_NO(40) | 0)
+#define MT8516_PIN_40_KPROW0__FUNC_KPROW0 (MTK_PIN_NO(40) | 1)
+#define MT8516_PIN_40_KPROW0__FUNC_DBG_MON_B_4 (MTK_PIN_NO(40) | 7)
+
+#define MT8516_PIN_41_KPROW1__FUNC_GPIO41 (MTK_PIN_NO(41) | 0)
+#define MT8516_PIN_41_KPROW1__FUNC_KPROW1 (MTK_PIN_NO(41) | 1)
+#define MT8516_PIN_41_KPROW1__FUNC_IDDIG (MTK_PIN_NO(41) | 2)
+#define MT8516_PIN_41_KPROW1__FUNC_EXT_FRAME_SYNC (MTK_PIN_NO(41) | 3)
+#define MT8516_PIN_41_KPROW1__FUNC_DBG_MON_B_5 (MTK_PIN_NO(41) | 7)
+
+#define MT8516_PIN_42_KPCOL0__FUNC_GPIO42 (MTK_PIN_NO(42) | 0)
+#define MT8516_PIN_42_KPCOL0__FUNC_KPCOL0 (MTK_PIN_NO(42) | 1)
+#define MT8516_PIN_42_KPCOL0__FUNC_DBG_MON_B_6 (MTK_PIN_NO(42) | 7)
+
+#define MT8516_PIN_43_KPCOL1__FUNC_GPIO43 (MTK_PIN_NO(43) | 0)
+#define MT8516_PIN_43_KPCOL1__FUNC_KPCOL1 (MTK_PIN_NO(43) | 1)
+#define MT8516_PIN_43_KPCOL1__FUNC_USB_DRVVBUS (MTK_PIN_NO(43) | 2)
+#define MT8516_PIN_43_KPCOL1__FUNC_EXT_FRAME_SYNC (MTK_PIN_NO(43) | 3)
+#define MT8516_PIN_43_KPCOL1__FUNC_TSF_IN (MTK_PIN_NO(43) | 4)
+#define MT8516_PIN_43_KPCOL1__FUNC_DBG_MON_B_7 (MTK_PIN_NO(43) | 7)
+
+#define MT8516_PIN_44_JTMS__FUNC_GPIO44 (MTK_PIN_NO(44) | 0)
+#define MT8516_PIN_44_JTMS__FUNC_JTMS (MTK_PIN_NO(44) | 1)
+#define MT8516_PIN_44_JTMS__FUNC_CONN_MCU_TMS (MTK_PIN_NO(44) | 2)
+#define MT8516_PIN_44_JTMS__FUNC_CONN_MCU_AICE_JMSC (MTK_PIN_NO(44) | 3)
+#define MT8516_PIN_44_JTMS__FUNC_DFD_TMS_XI (MTK_PIN_NO(44) | 5)
+#define MT8516_PIN_44_JTMS__FUNC_UDI_TMS_XI (MTK_PIN_NO(44) | 6)
+
+#define MT8516_PIN_45_JTCK__FUNC_GPIO45 (MTK_PIN_NO(45) | 0)
+#define MT8516_PIN_45_JTCK__FUNC_JTCK (MTK_PIN_NO(45) | 1)
+#define MT8516_PIN_45_JTCK__FUNC_CONN_MCU_TCK (MTK_PIN_NO(45) | 2)
+#define MT8516_PIN_45_JTCK__FUNC_CONN_MCU_AICE_JCKC (MTK_PIN_NO(45) | 3)
+
+#define MT8516_PIN_46_JTDI__FUNC_GPIO46 (MTK_PIN_NO(46) | 0)
+#define MT8516_PIN_46_JTDI__FUNC_JTDI (MTK_PIN_NO(46) | 1)
+#define MT8516_PIN_46_JTDI__FUNC_CONN_MCU_TDI (MTK_PIN_NO(46) | 2)
+
+#define MT8516_PIN_47_JTDO__FUNC_GPIO47 (MTK_PIN_NO(47) | 0)
+#define MT8516_PIN_47_JTDO__FUNC_JTDO (MTK_PIN_NO(47) | 1)
+#define MT8516_PIN_47_JTDO__FUNC_CONN_MCU_TDO (MTK_PIN_NO(47) | 2)
+
+#define MT8516_PIN_48_SPI_CS__FUNC_GPIO48 (MTK_PIN_NO(48) | 0)
+#define MT8516_PIN_48_SPI_CS__FUNC_SPI_CSB (MTK_PIN_NO(48) | 1)
+#define MT8516_PIN_48_SPI_CS__FUNC_I2S0_DI (MTK_PIN_NO(48) | 3)
+#define MT8516_PIN_48_SPI_CS__FUNC_I2S2_BCK (MTK_PIN_NO(48) | 4)
+#define MT8516_PIN_48_SPI_CS__FUNC_DBG_MON_A_23 (MTK_PIN_NO(48) | 7)
+
+#define MT8516_PIN_49_SPI_CK__FUNC_GPIO49 (MTK_PIN_NO(49) | 0)
+#define MT8516_PIN_49_SPI_CK__FUNC_SPI_CLK (MTK_PIN_NO(49) | 1)
+#define MT8516_PIN_49_SPI_CK__FUNC_I2S0_LRCK (MTK_PIN_NO(49) | 3)
+#define MT8516_PIN_49_SPI_CK__FUNC_I2S2_DI (MTK_PIN_NO(49) | 4)
+#define MT8516_PIN_49_SPI_CK__FUNC_DBG_MON_A_24 (MTK_PIN_NO(49) | 7)
+
+#define MT8516_PIN_50_SPI_MI__FUNC_GPIO50 (MTK_PIN_NO(50) | 0)
+#define MT8516_PIN_50_SPI_MI__FUNC_SPI_MI (MTK_PIN_NO(50) | 1)
+#define MT8516_PIN_50_SPI_MI__FUNC_SPI_MO (MTK_PIN_NO(50) | 2)
+#define MT8516_PIN_50_SPI_MI__FUNC_I2S0_BCK (MTK_PIN_NO(50) | 3)
+#define MT8516_PIN_50_SPI_MI__FUNC_I2S2_LRCK (MTK_PIN_NO(50) | 4)
+#define MT8516_PIN_50_SPI_MI__FUNC_DBG_MON_A_25 (MTK_PIN_NO(50) | 7)
+
+#define MT8516_PIN_51_SPI_MO__FUNC_GPIO51 (MTK_PIN_NO(51) | 0)
+#define MT8516_PIN_51_SPI_MO__FUNC_SPI_MO (MTK_PIN_NO(51) | 1)
+#define MT8516_PIN_51_SPI_MO__FUNC_SPI_MI (MTK_PIN_NO(51) | 2)
+#define MT8516_PIN_51_SPI_MO__FUNC_I2S0_MCK (MTK_PIN_NO(51) | 3)
+#define MT8516_PIN_51_SPI_MO__FUNC_I2S2_MCK (MTK_PIN_NO(51) | 4)
+#define MT8516_PIN_51_SPI_MO__FUNC_DBG_MON_A_26 (MTK_PIN_NO(51) | 7)
+
+#define MT8516_PIN_52_SDA1__FUNC_GPIO52 (MTK_PIN_NO(52) | 0)
+#define MT8516_PIN_52_SDA1__FUNC_SDA1_0 (MTK_PIN_NO(52) | 1)
+
+#define MT8516_PIN_53_SCL1__FUNC_GPIO53 (MTK_PIN_NO(53) | 0)
+#define MT8516_PIN_53_SCL1__FUNC_SCL1_0 (MTK_PIN_NO(53) | 1)
+
+#define MT8516_PIN_54_GPIO54__FUNC_GPIO54 (MTK_PIN_NO(54) | 0)
+#define MT8516_PIN_54_GPIO54__FUNC_PWM_B (MTK_PIN_NO(54) | 2)
+#define MT8516_PIN_54_GPIO54__FUNC_DBG_MON_B_2 (MTK_PIN_NO(54) | 7)
+
+#define MT8516_PIN_55_I2S_DATA_IN__FUNC_GPIO55 (MTK_PIN_NO(55) | 0)
+#define MT8516_PIN_55_I2S_DATA_IN__FUNC_I2S0_DI (MTK_PIN_NO(55) | 1)
+#define MT8516_PIN_55_I2S_DATA_IN__FUNC_UCTS0 (MTK_PIN_NO(55) | 2)
+#define MT8516_PIN_55_I2S_DATA_IN__FUNC_I2S3_DO (MTK_PIN_NO(55) | 3)
+#define MT8516_PIN_55_I2S_DATA_IN__FUNC_I2S_8CH_DO1 (MTK_PIN_NO(55) | 4)
+#define MT8516_PIN_55_I2S_DATA_IN__FUNC_PWM_A (MTK_PIN_NO(55) | 5)
+#define MT8516_PIN_55_I2S_DATA_IN__FUNC_I2S2_BCK (MTK_PIN_NO(55) | 6)
+#define MT8516_PIN_55_I2S_DATA_IN__FUNC_DBG_MON_A_28 (MTK_PIN_NO(55) | 7)
+
+#define MT8516_PIN_56_I2S_LRCK__FUNC_GPIO56 (MTK_PIN_NO(56) | 0)
+#define MT8516_PIN_56_I2S_LRCK__FUNC_I2S0_LRCK (MTK_PIN_NO(56) | 1)
+#define MT8516_PIN_56_I2S_LRCK__FUNC_I2S3_LRCK (MTK_PIN_NO(56) | 3)
+#define MT8516_PIN_56_I2S_LRCK__FUNC_I2S_8CH_LRCK (MTK_PIN_NO(56) | 4)
+#define MT8516_PIN_56_I2S_LRCK__FUNC_PWM_B (MTK_PIN_NO(56) | 5)
+#define MT8516_PIN_56_I2S_LRCK__FUNC_I2S2_DI (MTK_PIN_NO(56) | 6)
+#define MT8516_PIN_56_I2S_LRCK__FUNC_DBG_MON_A_29 (MTK_PIN_NO(56) | 7)
+
+#define MT8516_PIN_57_I2S_BCK__FUNC_GPIO57 (MTK_PIN_NO(57) | 0)
+#define MT8516_PIN_57_I2S_BCK__FUNC_I2S0_BCK (MTK_PIN_NO(57) | 1)
+#define MT8516_PIN_57_I2S_BCK__FUNC_URTS0 (MTK_PIN_NO(57) | 2)
+#define MT8516_PIN_57_I2S_BCK__FUNC_I2S3_BCK (MTK_PIN_NO(57) | 3)
+#define MT8516_PIN_57_I2S_BCK__FUNC_I2S_8CH_BCK (MTK_PIN_NO(57) | 4)
+#define MT8516_PIN_57_I2S_BCK__FUNC_PWM_C (MTK_PIN_NO(57) | 5)
+#define MT8516_PIN_57_I2S_BCK__FUNC_I2S2_LRCK (MTK_PIN_NO(57) | 6)
+#define MT8516_PIN_57_I2S_BCK__FUNC_DBG_MON_A_30 (MTK_PIN_NO(57) | 7)
+
+#define MT8516_PIN_58_SDA0__FUNC_GPIO58 (MTK_PIN_NO(58) | 0)
+#define MT8516_PIN_58_SDA0__FUNC_SDA0_0 (MTK_PIN_NO(58) | 1)
+
+#define MT8516_PIN_59_SCL0__FUNC_GPIO59 (MTK_PIN_NO(59) | 0)
+#define MT8516_PIN_59_SCL0__FUNC_SCL0_0 (MTK_PIN_NO(59) | 1)
+
+#define MT8516_PIN_60_SDA2__FUNC_GPIO60 (MTK_PIN_NO(60) | 0)
+#define MT8516_PIN_60_SDA2__FUNC_SDA2_0 (MTK_PIN_NO(60) | 1)
+#define MT8516_PIN_60_SDA2__FUNC_PWM_B (MTK_PIN_NO(60) | 2)
+
+#define MT8516_PIN_61_SCL2__FUNC_GPIO61 (MTK_PIN_NO(61) | 0)
+#define MT8516_PIN_61_SCL2__FUNC_SCL2_0 (MTK_PIN_NO(61) | 1)
+#define MT8516_PIN_61_SCL2__FUNC_PWM_C (MTK_PIN_NO(61) | 2)
+
+#define MT8516_PIN_62_URXD0__FUNC_GPIO62 (MTK_PIN_NO(62) | 0)
+#define MT8516_PIN_62_URXD0__FUNC_URXD0 (MTK_PIN_NO(62) | 1)
+#define MT8516_PIN_62_URXD0__FUNC_UTXD0 (MTK_PIN_NO(62) | 2)
+
+#define MT8516_PIN_63_UTXD0__FUNC_GPIO63 (MTK_PIN_NO(63) | 0)
+#define MT8516_PIN_63_UTXD0__FUNC_UTXD0 (MTK_PIN_NO(63) | 1)
+#define MT8516_PIN_63_UTXD0__FUNC_URXD0 (MTK_PIN_NO(63) | 2)
+
+#define MT8516_PIN_64_URXD1__FUNC_GPIO64 (MTK_PIN_NO(64) | 0)
+#define MT8516_PIN_64_URXD1__FUNC_URXD1 (MTK_PIN_NO(64) | 1)
+#define MT8516_PIN_64_URXD1__FUNC_UTXD1 (MTK_PIN_NO(64) | 2)
+#define MT8516_PIN_64_URXD1__FUNC_DBG_MON_A_27 (MTK_PIN_NO(64) | 7)
+
+#define MT8516_PIN_65_UTXD1__FUNC_GPIO65 (MTK_PIN_NO(65) | 0)
+#define MT8516_PIN_65_UTXD1__FUNC_UTXD1 (MTK_PIN_NO(65) | 1)
+#define MT8516_PIN_65_UTXD1__FUNC_URXD1 (MTK_PIN_NO(65) | 2)
+#define MT8516_PIN_65_UTXD1__FUNC_DBG_MON_A_31 (MTK_PIN_NO(65) | 7)
+
+#define MT8516_PIN_68_MSDC2_CMD__FUNC_GPIO68 (MTK_PIN_NO(68) | 0)
+#define MT8516_PIN_68_MSDC2_CMD__FUNC_MSDC2_CMD (MTK_PIN_NO(68) | 1)
+#define MT8516_PIN_68_MSDC2_CMD__FUNC_I2S_8CH_DO4 (MTK_PIN_NO(68) | 2)
+#define MT8516_PIN_68_MSDC2_CMD__FUNC_SDA1_0 (MTK_PIN_NO(68) | 3)
+#define MT8516_PIN_68_MSDC2_CMD__FUNC_USB_SDA (MTK_PIN_NO(68) | 5)
+#define MT8516_PIN_68_MSDC2_CMD__FUNC_I2S3_BCK (MTK_PIN_NO(68) | 6)
+#define MT8516_PIN_68_MSDC2_CMD__FUNC_DBG_MON_B_15 (MTK_PIN_NO(68) | 7)
+
+#define MT8516_PIN_69_MSDC2_CLK__FUNC_GPIO69 (MTK_PIN_NO(69) | 0)
+#define MT8516_PIN_69_MSDC2_CLK__FUNC_MSDC2_CLK (MTK_PIN_NO(69) | 1)
+#define MT8516_PIN_69_MSDC2_CLK__FUNC_I2S_8CH_DO3 (MTK_PIN_NO(69) | 2)
+#define MT8516_PIN_69_MSDC2_CLK__FUNC_SCL1_0 (MTK_PIN_NO(69) | 3)
+#define MT8516_PIN_69_MSDC2_CLK__FUNC_USB_SCL (MTK_PIN_NO(69) | 5)
+#define MT8516_PIN_69_MSDC2_CLK__FUNC_I2S3_LRCK (MTK_PIN_NO(69) | 6)
+#define MT8516_PIN_69_MSDC2_CLK__FUNC_DBG_MON_B_16 (MTK_PIN_NO(69) | 7)
+
+#define MT8516_PIN_70_MSDC2_DAT0__FUNC_GPIO70 (MTK_PIN_NO(70) | 0)
+#define MT8516_PIN_70_MSDC2_DAT0__FUNC_MSDC2_DAT0 (MTK_PIN_NO(70) | 1)
+#define MT8516_PIN_70_MSDC2_DAT0__FUNC_I2S_8CH_DO2 (MTK_PIN_NO(70) | 2)
+#define MT8516_PIN_70_MSDC2_DAT0__FUNC_UTXD0 (MTK_PIN_NO(70) | 5)
+#define MT8516_PIN_70_MSDC2_DAT0__FUNC_I2S3_DO (MTK_PIN_NO(70) | 6)
+#define MT8516_PIN_70_MSDC2_DAT0__FUNC_DBG_MON_B_17 (MTK_PIN_NO(70) | 7)
+
+#define MT8516_PIN_71_MSDC2_DAT1__FUNC_GPIO71 (MTK_PIN_NO(71) | 0)
+#define MT8516_PIN_71_MSDC2_DAT1__FUNC_MSDC2_DAT1 (MTK_PIN_NO(71) | 1)
+#define MT8516_PIN_71_MSDC2_DAT1__FUNC_I2S_8CH_DO1 (MTK_PIN_NO(71) | 2)
+#define MT8516_PIN_71_MSDC2_DAT1__FUNC_PWM_A (MTK_PIN_NO(71) | 3)
+#define MT8516_PIN_71_MSDC2_DAT1__FUNC_I2S3_MCK (MTK_PIN_NO(71) | 4)
+#define MT8516_PIN_71_MSDC2_DAT1__FUNC_URXD0 (MTK_PIN_NO(71) | 5)
+#define MT8516_PIN_71_MSDC2_DAT1__FUNC_PWM_B (MTK_PIN_NO(71) | 6)
+#define MT8516_PIN_71_MSDC2_DAT1__FUNC_DBG_MON_B_18 (MTK_PIN_NO(71) | 7)
+
+#define MT8516_PIN_72_MSDC2_DAT2__FUNC_GPIO72 (MTK_PIN_NO(72) | 0)
+#define MT8516_PIN_72_MSDC2_DAT2__FUNC_MSDC2_DAT2 (MTK_PIN_NO(72) | 1)
+#define MT8516_PIN_72_MSDC2_DAT2__FUNC_I2S_8CH_LRCK (MTK_PIN_NO(72) | 2)
+#define MT8516_PIN_72_MSDC2_DAT2__FUNC_SDA2_0 (MTK_PIN_NO(72) | 3)
+#define MT8516_PIN_72_MSDC2_DAT2__FUNC_UTXD1 (MTK_PIN_NO(72) | 5)
+#define MT8516_PIN_72_MSDC2_DAT2__FUNC_PWM_C (MTK_PIN_NO(72) | 6)
+#define MT8516_PIN_72_MSDC2_DAT2__FUNC_DBG_MON_B_19 (MTK_PIN_NO(72) | 7)
+
+#define MT8516_PIN_73_MSDC2_DAT3__FUNC_GPIO73 (MTK_PIN_NO(73) | 0)
+#define MT8516_PIN_73_MSDC2_DAT3__FUNC_MSDC2_DAT3 (MTK_PIN_NO(73) | 1)
+#define MT8516_PIN_73_MSDC2_DAT3__FUNC_I2S_8CH_BCK (MTK_PIN_NO(73) | 2)
+#define MT8516_PIN_73_MSDC2_DAT3__FUNC_SCL2_0 (MTK_PIN_NO(73) | 3)
+#define MT8516_PIN_73_MSDC2_DAT3__FUNC_EXT_FRAME_SYNC (MTK_PIN_NO(73) | 4)
+#define MT8516_PIN_73_MSDC2_DAT3__FUNC_URXD1 (MTK_PIN_NO(73) | 5)
+#define MT8516_PIN_73_MSDC2_DAT3__FUNC_PWM_A (MTK_PIN_NO(73) | 6)
+#define MT8516_PIN_73_MSDC2_DAT3__FUNC_DBG_MON_B_20 (MTK_PIN_NO(73) | 7)
+
+#define MT8516_PIN_74_TDN3__FUNC_GPI74 (MTK_PIN_NO(74) | 0)
+#define MT8516_PIN_74_TDN3__FUNC_TDN3 (MTK_PIN_NO(74) | 1)
+
+#define MT8516_PIN_75_TDP3__FUNC_GPI75 (MTK_PIN_NO(75) | 0)
+#define MT8516_PIN_75_TDP3__FUNC_TDP3 (MTK_PIN_NO(75) | 1)
+
+#define MT8516_PIN_76_TDN2__FUNC_GPI76 (MTK_PIN_NO(76) | 0)
+#define MT8516_PIN_76_TDN2__FUNC_TDN2 (MTK_PIN_NO(76) | 1)
+
+#define MT8516_PIN_77_TDP2__FUNC_GPI77 (MTK_PIN_NO(77) | 0)
+#define MT8516_PIN_77_TDP2__FUNC_TDP2 (MTK_PIN_NO(77) | 1)
+
+#define MT8516_PIN_78_TCN__FUNC_GPI78 (MTK_PIN_NO(78) | 0)
+#define MT8516_PIN_78_TCN__FUNC_TCN (MTK_PIN_NO(78) | 1)
+
+#define MT8516_PIN_79_TCP__FUNC_GPI79 (MTK_PIN_NO(79) | 0)
+#define MT8516_PIN_79_TCP__FUNC_TCP (MTK_PIN_NO(79) | 1)
+
+#define MT8516_PIN_80_TDN1__FUNC_GPI80 (MTK_PIN_NO(80) | 0)
+#define MT8516_PIN_80_TDN1__FUNC_TDN1 (MTK_PIN_NO(80) | 1)
+
+#define MT8516_PIN_81_TDP1__FUNC_GPI81 (MTK_PIN_NO(81) | 0)
+#define MT8516_PIN_81_TDP1__FUNC_TDP1 (MTK_PIN_NO(81) | 1)
+
+#define MT8516_PIN_82_TDN0__FUNC_GPI82 (MTK_PIN_NO(82) | 0)
+#define MT8516_PIN_82_TDN0__FUNC_TDN0 (MTK_PIN_NO(82) | 1)
+
+#define MT8516_PIN_83_TDP0__FUNC_GPI83 (MTK_PIN_NO(83) | 0)
+#define MT8516_PIN_83_TDP0__FUNC_TDP0 (MTK_PIN_NO(83) | 1)
+
+#define MT8516_PIN_84_RDN0__FUNC_GPI84 (MTK_PIN_NO(84) | 0)
+#define MT8516_PIN_84_RDN0__FUNC_RDN0 (MTK_PIN_NO(84) | 1)
+
+#define MT8516_PIN_85_RDP0__FUNC_GPI85 (MTK_PIN_NO(85) | 0)
+#define MT8516_PIN_85_RDP0__FUNC_RDP0 (MTK_PIN_NO(85) | 1)
+
+#define MT8516_PIN_86_RDN1__FUNC_GPI86 (MTK_PIN_NO(86) | 0)
+#define MT8516_PIN_86_RDN1__FUNC_RDN1 (MTK_PIN_NO(86) | 1)
+
+#define MT8516_PIN_87_RDP1__FUNC_GPI87 (MTK_PIN_NO(87) | 0)
+#define MT8516_PIN_87_RDP1__FUNC_RDP1 (MTK_PIN_NO(87) | 1)
+
+#define MT8516_PIN_88_RCN__FUNC_GPI88 (MTK_PIN_NO(88) | 0)
+#define MT8516_PIN_88_RCN__FUNC_RCN (MTK_PIN_NO(88) | 1)
+
+#define MT8516_PIN_89_RCP__FUNC_GPI89 (MTK_PIN_NO(89) | 0)
+#define MT8516_PIN_89_RCP__FUNC_RCP (MTK_PIN_NO(89) | 1)
+
+#define MT8516_PIN_90_RDN2__FUNC_GPI90 (MTK_PIN_NO(90) | 0)
+#define MT8516_PIN_90_RDN2__FUNC_RDN2 (MTK_PIN_NO(90) | 1)
+#define MT8516_PIN_90_RDN2__FUNC_CMDAT8 (MTK_PIN_NO(90) | 2)
+
+#define MT8516_PIN_91_RDP2__FUNC_GPI91 (MTK_PIN_NO(91) | 0)
+#define MT8516_PIN_91_RDP2__FUNC_RDP2 (MTK_PIN_NO(91) | 1)
+#define MT8516_PIN_91_RDP2__FUNC_CMDAT9 (MTK_PIN_NO(91) | 2)
+
+#define MT8516_PIN_92_RDN3__FUNC_GPI92 (MTK_PIN_NO(92) | 0)
+#define MT8516_PIN_92_RDN3__FUNC_RDN3 (MTK_PIN_NO(92) | 1)
+#define MT8516_PIN_92_RDN3__FUNC_CMDAT4 (MTK_PIN_NO(92) | 2)
+
+#define MT8516_PIN_93_RDP3__FUNC_GPI93 (MTK_PIN_NO(93) | 0)
+#define MT8516_PIN_93_RDP3__FUNC_RDP3 (MTK_PIN_NO(93) | 1)
+#define MT8516_PIN_93_RDP3__FUNC_CMDAT5 (MTK_PIN_NO(93) | 2)
+
+#define MT8516_PIN_94_RCN_A__FUNC_GPI94 (MTK_PIN_NO(94) | 0)
+#define MT8516_PIN_94_RCN_A__FUNC_RCN_A (MTK_PIN_NO(94) | 1)
+#define MT8516_PIN_94_RCN_A__FUNC_CMDAT6 (MTK_PIN_NO(94) | 2)
+
+#define MT8516_PIN_95_RCP_A__FUNC_GPI95 (MTK_PIN_NO(95) | 0)
+#define MT8516_PIN_95_RCP_A__FUNC_RCP_A (MTK_PIN_NO(95) | 1)
+#define MT8516_PIN_95_RCP_A__FUNC_CMDAT7 (MTK_PIN_NO(95) | 2)
+
+#define MT8516_PIN_96_RDN1_A__FUNC_GPI96 (MTK_PIN_NO(96) | 0)
+#define MT8516_PIN_96_RDN1_A__FUNC_RDN1_A (MTK_PIN_NO(96) | 1)
+#define MT8516_PIN_96_RDN1_A__FUNC_CMDAT2 (MTK_PIN_NO(96) | 2)
+#define MT8516_PIN_96_RDN1_A__FUNC_CMCSD2 (MTK_PIN_NO(96) | 3)
+
+#define MT8516_PIN_97_RDP1_A__FUNC_GPI97 (MTK_PIN_NO(97) | 0)
+#define MT8516_PIN_97_RDP1_A__FUNC_RDP1_A (MTK_PIN_NO(97) | 1)
+#define MT8516_PIN_97_RDP1_A__FUNC_CMDAT3 (MTK_PIN_NO(97) | 2)
+#define MT8516_PIN_97_RDP1_A__FUNC_CMCSD3 (MTK_PIN_NO(97) | 3)
+
+#define MT8516_PIN_98_RDN0_A__FUNC_GPI98 (MTK_PIN_NO(98) | 0)
+#define MT8516_PIN_98_RDN0_A__FUNC_RDN0_A (MTK_PIN_NO(98) | 1)
+#define MT8516_PIN_98_RDN0_A__FUNC_CMHSYNC (MTK_PIN_NO(98) | 2)
+
+#define MT8516_PIN_99_RDP0_A__FUNC_GPI99 (MTK_PIN_NO(99) | 0)
+#define MT8516_PIN_99_RDP0_A__FUNC_RDP0_A (MTK_PIN_NO(99) | 1)
+#define MT8516_PIN_99_RDP0_A__FUNC_CMVSYNC (MTK_PIN_NO(99) | 2)
+
+#define MT8516_PIN_100_CMDAT0__FUNC_GPIO100 (MTK_PIN_NO(100) | 0)
+#define MT8516_PIN_100_CMDAT0__FUNC_CMDAT0 (MTK_PIN_NO(100) | 1)
+#define MT8516_PIN_100_CMDAT0__FUNC_CMCSD0 (MTK_PIN_NO(100) | 2)
+#define MT8516_PIN_100_CMDAT0__FUNC_ANT_SEL2 (MTK_PIN_NO(100) | 3)
+#define MT8516_PIN_100_CMDAT0__FUNC_TDM_RX_MCK (MTK_PIN_NO(100) | 5)
+#define MT8516_PIN_100_CMDAT0__FUNC_DBG_MON_B_21 (MTK_PIN_NO(100) | 7)
+
+#define MT8516_PIN_101_CMDAT1__FUNC_GPIO101 (MTK_PIN_NO(101) | 0)
+#define MT8516_PIN_101_CMDAT1__FUNC_CMDAT1 (MTK_PIN_NO(101) | 1)
+#define MT8516_PIN_101_CMDAT1__FUNC_CMCSD1 (MTK_PIN_NO(101) | 2)
+#define MT8516_PIN_101_CMDAT1__FUNC_ANT_SEL3 (MTK_PIN_NO(101) | 3)
+#define MT8516_PIN_101_CMDAT1__FUNC_CMFLASH (MTK_PIN_NO(101) | 4)
+#define MT8516_PIN_101_CMDAT1__FUNC_TDM_RX_BCK (MTK_PIN_NO(101) | 5)
+#define MT8516_PIN_101_CMDAT1__FUNC_DBG_MON_B_22 (MTK_PIN_NO(101) | 7)
+
+#define MT8516_PIN_102_CMMCLK__FUNC_GPIO102 (MTK_PIN_NO(102) | 0)
+#define MT8516_PIN_102_CMMCLK__FUNC_CMMCLK (MTK_PIN_NO(102) | 1)
+#define MT8516_PIN_102_CMMCLK__FUNC_ANT_SEL4 (MTK_PIN_NO(102) | 3)
+#define MT8516_PIN_102_CMMCLK__FUNC_TDM_RX_LRCK (MTK_PIN_NO(102) | 5)
+#define MT8516_PIN_102_CMMCLK__FUNC_DBG_MON_B_23 (MTK_PIN_NO(102) | 7)
+
+#define MT8516_PIN_103_CMPCLK__FUNC_GPIO103 (MTK_PIN_NO(103) | 0)
+#define MT8516_PIN_103_CMPCLK__FUNC_CMPCLK (MTK_PIN_NO(103) | 1)
+#define MT8516_PIN_103_CMPCLK__FUNC_CMCSK (MTK_PIN_NO(103) | 2)
+#define MT8516_PIN_103_CMPCLK__FUNC_ANT_SEL5 (MTK_PIN_NO(103) | 3)
+#define MT8516_PIN_103_CMPCLK__FUNC_TDM_RX_DI (MTK_PIN_NO(103) | 5)
+#define MT8516_PIN_103_CMPCLK__FUNC_DBG_MON_B_24 (MTK_PIN_NO(103) | 7)
+
+#define MT8516_PIN_104_MSDC1_CMD__FUNC_GPIO104 (MTK_PIN_NO(104) | 0)
+#define MT8516_PIN_104_MSDC1_CMD__FUNC_MSDC1_CMD (MTK_PIN_NO(104) | 1)
+#define MT8516_PIN_104_MSDC1_CMD__FUNC_SQICS (MTK_PIN_NO(104) | 4)
+#define MT8516_PIN_104_MSDC1_CMD__FUNC_DBG_MON_B_25 (MTK_PIN_NO(104) | 7)
+
+#define MT8516_PIN_105_MSDC1_CLK__FUNC_GPIO105 (MTK_PIN_NO(105) | 0)
+#define MT8516_PIN_105_MSDC1_CLK__FUNC_MSDC1_CLK (MTK_PIN_NO(105) | 1)
+#define MT8516_PIN_105_MSDC1_CLK__FUNC_SQISO (MTK_PIN_NO(105) | 4)
+#define MT8516_PIN_105_MSDC1_CLK__FUNC_DBG_MON_B_26 (MTK_PIN_NO(105) | 7)
+
+#define MT8516_PIN_106_MSDC1_DAT0__FUNC_GPIO106 (MTK_PIN_NO(106) | 0)
+#define MT8516_PIN_106_MSDC1_DAT0__FUNC_MSDC1_DAT0 (MTK_PIN_NO(106) | 1)
+#define MT8516_PIN_106_MSDC1_DAT0__FUNC_SQISI (MTK_PIN_NO(106) | 4)
+#define MT8516_PIN_106_MSDC1_DAT0__FUNC_DBG_MON_B_27 (MTK_PIN_NO(106) | 7)
+
+#define MT8516_PIN_107_MSDC1_DAT1__FUNC_GPIO107 (MTK_PIN_NO(107) | 0)
+#define MT8516_PIN_107_MSDC1_DAT1__FUNC_MSDC1_DAT1 (MTK_PIN_NO(107) | 1)
+#define MT8516_PIN_107_MSDC1_DAT1__FUNC_SQIWP (MTK_PIN_NO(107) | 4)
+#define MT8516_PIN_107_MSDC1_DAT1__FUNC_DBG_MON_B_28 (MTK_PIN_NO(107) | 7)
+
+#define MT8516_PIN_108_MSDC1_DAT2__FUNC_GPIO108 (MTK_PIN_NO(108) | 0)
+#define MT8516_PIN_108_MSDC1_DAT2__FUNC_MSDC1_DAT2 (MTK_PIN_NO(108) | 1)
+#define MT8516_PIN_108_MSDC1_DAT2__FUNC_SQIRST (MTK_PIN_NO(108) | 4)
+#define MT8516_PIN_108_MSDC1_DAT2__FUNC_DBG_MON_B_29 (MTK_PIN_NO(108) | 7)
+
+#define MT8516_PIN_109_MSDC1_DAT3__FUNC_GPIO109 (MTK_PIN_NO(109) | 0)
+#define MT8516_PIN_109_MSDC1_DAT3__FUNC_MSDC1_DAT3 (MTK_PIN_NO(109) | 1)
+#define MT8516_PIN_109_MSDC1_DAT3__FUNC_SQICK (MTK_PIN_NO(109) | 4)
+#define MT8516_PIN_109_MSDC1_DAT3__FUNC_DBG_MON_B_30 (MTK_PIN_NO(109) | 7)
+
+#define MT8516_PIN_110_MSDC0_DAT7__FUNC_GPIO110 (MTK_PIN_NO(110) | 0)
+#define MT8516_PIN_110_MSDC0_DAT7__FUNC_MSDC0_DAT7 (MTK_PIN_NO(110) | 1)
+#define MT8516_PIN_110_MSDC0_DAT7__FUNC_NLD7 (MTK_PIN_NO(110) | 4)
+
+#define MT8516_PIN_111_MSDC0_DAT6__FUNC_GPIO111 (MTK_PIN_NO(111) | 0)
+#define MT8516_PIN_111_MSDC0_DAT6__FUNC_MSDC0_DAT6 (MTK_PIN_NO(111) | 1)
+#define MT8516_PIN_111_MSDC0_DAT6__FUNC_NLD6 (MTK_PIN_NO(111) | 4)
+
+#define MT8516_PIN_112_MSDC0_DAT5__FUNC_GPIO112 (MTK_PIN_NO(112) | 0)
+#define MT8516_PIN_112_MSDC0_DAT5__FUNC_MSDC0_DAT5 (MTK_PIN_NO(112) | 1)
+#define MT8516_PIN_112_MSDC0_DAT5__FUNC_NLD4 (MTK_PIN_NO(112) | 4)
+
+#define MT8516_PIN_113_MSDC0_DAT4__FUNC_GPIO113 (MTK_PIN_NO(113) | 0)
+#define MT8516_PIN_113_MSDC0_DAT4__FUNC_MSDC0_DAT4 (MTK_PIN_NO(113) | 1)
+#define MT8516_PIN_113_MSDC0_DAT4__FUNC_NLD3 (MTK_PIN_NO(113) | 4)
+
+#define MT8516_PIN_114_MSDC0_RSTB__FUNC_GPIO114 (MTK_PIN_NO(114) | 0)
+#define MT8516_PIN_114_MSDC0_RSTB__FUNC_MSDC0_RSTB (MTK_PIN_NO(114) | 1)
+#define MT8516_PIN_114_MSDC0_RSTB__FUNC_NLD0 (MTK_PIN_NO(114) | 4)
+
+#define MT8516_PIN_115_MSDC0_CMD__FUNC_GPIO115 (MTK_PIN_NO(115) | 0)
+#define MT8516_PIN_115_MSDC0_CMD__FUNC_MSDC0_CMD (MTK_PIN_NO(115) | 1)
+#define MT8516_PIN_115_MSDC0_CMD__FUNC_NALE (MTK_PIN_NO(115) | 4)
+
+#define MT8516_PIN_116_MSDC0_CLK__FUNC_GPIO116 (MTK_PIN_NO(116) | 0)
+#define MT8516_PIN_116_MSDC0_CLK__FUNC_MSDC0_CLK (MTK_PIN_NO(116) | 1)
+#define MT8516_PIN_116_MSDC0_CLK__FUNC_NWEB (MTK_PIN_NO(116) | 4)
+
+#define MT8516_PIN_117_MSDC0_DAT3__FUNC_GPIO117 (MTK_PIN_NO(117) | 0)
+#define MT8516_PIN_117_MSDC0_DAT3__FUNC_MSDC0_DAT3 (MTK_PIN_NO(117) | 1)
+#define MT8516_PIN_117_MSDC0_DAT3__FUNC_NLD1 (MTK_PIN_NO(117) | 4)
+
+#define MT8516_PIN_118_MSDC0_DAT2__FUNC_GPIO118 (MTK_PIN_NO(118) | 0)
+#define MT8516_PIN_118_MSDC0_DAT2__FUNC_MSDC0_DAT2 (MTK_PIN_NO(118) | 1)
+#define MT8516_PIN_118_MSDC0_DAT2__FUNC_NLD5 (MTK_PIN_NO(118) | 4)
+
+#define MT8516_PIN_119_MSDC0_DAT1__FUNC_GPIO119 (MTK_PIN_NO(119) | 0)
+#define MT8516_PIN_119_MSDC0_DAT1__FUNC_MSDC0_DAT1 (MTK_PIN_NO(119) | 1)
+#define MT8516_PIN_119_MSDC0_DAT1__FUNC_NLD8 (MTK_PIN_NO(119) | 4)
+
+#define MT8516_PIN_120_MSDC0_DAT0__FUNC_GPIO120 (MTK_PIN_NO(120) | 0)
+#define MT8516_PIN_120_MSDC0_DAT0__FUNC_MSDC0_DAT0 (MTK_PIN_NO(120) | 1)
+#define MT8516_PIN_120_MSDC0_DAT0__FUNC_WATCHDOG (MTK_PIN_NO(120) | 4)
+#define MT8516_PIN_120_MSDC0_DAT0__FUNC_NLD2 (MTK_PIN_NO(120) | 5)
+
+#endif				/* __DTS_MT8516_PINFUNC_H */
arch/arm64/boot/dts/mediatek/mt8516.dtsi new file +409 -0

409 lines not on this page · raw message

Signature · 1 line
2.20.1
Reviewed-by on v1 23/24
#77 lore raw

Re: [PATCH 23/24] arm64: dts: mediatek: add dtsi for MT8516

Quoted 8 lines · Fabien Parent

The MT8516 SoC provides the following peripherals: GPIO, UART, USB2, SPI, eMMC, SDIO, NAND, Flash, ADC, I2C, PWM, Timers, IR, Ethernet, and Audio (I2S, SPDIF, TDM).

This commit is adding the basic dtsi file with the support of the following IOs: GPIO, UART, SPI, eMMC, I2C, Timers.

Quoted 7 lines
---
 arch/arm64/boot/dts/mediatek/mt8516-pinfunc.h | 663 ++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt8516.dtsi      | 409 +++++++++++
 2 files changed, 1072 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8516-pinfunc.h
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8516.dtsi
maintainer
#78 lore raw

Re: [PATCH 23/24] arm64: dts: mediatek: add dtsi for MT8516

Quoted 17 lines · Rob Herring
Quoted 8 lines · Fabien Parent

The MT8516 SoC provides the following peripherals: GPIO, UART, USB2, SPI, eMMC, SDIO, NAND, Flash, ADC, I2C, PWM, Timers, IR, Ethernet, and Audio (I2S, SPDIF, TDM).

This commit is adding the basic dtsi file with the support of the following IOs: GPIO, UART, SPI, eMMC, I2C, Timers.

Quoted 7 lines
---
 arch/arm64/boot/dts/mediatek/mt8516-pinfunc.h | 663 ++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt8516.dtsi      | 409 +++++++++++
 2 files changed, 1072 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8516-pinfunc.h
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8516.dtsi
Quoted 2 lines

Fabien, before taking this through my tree, I'd like to see the drivers merged. Can you please resubmit taking into account the outcome of get_maintainers.pl script. From my experience it is easier to send one series per driver, as it makes the amount of emails every maintainer gets more manageable.

Regards,
Matthias

#79 lore raw

PATCH 24/24 arm64: dts: mediatek: add pumpkin board dts

In reply to Fabien Parent

The pumpkin board is made by Gossamer Engineering and is using a MediaTek SoC. The board currently comes in two available version:
MT8516 SoC and MT8167 SoC.
The board provides the following IOs: eMMC, NAND, SD card, USB type-A, Ethernet, Wi-Fi, Bluetooth, Audio (jack out, 2 PDM port, 1 analog in), serial over USB, and an expansion header.

Additionally there is a HDMI port, DSI port, and camera port only on the MT8167 version of the board.

The board can be powered by battery and/or via a USB Type-C port and is using a PMIC MT6392.

The eMMC and NAND are sharing pins and cannot be used together.

This commit is adding the basic boot support for the Pumpkin MT8516 board on the eMMC.

---
 arch/arm64/boot/dts/mediatek/Makefile         |   1 +
 .../boot/dts/mediatek/mt8516-pumpkin.dts      |  19 ++
 .../boot/dts/mediatek/pumpkin-common.dtsi     | 210 ++++++++++++++++++
 .../dts/mediatek/pumpkin-emmc-common.dtsi     |  75 +++++++
 4 files changed, 305 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8516-pumpkin.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi
 create mode 100644 arch/arm64/boot/dts/mediatek/pumpkin-emmc-common.dtsi
arch/arm64/boot/dts/mediatek/Makefile +1 -0
index e8f952fb279b..3c4edaec9449 100644
@@ -7,3 +7,4 @@ 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-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
arch/arm64/boot/dts/mediatek/mt8516-pumpkin.dts new file +19 -0
new file mode 100644
index 000000000000..016f11c6c88c
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 BayLibre, SAS.
+ * Author: Fabien Parent <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "pumpkin-common.dtsi"
+#include "pumpkin-emmc-common.dtsi"
+
+/ {
+	model = "Pumpkin MT8516";
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0 0x40000000 0 0x40000000>;
+	};
+};
arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi new file +210 -0

210 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/pumpkin-emmc-common.dtsi new file +75 -0

75 lines not on this page · raw message

Signature · 1 line
2.20.1