* [PATCH v1 0/2] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
@ 2023-10-16 21:51 ` Laurent Pinchart
0 siblings, 0 replies; 22+ messages in thread
From: Laurent Pinchart @ 2023-10-16 21:51 UTC (permalink / raw)
To: linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
Hello,
This small patch series adds a device tree for the Pumpkin i350 board
made by OLogic. It starts with two small patches to add a vendor prefix
for OLogic (1/3) and a compatible string for the board (2/3), and then
adds the device tree (3/3).
The device tree is based on work from Fabien Parent, with a few features
added, and a set of devices removed:
- Audio support, as I can't easily test it at the moment due to lack of
local access to the board.
- Display support, for the same reason.
- Dual-role USB support, due to missing bindings and drivers for the
TUSB322 in the upstream kernel.
Support for the crypto processor (ATECC608B) and the WiFi/Bluetooth
module (MT7663S) is also missing, but this wasn't present in the BSP
either.
Once camera support for the MT8365 lands upstream, I will probably send
patches for DT integration with this board.
Laurent Pinchart (3):
dt-bindings: vendor-prefixes: Add prefix for OLogic, Inc.
dt-bindings: arm64: dts: mediatek: Add ologic,pumpkin-i350 board
arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
.../devicetree/bindings/arm/mediatek.yaml | 1 +
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../boot/dts/mediatek/mt8365-pumpkin.dts | 542 ++++++++++++++++++
4 files changed, 546 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
base-commit: 58720809f52779dc0f08e53e54b014209d13eebb
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH v1 0/2] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
@ 2023-10-16 21:51 ` Laurent Pinchart
0 siblings, 0 replies; 22+ messages in thread
From: Laurent Pinchart @ 2023-10-16 21:51 UTC (permalink / raw)
To: linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
Hello,
This small patch series adds a device tree for the Pumpkin i350 board
made by OLogic. It starts with two small patches to add a vendor prefix
for OLogic (1/3) and a compatible string for the board (2/3), and then
adds the device tree (3/3).
The device tree is based on work from Fabien Parent, with a few features
added, and a set of devices removed:
- Audio support, as I can't easily test it at the moment due to lack of
local access to the board.
- Display support, for the same reason.
- Dual-role USB support, due to missing bindings and drivers for the
TUSB322 in the upstream kernel.
Support for the crypto processor (ATECC608B) and the WiFi/Bluetooth
module (MT7663S) is also missing, but this wasn't present in the BSP
either.
Once camera support for the MT8365 lands upstream, I will probably send
patches for DT integration with this board.
Laurent Pinchart (3):
dt-bindings: vendor-prefixes: Add prefix for OLogic, Inc.
dt-bindings: arm64: dts: mediatek: Add ologic,pumpkin-i350 board
arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
.../devicetree/bindings/arm/mediatek.yaml | 1 +
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../boot/dts/mediatek/mt8365-pumpkin.dts | 542 ++++++++++++++++++
4 files changed, 546 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
base-commit: 58720809f52779dc0f08e53e54b014209d13eebb
--
Regards,
Laurent Pinchart
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH v1 1/3] dt-bindings: vendor-prefixes: Add prefix for OLogic, Inc.
2023-10-16 21:51 ` Laurent Pinchart
@ 2023-10-16 21:51 ` Laurent Pinchart
-1 siblings, 0 replies; 22+ messages in thread
From: Laurent Pinchart @ 2023-10-16 21:51 UTC (permalink / raw)
To: linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
Add a DT vendor prefix for OLogic, Inc. OLogic is a hardware and system
design company that manufactures, among other things, development boards
with MediaTek SoCs.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 573578db9509..247b724bc01f 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -981,6 +981,8 @@ patternProperties:
description: Oki Electric Industry Co., Ltd.
"^olimex,.*":
description: OLIMEX Ltd.
+ "^ologic,.*":
+ description: OLogic, Inc.
"^olpc,.*":
description: One Laptop Per Child
"^oneplus,.*":
--
Regards,
Laurent Pinchart
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v1 1/3] dt-bindings: vendor-prefixes: Add prefix for OLogic, Inc.
@ 2023-10-16 21:51 ` Laurent Pinchart
0 siblings, 0 replies; 22+ messages in thread
From: Laurent Pinchart @ 2023-10-16 21:51 UTC (permalink / raw)
To: linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
Add a DT vendor prefix for OLogic, Inc. OLogic is a hardware and system
design company that manufactures, among other things, development boards
with MediaTek SoCs.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 573578db9509..247b724bc01f 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -981,6 +981,8 @@ patternProperties:
description: Oki Electric Industry Co., Ltd.
"^olimex,.*":
description: OLIMEX Ltd.
+ "^ologic,.*":
+ description: OLogic, Inc.
"^olpc,.*":
description: One Laptop Per Child
"^oneplus,.*":
--
Regards,
Laurent Pinchart
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v1 2/3] dt-bindings: arm64: dts: mediatek: Add ologic,pumpkin-i350 board
2023-10-16 21:51 ` Laurent Pinchart
@ 2023-10-16 21:51 ` Laurent Pinchart
-1 siblings, 0 replies; 22+ messages in thread
From: Laurent Pinchart @ 2023-10-16 21:51 UTC (permalink / raw)
To: linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
Add a compatible string for the Pumpkin i350 board, an MT8365-based
board developed by OLogic.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Documentation/devicetree/bindings/arm/mediatek.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index ae12b1cab9fb..dc34e62c6756 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -247,6 +247,7 @@ properties:
- items:
- enum:
- mediatek,mt8365-evk
+ - ologic,pumpkin-i350
- const: mediatek,mt8365
- items:
- enum:
--
Regards,
Laurent Pinchart
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v1 2/3] dt-bindings: arm64: dts: mediatek: Add ologic,pumpkin-i350 board
@ 2023-10-16 21:51 ` Laurent Pinchart
0 siblings, 0 replies; 22+ messages in thread
From: Laurent Pinchart @ 2023-10-16 21:51 UTC (permalink / raw)
To: linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
Add a compatible string for the Pumpkin i350 board, an MT8365-based
board developed by OLogic.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Documentation/devicetree/bindings/arm/mediatek.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index ae12b1cab9fb..dc34e62c6756 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -247,6 +247,7 @@ properties:
- items:
- enum:
- mediatek,mt8365-evk
+ - ologic,pumpkin-i350
- const: mediatek,mt8365
- items:
- enum:
--
Regards,
Laurent Pinchart
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v1 3/3] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
2023-10-16 21:51 ` Laurent Pinchart
@ 2023-10-16 21:51 ` Laurent Pinchart
-1 siblings, 0 replies; 22+ messages in thread
From: Laurent Pinchart @ 2023-10-16 21:51 UTC (permalink / raw)
To: linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
Add a minimal device tree for the Genio i350 Pumpkin development board,
which is based on a MediaTek MT8365.
The device tree is based on an initial version by Fabien Parent Based
written against the MediaTek BSP kernel ([1]). It has been cleaned up,
some features have been added (GPIO LEDs, ethernet), and some features
removed (audio, camera, display and dual-role USB). Those features will
be added back once the corresponding DT bindings and/or drivers become
available in the upstream kernel.
[1] https://gitlab.com/mediatek/aiot/bsp/linux/-/blob/mtk-v5.15-dev/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
Co-developed-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Co-developed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes compared to the BSP version:
- Add ethernet controller
- Add GPIO LEDs
- Add reserved memory region for BL31
- Update board model and compatible
- Rename enable-sdio-wakeup to wakeup-source
- Drop audio support
- Drop display support
- Drop dual role USB support
- Don't use underscores in node names
- Normalize pinmux node names
- Remove unneeded labels
- Drop unneeded always-on
- Drop unused pinmux nodes
- Drop camera GPIO hog
- Update copyright
- Fix formatting
- Sort alphabetically
---
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../boot/dts/mediatek/mt8365-pumpkin.dts | 542 ++++++++++++++++++
2 files changed, 543 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index c99c3372a4b5..bbc232bdadc4 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -53,4 +53,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r3.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-evk.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-pumpkin.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
new file mode 100644
index 000000000000..88fa5d19c627
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
@@ -0,0 +1,542 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2021 BayLibre, SAS.
+ * Copyright (c) 2023 Ideas on Board Oy
+ *
+ * Author: Fabien Parent <fparent@baylibre.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt8365-pinfunc.h>
+
+#include "mt8365.dtsi"
+#include "mt6357.dtsi"
+
+/ {
+ model = "OLogic Pumpkin i350 EVK";
+ compatible = "ologic,pumpkin-i350", "mediatek,mt8365";
+
+ aliases {
+ ethernet0 = ðernet_usb;
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:921600n8";
+ };
+
+ firmware {
+ optee {
+ compatible = "linaro,optee-tz";
+ method = "smc";
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-red {
+ gpios = <&gpio_exp 12 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_HEARTBEAT;
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-green {
+ gpios = <&gpio_exp 13 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_GREEN>;
+ default-state = "off";
+ };
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0 0x40000000 0 0x80000000>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
+ secmon@43000000 {
+ no-map;
+ reg = <0 0x43000000 0 0x30000>;
+ };
+
+ /*
+ * 12 MiB reserved for OP-TEE (BL32)
+ * +-----------------------+ 0x43e0_0000
+ * | SHMEM 2MiB |
+ * +-----------------------+ 0x43c0_0000
+ * | | TA_RAM 8MiB |
+ * + TZDRAM +--------------+ 0x4340_0000
+ * | | TEE_RAM 2MiB |
+ * +-----------------------+ 0x4320_0000
+ */
+ optee@43200000 {
+ no-map;
+ reg = <0 0x43200000 0 0x00c00000>;
+ };
+ };
+
+ usb_otg_vbus: usb-otg-vbus-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&pio 25 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&cpu0 {
+ proc-supply = <&mt6357_vproc_reg>;
+ sram-supply = <&mt6357_vsram_proc_reg>;
+};
+
+&cpu1 {
+ proc-supply = <&mt6357_vproc_reg>;
+ sram-supply = <&mt6357_vsram_proc_reg>;
+};
+
+&cpu2 {
+ proc-supply = <&mt6357_vproc_reg>;
+ sram-supply = <&mt6357_vsram_proc_reg>;
+};
+
+&cpu3 {
+ proc-supply = <&mt6357_vproc_reg>;
+ sram-supply = <&mt6357_vsram_proc_reg>;
+};
+
+&i2c0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0_pins>;
+
+ clock-frequency = <100000>;
+};
+
+&i2c1 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
+
+ clock-frequency = <100000>;
+
+ gpio_exp: gpio@20 {
+ compatible = "ti,tca6416";
+ reg = <0x20>;
+ reset-gpios = <&pio 78 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&tca6416_pins>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_pins>;
+
+ clock-frequency = <100000>;
+};
+
+&i2c3 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_pins>;
+
+ clock-frequency = <100000>;
+};
+
+&keypad {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&keypad_pins>;
+
+ keypad,num-rows = <2>;
+ keypad,num-columns = <1>;
+ mediatek,debounce-us = <32000>;
+ mediatek,double-keys;
+
+ linux,keymap = <MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN)
+ MATRIX_KEY(0x01, 0x00, KEY_VOLUMEUP)>;
+};
+
+/* eMMC */
+&mmc0 {
+ status = "okay";
+
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc0_pins_default>;
+ pinctrl-1 = <&mmc0_pins_uhs>;
+
+ assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
+ assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
+
+ bus-width = <8>;
+ max-frequency = <200000000>;
+
+ vmmc-supply = <&mt6357_vemc_reg>;
+ vqmmc-supply = <&mt6357_vio18_reg>;
+
+ cap-mmc-highspeed;
+ cap-mmc-hw-reset;
+ hs400-ds-delay = <0x12012>;
+ mmc-hs200-1_8v;
+ mmc-hs400-1_8v;
+ no-sd;
+ no-sdio;
+ non-removable;
+};
+
+/* SD card connector */
+&mmc1 {
+ status = "okay";
+
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc1_pins_default>;
+ pinctrl-1 = <&mmc1_pins_uhs>;
+
+ bus-width = <4>;
+ max-frequency = <200000000>;
+
+ vmmc-supply = <&mt6357_vmch_reg>;
+ vqmmc-supply = <&mt6357_vmc_reg>;
+
+ cap-sd-highspeed;
+ cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>;
+ sd-uhs-sdr104;
+ sd-uhs-sdr50;
+};
+
+/* WiFi module */
+&mmc2 {
+ status = "okay";
+
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc2_pins_default>;
+ pinctrl-1 = <&mmc2_pins_uhs>;
+
+ assigned-clocks = <&topckgen CLK_TOP_MSDC50_2_SEL>;
+ assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
+
+ bus-width = <4>;
+ max-frequency = <200000000>;
+
+ vmmc-supply = <&mt6357_vemc_reg>;
+ vqmmc-supply = <&mt6357_vio18_reg>;
+
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ wakeup-source;
+ hs400-ds-delay = <0x12012>;
+ keep-power-in-suspend;
+ non-removable;
+ sd-uhs-sdr104;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+};
+
+&mt6357_pmic {
+ interrupt-parent = <&pio>;
+ interrupts = <145 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+};
+
+&pio {
+ i2c0_pins: i2c0-pins {
+ pins {
+ pinmux = <MT8365_PIN_57_SDA0__FUNC_SDA0_0>,
+ <MT8365_PIN_58_SCL0__FUNC_SCL0_0>;
+ mediatek,pull-up-adv = <3>;
+ mediatek,drive-strength-adv = <00>;
+ bias-pull-up;
+ };
+ };
+
+
+ i2c1_pins: i2c1-pins {
+ pins {
+ pinmux = <MT8365_PIN_59_SDA1__FUNC_SDA1_0>,
+ <MT8365_PIN_60_SCL1__FUNC_SCL1_0>;
+ mediatek,pull-up-adv = <3>;
+ mediatek,drive-strength-adv = <00>;
+ bias-pull-up;
+ };
+ };
+
+ i2c2_pins: i2c2-pins {
+ pins {
+ pinmux = <MT8365_PIN_61_SDA2__FUNC_SDA2_0>,
+ <MT8365_PIN_62_SCL2__FUNC_SCL2_0>;
+ mediatek,pull-up-adv = <3>;
+ mediatek,drive-strength-adv = <00>;
+ bias-pull-up;
+ };
+ };
+
+ i2c3_pins: i2c3-pins {
+ pins {
+ pinmux = <MT8365_PIN_63_SDA3__FUNC_SDA3_0>,
+ <MT8365_PIN_64_SCL3__FUNC_SCL3_0>;
+ mediatek,pull-up-adv = <3>;
+ mediatek,drive-strength-adv = <00>;
+ bias-pull-up;
+ };
+ };
+
+ keypad_pins: keypad-pins {
+ pins {
+ pinmux = <MT8365_PIN_22_KPROW0__FUNC_KPROW0>,
+ <MT8365_PIN_23_KPROW1__FUNC_KPROW1>,
+ <MT8365_PIN_24_KPCOL0__FUNC_KPCOL0>;
+ };
+ };
+
+ mmc0_pins_default: mmc0-default-pins {
+ clk-pins {
+ pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
+ bias-pull-down;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
+ <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
+ <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
+ <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
+ <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
+ <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
+ <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
+ <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
+ <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
+ input-enable;
+ bias-pull-up;
+ };
+
+ rst-pins {
+ pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
+ bias-pull-up;
+ };
+ };
+
+ mmc0_pins_uhs: mmc0-uhs-pins{
+ clk-pins {
+ pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
+ drive-strength = <MTK_DRIVE_10mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
+ <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
+ <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
+ <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
+ <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
+ <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
+ <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
+ <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
+ <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_10mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ ds-pins {
+ pinmux = <MT8365_PIN_104_MSDC0_DSL__FUNC_MSDC0_DSL>;
+ drive-strength = <MTK_DRIVE_10mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ rst-pins {
+ pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
+ drive-strength = <MTK_DRIVE_10mA>;
+ bias-pull-up;
+ };
+ };
+
+ mmc1_pins_default: mmc1-default-pins {
+ cd-pins {
+ pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
+ bias-pull-up;
+ };
+
+ clk-pins {
+ pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
+ <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
+ <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
+ <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
+ <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
+ input-enable;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc1_pins_uhs: mmc1-uhs-pins {
+ cd-pins {
+ pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
+ bias-pull-up;
+ };
+
+ clk-pins {
+ pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
+ <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
+ <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
+ <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
+ <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_6mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc2_pins_default: mmc2-default-pins {
+ clk-pins {
+ pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
+ drive-strength = <MTK_DRIVE_4mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
+ <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
+ <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
+ <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
+ <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_4mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ sysrstb-en-pins {
+ pinmux = <MT8365_PIN_74_CMDAT6__FUNC_GPIO74>;
+ output-low;
+ };
+ };
+
+ mmc2_pins_uhs: mmc2-uhs-pins {
+ clk-pins {
+ pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
+ <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
+ <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
+ <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
+ <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ ds-pins {
+ pinmux = <MT8365_PIN_86_MSDC2_DSL__FUNC_MSDC2_DSL>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ sysrstb-en-pins {
+ pinmux = <MT8365_PIN_126_DMIC3_CLK__FUNC_GPIO126>;
+ output-high;
+ };
+ };
+
+ tca6416_pins: tca6416-pins {
+ rst-n-pins {
+ pinmux = <MT8365_PIN_78_CMHSYNC__FUNC_GPIO78>;
+ output-high;
+ };
+
+ int-n-pins {
+ pinmux = <MT8365_PIN_79_CMVSYNC__FUNC_GPIO79>;
+ input-enable;
+ bias-pull-up;
+ };
+ };
+
+ usb_pins: usb-pins {
+ hub-rst-pins {
+ pinmux = <MT8365_PIN_70_CMDAT2__FUNC_GPIO70>;
+ output-low;
+ };
+
+ id-pins {
+ pinmux = <MT8365_PIN_39_URXD2__FUNC_GPIO39>;
+ input-enable;
+ bias-pull-up;
+ };
+
+ vbus-pins {
+ pinmux = <MT8365_PIN_25_KPCOL1__FUNC_USB_DRVVBUS>;
+ };
+ };
+};
+
+&ssusb {
+ status = "okay";
+
+ pinctrl-0 = <&usb_pins>;
+ pinctrl-names = "default";
+
+ /* Host mode only for now, TUSB322 support is missing. */
+ dr_mode = "host";
+ maximum-speed = "high-speed";
+ vusb33-supply = <&mt6357_vusb33_reg>;
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&usb_host {
+ status = "okay";
+
+ vusb33-supply = <&mt6357_vusb33_reg>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hub@2 {
+ reg = <2>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet_usb: ethernet@1 {
+ compatible = "usb424,ec00";
+ reg = <1>;
+ };
+ };
+};
--
Regards,
Laurent Pinchart
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v1 3/3] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
@ 2023-10-16 21:51 ` Laurent Pinchart
0 siblings, 0 replies; 22+ messages in thread
From: Laurent Pinchart @ 2023-10-16 21:51 UTC (permalink / raw)
To: linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
Add a minimal device tree for the Genio i350 Pumpkin development board,
which is based on a MediaTek MT8365.
The device tree is based on an initial version by Fabien Parent Based
written against the MediaTek BSP kernel ([1]). It has been cleaned up,
some features have been added (GPIO LEDs, ethernet), and some features
removed (audio, camera, display and dual-role USB). Those features will
be added back once the corresponding DT bindings and/or drivers become
available in the upstream kernel.
[1] https://gitlab.com/mediatek/aiot/bsp/linux/-/blob/mtk-v5.15-dev/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
Co-developed-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Co-developed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes compared to the BSP version:
- Add ethernet controller
- Add GPIO LEDs
- Add reserved memory region for BL31
- Update board model and compatible
- Rename enable-sdio-wakeup to wakeup-source
- Drop audio support
- Drop display support
- Drop dual role USB support
- Don't use underscores in node names
- Normalize pinmux node names
- Remove unneeded labels
- Drop unneeded always-on
- Drop unused pinmux nodes
- Drop camera GPIO hog
- Update copyright
- Fix formatting
- Sort alphabetically
---
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../boot/dts/mediatek/mt8365-pumpkin.dts | 542 ++++++++++++++++++
2 files changed, 543 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index c99c3372a4b5..bbc232bdadc4 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -53,4 +53,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r3.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-evk.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-pumpkin.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
new file mode 100644
index 000000000000..88fa5d19c627
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
@@ -0,0 +1,542 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2021 BayLibre, SAS.
+ * Copyright (c) 2023 Ideas on Board Oy
+ *
+ * Author: Fabien Parent <fparent@baylibre.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt8365-pinfunc.h>
+
+#include "mt8365.dtsi"
+#include "mt6357.dtsi"
+
+/ {
+ model = "OLogic Pumpkin i350 EVK";
+ compatible = "ologic,pumpkin-i350", "mediatek,mt8365";
+
+ aliases {
+ ethernet0 = ðernet_usb;
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:921600n8";
+ };
+
+ firmware {
+ optee {
+ compatible = "linaro,optee-tz";
+ method = "smc";
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-red {
+ gpios = <&gpio_exp 12 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_HEARTBEAT;
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-green {
+ gpios = <&gpio_exp 13 GPIO_ACTIVE_HIGH>;
+ color = <LED_COLOR_ID_GREEN>;
+ default-state = "off";
+ };
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0 0x40000000 0 0x80000000>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
+ secmon@43000000 {
+ no-map;
+ reg = <0 0x43000000 0 0x30000>;
+ };
+
+ /*
+ * 12 MiB reserved for OP-TEE (BL32)
+ * +-----------------------+ 0x43e0_0000
+ * | SHMEM 2MiB |
+ * +-----------------------+ 0x43c0_0000
+ * | | TA_RAM 8MiB |
+ * + TZDRAM +--------------+ 0x4340_0000
+ * | | TEE_RAM 2MiB |
+ * +-----------------------+ 0x4320_0000
+ */
+ optee@43200000 {
+ no-map;
+ reg = <0 0x43200000 0 0x00c00000>;
+ };
+ };
+
+ usb_otg_vbus: usb-otg-vbus-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&pio 25 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&cpu0 {
+ proc-supply = <&mt6357_vproc_reg>;
+ sram-supply = <&mt6357_vsram_proc_reg>;
+};
+
+&cpu1 {
+ proc-supply = <&mt6357_vproc_reg>;
+ sram-supply = <&mt6357_vsram_proc_reg>;
+};
+
+&cpu2 {
+ proc-supply = <&mt6357_vproc_reg>;
+ sram-supply = <&mt6357_vsram_proc_reg>;
+};
+
+&cpu3 {
+ proc-supply = <&mt6357_vproc_reg>;
+ sram-supply = <&mt6357_vsram_proc_reg>;
+};
+
+&i2c0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0_pins>;
+
+ clock-frequency = <100000>;
+};
+
+&i2c1 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
+
+ clock-frequency = <100000>;
+
+ gpio_exp: gpio@20 {
+ compatible = "ti,tca6416";
+ reg = <0x20>;
+ reset-gpios = <&pio 78 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&tca6416_pins>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_pins>;
+
+ clock-frequency = <100000>;
+};
+
+&i2c3 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_pins>;
+
+ clock-frequency = <100000>;
+};
+
+&keypad {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&keypad_pins>;
+
+ keypad,num-rows = <2>;
+ keypad,num-columns = <1>;
+ mediatek,debounce-us = <32000>;
+ mediatek,double-keys;
+
+ linux,keymap = <MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN)
+ MATRIX_KEY(0x01, 0x00, KEY_VOLUMEUP)>;
+};
+
+/* eMMC */
+&mmc0 {
+ status = "okay";
+
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc0_pins_default>;
+ pinctrl-1 = <&mmc0_pins_uhs>;
+
+ assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
+ assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
+
+ bus-width = <8>;
+ max-frequency = <200000000>;
+
+ vmmc-supply = <&mt6357_vemc_reg>;
+ vqmmc-supply = <&mt6357_vio18_reg>;
+
+ cap-mmc-highspeed;
+ cap-mmc-hw-reset;
+ hs400-ds-delay = <0x12012>;
+ mmc-hs200-1_8v;
+ mmc-hs400-1_8v;
+ no-sd;
+ no-sdio;
+ non-removable;
+};
+
+/* SD card connector */
+&mmc1 {
+ status = "okay";
+
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc1_pins_default>;
+ pinctrl-1 = <&mmc1_pins_uhs>;
+
+ bus-width = <4>;
+ max-frequency = <200000000>;
+
+ vmmc-supply = <&mt6357_vmch_reg>;
+ vqmmc-supply = <&mt6357_vmc_reg>;
+
+ cap-sd-highspeed;
+ cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>;
+ sd-uhs-sdr104;
+ sd-uhs-sdr50;
+};
+
+/* WiFi module */
+&mmc2 {
+ status = "okay";
+
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc2_pins_default>;
+ pinctrl-1 = <&mmc2_pins_uhs>;
+
+ assigned-clocks = <&topckgen CLK_TOP_MSDC50_2_SEL>;
+ assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
+
+ bus-width = <4>;
+ max-frequency = <200000000>;
+
+ vmmc-supply = <&mt6357_vemc_reg>;
+ vqmmc-supply = <&mt6357_vio18_reg>;
+
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ wakeup-source;
+ hs400-ds-delay = <0x12012>;
+ keep-power-in-suspend;
+ non-removable;
+ sd-uhs-sdr104;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+};
+
+&mt6357_pmic {
+ interrupt-parent = <&pio>;
+ interrupts = <145 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+};
+
+&pio {
+ i2c0_pins: i2c0-pins {
+ pins {
+ pinmux = <MT8365_PIN_57_SDA0__FUNC_SDA0_0>,
+ <MT8365_PIN_58_SCL0__FUNC_SCL0_0>;
+ mediatek,pull-up-adv = <3>;
+ mediatek,drive-strength-adv = <00>;
+ bias-pull-up;
+ };
+ };
+
+
+ i2c1_pins: i2c1-pins {
+ pins {
+ pinmux = <MT8365_PIN_59_SDA1__FUNC_SDA1_0>,
+ <MT8365_PIN_60_SCL1__FUNC_SCL1_0>;
+ mediatek,pull-up-adv = <3>;
+ mediatek,drive-strength-adv = <00>;
+ bias-pull-up;
+ };
+ };
+
+ i2c2_pins: i2c2-pins {
+ pins {
+ pinmux = <MT8365_PIN_61_SDA2__FUNC_SDA2_0>,
+ <MT8365_PIN_62_SCL2__FUNC_SCL2_0>;
+ mediatek,pull-up-adv = <3>;
+ mediatek,drive-strength-adv = <00>;
+ bias-pull-up;
+ };
+ };
+
+ i2c3_pins: i2c3-pins {
+ pins {
+ pinmux = <MT8365_PIN_63_SDA3__FUNC_SDA3_0>,
+ <MT8365_PIN_64_SCL3__FUNC_SCL3_0>;
+ mediatek,pull-up-adv = <3>;
+ mediatek,drive-strength-adv = <00>;
+ bias-pull-up;
+ };
+ };
+
+ keypad_pins: keypad-pins {
+ pins {
+ pinmux = <MT8365_PIN_22_KPROW0__FUNC_KPROW0>,
+ <MT8365_PIN_23_KPROW1__FUNC_KPROW1>,
+ <MT8365_PIN_24_KPCOL0__FUNC_KPCOL0>;
+ };
+ };
+
+ mmc0_pins_default: mmc0-default-pins {
+ clk-pins {
+ pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
+ bias-pull-down;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
+ <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
+ <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
+ <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
+ <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
+ <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
+ <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
+ <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
+ <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
+ input-enable;
+ bias-pull-up;
+ };
+
+ rst-pins {
+ pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
+ bias-pull-up;
+ };
+ };
+
+ mmc0_pins_uhs: mmc0-uhs-pins{
+ clk-pins {
+ pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
+ drive-strength = <MTK_DRIVE_10mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
+ <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
+ <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
+ <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
+ <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
+ <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
+ <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
+ <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
+ <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_10mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ ds-pins {
+ pinmux = <MT8365_PIN_104_MSDC0_DSL__FUNC_MSDC0_DSL>;
+ drive-strength = <MTK_DRIVE_10mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ rst-pins {
+ pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
+ drive-strength = <MTK_DRIVE_10mA>;
+ bias-pull-up;
+ };
+ };
+
+ mmc1_pins_default: mmc1-default-pins {
+ cd-pins {
+ pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
+ bias-pull-up;
+ };
+
+ clk-pins {
+ pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
+ <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
+ <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
+ <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
+ <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
+ input-enable;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc1_pins_uhs: mmc1-uhs-pins {
+ cd-pins {
+ pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
+ bias-pull-up;
+ };
+
+ clk-pins {
+ pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
+ <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
+ <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
+ <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
+ <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_6mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc2_pins_default: mmc2-default-pins {
+ clk-pins {
+ pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
+ drive-strength = <MTK_DRIVE_4mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
+ <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
+ <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
+ <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
+ <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_4mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ sysrstb-en-pins {
+ pinmux = <MT8365_PIN_74_CMDAT6__FUNC_GPIO74>;
+ output-low;
+ };
+ };
+
+ mmc2_pins_uhs: mmc2-uhs-pins {
+ clk-pins {
+ pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ cmd-dat-pins {
+ pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
+ <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
+ <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
+ <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
+ <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
+ input-enable;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ ds-pins {
+ pinmux = <MT8365_PIN_86_MSDC2_DSL__FUNC_MSDC2_DSL>;
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ sysrstb-en-pins {
+ pinmux = <MT8365_PIN_126_DMIC3_CLK__FUNC_GPIO126>;
+ output-high;
+ };
+ };
+
+ tca6416_pins: tca6416-pins {
+ rst-n-pins {
+ pinmux = <MT8365_PIN_78_CMHSYNC__FUNC_GPIO78>;
+ output-high;
+ };
+
+ int-n-pins {
+ pinmux = <MT8365_PIN_79_CMVSYNC__FUNC_GPIO79>;
+ input-enable;
+ bias-pull-up;
+ };
+ };
+
+ usb_pins: usb-pins {
+ hub-rst-pins {
+ pinmux = <MT8365_PIN_70_CMDAT2__FUNC_GPIO70>;
+ output-low;
+ };
+
+ id-pins {
+ pinmux = <MT8365_PIN_39_URXD2__FUNC_GPIO39>;
+ input-enable;
+ bias-pull-up;
+ };
+
+ vbus-pins {
+ pinmux = <MT8365_PIN_25_KPCOL1__FUNC_USB_DRVVBUS>;
+ };
+ };
+};
+
+&ssusb {
+ status = "okay";
+
+ pinctrl-0 = <&usb_pins>;
+ pinctrl-names = "default";
+
+ /* Host mode only for now, TUSB322 support is missing. */
+ dr_mode = "host";
+ maximum-speed = "high-speed";
+ vusb33-supply = <&mt6357_vusb33_reg>;
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&usb_host {
+ status = "okay";
+
+ vusb33-supply = <&mt6357_vusb33_reg>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hub@2 {
+ reg = <2>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet_usb: ethernet@1 {
+ compatible = "usb424,ec00";
+ reg = <1>;
+ };
+ };
+};
--
Regards,
Laurent Pinchart
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH v1 1/3] dt-bindings: vendor-prefixes: Add prefix for OLogic, Inc.
2023-10-16 21:51 ` Laurent Pinchart
@ 2023-10-17 6:18 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2023-10-17 6:18 UTC (permalink / raw)
To: Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
On 16/10/2023 23:51, Laurent Pinchart wrote:
> Add a DT vendor prefix for OLogic, Inc. OLogic is a hardware and system
> design company that manufactures, among other things, development boards
> with MediaTek SoCs.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 1/3] dt-bindings: vendor-prefixes: Add prefix for OLogic, Inc.
@ 2023-10-17 6:18 ` Krzysztof Kozlowski
0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2023-10-17 6:18 UTC (permalink / raw)
To: Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
On 16/10/2023 23:51, Laurent Pinchart wrote:
> Add a DT vendor prefix for OLogic, Inc. OLogic is a hardware and system
> design company that manufactures, among other things, development boards
> with MediaTek SoCs.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 2/3] dt-bindings: arm64: dts: mediatek: Add ologic,pumpkin-i350 board
2023-10-16 21:51 ` Laurent Pinchart
@ 2023-10-17 6:20 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2023-10-17 6:20 UTC (permalink / raw)
To: Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
On 16/10/2023 23:51, Laurent Pinchart wrote:
> Add a compatible string for the Pumpkin i350 board, an MT8365-based
> board developed by OLogic.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 2/3] dt-bindings: arm64: dts: mediatek: Add ologic,pumpkin-i350 board
@ 2023-10-17 6:20 ` Krzysztof Kozlowski
0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2023-10-17 6:20 UTC (permalink / raw)
To: Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Alexandre Mergnat, Julien Stephan,
Suhrid Subramaniam, Ted Larson
On 16/10/2023 23:51, Laurent Pinchart wrote:
> Add a compatible string for the Pumpkin i350 board, an MT8365-based
> board developed by OLogic.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 3/3] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
2023-10-16 21:51 ` Laurent Pinchart
@ 2023-10-19 12:45 ` Alexandre Mergnat
-1 siblings, 0 replies; 22+ messages in thread
From: Alexandre Mergnat @ 2023-10-19 12:45 UTC (permalink / raw)
To: Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Julien Stephan, Suhrid Subramaniam,
Ted Larson
On 16/10/2023 23:51, Laurent Pinchart wrote:
> Add a minimal device tree for the Genio i350 Pumpkin development board,
> which is based on a MediaTek MT8365.
>
> The device tree is based on an initial version by Fabien Parent Based
> written against the MediaTek BSP kernel ([1]). It has been cleaned up,
> some features have been added (GPIO LEDs, ethernet), and some features
> removed (audio, camera, display and dual-role USB). Those features will
> be added back once the corresponding DT bindings and/or drivers become
> available in the upstream kernel.
>
> [1] https://gitlab.com/mediatek/aiot/bsp/linux/-/blob/mtk-v5.15-dev/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>
> Co-developed-by: Fabien Parent <fparent@baylibre.com>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> Co-developed-by: Paul Elder <paul.elder@ideasonboard.com>
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> Changes compared to the BSP version:
>
> - Add ethernet controller
> - Add GPIO LEDs
> - Add reserved memory region for BL31
> - Update board model and compatible
> - Rename enable-sdio-wakeup to wakeup-source
> - Drop audio support
> - Drop display support
> - Drop dual role USB support
> - Don't use underscores in node names
> - Normalize pinmux node names
> - Remove unneeded labels
> - Drop unneeded always-on
> - Drop unused pinmux nodes
> - Drop camera GPIO hog
> - Update copyright
> - Fix formatting
> - Sort alphabetically
> ---
> arch/arm64/boot/dts/mediatek/Makefile | 1 +
> .../boot/dts/mediatek/mt8365-pumpkin.dts | 542 ++++++++++++++++++
> 2 files changed, 543 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>
> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> index c99c3372a4b5..bbc232bdadc4 100644
> --- a/arch/arm64/boot/dts/mediatek/Makefile
> +++ b/arch/arm64/boot/dts/mediatek/Makefile
> @@ -53,4 +53,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r3.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-evk.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-pumpkin.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
> diff --git a/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> new file mode 100644
> index 000000000000..88fa5d19c627
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> @@ -0,0 +1,542 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2021 BayLibre, SAS.
> + * Copyright (c) 2023 Ideas on Board Oy
> + *
> + * Author: Fabien Parent <fparent@baylibre.com>
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/pinctrl/mt8365-pinfunc.h>
> +
> +#include "mt8365.dtsi"
> +#include "mt6357.dtsi"
> +
> +/ {
> + model = "OLogic Pumpkin i350 EVK";
> + compatible = "ologic,pumpkin-i350", "mediatek,mt8365";
> +
> + aliases {
> + ethernet0 = ðernet_usb;
> + mmc0 = &mmc0;
> + mmc1 = &mmc1;
> + mmc2 = &mmc2;
Are mmc aliases needed ?
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:921600n8";
> + };
> +
> + firmware {
> + optee {
> + compatible = "linaro,optee-tz";
> + method = "smc";
> + };
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> +
> + led-red {
> + gpios = <&gpio_exp 12 GPIO_ACTIVE_HIGH>;
> + color = <LED_COLOR_ID_RED>;
> + function = LED_FUNCTION_HEARTBEAT;
> + linux,default-trigger = "heartbeat";
> + };
> +
> + led-green {
> + gpios = <&gpio_exp 13 GPIO_ACTIVE_HIGH>;
> + color = <LED_COLOR_ID_GREEN>;
> + default-state = "off";
> + };
> + };
> +
> + memory@40000000 {
> + device_type = "memory";
> + reg = <0 0x40000000 0 0x80000000>;
> + };
> +
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
> + secmon@43000000 {
> + no-map;
> + reg = <0 0x43000000 0 0x30000>;
> + };
> +
> + /*
> + * 12 MiB reserved for OP-TEE (BL32)
> + * +-----------------------+ 0x43e0_0000
> + * | SHMEM 2MiB |
> + * +-----------------------+ 0x43c0_0000
> + * | | TA_RAM 8MiB |
> + * + TZDRAM +--------------+ 0x4340_0000
> + * | | TEE_RAM 2MiB |
> + * +-----------------------+ 0x4320_0000
> + */
> + optee@43200000 {
> + no-map;
> + reg = <0 0x43200000 0 0x00c00000>;
> + };
> + };
> +
> + usb_otg_vbus: usb-otg-vbus-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "otg_vbus";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + gpio = <&pio 25 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +};
> +
> +&cpu0 {
> + proc-supply = <&mt6357_vproc_reg>;
> + sram-supply = <&mt6357_vsram_proc_reg>;
> +};
> +
> +&cpu1 {
> + proc-supply = <&mt6357_vproc_reg>;
> + sram-supply = <&mt6357_vsram_proc_reg>;
> +};
> +
> +&cpu2 {
> + proc-supply = <&mt6357_vproc_reg>;
> + sram-supply = <&mt6357_vsram_proc_reg>;
> +};
> +
> +&cpu3 {
> + proc-supply = <&mt6357_vproc_reg>;
> + sram-supply = <&mt6357_vsram_proc_reg>;
> +};
> +
> +&i2c0 {
> + status = "okay" > +
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c0_pins>;
> +
> + clock-frequency = <100000>;
Property order:
- clock
- pinctrl
- status
Actually, status should be at the end.
Apply this for the other nodes please.
> +};
> +
> +&i2c1 {
> + status = "okay";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c1_pins>;
> +
> + clock-frequency = <100000 > +
> + gpio_exp: gpio@20 {
> + compatible = "ti,tca6416";
> + reg = <0x20>;
> + reset-gpios = <&pio 78 GPIO_ACTIVE_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&tca6416_pins>;
> +
> + gpio-controller;
> + #gpio-cells = <2>;
> + };
> +};
> +
> +&i2c2 {
> + status = "okay";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c2_pins>;
> +
> + clock-frequency = <100000>;
> +};
> +
> +&i2c3 {
> + status = "okay";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c3_pins>;
> +
> + clock-frequency = <100000>;
> +};
> +
> +&keypad {
> + status = "okay";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&keypad_pins>;
> +
> + keypad,num-rows = <2>;
> + keypad,num-columns = <1>;
> + mediatek,debounce-us = <32000>;
> + mediatek,double-keys;
> +
> + linux,keymap = <MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN)
> + MATRIX_KEY(0x01, 0x00, KEY_VOLUMEUP)>;
> +};
> +
> +/* eMMC */
> +&mmc0 {
> + status = "okay";
> +
> + pinctrl-names = "default", "state_uhs";
> + pinctrl-0 = <&mmc0_pins_default>;
> + pinctrl-1 = <&mmc0_pins_uhs>;
> +
> + assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
> + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
> +
> + bus-width = <8>;
> + max-frequency = <200000000>;
> +
> + vmmc-supply = <&mt6357_vemc_reg>;
> + vqmmc-supply = <&mt6357_vio18_reg>;
> +
> + cap-mmc-highspeed;
> + cap-mmc-hw-reset;
> + hs400-ds-delay = <0x12012>;
> + mmc-hs200-1_8v;
> + mmc-hs400-1_8v;
> + no-sd;
> + no-sdio;
> + non-removable;
That's how it should be ordered:
bus-width = <8>;
max-frequency = <200000000>;
cap-mmc-highspeed;
cap-mmc-hw-reset;
hs400-ds-delay = <0x12012>;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
no-sd;
no-sdio;
non-removable;
vmmc-supply = ...
vqmmc-supply = ...
pinctrl-0 ...
pinctrl-1 ...
pinctrl-names ...
status = "okay";
Apply this for other node please.
> +};
> +
> +/* SD card connector */
> +&mmc1 {
> + status = "okay";
> +
> + pinctrl-names = "default", "state_uhs";
> + pinctrl-0 = <&mmc1_pins_default>;
> + pinctrl-1 = <&mmc1_pins_uhs>;
> +
> + bus-width = <4>;
> + max-frequency = <200000000>;
> +
> + vmmc-supply = <&mt6357_vmch_reg>;
> + vqmmc-supply = <&mt6357_vmc_reg>;
> +
> + cap-sd-highspeed;
> + cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>;
> + sd-uhs-sdr104;
> + sd-uhs-sdr50;
> +};
> +
> +/* WiFi module */
> +&mmc2 {
> + status = "okay";
> +
> + pinctrl-names = "default", "state_uhs";
> + pinctrl-0 = <&mmc2_pins_default>;
> + pinctrl-1 = <&mmc2_pins_uhs>;
> +
> + assigned-clocks = <&topckgen CLK_TOP_MSDC50_2_SEL>;
> + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
> +
> + bus-width = <4>;
> + max-frequency = <200000000>;
> +
> + vmmc-supply = <&mt6357_vemc_reg>;
> + vqmmc-supply = <&mt6357_vio18_reg>;
> +
> + cap-sd-highspeed;
> + cap-sdio-irq;
> + wakeup-source;
> + hs400-ds-delay = <0x12012>;
> + keep-power-in-suspend;
> + non-removable;
> + sd-uhs-sdr104;
> + sd-uhs-sdr25;
> + sd-uhs-sdr50;
> +};
> +
> +&mt6357_pmic {
> + interrupt-parent = <&pio>;
> + interrupts = <145 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> +};
> +
> +&pio {
> + i2c0_pins: i2c0-pins {
> + pins {
> + pinmux = <MT8365_PIN_57_SDA0__FUNC_SDA0_0>,
> + <MT8365_PIN_58_SCL0__FUNC_SCL0_0>;
> + mediatek,pull-up-adv = <3>;
> + mediatek,drive-strength-adv = <00>;
> + bias-pull-up;
> + };
> + };
> +
> +
> + i2c1_pins: i2c1-pins {
> + pins {
> + pinmux = <MT8365_PIN_59_SDA1__FUNC_SDA1_0>,
> + <MT8365_PIN_60_SCL1__FUNC_SCL1_0>;
> + mediatek,pull-up-adv = <3>;
> + mediatek,drive-strength-adv = <00>;
> + bias-pull-up;
> + };
> + };
> +
> + i2c2_pins: i2c2-pins {
> + pins {
> + pinmux = <MT8365_PIN_61_SDA2__FUNC_SDA2_0>,
> + <MT8365_PIN_62_SCL2__FUNC_SCL2_0>;
> + mediatek,pull-up-adv = <3>;
> + mediatek,drive-strength-adv = <00>;
> + bias-pull-up;
> + };
> + };
> +
> + i2c3_pins: i2c3-pins {
> + pins {
> + pinmux = <MT8365_PIN_63_SDA3__FUNC_SDA3_0>,
> + <MT8365_PIN_64_SCL3__FUNC_SCL3_0>;
> + mediatek,pull-up-adv = <3>;
> + mediatek,drive-strength-adv = <00>;
> + bias-pull-up;
> + };
> + };
> +
> + keypad_pins: keypad-pins {
> + pins {
> + pinmux = <MT8365_PIN_22_KPROW0__FUNC_KPROW0>,
> + <MT8365_PIN_23_KPROW1__FUNC_KPROW1>,
> + <MT8365_PIN_24_KPCOL0__FUNC_KPCOL0>;
> + };
> + };
> +
> + mmc0_pins_default: mmc0-default-pins {
> + clk-pins {
> + pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
> + bias-pull-down;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
> + <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
> + <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
> + <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
> + <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
> + <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
> + <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
> + <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
> + <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
> + input-enable;
> + bias-pull-up;
> + };
> +
> + rst-pins {
> + pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
> + bias-pull-up;
> + };
> + };
> +
> + mmc0_pins_uhs: mmc0-uhs-pins{
> + clk-pins {
> + pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
> + drive-strength = <MTK_DRIVE_10mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
> + <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
> + <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
> + <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
> + <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
> + <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
> + <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
> + <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
> + <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
> + input-enable;
> + drive-strength = <MTK_DRIVE_10mA>;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> +
> + ds-pins {
> + pinmux = <MT8365_PIN_104_MSDC0_DSL__FUNC_MSDC0_DSL>;
> + drive-strength = <MTK_DRIVE_10mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + rst-pins {
> + pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
> + drive-strength = <MTK_DRIVE_10mA>;
> + bias-pull-up;
> + };
> + };
> +
> + mmc1_pins_default: mmc1-default-pins {
> + cd-pins {
> + pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
> + bias-pull-up;
> + };
> +
> + clk-pins {
> + pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
> + <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
> + <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
> + <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
> + <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
> + input-enable;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> + };
> +
> + mmc1_pins_uhs: mmc1-uhs-pins {
> + cd-pins {
> + pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
> + bias-pull-up;
> + };
> +
> + clk-pins {
> + pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
> + drive-strength = <MTK_DRIVE_8mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
> + <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
> + <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
> + <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
> + <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
> + input-enable;
> + drive-strength = <MTK_DRIVE_6mA>;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> + };
> +
> + mmc2_pins_default: mmc2-default-pins {
> + clk-pins {
> + pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
> + drive-strength = <MTK_DRIVE_4mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
> + <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
> + <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
> + <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
> + <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
> + input-enable;
> + drive-strength = <MTK_DRIVE_4mA>;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> +
> + sysrstb-en-pins {
> + pinmux = <MT8365_PIN_74_CMDAT6__FUNC_GPIO74>;
> + output-low;
> + };
> + };
> +
> + mmc2_pins_uhs: mmc2-uhs-pins {
> + clk-pins {
> + pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
> + drive-strength = <MTK_DRIVE_8mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
> + <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
> + <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
> + <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
> + <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
> + input-enable;
> + drive-strength = <MTK_DRIVE_8mA>;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> +
> + ds-pins {
> + pinmux = <MT8365_PIN_86_MSDC2_DSL__FUNC_MSDC2_DSL>;
> + drive-strength = <MTK_DRIVE_8mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + sysrstb-en-pins {
> + pinmux = <MT8365_PIN_126_DMIC3_CLK__FUNC_GPIO126>;
> + output-high;
> + };
> + };
> +
> + tca6416_pins: tca6416-pins {
> + rst-n-pins {
> + pinmux = <MT8365_PIN_78_CMHSYNC__FUNC_GPIO78>;
> + output-high;
> + };
> +
> + int-n-pins {
> + pinmux = <MT8365_PIN_79_CMVSYNC__FUNC_GPIO79>;
> + input-enable;
> + bias-pull-up;
> + };
> + };
> +
> + usb_pins: usb-pins {
> + hub-rst-pins {
> + pinmux = <MT8365_PIN_70_CMDAT2__FUNC_GPIO70>;
> + output-low;
> + };
> +
> + id-pins {
> + pinmux = <MT8365_PIN_39_URXD2__FUNC_GPIO39>;
> + input-enable;
> + bias-pull-up;
> + };
> +
> + vbus-pins {
> + pinmux = <MT8365_PIN_25_KPCOL1__FUNC_USB_DRVVBUS>;
> + };
> + };
> +};
> +
> +&ssusb {
> + status = "okay";
> +
> + pinctrl-0 = <&usb_pins>;
> + pinctrl-names = "default";
> +
> + /* Host mode only for now, TUSB322 support is missing. */
> + dr_mode = "host";
> + maximum-speed = "high-speed";
> + vusb33-supply = <&mt6357_vusb33_reg>;
Re-order please.
> +};
> +
> +&uart0 {
> + status = "okay";
> +};
> +
> +&usb_host {
> + status = "okay";
> +
> + vusb33-supply = <&mt6357_vusb33_reg>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
Order:
#address-cells = <1>;
#size-cells = <0>;
vusb33-supply = <&mt6357_vusb33_reg>;
status = "okay";
> +
> + hub@2 {
> + reg = <2>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet_usb: ethernet@1 {
> + compatible = "usb424,ec00";
> + reg = <1>;
> + };
> + };
> +};
--
Regards,
Alexandre
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 3/3] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
@ 2023-10-19 12:45 ` Alexandre Mergnat
0 siblings, 0 replies; 22+ messages in thread
From: Alexandre Mergnat @ 2023-10-19 12:45 UTC (permalink / raw)
To: Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Julien Stephan, Suhrid Subramaniam,
Ted Larson
On 16/10/2023 23:51, Laurent Pinchart wrote:
> Add a minimal device tree for the Genio i350 Pumpkin development board,
> which is based on a MediaTek MT8365.
>
> The device tree is based on an initial version by Fabien Parent Based
> written against the MediaTek BSP kernel ([1]). It has been cleaned up,
> some features have been added (GPIO LEDs, ethernet), and some features
> removed (audio, camera, display and dual-role USB). Those features will
> be added back once the corresponding DT bindings and/or drivers become
> available in the upstream kernel.
>
> [1] https://gitlab.com/mediatek/aiot/bsp/linux/-/blob/mtk-v5.15-dev/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>
> Co-developed-by: Fabien Parent <fparent@baylibre.com>
> Signed-off-by: Fabien Parent <fparent@baylibre.com>
> Co-developed-by: Paul Elder <paul.elder@ideasonboard.com>
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> Changes compared to the BSP version:
>
> - Add ethernet controller
> - Add GPIO LEDs
> - Add reserved memory region for BL31
> - Update board model and compatible
> - Rename enable-sdio-wakeup to wakeup-source
> - Drop audio support
> - Drop display support
> - Drop dual role USB support
> - Don't use underscores in node names
> - Normalize pinmux node names
> - Remove unneeded labels
> - Drop unneeded always-on
> - Drop unused pinmux nodes
> - Drop camera GPIO hog
> - Update copyright
> - Fix formatting
> - Sort alphabetically
> ---
> arch/arm64/boot/dts/mediatek/Makefile | 1 +
> .../boot/dts/mediatek/mt8365-pumpkin.dts | 542 ++++++++++++++++++
> 2 files changed, 543 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>
> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> index c99c3372a4b5..bbc232bdadc4 100644
> --- a/arch/arm64/boot/dts/mediatek/Makefile
> +++ b/arch/arm64/boot/dts/mediatek/Makefile
> @@ -53,4 +53,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r3.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-evk.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-pumpkin.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
> diff --git a/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> new file mode 100644
> index 000000000000..88fa5d19c627
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> @@ -0,0 +1,542 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2021 BayLibre, SAS.
> + * Copyright (c) 2023 Ideas on Board Oy
> + *
> + * Author: Fabien Parent <fparent@baylibre.com>
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/pinctrl/mt8365-pinfunc.h>
> +
> +#include "mt8365.dtsi"
> +#include "mt6357.dtsi"
> +
> +/ {
> + model = "OLogic Pumpkin i350 EVK";
> + compatible = "ologic,pumpkin-i350", "mediatek,mt8365";
> +
> + aliases {
> + ethernet0 = ðernet_usb;
> + mmc0 = &mmc0;
> + mmc1 = &mmc1;
> + mmc2 = &mmc2;
Are mmc aliases needed ?
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:921600n8";
> + };
> +
> + firmware {
> + optee {
> + compatible = "linaro,optee-tz";
> + method = "smc";
> + };
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> +
> + led-red {
> + gpios = <&gpio_exp 12 GPIO_ACTIVE_HIGH>;
> + color = <LED_COLOR_ID_RED>;
> + function = LED_FUNCTION_HEARTBEAT;
> + linux,default-trigger = "heartbeat";
> + };
> +
> + led-green {
> + gpios = <&gpio_exp 13 GPIO_ACTIVE_HIGH>;
> + color = <LED_COLOR_ID_GREEN>;
> + default-state = "off";
> + };
> + };
> +
> + memory@40000000 {
> + device_type = "memory";
> + reg = <0 0x40000000 0 0x80000000>;
> + };
> +
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
> + secmon@43000000 {
> + no-map;
> + reg = <0 0x43000000 0 0x30000>;
> + };
> +
> + /*
> + * 12 MiB reserved for OP-TEE (BL32)
> + * +-----------------------+ 0x43e0_0000
> + * | SHMEM 2MiB |
> + * +-----------------------+ 0x43c0_0000
> + * | | TA_RAM 8MiB |
> + * + TZDRAM +--------------+ 0x4340_0000
> + * | | TEE_RAM 2MiB |
> + * +-----------------------+ 0x4320_0000
> + */
> + optee@43200000 {
> + no-map;
> + reg = <0 0x43200000 0 0x00c00000>;
> + };
> + };
> +
> + usb_otg_vbus: usb-otg-vbus-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "otg_vbus";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + gpio = <&pio 25 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +};
> +
> +&cpu0 {
> + proc-supply = <&mt6357_vproc_reg>;
> + sram-supply = <&mt6357_vsram_proc_reg>;
> +};
> +
> +&cpu1 {
> + proc-supply = <&mt6357_vproc_reg>;
> + sram-supply = <&mt6357_vsram_proc_reg>;
> +};
> +
> +&cpu2 {
> + proc-supply = <&mt6357_vproc_reg>;
> + sram-supply = <&mt6357_vsram_proc_reg>;
> +};
> +
> +&cpu3 {
> + proc-supply = <&mt6357_vproc_reg>;
> + sram-supply = <&mt6357_vsram_proc_reg>;
> +};
> +
> +&i2c0 {
> + status = "okay" > +
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c0_pins>;
> +
> + clock-frequency = <100000>;
Property order:
- clock
- pinctrl
- status
Actually, status should be at the end.
Apply this for the other nodes please.
> +};
> +
> +&i2c1 {
> + status = "okay";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c1_pins>;
> +
> + clock-frequency = <100000 > +
> + gpio_exp: gpio@20 {
> + compatible = "ti,tca6416";
> + reg = <0x20>;
> + reset-gpios = <&pio 78 GPIO_ACTIVE_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&tca6416_pins>;
> +
> + gpio-controller;
> + #gpio-cells = <2>;
> + };
> +};
> +
> +&i2c2 {
> + status = "okay";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c2_pins>;
> +
> + clock-frequency = <100000>;
> +};
> +
> +&i2c3 {
> + status = "okay";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c3_pins>;
> +
> + clock-frequency = <100000>;
> +};
> +
> +&keypad {
> + status = "okay";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&keypad_pins>;
> +
> + keypad,num-rows = <2>;
> + keypad,num-columns = <1>;
> + mediatek,debounce-us = <32000>;
> + mediatek,double-keys;
> +
> + linux,keymap = <MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN)
> + MATRIX_KEY(0x01, 0x00, KEY_VOLUMEUP)>;
> +};
> +
> +/* eMMC */
> +&mmc0 {
> + status = "okay";
> +
> + pinctrl-names = "default", "state_uhs";
> + pinctrl-0 = <&mmc0_pins_default>;
> + pinctrl-1 = <&mmc0_pins_uhs>;
> +
> + assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
> + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
> +
> + bus-width = <8>;
> + max-frequency = <200000000>;
> +
> + vmmc-supply = <&mt6357_vemc_reg>;
> + vqmmc-supply = <&mt6357_vio18_reg>;
> +
> + cap-mmc-highspeed;
> + cap-mmc-hw-reset;
> + hs400-ds-delay = <0x12012>;
> + mmc-hs200-1_8v;
> + mmc-hs400-1_8v;
> + no-sd;
> + no-sdio;
> + non-removable;
That's how it should be ordered:
bus-width = <8>;
max-frequency = <200000000>;
cap-mmc-highspeed;
cap-mmc-hw-reset;
hs400-ds-delay = <0x12012>;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
no-sd;
no-sdio;
non-removable;
vmmc-supply = ...
vqmmc-supply = ...
pinctrl-0 ...
pinctrl-1 ...
pinctrl-names ...
status = "okay";
Apply this for other node please.
> +};
> +
> +/* SD card connector */
> +&mmc1 {
> + status = "okay";
> +
> + pinctrl-names = "default", "state_uhs";
> + pinctrl-0 = <&mmc1_pins_default>;
> + pinctrl-1 = <&mmc1_pins_uhs>;
> +
> + bus-width = <4>;
> + max-frequency = <200000000>;
> +
> + vmmc-supply = <&mt6357_vmch_reg>;
> + vqmmc-supply = <&mt6357_vmc_reg>;
> +
> + cap-sd-highspeed;
> + cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>;
> + sd-uhs-sdr104;
> + sd-uhs-sdr50;
> +};
> +
> +/* WiFi module */
> +&mmc2 {
> + status = "okay";
> +
> + pinctrl-names = "default", "state_uhs";
> + pinctrl-0 = <&mmc2_pins_default>;
> + pinctrl-1 = <&mmc2_pins_uhs>;
> +
> + assigned-clocks = <&topckgen CLK_TOP_MSDC50_2_SEL>;
> + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
> +
> + bus-width = <4>;
> + max-frequency = <200000000>;
> +
> + vmmc-supply = <&mt6357_vemc_reg>;
> + vqmmc-supply = <&mt6357_vio18_reg>;
> +
> + cap-sd-highspeed;
> + cap-sdio-irq;
> + wakeup-source;
> + hs400-ds-delay = <0x12012>;
> + keep-power-in-suspend;
> + non-removable;
> + sd-uhs-sdr104;
> + sd-uhs-sdr25;
> + sd-uhs-sdr50;
> +};
> +
> +&mt6357_pmic {
> + interrupt-parent = <&pio>;
> + interrupts = <145 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> +};
> +
> +&pio {
> + i2c0_pins: i2c0-pins {
> + pins {
> + pinmux = <MT8365_PIN_57_SDA0__FUNC_SDA0_0>,
> + <MT8365_PIN_58_SCL0__FUNC_SCL0_0>;
> + mediatek,pull-up-adv = <3>;
> + mediatek,drive-strength-adv = <00>;
> + bias-pull-up;
> + };
> + };
> +
> +
> + i2c1_pins: i2c1-pins {
> + pins {
> + pinmux = <MT8365_PIN_59_SDA1__FUNC_SDA1_0>,
> + <MT8365_PIN_60_SCL1__FUNC_SCL1_0>;
> + mediatek,pull-up-adv = <3>;
> + mediatek,drive-strength-adv = <00>;
> + bias-pull-up;
> + };
> + };
> +
> + i2c2_pins: i2c2-pins {
> + pins {
> + pinmux = <MT8365_PIN_61_SDA2__FUNC_SDA2_0>,
> + <MT8365_PIN_62_SCL2__FUNC_SCL2_0>;
> + mediatek,pull-up-adv = <3>;
> + mediatek,drive-strength-adv = <00>;
> + bias-pull-up;
> + };
> + };
> +
> + i2c3_pins: i2c3-pins {
> + pins {
> + pinmux = <MT8365_PIN_63_SDA3__FUNC_SDA3_0>,
> + <MT8365_PIN_64_SCL3__FUNC_SCL3_0>;
> + mediatek,pull-up-adv = <3>;
> + mediatek,drive-strength-adv = <00>;
> + bias-pull-up;
> + };
> + };
> +
> + keypad_pins: keypad-pins {
> + pins {
> + pinmux = <MT8365_PIN_22_KPROW0__FUNC_KPROW0>,
> + <MT8365_PIN_23_KPROW1__FUNC_KPROW1>,
> + <MT8365_PIN_24_KPCOL0__FUNC_KPCOL0>;
> + };
> + };
> +
> + mmc0_pins_default: mmc0-default-pins {
> + clk-pins {
> + pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
> + bias-pull-down;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
> + <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
> + <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
> + <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
> + <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
> + <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
> + <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
> + <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
> + <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
> + input-enable;
> + bias-pull-up;
> + };
> +
> + rst-pins {
> + pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
> + bias-pull-up;
> + };
> + };
> +
> + mmc0_pins_uhs: mmc0-uhs-pins{
> + clk-pins {
> + pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
> + drive-strength = <MTK_DRIVE_10mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
> + <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
> + <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
> + <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
> + <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
> + <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
> + <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
> + <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
> + <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
> + input-enable;
> + drive-strength = <MTK_DRIVE_10mA>;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> +
> + ds-pins {
> + pinmux = <MT8365_PIN_104_MSDC0_DSL__FUNC_MSDC0_DSL>;
> + drive-strength = <MTK_DRIVE_10mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + rst-pins {
> + pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
> + drive-strength = <MTK_DRIVE_10mA>;
> + bias-pull-up;
> + };
> + };
> +
> + mmc1_pins_default: mmc1-default-pins {
> + cd-pins {
> + pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
> + bias-pull-up;
> + };
> +
> + clk-pins {
> + pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
> + <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
> + <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
> + <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
> + <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
> + input-enable;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> + };
> +
> + mmc1_pins_uhs: mmc1-uhs-pins {
> + cd-pins {
> + pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
> + bias-pull-up;
> + };
> +
> + clk-pins {
> + pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
> + drive-strength = <MTK_DRIVE_8mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
> + <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
> + <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
> + <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
> + <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
> + input-enable;
> + drive-strength = <MTK_DRIVE_6mA>;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> + };
> +
> + mmc2_pins_default: mmc2-default-pins {
> + clk-pins {
> + pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
> + drive-strength = <MTK_DRIVE_4mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
> + <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
> + <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
> + <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
> + <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
> + input-enable;
> + drive-strength = <MTK_DRIVE_4mA>;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> +
> + sysrstb-en-pins {
> + pinmux = <MT8365_PIN_74_CMDAT6__FUNC_GPIO74>;
> + output-low;
> + };
> + };
> +
> + mmc2_pins_uhs: mmc2-uhs-pins {
> + clk-pins {
> + pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
> + drive-strength = <MTK_DRIVE_8mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + cmd-dat-pins {
> + pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
> + <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
> + <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
> + <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
> + <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
> + input-enable;
> + drive-strength = <MTK_DRIVE_8mA>;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> +
> + ds-pins {
> + pinmux = <MT8365_PIN_86_MSDC2_DSL__FUNC_MSDC2_DSL>;
> + drive-strength = <MTK_DRIVE_8mA>;
> + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> + };
> +
> + sysrstb-en-pins {
> + pinmux = <MT8365_PIN_126_DMIC3_CLK__FUNC_GPIO126>;
> + output-high;
> + };
> + };
> +
> + tca6416_pins: tca6416-pins {
> + rst-n-pins {
> + pinmux = <MT8365_PIN_78_CMHSYNC__FUNC_GPIO78>;
> + output-high;
> + };
> +
> + int-n-pins {
> + pinmux = <MT8365_PIN_79_CMVSYNC__FUNC_GPIO79>;
> + input-enable;
> + bias-pull-up;
> + };
> + };
> +
> + usb_pins: usb-pins {
> + hub-rst-pins {
> + pinmux = <MT8365_PIN_70_CMDAT2__FUNC_GPIO70>;
> + output-low;
> + };
> +
> + id-pins {
> + pinmux = <MT8365_PIN_39_URXD2__FUNC_GPIO39>;
> + input-enable;
> + bias-pull-up;
> + };
> +
> + vbus-pins {
> + pinmux = <MT8365_PIN_25_KPCOL1__FUNC_USB_DRVVBUS>;
> + };
> + };
> +};
> +
> +&ssusb {
> + status = "okay";
> +
> + pinctrl-0 = <&usb_pins>;
> + pinctrl-names = "default";
> +
> + /* Host mode only for now, TUSB322 support is missing. */
> + dr_mode = "host";
> + maximum-speed = "high-speed";
> + vusb33-supply = <&mt6357_vusb33_reg>;
Re-order please.
> +};
> +
> +&uart0 {
> + status = "okay";
> +};
> +
> +&usb_host {
> + status = "okay";
> +
> + vusb33-supply = <&mt6357_vusb33_reg>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
Order:
#address-cells = <1>;
#size-cells = <0>;
vusb33-supply = <&mt6357_vusb33_reg>;
status = "okay";
> +
> + hub@2 {
> + reg = <2>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet_usb: ethernet@1 {
> + compatible = "usb424,ec00";
> + reg = <1>;
> + };
> + };
> +};
--
Regards,
Alexandre
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 1/3] dt-bindings: vendor-prefixes: Add prefix for OLogic, Inc.
2023-10-16 21:51 ` Laurent Pinchart
@ 2023-10-19 12:46 ` Alexandre Mergnat
-1 siblings, 0 replies; 22+ messages in thread
From: Alexandre Mergnat @ 2023-10-19 12:46 UTC (permalink / raw)
To: Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Julien Stephan, Suhrid Subramaniam,
Ted Larson
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
On 16/10/2023 23:51, Laurent Pinchart wrote:
> Add a DT vendor prefix for OLogic, Inc. OLogic is a hardware and system
> design company that manufactures, among other things, development boards
> with MediaTek SoCs.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 573578db9509..247b724bc01f 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -981,6 +981,8 @@ patternProperties:
> description: Oki Electric Industry Co., Ltd.
> "^olimex,.*":
> description: OLIMEX Ltd.
> + "^ologic,.*":
> + description: OLogic, Inc.
> "^olpc,.*":
> description: One Laptop Per Child
> "^oneplus,.*":
--
Regards,
Alexandre
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 1/3] dt-bindings: vendor-prefixes: Add prefix for OLogic, Inc.
@ 2023-10-19 12:46 ` Alexandre Mergnat
0 siblings, 0 replies; 22+ messages in thread
From: Alexandre Mergnat @ 2023-10-19 12:46 UTC (permalink / raw)
To: Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Julien Stephan, Suhrid Subramaniam,
Ted Larson
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
On 16/10/2023 23:51, Laurent Pinchart wrote:
> Add a DT vendor prefix for OLogic, Inc. OLogic is a hardware and system
> design company that manufactures, among other things, development boards
> with MediaTek SoCs.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 573578db9509..247b724bc01f 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -981,6 +981,8 @@ patternProperties:
> description: Oki Electric Industry Co., Ltd.
> "^olimex,.*":
> description: OLIMEX Ltd.
> + "^ologic,.*":
> + description: OLogic, Inc.
> "^olpc,.*":
> description: One Laptop Per Child
> "^oneplus,.*":
--
Regards,
Alexandre
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 2/3] dt-bindings: arm64: dts: mediatek: Add ologic,pumpkin-i350 board
2023-10-16 21:51 ` Laurent Pinchart
@ 2023-10-19 12:46 ` Alexandre Mergnat
-1 siblings, 0 replies; 22+ messages in thread
From: Alexandre Mergnat @ 2023-10-19 12:46 UTC (permalink / raw)
To: Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Julien Stephan, Suhrid Subramaniam,
Ted Larson
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
On 16/10/2023 23:51, Laurent Pinchart wrote:
> Add a compatible string for the Pumpkin i350 board, an MT8365-based
> board developed by OLogic.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> Documentation/devicetree/bindings/arm/mediatek.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> index ae12b1cab9fb..dc34e62c6756 100644
> --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> @@ -247,6 +247,7 @@ properties:
> - items:
> - enum:
> - mediatek,mt8365-evk
> + - ologic,pumpkin-i350
> - const: mediatek,mt8365
> - items:
> - enum:
--
Regards,
Alexandre
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 2/3] dt-bindings: arm64: dts: mediatek: Add ologic,pumpkin-i350 board
@ 2023-10-19 12:46 ` Alexandre Mergnat
0 siblings, 0 replies; 22+ messages in thread
From: Alexandre Mergnat @ 2023-10-19 12:46 UTC (permalink / raw)
To: Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Paul Elder, Fabien Parent, Julien Stephan, Suhrid Subramaniam,
Ted Larson
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
On 16/10/2023 23:51, Laurent Pinchart wrote:
> Add a compatible string for the Pumpkin i350 board, an MT8365-based
> board developed by OLogic.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> Documentation/devicetree/bindings/arm/mediatek.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> index ae12b1cab9fb..dc34e62c6756 100644
> --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> @@ -247,6 +247,7 @@ properties:
> - items:
> - enum:
> - mediatek,mt8365-evk
> + - ologic,pumpkin-i350
> - const: mediatek,mt8365
> - items:
> - enum:
--
Regards,
Alexandre
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 3/3] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
2023-10-19 12:45 ` Alexandre Mergnat
@ 2023-10-19 21:09 ` Laurent Pinchart
-1 siblings, 0 replies; 22+ messages in thread
From: Laurent Pinchart @ 2023-10-19 21:09 UTC (permalink / raw)
To: Alexandre Mergnat
Cc: linux-mediatek, devicetree, linux-arm-kernel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Paul Elder, Fabien Parent,
Julien Stephan, Suhrid Subramaniam, Ted Larson
Hi Alexandre,
On Thu, Oct 19, 2023 at 02:45:36PM +0200, Alexandre Mergnat wrote:
> On 16/10/2023 23:51, Laurent Pinchart wrote:
> > Add a minimal device tree for the Genio i350 Pumpkin development board,
> > which is based on a MediaTek MT8365.
> >
> > The device tree is based on an initial version by Fabien Parent Based
> > written against the MediaTek BSP kernel ([1]). It has been cleaned up,
> > some features have been added (GPIO LEDs, ethernet), and some features
> > removed (audio, camera, display and dual-role USB). Those features will
> > be added back once the corresponding DT bindings and/or drivers become
> > available in the upstream kernel.
> >
> > [1] https://gitlab.com/mediatek/aiot/bsp/linux/-/blob/mtk-v5.15-dev/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> >
> > Co-developed-by: Fabien Parent <fparent@baylibre.com>
> > Signed-off-by: Fabien Parent <fparent@baylibre.com>
> > Co-developed-by: Paul Elder <paul.elder@ideasonboard.com>
> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> > Changes compared to the BSP version:
> >
> > - Add ethernet controller
> > - Add GPIO LEDs
> > - Add reserved memory region for BL31
> > - Update board model and compatible
> > - Rename enable-sdio-wakeup to wakeup-source
> > - Drop audio support
> > - Drop display support
> > - Drop dual role USB support
> > - Don't use underscores in node names
> > - Normalize pinmux node names
> > - Remove unneeded labels
> > - Drop unneeded always-on
> > - Drop unused pinmux nodes
> > - Drop camera GPIO hog
> > - Update copyright
> > - Fix formatting
> > - Sort alphabetically
> > ---
> > arch/arm64/boot/dts/mediatek/Makefile | 1 +
> > .../boot/dts/mediatek/mt8365-pumpkin.dts | 542 ++++++++++++++++++
> > 2 files changed, 543 insertions(+)
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> >
> > diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> > index c99c3372a4b5..bbc232bdadc4 100644
> > --- a/arch/arm64/boot/dts/mediatek/Makefile
> > +++ b/arch/arm64/boot/dts/mediatek/Makefile
> > @@ -53,4 +53,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r3.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-evk.dtb
> > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-pumpkin.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> > new file mode 100644
> > index 000000000000..88fa5d19c627
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> > @@ -0,0 +1,542 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (c) 2021 BayLibre, SAS.
> > + * Copyright (c) 2023 Ideas on Board Oy
> > + *
> > + * Author: Fabien Parent <fparent@baylibre.com>
> > + */
> > +
> > +/dts-v1/;
> > +
> > +#include <dt-bindings/gpio/gpio.h>
> > +#include <dt-bindings/input/input.h>
> > +#include <dt-bindings/leds/common.h>
> > +#include <dt-bindings/pinctrl/mt8365-pinfunc.h>
> > +
> > +#include "mt8365.dtsi"
> > +#include "mt6357.dtsi"
> > +
> > +/ {
> > + model = "OLogic Pumpkin i350 EVK";
> > + compatible = "ologic,pumpkin-i350", "mediatek,mt8365";
> > +
> > + aliases {
> > + ethernet0 = ðernet_usb;
> > + mmc0 = &mmc0;
> > + mmc1 = &mmc1;
> > + mmc2 = &mmc2;
>
> Are mmc aliases needed ?
Likely not. For mmc2, I don't think so. For mmc0 and mmc1, aliases
provide a fixed ordering that helps differentiating between the eMMC and
the external SD card. I don't mind dropping them if that's preferred.
> > + serial0 = &uart0;
> > + };
> > +
> > + chosen {
> > + stdout-path = "serial0:921600n8";
> > + };
> > +
> > + firmware {
> > + optee {
> > + compatible = "linaro,optee-tz";
> > + method = "smc";
> > + };
> > + };
> > +
> > + leds {
> > + compatible = "gpio-leds";
> > +
> > + led-red {
> > + gpios = <&gpio_exp 12 GPIO_ACTIVE_HIGH>;
> > + color = <LED_COLOR_ID_RED>;
> > + function = LED_FUNCTION_HEARTBEAT;
> > + linux,default-trigger = "heartbeat";
> > + };
> > +
> > + led-green {
> > + gpios = <&gpio_exp 13 GPIO_ACTIVE_HIGH>;
> > + color = <LED_COLOR_ID_GREEN>;
> > + default-state = "off";
> > + };
> > + };
> > +
> > + memory@40000000 {
> > + device_type = "memory";
> > + reg = <0 0x40000000 0 0x80000000>;
> > + };
> > +
> > + reserved-memory {
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > + ranges;
> > +
> > + /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
> > + secmon@43000000 {
> > + no-map;
> > + reg = <0 0x43000000 0 0x30000>;
> > + };
> > +
> > + /*
> > + * 12 MiB reserved for OP-TEE (BL32)
> > + * +-----------------------+ 0x43e0_0000
> > + * | SHMEM 2MiB |
> > + * +-----------------------+ 0x43c0_0000
> > + * | | TA_RAM 8MiB |
> > + * + TZDRAM +--------------+ 0x4340_0000
> > + * | | TEE_RAM 2MiB |
> > + * +-----------------------+ 0x4320_0000
> > + */
> > + optee@43200000 {
> > + no-map;
> > + reg = <0 0x43200000 0 0x00c00000>;
> > + };
> > + };
> > +
> > + usb_otg_vbus: usb-otg-vbus-regulator {
> > + compatible = "regulator-fixed";
> > + regulator-name = "otg_vbus";
> > + regulator-min-microvolt = <5000000>;
> > + regulator-max-microvolt = <5000000>;
> > + gpio = <&pio 25 GPIO_ACTIVE_HIGH>;
> > + enable-active-high;
> > + };
> > +};
> > +
> > +&cpu0 {
> > + proc-supply = <&mt6357_vproc_reg>;
> > + sram-supply = <&mt6357_vsram_proc_reg>;
> > +};
> > +
> > +&cpu1 {
> > + proc-supply = <&mt6357_vproc_reg>;
> > + sram-supply = <&mt6357_vsram_proc_reg>;
> > +};
> > +
> > +&cpu2 {
> > + proc-supply = <&mt6357_vproc_reg>;
> > + sram-supply = <&mt6357_vsram_proc_reg>;
> > +};
> > +
> > +&cpu3 {
> > + proc-supply = <&mt6357_vproc_reg>;
> > + sram-supply = <&mt6357_vsram_proc_reg>;
> > +};
> > +
> > +&i2c0 {
> > + status = "okay" > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c0_pins>;
> > +
> > + clock-frequency = <100000>;
>
> Property order:
> - clock
> - pinctrl
> - status
>
> Actually, status should be at the end.
> Apply this for the other nodes please.
OK, I'll reorder properties. Is there a document that clearly states the
preferred order ?
> > +};
> > +
> > +&i2c1 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c1_pins>;
> > +
> > + clock-frequency = <100000 > +
> > + gpio_exp: gpio@20 {
> > + compatible = "ti,tca6416";
> > + reg = <0x20>;
> > + reset-gpios = <&pio 78 GPIO_ACTIVE_LOW>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&tca6416_pins>;
> > +
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > + };
> > +};
> > +
> > +&i2c2 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c2_pins>;
> > +
> > + clock-frequency = <100000>;
> > +};
> > +
> > +&i2c3 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c3_pins>;
> > +
> > + clock-frequency = <100000>;
> > +};
> > +
> > +&keypad {
> > + status = "okay";
> > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&keypad_pins>;
> > +
> > + keypad,num-rows = <2>;
> > + keypad,num-columns = <1>;
> > + mediatek,debounce-us = <32000>;
> > + mediatek,double-keys;
> > +
> > + linux,keymap = <MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN)
> > + MATRIX_KEY(0x01, 0x00, KEY_VOLUMEUP)>;
> > +};
> > +
> > +/* eMMC */
> > +&mmc0 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default", "state_uhs";
> > + pinctrl-0 = <&mmc0_pins_default>;
> > + pinctrl-1 = <&mmc0_pins_uhs>;
> > +
> > + assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
> > + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
> > +
> > + bus-width = <8>;
> > + max-frequency = <200000000>;
> > +
> > + vmmc-supply = <&mt6357_vemc_reg>;
> > + vqmmc-supply = <&mt6357_vio18_reg>;
> > +
> > + cap-mmc-highspeed;
> > + cap-mmc-hw-reset;
> > + hs400-ds-delay = <0x12012>;
> > + mmc-hs200-1_8v;
> > + mmc-hs400-1_8v;
> > + no-sd;
> > + no-sdio;
> > + non-removable;
>
> That's how it should be ordered:
> bus-width = <8>;
> max-frequency = <200000000>;
>
> cap-mmc-highspeed;
> cap-mmc-hw-reset;
> hs400-ds-delay = <0x12012>;
> mmc-hs200-1_8v;
> mmc-hs400-1_8v;
> no-sd;
> no-sdio;
> non-removable;
>
> vmmc-supply = ...
> vqmmc-supply = ...
>
> pinctrl-0 ...
> pinctrl-1 ...
> pinctrl-names ...
>
> status = "okay";
>
> Apply this for other node please.
>
> > +};
> > +
> > +/* SD card connector */
> > +&mmc1 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default", "state_uhs";
> > + pinctrl-0 = <&mmc1_pins_default>;
> > + pinctrl-1 = <&mmc1_pins_uhs>;
> > +
> > + bus-width = <4>;
> > + max-frequency = <200000000>;
> > +
> > + vmmc-supply = <&mt6357_vmch_reg>;
> > + vqmmc-supply = <&mt6357_vmc_reg>;
> > +
> > + cap-sd-highspeed;
> > + cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>;
> > + sd-uhs-sdr104;
> > + sd-uhs-sdr50;
> > +};
> > +
> > +/* WiFi module */
> > +&mmc2 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default", "state_uhs";
> > + pinctrl-0 = <&mmc2_pins_default>;
> > + pinctrl-1 = <&mmc2_pins_uhs>;
> > +
> > + assigned-clocks = <&topckgen CLK_TOP_MSDC50_2_SEL>;
> > + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
> > +
> > + bus-width = <4>;
> > + max-frequency = <200000000>;
> > +
> > + vmmc-supply = <&mt6357_vemc_reg>;
> > + vqmmc-supply = <&mt6357_vio18_reg>;
> > +
> > + cap-sd-highspeed;
> > + cap-sdio-irq;
> > + wakeup-source;
> > + hs400-ds-delay = <0x12012>;
> > + keep-power-in-suspend;
> > + non-removable;
> > + sd-uhs-sdr104;
> > + sd-uhs-sdr25;
> > + sd-uhs-sdr50;
> > +};
> > +
> > +&mt6357_pmic {
> > + interrupt-parent = <&pio>;
> > + interrupts = <145 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > +};
> > +
> > +&pio {
> > + i2c0_pins: i2c0-pins {
> > + pins {
> > + pinmux = <MT8365_PIN_57_SDA0__FUNC_SDA0_0>,
> > + <MT8365_PIN_58_SCL0__FUNC_SCL0_0>;
> > + mediatek,pull-up-adv = <3>;
> > + mediatek,drive-strength-adv = <00>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > +
> > + i2c1_pins: i2c1-pins {
> > + pins {
> > + pinmux = <MT8365_PIN_59_SDA1__FUNC_SDA1_0>,
> > + <MT8365_PIN_60_SCL1__FUNC_SCL1_0>;
> > + mediatek,pull-up-adv = <3>;
> > + mediatek,drive-strength-adv = <00>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + i2c2_pins: i2c2-pins {
> > + pins {
> > + pinmux = <MT8365_PIN_61_SDA2__FUNC_SDA2_0>,
> > + <MT8365_PIN_62_SCL2__FUNC_SCL2_0>;
> > + mediatek,pull-up-adv = <3>;
> > + mediatek,drive-strength-adv = <00>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + i2c3_pins: i2c3-pins {
> > + pins {
> > + pinmux = <MT8365_PIN_63_SDA3__FUNC_SDA3_0>,
> > + <MT8365_PIN_64_SCL3__FUNC_SCL3_0>;
> > + mediatek,pull-up-adv = <3>;
> > + mediatek,drive-strength-adv = <00>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + keypad_pins: keypad-pins {
> > + pins {
> > + pinmux = <MT8365_PIN_22_KPROW0__FUNC_KPROW0>,
> > + <MT8365_PIN_23_KPROW1__FUNC_KPROW1>,
> > + <MT8365_PIN_24_KPCOL0__FUNC_KPCOL0>;
> > + };
> > + };
> > +
> > + mmc0_pins_default: mmc0-default-pins {
> > + clk-pins {
> > + pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
> > + bias-pull-down;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
> > + <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
> > + <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
> > + <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
> > + <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
> > + <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
> > + <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
> > + <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
> > + <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
> > + input-enable;
> > + bias-pull-up;
> > + };
> > +
> > + rst-pins {
> > + pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + mmc0_pins_uhs: mmc0-uhs-pins{
> > + clk-pins {
> > + pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
> > + drive-strength = <MTK_DRIVE_10mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
> > + <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
> > + <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
> > + <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
> > + <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
> > + <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
> > + <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
> > + <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
> > + <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
> > + input-enable;
> > + drive-strength = <MTK_DRIVE_10mA>;
> > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> > + };
> > +
> > + ds-pins {
> > + pinmux = <MT8365_PIN_104_MSDC0_DSL__FUNC_MSDC0_DSL>;
> > + drive-strength = <MTK_DRIVE_10mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + rst-pins {
> > + pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
> > + drive-strength = <MTK_DRIVE_10mA>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + mmc1_pins_default: mmc1-default-pins {
> > + cd-pins {
> > + pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
> > + bias-pull-up;
> > + };
> > +
> > + clk-pins {
> > + pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
> > + <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
> > + <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
> > + <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
> > + <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
> > + input-enable;
> > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> > + };
> > + };
> > +
> > + mmc1_pins_uhs: mmc1-uhs-pins {
> > + cd-pins {
> > + pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
> > + bias-pull-up;
> > + };
> > +
> > + clk-pins {
> > + pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
> > + drive-strength = <MTK_DRIVE_8mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
> > + <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
> > + <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
> > + <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
> > + <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
> > + input-enable;
> > + drive-strength = <MTK_DRIVE_6mA>;
> > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> > + };
> > + };
> > +
> > + mmc2_pins_default: mmc2-default-pins {
> > + clk-pins {
> > + pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
> > + drive-strength = <MTK_DRIVE_4mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
> > + <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
> > + <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
> > + <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
> > + <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
> > + input-enable;
> > + drive-strength = <MTK_DRIVE_4mA>;
> > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> > + };
> > +
> > + sysrstb-en-pins {
> > + pinmux = <MT8365_PIN_74_CMDAT6__FUNC_GPIO74>;
> > + output-low;
> > + };
> > + };
> > +
> > + mmc2_pins_uhs: mmc2-uhs-pins {
> > + clk-pins {
> > + pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
> > + drive-strength = <MTK_DRIVE_8mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
> > + <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
> > + <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
> > + <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
> > + <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
> > + input-enable;
> > + drive-strength = <MTK_DRIVE_8mA>;
> > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> > + };
> > +
> > + ds-pins {
> > + pinmux = <MT8365_PIN_86_MSDC2_DSL__FUNC_MSDC2_DSL>;
> > + drive-strength = <MTK_DRIVE_8mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + sysrstb-en-pins {
> > + pinmux = <MT8365_PIN_126_DMIC3_CLK__FUNC_GPIO126>;
> > + output-high;
> > + };
> > + };
> > +
> > + tca6416_pins: tca6416-pins {
> > + rst-n-pins {
> > + pinmux = <MT8365_PIN_78_CMHSYNC__FUNC_GPIO78>;
> > + output-high;
> > + };
> > +
> > + int-n-pins {
> > + pinmux = <MT8365_PIN_79_CMVSYNC__FUNC_GPIO79>;
> > + input-enable;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + usb_pins: usb-pins {
> > + hub-rst-pins {
> > + pinmux = <MT8365_PIN_70_CMDAT2__FUNC_GPIO70>;
> > + output-low;
> > + };
> > +
> > + id-pins {
> > + pinmux = <MT8365_PIN_39_URXD2__FUNC_GPIO39>;
> > + input-enable;
> > + bias-pull-up;
> > + };
> > +
> > + vbus-pins {
> > + pinmux = <MT8365_PIN_25_KPCOL1__FUNC_USB_DRVVBUS>;
> > + };
> > + };
> > +};
> > +
> > +&ssusb {
> > + status = "okay";
> > +
> > + pinctrl-0 = <&usb_pins>;
> > + pinctrl-names = "default";
> > +
> > + /* Host mode only for now, TUSB322 support is missing. */
> > + dr_mode = "host";
> > + maximum-speed = "high-speed";
> > + vusb33-supply = <&mt6357_vusb33_reg>;
>
> Re-order please.
>
> > +};
> > +
> > +&uart0 {
> > + status = "okay";
> > +};
> > +
> > +&usb_host {
> > + status = "okay";
> > +
> > + vusb33-supply = <&mt6357_vusb33_reg>;
> > +
> > + #address-cells = <1>;
> > + #size-cells = <0>;
>
> Order:
> #address-cells = <1>;
> #size-cells = <0>;
>
> vusb33-supply = <&mt6357_vusb33_reg>;
> status = "okay";
>
>
> > +
> > + hub@2 {
> > + reg = <2>;
> > +
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + ethernet_usb: ethernet@1 {
> > + compatible = "usb424,ec00";
> > + reg = <1>;
> > + };
> > + };
> > +};
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 3/3] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
@ 2023-10-19 21:09 ` Laurent Pinchart
0 siblings, 0 replies; 22+ messages in thread
From: Laurent Pinchart @ 2023-10-19 21:09 UTC (permalink / raw)
To: Alexandre Mergnat
Cc: linux-mediatek, devicetree, linux-arm-kernel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Paul Elder, Fabien Parent,
Julien Stephan, Suhrid Subramaniam, Ted Larson
Hi Alexandre,
On Thu, Oct 19, 2023 at 02:45:36PM +0200, Alexandre Mergnat wrote:
> On 16/10/2023 23:51, Laurent Pinchart wrote:
> > Add a minimal device tree for the Genio i350 Pumpkin development board,
> > which is based on a MediaTek MT8365.
> >
> > The device tree is based on an initial version by Fabien Parent Based
> > written against the MediaTek BSP kernel ([1]). It has been cleaned up,
> > some features have been added (GPIO LEDs, ethernet), and some features
> > removed (audio, camera, display and dual-role USB). Those features will
> > be added back once the corresponding DT bindings and/or drivers become
> > available in the upstream kernel.
> >
> > [1] https://gitlab.com/mediatek/aiot/bsp/linux/-/blob/mtk-v5.15-dev/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> >
> > Co-developed-by: Fabien Parent <fparent@baylibre.com>
> > Signed-off-by: Fabien Parent <fparent@baylibre.com>
> > Co-developed-by: Paul Elder <paul.elder@ideasonboard.com>
> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> > Changes compared to the BSP version:
> >
> > - Add ethernet controller
> > - Add GPIO LEDs
> > - Add reserved memory region for BL31
> > - Update board model and compatible
> > - Rename enable-sdio-wakeup to wakeup-source
> > - Drop audio support
> > - Drop display support
> > - Drop dual role USB support
> > - Don't use underscores in node names
> > - Normalize pinmux node names
> > - Remove unneeded labels
> > - Drop unneeded always-on
> > - Drop unused pinmux nodes
> > - Drop camera GPIO hog
> > - Update copyright
> > - Fix formatting
> > - Sort alphabetically
> > ---
> > arch/arm64/boot/dts/mediatek/Makefile | 1 +
> > .../boot/dts/mediatek/mt8365-pumpkin.dts | 542 ++++++++++++++++++
> > 2 files changed, 543 insertions(+)
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> >
> > diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> > index c99c3372a4b5..bbc232bdadc4 100644
> > --- a/arch/arm64/boot/dts/mediatek/Makefile
> > +++ b/arch/arm64/boot/dts/mediatek/Makefile
> > @@ -53,4 +53,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r3.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-evk.dtb
> > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-pumpkin.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> > new file mode 100644
> > index 000000000000..88fa5d19c627
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
> > @@ -0,0 +1,542 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Copyright (c) 2021 BayLibre, SAS.
> > + * Copyright (c) 2023 Ideas on Board Oy
> > + *
> > + * Author: Fabien Parent <fparent@baylibre.com>
> > + */
> > +
> > +/dts-v1/;
> > +
> > +#include <dt-bindings/gpio/gpio.h>
> > +#include <dt-bindings/input/input.h>
> > +#include <dt-bindings/leds/common.h>
> > +#include <dt-bindings/pinctrl/mt8365-pinfunc.h>
> > +
> > +#include "mt8365.dtsi"
> > +#include "mt6357.dtsi"
> > +
> > +/ {
> > + model = "OLogic Pumpkin i350 EVK";
> > + compatible = "ologic,pumpkin-i350", "mediatek,mt8365";
> > +
> > + aliases {
> > + ethernet0 = ðernet_usb;
> > + mmc0 = &mmc0;
> > + mmc1 = &mmc1;
> > + mmc2 = &mmc2;
>
> Are mmc aliases needed ?
Likely not. For mmc2, I don't think so. For mmc0 and mmc1, aliases
provide a fixed ordering that helps differentiating between the eMMC and
the external SD card. I don't mind dropping them if that's preferred.
> > + serial0 = &uart0;
> > + };
> > +
> > + chosen {
> > + stdout-path = "serial0:921600n8";
> > + };
> > +
> > + firmware {
> > + optee {
> > + compatible = "linaro,optee-tz";
> > + method = "smc";
> > + };
> > + };
> > +
> > + leds {
> > + compatible = "gpio-leds";
> > +
> > + led-red {
> > + gpios = <&gpio_exp 12 GPIO_ACTIVE_HIGH>;
> > + color = <LED_COLOR_ID_RED>;
> > + function = LED_FUNCTION_HEARTBEAT;
> > + linux,default-trigger = "heartbeat";
> > + };
> > +
> > + led-green {
> > + gpios = <&gpio_exp 13 GPIO_ACTIVE_HIGH>;
> > + color = <LED_COLOR_ID_GREEN>;
> > + default-state = "off";
> > + };
> > + };
> > +
> > + memory@40000000 {
> > + device_type = "memory";
> > + reg = <0 0x40000000 0 0x80000000>;
> > + };
> > +
> > + reserved-memory {
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > + ranges;
> > +
> > + /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
> > + secmon@43000000 {
> > + no-map;
> > + reg = <0 0x43000000 0 0x30000>;
> > + };
> > +
> > + /*
> > + * 12 MiB reserved for OP-TEE (BL32)
> > + * +-----------------------+ 0x43e0_0000
> > + * | SHMEM 2MiB |
> > + * +-----------------------+ 0x43c0_0000
> > + * | | TA_RAM 8MiB |
> > + * + TZDRAM +--------------+ 0x4340_0000
> > + * | | TEE_RAM 2MiB |
> > + * +-----------------------+ 0x4320_0000
> > + */
> > + optee@43200000 {
> > + no-map;
> > + reg = <0 0x43200000 0 0x00c00000>;
> > + };
> > + };
> > +
> > + usb_otg_vbus: usb-otg-vbus-regulator {
> > + compatible = "regulator-fixed";
> > + regulator-name = "otg_vbus";
> > + regulator-min-microvolt = <5000000>;
> > + regulator-max-microvolt = <5000000>;
> > + gpio = <&pio 25 GPIO_ACTIVE_HIGH>;
> > + enable-active-high;
> > + };
> > +};
> > +
> > +&cpu0 {
> > + proc-supply = <&mt6357_vproc_reg>;
> > + sram-supply = <&mt6357_vsram_proc_reg>;
> > +};
> > +
> > +&cpu1 {
> > + proc-supply = <&mt6357_vproc_reg>;
> > + sram-supply = <&mt6357_vsram_proc_reg>;
> > +};
> > +
> > +&cpu2 {
> > + proc-supply = <&mt6357_vproc_reg>;
> > + sram-supply = <&mt6357_vsram_proc_reg>;
> > +};
> > +
> > +&cpu3 {
> > + proc-supply = <&mt6357_vproc_reg>;
> > + sram-supply = <&mt6357_vsram_proc_reg>;
> > +};
> > +
> > +&i2c0 {
> > + status = "okay" > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c0_pins>;
> > +
> > + clock-frequency = <100000>;
>
> Property order:
> - clock
> - pinctrl
> - status
>
> Actually, status should be at the end.
> Apply this for the other nodes please.
OK, I'll reorder properties. Is there a document that clearly states the
preferred order ?
> > +};
> > +
> > +&i2c1 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c1_pins>;
> > +
> > + clock-frequency = <100000 > +
> > + gpio_exp: gpio@20 {
> > + compatible = "ti,tca6416";
> > + reg = <0x20>;
> > + reset-gpios = <&pio 78 GPIO_ACTIVE_LOW>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&tca6416_pins>;
> > +
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > + };
> > +};
> > +
> > +&i2c2 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c2_pins>;
> > +
> > + clock-frequency = <100000>;
> > +};
> > +
> > +&i2c3 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c3_pins>;
> > +
> > + clock-frequency = <100000>;
> > +};
> > +
> > +&keypad {
> > + status = "okay";
> > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&keypad_pins>;
> > +
> > + keypad,num-rows = <2>;
> > + keypad,num-columns = <1>;
> > + mediatek,debounce-us = <32000>;
> > + mediatek,double-keys;
> > +
> > + linux,keymap = <MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN)
> > + MATRIX_KEY(0x01, 0x00, KEY_VOLUMEUP)>;
> > +};
> > +
> > +/* eMMC */
> > +&mmc0 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default", "state_uhs";
> > + pinctrl-0 = <&mmc0_pins_default>;
> > + pinctrl-1 = <&mmc0_pins_uhs>;
> > +
> > + assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
> > + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
> > +
> > + bus-width = <8>;
> > + max-frequency = <200000000>;
> > +
> > + vmmc-supply = <&mt6357_vemc_reg>;
> > + vqmmc-supply = <&mt6357_vio18_reg>;
> > +
> > + cap-mmc-highspeed;
> > + cap-mmc-hw-reset;
> > + hs400-ds-delay = <0x12012>;
> > + mmc-hs200-1_8v;
> > + mmc-hs400-1_8v;
> > + no-sd;
> > + no-sdio;
> > + non-removable;
>
> That's how it should be ordered:
> bus-width = <8>;
> max-frequency = <200000000>;
>
> cap-mmc-highspeed;
> cap-mmc-hw-reset;
> hs400-ds-delay = <0x12012>;
> mmc-hs200-1_8v;
> mmc-hs400-1_8v;
> no-sd;
> no-sdio;
> non-removable;
>
> vmmc-supply = ...
> vqmmc-supply = ...
>
> pinctrl-0 ...
> pinctrl-1 ...
> pinctrl-names ...
>
> status = "okay";
>
> Apply this for other node please.
>
> > +};
> > +
> > +/* SD card connector */
> > +&mmc1 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default", "state_uhs";
> > + pinctrl-0 = <&mmc1_pins_default>;
> > + pinctrl-1 = <&mmc1_pins_uhs>;
> > +
> > + bus-width = <4>;
> > + max-frequency = <200000000>;
> > +
> > + vmmc-supply = <&mt6357_vmch_reg>;
> > + vqmmc-supply = <&mt6357_vmc_reg>;
> > +
> > + cap-sd-highspeed;
> > + cd-gpios = <&pio 76 GPIO_ACTIVE_LOW>;
> > + sd-uhs-sdr104;
> > + sd-uhs-sdr50;
> > +};
> > +
> > +/* WiFi module */
> > +&mmc2 {
> > + status = "okay";
> > +
> > + pinctrl-names = "default", "state_uhs";
> > + pinctrl-0 = <&mmc2_pins_default>;
> > + pinctrl-1 = <&mmc2_pins_uhs>;
> > +
> > + assigned-clocks = <&topckgen CLK_TOP_MSDC50_2_SEL>;
> > + assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>;
> > +
> > + bus-width = <4>;
> > + max-frequency = <200000000>;
> > +
> > + vmmc-supply = <&mt6357_vemc_reg>;
> > + vqmmc-supply = <&mt6357_vio18_reg>;
> > +
> > + cap-sd-highspeed;
> > + cap-sdio-irq;
> > + wakeup-source;
> > + hs400-ds-delay = <0x12012>;
> > + keep-power-in-suspend;
> > + non-removable;
> > + sd-uhs-sdr104;
> > + sd-uhs-sdr25;
> > + sd-uhs-sdr50;
> > +};
> > +
> > +&mt6357_pmic {
> > + interrupt-parent = <&pio>;
> > + interrupts = <145 IRQ_TYPE_LEVEL_HIGH>;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > +};
> > +
> > +&pio {
> > + i2c0_pins: i2c0-pins {
> > + pins {
> > + pinmux = <MT8365_PIN_57_SDA0__FUNC_SDA0_0>,
> > + <MT8365_PIN_58_SCL0__FUNC_SCL0_0>;
> > + mediatek,pull-up-adv = <3>;
> > + mediatek,drive-strength-adv = <00>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > +
> > + i2c1_pins: i2c1-pins {
> > + pins {
> > + pinmux = <MT8365_PIN_59_SDA1__FUNC_SDA1_0>,
> > + <MT8365_PIN_60_SCL1__FUNC_SCL1_0>;
> > + mediatek,pull-up-adv = <3>;
> > + mediatek,drive-strength-adv = <00>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + i2c2_pins: i2c2-pins {
> > + pins {
> > + pinmux = <MT8365_PIN_61_SDA2__FUNC_SDA2_0>,
> > + <MT8365_PIN_62_SCL2__FUNC_SCL2_0>;
> > + mediatek,pull-up-adv = <3>;
> > + mediatek,drive-strength-adv = <00>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + i2c3_pins: i2c3-pins {
> > + pins {
> > + pinmux = <MT8365_PIN_63_SDA3__FUNC_SDA3_0>,
> > + <MT8365_PIN_64_SCL3__FUNC_SCL3_0>;
> > + mediatek,pull-up-adv = <3>;
> > + mediatek,drive-strength-adv = <00>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + keypad_pins: keypad-pins {
> > + pins {
> > + pinmux = <MT8365_PIN_22_KPROW0__FUNC_KPROW0>,
> > + <MT8365_PIN_23_KPROW1__FUNC_KPROW1>,
> > + <MT8365_PIN_24_KPCOL0__FUNC_KPCOL0>;
> > + };
> > + };
> > +
> > + mmc0_pins_default: mmc0-default-pins {
> > + clk-pins {
> > + pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
> > + bias-pull-down;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
> > + <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
> > + <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
> > + <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
> > + <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
> > + <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
> > + <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
> > + <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
> > + <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
> > + input-enable;
> > + bias-pull-up;
> > + };
> > +
> > + rst-pins {
> > + pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + mmc0_pins_uhs: mmc0-uhs-pins{
> > + clk-pins {
> > + pinmux = <MT8365_PIN_99_MSDC0_CLK__FUNC_MSDC0_CLK>;
> > + drive-strength = <MTK_DRIVE_10mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_103_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
> > + <MT8365_PIN_102_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
> > + <MT8365_PIN_101_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
> > + <MT8365_PIN_100_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
> > + <MT8365_PIN_96_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
> > + <MT8365_PIN_95_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
> > + <MT8365_PIN_94_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
> > + <MT8365_PIN_93_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
> > + <MT8365_PIN_98_MSDC0_CMD__FUNC_MSDC0_CMD>;
> > + input-enable;
> > + drive-strength = <MTK_DRIVE_10mA>;
> > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> > + };
> > +
> > + ds-pins {
> > + pinmux = <MT8365_PIN_104_MSDC0_DSL__FUNC_MSDC0_DSL>;
> > + drive-strength = <MTK_DRIVE_10mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + rst-pins {
> > + pinmux = <MT8365_PIN_97_MSDC0_RSTB__FUNC_MSDC0_RSTB>;
> > + drive-strength = <MTK_DRIVE_10mA>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + mmc1_pins_default: mmc1-default-pins {
> > + cd-pins {
> > + pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
> > + bias-pull-up;
> > + };
> > +
> > + clk-pins {
> > + pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
> > + <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
> > + <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
> > + <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
> > + <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
> > + input-enable;
> > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> > + };
> > + };
> > +
> > + mmc1_pins_uhs: mmc1-uhs-pins {
> > + cd-pins {
> > + pinmux = <MT8365_PIN_76_CMDAT8__FUNC_GPIO76>;
> > + bias-pull-up;
> > + };
> > +
> > + clk-pins {
> > + pinmux = <MT8365_PIN_88_MSDC1_CLK__FUNC_MSDC1_CLK>;
> > + drive-strength = <MTK_DRIVE_8mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_89_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
> > + <MT8365_PIN_90_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
> > + <MT8365_PIN_91_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
> > + <MT8365_PIN_92_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
> > + <MT8365_PIN_87_MSDC1_CMD__FUNC_MSDC1_CMD>;
> > + input-enable;
> > + drive-strength = <MTK_DRIVE_6mA>;
> > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> > + };
> > + };
> > +
> > + mmc2_pins_default: mmc2-default-pins {
> > + clk-pins {
> > + pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
> > + drive-strength = <MTK_DRIVE_4mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
> > + <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
> > + <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
> > + <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
> > + <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
> > + input-enable;
> > + drive-strength = <MTK_DRIVE_4mA>;
> > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> > + };
> > +
> > + sysrstb-en-pins {
> > + pinmux = <MT8365_PIN_74_CMDAT6__FUNC_GPIO74>;
> > + output-low;
> > + };
> > + };
> > +
> > + mmc2_pins_uhs: mmc2-uhs-pins {
> > + clk-pins {
> > + pinmux = <MT8365_PIN_81_MSDC2_CLK__FUNC_MSDC2_CLK>;
> > + drive-strength = <MTK_DRIVE_8mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + cmd-dat-pins {
> > + pinmux = <MT8365_PIN_82_MSDC2_DAT0__FUNC_MSDC2_DAT0>,
> > + <MT8365_PIN_83_MSDC2_DAT1__FUNC_MSDC2_DAT1>,
> > + <MT8365_PIN_84_MSDC2_DAT2__FUNC_MSDC2_DAT2>,
> > + <MT8365_PIN_85_MSDC2_DAT3__FUNC_MSDC2_DAT3>,
> > + <MT8365_PIN_80_MSDC2_CMD__FUNC_MSDC2_CMD>;
> > + input-enable;
> > + drive-strength = <MTK_DRIVE_8mA>;
> > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> > + };
> > +
> > + ds-pins {
> > + pinmux = <MT8365_PIN_86_MSDC2_DSL__FUNC_MSDC2_DSL>;
> > + drive-strength = <MTK_DRIVE_8mA>;
> > + bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
> > + };
> > +
> > + sysrstb-en-pins {
> > + pinmux = <MT8365_PIN_126_DMIC3_CLK__FUNC_GPIO126>;
> > + output-high;
> > + };
> > + };
> > +
> > + tca6416_pins: tca6416-pins {
> > + rst-n-pins {
> > + pinmux = <MT8365_PIN_78_CMHSYNC__FUNC_GPIO78>;
> > + output-high;
> > + };
> > +
> > + int-n-pins {
> > + pinmux = <MT8365_PIN_79_CMVSYNC__FUNC_GPIO79>;
> > + input-enable;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + usb_pins: usb-pins {
> > + hub-rst-pins {
> > + pinmux = <MT8365_PIN_70_CMDAT2__FUNC_GPIO70>;
> > + output-low;
> > + };
> > +
> > + id-pins {
> > + pinmux = <MT8365_PIN_39_URXD2__FUNC_GPIO39>;
> > + input-enable;
> > + bias-pull-up;
> > + };
> > +
> > + vbus-pins {
> > + pinmux = <MT8365_PIN_25_KPCOL1__FUNC_USB_DRVVBUS>;
> > + };
> > + };
> > +};
> > +
> > +&ssusb {
> > + status = "okay";
> > +
> > + pinctrl-0 = <&usb_pins>;
> > + pinctrl-names = "default";
> > +
> > + /* Host mode only for now, TUSB322 support is missing. */
> > + dr_mode = "host";
> > + maximum-speed = "high-speed";
> > + vusb33-supply = <&mt6357_vusb33_reg>;
>
> Re-order please.
>
> > +};
> > +
> > +&uart0 {
> > + status = "okay";
> > +};
> > +
> > +&usb_host {
> > + status = "okay";
> > +
> > + vusb33-supply = <&mt6357_vusb33_reg>;
> > +
> > + #address-cells = <1>;
> > + #size-cells = <0>;
>
> Order:
> #address-cells = <1>;
> #size-cells = <0>;
>
> vusb33-supply = <&mt6357_vusb33_reg>;
> status = "okay";
>
>
> > +
> > + hub@2 {
> > + reg = <2>;
> > +
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + ethernet_usb: ethernet@1 {
> > + compatible = "usb424,ec00";
> > + reg = <1>;
> > + };
> > + };
> > +};
--
Regards,
Laurent Pinchart
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 3/3] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
2023-10-19 12:45 ` Alexandre Mergnat
@ 2023-10-20 8:19 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 22+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-10-20 8:19 UTC (permalink / raw)
To: Alexandre Mergnat, Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, Paul Elder, Fabien Parent,
Julien Stephan, Suhrid Subramaniam, Ted Larson
Il 19/10/23 14:45, Alexandre Mergnat ha scritto:
>
>
> On 16/10/2023 23:51, Laurent Pinchart wrote:
>> Add a minimal device tree for the Genio i350 Pumpkin development board,
>> which is based on a MediaTek MT8365.
>>
>> The device tree is based on an initial version by Fabien Parent Based
>> written against the MediaTek BSP kernel ([1]). It has been cleaned up,
>> some features have been added (GPIO LEDs, ethernet), and some features
>> removed (audio, camera, display and dual-role USB). Those features will
>> be added back once the corresponding DT bindings and/or drivers become
>> available in the upstream kernel.
>>
>> [1]
>> https://gitlab.com/mediatek/aiot/bsp/linux/-/blob/mtk-v5.15-dev/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>>
>> Co-developed-by: Fabien Parent <fparent@baylibre.com>
>> Signed-off-by: Fabien Parent <fparent@baylibre.com>
>> Co-developed-by: Paul Elder <paul.elder@ideasonboard.com>
>> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> ---
>> Changes compared to the BSP version:
>>
>> - Add ethernet controller
>> - Add GPIO LEDs
>> - Add reserved memory region for BL31
>> - Update board model and compatible
>> - Rename enable-sdio-wakeup to wakeup-source
>> - Drop audio support
>> - Drop display support
>> - Drop dual role USB support
>> - Don't use underscores in node names
>> - Normalize pinmux node names
>> - Remove unneeded labels
>> - Drop unneeded always-on
>> - Drop unused pinmux nodes
>> - Drop camera GPIO hog
>> - Update copyright
>> - Fix formatting
>> - Sort alphabetically
>> ---
>> arch/arm64/boot/dts/mediatek/Makefile | 1 +
>> .../boot/dts/mediatek/mt8365-pumpkin.dts | 542 ++++++++++++++++++
>> 2 files changed, 543 insertions(+)
>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/Makefile
>> b/arch/arm64/boot/dts/mediatek/Makefile
>> index c99c3372a4b5..bbc232bdadc4 100644
>> --- a/arch/arm64/boot/dts/mediatek/Makefile
>> +++ b/arch/arm64/boot/dts/mediatek/Makefile
>> @@ -53,4 +53,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r3.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-evk.dtb
>> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-pumpkin.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
>> diff --git a/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>> b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>> new file mode 100644
>> index 000000000000..88fa5d19c627
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>> @@ -0,0 +1,542 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) 2021 BayLibre, SAS.
>> + * Copyright (c) 2023 Ideas on Board Oy
>> + *
>> + * Author: Fabien Parent <fparent@baylibre.com>
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/input/input.h>
>> +#include <dt-bindings/leds/common.h>
>> +#include <dt-bindings/pinctrl/mt8365-pinfunc.h>
>> +
>> +#include "mt8365.dtsi"
>> +#include "mt6357.dtsi"
>> +
>> +/ {
>> + model = "OLogic Pumpkin i350 EVK";
>> + compatible = "ologic,pumpkin-i350", "mediatek,mt8365";
>> +
>> + aliases {
>> + ethernet0 = ðernet_usb;
>> + mmc0 = &mmc0;
>> + mmc1 = &mmc1;
>> + mmc2 = &mmc2;
>
> Are mmc aliases needed ?
>
This makes sure that, for example, the eMMC is always mmcblk0, and
that a (micro)SD card always has mmcblk1.
So yes, they are.
Cheers,
Angelo
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v1 3/3] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350
@ 2023-10-20 8:19 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 22+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-10-20 8:19 UTC (permalink / raw)
To: Alexandre Mergnat, Laurent Pinchart, linux-mediatek
Cc: devicetree, linux-arm-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, Paul Elder, Fabien Parent,
Julien Stephan, Suhrid Subramaniam, Ted Larson
Il 19/10/23 14:45, Alexandre Mergnat ha scritto:
>
>
> On 16/10/2023 23:51, Laurent Pinchart wrote:
>> Add a minimal device tree for the Genio i350 Pumpkin development board,
>> which is based on a MediaTek MT8365.
>>
>> The device tree is based on an initial version by Fabien Parent Based
>> written against the MediaTek BSP kernel ([1]). It has been cleaned up,
>> some features have been added (GPIO LEDs, ethernet), and some features
>> removed (audio, camera, display and dual-role USB). Those features will
>> be added back once the corresponding DT bindings and/or drivers become
>> available in the upstream kernel.
>>
>> [1]
>> https://gitlab.com/mediatek/aiot/bsp/linux/-/blob/mtk-v5.15-dev/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>>
>> Co-developed-by: Fabien Parent <fparent@baylibre.com>
>> Signed-off-by: Fabien Parent <fparent@baylibre.com>
>> Co-developed-by: Paul Elder <paul.elder@ideasonboard.com>
>> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> ---
>> Changes compared to the BSP version:
>>
>> - Add ethernet controller
>> - Add GPIO LEDs
>> - Add reserved memory region for BL31
>> - Update board model and compatible
>> - Rename enable-sdio-wakeup to wakeup-source
>> - Drop audio support
>> - Drop display support
>> - Drop dual role USB support
>> - Don't use underscores in node names
>> - Normalize pinmux node names
>> - Remove unneeded labels
>> - Drop unneeded always-on
>> - Drop unused pinmux nodes
>> - Drop camera GPIO hog
>> - Update copyright
>> - Fix formatting
>> - Sort alphabetically
>> ---
>> arch/arm64/boot/dts/mediatek/Makefile | 1 +
>> .../boot/dts/mediatek/mt8365-pumpkin.dts | 542 ++++++++++++++++++
>> 2 files changed, 543 insertions(+)
>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/Makefile
>> b/arch/arm64/boot/dts/mediatek/Makefile
>> index c99c3372a4b5..bbc232bdadc4 100644
>> --- a/arch/arm64/boot/dts/mediatek/Makefile
>> +++ b/arch/arm64/boot/dts/mediatek/Makefile
>> @@ -53,4 +53,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r3.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-evk.dtb
>> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-pumpkin.dtb
>> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
>> diff --git a/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>> b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>> new file mode 100644
>> index 000000000000..88fa5d19c627
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/mediatek/mt8365-pumpkin.dts
>> @@ -0,0 +1,542 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) 2021 BayLibre, SAS.
>> + * Copyright (c) 2023 Ideas on Board Oy
>> + *
>> + * Author: Fabien Parent <fparent@baylibre.com>
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/input/input.h>
>> +#include <dt-bindings/leds/common.h>
>> +#include <dt-bindings/pinctrl/mt8365-pinfunc.h>
>> +
>> +#include "mt8365.dtsi"
>> +#include "mt6357.dtsi"
>> +
>> +/ {
>> + model = "OLogic Pumpkin i350 EVK";
>> + compatible = "ologic,pumpkin-i350", "mediatek,mt8365";
>> +
>> + aliases {
>> + ethernet0 = ðernet_usb;
>> + mmc0 = &mmc0;
>> + mmc1 = &mmc1;
>> + mmc2 = &mmc2;
>
> Are mmc aliases needed ?
>
This makes sure that, for example, the eMMC is always mmcblk0, and
that a (micro)SD card always has mmcblk1.
So yes, they are.
Cheers,
Angelo
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2023-10-20 8:19 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-16 21:51 [PATCH v1 0/2] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350 Laurent Pinchart
2023-10-16 21:51 ` Laurent Pinchart
2023-10-16 21:51 ` [PATCH v1 1/3] dt-bindings: vendor-prefixes: Add prefix for OLogic, Inc Laurent Pinchart
2023-10-16 21:51 ` Laurent Pinchart
2023-10-17 6:18 ` Krzysztof Kozlowski
2023-10-17 6:18 ` Krzysztof Kozlowski
2023-10-19 12:46 ` Alexandre Mergnat
2023-10-19 12:46 ` Alexandre Mergnat
2023-10-16 21:51 ` [PATCH v1 2/3] dt-bindings: arm64: dts: mediatek: Add ologic,pumpkin-i350 board Laurent Pinchart
2023-10-16 21:51 ` Laurent Pinchart
2023-10-17 6:20 ` Krzysztof Kozlowski
2023-10-17 6:20 ` Krzysztof Kozlowski
2023-10-19 12:46 ` Alexandre Mergnat
2023-10-19 12:46 ` Alexandre Mergnat
2023-10-16 21:51 ` [PATCH v1 3/3] arm64: dts: mediatek: Add device tree for MT8365-based Pumpkin i350 Laurent Pinchart
2023-10-16 21:51 ` Laurent Pinchart
2023-10-19 12:45 ` Alexandre Mergnat
2023-10-19 12:45 ` Alexandre Mergnat
2023-10-19 21:09 ` Laurent Pinchart
2023-10-19 21:09 ` Laurent Pinchart
2023-10-20 8:19 ` AngeloGioacchino Del Regno
2023-10-20 8:19 ` AngeloGioacchino Del Regno
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.