Hi everyone,
This series adds device trees for the various MT8186 Chromebooks that
were initially released. These are the Tentacruel / Tentacool devices
released by ASUS, and the Steelix / Rusty / Magneton devices released
by Lenovo. The device trees are taken from the downstream ChromeOS v5.15
kernel, ported to mainline and cleaned up.
Corsola is the Google codename given to the MT8186 platform. This
platform has two reference designs, Krabby and Kingler. Kingler was not
used in any actual product, and is therefor not included. Steelix is
an alternative design put forward and is effectively a mix-and-match of
the two reference designs.
Most of the core design is shared between the variants. The differences
are on which external components, such as the display bridges, are used.
Patch 1 cleans up the current list of MediaTek boards. The entries are
reordered by SoC model first, then by board name.
Patch 2 through 5 add DT binding entries for the Tentacruel/Tentacool,
Steelix, Rusty, and Magneton Chromebooks.
Patch 6 through 9 add board device tree files for these devices. Patch 6
also adds the corsola dtsi file for the commonalities between the designs,
as well as a dtsi file for the krabby reference design.
Currently external display support is missing. Audio is not working, as
enabling the audio DSP causes my test systems to hang.
Please have a look and test if possible.
Regards
ChenYu
Chen-Yu Tsai (9):
dt-bindings: arm: mediatek: Sort entries by SoC then board compatibles
dt-bindings: arm: mediatek: Add MT8186 Tentacruel / Tentacool
Chromebooks
dt-bindings: arm: mediatek: Add MT8186 Steelix Chromebook
dt-bindings: arm: mediatek: Add MT8186 Rusty Chromebook
dt-bindings: arm: mediatek: Add MT8186 Magneton Chromebooks
arm64: dts: mediatek: Add MT8186 Krabby platform based Tentacruel /
Tentacool
arm64: dts: mediatek: Introduce MT8186 Steelix
arm64: dts: mediatek: Add MT8186 Steelix platform based Rusty
arm64: dts: mediatek: Add MT8186 Magneton Chromebooks
.../devicetree/bindings/arm/mediatek.yaml | 180 +-
arch/arm64/boot/dts/mediatek/Makefile | 10 +
.../dts/mediatek/mt8186-corsola-krabby.dtsi | 130 ++
.../mt8186-corsola-magneton-sku393216.dts | 38 +
.../mt8186-corsola-magneton-sku393217.dts | 38 +
.../mt8186-corsola-magneton-sku393218.dts | 21 +
.../mt8186-corsola-rusty-sku196608.dts | 21 +
.../mt8186-corsola-steelix-sku131072.dts | 18 +
.../mt8186-corsola-steelix-sku131073.dts | 18 +
.../dts/mediatek/mt8186-corsola-steelix.dtsi | 197 ++
.../mt8186-corsola-tentacool-sku327681.dts | 49 +
.../mt8186-corsola-tentacool-sku327683.dts | 26 +
.../mt8186-corsola-tentacruel-sku262144.dts | 44 +
.../mt8186-corsola-tentacruel-sku262148.dts | 28 +
.../boot/dts/mediatek/mt8186-corsola.dtsi | 1704 +++++++++++++++++
15 files changed, 2461 insertions(+), 61 deletions(-)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393216.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393217.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393218.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-rusty-sku196608.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
--
2.42.0.655.g421f12c284-goog
Add an entry for the MT8186 based Rusty Chromebook, also known as the
Lenovo 100e Chromebook Gen 4.
Signed-off-by: Chen-Yu Tsai <[email protected]>
---
Documentation/devicetree/bindings/arm/mediatek.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index fafd5e18f640..5e5834d9865f 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -206,6 +206,12 @@ properties:
- enum:
- mediatek,mt8183-pumpkin
- const: mediatek,mt8183
+ - description: Google Rusty (Lenovo 100e Chromebook Gen 4)
+ items:
+ - const: google,steelix-sku196608
+ - const: google,steelix-sku196609
+ - const: google,steelix
+ - const: mediatek,mt8186
- description: Google Steelix (Lenovo 300e Yoga Chromebook Gen 4)
items:
- enum:
--
2.42.0.655.g421f12c284-goog
Some of the new MediaTek board entries were inserted in a chronological
order, or just randomly. This makes it harder to search for an entry.
Sort the entries by first grouping by SoC, then sorting by board
compatible strings. Also add a comment at the top asking people to do
the same.
Signed-off-by: Chen-Yu Tsai <[email protected]>
---
.../devicetree/bindings/arm/mediatek.yaml | 123 +++++++++---------
1 file changed, 62 insertions(+), 61 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index a5999b3afc35..60337b439744 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -17,6 +17,7 @@ properties:
const: '/'
compatible:
oneOf:
+ # Sort by SoC (last) compatible, then board compatible
- items:
- enum:
- mediatek,mt2701-evb
@@ -129,71 +130,10 @@ properties:
- enum:
- mediatek,mt8173-evb
- const: mediatek,mt8173
- - items:
- - enum:
- - mediatek,mt8183-evb
- - const: mediatek,mt8183
- - description: Google Hayato rev5
- items:
- - const: google,hayato-rev5-sku2
- - const: google,hayato-sku2
- - const: google,hayato
- - const: mediatek,mt8192
- - description: Google Hayato
- items:
- - const: google,hayato-rev1
- - const: google,hayato
- - const: mediatek,mt8192
- - description: Google Spherion rev4 (Acer Chromebook 514)
- items:
- - const: google,spherion-rev4
- - const: google,spherion
- - const: mediatek,mt8192
- - description: Google Spherion (Acer Chromebook 514)
- items:
- - const: google,spherion-rev3
- - const: google,spherion-rev2
- - const: google,spherion-rev1
- - const: google,spherion-rev0
- - const: google,spherion
- - const: mediatek,mt8192
- - description: Acer Tomato (Acer Chromebook Spin 513 CP513-2H)
- items:
- - enum:
- - google,tomato-rev2
- - google,tomato-rev1
- - const: google,tomato
- - const: mediatek,mt8195
- - description: Acer Tomato rev3 - 4 (Acer Chromebook Spin 513 CP513-2H)
- items:
- - const: google,tomato-rev4
- - const: google,tomato-rev3
- - const: google,tomato
- - const: mediatek,mt8195
- - items:
- - enum:
- - mediatek,mt8186-evb
- - const: mediatek,mt8186
- - items:
- - enum:
- - mediatek,mt8192-evb
- - const: mediatek,mt8192
- - items:
- - enum:
- - mediatek,mt8195-demo
- - mediatek,mt8195-evb
- - const: mediatek,mt8195
- description: Google Burnet (HP Chromebook x360 11MK G3 EE)
items:
- const: google,burnet
- const: mediatek,mt8183
- - description: Google Krane (Lenovo IdeaPad Duet, 10e,...)
- items:
- - enum:
- - google,krane-sku0
- - google,krane-sku176
- - const: google,krane
- - const: mediatek,mt8183
- description: Google Cozmo (Acer Chromebook 314)
items:
- const: google,cozmo
@@ -244,6 +184,13 @@ properties:
- google,kodama-sku32
- const: google,kodama
- const: mediatek,mt8183
+ - description: Google Krane (Lenovo IdeaPad Duet, 10e,...)
+ items:
+ - enum:
+ - google,krane-sku0
+ - google,krane-sku176
+ - const: google,krane
+ - const: mediatek,mt8183
- description: Google Willow (Acer Chromebook 311 C722/C722T)
items:
- enum:
@@ -251,10 +198,64 @@ properties:
- google,willow-sku1
- const: google,willow
- const: mediatek,mt8183
+ - items:
+ - enum:
+ - mediatek,mt8183-evb
+ - const: mediatek,mt8183
- items:
- enum:
- mediatek,mt8183-pumpkin
- const: mediatek,mt8183
+ - items:
+ - enum:
+ - mediatek,mt8186-evb
+ - const: mediatek,mt8186
+ - description: Google Hayato
+ items:
+ - const: google,hayato-rev1
+ - const: google,hayato
+ - const: mediatek,mt8192
+ - description: Google Hayato rev5
+ items:
+ - const: google,hayato-rev5-sku2
+ - const: google,hayato-sku2
+ - const: google,hayato
+ - const: mediatek,mt8192
+ - description: Google Spherion (Acer Chromebook 514)
+ items:
+ - const: google,spherion-rev3
+ - const: google,spherion-rev2
+ - const: google,spherion-rev1
+ - const: google,spherion-rev0
+ - const: google,spherion
+ - const: mediatek,mt8192
+ - description: Google Spherion rev4 (Acer Chromebook 514)
+ items:
+ - const: google,spherion-rev4
+ - const: google,spherion
+ - const: mediatek,mt8192
+ - items:
+ - enum:
+ - mediatek,mt8192-evb
+ - const: mediatek,mt8192
+ - description: Acer Tomato (Acer Chromebook Spin 513 CP513-2H)
+ items:
+ - enum:
+ - google,tomato-rev2
+ - google,tomato-rev1
+ - const: google,tomato
+ - const: mediatek,mt8195
+ - description: Acer Tomato rev3 - 4 (Acer Chromebook Spin 513 CP513-2H)
+ items:
+ - const: google,tomato-rev4
+ - const: google,tomato-rev3
+ - const: google,tomato
+ - const: mediatek,mt8195
+ - items:
+ - enum:
+ - mediatek,mt8195-demo
+ - mediatek,mt8195-evb
+ - const: mediatek,mt8195
- items:
- enum:
- mediatek,mt8365-evk
--
2.42.0.655.g421f12c284-goog
Add entries for the MT8186 based Chromebooks, also collectively known
as the Lenovo IdeaPad Slim 3 Chromebook (14M868). It is also based on
the "Steelix" design. Being a laptop instead of a convertible device,
there is no touchscreen or stylus, which is similar to Rusty. However
Magneton does not have ports on the right side of the device.
Three variants are listed separately. These use different touchscreen
controllers, or lack a touchscreen altogether.
Signed-off-by: Chen-Yu Tsai <[email protected]>
---
.../devicetree/bindings/arm/mediatek.yaml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index 5e5834d9865f..a4541855a838 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -206,6 +206,24 @@ properties:
- enum:
- mediatek,mt8183-pumpkin
- const: mediatek,mt8183
+ - description: Google Magneton (Lenovo IdeaPad Slim 3 Chromebook (14M868))
+ items:
+ - const: google,steelix-sku393216
+ - const: google,steelix-sku393219
+ - const: google,steelix
+ - const: mediatek,mt8186
+ - description: Google Magneton (Lenovo IdeaPad Slim 3 Chromebook (14M868))
+ items:
+ - const: google,steelix-sku393217
+ - const: google,steelix-sku393220
+ - const: google,steelix
+ - const: mediatek,mt8186
+ - description: Google Magneton (Lenovo IdeaPad Slim 3 Chromebook (14M868))
+ items:
+ - const: google,steelix-sku393218
+ - const: google,steelix-sku393221
+ - const: google,steelix
+ - const: mediatek,mt8186
- description: Google Rusty (Lenovo 100e Chromebook Gen 4)
items:
- const: google,steelix-sku196608
--
2.42.0.655.g421f12c284-goog
Add an entry for the MT8186 based Steelix Chromebook, also known as the
Lenovo 300e Yoga Chromebook Gen 4.
Signed-off-by: Chen-Yu Tsai <[email protected]>
---
Documentation/devicetree/bindings/arm/mediatek.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index aa7e6734b336..fafd5e18f640 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -206,6 +206,13 @@ properties:
- enum:
- mediatek,mt8183-pumpkin
- const: mediatek,mt8183
+ - description: Google Steelix (Lenovo 300e Yoga Chromebook Gen 4)
+ items:
+ - enum:
+ - google,steelix-sku131072
+ - google,steelix-sku131073
+ - const: google,steelix
+ - const: mediatek,mt8186
- description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
items:
- const: google,tentacruel-sku262144
--
2.42.0.655.g421f12c284-goog
The MT8186 Steelix, also known as the Lenovo 300e Yoga Chromebook Gen 4,
is a convertible device based on a common design of the same name. The
device comes in different variants. Of them, whether a world facing
camera is integrated is the only differentiating factor between the
two device trees added. The different SKU IDs describe this alone.
The other device difference is the touchpad component used. This is
simply handled by having both possible components described in the
device tree, and letting the implementation figure out which one is
actually available. The system bootloader / firmware does not
differentiate this in that they share the same SKU IDs.
Signed-off-by: Chen-Yu Tsai <[email protected]>
---
arch/arm64/boot/dts/mediatek/Makefile | 2 +
.../mt8186-corsola-steelix-sku131072.dts | 18 ++
.../mt8186-corsola-steelix-sku131073.dts | 18 ++
.../dts/mediatek/mt8186-corsola-steelix.dtsi | 197 ++++++++++++++++++
4 files changed, 235 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index 442af61b1305..7bd9471b89f9 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -43,6 +43,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku32.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-steelix-sku131072.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-steelix-sku131073.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327681.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327683.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262144.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts
new file mode 100644
index 000000000000..eae17bca8585
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2022 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8186-corsola-steelix.dtsi"
+
+/ {
+ model = "Google Steelix board";
+ compatible = "google,steelix-sku131072", "google,steelix",
+ "mediatek,mt8186";
+ chassis-type = "convertible";
+};
+
+&mt6366codec {
+ mediatek,dmic-mode = <0>; /* two-wire */
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts
new file mode 100644
index 000000000000..a55375b95d0d
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2022 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8186-corsola-steelix.dtsi"
+
+/ {
+ model = "Google Steelix board";
+ compatible = "google,steelix-sku131073", "google,steelix",
+ "mediatek,mt8186";
+ chassis-type = "convertible";
+};
+
+&mt6366codec {
+ mediatek,dmic-mode = <1>; /* one-wire */
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi
new file mode 100644
index 000000000000..8488f2f9dc4d
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi
@@ -0,0 +1,197 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8186-corsola.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/{
+ pp1000_edpbrdg: regulator-pp1000-edpbrdg {
+ compatible = "regulator-fixed";
+ regulator-name = "pp1000_edpbrdg";
+ pinctrl-names = "default";
+ pinctrl-0 = <&en_pp1000_edpbrdg>;
+ enable-active-high;
+ regulator-boot-on;
+ gpio = <&pio 29 GPIO_ACTIVE_HIGH>;
+ vin-supply = <&pp3300_z2>;
+ };
+
+ pp1800_edpbrdg_dx: regulator-pp1800-edpbrdg-dx {
+ compatible = "regulator-fixed";
+ regulator-name = "pp1800_edpbrdg_dx";
+ pinctrl-names = "default";
+ pinctrl-0 = <&en_pp1800_edpbrdg>;
+ enable-active-high;
+ regulator-boot-on;
+ gpio = <&pio 30 GPIO_ACTIVE_HIGH>;
+ vin-supply = <&mt6366_vio18_reg>;
+ };
+
+ pp3300_edp_dx: regulator-pp3300-edp-dx {
+ compatible = "regulator-fixed";
+ regulator-name = "pp3300_edp_dx";
+ pinctrl-names = "default";
+ pinctrl-0 = <&en_pp3300_edpbrdg>;
+ enable-active-high;
+ regulator-boot-on;
+ gpio = <&pio 31 GPIO_ACTIVE_HIGH>;
+ vin-supply = <&pp3300_z2>;
+ };
+};
+
+&dsi_out {
+ remote-endpoint = <&anx7625_in>;
+};
+
+&i2c0 {
+ clock-frequency = <400000>;
+
+ anx_bridge: anx7625@58 {
+ compatible = "analogix,anx7625";
+ reg = <0x58>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&anx7625_pins>;
+ enable-gpios = <&pio 96 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pio 98 GPIO_ACTIVE_HIGH>;
+ vdd10-supply = <&pp1000_edpbrdg>;
+ vdd18-supply = <&pp1800_edpbrdg_dx>;
+ vdd33-supply = <&pp3300_edp_dx>;
+ analogix,lane0-swing = /bits/ 8 <0x70 0x30>;
+ analogix,lane1-swing = /bits/ 8 <0x70 0x30>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ anx7625_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ data-lanes = <0 1 2 3>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ anx7625_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+
+ aux-bus {
+ panel: panel {
+ compatible = "edp-panel";
+ power-supply = <&pp3300_disp_x>;
+ backlight = <&backlight_lcd0>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&anx7625_out>;
+ };
+ };
+ };
+ };
+ };
+};
+
+&i2c1 {
+ touchscreen: touchscreen@5d {
+ compatible = "goodix,gt7375p";
+ reg = <0x5d>;
+ interrupts-extended = <&pio 12 IRQ_TYPE_EDGE_FALLING>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&touchscreen_pins>;
+ reset-gpios = <&pio 60 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&pp3300_s3>;
+ goodix,no-reset-during-suspend;
+ };
+};
+
+&i2c2 {
+ i2c-scl-internal-delay-ns = <22000>;
+
+ /* second source component */
+ touchpad@2c {
+ compatible = "hid-over-i2c";
+ reg = <0x2c>;
+ hid-descr-addr = <0x20>;
+ interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&trackpad_pin>;
+ vdd-supply = <&pp3300_s3>;
+ wakeup-source;
+ };
+};
+
+&keyboard_controller {
+ function-row-physmap = <
+ MATRIX_KEY(0x00, 0x02, 0) /* T1 */
+ MATRIX_KEY(0x03, 0x02, 0) /* T2 */
+ MATRIX_KEY(0x02, 0x02, 0) /* T3 */
+ MATRIX_KEY(0x01, 0x02, 0) /* T4 */
+ MATRIX_KEY(0x03, 0x04, 0) /* T5 */
+ MATRIX_KEY(0x02, 0x04, 0) /* T6 */
+ MATRIX_KEY(0x01, 0x04, 0) /* T7 */
+ MATRIX_KEY(0x02, 0x09, 0) /* T8 */
+ MATRIX_KEY(0x01, 0x09, 0) /* T9 */
+ MATRIX_KEY(0x00, 0x04, 0) /* T10 */
+ >;
+
+ linux,keymap = <
+ MATRIX_KEY(0x00, 0x02, KEY_BACK)
+ MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
+ MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
+ MATRIX_KEY(0x01, 0x02, KEY_SCALE)
+ MATRIX_KEY(0x03, 0x04, KEY_BRIGHTNESSDOWN)
+ MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSUP)
+ MATRIX_KEY(0x01, 0x04, KEY_MICMUTE)
+ MATRIX_KEY(0x02, 0x09, KEY_MUTE)
+ MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
+ MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
+ CROS_STD_MAIN_KEYMAP
+ >;
+};
+
+&pio {
+ anx7625_pins: anx7625-pins {
+ pins1 {
+ pinmux = <PINMUX_GPIO96__FUNC_GPIO96>,
+ <PINMUX_GPIO98__FUNC_GPIO98>;
+ output-low;
+ };
+
+ pins2 {
+ pinmux = <PINMUX_GPIO9__FUNC_GPIO9>;
+ input-enable;
+ bias-disable;
+ };
+ };
+
+ en_pp1000_edpbrdg: pp1000-edpbrdg-en-pins {
+ pins {
+ pinmux = <PINMUX_GPIO29__FUNC_GPIO29>;
+ output-low;
+ };
+ };
+
+ en_pp1800_edpbrdg: pp1800-edpbrdg-en-pins {
+ pins {
+ pinmux = <PINMUX_GPIO30__FUNC_GPIO30>;
+ output-low;
+ };
+ };
+
+ en_pp3300_edpbrdg: pp3300-edpbrdg-en-pins {
+ pins {
+ pinmux = <PINMUX_GPIO31__FUNC_GPIO31>;
+ output-low;
+ };
+ };
+};
--
2.42.0.655.g421f12c284-goog
Add entries for the MT8186 based Chromebooks, also collectively known
as the Lenovo IdeaPad Slim 3 Chromebook (14M868). It is also based on
the "Steelix" design. Being a laptop instead of a convertible device,
there is no touchscreen or stylus, which is similar to Rusty. However
Magneton does not have ports on the right side of the device.
Three variants are listed separately. These use different touchscreen
controllers, or lack a touchscreen altogether.
Signed-off-by: Chen-Yu Tsai <[email protected]>
---
arch/arm64/boot/dts/mediatek/Makefile | 3 ++
.../mt8186-corsola-magneton-sku393216.dts | 38 +++++++++++++++++++
.../mt8186-corsola-magneton-sku393217.dts | 38 +++++++++++++++++++
.../mt8186-corsola-magneton-sku393218.dts | 21 ++++++++++
4 files changed, 100 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393216.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393217.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393218.dts
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index 6b05f1f2e645..7e365e9516ab 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -43,6 +43,9 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku32.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-magneton-sku393216.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-magneton-sku393217.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-magneton-sku393218.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-rusty-sku196608.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-steelix-sku131072.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-steelix-sku131073.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393216.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393216.dts
new file mode 100644
index 000000000000..7406e7a29fcc
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393216.dts
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2022 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8186-corsola-steelix.dtsi"
+
+/ {
+ model = "Google Magneton board";
+ compatible = "google,steelix-sku393216", "google,steelix-sku393219",
+ "google,steelix", "mediatek,mt8186";
+ chassis-type = "laptop";
+};
+
+/delete-node/ &gpio_keys;
+/delete-node/ &touchscreen;
+
+&i2c1 {
+ touchscreen: touchscreen@10 {
+ compatible = "hid-over-i2c";
+ reg = <0x10>;
+ interrupt-parent = <&pio>;
+ interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&touchscreen_pins>;
+ reset-gpios = <&pio 60 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&pp3300_s3>;
+ status = "okay";
+
+ post-power-on-delay-ms = <350>;
+ hid-descr-addr = <0x0001>;
+ };
+};
+
+&usb_c1 {
+ status = "disabled";
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393217.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393217.dts
new file mode 100644
index 000000000000..b1806e0b2782
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393217.dts
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2022 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8186-corsola-steelix.dtsi"
+
+/ {
+ model = "Google Magneton board";
+ compatible = "google,steelix-sku393217", "google,steelix-sku393220",
+ "google,steelix", "mediatek,mt8186";
+ chassis-type = "laptop";
+};
+
+/delete-node/ &gpio_keys;
+/delete-node/ &touchscreen;
+
+&i2c1 {
+ touchscreen: touchscreen@40 {
+ compatible = "hid-over-i2c";
+ reg = <0x40>;
+ interrupt-parent = <&pio>;
+ interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&touchscreen_pins>;
+ reset-gpios = <&pio 60 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&pp3300_s3>;
+ status = "okay";
+
+ post-power-on-delay-ms = <450>;
+ hid-descr-addr = <0x0001>;
+ };
+};
+
+&usb_c1 {
+ status = "disabled";
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393218.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393218.dts
new file mode 100644
index 000000000000..c70f196f115b
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-magneton-sku393218.dts
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2022 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8186-corsola-steelix.dtsi"
+
+/ {
+ model = "Google Magneton board";
+ compatible = "google,steelix-sku393218", "google,steelix-sku393221",
+ "google,steelix", "mediatek,mt8186";
+ chassis-type = "laptop";
+};
+
+/delete-node/ &gpio_keys;
+/delete-node/ &touchscreen;
+
+&usb_c1 {
+ status = "disabled";
+};
--
2.42.0.655.g421f12c284-goog
MT8186 Rusty, otherwise known as the Lenovo 100e Chromebook Gen 4, is an
MT8186 based laptop. It is based on the "Steelix" design. Being a laptop
instead of a convertible device, there is no touchscreen or stylus.
Signed-off-by: Chen-Yu Tsai <[email protected]>
---
arch/arm64/boot/dts/mediatek/Makefile | 1 +
.../mt8186-corsola-rusty-sku196608.dts | 21 +++++++++++++++++++
2 files changed, 22 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-rusty-sku196608.dts
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index 7bd9471b89f9..6b05f1f2e645 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -43,6 +43,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku32.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-rusty-sku196608.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-steelix-sku131072.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-steelix-sku131073.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327681.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-rusty-sku196608.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-rusty-sku196608.dts
new file mode 100644
index 000000000000..02ab7eb11dcd
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-rusty-sku196608.dts
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2022 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8186-corsola-steelix.dtsi"
+
+/ {
+ model = "Google Rusty board";
+ compatible = "google,steelix-sku196608", "google,steelix-sku196609",
+ "google,steelix", "mediatek,mt8186";
+ chassis-type = "laptop";
+};
+
+/delete-node/ &gpio_keys;
+/delete-node/ &touchscreen;
+
+&i2c1 {
+ status = "disabled";
+};
--
2.42.0.655.g421f12c284-goog
Tentacruel and Tentacool are MT8186 based Chromebooks based on the
Krabby design.
Tentacruel, also known as the ASUS Chromebook CM14 Flip CM1402F, is a
convertible device with touchscreen and stylus.
Tentacool, also known as the ASUS Chromebook CM14 CM1402C, is a laptop
device. It does not have a touchscreen or stylus.
The two devices both have two variants. The difference is a second
source touchpad controller that shares the same address as the original,
but is incompatible.
The extra SKU IDs for the Tentacruel devices map to different sensor
components attached to the Embedded Controller. These are not visible
to the main processor.
Signed-off-by: Chen-Yu Tsai <[email protected]>
---
arch/arm64/boot/dts/mediatek/Makefile | 4 +
.../dts/mediatek/mt8186-corsola-krabby.dtsi | 130 ++
.../mt8186-corsola-tentacool-sku327681.dts | 49 +
.../mt8186-corsola-tentacool-sku327683.dts | 26 +
.../mt8186-corsola-tentacruel-sku262144.dts | 44 +
.../mt8186-corsola-tentacruel-sku262148.dts | 28 +
.../boot/dts/mediatek/mt8186-corsola.dtsi | 1704 +++++++++++++++++
7 files changed, 1985 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index e6e7592a3645..442af61b1305 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -43,6 +43,10 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku32.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327681.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327683.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262144.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262148.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-evb.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r1.dtb
dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r5-sku2.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
new file mode 100644
index 000000000000..0586c24f1e12
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
@@ -0,0 +1,130 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8186-corsola.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ aliases {
+ i2c4 = &i2c4;
+ };
+};
+
+&dsi_out {
+ remote-endpoint = <&ps8640_in>;
+};
+
+&i2c0 {
+ clock-frequency = <400000>;
+
+ ps8640: edp-bridge@8 {
+ compatible = "parade,ps8640";
+ reg = <0x8>;
+ powerdown-gpios = <&pio 96 GPIO_ACTIVE_LOW>;
+ reset-gpios = <&pio 98 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ps8640_pins>;
+ vdd12-supply = <&mt6366_vrf12_reg>;
+ vdd33-supply = <&mt6366_vcn33_reg>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ ps8640_in: endpoint {
+ remote-endpoint = <&dsi_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ ps8640_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+
+ aux-bus {
+ panel {
+ compatible = "edp-panel";
+ power-supply = <&pp3300_disp_x>;
+ backlight = <&backlight_lcd0>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&ps8640_out>;
+ };
+ };
+ };
+ };
+ };
+};
+
+&i2c1 {
+ i2c-scl-internal-delay-ns = <10000>;
+
+ touchscreen: touchscreen@10 {
+ compatible = "hid-over-i2c";
+ reg = <0x10>;
+ interrupts-extended = <&pio 12 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&touchscreen_pins>;
+ post-power-on-delay-ms = <10>;
+ hid-descr-addr = <0x0001>;
+ vdd-supply = <&pp3300_s3>;
+ };
+};
+
+&i2c4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c4_pins>;
+ clock-frequency = <400000>;
+ status = "okay";
+
+ proximity@28 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sar_sensor_pins>;
+ compatible = "semtech,sx9324";
+ reg = <0x28>;
+ interrupt-parent = <&pio>;
+ interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+ vdd-supply = <&mt6366_vio18_reg>;
+ svdd-supply = <&mt6366_vio18_reg>;
+ #io-channel-cells = <1>;
+ };
+};
+
+&pio {
+ i2c4_pins: i2c4-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO136__FUNC_SDA4>,
+ <PINMUX_GPIO135__FUNC_SCL4>;
+ bias-disable;
+ drive-strength = <4>;
+ input-enable;
+ };
+ };
+
+ ps8640_pins: ps8640-pins {
+ pins {
+ pinmux = <PINMUX_GPIO96__FUNC_GPIO96>,
+ <PINMUX_GPIO98__FUNC_GPIO98>;
+ output-low;
+ };
+ };
+
+ sar_sensor_pins: sar-sensor-pins {
+ pin-irq {
+ pinmux = <PINMUX_GPIO5__FUNC_GPIO5>;
+ input-enable;
+ bias-pull-up;
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
new file mode 100644
index 000000000000..8dfc24afabea
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8186-corsola-krabby.dtsi"
+
+/ {
+ model = "Google Tentacool board";
+ compatible = "google,tentacruel-sku327681", "google,tentacruel", "mediatek,mt8186";
+ chassis-type = "laptop";
+};
+
+/delete-node/ &gpio_keys;
+/delete-node/ &touchscreen;
+
+&i2c1 {
+ status = "disabled";
+};
+
+&keyboard_controller {
+ function-row-physmap = <
+ MATRIX_KEY(0x00, 0x02, 0) /* T1 */
+ MATRIX_KEY(0x03, 0x02, 0) /* T2 */
+ MATRIX_KEY(0x02, 0x02, 0) /* T3 */
+ MATRIX_KEY(0x01, 0x02, 0) /* T4 */
+ MATRIX_KEY(0x03, 0x04, 0) /* T5 */
+ MATRIX_KEY(0x02, 0x04, 0) /* T6 */
+ MATRIX_KEY(0x01, 0x04, 0) /* T7 */
+ MATRIX_KEY(0x02, 0x09, 0) /* T8 */
+ MATRIX_KEY(0x01, 0x09, 0) /* T9 */
+ MATRIX_KEY(0x00, 0x04, 0) /* T10 */
+ >;
+
+ linux,keymap = <
+ MATRIX_KEY(0x00, 0x02, KEY_BACK)
+ MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
+ MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
+ MATRIX_KEY(0x01, 0x02, KEY_SCALE)
+ MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
+ MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
+ MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
+ MATRIX_KEY(0x02, 0x09, KEY_MUTE)
+ MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
+ MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
+ CROS_STD_MAIN_KEYMAP
+ >;
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
new file mode 100644
index 000000000000..9b10336ede06
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2023 Google LLC
+ */
+
+#include "mt8186-corsola-tentacool-sku327681.dts"
+
+/ {
+ compatible = "google,tentacruel-sku327683", "google,tentacruel", "mediatek,mt8186";
+};
+
+/* This variant replaces only the touchpad controller. */
+&i2c2 {
+ /delete-node/ touchpad@15;
+
+ touchpad@15 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&trackpad_pin>;
+ compatible = "hid-over-i2c";
+ reg = <0x15>;
+ interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
+ hid-descr-addr = <0x0001>;
+ vcc-supply = <&pp3300_s3>;
+ wakeup-source;
+ };
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
new file mode 100644
index 000000000000..26e9f19758cb
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2022 Google LLC
+ */
+
+/dts-v1/;
+#include "mt8186-corsola-krabby.dtsi"
+
+/ {
+ model = "Google Tentacruel board";
+ compatible = "google,tentacruel-sku262144", "google,tentacruel-sku262145",
+ "google,tentacruel-sku262146", "google,tentacruel-sku262147",
+ "google,tentacruel", "mediatek,mt8186";
+ chassis-type = "convertible";
+};
+
+&keyboard_controller {
+ function-row-physmap = <
+ MATRIX_KEY(0x00, 0x02, 0) /* T1 */
+ MATRIX_KEY(0x03, 0x02, 0) /* T2 */
+ MATRIX_KEY(0x02, 0x02, 0) /* T3 */
+ MATRIX_KEY(0x01, 0x02, 0) /* T4 */
+ MATRIX_KEY(0x03, 0x04, 0) /* T5 */
+ MATRIX_KEY(0x02, 0x04, 0) /* T6 */
+ MATRIX_KEY(0x01, 0x04, 0) /* T7 */
+ MATRIX_KEY(0x02, 0x09, 0) /* T8 */
+ MATRIX_KEY(0x01, 0x09, 0) /* T9 */
+ MATRIX_KEY(0x00, 0x04, 0) /* T10 */
+ >;
+
+ linux,keymap = <
+ MATRIX_KEY(0x00, 0x02, KEY_BACK)
+ MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
+ MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
+ MATRIX_KEY(0x01, 0x02, KEY_SCALE)
+ MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
+ MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
+ MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
+ MATRIX_KEY(0x02, 0x09, KEY_MUTE)
+ MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
+ MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
+ CROS_STD_MAIN_KEYMAP
+ >;
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
new file mode 100644
index 000000000000..59d4d21fc7d3
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright 2022 Google LLC
+ */
+
+#include "mt8186-corsola-tentacruel-sku262144.dts"
+
+/ {
+ compatible = "google,tentacruel-sku262144", "google,tentacruel-sku262145",
+ "google,tentacruel-sku262146", "google,tentacruel-sku262147",
+ "google,tentacruel", "mediatek,mt8186";
+};
+
+/* This variant replaces only the touchpad controller. */
+&i2c2 {
+ /delete-node/ touchpad@15;
+
+ touchpad@15 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&trackpad_pin>;
+ compatible = "hid-over-i2c";
+ reg = <0x15>;
+ interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
+ hid-descr-addr = <0x0001>;
+ vcc-supply = <&pp3300_s3>;
+ wakeup-source;
+ };
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
new file mode 100644
index 000000000000..42ebab1bafeb
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
@@ -0,0 +1,1704 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2022 MediaTek Inc.
+ */
+/dts-v1/;
+#include "mt8186.dtsi"
+#include <dt-bindings/pinctrl/mt8186-pinfunc.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/input/gpio-keys.h>
+
+/ {
+ aliases {
+ i2c0 = &i2c0;
+ i2c1 = &i2c1;
+ i2c2 = &i2c2;
+ i2c3 = &i2c3;
+ i2c5 = &i2c5;
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ /* The size should be filled in by the bootloader. */
+ reg = <0 0x40000000 0 0>;
+ };
+
+ backlight_lcd0: backlight-lcd0 {
+ compatible = "pwm-backlight";
+ pwms = <&pwm0 0 500000>;
+ power-supply = <&ppvar_sys>;
+ enable-gpios = <&pio 152 0>;
+ brightness-levels = <0 1023>;
+ num-interpolated-steps = <1023>;
+ default-brightness-level = <576>;
+ };
+
+ btsco: bt-sco {
+ compatible = "linux,bt-sco";
+ #sound-dai-cells = <0>;
+ };
+
+ dmic_codec: dmic-codec {
+ compatible = "dmic-codec";
+ num-channels = <2>;
+ wakeup-delay-ms = <50>;
+ #sound-dai-cells = <0>;
+ };
+
+ gpio_keys: gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pen_eject>;
+
+ pen_insert: pen-insert-switch {
+ label = "Pen Insert";
+ /* Insert = low, eject = high */
+ gpios = <&pio 18 GPIO_ACTIVE_LOW>;
+ linux,code = <SW_PEN_INSERTED>;
+ linux,input-type = <EV_SW>;
+ wakeup-event-action = <EV_ACT_DEASSERTED>;
+ wakeup-source;
+ };
+ };
+
+ pp1800_dpbrdg_dx: regulator-pp1800-dpbrdg-dx {
+ compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&en_pp1800_dpbrdg>;
+ regulator-name = "pp1800_dpbrdg_dx";
+ enable-active-high;
+ gpio = <&pio 39 GPIO_ACTIVE_HIGH>;
+ vin-supply = <&mt6366_vio18_reg>;
+ };
+
+ pp3300_disp_x: regulator-pp3300-disp-x {
+ compatible = "regulator-fixed";
+ regulator-name = "pp3300_disp_x";
+ pinctrl-names = "default";
+ pinctrl-0 = <&edp_panel_fixed_pins>;
+ enable-active-high;
+ regulator-boot-on;
+ gpio = <&pio 153 GPIO_ACTIVE_HIGH>;
+ vin-supply = <&pp3300_z2>;
+ };
+
+ /* system wide LDO 3.3V power rail */
+ pp3300_z5: regulator-pp3300-ldo-z5 {
+ compatible = "regulator-fixed";
+ regulator-name = "pp3300_ldo_z5";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&ppvar_sys>;
+ };
+
+ /* separately switched 3.3V power rail */
+ pp3300_s3: regulator-pp3300-s3 {
+ compatible = "regulator-fixed";
+ regulator-name = "pp3300_s3";
+ /* automatically sequenced by PMIC EXT_PMIC_EN2 */
+ regulator-always-on;
+ regulator-boot-on;
+ vin-supply = <&pp3300_z2>;
+ };
+
+ /* system wide 3.3V power rail */
+ pp3300_z2: regulator-pp3300-z2 {
+ compatible = "regulator-fixed";
+ regulator-name = "pp3300_z2";
+ /* EN pin tied to pp4200_z2, which is controlled by EC */
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&ppvar_sys>;
+ };
+
+ /* system wide 4.2V power rail */
+ pp4200_z2: regulator-pp4200-z2 {
+ compatible = "regulator-fixed";
+ regulator-name = "pp4200_z2";
+ /* controlled by EC */
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <4200000>;
+ regulator-max-microvolt = <4200000>;
+ vin-supply = <&ppvar_sys>;
+ };
+
+ /* system wide switching 5.0V power rail */
+ pp5000_z2: regulator-pp5000-z2 {
+ compatible = "regulator-fixed";
+ regulator-name = "pp5000_z2";
+ /* controlled by EC */
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&ppvar_sys>;
+ };
+
+ /* system wide semi-regulated power rail from battery or USB */
+ ppvar_sys: regulator-ppvar-sys {
+ compatible = "regulator-fixed";
+ regulator-name = "ppvar_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ reserved_memory: reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ adsp_dma_mem: memory@61000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x61000000 0 0x100000>;
+ no-map;
+ };
+
+ adsp_mem: memory@60000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x60000000 0 0xA00000>;
+ no-map;
+ };
+
+ scp_mem: memory@50000000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x50000000 0 0x10a0000>;
+ no-map;
+ };
+ };
+
+ sound: sound {
+ compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
+ pinctrl-names = "aud_clk_mosi_off",
+ "aud_clk_mosi_on",
+ "aud_clk_miso_off",
+ "aud_clk_miso_on",
+ "aud_dat_miso_off",
+ "aud_dat_miso_on",
+ "aud_dat_mosi_off",
+ "aud_dat_mosi_on",
+ "aud_gpio_i2s0_off",
+ "aud_gpio_i2s0_on",
+ "aud_gpio_i2s1_off",
+ "aud_gpio_i2s1_on",
+ "aud_gpio_i2s2_off",
+ "aud_gpio_i2s2_on",
+ "aud_gpio_i2s3_off",
+ "aud_gpio_i2s3_on",
+ "aud_gpio_tdm_off",
+ "aud_gpio_tdm_on",
+ "aud_gpio_pcm_off",
+ "aud_gpio_pcm_on",
+ "aud_gpio_dmic_sec";
+ pinctrl-0 = <&aud_clk_mosi_off>;
+ pinctrl-1 = <&aud_clk_mosi_on>;
+ pinctrl-2 = <&aud_clk_miso_off>;
+ pinctrl-3 = <&aud_clk_miso_on>;
+ pinctrl-4 = <&aud_dat_miso_off>;
+ pinctrl-5 = <&aud_dat_miso_on>;
+ pinctrl-6 = <&aud_dat_mosi_off>;
+ pinctrl-7 = <&aud_dat_mosi_on>;
+ pinctrl-8 = <&aud_gpio_i2s0_off>;
+ pinctrl-9 = <&aud_gpio_i2s0_on>;
+ pinctrl-10 = <&aud_gpio_i2s1_off>;
+ pinctrl-11 = <&aud_gpio_i2s1_on>;
+ pinctrl-12 = <&aud_gpio_i2s2_off>;
+ pinctrl-13 = <&aud_gpio_i2s2_on>;
+ pinctrl-14 = <&aud_gpio_i2s3_off>;
+ pinctrl-15 = <&aud_gpio_i2s3_on>;
+ pinctrl-16 = <&aud_gpio_tdm_off>;
+ pinctrl-17 = <&aud_gpio_tdm_on>;
+ pinctrl-18 = <&aud_gpio_pcm_off>;
+ pinctrl-19 = <&aud_gpio_pcm_on>;
+ pinctrl-20 = <&aud_gpio_dmic_sec>;
+ mediatek,adsp = <&adsp>;
+ mediatek,platform = <&afe>;
+
+ playback-codecs {
+ sound-dai = <&it6505dptx>, <&rt1019p>;
+ };
+
+ headset-codec {
+ sound-dai = <&rt5682s 0>;
+ };
+ };
+
+ rt1019p: speaker-codec {
+ compatible = "realtek,rt1019p";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rt1019p_pins_default>;
+ sdb-gpios = <&pio 150 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ };
+
+ usb_p1_vbus: regulator-usb-p1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "vbus1";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ gpio = <&pio 148 GPIO_ACTIVE_HIGH>;
+ vin-supply = <&pp5000_z2>;
+ };
+
+ wifi_pwrseq: wifi-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_enable_pin>;
+ post-power-on-delay-ms = <50>;
+ reset-gpios = <&pio 54 GPIO_ACTIVE_LOW>;
+ };
+
+ wifi_wakeup: wifi-wakeup {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_wakeup_pin>;
+
+ wowlan-event {
+ label = "Wake on WiFi";
+ gpios = <&pio 7 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_WAKEUP>;
+ wakeup-source;
+ };
+ };
+};
+
+&adsp {
+ memory-region = <&adsp_dma_mem>, <&adsp_mem>;
+ status = "fail"; /* causes stall */
+};
+
+&afe {
+ i2s0-share = "I2S1";
+ i2s3-share = "I2S2";
+ status = "okay";
+};
+
+&cci {
+ proc-supply = <&mt6366_vproc12_reg>;
+};
+
+&cpu0 {
+ proc-supply = <&mt6366_vproc12_reg>;
+};
+
+&cpu1 {
+ proc-supply = <&mt6366_vproc12_reg>;
+};
+
+&cpu2 {
+ proc-supply = <&mt6366_vproc12_reg>;
+};
+
+&cpu3 {
+ proc-supply = <&mt6366_vproc12_reg>;
+};
+
+&cpu4 {
+ proc-supply = <&mt6366_vproc12_reg>;
+};
+
+&cpu5 {
+ proc-supply = <&mt6366_vproc12_reg>;
+};
+
+&cpu6 {
+ proc-supply = <&mt6366_vproc11_reg>;
+};
+
+&cpu7 {
+ proc-supply = <&mt6366_vproc11_reg>;
+};
+
+&dpi {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&dpi_pins_default>;
+ pinctrl-1 = <&dpi_pins_sleep>;
+ status = "okay";
+};
+
+&dpi_out {
+ remote-endpoint = <&it6505_in>;
+};
+
+&dsi0 {
+ status = "okay";
+};
+
+&gic {
+ mediatek,broken-save-restore-fw;
+};
+
+&gpu {
+ mali-supply = <&mt6366_vgpu_reg>;
+ status = "okay";
+};
+
+&i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0_pins>;
+ status = "okay";
+};
+
+&i2c1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
+ clock-frequency = <400000>;
+ i2c-scl-internal-delay-ns = <8000>;
+ status = "okay";
+};
+
+&i2c2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_pins>;
+ clock-frequency = <400000>;
+ i2c-scl-internal-delay-ns = <10000>;
+ status = "okay";
+
+ touchpad@15 {
+ compatible = "elan,ekth3000";
+ reg = <0x15>;
+ interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&trackpad_pin>;
+ vcc-supply = <&pp3300_s3>;
+ wakeup-source;
+ };
+};
+
+&i2c3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_pins>;
+ clock-frequency = <100000>;
+ status = "okay";
+
+ it6505dptx: dp-bridge@5c {
+ pinctrl-names = "default";
+ pinctrl-0 = <&it6505_pins>;
+ compatible = "ite,it6505";
+ reg = <0x5c>;
+ interrupts-extended = <&pio 8 IRQ_TYPE_LEVEL_LOW>;
+ ovdd-supply = <&mt6366_vsim2_reg>;
+ pwr18-supply = <&pp1800_dpbrdg_dx>;
+ reset-gpios = <&pio 177 GPIO_ACTIVE_HIGH>;
+ no-laneswap;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #sound-dai-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ it6505_in: endpoint {
+ link-frequencies = /bits/ 64 <150000000>;
+ remote-endpoint = <&dpi_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ };
+ };
+ };
+};
+
+&i2c5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c5_pins>;
+ status = "okay";
+
+ rt5682s: codec@1a {
+ compatible = "realtek,rt5682s";
+ reg = <0x1a>;
+ interrupts-extended = <&pio 17 IRQ_TYPE_EDGE_BOTH>;
+ realtek,jd-src = <1>;
+ AVDD-supply = <&mt6366_vio18_reg>;
+ DBVDD-supply = <&mt6366_vio18_reg>;
+ LDO1-IN-supply = <&mt6366_vio18_reg>;
+ MICVDD-supply = <&pp3300_z2>;
+ #sound-dai-cells = <1>;
+ };
+};
+
+&mfg0 {
+ domain-supply = <&mt6366_vsram_gpu_reg>;
+};
+
+&mfg1 {
+ domain-supply = <&mt6366_vgpu_reg>;
+};
+
+&mipi_tx0 {
+ status = "okay";
+};
+
+&mmc0 {
+ pinctrl-names = "default", "state_uhs";
+ pinctrl-0 = <&mmc0_pins_default>;
+ pinctrl-1 = <&mmc0_pins_uhs>;
+ bus-width = <8>;
+ max-frequency = <200000000>;
+ non-removable;
+ cap-mmc-highspeed;
+ mmc-hs200-1_8v;
+ mmc-hs400-1_8v;
+ supports-cqe;
+ no-sd;
+ no-sdio;
+ cap-mmc-hw-reset;
+ hs400-ds-delay = <0x11814>;
+ mediatek,hs400-ds-dly3 = <0x14>;
+ vmmc-supply = <&mt6366_vemc_reg>;
+ vqmmc-supply = <&mt6366_vio18_reg>;
+ status = "okay";
+};
+
+&mmc1 {
+ pinctrl-names = "default", "state_uhs", "state_eint";
+ pinctrl-0 = <&mmc1_pins_default>;
+ pinctrl-1 = <&mmc1_pins_uhs>;
+ pinctrl-2 = <&mmc1_pins_eint>;
+ /delete-property/ interrupts;
+ interrupt-names = "msdc", "sdio_wakeup";
+ interrupts-extended = <&gic GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH 0>,
+ <&pio 87 IRQ_TYPE_LEVEL_LOW>;
+ bus-width = <4>;
+ max-frequency = <200000000>;
+ cap-sd-highspeed;
+ sd-uhs-sdr104;
+ sd-uhs-sdr50;
+ keep-power-in-suspend;
+ wakeup-source;
+ cap-sdio-irq;
+ no-mmc;
+ no-sd;
+ non-removable;
+ vmmc-supply = <&pp3300_s3>;
+ vqmmc-supply = <&mt6366_vio18_reg>;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ bluetooth@2 {
+ compatible = "mediatek,mt7921s-bluetooth";
+ reg = <2>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_pins_reset>;
+ reset-gpios = <&pio 155 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&nor_flash {
+ pinctrl-names = "default";
+ pinctrl-0 = <&nor_pins_default>;
+ assigned-clock-parents = <&topckgen CLK_TOP_MAINPLL_D7_D4>;
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <39000000>;
+ };
+};
+
+&pio {
+ /* 185 lines */
+ gpio-line-names = "TP",
+ "TP",
+ "TP",
+ "I2S0_HP_DI",
+ "I2S3_DP_SPKR_DO",
+ "SAR_INT_ODL",
+ "BT_WAKE_AP_ODL",
+ "WIFI_INT_ODL",
+ "DPBRDG_INT_ODL",
+ "EDPBRDG_INT_ODL",
+ "EC_AP_HPD_OD",
+ "TCHPAD_INT_ODL",
+ "TCHSCR_INT_1V8_ODL",
+ "EC_AP_INT_ODL",
+ "EC_IN_RW_ODL",
+ "GSC_AP_INT_ODL",
+ /* AP_FLASH_WP_L is crossystem ABI. Rev1 schematics call it AP_WP_ODL. */
+ "AP_FLASH_WP_L",
+ "HP_INT_ODL",
+ "PEN_EJECT_OD",
+ "WCAM_PWDN_L",
+ "WCAM_RST_L",
+ "UCAM_SEN_EN",
+ "UCAM_RST_L",
+ "LTE_RESET_L",
+ "LTE_SAR_DETECT_L",
+ "I2S2_DP_SPK_MCK",
+ "I2S2_DP_SPKR_BCK",
+ "I2S2_DP_SPKR_LRCK",
+ "I2S2_DP_SPKR_DI (TP)",
+ "EN_PP1000_EDPBRDG",
+ "EN_PP1800_EDPBRDG",
+ "EN_PP3300_EDPBRDG",
+ "UART_GSC_TX_AP_RX",
+ "UART_AP_TX_GSC_RX",
+ "UART_DBGCON_TX_ADSP_RX",
+ "UART_ADSP_TX_DBGCON_RX",
+ "EN_PP1000_DPBRDG",
+ "TCHSCR_REPORT_DISABLE",
+ "EN_PP3300_DPBRDG",
+ "EN_PP1800_DPBRDG",
+ "SPI_AP_CLK_EC",
+ "SPI_AP_CS_EC_L",
+ "SPI_AP_DO_EC_DI",
+ "SPI_AP_DI_EC_DO",
+ "SPI_AP_CLK_GSC",
+ "SPI_AP_CS_GSC_L",
+ "SPI_AP_DO_GSC_DI",
+ "SPI_AP_DI_GSC_DO",
+ "UART_DBGCON_TX_SCP_RX",
+ "UART_SCP_TX_DBGCON_RX",
+ "EN_PP1200_CAM_X",
+ "EN_PP2800A_VCM_X",
+ "EN_PP2800A_UCAM_X",
+ "EN_PP2800A_WCAM_X",
+ "WLAN_MODULE_RST_L",
+ "EN_PP1200_UCAM_X",
+ "I2S1_HP_DO",
+ "I2S1_HP_BCK",
+ "I2S1_HP_LRCK",
+ "I2S1_HP_MCK",
+ "TCHSCR_RST_1V8_L",
+ "SPI_AP_CLK_ROM",
+ "SPI_AP_CS_ROM_L",
+ "SPI_AP_DO_ROM_DI",
+ "SPI_AP_DI_ROM_DO",
+ "NC",
+ "NC",
+ "EMMC_STRB",
+ "EMMC_CLK",
+ "EMMC_CMD",
+ "EMMC_RST_L",
+ "EMMC_DATA0",
+ "EMMC_DATA1",
+ "EMMC_DATA2",
+ "EMMC_DATA3",
+ "EMMC_DATA4",
+ "EMMC_DATA5",
+ "EMMC_DATA6",
+ "EMMC_DATA7",
+ "AP_KPCOL0",
+ "NC",
+ "NC",
+ "NC",
+ "TP",
+ "SDIO_CLK",
+ "SDIO_CMD",
+ "SDIO_DATA0",
+ "SDIO_DATA1",
+ "SDIO_DATA2",
+ "SDIO_DATA3",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "NC",
+ "EDPBRDG_PWREN",
+ "BL_PWM_1V8",
+ "EDPBRDG_RST_L",
+ "MIPI_DPI_CLK",
+ "MIPI_DPI_VSYNC",
+ "MIPI_DPI_HSYNC",
+ "MIPI_DPI_DE",
+ "MIPI_DPI_D0",
+ "MIPI_DPI_D1",
+ "MIPI_DPI_D2",
+ "MIPI_DPI_D3",
+ "MIPI_DPI_D4",
+ "MIPI_DPI_D5",
+ "MIPI_DPI_D6",
+ "MIPI_DPI_DA7",
+ "MIPI_DPI_D8",
+ "MIPI_DPI_D9",
+ "MIPI_DPI_D10",
+ "MIPI_DPI_D11",
+ "PCM_BT_CLK",
+ "PCM_BT_SYNC",
+ "PCM_BT_DI",
+ "PCM_BT_DO",
+ "JTAG_TMS_TP",
+ "JTAG_TCK_TP",
+ "JTAG_TDI_TP",
+ "JTAG_TDO_TP",
+ "JTAG_TRSTN_TP",
+ "CLK_24M_WCAM",
+ "CLK_24M_UCAM",
+ "UCAM_DET_ODL",
+ "AP_I2C_EDPBRDG_SCL_1V8",
+ "AP_I2C_EDPBRDG_SDA_1V8",
+ "AP_I2C_TCHSCR_SCL_1V8",
+ "AP_I2C_TCHSCR_SDA_1V8",
+ "AP_I2C_TCHPAD_SCL_1V8",
+ "AP_I2C_TCHPAD_SDA_1V8",
+ "AP_I2C_DPBRDG_SCL_1V8",
+ "AP_I2C_DPBRDG_SDA_1V8",
+ "AP_I2C_WLAN_SCL_1V8",
+ "AP_I2C_WLAN_SDA_1V8",
+ "AP_I2C_AUD_SCL_1V8",
+ "AP_I2C_AUD_SDA_1V8",
+ "AP_I2C_TPM_SCL_1V8",
+ "AP_I2C_UCAM_SDA_1V8",
+ "AP_I2C_UCAM_SCL_1V8",
+ "AP_I2C_UCAM_SDA_1V8",
+ "AP_I2C_WCAM_SCL_1V8",
+ "AP_I2C_WCAM_SDA_1V8",
+ "SCP_I2C_SENSOR_SCL_1V8",
+ "SCP_I2C_SENSOR_SDA_1V8",
+ "AP_EC_WARM_RST_REQ",
+ "AP_XHCI_INIT_DONE",
+ "USB3_HUB_RST_L",
+ "EN_SPKR",
+ "BEEP_ON",
+ "AP_EDP_BKLTEN",
+ "EN_PP3300_DISP_X",
+ "EN_PP3300_SDBRDG_X",
+ "BT_KILL_1V8_L",
+ "WIFI_KILL_1V8_L",
+ "PWRAP_SPI0_CSN",
+ "PWRAP_SPI0_CK",
+ "PWRAP_SPI0_MO",
+ "PWRAP_SPI0_MI",
+ "SRCLKENA0",
+ "SRCLKENA1",
+ "SCP_VREQ_VAO",
+ "AP_RTC_CLK32K",
+ "AP_PMIC_WDTRST_L",
+ "AUD_CLK_MOSI",
+ "AUD_SYNC_MOSI",
+ "AUD_DAT_MOSI0",
+ "AUD_DAT_MOSI1",
+ "AUD_CLK_MISO",
+ "AUD_SYNC_MISO",
+ "AUD_DAT_MISO0",
+ "AUD_DAT_MISO1",
+ "NC",
+ "NC",
+ "DPBRDG_PWREN",
+ "DPBRDG_RST_L",
+ "LTE_W_DISABLE_L",
+ "LTE_SAR_DETECT_L",
+ "EN_PP3300_LTE_X",
+ "LTE_PWR_OFF_L",
+ "LTE_RESET_L",
+ "TP",
+ "TP";
+
+ aud_clk_mosi_off: aud-clk-mosi-off-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO166__FUNC_GPIO166>,
+ <PINMUX_GPIO167__FUNC_GPIO167>;
+ input-enable;
+ bias-pull-down;
+ };
+ };
+
+ aud_clk_mosi_on: aud-clk-mosi-on-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO166__FUNC_AUD_CLK_MOSI>,
+ <PINMUX_GPIO167__FUNC_AUD_SYNC_MOSI>;
+ };
+ };
+
+ aud_clk_miso_off: aud-clk-miso-off-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO170__FUNC_GPIO170>,
+ <PINMUX_GPIO171__FUNC_GPIO171>;
+ input-enable;
+ bias-pull-down;
+ };
+ };
+
+ aud_clk_miso_on: aud-clk-miso-on-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO170__FUNC_AUD_CLK_MISO>,
+ <PINMUX_GPIO171__FUNC_AUD_SYNC_MISO>;
+ };
+ };
+
+ aud_dat_mosi_off: aud-dat-mosi-off-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO168__FUNC_GPIO168>,
+ <PINMUX_GPIO169__FUNC_GPIO169>;
+ input-enable;
+ bias-pull-down;
+ };
+ };
+
+ aud_dat_mosi_on: aud-dat-mosi-on-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO168__FUNC_AUD_DAT_MOSI0>,
+ <PINMUX_GPIO169__FUNC_AUD_DAT_MOSI1>;
+ };
+ };
+
+ aud_dat_miso_off: aud-dat-miso-off-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO172__FUNC_GPIO172>,
+ <PINMUX_GPIO173__FUNC_GPIO173>;
+ input-enable;
+ bias-pull-down;
+ };
+ };
+
+ aud_dat_miso_on: aud-dat-miso-on-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO172__FUNC_AUD_DAT_MISO0>,
+ <PINMUX_GPIO173__FUNC_AUD_DAT_MISO1>;
+ input-schmitt-enable;
+ bias-disable;
+ };
+ };
+
+ aud_gpio_i2s0_off: aud-gpio-i2s0-off-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO3__FUNC_GPIO3>;
+ };
+ };
+
+ aud_gpio_i2s0_on: aud-gpio-i2s0-on-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO3__FUNC_I2S0_DI>;
+ };
+ };
+
+ aud_gpio_i2s1_off: aud-gpio-i2s-off-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO56__FUNC_GPIO56>,
+ <PINMUX_GPIO57__FUNC_GPIO57>,
+ <PINMUX_GPIO58__FUNC_GPIO58>,
+ <PINMUX_GPIO59__FUNC_GPIO59>;
+ output-low;
+ };
+ };
+
+ aud_gpio_i2s1_on: aud-gpio-i2s1-on-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO56__FUNC_I2S1_DO>,
+ <PINMUX_GPIO57__FUNC_I2S1_BCK>,
+ <PINMUX_GPIO58__FUNC_I2S1_LRCK>,
+ <PINMUX_GPIO59__FUNC_I2S1_MCK>;
+ };
+ };
+
+ aud_gpio_i2s2_off: aud-gpio-i2s2-off-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO26__FUNC_GPIO26>,
+ <PINMUX_GPIO27__FUNC_GPIO27>;
+ output-low;
+ };
+ };
+
+ aud_gpio_i2s2_on: aud-gpio-i2s2-on-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO26__FUNC_I2S2_BCK>,
+ <PINMUX_GPIO27__FUNC_I2S2_LRCK>;
+ drive-strength = <4>;
+ };
+ };
+
+ aud_gpio_i2s3_off: aud-gpio-i2s3-off-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO4__FUNC_GPIO4>;
+ output-low;
+ };
+ };
+
+ aud_gpio_i2s3_on: aud-gpio-i2s3-on-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO4__FUNC_I2S3_DO>;
+ drive-strength = <4>;
+ };
+ };
+
+ aud_gpio_tdm_off: aud-gpio-tdm-off-pins { };
+
+ aud_gpio_tdm_on: aud-gpio-tdm-on-pins { };
+
+ aud_gpio_pcm_off: aud-gpio-pcm-off-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO115__FUNC_GPIO115>,
+ <PINMUX_GPIO116__FUNC_GPIO116>,
+ <PINMUX_GPIO117__FUNC_GPIO117>,
+ <PINMUX_GPIO118__FUNC_GPIO118>;
+ output-low;
+ };
+ };
+
+ aud_gpio_pcm_on: aud-gpio-pcm-on-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO115__FUNC_PCM_CLK>,
+ <PINMUX_GPIO116__FUNC_PCM_SYNC>,
+ <PINMUX_GPIO117__FUNC_PCM_DI>,
+ <PINMUX_GPIO118__FUNC_PCM_DO>;
+ };
+ };
+
+ aud_gpio_dmic_sec: aud-gpio-dmic-sec-pins {
+ pins {
+ pinmux = <PINMUX_GPIO23__FUNC_GPIO23>;
+ output-low;
+ };
+ };
+
+ bt_pins_reset: bt-reset-pins {
+ pins-bt-reset {
+ pinmux = <PINMUX_GPIO155__FUNC_GPIO155>;
+ output-high;
+ };
+ };
+
+ dpi_pins_sleep: dpi-sleep-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO103__FUNC_GPIO103>,
+ <PINMUX_GPIO104__FUNC_GPIO104>,
+ <PINMUX_GPIO105__FUNC_GPIO105>,
+ <PINMUX_GPIO106__FUNC_GPIO106>,
+ <PINMUX_GPIO107__FUNC_GPIO107>,
+ <PINMUX_GPIO108__FUNC_GPIO108>,
+ <PINMUX_GPIO109__FUNC_GPIO109>,
+ <PINMUX_GPIO110__FUNC_GPIO110>,
+ <PINMUX_GPIO111__FUNC_GPIO111>,
+ <PINMUX_GPIO112__FUNC_GPIO112>,
+ <PINMUX_GPIO113__FUNC_GPIO113>,
+ <PINMUX_GPIO114__FUNC_GPIO114>,
+ <PINMUX_GPIO101__FUNC_GPIO101>,
+ <PINMUX_GPIO100__FUNC_GPIO100>,
+ <PINMUX_GPIO102__FUNC_GPIO102>,
+ <PINMUX_GPIO99__FUNC_GPIO99>;
+ drive-strength = <10>;
+ output-low;
+ };
+ };
+
+ dpi_pins_default: dpi-default-pins {
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO103__FUNC_DPI_DATA0>,
+ <PINMUX_GPIO104__FUNC_DPI_DATA1>,
+ <PINMUX_GPIO105__FUNC_DPI_DATA2>,
+ <PINMUX_GPIO106__FUNC_DPI_DATA3>,
+ <PINMUX_GPIO107__FUNC_DPI_DATA4>,
+ <PINMUX_GPIO108__FUNC_DPI_DATA5>,
+ <PINMUX_GPIO109__FUNC_DPI_DATA6>,
+ <PINMUX_GPIO110__FUNC_DPI_DATA7>,
+ <PINMUX_GPIO111__FUNC_DPI_DATA8>,
+ <PINMUX_GPIO112__FUNC_DPI_DATA9>,
+ <PINMUX_GPIO113__FUNC_DPI_DATA10>,
+ <PINMUX_GPIO114__FUNC_DPI_DATA11>,
+ <PINMUX_GPIO101__FUNC_DPI_HSYNC>,
+ <PINMUX_GPIO100__FUNC_DPI_VSYNC>,
+ <PINMUX_GPIO102__FUNC_DPI_DE>,
+ <PINMUX_GPIO99__FUNC_DPI_PCLK>;
+ drive-strength = <10>;
+ };
+ };
+
+ ec_ap_int: cros-ec-int-pins {
+ pins1 {
+ pinmux = <PINMUX_GPIO13__FUNC_GPIO13>;
+ input-enable;
+ };
+ };
+
+ edp_panel_fixed_pins: edp-panel-fixed-pins {
+ pins1 {
+ pinmux = <PINMUX_GPIO153__FUNC_GPIO153>;
+ output-high;
+ };
+ };
+
+ en_pp1800_dpbrdg: en-pp1800-dpbrdg-pins {
+ pins {
+ pinmux = <PINMUX_GPIO39__FUNC_GPIO39>;
+ output-low;
+ };
+ };
+
+ gsc_ap_int_odl: gsc-ap-int-odl-pins {
+ pins1 {
+ pinmux = <PINMUX_GPIO15__FUNC_GPIO15>;
+ input-enable;
+ };
+ };
+
+ i2c0_pins: i2c0-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO128__FUNC_SDA0>,
+ <PINMUX_GPIO127__FUNC_SCL0>;
+ bias-disable;
+ drive-strength = <4>;
+ input-enable;
+ };
+ };
+
+ i2c1_pins: i2c1-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO130__FUNC_SDA1>,
+ <PINMUX_GPIO129__FUNC_SCL1>;
+ bias-disable;
+ drive-strength = <4>;
+ input-enable;
+ };
+ };
+
+ i2c2_pins: i2c2-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO132__FUNC_SDA2>,
+ <PINMUX_GPIO131__FUNC_SCL2>;
+ bias-disable;
+ drive-strength = <4>;
+ input-enable;
+ };
+ };
+
+ i2c3_pins: i2c3-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO134__FUNC_SDA3>,
+ <PINMUX_GPIO133__FUNC_SCL3>;
+ bias-disable;
+ drive-strength = <4>;
+ input-enable;
+ };
+ };
+
+ i2c5_pins: i2c5-pins {
+ pins-bus {
+ pinmux = <PINMUX_GPIO138__FUNC_SDA5>,
+ <PINMUX_GPIO137__FUNC_SCL5>;
+ bias-disable;
+ drive-strength = <4>;
+ input-enable;
+ };
+ };
+
+ it6505_pins: it6505-pins {
+ pins-hpd {
+ pinmux = <PINMUX_GPIO10__FUNC_GPIO10>;
+ input-enable;
+ bias-pull-up;
+ };
+
+ pins-int {
+ pinmux = <PINMUX_GPIO8__FUNC_GPIO8>;
+ input-enable;
+ bias-pull-up;
+ };
+
+ pins-reset {
+ pinmux = <PINMUX_GPIO177__FUNC_GPIO177>;
+ output-low;
+ bias-pull-up;
+ };
+ };
+
+ mmc0_pins_default: mmc0-default-pins {
+ pins-clk {
+ pinmux = <PINMUX_GPIO68__FUNC_MSDC0_CLK>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO71__FUNC_MSDC0_DAT0>,
+ <PINMUX_GPIO72__FUNC_MSDC0_DAT1>,
+ <PINMUX_GPIO73__FUNC_MSDC0_DAT2>,
+ <PINMUX_GPIO74__FUNC_MSDC0_DAT3>,
+ <PINMUX_GPIO75__FUNC_MSDC0_DAT4>,
+ <PINMUX_GPIO76__FUNC_MSDC0_DAT5>,
+ <PINMUX_GPIO77__FUNC_MSDC0_DAT6>,
+ <PINMUX_GPIO78__FUNC_MSDC0_DAT7>,
+ <PINMUX_GPIO69__FUNC_MSDC0_CMD>;
+ input-enable;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ pins-rst {
+ pinmux = <PINMUX_GPIO70__FUNC_MSDC0_RSTB>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc0_pins_uhs: mmc0-uhs-pins {
+ pins-clk {
+ pinmux = <PINMUX_GPIO68__FUNC_MSDC0_CLK>;
+ drive-strength = <6>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO71__FUNC_MSDC0_DAT0>,
+ <PINMUX_GPIO72__FUNC_MSDC0_DAT1>,
+ <PINMUX_GPIO73__FUNC_MSDC0_DAT2>,
+ <PINMUX_GPIO74__FUNC_MSDC0_DAT3>,
+ <PINMUX_GPIO75__FUNC_MSDC0_DAT4>,
+ <PINMUX_GPIO76__FUNC_MSDC0_DAT5>,
+ <PINMUX_GPIO77__FUNC_MSDC0_DAT6>,
+ <PINMUX_GPIO78__FUNC_MSDC0_DAT7>,
+ <PINMUX_GPIO69__FUNC_MSDC0_CMD>;
+ input-enable;
+ drive-strength = <6>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+
+ pins-ds {
+ pinmux = <PINMUX_GPIO67__FUNC_MSDC0_DSL>;
+ drive-strength = <6>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-rst {
+ pinmux = <PINMUX_GPIO70__FUNC_MSDC0_RSTB>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc1_pins_default: mmc1-default-pins {
+ pins-clk {
+ pinmux = <PINMUX_GPIO84__FUNC_MSDC1_CLK>;
+ drive-strength = <6>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO86__FUNC_MSDC1_DAT0>,
+ <PINMUX_GPIO87__FUNC_MSDC1_DAT1>,
+ <PINMUX_GPIO88__FUNC_MSDC1_DAT2>,
+ <PINMUX_GPIO89__FUNC_MSDC1_DAT3>,
+ <PINMUX_GPIO85__FUNC_MSDC1_CMD>;
+ input-enable;
+ drive-strength = <6>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc1_pins_uhs: mmc1-uhs-pins {
+ pins-clk {
+ pinmux = <PINMUX_GPIO84__FUNC_MSDC1_CLK>;
+ drive-strength = <6>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+ };
+
+ pins-cmd-dat {
+ pinmux = <PINMUX_GPIO86__FUNC_MSDC1_DAT0>,
+ <PINMUX_GPIO87__FUNC_MSDC1_DAT1>,
+ <PINMUX_GPIO88__FUNC_MSDC1_DAT2>,
+ <PINMUX_GPIO89__FUNC_MSDC1_DAT3>,
+ <PINMUX_GPIO85__FUNC_MSDC1_CMD>;
+ input-enable;
+ drive-strength = <8>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ mmc1_pins_eint: mmc1-eint-pins {
+ pins_dat1 {
+ pinmux = <PINMUX_GPIO87__FUNC_GPIO87>;
+ input-enable;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+ };
+ };
+
+ nor_pins_default: nor-default-pins {
+ pins0 {
+ pinmux = <PINMUX_GPIO63__FUNC_SPINOR_IO0>,
+ <PINMUX_GPIO61__FUNC_SPINOR_CK>,
+ <PINMUX_GPIO64__FUNC_SPINOR_IO1>;
+ drive-strength = <6>;
+ bias-pull-down;
+ };
+
+ pins1 {
+ pinmux = <PINMUX_GPIO62__FUNC_SPINOR_CS>,
+ <PINMUX_GPIO65__FUNC_SPINOR_IO2>,
+ <PINMUX_GPIO66__FUNC_SPINOR_IO3>;
+ drive-strength = <6>;
+ bias-pull-up;
+ };
+ };
+
+ pen_eject: pen-eject-pins {
+ pins {
+ pinmux = <PINMUX_GPIO18__FUNC_GPIO18>;
+ input-enable;
+ /* External pull-up. */
+ bias-disable;
+ };
+ };
+
+ pwm0_pin: pwm0-default-pins {
+ pins {
+ pinmux = <PINMUX_GPIO97__FUNC_DISP_PWM>;
+ output-high;
+ };
+ };
+
+ rt1019p_pins_default: rt1019p-default-pins {
+ pins {
+ pinmux = <PINMUX_GPIO150__FUNC_GPIO150>;
+ output-low;
+ };
+ };
+
+ scp_pins: scp-default-pins {
+ pins-scp-uart {
+ pinmux = <PINMUX_GPIO48__FUNC_TP_URXD2_AO>,
+ <PINMUX_GPIO49__FUNC_TP_UTXD2_AO>;
+ };
+ };
+
+ spi1_pins: spi1-pins {
+ pins-spi {
+ pinmux = <PINMUX_GPIO40__FUNC_SPI1_CLK_A>,
+ <PINMUX_GPIO41__FUNC_SPI1_CSB_A>,
+ <PINMUX_GPIO42__FUNC_SPI1_MO_A>,
+ <PINMUX_GPIO43__FUNC_SPI1_MI_A>;
+ bias-disable;
+ input-enable;
+ };
+ };
+
+ spi2_pins: spi2-pins {
+ pins-spi {
+ pinmux = <PINMUX_GPIO44__FUNC_SPI2_CLK_A>,
+ <PINMUX_GPIO45__FUNC_GPIO45>,
+ <PINMUX_GPIO46__FUNC_SPI2_MO_A>,
+ <PINMUX_GPIO47__FUNC_SPI2_MI_A>;
+ bias-disable;
+ input-enable;
+ };
+ };
+
+ spmi_pins: spmi-pins {
+ pins-spmi {
+ pinmux = <PINMUX_GPIO183__FUNC_SPMI_SCL>,
+ <PINMUX_GPIO184__FUNC_SPMI_SDA>;
+ };
+ };
+
+ touchscreen_pins: touchscreen-pins {
+ pins-irq {
+ pinmux = <PINMUX_GPIO12__FUNC_GPIO12>;
+ input-enable;
+ bias-pull-up;
+ };
+
+ pins-reset {
+ pinmux = <PINMUX_GPIO60__FUNC_GPIO60>;
+ output-high;
+ };
+
+ pins-report-sw {
+ pinmux = <PINMUX_GPIO37__FUNC_GPIO37>;
+ output-low;
+ };
+ };
+
+ trackpad_pin: trackpad-default-pins {
+ pins-int-n {
+ pinmux = <PINMUX_GPIO11__FUNC_GPIO11>;
+ input-enable;
+ bias-disable; /* pulled externally */
+ };
+ };
+
+ wifi_enable_pin: wifi-enable-pins {
+ pins-wifi-enable {
+ pinmux = <PINMUX_GPIO54__FUNC_GPIO54>;
+ };
+ };
+
+ wifi_wakeup_pin: wifi-wakeup-pins {
+ pins-wifi-wakeup {
+ pinmux = <PINMUX_GPIO7__FUNC_GPIO7>;
+ input-enable;
+ };
+ };
+};
+
+&pwm0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm0_pin>;
+ status = "okay";
+};
+
+&pwrap {
+ pmic {
+ compatible = "mediatek,mt6366", "mediatek,mt6358";
+ interrupt-controller;
+ interrupts-extended = <&pio 201 IRQ_TYPE_LEVEL_HIGH>;
+ #interrupt-cells = <2>;
+
+ mt6366codec: codec {
+ compatible = "mediatek,mt6366-sound", "mediatek,mt6358-sound";
+ Avdd-supply = <&mt6366_vaud28_reg>;
+ mediatek,dmic-mode = <1>; /* one-wire */
+ };
+
+ mt6366_regulators: regulators {
+ compatible = "mediatek,mt6366-regulator", "mediatek,mt6358-regulator";
+ vsys-ldo1-supply = <&pp4200_z2>;
+ vsys-ldo2-supply = <&pp4200_z2>;
+ vsys-ldo3-supply = <&pp4200_z2>;
+ vsys-vcore-supply = <&pp4200_z2>;
+ vsys-vdram1-supply = <&pp4200_z2>;
+ vsys-vgpu-supply = <&pp4200_z2>;
+ vsys-vmodem-supply = <&pp4200_z2>;
+ vsys-vpa-supply = <&pp4200_z2>;
+ vsys-vproc11-supply = <&pp4200_z2>;
+ vsys-vproc12-supply = <&pp4200_z2>;
+ vsys-vs1-supply = <&pp4200_z2>;
+ vsys-vs2-supply = <&pp4200_z2>;
+ vs1-ldo1-supply = <&mt6366_vs1_reg>;
+ vs2-ldo1-supply = <&mt6366_vdram1_reg>;
+ vs2-ldo2-supply = <&mt6366_vs2_reg>;
+ vs2-ldo3-supply = <&mt6366_vs2_reg>;
+
+ vcore {
+ regulator-name = "pp0750_dvdd_core";
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <800000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ };
+
+ mt6366_vdram1_reg: vdram1 {
+ regulator-name = "pp1125_emi_vdd2";
+ regulator-min-microvolt = <1125000>;
+ regulator-max-microvolt = <1125000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ };
+
+ mt6366_vgpu_reg: vgpu {
+ regulator-name = "ppvar_dvdd_gpu";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-allowed-modes = <0 1>;
+ };
+
+ mt6366_vproc11_reg: vproc11 {
+ regulator-name = "ppvar_dvdd_proc_bc_mt6366";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ };
+
+ mt6366_vproc12_reg: vproc12 {
+ regulator-name = "ppvar_dvdd_proc_lc";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <200>;
+ regulator-allowed-modes = <0 1>;
+ regulator-always-on;
+ };
+
+ mt6366_vs1_reg: vs1 {
+ regulator-name = "pp2000_vs1";
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ mt6366_vs2_reg: vs2 {
+ regulator-name = "pp1350_vs2";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <12500>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-always-on;
+ };
+
+ va12 {
+ regulator-name = "pp1200_va12";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-enable-ramp-delay = <270>;
+ regulator-always-on;
+ };
+
+ mt6366_vaud28_reg: vaud28 {
+ regulator-name = "pp2800_vaud28";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ mt6366_vaux18_reg: vaux18 {
+ regulator-name = "pp1840_vaux18";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1840000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ mt6366_vbif28_reg: vbif28 {
+ regulator-name = "pp2800_vbif28";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ mt6366_vcn18_reg: vcn18 {
+ regulator-name = "pp1800_vcn18_x";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ mt6366_vcn28_reg: vcn28 {
+ regulator-name = "pp2800_vcn28_x";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ mt6366_vefuse_reg: vefuse {
+ regulator-name = "pp1800_vefuse";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ mt6366_vfe28_reg: vfe28 {
+ regulator-name = "pp2800_vfe28_x";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ mt6366_vemc_reg: vemc {
+ regulator-name = "pp3000_vemc";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-enable-ramp-delay = <60>;
+ };
+
+ mt6366_vibr_reg: vibr {
+ regulator-name = "pp2800_vibr_x";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <60>;
+ };
+
+ mt6366_vio18_reg: vio18 {
+ regulator-name = "pp1800_vio18_s3";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <2700>;
+ regulator-always-on;
+ };
+
+ mt6366_vio28_reg: vio28 {
+ regulator-name = "pp2800_vio28_x";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ mt6366_vm18_reg: vm18 {
+ regulator-name = "pp1800_emi_vdd1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1840000>;
+ regulator-enable-ramp-delay = <325>;
+ regulator-always-on;
+ };
+
+ mt6366_vmc_reg: vmc {
+ regulator-name = "pp3000_vmc";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-enable-ramp-delay = <60>;
+ };
+
+ mt6366_vmddr_reg: vmddr {
+ regulator-name = "pm0750_emi_vmddr";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <750000>;
+ regulator-enable-ramp-delay = <325>;
+ regulator-always-on;
+ };
+
+ mt6366_vmch_reg: vmch {
+ regulator-name = "pp3000_vmch";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-enable-ramp-delay = <60>;
+ };
+
+ mt6366_vcn33_reg: vcn33 {
+ regulator-name = "pp3300_vcn33_x";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-enable-ramp-delay = <270>;
+ };
+
+ vdram2 {
+ regulator-name = "pp0600_emi_vddq";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <600000>;
+ regulator-enable-ramp-delay = <3300>;
+ regulator-always-on;
+ };
+
+ mt6366_vrf12_reg: vrf12 {
+ regulator-name = "pp1200_vrf12_x";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-enable-ramp-delay = <120>;
+ };
+
+ mt6366_vrf18_reg: vrf18 {
+ regulator-name = "pp1800_vrf18_x";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <120>;
+ };
+
+ vsim1 {
+ regulator-name = "pp1860_vsim1_x";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1860000>;
+ regulator-enable-ramp-delay = <540>;
+ };
+
+ mt6366_vsim2_reg: vsim2 {
+ regulator-name = "pp2760_vsim2_x";
+ regulator-min-microvolt = <2700000>;
+ regulator-max-microvolt = <2760000>;
+ regulator-enable-ramp-delay = <540>;
+ };
+
+ mt6366_vsram_gpu_reg: vsram-gpu {
+ regulator-name = "pp0900_dvdd_sram_gpu";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <240>;
+ };
+
+ mt6366_vsram_others_reg: vsram-others {
+ regulator-name = "pp0900_dvdd_sram_core";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <240>;
+ regulator-always-on;
+ };
+
+ mt6366_vsram_proc11_reg: vsram-proc11 {
+ regulator-name = "pp0900_dvdd_sram_bc";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1120000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <240>;
+ regulator-always-on;
+ };
+
+ mt6366_vsram_proc12_reg: vsram-proc12 {
+ regulator-name = "pp0900_dvdd_sram_lc";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <1120000>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <240>;
+ regulator-always-on;
+ };
+
+ vusb {
+ regulator-name = "pp3070_vusb";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3070000>;
+ regulator-enable-ramp-delay = <270>;
+ regulator-always-on;
+ };
+
+ vxo22 {
+ regulator-name = "pp2240_vxo22";
+ regulator-min-microvolt = <2200000>;
+ regulator-max-microvolt = <2240000>;
+ regulator-enable-ramp-delay = <120>;
+ /* Feeds DCXO internally */
+ regulator-always-on;
+ };
+ };
+
+ rtc {
+ compatible = "mediatek,mt6366-rtc", "mediatek,mt6358-rtc";
+ };
+ };
+};
+
+&scp {
+ pinctrl-names = "default";
+ pinctrl-0 = <&scp_pins>;
+ firmware-name = "mediatek/mt8186/scp.img";
+ memory-region = <&scp_mem>;
+ status = "okay";
+
+ cros-ec-rpmsg {
+ compatible = "google,cros-ec-rpmsg";
+ mediatek,rpmsg-name = "cros-ec-rpmsg";
+ };
+};
+
+&spi1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi1_pins>;
+ mediatek,pad-select = <0>;
+ status = "okay";
+
+ cros_ec: ec@0 {
+ compatible = "google,cros-ec-spi";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ interrupt-parent = <&pio>;
+ interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&ec_ap_int>;
+
+ i2c_tunnel: i2c-tunnel {
+ compatible = "google,cros-ec-i2c-tunnel";
+ google,remote-bus = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ typec {
+ compatible = "google,cros-ec-typec";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ usb_c0: connector@0 {
+ compatible = "usb-c-connector";
+ reg = <0>;
+ label = "left";
+ power-role = "dual";
+ data-role = "host";
+ try-power-role = "source";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@1 {
+ reg = <1>;
+
+ typec_port0: endpoint { };
+ };
+ };
+ };
+
+ usb_c1: connector@1 {
+ compatible = "usb-c-connector";
+ reg = <1>;
+ label = "right";
+ power-role = "dual";
+ data-role = "host";
+ try-power-role = "source";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@1 {
+ reg = <1>;
+
+ typec_port1: endpoint { };
+ };
+ };
+ };
+ };
+ };
+};
+
+&spi2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2_pins>;
+ cs-gpios = <&pio 45 GPIO_ACTIVE_LOW>;
+ mediatek,pad-select = <0>;
+ status = "okay";
+
+ cr50: cr50@0 {
+ compatible = "google,cr50";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&gsc_ap_int_odl>;
+ interrupt-parent = <&pio>;
+ interrupts = <15 IRQ_TYPE_EDGE_RISING>;
+ };
+};
+
+&ssusb0 {
+ status = "okay";
+};
+
+&ssusb1 {
+ status = "okay";
+};
+
+&u3phy0 {
+ status = "okay";
+};
+
+&u3phy1 {
+ status = "okay";
+};
+
+&uart0 {
+ status = "okay";
+};
+
+&usb_host0 {
+ vbus-supply = <&pp3300_s3>;
+ status = "okay";
+};
+
+&usb_host1 {
+ vbus-supply = <&usb_p1_vbus>;
+ status = "okay";
+ #address-cells = <2>;
+ #size-cells = <2>;
+};
+
+&watchdog {
+ mediatek,reset-by-toprgu;
+};
+
+#include <arm/cros-ec-keyboard.dtsi>
+#include <arm/cros-ec-sbs.dtsi>
--
2.42.0.655.g421f12c284-goog
Add entries for MT8186 based Tentacruel / Tentacool Chromebooks. The two
are based on the same board design: the former is a convertible device
with a touchscreen, stylus, and some extra buttons; the latter is a
clamshell device and lacks these additional features.
The two devices both have two variants. The difference is a second
source touchpad controller that shares the same address as the original,
but is incompatible.
The extra SKU IDs for the Tentacruel devices map to different sensor
components attached to the Embedded Controller. These are not visible
to the main processor.
Signed-off-by: Chen-Yu Tsai <[email protected]>
---
.../devicetree/bindings/arm/mediatek.yaml | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index 60337b439744..aa7e6734b336 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -206,6 +206,32 @@ properties:
- enum:
- mediatek,mt8183-pumpkin
- const: mediatek,mt8183
+ - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
+ items:
+ - const: google,tentacruel-sku262144
+ - const: google,tentacruel-sku262145
+ - const: google,tentacruel-sku262146
+ - const: google,tentacruel-sku262147
+ - const: google,tentacruel
+ - const: mediatek,mt8186
+ - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
+ items:
+ - const: google,tentacruel-sku262148
+ - const: google,tentacruel-sku262149
+ - const: google,tentacruel-sku262150
+ - const: google,tentacruel-sku262151
+ - const: google,tentacruel
+ - const: mediatek,mt8186
+ - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
+ items:
+ - const: google,tentacruel-sku327681
+ - const: google,tentacruel
+ - const: mediatek,mt8186
+ - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
+ items:
+ - const: google,tentacruel-sku327683
+ - const: google,tentacruel
+ - const: mediatek,mt8186
- items:
- enum:
- mediatek,mt8186-evb
--
2.42.0.655.g421f12c284-goog
On Fri, Oct 13, 2023 at 07:02:27AM +0800, Chen-Yu Tsai wrote:
> Some of the new MediaTek board entries were inserted in a chronological
> order, or just randomly. This makes it harder to search for an entry.
>
> Sort the entries by first grouping by SoC, then sorting by board
> compatible strings. Also add a comment at the top asking people to do
> the same.
Acked-by: Conor Dooley <[email protected]>
Thanks,
Conor.
On Fri, Oct 13, 2023 at 07:02:28AM +0800, Chen-Yu Tsai wrote:
> Add entries for MT8186 based Tentacruel / Tentacool Chromebooks. The two
> are based on the same board design: the former is a convertible device
> with a touchscreen, stylus, and some extra buttons; the latter is a
> clamshell device and lacks these additional features.
>
> The two devices both have two variants. The difference is a second
> source touchpad controller that shares the same address as the original,
> but is incompatible.
> The extra SKU IDs for the Tentacruel devices map to different sensor
> components attached to the Embedded Controller. These are not visible
> to the main processor.
Wha? Given your ordering, is a "google,tentacruel-sku262144" a super-set
of "google,tentacruel-sku262145"? If not, this compatible ordering
doesn't make sense. I can't tell from your description, and the
absence of a
items:
- const: google,tentacruel-sku262145
- const: google,tentacruel-sku262146
- const: google,tentacruel-sku262147
- const: google,tentacruel
- const: mediatek,mt8186
suggests that there is no google,tentacruel-sku262145
device?
Cheers,
Conor.
>
> Signed-off-by: Chen-Yu Tsai <[email protected]>
> ---
> .../devicetree/bindings/arm/mediatek.yaml | 26 +++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> index 60337b439744..aa7e6734b336 100644
> --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> @@ -206,6 +206,32 @@ properties:
> - enum:
> - mediatek,mt8183-pumpkin
> - const: mediatek,mt8183
> + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> + items:
> + - const: google,tentacruel-sku262144
> + - const: google,tentacruel-sku262145
> + - const: google,tentacruel-sku262146
> + - const: google,tentacruel-sku262147
> + - const: google,tentacruel
> + - const: mediatek,mt8186
> + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> + items:
> + - const: google,tentacruel-sku262148
> + - const: google,tentacruel-sku262149
> + - const: google,tentacruel-sku262150
> + - const: google,tentacruel-sku262151
> + - const: google,tentacruel
> + - const: mediatek,mt8186
> + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> + items:
> + - const: google,tentacruel-sku327681
> + - const: google,tentacruel
> + - const: mediatek,mt8186
> + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> + items:
> + - const: google,tentacruel-sku327683
> + - const: google,tentacruel
> + - const: mediatek,mt8186
> - items:
> - enum:
> - mediatek,mt8186-evb
> --
> 2.42.0.655.g421f12c284-goog
>
On Fri, Oct 13, 2023 at 07:02:29AM +0800, Chen-Yu Tsai wrote:
> Add an entry for the MT8186 based Steelix Chromebook, also known as the
> Lenovo 300e Yoga Chromebook Gen 4.
>
> Signed-off-by: Chen-Yu Tsai <[email protected]>
> ---
> Documentation/devicetree/bindings/arm/mediatek.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> index aa7e6734b336..fafd5e18f640 100644
> --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> @@ -206,6 +206,13 @@ properties:
> - enum:
> - mediatek,mt8183-pumpkin
> - const: mediatek,mt8183
> + - description: Google Steelix (Lenovo 300e Yoga Chromebook Gen 4)
> + items:
> + - enum:
> + - google,steelix-sku131072
> + - google,steelix-sku131073
This one makes sense though, because both of the SKUs are in an enum.
> + - const: google,steelix
> + - const: mediatek,mt8186
> - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> items:
> - const: google,tentacruel-sku262144
> --
> 2.42.0.655.g421f12c284-goog
>
On Fri, Oct 13, 2023 at 8:11 AM Conor Dooley <[email protected]> wrote:
>
> On Fri, Oct 13, 2023 at 07:02:28AM +0800, Chen-Yu Tsai wrote:
> > Add entries for MT8186 based Tentacruel / Tentacool Chromebooks. The two
> > are based on the same board design: the former is a convertible device
> > with a touchscreen, stylus, and some extra buttons; the latter is a
> > clamshell device and lacks these additional features.
> >
> > The two devices both have two variants. The difference is a second
> > source touchpad controller that shares the same address as the original,
> > but is incompatible.
>
> > The extra SKU IDs for the Tentacruel devices map to different sensor
> > components attached to the Embedded Controller. These are not visible
> > to the main processor.
>
> Wha? Given your ordering, is a "google,tentacruel-sku262144" a super-set
> of "google,tentacruel-sku262145"? If not, this compatible ordering
> doesn't make sense. I can't tell from your description, and the
> absence of a
> items:
> - const: google,tentacruel-sku262145
> - const: google,tentacruel-sku262146
> - const: google,tentacruel-sku262147
> - const: google,tentacruel
> - const: mediatek,mt8186
> suggests that there is no google,tentacruel-sku262145
> device?
AFAIK all four SKUs exist. And as far as the main processor is concerned,
they look completely identical, so they should share the same device tree.
As mentioned in the commit message, the differences are only visible to
the embedded controller, which fuses the sensor inputs.
Writing it this way avoids having four identical device tree files.
We also do this for many other device families, though those cover
different revisions, such as:
- description: Google Hana (Lenovo Chromebook N23 Yoga, C330, 300e,...)
items:
- const: google,hana-rev6
- const: google,hana-rev5
- const: google,hana-rev4
- const: google,hana-rev3
- const: google,hana
- const: mediatek,mt8173
ChenYu
> Cheers,
> Conor.
>
> >
> > Signed-off-by: Chen-Yu Tsai <[email protected]>
> > ---
> > .../devicetree/bindings/arm/mediatek.yaml | 26 +++++++++++++++++++
> > 1 file changed, 26 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > index 60337b439744..aa7e6734b336 100644
> > --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> > +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > @@ -206,6 +206,32 @@ properties:
> > - enum:
> > - mediatek,mt8183-pumpkin
> > - const: mediatek,mt8183
> > + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> > + items:
> > + - const: google,tentacruel-sku262144
> > + - const: google,tentacruel-sku262145
> > + - const: google,tentacruel-sku262146
> > + - const: google,tentacruel-sku262147
> > + - const: google,tentacruel
> > + - const: mediatek,mt8186
> > + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> > + items:
> > + - const: google,tentacruel-sku262148
> > + - const: google,tentacruel-sku262149
> > + - const: google,tentacruel-sku262150
> > + - const: google,tentacruel-sku262151
> > + - const: google,tentacruel
> > + - const: mediatek,mt8186
> > + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> > + items:
> > + - const: google,tentacruel-sku327681
> > + - const: google,tentacruel
> > + - const: mediatek,mt8186
> > + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> > + items:
> > + - const: google,tentacruel-sku327683
> > + - const: google,tentacruel
> > + - const: mediatek,mt8186
> > - items:
> > - enum:
> > - mediatek,mt8186-evb
> > --
> > 2.42.0.655.g421f12c284-goog
> >
On Fri, Oct 13, 2023 at 10:29:25AM -0700, Chen-Yu Tsai wrote:
> On Fri, Oct 13, 2023 at 8:11 AM Conor Dooley <[email protected]> wrote:
> >
> > On Fri, Oct 13, 2023 at 07:02:28AM +0800, Chen-Yu Tsai wrote:
> > > Add entries for MT8186 based Tentacruel / Tentacool Chromebooks. The two
> > > are based on the same board design: the former is a convertible device
> > > with a touchscreen, stylus, and some extra buttons; the latter is a
> > > clamshell device and lacks these additional features.
> > >
> > > The two devices both have two variants. The difference is a second
> > > source touchpad controller that shares the same address as the original,
> > > but is incompatible.
> >
> > > The extra SKU IDs for the Tentacruel devices map to different sensor
> > > components attached to the Embedded Controller. These are not visible
> > > to the main processor.
> >
> > Wha? Given your ordering, is a "google,tentacruel-sku262144" a super-set
> > of "google,tentacruel-sku262145"? If not, this compatible ordering
> > doesn't make sense. I can't tell from your description, and the
> > absence of a
> > items:
> > - const: google,tentacruel-sku262145
> > - const: google,tentacruel-sku262146
> > - const: google,tentacruel-sku262147
> > - const: google,tentacruel
> > - const: mediatek,mt8186
> > suggests that there is no google,tentacruel-sku262145
> > device?
>
> AFAIK all four SKUs exist. And as far as the main processor is concerned,
> they look completely identical, so they should share the same device tree.
> As mentioned in the commit message, the differences are only visible to
> the embedded controller, which fuses the sensor inputs.
Then it makes very little sense to write a binding like this.
If this was just for the 252144 SKU, this would be fine.
For the other SKUs, there is no way to uniquely identify them, as
all four of google,tentacruel-sku262144, google,tentacruel-sku262145,
google,tentacruel-sku262146 and google,tentacruel-sku262147 must be
present.
Given that, why even bother including the SKUs in the first place,
since no information can be derived from them that cannot be derived
from google,tentacruel?
There's something that I am clearly missing here...
Also, why is the order inverted, with the lower SKUs being super-sets of
the higher ones? The Hana one you show below makes a little more sense
in that regard.
> Writing it this way avoids having four identical device tree files.
>
> We also do this for many other device families, though those cover
> different revisions, such as:
>
> - description: Google Hana (Lenovo Chromebook N23 Yoga, C330, 300e,...)
> items:
> - const: google,hana-rev6
> - const: google,hana-rev5
> - const: google,hana-rev4
> - const: google,hana-rev3
> - const: google,hana
> - const: mediatek,mt8173
>
>
> ChenYu
>
> > Cheers,
> > Conor.
> >
> > >
> > > Signed-off-by: Chen-Yu Tsai <[email protected]>
> > > ---
> > > .../devicetree/bindings/arm/mediatek.yaml | 26 +++++++++++++++++++
> > > 1 file changed, 26 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > > index 60337b439744..aa7e6734b336 100644
> > > --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> > > +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > > @@ -206,6 +206,32 @@ properties:
> > > - enum:
> > > - mediatek,mt8183-pumpkin
> > > - const: mediatek,mt8183
> > > + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> > > + items:
> > > + - const: google,tentacruel-sku262144
> > > + - const: google,tentacruel-sku262145
> > > + - const: google,tentacruel-sku262146
> > > + - const: google,tentacruel-sku262147
> > > + - const: google,tentacruel
> > > + - const: mediatek,mt8186
> > > + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> > > + items:
> > > + - const: google,tentacruel-sku262148
> > > + - const: google,tentacruel-sku262149
> > > + - const: google,tentacruel-sku262150
> > > + - const: google,tentacruel-sku262151
> > > + - const: google,tentacruel
> > > + - const: mediatek,mt8186
> > > + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> > > + items:
> > > + - const: google,tentacruel-sku327681
> > > + - const: google,tentacruel
> > > + - const: mediatek,mt8186
> > > + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> > > + items:
> > > + - const: google,tentacruel-sku327683
> > > + - const: google,tentacruel
> > > + - const: mediatek,mt8186
> > > - items:
> > > - enum:
> > > - mediatek,mt8186-evb
> > > --
> > > 2.42.0.655.g421f12c284-goog
> > >
On Fri, Oct 13, 2023 at 10:55 AM Conor Dooley <[email protected]> wrote:
>
> On Fri, Oct 13, 2023 at 10:29:25AM -0700, Chen-Yu Tsai wrote:
> > On Fri, Oct 13, 2023 at 8:11 AM Conor Dooley <[email protected]> wrote:
> > >
> > > On Fri, Oct 13, 2023 at 07:02:28AM +0800, Chen-Yu Tsai wrote:
> > > > Add entries for MT8186 based Tentacruel / Tentacool Chromebooks. The two
> > > > are based on the same board design: the former is a convertible device
> > > > with a touchscreen, stylus, and some extra buttons; the latter is a
> > > > clamshell device and lacks these additional features.
> > > >
> > > > The two devices both have two variants. The difference is a second
> > > > source touchpad controller that shares the same address as the original,
> > > > but is incompatible.
> > >
> > > > The extra SKU IDs for the Tentacruel devices map to different sensor
> > > > components attached to the Embedded Controller. These are not visible
> > > > to the main processor.
> > >
> > > Wha? Given your ordering, is a "google,tentacruel-sku262144" a super-set
> > > of "google,tentacruel-sku262145"? If not, this compatible ordering
> > > doesn't make sense. I can't tell from your description, and the
> > > absence of a
> > > items:
> > > - const: google,tentacruel-sku262145
> > > - const: google,tentacruel-sku262146
> > > - const: google,tentacruel-sku262147
> > > - const: google,tentacruel
> > > - const: mediatek,mt8186
> > > suggests that there is no google,tentacruel-sku262145
> > > device?
> >
> > AFAIK all four SKUs exist. And as far as the main processor is concerned,
> > they look completely identical, so they should share the same device tree.
> > As mentioned in the commit message, the differences are only visible to
> > the embedded controller, which fuses the sensor inputs.
>
> Then it makes very little sense to write a binding like this.
> If this was just for the 252144 SKU, this would be fine.
> For the other SKUs, there is no way to uniquely identify them, as
> all four of google,tentacruel-sku262144, google,tentacruel-sku262145,
> google,tentacruel-sku262146 and google,tentacruel-sku262147 must be
> present.
> Given that, why even bother including the SKUs in the first place,
> since no information can be derived from them that cannot be derived
> from google,tentacruel?
> There's something that I am clearly missing here...
There are incompatible variants of google,tentacruel. This is why this
patch has four google,tentacruel based entries. Of them, two are Tentacool,
which are clamshell laptops, and two of them are Tentacruel, which are
convertibles.
Within each group there are two variants: the second variant swaps out
the I2C touchpad controller. These two controllers use the same I2C
address but use different compatible strings, so it's not possible to
have them coexist within the same device tree file like we do for many
other second source components.
So the relationship looks like the following:
google,tentacruel --- Tentacruel --- google,tentacruel-sku26214[4567]
| |
| -- google,tentacruel-sku2621{48,49,50,51}
|
-- Tentacool ---- google,tentacruel-sku327681
|
--- google,tentacruel-sku327683
Also, the devices themselves only know their own SKU ID. The firmware
will generate a list of compatible strings like:
google,tentacruel-rev4-sku262144
google,tentacruel-rev4
google,tentacruel-sku262144
google,tentacruel
and try to find a match in the kernel FIT image. The method we currently
use is to include all the applicable board compatible strings.
> Also, why is the order inverted, with the lower SKUs being super-sets of
> the higher ones? The Hana one you show below makes a little more sense
> in that regard.
Either way works. The SKU IDs have no particular order. Nor do the
individual bits in the SKU ID have meaning. They are just arbitrarily
assigned by the manufacturer. They just have to all be present so any
of the SKUs will match.
Hope that explains things better.
Regards
ChenYu
> > Writing it this way avoids having four identical device tree files.
> >
> > We also do this for many other device families, though those cover
> > different revisions, such as:
> >
> > - description: Google Hana (Lenovo Chromebook N23 Yoga, C330, 300e,...)
> > items:
> > - const: google,hana-rev6
> > - const: google,hana-rev5
> > - const: google,hana-rev4
> > - const: google,hana-rev3
> > - const: google,hana
> > - const: mediatek,mt8173
> >
> >
> > ChenYu
> >
> > > Cheers,
> > > Conor.
> > >
> > > >
> > > > Signed-off-by: Chen-Yu Tsai <[email protected]>
> > > > ---
> > > > .../devicetree/bindings/arm/mediatek.yaml | 26 +++++++++++++++++++
> > > > 1 file changed, 26 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > > > index 60337b439744..aa7e6734b336 100644
> > > > --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> > > > +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > > > @@ -206,6 +206,32 @@ properties:
> > > > - enum:
> > > > - mediatek,mt8183-pumpkin
> > > > - const: mediatek,mt8183
> > > > + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> > > > + items:
> > > > + - const: google,tentacruel-sku262144
> > > > + - const: google,tentacruel-sku262145
> > > > + - const: google,tentacruel-sku262146
> > > > + - const: google,tentacruel-sku262147
> > > > + - const: google,tentacruel
> > > > + - const: mediatek,mt8186
> > > > + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> > > > + items:
> > > > + - const: google,tentacruel-sku262148
> > > > + - const: google,tentacruel-sku262149
> > > > + - const: google,tentacruel-sku262150
> > > > + - const: google,tentacruel-sku262151
> > > > + - const: google,tentacruel
> > > > + - const: mediatek,mt8186
> > > > + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> > > > + items:
> > > > + - const: google,tentacruel-sku327681
> > > > + - const: google,tentacruel
> > > > + - const: mediatek,mt8186
> > > > + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> > > > + items:
> > > > + - const: google,tentacruel-sku327683
> > > > + - const: google,tentacruel
> > > > + - const: mediatek,mt8186
> > > > - items:
> > > > - enum:
> > > > - mediatek,mt8186-evb
> > > > --
> > > > 2.42.0.655.g421f12c284-goog
> > > >
On Fri, Oct 13, 2023 at 11:19:16AM -0700, Chen-Yu Tsai wrote:
> On Fri, Oct 13, 2023 at 10:55 AM Conor Dooley <[email protected]> wrote:
> >
> > On Fri, Oct 13, 2023 at 10:29:25AM -0700, Chen-Yu Tsai wrote:
> > > On Fri, Oct 13, 2023 at 8:11 AM Conor Dooley <[email protected]> wrote:
> > > >
> > > > On Fri, Oct 13, 2023 at 07:02:28AM +0800, Chen-Yu Tsai wrote:
> > > > > Add entries for MT8186 based Tentacruel / Tentacool Chromebooks. The two
> > > > > are based on the same board design: the former is a convertible device
> > > > > with a touchscreen, stylus, and some extra buttons; the latter is a
> > > > > clamshell device and lacks these additional features.
> > > > >
> > > > > The two devices both have two variants. The difference is a second
> > > > > source touchpad controller that shares the same address as the original,
> > > > > but is incompatible.
> > > >
> > > > > The extra SKU IDs for the Tentacruel devices map to different sensor
> > > > > components attached to the Embedded Controller. These are not visible
> > > > > to the main processor.
> > > >
> > > > Wha? Given your ordering, is a "google,tentacruel-sku262144" a super-set
> > > > of "google,tentacruel-sku262145"? If not, this compatible ordering
> > > > doesn't make sense. I can't tell from your description, and the
> > > > absence of a
> > > > items:
> > > > - const: google,tentacruel-sku262145
> > > > - const: google,tentacruel-sku262146
> > > > - const: google,tentacruel-sku262147
> > > > - const: google,tentacruel
> > > > - const: mediatek,mt8186
> > > > suggests that there is no google,tentacruel-sku262145
> > > > device?
> > >
> > > AFAIK all four SKUs exist. And as far as the main processor is concerned,
> > > they look completely identical, so they should share the same device tree.
> > > As mentioned in the commit message, the differences are only visible to
> > > the embedded controller, which fuses the sensor inputs.
> >
> > Then it makes very little sense to write a binding like this.
> > If this was just for the 252144 SKU, this would be fine.
> > For the other SKUs, there is no way to uniquely identify them, as
> > all four of google,tentacruel-sku262144, google,tentacruel-sku262145,
> > google,tentacruel-sku262146 and google,tentacruel-sku262147 must be
> > present.
> > Given that, why even bother including the SKUs in the first place,
> > since no information can be derived from them that cannot be derived
> > from google,tentacruel?
> > There's something that I am clearly missing here...
>
> There are incompatible variants of google,tentacruel. This is why this
> patch has four google,tentacruel based entries. Of them, two are Tentacool,
> which are clamshell laptops, and two of them are Tentacruel, which are
> convertibles.
>
> Within each group there are two variants: the second variant swaps out
> the I2C touchpad controller. These two controllers use the same I2C
> address but use different compatible strings, so it's not possible to
> have them coexist within the same device tree file like we do for many
> other second source components.
>
> So the relationship looks like the following:
>
> google,tentacruel --- Tentacruel --- google,tentacruel-sku26214[4567]
> | |
> | -- google,tentacruel-sku2621{48,49,50,51}
> |
> -- Tentacool ---- google,tentacruel-sku327681
> |
> --- google,tentacruel-sku327683
>
> Also, the devices themselves only know their own SKU ID. The firmware
> will generate a list of compatible strings like:
>
> google,tentacruel-rev4-sku262144
> google,tentacruel-rev4
> google,tentacruel-sku262144
> google,tentacruel
>
> and try to find a match in the kernel FIT image. The method we currently
> use is to include all the applicable board compatible strings.
Then it seems like what you need is something like
oneOf:
- items:
- const: google,tentacruel-sku262144
- const: google,tentacruel
- const: mediatek,mt8186
- items:
- enum:
- google,tentacruel-sku262145
- google,tentacruel-sku262146
- google,tentacruel-sku262147
- const: google,tentacruel-sku262144
- const: google,tentacruel
- const: mediatek,mt8186
What you have at the moment just seems like a hack because you want to
stuff all of these compatible strings into a single dts.
On Sat, Oct 14, 2023 at 6:40 AM Conor Dooley <[email protected]> wrote:
>
> On Fri, Oct 13, 2023 at 11:19:16AM -0700, Chen-Yu Tsai wrote:
> > On Fri, Oct 13, 2023 at 10:55 AM Conor Dooley <[email protected]> wrote:
> > >
> > > On Fri, Oct 13, 2023 at 10:29:25AM -0700, Chen-Yu Tsai wrote:
> > > > On Fri, Oct 13, 2023 at 8:11 AM Conor Dooley <[email protected]> wrote:
> > > > >
> > > > > On Fri, Oct 13, 2023 at 07:02:28AM +0800, Chen-Yu Tsai wrote:
> > > > > > Add entries for MT8186 based Tentacruel / Tentacool Chromebooks. The two
> > > > > > are based on the same board design: the former is a convertible device
> > > > > > with a touchscreen, stylus, and some extra buttons; the latter is a
> > > > > > clamshell device and lacks these additional features.
> > > > > >
> > > > > > The two devices both have two variants. The difference is a second
> > > > > > source touchpad controller that shares the same address as the original,
> > > > > > but is incompatible.
> > > > >
> > > > > > The extra SKU IDs for the Tentacruel devices map to different sensor
> > > > > > components attached to the Embedded Controller. These are not visible
> > > > > > to the main processor.
> > > > >
> > > > > Wha? Given your ordering, is a "google,tentacruel-sku262144" a super-set
> > > > > of "google,tentacruel-sku262145"? If not, this compatible ordering
> > > > > doesn't make sense. I can't tell from your description, and the
> > > > > absence of a
> > > > > items:
> > > > > - const: google,tentacruel-sku262145
> > > > > - const: google,tentacruel-sku262146
> > > > > - const: google,tentacruel-sku262147
> > > > > - const: google,tentacruel
> > > > > - const: mediatek,mt8186
> > > > > suggests that there is no google,tentacruel-sku262145
> > > > > device?
> > > >
> > > > AFAIK all four SKUs exist. And as far as the main processor is concerned,
> > > > they look completely identical, so they should share the same device tree.
> > > > As mentioned in the commit message, the differences are only visible to
> > > > the embedded controller, which fuses the sensor inputs.
> > >
> > > Then it makes very little sense to write a binding like this.
> > > If this was just for the 252144 SKU, this would be fine.
> > > For the other SKUs, there is no way to uniquely identify them, as
> > > all four of google,tentacruel-sku262144, google,tentacruel-sku262145,
> > > google,tentacruel-sku262146 and google,tentacruel-sku262147 must be
> > > present.
> > > Given that, why even bother including the SKUs in the first place,
> > > since no information can be derived from them that cannot be derived
> > > from google,tentacruel?
> > > There's something that I am clearly missing here...
> >
> > There are incompatible variants of google,tentacruel. This is why this
> > patch has four google,tentacruel based entries. Of them, two are Tentacool,
> > which are clamshell laptops, and two of them are Tentacruel, which are
> > convertibles.
> >
> > Within each group there are two variants: the second variant swaps out
> > the I2C touchpad controller. These two controllers use the same I2C
> > address but use different compatible strings, so it's not possible to
> > have them coexist within the same device tree file like we do for many
> > other second source components.
> >
> > So the relationship looks like the following:
> >
> > google,tentacruel --- Tentacruel --- google,tentacruel-sku26214[4567]
> > | |
> > | -- google,tentacruel-sku2621{48,49,50,51}
> > |
> > -- Tentacool ---- google,tentacruel-sku327681
> > |
> > --- google,tentacruel-sku327683
> >
> > Also, the devices themselves only know their own SKU ID. The firmware
> > will generate a list of compatible strings like:
> >
> > google,tentacruel-rev4-sku262144
> > google,tentacruel-rev4
> > google,tentacruel-sku262144
> > google,tentacruel
> >
> > and try to find a match in the kernel FIT image. The method we currently
> > use is to include all the applicable board compatible strings.
>
> Then it seems like what you need is something like
> oneOf:
> - items:
> - const: google,tentacruel-sku262144
> - const: google,tentacruel
> - const: mediatek,mt8186
> - items:
> - enum:
> - google,tentacruel-sku262145
> - google,tentacruel-sku262146
> - google,tentacruel-sku262147
> - const: google,tentacruel-sku262144
> - const: google,tentacruel
> - const: mediatek,mt8186
>
> What you have at the moment just seems like a hack because you want to
> stuff all of these compatible strings into a single dts.
It is. And it works OK downstream. The reason we want to stuff them in
one dts is because the firmware will not generate the fallback to
sku262144 as the scheme above suggests.
Having three or four identical device trees just with different board
compatible string sequences to me seems a bit redundant, and it does
end up bloating our FIT image a bit, which impacts boot time.
Regards
ChenYu
On 10/13/23 02:02, Chen-Yu Tsai wrote:
> The MT8186 Steelix, also known as the Lenovo 300e Yoga Chromebook Gen 4,
> is a convertible device based on a common design of the same name. The
> device comes in different variants. Of them, whether a world facing
> camera is integrated is the only differentiating factor between the
> two device trees added. The different SKU IDs describe this alone.
>
> The other device difference is the touchpad component used. This is
> simply handled by having both possible components described in the
> device tree, and letting the implementation figure out which one is
> actually available. The system bootloader / firmware does not
> differentiate this in that they share the same SKU IDs.
>
> Signed-off-by: Chen-Yu Tsai <[email protected]>
> ---
> arch/arm64/boot/dts/mediatek/Makefile | 2 +
> .../mt8186-corsola-steelix-sku131072.dts | 18 ++
> .../mt8186-corsola-steelix-sku131073.dts | 18 ++
> .../dts/mediatek/mt8186-corsola-steelix.dtsi | 197 ++++++++++++++++++
> 4 files changed, 235 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi
>
> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> index 442af61b1305..7bd9471b89f9 100644
> --- a/arch/arm64/boot/dts/mediatek/Makefile
> +++ b/arch/arm64/boot/dts/mediatek/Makefile
> @@ -43,6 +43,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku32.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-steelix-sku131072.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-steelix-sku131073.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327681.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327683.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262144.dtb
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts
> new file mode 100644
> index 000000000000..eae17bca8585
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts
> @@ -0,0 +1,18 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2022 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola-steelix.dtsi"
> +
> +/ {
> + model = "Google Steelix board";
> + compatible = "google,steelix-sku131072", "google,steelix",
> + "mediatek,mt8186";
> + chassis-type = "convertible";
> +};
> +
> +&mt6366codec {
> + mediatek,dmic-mode = <0>; /* two-wire */
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts
> new file mode 100644
> index 000000000000..a55375b95d0d
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts
> @@ -0,0 +1,18 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2022 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola-steelix.dtsi"
> +
> +/ {
> + model = "Google Steelix board";
> + compatible = "google,steelix-sku131073", "google,steelix",
> + "mediatek,mt8186";
> + chassis-type = "convertible";
> +};
> +
> +&mt6366codec {
> + mediatek,dmic-mode = <1>; /* one-wire */
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi
> new file mode 100644
> index 000000000000..8488f2f9dc4d
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi
> @@ -0,0 +1,197 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2023 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +
> +/{
> + pp1000_edpbrdg: regulator-pp1000-edpbrdg {
> + compatible = "regulator-fixed";
> + regulator-name = "pp1000_edpbrdg";
> + pinctrl-names = "default";
> + pinctrl-0 = <&en_pp1000_edpbrdg>;
> + enable-active-high;
> + regulator-boot-on;
> + gpio = <&pio 29 GPIO_ACTIVE_HIGH>;
> + vin-supply = <&pp3300_z2>;
> + };
> +
> + pp1800_edpbrdg_dx: regulator-pp1800-edpbrdg-dx {
> + compatible = "regulator-fixed";
> + regulator-name = "pp1800_edpbrdg_dx";
> + pinctrl-names = "default";
> + pinctrl-0 = <&en_pp1800_edpbrdg>;
> + enable-active-high;
> + regulator-boot-on;
> + gpio = <&pio 30 GPIO_ACTIVE_HIGH>;
> + vin-supply = <&mt6366_vio18_reg>;
> + };
> +
> + pp3300_edp_dx: regulator-pp3300-edp-dx {
> + compatible = "regulator-fixed";
> + regulator-name = "pp3300_edp_dx";
> + pinctrl-names = "default";
> + pinctrl-0 = <&en_pp3300_edpbrdg>;
> + enable-active-high;
> + regulator-boot-on;
> + gpio = <&pio 31 GPIO_ACTIVE_HIGH>;
> + vin-supply = <&pp3300_z2>;
> + };
> +};
> +
> +&dsi_out {
> + remote-endpoint = <&anx7625_in>;
> +};
> +
> +&i2c0 {
> + clock-frequency = <400000>;
> +
> + anx_bridge: anx7625@58 {
> + compatible = "analogix,anx7625";
> + reg = <0x58>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&anx7625_pins>;
> + enable-gpios = <&pio 96 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&pio 98 GPIO_ACTIVE_HIGH>;
> + vdd10-supply = <&pp1000_edpbrdg>;
> + vdd18-supply = <&pp1800_edpbrdg_dx>;
> + vdd33-supply = <&pp3300_edp_dx>;
> + analogix,lane0-swing = /bits/ 8 <0x70 0x30>;
> + analogix,lane1-swing = /bits/ 8 <0x70 0x30>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> +
> + anx7625_in: endpoint {
> + remote-endpoint = <&dsi_out>;
> + data-lanes = <0 1 2 3>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> +
> + anx7625_out: endpoint {
> + remote-endpoint = <&panel_in>;
> + };
> + };
> + };
> +
> + aux-bus {
> + panel: panel {
> + compatible = "edp-panel";
> + power-supply = <&pp3300_disp_x>;
> + backlight = <&backlight_lcd0>;
> +
> + port {
> + panel_in: endpoint {
> + remote-endpoint = <&anx7625_out>;
> + };
> + };
> + };
> + };
> + };
> +};
> +
> +&i2c1 {
> + touchscreen: touchscreen@5d {
> + compatible = "goodix,gt7375p";
> + reg = <0x5d>;
> + interrupts-extended = <&pio 12 IRQ_TYPE_EDGE_FALLING>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&touchscreen_pins>;
> + reset-gpios = <&pio 60 GPIO_ACTIVE_LOW>;
> + vdd-supply = <&pp3300_s3>;
> + goodix,no-reset-during-suspend;
> + };
> +};
> +
> +&i2c2 {
> + i2c-scl-internal-delay-ns = <22000>;
> +
> + /* second source component */
> + touchpad@2c {
> + compatible = "hid-over-i2c";
> + reg = <0x2c>;
> + hid-descr-addr = <0x20>;
> + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&trackpad_pin>;
> + vdd-supply = <&pp3300_s3>;
> + wakeup-source;
> + };
Hi Chen-Yu,
This is not okay, the `trackpad_pin` is shared with touchpad@15 , and if
drivers are probed in parallel , this can lead to a conflict on this pin
(GPIO11)
Eugen
> +};
> +
> +&keyboard_controller {
> + function-row-physmap = <
> + MATRIX_KEY(0x00, 0x02, 0) /* T1 */
> + MATRIX_KEY(0x03, 0x02, 0) /* T2 */
> + MATRIX_KEY(0x02, 0x02, 0) /* T3 */
> + MATRIX_KEY(0x01, 0x02, 0) /* T4 */
> + MATRIX_KEY(0x03, 0x04, 0) /* T5 */
> + MATRIX_KEY(0x02, 0x04, 0) /* T6 */
> + MATRIX_KEY(0x01, 0x04, 0) /* T7 */
> + MATRIX_KEY(0x02, 0x09, 0) /* T8 */
> + MATRIX_KEY(0x01, 0x09, 0) /* T9 */
> + MATRIX_KEY(0x00, 0x04, 0) /* T10 */
> + >;
> +
> + linux,keymap = <
> + MATRIX_KEY(0x00, 0x02, KEY_BACK)
> + MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
> + MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
> + MATRIX_KEY(0x01, 0x02, KEY_SCALE)
> + MATRIX_KEY(0x03, 0x04, KEY_BRIGHTNESSDOWN)
> + MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSUP)
> + MATRIX_KEY(0x01, 0x04, KEY_MICMUTE)
> + MATRIX_KEY(0x02, 0x09, KEY_MUTE)
> + MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
> + MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
> + CROS_STD_MAIN_KEYMAP
> + >;
> +};
> +
> +&pio {
> + anx7625_pins: anx7625-pins {
> + pins1 {
> + pinmux = <PINMUX_GPIO96__FUNC_GPIO96>,
> + <PINMUX_GPIO98__FUNC_GPIO98>;
> + output-low;
> + };
> +
> + pins2 {
> + pinmux = <PINMUX_GPIO9__FUNC_GPIO9>;
> + input-enable;
> + bias-disable;
> + };
> + };
> +
> + en_pp1000_edpbrdg: pp1000-edpbrdg-en-pins {
> + pins {
> + pinmux = <PINMUX_GPIO29__FUNC_GPIO29>;
> + output-low;
> + };
> + };
> +
> + en_pp1800_edpbrdg: pp1800-edpbrdg-en-pins {
> + pins {
> + pinmux = <PINMUX_GPIO30__FUNC_GPIO30>;
> + output-low;
> + };
> + };
> +
> + en_pp3300_edpbrdg: pp3300-edpbrdg-en-pins {
> + pins {
> + pinmux = <PINMUX_GPIO31__FUNC_GPIO31>;
> + output-low;
> + };
> + };
> +};
Il 13/10/23 01:02, Chen-Yu Tsai ha scritto:
> Tentacruel and Tentacool are MT8186 based Chromebooks based on the
> Krabby design.
>
> Tentacruel, also known as the ASUS Chromebook CM14 Flip CM1402F, is a
> convertible device with touchscreen and stylus.
>
> Tentacool, also known as the ASUS Chromebook CM14 CM1402C, is a laptop
> device. It does not have a touchscreen or stylus.
>
> The two devices both have two variants. The difference is a second
> source touchpad controller that shares the same address as the original,
> but is incompatible.
>
> The extra SKU IDs for the Tentacruel devices map to different sensor
> components attached to the Embedded Controller. These are not visible
> to the main processor.
>
Hello Chen-Yu,
Thanks for the patch! However, there are a few things to improve...
the general shape of this looks mostly fine, but there's some comment, check below.
> Signed-off-by: Chen-Yu Tsai <[email protected]>
> ---
> arch/arm64/boot/dts/mediatek/Makefile | 4 +
> .../dts/mediatek/mt8186-corsola-krabby.dtsi | 130 ++
> .../mt8186-corsola-tentacool-sku327681.dts | 49 +
> .../mt8186-corsola-tentacool-sku327683.dts | 26 +
> .../mt8186-corsola-tentacruel-sku262144.dts | 44 +
> .../mt8186-corsola-tentacruel-sku262148.dts | 28 +
> .../boot/dts/mediatek/mt8186-corsola.dtsi | 1704 +++++++++++++++++
> 7 files changed, 1985 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
>
> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> index e6e7592a3645..442af61b1305 100644
> --- a/arch/arm64/boot/dts/mediatek/Makefile
> +++ b/arch/arm64/boot/dts/mediatek/Makefile
> @@ -43,6 +43,10 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku32.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327681.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327683.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262144.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262148.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r1.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r5-sku2.dtb
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
> new file mode 100644
> index 000000000000..0586c24f1e12
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
> @@ -0,0 +1,130 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2023 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> + aliases {
> + i2c4 = &i2c4;
> + };
> +};
> +
> +&dsi_out {
> + remote-endpoint = <&ps8640_in>;
> +};
> +
> +&i2c0 {
> + clock-frequency = <400000>;
> +
> + ps8640: edp-bridge@8 {
> + compatible = "parade,ps8640";
> + reg = <0x8>;
> + powerdown-gpios = <&pio 96 GPIO_ACTIVE_LOW>;
> + reset-gpios = <&pio 98 GPIO_ACTIVE_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&ps8640_pins>;
> + vdd12-supply = <&mt6366_vrf12_reg>;
> + vdd33-supply = <&mt6366_vcn33_reg>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> +
> + ps8640_in: endpoint {
> + remote-endpoint = <&dsi_out>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> +
> + ps8640_out: endpoint {
> + remote-endpoint = <&panel_in>;
> + };
> + };
> + };
> +
> + aux-bus {
> + panel {
> + compatible = "edp-panel";
> + power-supply = <&pp3300_disp_x>;
> + backlight = <&backlight_lcd0>;
> +
> + port {
> + panel_in: endpoint {
> + remote-endpoint = <&ps8640_out>;
> + };
> + };
> + };
> + };
> + };
> +};
> +
> +&i2c1 {
> + i2c-scl-internal-delay-ns = <10000>;
> +
> + touchscreen: touchscreen@10 {
> + compatible = "hid-over-i2c";
> + reg = <0x10>;
> + interrupts-extended = <&pio 12 IRQ_TYPE_LEVEL_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&touchscreen_pins>;
> + post-power-on-delay-ms = <10>;
> + hid-descr-addr = <0x0001>;
> + vdd-supply = <&pp3300_s3>;
> + };
> +};
> +
> +&i2c4 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c4_pins>;
> + clock-frequency = <400000>;
> + status = "okay";
> +
> + proximity@28 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&sar_sensor_pins>;
pinctrl nodes at the beginning? Noupe. :-)
> + compatible = "semtech,sx9324";
> + reg = <0x28>;
> + interrupt-parent = <&pio>;
> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
> + vdd-supply = <&mt6366_vio18_reg>;
> + svdd-supply = <&mt6366_vio18_reg>;
> + #io-channel-cells = <1>;
> + };
> +};
> +
> +&pio {
> + i2c4_pins: i2c4-pins {
> + pins-bus {
> + pinmux = <PINMUX_GPIO136__FUNC_SDA4>,
> + <PINMUX_GPIO135__FUNC_SCL4>;
> + bias-disable;
> + drive-strength = <4>;
> + input-enable;
> + };
> + };
> +
> + ps8640_pins: ps8640-pins {
> + pins {
pins-pwrdn-rst
> + pinmux = <PINMUX_GPIO96__FUNC_GPIO96>,
> + <PINMUX_GPIO98__FUNC_GPIO98>;
> + output-low;
> + };
> + };
> +
> + sar_sensor_pins: sar-sensor-pins {
> + pin-irq {
> + pinmux = <PINMUX_GPIO5__FUNC_GPIO5>;
> + input-enable;
> + bias-pull-up;
> + };
> + };
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
> new file mode 100644
> index 000000000000..8dfc24afabea
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
> @@ -0,0 +1,49 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2023 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola-krabby.dtsi"
> +
> +/ {
> + model = "Google Tentacool board";
> + compatible = "google,tentacruel-sku327681", "google,tentacruel", "mediatek,mt8186";
> + chassis-type = "laptop";
> +};
> +
> +/delete-node/ &gpio_keys;
> +/delete-node/ &touchscreen;
You don't need to delete the touchscreen node if you're disabling i2c1 entirely.
Besides, I'd rather see TS disabled by default, then enabled on a per-board-basis
as I think that this clarifies that "board X" has touchscreen, but "board Y" does
not, because it's "enabled" only on "board X".
> +
> +&i2c1 {
> + status = "disabled";
> +};
> +
> +&keyboard_controller {
> + function-row-physmap = <
> + MATRIX_KEY(0x00, 0x02, 0) /* T1 */
> + MATRIX_KEY(0x03, 0x02, 0) /* T2 */
> + MATRIX_KEY(0x02, 0x02, 0) /* T3 */
> + MATRIX_KEY(0x01, 0x02, 0) /* T4 */
> + MATRIX_KEY(0x03, 0x04, 0) /* T5 */
> + MATRIX_KEY(0x02, 0x04, 0) /* T6 */
> + MATRIX_KEY(0x01, 0x04, 0) /* T7 */
> + MATRIX_KEY(0x02, 0x09, 0) /* T8 */
> + MATRIX_KEY(0x01, 0x09, 0) /* T9 */
> + MATRIX_KEY(0x00, 0x04, 0) /* T10 */
> + >;
> +
> + linux,keymap = <
> + MATRIX_KEY(0x00, 0x02, KEY_BACK)
> + MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
> + MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
> + MATRIX_KEY(0x01, 0x02, KEY_SCALE)
> + MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
> + MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
> + MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
> + MATRIX_KEY(0x02, 0x09, KEY_MUTE)
> + MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
> + MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
> + CROS_STD_MAIN_KEYMAP
> + >;
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
> new file mode 100644
> index 000000000000..9b10336ede06
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
> @@ -0,0 +1,26 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2023 Google LLC
> + */
> +
> +#include "mt8186-corsola-tentacool-sku327681.dts"
> +
> +/ {
> + compatible = "google,tentacruel-sku327683", "google,tentacruel", "mediatek,mt8186";
> +};
> +
> +/* This variant replaces only the touchpad controller. */
> +&i2c2 {
> + /delete-node/ touchpad@15;
> +
> + touchpad@15 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&trackpad_pin>;
> + compatible = "hid-over-i2c";
> + reg = <0x15>;
> + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> + hid-descr-addr = <0x0001>;
> + vcc-supply = <&pp3300_s3>;
> + wakeup-source;
> + };
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
> new file mode 100644
> index 000000000000..26e9f19758cb
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
> @@ -0,0 +1,44 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2022 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola-krabby.dtsi"
> +
> +/ {
> + model = "Google Tentacruel board";
> + compatible = "google,tentacruel-sku262144", "google,tentacruel-sku262145",
> + "google,tentacruel-sku262146", "google,tentacruel-sku262147",
> + "google,tentacruel", "mediatek,mt8186";
> + chassis-type = "convertible";
> +};
> +
> +&keyboard_controller {
> + function-row-physmap = <
> + MATRIX_KEY(0x00, 0x02, 0) /* T1 */
> + MATRIX_KEY(0x03, 0x02, 0) /* T2 */
> + MATRIX_KEY(0x02, 0x02, 0) /* T3 */
> + MATRIX_KEY(0x01, 0x02, 0) /* T4 */
> + MATRIX_KEY(0x03, 0x04, 0) /* T5 */
> + MATRIX_KEY(0x02, 0x04, 0) /* T6 */
> + MATRIX_KEY(0x01, 0x04, 0) /* T7 */
> + MATRIX_KEY(0x02, 0x09, 0) /* T8 */
> + MATRIX_KEY(0x01, 0x09, 0) /* T9 */
> + MATRIX_KEY(0x00, 0x04, 0) /* T10 */
> + >;
> +
> + linux,keymap = <
> + MATRIX_KEY(0x00, 0x02, KEY_BACK)
> + MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
> + MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
> + MATRIX_KEY(0x01, 0x02, KEY_SCALE)
> + MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
> + MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
> + MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
> + MATRIX_KEY(0x02, 0x09, KEY_MUTE)
> + MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
> + MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
> + CROS_STD_MAIN_KEYMAP
> + >;
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
> new file mode 100644
> index 000000000000..59d4d21fc7d3
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
> @@ -0,0 +1,28 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2022 Google LLC
> + */
> +
> +#include "mt8186-corsola-tentacruel-sku262144.dts"
> +
> +/ {
> + compatible = "google,tentacruel-sku262144", "google,tentacruel-sku262145",
> + "google,tentacruel-sku262146", "google,tentacruel-sku262147",
> + "google,tentacruel", "mediatek,mt8186";
> +};
> +
> +/* This variant replaces only the touchpad controller. */
> +&i2c2 {
> + /delete-node/ touchpad@15;
> +
> + touchpad@15 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&trackpad_pin>;
> + compatible = "hid-over-i2c";
> + reg = <0x15>;
> + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> + hid-descr-addr = <0x0001>;
> + vcc-supply = <&pp3300_s3>;
> + wakeup-source;
> + };
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
> new file mode 100644
> index 000000000000..42ebab1bafeb
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
> @@ -0,0 +1,1704 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright (C) 2022 MediaTek Inc.
> + */
> +/dts-v1/;
> +#include "mt8186.dtsi"
> +#include <dt-bindings/pinctrl/mt8186-pinfunc.h>
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/input/gpio-keys.h>
> +
> +/ {
> + aliases {
> + i2c0 = &i2c0;
> + i2c1 = &i2c1;
> + i2c2 = &i2c2;
> + i2c3 = &i2c3;
> + i2c5 = &i2c5;
> + mmc0 = &mmc0;
> + mmc1 = &mmc1;
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + memory@40000000 {
> + device_type = "memory";
> + /* The size should be filled in by the bootloader. */
> + reg = <0 0x40000000 0 0>;
> + };
> +
> + backlight_lcd0: backlight-lcd0 {
> + compatible = "pwm-backlight";
> + pwms = <&pwm0 0 500000>;
> + power-supply = <&ppvar_sys>;
> + enable-gpios = <&pio 152 0>;
> + brightness-levels = <0 1023>;
> + num-interpolated-steps = <1023>;
> + default-brightness-level = <576>;
> + };
> +
> + btsco: bt-sco {
> + compatible = "linux,bt-sco";
> + #sound-dai-cells = <0>;
> + };
> +
> + dmic_codec: dmic-codec {
> + compatible = "dmic-codec";
> + num-channels = <2>;
> + wakeup-delay-ms = <50>;
> + #sound-dai-cells = <0>;
> + };
> +
> + gpio_keys: gpio-keys {
> + compatible = "gpio-keys";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pen_eject>;
> +
> + pen_insert: pen-insert-switch {
> + label = "Pen Insert";
> + /* Insert = low, eject = high */
> + gpios = <&pio 18 GPIO_ACTIVE_LOW>;
> + linux,code = <SW_PEN_INSERTED>;
> + linux,input-type = <EV_SW>;
> + wakeup-event-action = <EV_ACT_DEASSERTED>;
> + wakeup-source;
> + };
> + };
> +
> + pp1800_dpbrdg_dx: regulator-pp1800-dpbrdg-dx {
> + compatible = "regulator-fixed";
> + pinctrl-names = "default";
> + pinctrl-0 = <&en_pp1800_dpbrdg>;
> + regulator-name = "pp1800_dpbrdg_dx";
> + enable-active-high;
> + gpio = <&pio 39 GPIO_ACTIVE_HIGH>;
> + vin-supply = <&mt6366_vio18_reg>;
> + };
> +
> + pp3300_disp_x: regulator-pp3300-disp-x {
> + compatible = "regulator-fixed";
> + regulator-name = "pp3300_disp_x";
> + pinctrl-names = "default";
> + pinctrl-0 = <&edp_panel_fixed_pins>;
> + enable-active-high;
> + regulator-boot-on;
> + gpio = <&pio 153 GPIO_ACTIVE_HIGH>;
> + vin-supply = <&pp3300_z2>;
> + };
> +
> + /* system wide LDO 3.3V power rail */
> + pp3300_z5: regulator-pp3300-ldo-z5 {
> + compatible = "regulator-fixed";
> + regulator-name = "pp3300_ldo_z5";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + vin-supply = <&ppvar_sys>;
> + };
> +
> + /* separately switched 3.3V power rail */
> + pp3300_s3: regulator-pp3300-s3 {
> + compatible = "regulator-fixed";
> + regulator-name = "pp3300_s3";
> + /* automatically sequenced by PMIC EXT_PMIC_EN2 */
> + regulator-always-on;
> + regulator-boot-on;
> + vin-supply = <&pp3300_z2>;
> + };
> +
> + /* system wide 3.3V power rail */
> + pp3300_z2: regulator-pp3300-z2 {
> + compatible = "regulator-fixed";
> + regulator-name = "pp3300_z2";
> + /* EN pin tied to pp4200_z2, which is controlled by EC */
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + vin-supply = <&ppvar_sys>;
> + };
> +
> + /* system wide 4.2V power rail */
> + pp4200_z2: regulator-pp4200-z2 {
> + compatible = "regulator-fixed";
> + regulator-name = "pp4200_z2";
> + /* controlled by EC */
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <4200000>;
> + regulator-max-microvolt = <4200000>;
> + vin-supply = <&ppvar_sys>;
> + };
> +
> + /* system wide switching 5.0V power rail */
> + pp5000_z2: regulator-pp5000-z2 {
> + compatible = "regulator-fixed";
> + regulator-name = "pp5000_z2";
> + /* controlled by EC */
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + vin-supply = <&ppvar_sys>;
> + };
> +
> + /* system wide semi-regulated power rail from battery or USB */
> + ppvar_sys: regulator-ppvar-sys {
> + compatible = "regulator-fixed";
> + regulator-name = "ppvar_sys";
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + reserved_memory: reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + adsp_dma_mem: memory@61000000 {
> + compatible = "shared-dma-pool";
> + reg = <0 0x61000000 0 0x100000>;
> + no-map;
> + };
> +
> + adsp_mem: memory@60000000 {
> + compatible = "shared-dma-pool";
> + reg = <0 0x60000000 0 0xA00000>;
> + no-map;
> + };
> +
> + scp_mem: memory@50000000 {
> + compatible = "shared-dma-pool";
> + reg = <0 0x50000000 0 0x10a0000>;
> + no-map;
> + };
> + };
> +
> + sound: sound {
> + compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
> + pinctrl-names = "aud_clk_mosi_off",
> + "aud_clk_mosi_on",
> + "aud_clk_miso_off",
> + "aud_clk_miso_on",
> + "aud_dat_miso_off",
> + "aud_dat_miso_on",
> + "aud_dat_mosi_off",
> + "aud_dat_mosi_on",
> + "aud_gpio_i2s0_off",
> + "aud_gpio_i2s0_on",
> + "aud_gpio_i2s1_off",
> + "aud_gpio_i2s1_on",
> + "aud_gpio_i2s2_off",
> + "aud_gpio_i2s2_on",
> + "aud_gpio_i2s3_off",
> + "aud_gpio_i2s3_on",
> + "aud_gpio_tdm_off",
> + "aud_gpio_tdm_on",
> + "aud_gpio_pcm_off",
> + "aud_gpio_pcm_on",
> + "aud_gpio_dmic_sec";
> + pinctrl-0 = <&aud_clk_mosi_off>;
> + pinctrl-1 = <&aud_clk_mosi_on>;
> + pinctrl-2 = <&aud_clk_miso_off>;
> + pinctrl-3 = <&aud_clk_miso_on>;
> + pinctrl-4 = <&aud_dat_miso_off>;
> + pinctrl-5 = <&aud_dat_miso_on>;
> + pinctrl-6 = <&aud_dat_mosi_off>;
> + pinctrl-7 = <&aud_dat_mosi_on>;
> + pinctrl-8 = <&aud_gpio_i2s0_off>;
> + pinctrl-9 = <&aud_gpio_i2s0_on>;
> + pinctrl-10 = <&aud_gpio_i2s1_off>;
> + pinctrl-11 = <&aud_gpio_i2s1_on>;
> + pinctrl-12 = <&aud_gpio_i2s2_off>;
> + pinctrl-13 = <&aud_gpio_i2s2_on>;
> + pinctrl-14 = <&aud_gpio_i2s3_off>;
> + pinctrl-15 = <&aud_gpio_i2s3_on>;
> + pinctrl-16 = <&aud_gpio_tdm_off>;
> + pinctrl-17 = <&aud_gpio_tdm_on>;
> + pinctrl-18 = <&aud_gpio_pcm_off>;
> + pinctrl-19 = <&aud_gpio_pcm_on>;
> + pinctrl-20 = <&aud_gpio_dmic_sec>;
> + mediatek,adsp = <&adsp>;
> + mediatek,platform = <&afe>;
> +
> + playback-codecs {
> + sound-dai = <&it6505dptx>, <&rt1019p>;
> + };
> +
> + headset-codec {
> + sound-dai = <&rt5682s 0>;
> + };
> + };
> +
> + rt1019p: speaker-codec {
> + compatible = "realtek,rt1019p";
> + pinctrl-names = "default";
> + pinctrl-0 = <&rt1019p_pins_default>;
> + sdb-gpios = <&pio 150 GPIO_ACTIVE_HIGH>;
> + #sound-dai-cells = <0>;
> + };
> +
> + usb_p1_vbus: regulator-usb-p1-vbus {
> + compatible = "regulator-fixed";
> + regulator-name = "vbus1";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + gpio = <&pio 148 GPIO_ACTIVE_HIGH>;
> + vin-supply = <&pp5000_z2>;
> + };
> +
> + wifi_pwrseq: wifi-pwrseq {
> + compatible = "mmc-pwrseq-simple";
> + pinctrl-names = "default";
> + pinctrl-0 = <&wifi_enable_pin>;
> + post-power-on-delay-ms = <50>;
> + reset-gpios = <&pio 54 GPIO_ACTIVE_LOW>;
> + };
> +
> + wifi_wakeup: wifi-wakeup {
> + compatible = "gpio-keys";
> + pinctrl-names = "default";
> + pinctrl-0 = <&wifi_wakeup_pin>;
All of them do have a WoWLAN event pin, but not all of them have got a pen
insertion pin... okay.
So, you should either set status = "disabled" to both and then enable them
in each board dts file, or you should merge them and delete the pen insertion
node wherever not present.
Using /delete-node/ is not wrong, of course, but I don't really like seeing
that... it's probably just boiling down to a personal preference, so, unless
you have strong opinions against that, I'd like to see the first suggestion
applied (status = disabled on all, enable on a per-board basis).
> +
> + wowlan-event {
> + label = "Wake on WiFi";
> + gpios = <&pio 7 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_WAKEUP>;
> + wakeup-source;
> + };
> + };
> +};
> +
> +&adsp {
> + memory-region = <&adsp_dma_mem>, <&adsp_mem>;
> + status = "fail"; /* causes stall */
The adsp is default disabled, you don't need to set it to "fail", as this is
designed to work, not to fail, and this can be fixed.
When things cannot be "really" fixed, then I agree on setting status = "fail",
but again, this is not the case.
> +};
> +
> +&afe {
> + i2s0-share = "I2S1";
> + i2s3-share = "I2S2";
> + status = "okay";
> +};
> +
> +&cci {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu0 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu1 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu2 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu3 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu4 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu5 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu6 {
> + proc-supply = <&mt6366_vproc11_reg>;
> +};
> +
> +&cpu7 {
> + proc-supply = <&mt6366_vproc11_reg>;
> +};
> +
> +&dpi {
> + pinctrl-names = "default", "sleep";
> + pinctrl-0 = <&dpi_pins_default>;
> + pinctrl-1 = <&dpi_pins_sleep>;
> + status = "okay";
> +};
> +
> +&dpi_out {
> + remote-endpoint = <&it6505_in>;
> +};
> +
> +&dsi0 {
> + status = "okay";
> +};
> +
> +&gic {
> + mediatek,broken-save-restore-fw;
> +};
> +
> +&gpu {
> + mali-supply = <&mt6366_vgpu_reg>;
> + status = "okay";
> +};
> +
> +&i2c0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c0_pins>;
> + status = "okay";
> +};
> +
> +&i2c1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c1_pins>;
> + clock-frequency = <400000>;
> + i2c-scl-internal-delay-ns = <8000>;
> + status = "okay";
> +};
> +
> +&i2c2 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c2_pins>;
> + clock-frequency = <400000>;
> + i2c-scl-internal-delay-ns = <10000>;
> + status = "okay";
> +
> + touchpad@15 {
A "touchpad" is not an input device, it is a product name... so, this
is a "trackpad" instead :-)
> + compatible = "elan,ekth3000";
Though, this compatible name is getting overridden in multiple cases, even if
the majority of the properties are effectively the same, as in, the interrupts
are the same, i2c addr is the same, power supplies are the same, pinctrl....
...what I would do here (even though it's a bit strange to see somehow) is...
trackpad: trackpad@15 {
/* Compatible string is be filled in board specific dts files */
reg = <0x15>;
interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&trackpad_pin>;
vcc-supply = <&pp3300_s3>;
wakeup-source;
}
In tentacruel-sku262144.dts:
&trackpad {
compatible = "hid-over-i2c";
hid-descr-addr = <0x0001>;
};
In tentacool-sku327683.dts:
&trackpad {
compatible = "elan,ekth3000";
};
> + reg = <0x15>;
> + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&trackpad_pin>;
> + vcc-supply = <&pp3300_s3>;
> + wakeup-source;
> + };
> +};
> +
> +&i2c3 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c3_pins>;
> + clock-frequency = <100000>;
> + status = "okay";
> +
> + it6505dptx: dp-bridge@5c {
> + pinctrl-names = "default";
> + pinctrl-0 = <&it6505_pins>;
> + compatible = "ite,it6505";
> + reg = <0x5c>;
> + interrupts-extended = <&pio 8 IRQ_TYPE_LEVEL_LOW>;
> + ovdd-supply = <&mt6366_vsim2_reg>;
> + pwr18-supply = <&pp1800_dpbrdg_dx>;
> + reset-gpios = <&pio 177 GPIO_ACTIVE_HIGH>;
pinctrl-names, pinctrl-0 here
> + no-laneswap;
The driver has this property, that's true, but I can't find that in the bindings.
Also, are you sure that we really need this?
Checking the it6505 driver, the lane swap could also be set/unset with
EXTCON_PROP_USB_TYPEC_POLARITY, check it6505_get_extcon_property()...
...but if we really need that property here, the bindings must have it.
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> + #sound-dai-cells = <0>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> +
> + it6505_in: endpoint {
> + link-frequencies = /bits/ 64 <150000000>;
> + remote-endpoint = <&dpi_out>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + };
> + };
> + };
> +};
> +
> +&i2c5 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c5_pins>;
> + status = "okay";
> +
> + rt5682s: codec@1a {
> + compatible = "realtek,rt5682s";
> + reg = <0x1a>;
> + interrupts-extended = <&pio 17 IRQ_TYPE_EDGE_BOTH>;
> + realtek,jd-src = <1>;
I would move realtek,jd-src...
> + AVDD-supply = <&mt6366_vio18_reg>;
> + DBVDD-supply = <&mt6366_vio18_reg>;
> + LDO1-IN-supply = <&mt6366_vio18_reg>;
> + MICVDD-supply = <&pp3300_z2>;
...here... but I don't really have strong opinions about that.
> + #sound-dai-cells = <1>;
> + };
> +};
> +
..snip..
> +
> + aud_clk_mosi_off: aud-clk-mosi-off-pins {
> + pins-cmd-dat {
I'd say that those are pins-clk-sync instead.
> + pinmux = <PINMUX_GPIO166__FUNC_GPIO166>,
> + <PINMUX_GPIO167__FUNC_GPIO167>;
> + input-enable;
> + bias-pull-down;
> + };
> + };
> +
> + aud_clk_mosi_on: aud-clk-mosi-on-pins {
> + pins-cmd-dat {
same
> + pinmux = <PINMUX_GPIO166__FUNC_AUD_CLK_MOSI>,
> + <PINMUX_GPIO167__FUNC_AUD_SYNC_MOSI>;
> + };
> + };
> +
> + aud_clk_miso_off: aud-clk-miso-off-pins {
> + pins-cmd-dat {
and here, and for all pins referencing "FUNC_AUD_CLK" and "FUNC_AUD_SYNC".
> + pinmux = <PINMUX_GPIO170__FUNC_GPIO170>,
> + <PINMUX_GPIO171__FUNC_GPIO171>;
> + input-enable;
> + bias-pull-down;
> + };
> + };
> +
> + aud_clk_miso_on: aud-clk-miso-on-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO170__FUNC_AUD_CLK_MISO>,
> + <PINMUX_GPIO171__FUNC_AUD_SYNC_MISO>;
> + };
> + };
> +
> + aud_dat_mosi_off: aud-dat-mosi-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO168__FUNC_GPIO168>,
> + <PINMUX_GPIO169__FUNC_GPIO169>;
> + input-enable;
> + bias-pull-down;
> + };
> + };
> +
> + aud_dat_mosi_on: aud-dat-mosi-on-pins {
> + pins-cmd-dat {
pins-dat or pins-bus
> + pinmux = <PINMUX_GPIO168__FUNC_AUD_DAT_MOSI0>,
> + <PINMUX_GPIO169__FUNC_AUD_DAT_MOSI1>;
> + };
> + };
> +
> + aud_dat_miso_off: aud-dat-miso-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO172__FUNC_GPIO172>,
> + <PINMUX_GPIO173__FUNC_GPIO173>;
> + input-enable;
> + bias-pull-down;
> + };
> + };
> +
> + aud_dat_miso_on: aud-dat-miso-on-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO172__FUNC_AUD_DAT_MISO0>,
> + <PINMUX_GPIO173__FUNC_AUD_DAT_MISO1>;
> + input-schmitt-enable;
> + bias-disable;
> + };
> + };
> +
> + aud_gpio_i2s0_off: aud-gpio-i2s0-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO3__FUNC_GPIO3>;
> + };
> + };
> +
> + aud_gpio_i2s0_on: aud-gpio-i2s0-on-pins {
> + pins-cmd-dat {
pins-sdata
> + pinmux = <PINMUX_GPIO3__FUNC_I2S0_DI>;
> + };
> + };
> +
> + aud_gpio_i2s1_off: aud-gpio-i2s-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO56__FUNC_GPIO56>,
> + <PINMUX_GPIO57__FUNC_GPIO57>,
> + <PINMUX_GPIO58__FUNC_GPIO58>,
> + <PINMUX_GPIO59__FUNC_GPIO59>;
> + output-low;
> + };
> + };
> +
> + aud_gpio_i2s1_on: aud-gpio-i2s1-on-pins {
> + pins-cmd-dat {
pins-clk-sdata
> + pinmux = <PINMUX_GPIO56__FUNC_I2S1_DO>,
> + <PINMUX_GPIO57__FUNC_I2S1_BCK>,
> + <PINMUX_GPIO58__FUNC_I2S1_LRCK>,
> + <PINMUX_GPIO59__FUNC_I2S1_MCK>;
> + };
> + };
> +
> + aud_gpio_i2s2_off: aud-gpio-i2s2-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO26__FUNC_GPIO26>,
> + <PINMUX_GPIO27__FUNC_GPIO27>;
> + output-low;
> + };
> + };
> +
> + aud_gpio_i2s2_on: aud-gpio-i2s2-on-pins {
> + pins-cmd-dat {
Those are bit and word clock pins: pins-clk
> + pinmux = <PINMUX_GPIO26__FUNC_I2S2_BCK>,
> + <PINMUX_GPIO27__FUNC_I2S2_LRCK>;
> + drive-strength = <4>;
> + };
> + };
> +
> + aud_gpio_i2s3_off: aud-gpio-i2s3-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO4__FUNC_GPIO4>;
> + output-low;
> + };
> + };
> +
> + aud_gpio_i2s3_on: aud-gpio-i2s3-on-pins {
> + pins-cmd-dat {
pins-sdata
> + pinmux = <PINMUX_GPIO4__FUNC_I2S3_DO>;
> + drive-strength = <4>;
> + };
> + };
> +
> + aud_gpio_tdm_off: aud-gpio-tdm-off-pins { };
> +
> + aud_gpio_tdm_on: aud-gpio-tdm-on-pins { };
> +
> + aud_gpio_pcm_off: aud-gpio-pcm-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO115__FUNC_GPIO115>,
> + <PINMUX_GPIO116__FUNC_GPIO116>,
> + <PINMUX_GPIO117__FUNC_GPIO117>,
> + <PINMUX_GPIO118__FUNC_GPIO118>;
> + output-low;
> + };
> + };
> +
> + aud_gpio_pcm_on: aud-gpio-pcm-on-pins {
> + pins-cmd-dat {
pins-clk-dat
> + pinmux = <PINMUX_GPIO115__FUNC_PCM_CLK>,
> + <PINMUX_GPIO116__FUNC_PCM_SYNC>,
> + <PINMUX_GPIO117__FUNC_PCM_DI>,
> + <PINMUX_GPIO118__FUNC_PCM_DO>;
> + };
> + };
> +
> + aud_gpio_dmic_sec: aud-gpio-dmic-sec-pins {
> + pins {
> + pinmux = <PINMUX_GPIO23__FUNC_GPIO23>;
> + output-low;
> + };
> + };
> +
> + bt_pins_reset: bt-reset-pins {
> + pins-bt-reset {
> + pinmux = <PINMUX_GPIO155__FUNC_GPIO155>;
> + output-high;
> + };
> + };
> +
..snip..
> +
> + ec_ap_int: cros-ec-int-pins {
> + pins1 {
pins-ec-ap-int-odl
> + pinmux = <PINMUX_GPIO13__FUNC_GPIO13>;
> + input-enable;
> + };
> + };
> +
> + edp_panel_fixed_pins: edp-panel-fixed-pins {
> + pins1 {
pins-vreg-en
> + pinmux = <PINMUX_GPIO153__FUNC_GPIO153>;
> + output-high;
> + };
> + };
> +
> + en_pp1800_dpbrdg: en-pp1800-dpbrdg-pins {
> + pins {
pins-vreg-en....
> + pinmux = <PINMUX_GPIO39__FUNC_GPIO39>;
> + output-low;
> + };
> + };
> +
> + gsc_ap_int_odl: gsc-ap-int-odl-pins {
cr50_int: cr50-irq-default-pins {
pins-gsc-ap-int-odl {
...
}
}
> + pins1 {
> + pinmux = <PINMUX_GPIO15__FUNC_GPIO15>;
> + input-enable;
> + };
> + };
> +
..snip..
> +
> + mmc1_pins_eint: mmc1-eint-pins {
> + pins_dat1 {
pins-dat1
> + pinmux = <PINMUX_GPIO87__FUNC_GPIO87>;
> + input-enable;
> + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> + };
> + };
> +
> + nor_pins_default: nor-default-pins {
> + pins0 {
pins-clk-dat
> + pinmux = <PINMUX_GPIO63__FUNC_SPINOR_IO0>,
> + <PINMUX_GPIO61__FUNC_SPINOR_CK>,
> + <PINMUX_GPIO64__FUNC_SPINOR_IO1>;
> + drive-strength = <6>;
> + bias-pull-down;
> + };
> +
> + pins1 {
pins-cs-dat
> + pinmux = <PINMUX_GPIO62__FUNC_SPINOR_CS>,
> + <PINMUX_GPIO65__FUNC_SPINOR_IO2>,
> + <PINMUX_GPIO66__FUNC_SPINOR_IO3>;
> + drive-strength = <6>;
> + bias-pull-up;
> + };
> + };
> +
> + pen_eject: pen-eject-pins {
> + pins {
> + pinmux = <PINMUX_GPIO18__FUNC_GPIO18>;
> + input-enable;
> + /* External pull-up. */
> + bias-disable;
> + };
> + };
> +
> + pwm0_pin: pwm0-default-pins {
pins-disp-pwm
> + pins {
> + pinmux = <PINMUX_GPIO97__FUNC_DISP_PWM>;
> + output-high;
> + };
> + };
> +
> + rt1019p_pins_default: rt1019p-default-pins {
> + pins {
pins-sdb
> + pinmux = <PINMUX_GPIO150__FUNC_GPIO150>;
> + output-low;
> + };
> + };
> +
> + scp_pins: scp-default-pins {
> + pins-scp-uart {
> + pinmux = <PINMUX_GPIO48__FUNC_TP_URXD2_AO>,
> + <PINMUX_GPIO49__FUNC_TP_UTXD2_AO>;
> + };
> + };
> +
> + spi1_pins: spi1-pins {
> + pins-spi {
> + pinmux = <PINMUX_GPIO40__FUNC_SPI1_CLK_A>,
> + <PINMUX_GPIO41__FUNC_SPI1_CSB_A>,
> + <PINMUX_GPIO42__FUNC_SPI1_MO_A>,
> + <PINMUX_GPIO43__FUNC_SPI1_MI_A>;
Shouldn't MISO be pull-down?!
clk, mo, csb: bias-disable
mi: bias-pull-down
> + bias-disable;
> + input-enable;
> + };
> + };
> +
> + spi2_pins: spi2-pins {
> + pins-spi {
> + pinmux = <PINMUX_GPIO44__FUNC_SPI2_CLK_A>,
> + <PINMUX_GPIO45__FUNC_GPIO45>,
> + <PINMUX_GPIO46__FUNC_SPI2_MO_A>,
> + <PINMUX_GPIO47__FUNC_SPI2_MI_A>;
Same question here.
P.S.: if yes, pins-cs-mosi-clk, pins-miso; if not, pins-bus.
> + bias-disable;
> + input-enable;
> + };
> + };
> +
> + spmi_pins: spmi-pins {
> + pins-spmi {
pins-bus
> + pinmux = <PINMUX_GPIO183__FUNC_SPMI_SCL>,
> + <PINMUX_GPIO184__FUNC_SPMI_SDA>;
> + };
> + };
> +
> + touchscreen_pins: touchscreen-pins {
> + pins-irq {
> + pinmux = <PINMUX_GPIO12__FUNC_GPIO12>;
> + input-enable;
> + bias-pull-up;
> + };
> +
> + pins-reset {
> + pinmux = <PINMUX_GPIO60__FUNC_GPIO60>;
> + output-high;
> + };
> +
> + pins-report-sw {
> + pinmux = <PINMUX_GPIO37__FUNC_GPIO37>;
> + output-low;
> + };
> + };
> +
> + trackpad_pin: trackpad-default-pins {
> + pins-int-n {
> + pinmux = <PINMUX_GPIO11__FUNC_GPIO11>;
> + input-enable;
> + bias-disable; /* pulled externally */
> + };
> + };
> +
> + wifi_enable_pin: wifi-enable-pins {
> + pins-wifi-enable {
> + pinmux = <PINMUX_GPIO54__FUNC_GPIO54>;
> + };
> + };
> +
> + wifi_wakeup_pin: wifi-wakeup-pins {
> + pins-wifi-wakeup {
> + pinmux = <PINMUX_GPIO7__FUNC_GPIO7>;
> + input-enable;
> + };
> + };
> +};
> +
> +&pwm0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pwm0_pin>;
> + status = "okay";
> +};
> +
> +&pwrap {
> + pmic {
> + compatible = "mediatek,mt6366", "mediatek,mt6358";
> + interrupt-controller;
> + interrupts-extended = <&pio 201 IRQ_TYPE_LEVEL_HIGH>;
> + #interrupt-cells = <2>;
> +
> + mt6366codec: codec {
> + compatible = "mediatek,mt6366-sound", "mediatek,mt6358-sound";
> + Avdd-supply = <&mt6366_vaud28_reg>;
> + mediatek,dmic-mode = <1>; /* one-wire */
> + };
> +
> + mt6366_regulators: regulators {
> + compatible = "mediatek,mt6366-regulator", "mediatek,mt6358-regulator";
> + vsys-ldo1-supply = <&pp4200_z2>;
> + vsys-ldo2-supply = <&pp4200_z2>;
> + vsys-ldo3-supply = <&pp4200_z2>;
> + vsys-vcore-supply = <&pp4200_z2>;
> + vsys-vdram1-supply = <&pp4200_z2>;
> + vsys-vgpu-supply = <&pp4200_z2>;
> + vsys-vmodem-supply = <&pp4200_z2>;
> + vsys-vpa-supply = <&pp4200_z2>;
> + vsys-vproc11-supply = <&pp4200_z2>;
> + vsys-vproc12-supply = <&pp4200_z2>;
> + vsys-vs1-supply = <&pp4200_z2>;
> + vsys-vs2-supply = <&pp4200_z2>;
> + vs1-ldo1-supply = <&mt6366_vs1_reg>;
> + vs2-ldo1-supply = <&mt6366_vdram1_reg>;
> + vs2-ldo2-supply = <&mt6366_vs2_reg>;
> + vs2-ldo3-supply = <&mt6366_vs2_reg>;
> +
> + vcore {
> + regulator-name = "pp0750_dvdd_core";
> + regulator-min-microvolt = <550000>;
> + regulator-max-microvolt = <800000>;
> + regulator-ramp-delay = <6250>;
> + regulator-enable-ramp-delay = <200>;
> + regulator-allowed-modes = <0 1>;
> + regulator-always-on;
> + };
> +
> + mt6366_vdram1_reg: vdram1 {
> + regulator-name = "pp1125_emi_vdd2";
> + regulator-min-microvolt = <1125000>;
> + regulator-max-microvolt = <1125000>;
> + regulator-ramp-delay = <12500>;
> + regulator-enable-ramp-delay = <0>;
> + regulator-allowed-modes = <0 1>;
> + regulator-always-on;
> + };
> +
> + mt6366_vgpu_reg: vgpu {
> + regulator-name = "ppvar_dvdd_gpu";
Can we please rename this to "ppvar_dvdd_vgpu"?
The regulator coupler driver parses "vgpu"... :-)
> + regulator-min-microvolt = <600000>;
> + regulator-max-microvolt = <950000>;
> + regulator-ramp-delay = <6250>;
> + regulator-enable-ramp-delay = <200>;
> + regulator-allowed-modes = <0 1>;
Couple this regulator with VSRAM, max spread 100000.
> + };
> +
..snip..
> +
> + mt6366_vsram_gpu_reg: vsram-gpu {
> + regulator-name = "pp0900_dvdd_sram_gpu";
> + regulator-min-microvolt = <850000>;
> + regulator-max-microvolt = <1050000>;
> + regulator-ramp-delay = <6250>;
> + regulator-enable-ramp-delay = <240>;
Couple with VGPU, same max spread.
> + };
> +
> + mt6366_vsram_others_reg: vsram-others {
> + regulator-name = "pp0900_dvdd_sram_core";
> + regulator-min-microvolt = <900000>;
> + regulator-max-microvolt = <900000>;
> + regulator-ramp-delay = <6250>;
> + regulator-enable-ramp-delay = <240>;
> + regulator-always-on;
> + };
> +
> + mt6366_vsram_proc11_reg: vsram-proc11 {
> + regulator-name = "pp0900_dvdd_sram_bc";
> + regulator-min-microvolt = <850000>;
> + regulator-max-microvolt = <1120000>;
> + regulator-ramp-delay = <6250>;
> + regulator-enable-ramp-delay = <240>;
> + regulator-always-on;
> + };
> +
> + mt6366_vsram_proc12_reg: vsram-proc12 {
> + regulator-name = "pp0900_dvdd_sram_lc";
> + regulator-min-microvolt = <850000>;
> + regulator-max-microvolt = <1120000>;
> + regulator-ramp-delay = <6250>;
> + regulator-enable-ramp-delay = <240>;
> + regulator-always-on;
> + };
> +
> + vusb {
> + regulator-name = "pp3070_vusb";
> + regulator-min-microvolt = <3000000>;
> + regulator-max-microvolt = <3070000>;
> + regulator-enable-ramp-delay = <270>;
> + regulator-always-on;
> + };
> +
> + vxo22 {
> + regulator-name = "pp2240_vxo22";
> + regulator-min-microvolt = <2200000>;
> + regulator-max-microvolt = <2240000>;
> + regulator-enable-ramp-delay = <120>;
> + /* Feeds DCXO internally */
> + regulator-always-on;
> + };
> + };
> +
> + rtc {
> + compatible = "mediatek,mt6366-rtc", "mediatek,mt6358-rtc";
> + };
> + };
> +};
> +
> +&scp {
> + pinctrl-names = "default";
> + pinctrl-0 = <&scp_pins>;
> + firmware-name = "mediatek/mt8186/scp.img";
> + memory-region = <&scp_mem>;
> + status = "okay";
> +
> + cros-ec-rpmsg {
> + compatible = "google,cros-ec-rpmsg";
> + mediatek,rpmsg-name = "cros-ec-rpmsg";
> + };
> +};
> +
> +&spi1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&spi1_pins>;
> + mediatek,pad-select = <0>;
> + status = "okay";
> +
> + cros_ec: ec@0 {
> + compatible = "google,cros-ec-spi";
> + reg = <0>;
> + spi-max-frequency = <1000000>;
> + interrupt-parent = <&pio>;
> + interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
interrupts-extended please
> + pinctrl-names = "default";
> + pinctrl-0 = <&ec_ap_int>;
> +
> + i2c_tunnel: i2c-tunnel {
> + compatible = "google,cros-ec-i2c-tunnel";
> + google,remote-bus = <1>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> +
> + typec {
> + compatible = "google,cros-ec-typec";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + usb_c0: connector@0 {
> + compatible = "usb-c-connector";
> + reg = <0>;
> + label = "left";
> + power-role = "dual";
> + data-role = "host";
> + try-power-role = "source";
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@1 {
> + reg = <1>;
> +
> + typec_port0: endpoint { };
> + };
> + };
> + };
> +
> + usb_c1: connector@1 {
> + compatible = "usb-c-connector";
> + reg = <1>;
> + label = "right";
> + power-role = "dual";
> + data-role = "host";
> + try-power-role = "source";
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@1 {
> + reg = <1>;
> +
> + typec_port1: endpoint { };
> + };
> + };
> + };
> + };
> + };
> +};
> +
> +&spi2 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&spi2_pins>;
> + cs-gpios = <&pio 45 GPIO_ACTIVE_LOW>;
> + mediatek,pad-select = <0>;
> + status = "okay";
> +
> + cr50: cr50@0 {
Do we really need a phandle on cr50?
Also, I'd say tpm@0 instead.
> + compatible = "google,cr50";
> + reg = <0>;
> + spi-max-frequency = <1000000>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&gsc_ap_int_odl>;
> + interrupt-parent = <&pio>;
> + interrupts = <15 IRQ_TYPE_EDGE_RISING>;
> + };
> +};
> +
Cheers!
Angelo
On 10/13/23 02:02, Chen-Yu Tsai wrote:
> Tentacruel and Tentacool are MT8186 based Chromebooks based on the
> Krabby design.
>
> Tentacruel, also known as the ASUS Chromebook CM14 Flip CM1402F, is a
> convertible device with touchscreen and stylus.
>
> Tentacool, also known as the ASUS Chromebook CM14 CM1402C, is a laptop
> device. It does not have a touchscreen or stylus.
>
Hi Chen-Yu,
The Krabby design has the touchscreen ? if the touchscreen is for
Tentacruel ,then the touchscreen should be described in the tentacruel
dtsi, not in the Krabby and then deleted for tentacool.
Or is there any reason for describing the touchscreen for Krabby ?
One additional way to solve this is to have the touchsreen as separate
dtsi and only include it for the boards that have it, e.g. tentacruel .
Eugen
> The two devices both have two variants. The difference is a second
> source touchpad controller that shares the same address as the original,
> but is incompatible.
>
> The extra SKU IDs for the Tentacruel devices map to different sensor
> components attached to the Embedded Controller. These are not visible
> to the main processor.
>
[...]
On Mon, Oct 16, 2023 at 2:21 AM Eugen Hristev
<[email protected]> wrote:
>
> On 10/13/23 02:02, Chen-Yu Tsai wrote:
> > Tentacruel and Tentacool are MT8186 based Chromebooks based on the
> > Krabby design.
> >
> > Tentacruel, also known as the ASUS Chromebook CM14 Flip CM1402F, is a
> > convertible device with touchscreen and stylus.
> >
> > Tentacool, also known as the ASUS Chromebook CM14 CM1402C, is a laptop
> > device. It does not have a touchscreen or stylus.
> >
>
> Hi Chen-Yu,
>
> The Krabby design has the touchscreen ? if the touchscreen is for
> Tentacruel ,then the touchscreen should be described in the tentacruel
> dtsi, not in the Krabby and then deleted for tentacool.
Yes. The Krabby design is the reference design and has all the bells and
whistles. Vendors can choose to drop features for their market segmenting
purposes.
In essence the vendors are taking a Google design and tweaking it to suite
their needs. Sometimes things get deleted. Deleting the node seems like
a proper way to describe it.
ChenYu
> Or is there any reason for describing the touchscreen for Krabby ?
> One additional way to solve this is to have the touchsreen as separate
> dtsi and only include it for the boards that have it, e.g. tentacruel .
> Eugen
> > The two devices both have two variants. The difference is a second
> > source touchpad controller that shares the same address as the original,
> > but is incompatible.
> >
> > The extra SKU IDs for the Tentacruel devices map to different sensor
> > components attached to the Embedded Controller. These are not visible
> > to the main processor.
> >
> [...]
>
On Mon, Oct 16, 2023 at 2:19 AM AngeloGioacchino Del Regno
<[email protected]> wrote:
>
> Il 13/10/23 01:02, Chen-Yu Tsai ha scritto:
> > Tentacruel and Tentacool are MT8186 based Chromebooks based on the
> > Krabby design.
> >
> > Tentacruel, also known as the ASUS Chromebook CM14 Flip CM1402F, is a
> > convertible device with touchscreen and stylus.
> >
> > Tentacool, also known as the ASUS Chromebook CM14 CM1402C, is a laptop
> > device. It does not have a touchscreen or stylus.
> >
> > The two devices both have two variants. The difference is a second
> > source touchpad controller that shares the same address as the original,
> > but is incompatible.
> >
> > The extra SKU IDs for the Tentacruel devices map to different sensor
> > components attached to the Embedded Controller. These are not visible
> > to the main processor.
> >
>
> Hello Chen-Yu,
>
> Thanks for the patch! However, there are a few things to improve...
>
> the general shape of this looks mostly fine, but there's some comment, check below.
>
> > Signed-off-by: Chen-Yu Tsai <[email protected]>
> > ---
> > arch/arm64/boot/dts/mediatek/Makefile | 4 +
> > .../dts/mediatek/mt8186-corsola-krabby.dtsi | 130 ++
> > .../mt8186-corsola-tentacool-sku327681.dts | 49 +
> > .../mt8186-corsola-tentacool-sku327683.dts | 26 +
> > .../mt8186-corsola-tentacruel-sku262144.dts | 44 +
> > .../mt8186-corsola-tentacruel-sku262148.dts | 28 +
> > .../boot/dts/mediatek/mt8186-corsola.dtsi | 1704 +++++++++++++++++
> > 7 files changed, 1985 insertions(+)
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
> >
> > diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> > index e6e7592a3645..442af61b1305 100644
> > --- a/arch/arm64/boot/dts/mediatek/Makefile
> > +++ b/arch/arm64/boot/dts/mediatek/Makefile
> > @@ -43,6 +43,10 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku32.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
> > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327681.dtb
> > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327683.dtb
> > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262144.dtb
> > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262148.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-evb.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r1.dtb
> > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r5-sku2.dtb
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
> > new file mode 100644
> > index 000000000000..0586c24f1e12
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
> > @@ -0,0 +1,130 @@
> > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > +/*
> > + * Copyright 2023 Google LLC
> > + */
> > +
> > +/dts-v1/;
> > +#include "mt8186-corsola.dtsi"
> > +#include <dt-bindings/gpio/gpio.h>
> > +
> > +/ {
> > + aliases {
> > + i2c4 = &i2c4;
> > + };
> > +};
> > +
> > +&dsi_out {
> > + remote-endpoint = <&ps8640_in>;
> > +};
> > +
> > +&i2c0 {
> > + clock-frequency = <400000>;
> > +
> > + ps8640: edp-bridge@8 {
> > + compatible = "parade,ps8640";
> > + reg = <0x8>;
> > + powerdown-gpios = <&pio 96 GPIO_ACTIVE_LOW>;
> > + reset-gpios = <&pio 98 GPIO_ACTIVE_LOW>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&ps8640_pins>;
> > + vdd12-supply = <&mt6366_vrf12_reg>;
> > + vdd33-supply = <&mt6366_vcn33_reg>;
> > +
> > + ports {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + port@0 {
> > + reg = <0>;
> > +
> > + ps8640_in: endpoint {
> > + remote-endpoint = <&dsi_out>;
> > + };
> > + };
> > +
> > + port@1 {
> > + reg = <1>;
> > +
> > + ps8640_out: endpoint {
> > + remote-endpoint = <&panel_in>;
> > + };
> > + };
> > + };
> > +
> > + aux-bus {
> > + panel {
> > + compatible = "edp-panel";
> > + power-supply = <&pp3300_disp_x>;
> > + backlight = <&backlight_lcd0>;
> > +
> > + port {
> > + panel_in: endpoint {
> > + remote-endpoint = <&ps8640_out>;
> > + };
> > + };
> > + };
> > + };
> > + };
> > +};
> > +
> > +&i2c1 {
> > + i2c-scl-internal-delay-ns = <10000>;
> > +
> > + touchscreen: touchscreen@10 {
> > + compatible = "hid-over-i2c";
> > + reg = <0x10>;
> > + interrupts-extended = <&pio 12 IRQ_TYPE_LEVEL_LOW>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&touchscreen_pins>;
> > + post-power-on-delay-ms = <10>;
> > + hid-descr-addr = <0x0001>;
> > + vdd-supply = <&pp3300_s3>;
> > + };
> > +};
> > +
> > +&i2c4 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c4_pins>;
> > + clock-frequency = <400000>;
> > + status = "okay";
> > +
> > + proximity@28 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&sar_sensor_pins>;
>
> pinctrl nodes at the beginning? Noupe. :-)
Moved to under interrupts. Also changed interrupts to interrupts-extended.
> > + compatible = "semtech,sx9324";
> > + reg = <0x28>;
> > + interrupt-parent = <&pio>;
> > + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
> > + vdd-supply = <&mt6366_vio18_reg>;
> > + svdd-supply = <&mt6366_vio18_reg>;
> > + #io-channel-cells = <1>;
> > + };
> > +};
> > +
> > +&pio {
> > + i2c4_pins: i2c4-pins {
> > + pins-bus {
> > + pinmux = <PINMUX_GPIO136__FUNC_SDA4>,
> > + <PINMUX_GPIO135__FUNC_SCL4>;
> > + bias-disable;
> > + drive-strength = <4>;
> > + input-enable;
> > + };
> > + };
> > +
> > + ps8640_pins: ps8640-pins {
> > + pins {
>
> pins-pwrdn-rst
Done.
> > + pinmux = <PINMUX_GPIO96__FUNC_GPIO96>,
> > + <PINMUX_GPIO98__FUNC_GPIO98>;
> > + output-low;
> > + };
> > + };
> > +
> > + sar_sensor_pins: sar-sensor-pins {
> > + pin-irq {
> > + pinmux = <PINMUX_GPIO5__FUNC_GPIO5>;
> > + input-enable;
> > + bias-pull-up;
> > + };
> > + };
> > +};
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
> > new file mode 100644
> > index 000000000000..8dfc24afabea
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
> > @@ -0,0 +1,49 @@
> > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > +/*
> > + * Copyright 2023 Google LLC
> > + */
> > +
> > +/dts-v1/;
> > +#include "mt8186-corsola-krabby.dtsi"
> > +
> > +/ {
> > + model = "Google Tentacool board";
> > + compatible = "google,tentacruel-sku327681", "google,tentacruel", "mediatek,mt8186";
> > + chassis-type = "laptop";
> > +};
> > +
> > +/delete-node/ &gpio_keys;
> > +/delete-node/ &touchscreen;
>
> You don't need to delete the touchscreen node if you're disabling i2c1 entirely.
> Besides, I'd rather see TS disabled by default, then enabled on a per-board-basis
> as I think that this clarifies that "board X" has touchscreen, but "board Y" does
> not, because it's "enabled" only on "board X".
I don't know. What you're saying kind of makes sense. OOTH we could say
that they were "deleted" from the end product, so deleting the nodes also
makes sense.
> > +
> > +&i2c1 {
> > + status = "disabled";
> > +};
> > +
> > +&keyboard_controller {
> > + function-row-physmap = <
> > + MATRIX_KEY(0x00, 0x02, 0) /* T1 */
> > + MATRIX_KEY(0x03, 0x02, 0) /* T2 */
> > + MATRIX_KEY(0x02, 0x02, 0) /* T3 */
> > + MATRIX_KEY(0x01, 0x02, 0) /* T4 */
> > + MATRIX_KEY(0x03, 0x04, 0) /* T5 */
> > + MATRIX_KEY(0x02, 0x04, 0) /* T6 */
> > + MATRIX_KEY(0x01, 0x04, 0) /* T7 */
> > + MATRIX_KEY(0x02, 0x09, 0) /* T8 */
> > + MATRIX_KEY(0x01, 0x09, 0) /* T9 */
> > + MATRIX_KEY(0x00, 0x04, 0) /* T10 */
> > + >;
> > +
> > + linux,keymap = <
> > + MATRIX_KEY(0x00, 0x02, KEY_BACK)
> > + MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
> > + MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
> > + MATRIX_KEY(0x01, 0x02, KEY_SCALE)
> > + MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
> > + MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
> > + MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
> > + MATRIX_KEY(0x02, 0x09, KEY_MUTE)
> > + MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
> > + MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
> > + CROS_STD_MAIN_KEYMAP
> > + >;
> > +};
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
> > new file mode 100644
> > index 000000000000..9b10336ede06
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
> > @@ -0,0 +1,26 @@
> > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > +/*
> > + * Copyright 2023 Google LLC
> > + */
> > +
> > +#include "mt8186-corsola-tentacool-sku327681.dts"
> > +
> > +/ {
> > + compatible = "google,tentacruel-sku327683", "google,tentacruel", "mediatek,mt8186";
> > +};
> > +
> > +/* This variant replaces only the touchpad controller. */
> > +&i2c2 {
> > + /delete-node/ touchpad@15;
> > +
> > + touchpad@15 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&trackpad_pin>;
> > + compatible = "hid-over-i2c";
> > + reg = <0x15>;
> > + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> > + hid-descr-addr = <0x0001>;
> > + vcc-supply = <&pp3300_s3>;
> > + wakeup-source;
> > + };
> > +};
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
> > new file mode 100644
> > index 000000000000..26e9f19758cb
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
> > @@ -0,0 +1,44 @@
> > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > +/*
> > + * Copyright 2022 Google LLC
> > + */
> > +
> > +/dts-v1/;
> > +#include "mt8186-corsola-krabby.dtsi"
> > +
> > +/ {
> > + model = "Google Tentacruel board";
> > + compatible = "google,tentacruel-sku262144", "google,tentacruel-sku262145",
> > + "google,tentacruel-sku262146", "google,tentacruel-sku262147",
> > + "google,tentacruel", "mediatek,mt8186";
> > + chassis-type = "convertible";
> > +};
> > +
> > +&keyboard_controller {
> > + function-row-physmap = <
> > + MATRIX_KEY(0x00, 0x02, 0) /* T1 */
> > + MATRIX_KEY(0x03, 0x02, 0) /* T2 */
> > + MATRIX_KEY(0x02, 0x02, 0) /* T3 */
> > + MATRIX_KEY(0x01, 0x02, 0) /* T4 */
> > + MATRIX_KEY(0x03, 0x04, 0) /* T5 */
> > + MATRIX_KEY(0x02, 0x04, 0) /* T6 */
> > + MATRIX_KEY(0x01, 0x04, 0) /* T7 */
> > + MATRIX_KEY(0x02, 0x09, 0) /* T8 */
> > + MATRIX_KEY(0x01, 0x09, 0) /* T9 */
> > + MATRIX_KEY(0x00, 0x04, 0) /* T10 */
> > + >;
> > +
> > + linux,keymap = <
> > + MATRIX_KEY(0x00, 0x02, KEY_BACK)
> > + MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
> > + MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
> > + MATRIX_KEY(0x01, 0x02, KEY_SCALE)
> > + MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
> > + MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
> > + MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
> > + MATRIX_KEY(0x02, 0x09, KEY_MUTE)
> > + MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
> > + MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
> > + CROS_STD_MAIN_KEYMAP
> > + >;
> > +};
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
> > new file mode 100644
> > index 000000000000..59d4d21fc7d3
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
> > @@ -0,0 +1,28 @@
> > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > +/*
> > + * Copyright 2022 Google LLC
> > + */
> > +
> > +#include "mt8186-corsola-tentacruel-sku262144.dts"
> > +
> > +/ {
> > + compatible = "google,tentacruel-sku262144", "google,tentacruel-sku262145",
> > + "google,tentacruel-sku262146", "google,tentacruel-sku262147",
> > + "google,tentacruel", "mediatek,mt8186";
> > +};
> > +
> > +/* This variant replaces only the touchpad controller. */
> > +&i2c2 {
> > + /delete-node/ touchpad@15;
> > +
> > + touchpad@15 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&trackpad_pin>;
> > + compatible = "hid-over-i2c";
> > + reg = <0x15>;
> > + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> > + hid-descr-addr = <0x0001>;
> > + vcc-supply = <&pp3300_s3>;
> > + wakeup-source;
> > + };
> > +};
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
> > new file mode 100644
> > index 000000000000..42ebab1bafeb
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
> > @@ -0,0 +1,1704 @@
> > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > +/*
> > + * Copyright (C) 2022 MediaTek Inc.
> > + */
> > +/dts-v1/;
> > +#include "mt8186.dtsi"
> > +#include <dt-bindings/pinctrl/mt8186-pinfunc.h>
> > +#include <dt-bindings/gpio/gpio.h>
> > +#include <dt-bindings/input/input.h>
> > +#include <dt-bindings/input/gpio-keys.h>
> > +
> > +/ {
> > + aliases {
> > + i2c0 = &i2c0;
> > + i2c1 = &i2c1;
> > + i2c2 = &i2c2;
> > + i2c3 = &i2c3;
> > + i2c5 = &i2c5;
> > + mmc0 = &mmc0;
> > + mmc1 = &mmc1;
> > + serial0 = &uart0;
> > + };
> > +
> > + chosen {
> > + stdout-path = "serial0:115200n8";
> > + };
> > +
> > + memory@40000000 {
> > + device_type = "memory";
> > + /* The size should be filled in by the bootloader. */
> > + reg = <0 0x40000000 0 0>;
> > + };
> > +
> > + backlight_lcd0: backlight-lcd0 {
> > + compatible = "pwm-backlight";
> > + pwms = <&pwm0 0 500000>;
> > + power-supply = <&ppvar_sys>;
> > + enable-gpios = <&pio 152 0>;
> > + brightness-levels = <0 1023>;
> > + num-interpolated-steps = <1023>;
> > + default-brightness-level = <576>;
> > + };
> > +
> > + btsco: bt-sco {
> > + compatible = "linux,bt-sco";
> > + #sound-dai-cells = <0>;
> > + };
> > +
> > + dmic_codec: dmic-codec {
> > + compatible = "dmic-codec";
> > + num-channels = <2>;
> > + wakeup-delay-ms = <50>;
> > + #sound-dai-cells = <0>;
> > + };
> > +
> > + gpio_keys: gpio-keys {
> > + compatible = "gpio-keys";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pen_eject>;
> > +
> > + pen_insert: pen-insert-switch {
> > + label = "Pen Insert";
> > + /* Insert = low, eject = high */
> > + gpios = <&pio 18 GPIO_ACTIVE_LOW>;
> > + linux,code = <SW_PEN_INSERTED>;
> > + linux,input-type = <EV_SW>;
> > + wakeup-event-action = <EV_ACT_DEASSERTED>;
> > + wakeup-source;
> > + };
> > + };
> > +
> > + pp1800_dpbrdg_dx: regulator-pp1800-dpbrdg-dx {
> > + compatible = "regulator-fixed";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&en_pp1800_dpbrdg>;
> > + regulator-name = "pp1800_dpbrdg_dx";
> > + enable-active-high;
> > + gpio = <&pio 39 GPIO_ACTIVE_HIGH>;
> > + vin-supply = <&mt6366_vio18_reg>;
> > + };
> > +
> > + pp3300_disp_x: regulator-pp3300-disp-x {
> > + compatible = "regulator-fixed";
> > + regulator-name = "pp3300_disp_x";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&edp_panel_fixed_pins>;
> > + enable-active-high;
> > + regulator-boot-on;
> > + gpio = <&pio 153 GPIO_ACTIVE_HIGH>;
> > + vin-supply = <&pp3300_z2>;
> > + };
> > +
> > + /* system wide LDO 3.3V power rail */
> > + pp3300_z5: regulator-pp3300-ldo-z5 {
> > + compatible = "regulator-fixed";
> > + regulator-name = "pp3300_ldo_z5";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <3300000>;
> > + regulator-max-microvolt = <3300000>;
> > + vin-supply = <&ppvar_sys>;
> > + };
> > +
> > + /* separately switched 3.3V power rail */
> > + pp3300_s3: regulator-pp3300-s3 {
> > + compatible = "regulator-fixed";
> > + regulator-name = "pp3300_s3";
> > + /* automatically sequenced by PMIC EXT_PMIC_EN2 */
> > + regulator-always-on;
> > + regulator-boot-on;
> > + vin-supply = <&pp3300_z2>;
> > + };
> > +
> > + /* system wide 3.3V power rail */
> > + pp3300_z2: regulator-pp3300-z2 {
> > + compatible = "regulator-fixed";
> > + regulator-name = "pp3300_z2";
> > + /* EN pin tied to pp4200_z2, which is controlled by EC */
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <3300000>;
> > + regulator-max-microvolt = <3300000>;
> > + vin-supply = <&ppvar_sys>;
> > + };
> > +
> > + /* system wide 4.2V power rail */
> > + pp4200_z2: regulator-pp4200-z2 {
> > + compatible = "regulator-fixed";
> > + regulator-name = "pp4200_z2";
> > + /* controlled by EC */
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <4200000>;
> > + regulator-max-microvolt = <4200000>;
> > + vin-supply = <&ppvar_sys>;
> > + };
> > +
> > + /* system wide switching 5.0V power rail */
> > + pp5000_z2: regulator-pp5000-z2 {
> > + compatible = "regulator-fixed";
> > + regulator-name = "pp5000_z2";
> > + /* controlled by EC */
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <5000000>;
> > + regulator-max-microvolt = <5000000>;
> > + vin-supply = <&ppvar_sys>;
> > + };
> > +
> > + /* system wide semi-regulated power rail from battery or USB */
> > + ppvar_sys: regulator-ppvar-sys {
> > + compatible = "regulator-fixed";
> > + regulator-name = "ppvar_sys";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + };
> > +
> > + reserved_memory: reserved-memory {
> > + #address-cells = <2>;
> > + #size-cells = <2>;
> > + ranges;
> > +
> > + adsp_dma_mem: memory@61000000 {
> > + compatible = "shared-dma-pool";
> > + reg = <0 0x61000000 0 0x100000>;
> > + no-map;
> > + };
> > +
> > + adsp_mem: memory@60000000 {
> > + compatible = "shared-dma-pool";
> > + reg = <0 0x60000000 0 0xA00000>;
> > + no-map;
> > + };
> > +
> > + scp_mem: memory@50000000 {
> > + compatible = "shared-dma-pool";
> > + reg = <0 0x50000000 0 0x10a0000>;
> > + no-map;
> > + };
> > + };
> > +
> > + sound: sound {
> > + compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
> > + pinctrl-names = "aud_clk_mosi_off",
> > + "aud_clk_mosi_on",
> > + "aud_clk_miso_off",
> > + "aud_clk_miso_on",
> > + "aud_dat_miso_off",
> > + "aud_dat_miso_on",
> > + "aud_dat_mosi_off",
> > + "aud_dat_mosi_on",
> > + "aud_gpio_i2s0_off",
> > + "aud_gpio_i2s0_on",
> > + "aud_gpio_i2s1_off",
> > + "aud_gpio_i2s1_on",
> > + "aud_gpio_i2s2_off",
> > + "aud_gpio_i2s2_on",
> > + "aud_gpio_i2s3_off",
> > + "aud_gpio_i2s3_on",
> > + "aud_gpio_tdm_off",
> > + "aud_gpio_tdm_on",
> > + "aud_gpio_pcm_off",
> > + "aud_gpio_pcm_on",
> > + "aud_gpio_dmic_sec";
> > + pinctrl-0 = <&aud_clk_mosi_off>;
> > + pinctrl-1 = <&aud_clk_mosi_on>;
> > + pinctrl-2 = <&aud_clk_miso_off>;
> > + pinctrl-3 = <&aud_clk_miso_on>;
> > + pinctrl-4 = <&aud_dat_miso_off>;
> > + pinctrl-5 = <&aud_dat_miso_on>;
> > + pinctrl-6 = <&aud_dat_mosi_off>;
> > + pinctrl-7 = <&aud_dat_mosi_on>;
> > + pinctrl-8 = <&aud_gpio_i2s0_off>;
> > + pinctrl-9 = <&aud_gpio_i2s0_on>;
> > + pinctrl-10 = <&aud_gpio_i2s1_off>;
> > + pinctrl-11 = <&aud_gpio_i2s1_on>;
> > + pinctrl-12 = <&aud_gpio_i2s2_off>;
> > + pinctrl-13 = <&aud_gpio_i2s2_on>;
> > + pinctrl-14 = <&aud_gpio_i2s3_off>;
> > + pinctrl-15 = <&aud_gpio_i2s3_on>;
> > + pinctrl-16 = <&aud_gpio_tdm_off>;
> > + pinctrl-17 = <&aud_gpio_tdm_on>;
> > + pinctrl-18 = <&aud_gpio_pcm_off>;
> > + pinctrl-19 = <&aud_gpio_pcm_on>;
> > + pinctrl-20 = <&aud_gpio_dmic_sec>;
> > + mediatek,adsp = <&adsp>;
> > + mediatek,platform = <&afe>;
> > +
> > + playback-codecs {
> > + sound-dai = <&it6505dptx>, <&rt1019p>;
> > + };
> > +
> > + headset-codec {
> > + sound-dai = <&rt5682s 0>;
> > + };
> > + };
> > +
> > + rt1019p: speaker-codec {
> > + compatible = "realtek,rt1019p";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&rt1019p_pins_default>;
> > + sdb-gpios = <&pio 150 GPIO_ACTIVE_HIGH>;
> > + #sound-dai-cells = <0>;
> > + };
> > +
> > + usb_p1_vbus: regulator-usb-p1-vbus {
> > + compatible = "regulator-fixed";
> > + regulator-name = "vbus1";
> > + regulator-min-microvolt = <5000000>;
> > + regulator-max-microvolt = <5000000>;
> > + enable-active-high;
> > + gpio = <&pio 148 GPIO_ACTIVE_HIGH>;
> > + vin-supply = <&pp5000_z2>;
> > + };
> > +
> > + wifi_pwrseq: wifi-pwrseq {
> > + compatible = "mmc-pwrseq-simple";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&wifi_enable_pin>;
> > + post-power-on-delay-ms = <50>;
> > + reset-gpios = <&pio 54 GPIO_ACTIVE_LOW>;
> > + };
> > +
> > + wifi_wakeup: wifi-wakeup {
> > + compatible = "gpio-keys";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&wifi_wakeup_pin>;
>
> All of them do have a WoWLAN event pin, but not all of them have got a pen
> insertion pin... okay.
>
> So, you should either set status = "disabled" to both and then enable them
> in each board dts file, or you should merge them and delete the pen insertion
> node wherever not present.
>
> Using /delete-node/ is not wrong, of course, but I don't really like seeing
> that... it's probably just boiling down to a personal preference, so, unless
> you have strong opinions against that, I'd like to see the first suggestion
> applied (status = disabled on all, enable on a per-board basis).
The pin insertion "gpio-keys" node is a separate instance. So I assume
your comment applies to that one and not this one?
Merging them and then deleting the pin-insert node also requires overriding
the pinctrl property. Seems more work than necessary.
What you prefer here seems to be the opposite of what we have for the
touchscreen.
> > +
> > + wowlan-event {
> > + label = "Wake on WiFi";
> > + gpios = <&pio 7 GPIO_ACTIVE_LOW>;
> > + linux,code = <KEY_WAKEUP>;
> > + wakeup-source;
> > + };
> > + };
> > +};
> > +
> > +&adsp {
> > + memory-region = <&adsp_dma_mem>, <&adsp_mem>;
> > + status = "fail"; /* causes stall */
>
> The adsp is default disabled, you don't need to set it to "fail", as this is
> designed to work, not to fail, and this can be fixed.
>
> When things cannot be "really" fixed, then I agree on setting status = "fail",
> but again, this is not the case.
Fixed.
> > +};
> > +
> > +&afe {
> > + i2s0-share = "I2S1";
> > + i2s3-share = "I2S2";
> > + status = "okay";
> > +};
> > +
> > +&cci {
> > + proc-supply = <&mt6366_vproc12_reg>;
> > +};
> > +
> > +&cpu0 {
> > + proc-supply = <&mt6366_vproc12_reg>;
> > +};
> > +
> > +&cpu1 {
> > + proc-supply = <&mt6366_vproc12_reg>;
> > +};
> > +
> > +&cpu2 {
> > + proc-supply = <&mt6366_vproc12_reg>;
> > +};
> > +
> > +&cpu3 {
> > + proc-supply = <&mt6366_vproc12_reg>;
> > +};
> > +
> > +&cpu4 {
> > + proc-supply = <&mt6366_vproc12_reg>;
> > +};
> > +
> > +&cpu5 {
> > + proc-supply = <&mt6366_vproc12_reg>;
> > +};
> > +
> > +&cpu6 {
> > + proc-supply = <&mt6366_vproc11_reg>;
> > +};
> > +
> > +&cpu7 {
> > + proc-supply = <&mt6366_vproc11_reg>;
> > +};
> > +
> > +&dpi {
> > + pinctrl-names = "default", "sleep";
> > + pinctrl-0 = <&dpi_pins_default>;
> > + pinctrl-1 = <&dpi_pins_sleep>;
> > + status = "okay";
> > +};
> > +
> > +&dpi_out {
> > + remote-endpoint = <&it6505_in>;
> > +};
> > +
> > +&dsi0 {
> > + status = "okay";
> > +};
> > +
> > +&gic {
> > + mediatek,broken-save-restore-fw;
> > +};
> > +
> > +&gpu {
> > + mali-supply = <&mt6366_vgpu_reg>;
> > + status = "okay";
> > +};
> > +
> > +&i2c0 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c0_pins>;
> > + status = "okay";
> > +};
> > +
> > +&i2c1 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c1_pins>;
> > + clock-frequency = <400000>;
> > + i2c-scl-internal-delay-ns = <8000>;
> > + status = "okay";
> > +};
> > +
> > +&i2c2 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c2_pins>;
> > + clock-frequency = <400000>;
> > + i2c-scl-internal-delay-ns = <10000>;
> > + status = "okay";
> > +
> > + touchpad@15 {
>
> A "touchpad" is not an input device, it is a product name... so, this
> is a "trackpad" instead :-)
Fixed.
> > + compatible = "elan,ekth3000";
>
> Though, this compatible name is getting overridden in multiple cases, even if
> the majority of the properties are effectively the same, as in, the interrupts
> are the same, i2c addr is the same, power supplies are the same, pinctrl....
> ...what I would do here (even though it's a bit strange to see somehow) is...
>
> trackpad: trackpad@15 {
> /* Compatible string is be filled in board specific dts files */
> reg = <0x15>;
> interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> pinctrl-names = "default";
> pinctrl-0 = <&trackpad_pin>;
> vcc-supply = <&pp3300_s3>;
> wakeup-source;
> }
>
>
> In tentacruel-sku262144.dts:
>
> &trackpad {
> compatible = "hid-over-i2c";
> hid-descr-addr = <0x0001>;
> };
>
>
> In tentacool-sku327683.dts:
>
> &trackpad {
> compatible = "elan,ekth3000";
> };
>
>
> > + reg = <0x15>;
> > + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&trackpad_pin>;
> > + vcc-supply = <&pp3300_s3>;
> > + wakeup-source;
> > + };
> > +};
> > +
> > +&i2c3 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c3_pins>;
> > + clock-frequency = <100000>;
> > + status = "okay";
> > +
> > + it6505dptx: dp-bridge@5c {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&it6505_pins>;
> > + compatible = "ite,it6505";
> > + reg = <0x5c>;
> > + interrupts-extended = <&pio 8 IRQ_TYPE_LEVEL_LOW>;
> > + ovdd-supply = <&mt6366_vsim2_reg>;
> > + pwr18-supply = <&pp1800_dpbrdg_dx>;
> > + reset-gpios = <&pio 177 GPIO_ACTIVE_HIGH>;
>
> pinctrl-names, pinctrl-0 here
Actually I don't know what the general preference is, or what makes more
sense.
> > + no-laneswap;
>
> The driver has this property, that's true, but I can't find that in the bindings.
> Also, are you sure that we really need this?
>
> Checking the it6505 driver, the lane swap could also be set/unset with
> EXTCON_PROP_USB_TYPEC_POLARITY, check it6505_get_extcon_property()...
>
> ...but if we really need that property here, the bindings must have it.
This probably needs to be figured out with all the type-C muxing stuff.
I'll drop it.
> > +
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + #sound-dai-cells = <0>;
> > +
> > + ports {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + port@0 {
> > + reg = <0>;
> > +
> > + it6505_in: endpoint {
> > + link-frequencies = /bits/ 64 <150000000>;
> > + remote-endpoint = <&dpi_out>;
> > + };
> > + };
> > +
> > + port@1 {
> > + reg = <1>;
> > + };
> > + };
> > + };
> > +};
> > +
> > +&i2c5 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&i2c5_pins>;
> > + status = "okay";
> > +
> > + rt5682s: codec@1a {
> > + compatible = "realtek,rt5682s";
> > + reg = <0x1a>;
> > + interrupts-extended = <&pio 17 IRQ_TYPE_EDGE_BOTH>;
> > + realtek,jd-src = <1>;
>
> I would move realtek,jd-src...
>
> > + AVDD-supply = <&mt6366_vio18_reg>;
> > + DBVDD-supply = <&mt6366_vio18_reg>;
> > + LDO1-IN-supply = <&mt6366_vio18_reg>;
> > + MICVDD-supply = <&pp3300_z2>;
>
> ...here... but I don't really have strong opinions about that.
I can see some sense in that. Moved.
> > + #sound-dai-cells = <1>;
> > + };
> > +};
> > +
>
> ..snip..
>
> > +
> > + aud_clk_mosi_off: aud-clk-mosi-off-pins {
> > + pins-cmd-dat {
>
> I'd say that those are pins-clk-sync instead.
Fixed.
> > + pinmux = <PINMUX_GPIO166__FUNC_GPIO166>,
> > + <PINMUX_GPIO167__FUNC_GPIO167>;
> > + input-enable;
> > + bias-pull-down;
> > + };
> > + };
> > +
> > + aud_clk_mosi_on: aud-clk-mosi-on-pins {
> > + pins-cmd-dat {
>
> same
Fixed.
> > + pinmux = <PINMUX_GPIO166__FUNC_AUD_CLK_MOSI>,
> > + <PINMUX_GPIO167__FUNC_AUD_SYNC_MOSI>;
> > + };
> > + };
> > +
> > + aud_clk_miso_off: aud-clk-miso-off-pins {
> > + pins-cmd-dat {
>
> and here, and for all pins referencing "FUNC_AUD_CLK" and "FUNC_AUD_SYNC".
Fixed them all.
> > + pinmux = <PINMUX_GPIO170__FUNC_GPIO170>,
> > + <PINMUX_GPIO171__FUNC_GPIO171>;
> > + input-enable;
> > + bias-pull-down;
> > + };
> > + };
> > +
> > + aud_clk_miso_on: aud-clk-miso-on-pins {
> > + pins-cmd-dat {
> > + pinmux = <PINMUX_GPIO170__FUNC_AUD_CLK_MISO>,
> > + <PINMUX_GPIO171__FUNC_AUD_SYNC_MISO>;
> > + };
> > + };
> > +
> > + aud_dat_mosi_off: aud-dat-mosi-off-pins {
> > + pins-cmd-dat {
> > + pinmux = <PINMUX_GPIO168__FUNC_GPIO168>,
> > + <PINMUX_GPIO169__FUNC_GPIO169>;
> > + input-enable;
> > + bias-pull-down;
> > + };
> > + };
> > +
> > + aud_dat_mosi_on: aud-dat-mosi-on-pins {
> > + pins-cmd-dat {
>
> pins-dat or pins-bus
pins-dat it is.
> > + pinmux = <PINMUX_GPIO168__FUNC_AUD_DAT_MOSI0>,
> > + <PINMUX_GPIO169__FUNC_AUD_DAT_MOSI1>;
> > + };
> > + };
> > +
> > + aud_dat_miso_off: aud-dat-miso-off-pins {
> > + pins-cmd-dat {
> > + pinmux = <PINMUX_GPIO172__FUNC_GPIO172>,
> > + <PINMUX_GPIO173__FUNC_GPIO173>;
> > + input-enable;
> > + bias-pull-down;
> > + };
> > + };
> > +
> > + aud_dat_miso_on: aud-dat-miso-on-pins {
> > + pins-cmd-dat {
> > + pinmux = <PINMUX_GPIO172__FUNC_AUD_DAT_MISO0>,
> > + <PINMUX_GPIO173__FUNC_AUD_DAT_MISO1>;
> > + input-schmitt-enable;
> > + bias-disable;
> > + };
> > + };
> > +
> > + aud_gpio_i2s0_off: aud-gpio-i2s0-off-pins {
> > + pins-cmd-dat {
> > + pinmux = <PINMUX_GPIO3__FUNC_GPIO3>;
> > + };
> > + };
> > +
> > + aud_gpio_i2s0_on: aud-gpio-i2s0-on-pins {
> > + pins-cmd-dat {
>
> pins-sdata
Fixed.
> > + pinmux = <PINMUX_GPIO3__FUNC_I2S0_DI>;
> > + };
> > + };
> > +
> > + aud_gpio_i2s1_off: aud-gpio-i2s-off-pins {
> > + pins-cmd-dat {
> > + pinmux = <PINMUX_GPIO56__FUNC_GPIO56>,
> > + <PINMUX_GPIO57__FUNC_GPIO57>,
> > + <PINMUX_GPIO58__FUNC_GPIO58>,
> > + <PINMUX_GPIO59__FUNC_GPIO59>;
> > + output-low;
> > + };
> > + };
> > +
> > + aud_gpio_i2s1_on: aud-gpio-i2s1-on-pins {
> > + pins-cmd-dat {
>
> pins-clk-sdata
Fixed.
> > + pinmux = <PINMUX_GPIO56__FUNC_I2S1_DO>,
> > + <PINMUX_GPIO57__FUNC_I2S1_BCK>,
> > + <PINMUX_GPIO58__FUNC_I2S1_LRCK>,
> > + <PINMUX_GPIO59__FUNC_I2S1_MCK>;
> > + };
> > + };
> > +
> > + aud_gpio_i2s2_off: aud-gpio-i2s2-off-pins {
> > + pins-cmd-dat {
> > + pinmux = <PINMUX_GPIO26__FUNC_GPIO26>,
> > + <PINMUX_GPIO27__FUNC_GPIO27>;
> > + output-low;
> > + };
> > + };
> > +
> > + aud_gpio_i2s2_on: aud-gpio-i2s2-on-pins {
> > + pins-cmd-dat {
>
> Those are bit and word clock pins: pins-clk
Fixed.
> > + pinmux = <PINMUX_GPIO26__FUNC_I2S2_BCK>,
> > + <PINMUX_GPIO27__FUNC_I2S2_LRCK>;
> > + drive-strength = <4>;
> > + };
> > + };
> > +
> > + aud_gpio_i2s3_off: aud-gpio-i2s3-off-pins {
> > + pins-cmd-dat {
> > + pinmux = <PINMUX_GPIO4__FUNC_GPIO4>;
> > + output-low;
> > + };
> > + };
> > +
> > + aud_gpio_i2s3_on: aud-gpio-i2s3-on-pins {
> > + pins-cmd-dat {
>
> pins-sdata
Fixed.
> > + pinmux = <PINMUX_GPIO4__FUNC_I2S3_DO>;
> > + drive-strength = <4>;
> > + };
> > + };
> > +
> > + aud_gpio_tdm_off: aud-gpio-tdm-off-pins { };
> > +
> > + aud_gpio_tdm_on: aud-gpio-tdm-on-pins { };
> > +
> > + aud_gpio_pcm_off: aud-gpio-pcm-off-pins {
> > + pins-cmd-dat {
> > + pinmux = <PINMUX_GPIO115__FUNC_GPIO115>,
> > + <PINMUX_GPIO116__FUNC_GPIO116>,
> > + <PINMUX_GPIO117__FUNC_GPIO117>,
> > + <PINMUX_GPIO118__FUNC_GPIO118>;
> > + output-low;
> > + };
> > + };
> > +
> > + aud_gpio_pcm_on: aud-gpio-pcm-on-pins {
> > + pins-cmd-dat {
>
> pins-clk-dat
pins-clk-sdata to match the rest?
> > + pinmux = <PINMUX_GPIO115__FUNC_PCM_CLK>,
> > + <PINMUX_GPIO116__FUNC_PCM_SYNC>,
> > + <PINMUX_GPIO117__FUNC_PCM_DI>,
> > + <PINMUX_GPIO118__FUNC_PCM_DO>;
> > + };
> > + };
> > +
> > + aud_gpio_dmic_sec: aud-gpio-dmic-sec-pins {
> > + pins {
> > + pinmux = <PINMUX_GPIO23__FUNC_GPIO23>;
> > + output-low;
> > + };
> > + };
> > +
> > + bt_pins_reset: bt-reset-pins {
> > + pins-bt-reset {
> > + pinmux = <PINMUX_GPIO155__FUNC_GPIO155>;
> > + output-high;
> > + };
> > + };
> > +
>
> ..snip..
>
> > +
> > + ec_ap_int: cros-ec-int-pins {
> > + pins1 {
>
> pins-ec-ap-int-odl
Fixed.
> > + pinmux = <PINMUX_GPIO13__FUNC_GPIO13>;
> > + input-enable;
> > + };
> > + };
> > +
> > + edp_panel_fixed_pins: edp-panel-fixed-pins {
> > + pins1 {
>
> pins-vreg-en
Fixed.
> > + pinmux = <PINMUX_GPIO153__FUNC_GPIO153>;
> > + output-high;
> > + };
> > + };
> > +
> > + en_pp1800_dpbrdg: en-pp1800-dpbrdg-pins {
> > + pins {
>
> pins-vreg-en....
Fixed.
> > + pinmux = <PINMUX_GPIO39__FUNC_GPIO39>;
> > + output-low;
> > + };
> > + };
> > +
> > + gsc_ap_int_odl: gsc-ap-int-odl-pins {
>
> cr50_int: cr50-irq-default-pins {
> pins-gsc-ap-int-odl {
> ...
> }
> }
I'd just stick to gsc. The actual model used on these platforms is Ti50
anyway, which is the newer model. Either way they are called the Google
Security Chip, or GSC for short.
gsc_ap_int_odl is also what the line is called in the schematic.
For now I have:
gsc_int: gsc-int-pins {
pins-gsc-ap-int-odl {
What do you think?
> > + pins1 {
> > + pinmux = <PINMUX_GPIO15__FUNC_GPIO15>;
> > + input-enable;
> > + };
> > + };
> > +
>
> ..snip..
>
> > +
> > + mmc1_pins_eint: mmc1-eint-pins {
> > + pins_dat1 {
>
> pins-dat1
Fixed.
> > + pinmux = <PINMUX_GPIO87__FUNC_GPIO87>;
> > + input-enable;
> > + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
> > + };
> > + };
> > +
> > + nor_pins_default: nor-default-pins {
> > + pins0 {
>
> pins-clk-dat
Fixed.
> > + pinmux = <PINMUX_GPIO63__FUNC_SPINOR_IO0>,
> > + <PINMUX_GPIO61__FUNC_SPINOR_CK>,
> > + <PINMUX_GPIO64__FUNC_SPINOR_IO1>;
> > + drive-strength = <6>;
> > + bias-pull-down;
> > + };
> > +
> > + pins1 {
>
> pins-cs-dat
Fixed.
> > + pinmux = <PINMUX_GPIO62__FUNC_SPINOR_CS>,
> > + <PINMUX_GPIO65__FUNC_SPINOR_IO2>,
> > + <PINMUX_GPIO66__FUNC_SPINOR_IO3>;
> > + drive-strength = <6>;
> > + bias-pull-up;
> > + };
> > + };
> > +
> > + pen_eject: pen-eject-pins {
> > + pins {
> > + pinmux = <PINMUX_GPIO18__FUNC_GPIO18>;
> > + input-enable;
> > + /* External pull-up. */
> > + bias-disable;
> > + };
> > + };
> > +
> > + pwm0_pin: pwm0-default-pins {
>
> pins-disp-pwm
I believe you meant "disp-pwm-pins"?
First level node requires "-pins$", not "^pins".
> > + pins {
> > + pinmux = <PINMUX_GPIO97__FUNC_DISP_PWM>;
> > + output-high;
> > + };
> > + };
> > +
> > + rt1019p_pins_default: rt1019p-default-pins {
> > + pins {
>
> pins-sdb
Fixed.
> > + pinmux = <PINMUX_GPIO150__FUNC_GPIO150>;
> > + output-low;
> > + };
> > + };
> > +
> > + scp_pins: scp-default-pins {
> > + pins-scp-uart {
> > + pinmux = <PINMUX_GPIO48__FUNC_TP_URXD2_AO>,
> > + <PINMUX_GPIO49__FUNC_TP_UTXD2_AO>;
> > + };
> > + };
> > +
> > + spi1_pins: spi1-pins {
> > + pins-spi {
> > + pinmux = <PINMUX_GPIO40__FUNC_SPI1_CLK_A>,
> > + <PINMUX_GPIO41__FUNC_SPI1_CSB_A>,
> > + <PINMUX_GPIO42__FUNC_SPI1_MO_A>,
> > + <PINMUX_GPIO43__FUNC_SPI1_MI_A>;
>
> Shouldn't MISO be pull-down?!
>
> clk, mo, csb: bias-disable
> mi: bias-pull-down
AFAIK SPI is a push-pull interface. No biasing should be used.
> > + bias-disable;
> > + input-enable;
> > + };
> > + };
> > +
> > + spi2_pins: spi2-pins {
> > + pins-spi {
> > + pinmux = <PINMUX_GPIO44__FUNC_SPI2_CLK_A>,
> > + <PINMUX_GPIO45__FUNC_GPIO45>,
> > + <PINMUX_GPIO46__FUNC_SPI2_MO_A>,
> > + <PINMUX_GPIO47__FUNC_SPI2_MI_A>;
>
> Same question here.
>
> P.S.: if yes, pins-cs-mosi-clk, pins-miso; if not, pins-bus.
pins-bus it is.
> > + bias-disable;
> > + input-enable;
> > + };
> > + };
> > +
> > + spmi_pins: spmi-pins {
> > + pins-spmi {
>
> pins-bus
Fixed.
> > + pinmux = <PINMUX_GPIO183__FUNC_SPMI_SCL>,
> > + <PINMUX_GPIO184__FUNC_SPMI_SDA>;
> > + };
> > + };
> > +
> > + touchscreen_pins: touchscreen-pins {
> > + pins-irq {
> > + pinmux = <PINMUX_GPIO12__FUNC_GPIO12>;
> > + input-enable;
> > + bias-pull-up;
> > + };
> > +
> > + pins-reset {
> > + pinmux = <PINMUX_GPIO60__FUNC_GPIO60>;
> > + output-high;
> > + };
> > +
> > + pins-report-sw {
> > + pinmux = <PINMUX_GPIO37__FUNC_GPIO37>;
> > + output-low;
> > + };
> > + };
> > +
> > + trackpad_pin: trackpad-default-pins {
> > + pins-int-n {
> > + pinmux = <PINMUX_GPIO11__FUNC_GPIO11>;
> > + input-enable;
> > + bias-disable; /* pulled externally */
> > + };
> > + };
> > +
> > + wifi_enable_pin: wifi-enable-pins {
> > + pins-wifi-enable {
> > + pinmux = <PINMUX_GPIO54__FUNC_GPIO54>;
> > + };
> > + };
> > +
> > + wifi_wakeup_pin: wifi-wakeup-pins {
> > + pins-wifi-wakeup {
> > + pinmux = <PINMUX_GPIO7__FUNC_GPIO7>;
> > + input-enable;
> > + };
> > + };
> > +};
> > +
> > +&pwm0 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pwm0_pin>;
> > + status = "okay";
> > +};
> > +
> > +&pwrap {
> > + pmic {
> > + compatible = "mediatek,mt6366", "mediatek,mt6358";
> > + interrupt-controller;
> > + interrupts-extended = <&pio 201 IRQ_TYPE_LEVEL_HIGH>;
> > + #interrupt-cells = <2>;
> > +
> > + mt6366codec: codec {
> > + compatible = "mediatek,mt6366-sound", "mediatek,mt6358-sound";
> > + Avdd-supply = <&mt6366_vaud28_reg>;
> > + mediatek,dmic-mode = <1>; /* one-wire */
> > + };
> > +
> > + mt6366_regulators: regulators {
> > + compatible = "mediatek,mt6366-regulator", "mediatek,mt6358-regulator";
> > + vsys-ldo1-supply = <&pp4200_z2>;
> > + vsys-ldo2-supply = <&pp4200_z2>;
> > + vsys-ldo3-supply = <&pp4200_z2>;
> > + vsys-vcore-supply = <&pp4200_z2>;
> > + vsys-vdram1-supply = <&pp4200_z2>;
> > + vsys-vgpu-supply = <&pp4200_z2>;
> > + vsys-vmodem-supply = <&pp4200_z2>;
> > + vsys-vpa-supply = <&pp4200_z2>;
> > + vsys-vproc11-supply = <&pp4200_z2>;
> > + vsys-vproc12-supply = <&pp4200_z2>;
> > + vsys-vs1-supply = <&pp4200_z2>;
> > + vsys-vs2-supply = <&pp4200_z2>;
> > + vs1-ldo1-supply = <&mt6366_vs1_reg>;
> > + vs2-ldo1-supply = <&mt6366_vdram1_reg>;
> > + vs2-ldo2-supply = <&mt6366_vs2_reg>;
> > + vs2-ldo3-supply = <&mt6366_vs2_reg>;
> > +
> > + vcore {
> > + regulator-name = "pp0750_dvdd_core";
> > + regulator-min-microvolt = <550000>;
> > + regulator-max-microvolt = <800000>;
> > + regulator-ramp-delay = <6250>;
> > + regulator-enable-ramp-delay = <200>;
> > + regulator-allowed-modes = <0 1>;
Looks like I need to update this to use the macros from the header file.
> > + regulator-always-on;
> > + };
> > +
> > + mt6366_vdram1_reg: vdram1 {
> > + regulator-name = "pp1125_emi_vdd2";
> > + regulator-min-microvolt = <1125000>;
> > + regulator-max-microvolt = <1125000>;
> > + regulator-ramp-delay = <12500>;
> > + regulator-enable-ramp-delay = <0>;
> > + regulator-allowed-modes = <0 1>;
> > + regulator-always-on;
> > + };
> > +
> > + mt6366_vgpu_reg: vgpu {
> > + regulator-name = "ppvar_dvdd_gpu";
>
> Can we please rename this to "ppvar_dvdd_vgpu"?
> The regulator coupler driver parses "vgpu"... :-)
OK... This is what the name is on the schematic. I'll fix the name
and add a comment for it.
> > + regulator-min-microvolt = <600000>;
> > + regulator-max-microvolt = <950000>;
> > + regulator-ramp-delay = <6250>;
> > + regulator-enable-ramp-delay = <200>;
> > + regulator-allowed-modes = <0 1>;
>
> Couple this regulator with VSRAM, max spread 100000.
Done.
> > + };
> > +
>
> ..snip..
>
> > +
> > + mt6366_vsram_gpu_reg: vsram-gpu {
> > + regulator-name = "pp0900_dvdd_sram_gpu";
> > + regulator-min-microvolt = <850000>;
> > + regulator-max-microvolt = <1050000>;
> > + regulator-ramp-delay = <6250>;
> > + regulator-enable-ramp-delay = <240>;
>
> Couple with VGPU, same max spread.
Done.
> > + };
> > +
> > + mt6366_vsram_others_reg: vsram-others {
> > + regulator-name = "pp0900_dvdd_sram_core";
> > + regulator-min-microvolt = <900000>;
> > + regulator-max-microvolt = <900000>;
> > + regulator-ramp-delay = <6250>;
> > + regulator-enable-ramp-delay = <240>;
> > + regulator-always-on;
> > + };
> > +
> > + mt6366_vsram_proc11_reg: vsram-proc11 {
> > + regulator-name = "pp0900_dvdd_sram_bc";
> > + regulator-min-microvolt = <850000>;
> > + regulator-max-microvolt = <1120000>;
> > + regulator-ramp-delay = <6250>;
> > + regulator-enable-ramp-delay = <240>;
> > + regulator-always-on;
> > + };
> > +
> > + mt6366_vsram_proc12_reg: vsram-proc12 {
> > + regulator-name = "pp0900_dvdd_sram_lc";
> > + regulator-min-microvolt = <850000>;
> > + regulator-max-microvolt = <1120000>;
> > + regulator-ramp-delay = <6250>;
> > + regulator-enable-ramp-delay = <240>;
> > + regulator-always-on;
> > + };
> > +
> > + vusb {
> > + regulator-name = "pp3070_vusb";
> > + regulator-min-microvolt = <3000000>;
> > + regulator-max-microvolt = <3070000>;
> > + regulator-enable-ramp-delay = <270>;
> > + regulator-always-on;
> > + };
> > +
> > + vxo22 {
> > + regulator-name = "pp2240_vxo22";
> > + regulator-min-microvolt = <2200000>;
> > + regulator-max-microvolt = <2240000>;
> > + regulator-enable-ramp-delay = <120>;
> > + /* Feeds DCXO internally */
> > + regulator-always-on;
> > + };
> > + };
> > +
> > + rtc {
> > + compatible = "mediatek,mt6366-rtc", "mediatek,mt6358-rtc";
> > + };
> > + };
> > +};
> > +
> > +&scp {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&scp_pins>;
> > + firmware-name = "mediatek/mt8186/scp.img";
> > + memory-region = <&scp_mem>;
> > + status = "okay";
> > +
> > + cros-ec-rpmsg {
> > + compatible = "google,cros-ec-rpmsg";
> > + mediatek,rpmsg-name = "cros-ec-rpmsg";
> > + };
> > +};
> > +
> > +&spi1 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&spi1_pins>;
> > + mediatek,pad-select = <0>;
> > + status = "okay";
> > +
> > + cros_ec: ec@0 {
> > + compatible = "google,cros-ec-spi";
> > + reg = <0>;
> > + spi-max-frequency = <1000000>;
> > + interrupt-parent = <&pio>;
> > + interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
>
> interrupts-extended please
Fixed.
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&ec_ap_int>;
> > +
> > + i2c_tunnel: i2c-tunnel {
> > + compatible = "google,cros-ec-i2c-tunnel";
> > + google,remote-bus = <1>;
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + };
> > +
> > + typec {
> > + compatible = "google,cros-ec-typec";
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + usb_c0: connector@0 {
> > + compatible = "usb-c-connector";
> > + reg = <0>;
> > + label = "left";
> > + power-role = "dual";
> > + data-role = "host";
> > + try-power-role = "source";
> > +
> > + ports {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + port@1 {
> > + reg = <1>;
> > +
> > + typec_port0: endpoint { };
> > + };
> > + };
> > + };
> > +
> > + usb_c1: connector@1 {
> > + compatible = "usb-c-connector";
> > + reg = <1>;
> > + label = "right";
> > + power-role = "dual";
> > + data-role = "host";
> > + try-power-role = "source";
> > +
> > + ports {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + port@1 {
> > + reg = <1>;
> > +
> > + typec_port1: endpoint { };
> > + };
> > + };
> > + };
> > + };
> > + };
> > +};
> > +
> > +&spi2 {
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&spi2_pins>;
> > + cs-gpios = <&pio 45 GPIO_ACTIVE_LOW>;
> > + mediatek,pad-select = <0>;
> > + status = "okay";
> > +
> > + cr50: cr50@0 {
>
> Do we really need a phandle on cr50?
>
> Also, I'd say tpm@0 instead.
Dropped label and renamed node to tpm.
Thanks for the review. I think at some point I messed up my files and
that resulted in a bunch of things that I fixed up getting reverted.
Regards
ChenYu
> > + compatible = "google,cr50";
> > + reg = <0>;
> > + spi-max-frequency = <1000000>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&gsc_ap_int_odl>;
> > + interrupt-parent = <&pio>;
> > + interrupts = <15 IRQ_TYPE_EDGE_RISING>;
> > + };
> > +};
> > +
>
> Cheers!
> Angelo
On Sun, Oct 15, 2023 at 11:15:22PM -0700, Chen-Yu Tsai wrote:
> On Sat, Oct 14, 2023 at 6:40 AM Conor Dooley <[email protected]> wrote:
> >
> > On Fri, Oct 13, 2023 at 11:19:16AM -0700, Chen-Yu Tsai wrote:
> > > On Fri, Oct 13, 2023 at 10:55 AM Conor Dooley <[email protected]> wrote:
> > > >
> > > > On Fri, Oct 13, 2023 at 10:29:25AM -0700, Chen-Yu Tsai wrote:
> > > > > On Fri, Oct 13, 2023 at 8:11 AM Conor Dooley <[email protected]> wrote:
> > > > > >
> > > > > > On Fri, Oct 13, 2023 at 07:02:28AM +0800, Chen-Yu Tsai wrote:
> > > > > > > Add entries for MT8186 based Tentacruel / Tentacool Chromebooks. The two
> > > > > > > are based on the same board design: the former is a convertible device
> > > > > > > with a touchscreen, stylus, and some extra buttons; the latter is a
> > > > > > > clamshell device and lacks these additional features.
> > > > > > >
> > > > > > > The two devices both have two variants. The difference is a second
> > > > > > > source touchpad controller that shares the same address as the original,
> > > > > > > but is incompatible.
> > > > > >
> > > > > > > The extra SKU IDs for the Tentacruel devices map to different sensor
> > > > > > > components attached to the Embedded Controller. These are not visible
> > > > > > > to the main processor.
> > > > > >
> > > > > > Wha? Given your ordering, is a "google,tentacruel-sku262144" a super-set
> > > > > > of "google,tentacruel-sku262145"? If not, this compatible ordering
> > > > > > doesn't make sense. I can't tell from your description, and the
> > > > > > absence of a
> > > > > > items:
> > > > > > - const: google,tentacruel-sku262145
> > > > > > - const: google,tentacruel-sku262146
> > > > > > - const: google,tentacruel-sku262147
> > > > > > - const: google,tentacruel
> > > > > > - const: mediatek,mt8186
> > > > > > suggests that there is no google,tentacruel-sku262145
> > > > > > device?
> > > > >
> > > > > AFAIK all four SKUs exist. And as far as the main processor is concerned,
> > > > > they look completely identical, so they should share the same device tree.
> > > > > As mentioned in the commit message, the differences are only visible to
> > > > > the embedded controller, which fuses the sensor inputs.
> > > >
> > > > Then it makes very little sense to write a binding like this.
> > > > If this was just for the 252144 SKU, this would be fine.
> > > > For the other SKUs, there is no way to uniquely identify them, as
> > > > all four of google,tentacruel-sku262144, google,tentacruel-sku262145,
> > > > google,tentacruel-sku262146 and google,tentacruel-sku262147 must be
> > > > present.
> > > > Given that, why even bother including the SKUs in the first place,
> > > > since no information can be derived from them that cannot be derived
> > > > from google,tentacruel?
> > > > There's something that I am clearly missing here...
> > >
> > > There are incompatible variants of google,tentacruel. This is why this
> > > patch has four google,tentacruel based entries. Of them, two are Tentacool,
> > > which are clamshell laptops, and two of them are Tentacruel, which are
> > > convertibles.
> > >
> > > Within each group there are two variants: the second variant swaps out
> > > the I2C touchpad controller. These two controllers use the same I2C
> > > address but use different compatible strings, so it's not possible to
> > > have them coexist within the same device tree file like we do for many
> > > other second source components.
> > >
> > > So the relationship looks like the following:
> > >
> > > google,tentacruel --- Tentacruel --- google,tentacruel-sku26214[4567]
> > > | |
> > > | -- google,tentacruel-sku2621{48,49,50,51}
> > > |
> > > -- Tentacool ---- google,tentacruel-sku327681
> > > |
> > > --- google,tentacruel-sku327683
> > >
> > > Also, the devices themselves only know their own SKU ID. The firmware
> > > will generate a list of compatible strings like:
> > >
> > > google,tentacruel-rev4-sku262144
> > > google,tentacruel-rev4
> > > google,tentacruel-sku262144
> > > google,tentacruel
> > >
> > > and try to find a match in the kernel FIT image. The method we currently
> > > use is to include all the applicable board compatible strings.
> >
> > Then it seems like what you need is something like
> > oneOf:
> > - items:
> > - const: google,tentacruel-sku262144
> > - const: google,tentacruel
> > - const: mediatek,mt8186
> > - items:
> > - enum:
> > - google,tentacruel-sku262145
> > - google,tentacruel-sku262146
> > - google,tentacruel-sku262147
> > - const: google,tentacruel-sku262144
> > - const: google,tentacruel
> > - const: mediatek,mt8186
> >
> > What you have at the moment just seems like a hack because you want to
> > stuff all of these compatible strings into a single dts.
>
> It is. And it works OK downstream. The reason we want to stuff them in
> one dts is because the firmware will not generate the fallback to
> sku262144 as the scheme above suggests.
I'm not going to ack the hack that you have here, sorry. Maybe Rob or
Krzysztof will. The list your firmware generates above doesn't even
match the contents of this patch, with the extra "rev-4" compatibles.
> Having three or four identical device trees just with different board
> compatible string sequences to me seems a bit redundant, and it does
> end up bloating our FIT image a bit, which impacts boot time.
I'm not aware of the capabilities of your bootloader when it comes to
setting properties before passing them to the kernel, but that is what I
would be doing to cut down on having 4 different dtbs.
On 18/10/2023 17:07, Conor Dooley wrote:
>>> Then it seems like what you need is something like
>>> oneOf:
>>> - items:
>>> - const: google,tentacruel-sku262144
>>> - const: google,tentacruel
>>> - const: mediatek,mt8186
>>> - items:
>>> - enum:
>>> - google,tentacruel-sku262145
>>> - google,tentacruel-sku262146
>>> - google,tentacruel-sku262147
>>> - const: google,tentacruel-sku262144
>>> - const: google,tentacruel
>>> - const: mediatek,mt8186
>>>
>>> What you have at the moment just seems like a hack because you want to
>>> stuff all of these compatible strings into a single dts.
>>
>> It is. And it works OK downstream. The reason we want to stuff them in
>> one dts is because the firmware will not generate the fallback to
>> sku262144 as the scheme above suggests.
>
> I'm not going to ack the hack that you have here, sorry. Maybe Rob or
> Krzysztof will. The list your firmware generates above doesn't even
> match the contents of this patch, with the extra "rev-4" compatibles.
No Acks from me either... Chromebooks board compatibles are a long
standing confusion for me and every time I forget why this is so
counter-intuitively. My comments for changing this were rather receiving
feedback "but our firmware likes it that way".
OTOH, board compatibles just have to be unique, so we could accept some
weird, counter-intuitive combinations... but it does not mean I should
be happy with them.
Best regards,
Krzysztof
On Wed, Oct 18, 2023 at 11:07 PM Conor Dooley <[email protected]> wrote:
>
> On Sun, Oct 15, 2023 at 11:15:22PM -0700, Chen-Yu Tsai wrote:
> > On Sat, Oct 14, 2023 at 6:40 AM Conor Dooley <[email protected]> wrote:
> > >
> > > On Fri, Oct 13, 2023 at 11:19:16AM -0700, Chen-Yu Tsai wrote:
> > > > On Fri, Oct 13, 2023 at 10:55 AM Conor Dooley <[email protected]> wrote:
> > > > >
> > > > > On Fri, Oct 13, 2023 at 10:29:25AM -0700, Chen-Yu Tsai wrote:
> > > > > > On Fri, Oct 13, 2023 at 8:11 AM Conor Dooley <[email protected]> wrote:
> > > > > > >
> > > > > > > On Fri, Oct 13, 2023 at 07:02:28AM +0800, Chen-Yu Tsai wrote:
> > > > > > > > Add entries for MT8186 based Tentacruel / Tentacool Chromebooks. The two
> > > > > > > > are based on the same board design: the former is a convertible device
> > > > > > > > with a touchscreen, stylus, and some extra buttons; the latter is a
> > > > > > > > clamshell device and lacks these additional features.
> > > > > > > >
> > > > > > > > The two devices both have two variants. The difference is a second
> > > > > > > > source touchpad controller that shares the same address as the original,
> > > > > > > > but is incompatible.
> > > > > > >
> > > > > > > > The extra SKU IDs for the Tentacruel devices map to different sensor
> > > > > > > > components attached to the Embedded Controller. These are not visible
> > > > > > > > to the main processor.
> > > > > > >
> > > > > > > Wha? Given your ordering, is a "google,tentacruel-sku262144" a super-set
> > > > > > > of "google,tentacruel-sku262145"? If not, this compatible ordering
> > > > > > > doesn't make sense. I can't tell from your description, and the
> > > > > > > absence of a
> > > > > > > items:
> > > > > > > - const: google,tentacruel-sku262145
> > > > > > > - const: google,tentacruel-sku262146
> > > > > > > - const: google,tentacruel-sku262147
> > > > > > > - const: google,tentacruel
> > > > > > > - const: mediatek,mt8186
> > > > > > > suggests that there is no google,tentacruel-sku262145
> > > > > > > device?
> > > > > >
> > > > > > AFAIK all four SKUs exist. And as far as the main processor is concerned,
> > > > > > they look completely identical, so they should share the same device tree.
> > > > > > As mentioned in the commit message, the differences are only visible to
> > > > > > the embedded controller, which fuses the sensor inputs.
> > > > >
> > > > > Then it makes very little sense to write a binding like this.
> > > > > If this was just for the 252144 SKU, this would be fine.
> > > > > For the other SKUs, there is no way to uniquely identify them, as
> > > > > all four of google,tentacruel-sku262144, google,tentacruel-sku262145,
> > > > > google,tentacruel-sku262146 and google,tentacruel-sku262147 must be
> > > > > present.
> > > > > Given that, why even bother including the SKUs in the first place,
> > > > > since no information can be derived from them that cannot be derived
> > > > > from google,tentacruel?
> > > > > There's something that I am clearly missing here...
> > > >
> > > > There are incompatible variants of google,tentacruel. This is why this
> > > > patch has four google,tentacruel based entries. Of them, two are Tentacool,
> > > > which are clamshell laptops, and two of them are Tentacruel, which are
> > > > convertibles.
> > > >
> > > > Within each group there are two variants: the second variant swaps out
> > > > the I2C touchpad controller. These two controllers use the same I2C
> > > > address but use different compatible strings, so it's not possible to
> > > > have them coexist within the same device tree file like we do for many
> > > > other second source components.
> > > >
> > > > So the relationship looks like the following:
> > > >
> > > > google,tentacruel --- Tentacruel --- google,tentacruel-sku26214[4567]
> > > > | |
> > > > | -- google,tentacruel-sku2621{48,49,50,51}
> > > > |
> > > > -- Tentacool ---- google,tentacruel-sku327681
> > > > |
> > > > --- google,tentacruel-sku327683
> > > >
> > > > Also, the devices themselves only know their own SKU ID. The firmware
> > > > will generate a list of compatible strings like:
> > > >
> > > > google,tentacruel-rev4-sku262144
> > > > google,tentacruel-rev4
> > > > google,tentacruel-sku262144
> > > > google,tentacruel
> > > >
> > > > and try to find a match in the kernel FIT image. The method we currently
> > > > use is to include all the applicable board compatible strings.
> > >
> > > Then it seems like what you need is something like
> > > oneOf:
> > > - items:
> > > - const: google,tentacruel-sku262144
> > > - const: google,tentacruel
> > > - const: mediatek,mt8186
> > > - items:
> > > - enum:
> > > - google,tentacruel-sku262145
> > > - google,tentacruel-sku262146
> > > - google,tentacruel-sku262147
> > > - const: google,tentacruel-sku262144
> > > - const: google,tentacruel
> > > - const: mediatek,mt8186
> > >
> > > What you have at the moment just seems like a hack because you want to
> > > stuff all of these compatible strings into a single dts.
> >
> > It is. And it works OK downstream. The reason we want to stuff them in
> > one dts is because the firmware will not generate the fallback to
> > sku262144 as the scheme above suggests.
>
> I'm not going to ack the hack that you have here, sorry. Maybe Rob or
I understand.
> Krzysztof will. The list your firmware generates above doesn't even
> match the contents of this patch, with the extra "rev-4" compatibles.
The firmware generates a list of compatibles that it will go through and
try to find a matching compatible with. I believe the intent was not to
use it as "a list of compatibles" in the usual sense. The kernel image
comes bundled with a whole bunch of device trees, and the firmware just
tries to find the best or most specific match. The firmware only knows
about itself, and does not know about adjacent or similar SKUs or
revisions.
The process is described in detail in the kernel tree in
Documentation/arch/arm/google/chromebook-boot-flow.rst
or https://docs.kernel.org/arch/arm/google/chromebook-boot-flow.html
> > Having three or four identical device trees just with different board
> > compatible string sequences to me seems a bit redundant, and it does
> > end up bloating our FIT image a bit, which impacts boot time.
>
> I'm not aware of the capabilities of your bootloader when it comes to
> setting properties before passing them to the kernel, but that is what I
> would be doing to cut down on having 4 different dtbs.
That could be a solution for future devices, but the devices this series
covers are already on the market. The firmware on these devices is very
hard to update, and there is no guarantee that the device ever gets
updated. Sometimes these extra SKUs or component changes happen after
the device is in production, due to inventory issues or EOL of components.
This is what happened here.
Then there's sometimes the problem where we are originally shipping with
downstream patches / bindings that may change as they are upstreamed.
This is something we are trying to fix by having our vendors upstream
earlier, but sometimes we do end up carrying some stuff downstream
regardless.
Also, doing the customization in firmware would be somewhat fragile as
we end up trying to keep two separate software packages in sync.
I talked to Doug Anderson about this, and his "of: device: Support 2nd
sources of probeable but undiscoverable devices" proposal (specifically,
the second proposal [1] after Rob nacked the first one) could help solve
this as well. Part of what we have with the Tentacruel series is second
source drop-in components, which is the same issue that the proposal
wants to solve.
Specifically, instead of the firmware solution you proposed, there would
be a hardware prober driver running early in the kernel that deals with
the board specifics, either by checking the SKU ID passed in by the
firmware (in inserted device tree nodes), or by manually probing the
hardware in some board specific way and tweaking the device tree to
match. It would know what needs to be handled for each device series.
With this scheme, we would be able to merge some of the device trees
together, though I'm not sure we would want to merge all of
"google,tentacruel", as that would also cover variants of different
form factors. I guess it depends on how much editing or probing we
want to allow in the board manager.
Thanks
ChenYu
[1] https://lore.kernel.org/linux-devicetree/CAD=FV=UjVAgT-febtj4=UZ2GQp01D-ern2Ff9+ODcHeQBOsdTQ@mail.gmail.com/
On 10/13/23 02:02, Chen-Yu Tsai wrote:
> Tentacruel and Tentacool are MT8186 based Chromebooks based on the
> Krabby design.
>
> Tentacruel, also known as the ASUS Chromebook CM14 Flip CM1402F, is a
> convertible device with touchscreen and stylus.
>
> Tentacool, also known as the ASUS Chromebook CM14 CM1402C, is a laptop
> device. It does not have a touchscreen or stylus.
>
> The two devices both have two variants. The difference is a second
> source touchpad controller that shares the same address as the original,
> but is incompatible.
>
> The extra SKU IDs for the Tentacruel devices map to different sensor
> components attached to the Embedded Controller. These are not visible
> to the main processor.
>
> Signed-off-by: Chen-Yu Tsai <[email protected]>
> ---
> arch/arm64/boot/dts/mediatek/Makefile | 4 +
> .../dts/mediatek/mt8186-corsola-krabby.dtsi | 130 ++
> .../mt8186-corsola-tentacool-sku327681.dts | 49 +
> .../mt8186-corsola-tentacool-sku327683.dts | 26 +
> .../mt8186-corsola-tentacruel-sku262144.dts | 44 +
> .../mt8186-corsola-tentacruel-sku262148.dts | 28 +
> .../boot/dts/mediatek/mt8186-corsola.dtsi | 1704 +++++++++++++++++
> 7 files changed, 1985 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
>
> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> index e6e7592a3645..442af61b1305 100644
> --- a/arch/arm64/boot/dts/mediatek/Makefile
> +++ b/arch/arm64/boot/dts/mediatek/Makefile
> @@ -43,6 +43,10 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-kodama-sku32.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327681.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacool-sku327683.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262144.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-tentacruel-sku262148.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-evb.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r1.dtb
> dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r5-sku2.dtb
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
> new file mode 100644
> index 000000000000..0586c24f1e12
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
> @@ -0,0 +1,130 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2023 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> + aliases {
> + i2c4 = &i2c4;
> + };
> +};
> +
> +&dsi_out {
> + remote-endpoint = <&ps8640_in>;
> +};
> +
> +&i2c0 {
> + clock-frequency = <400000>;
> +
> + ps8640: edp-bridge@8 {
> + compatible = "parade,ps8640";
> + reg = <0x8>;
> + powerdown-gpios = <&pio 96 GPIO_ACTIVE_LOW>;
> + reset-gpios = <&pio 98 GPIO_ACTIVE_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&ps8640_pins>;
> + vdd12-supply = <&mt6366_vrf12_reg>;
> + vdd33-supply = <&mt6366_vcn33_reg>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> +
> + ps8640_in: endpoint {
> + remote-endpoint = <&dsi_out>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> +
> + ps8640_out: endpoint {
> + remote-endpoint = <&panel_in>;
> + };
> + };
> + };
> +
> + aux-bus {
> + panel {
> + compatible = "edp-panel";
> + power-supply = <&pp3300_disp_x>;
> + backlight = <&backlight_lcd0>;
> +
> + port {
> + panel_in: endpoint {
> + remote-endpoint = <&ps8640_out>;
> + };
> + };
> + };
> + };
> + };
> +};
> +
> +&i2c1 {
> + i2c-scl-internal-delay-ns = <10000>;
> +
> + touchscreen: touchscreen@10 {
> + compatible = "hid-over-i2c";
> + reg = <0x10>;
> + interrupts-extended = <&pio 12 IRQ_TYPE_LEVEL_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&touchscreen_pins>;
> + post-power-on-delay-ms = <10>;
> + hid-descr-addr = <0x0001>;
> + vdd-supply = <&pp3300_s3>;
> + };
> +};
> +
> +&i2c4 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c4_pins>;
> + clock-frequency = <400000>;
> + status = "okay";
> +
> + proximity@28 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&sar_sensor_pins>;
> + compatible = "semtech,sx9324";
> + reg = <0x28>;
> + interrupt-parent = <&pio>;
> + interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
> + vdd-supply = <&mt6366_vio18_reg>;
> + svdd-supply = <&mt6366_vio18_reg>;
> + #io-channel-cells = <1>;
> + };
> +};
> +
> +&pio {
> + i2c4_pins: i2c4-pins {
> + pins-bus {
> + pinmux = <PINMUX_GPIO136__FUNC_SDA4>,
> + <PINMUX_GPIO135__FUNC_SCL4>;
> + bias-disable;
> + drive-strength = <4>;
> + input-enable;
> + };
> + };
> +
> + ps8640_pins: ps8640-pins {
> + pins {
> + pinmux = <PINMUX_GPIO96__FUNC_GPIO96>,
> + <PINMUX_GPIO98__FUNC_GPIO98>;
> + output-low;
> + };
> + };
> +
> + sar_sensor_pins: sar-sensor-pins {
> + pin-irq {
> + pinmux = <PINMUX_GPIO5__FUNC_GPIO5>;
> + input-enable;
> + bias-pull-up;
> + };
> + };
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
> new file mode 100644
> index 000000000000..8dfc24afabea
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
> @@ -0,0 +1,49 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2023 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola-krabby.dtsi"
> +
> +/ {
> + model = "Google Tentacool board";
> + compatible = "google,tentacruel-sku327681", "google,tentacruel", "mediatek,mt8186";
> + chassis-type = "laptop";
> +};
> +
> +/delete-node/ &gpio_keys;
> +/delete-node/ &touchscreen;
> +
> +&i2c1 {
> + status = "disabled";
> +};
> +
> +&keyboard_controller {
> + function-row-physmap = <
> + MATRIX_KEY(0x00, 0x02, 0) /* T1 */
> + MATRIX_KEY(0x03, 0x02, 0) /* T2 */
> + MATRIX_KEY(0x02, 0x02, 0) /* T3 */
> + MATRIX_KEY(0x01, 0x02, 0) /* T4 */
> + MATRIX_KEY(0x03, 0x04, 0) /* T5 */
> + MATRIX_KEY(0x02, 0x04, 0) /* T6 */
> + MATRIX_KEY(0x01, 0x04, 0) /* T7 */
> + MATRIX_KEY(0x02, 0x09, 0) /* T8 */
> + MATRIX_KEY(0x01, 0x09, 0) /* T9 */
> + MATRIX_KEY(0x00, 0x04, 0) /* T10 */
> + >;
> +
> + linux,keymap = <
> + MATRIX_KEY(0x00, 0x02, KEY_BACK)
> + MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
> + MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
> + MATRIX_KEY(0x01, 0x02, KEY_SCALE)
> + MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
> + MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
> + MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
> + MATRIX_KEY(0x02, 0x09, KEY_MUTE)
> + MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
> + MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
> + CROS_STD_MAIN_KEYMAP
> + >;
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
> new file mode 100644
> index 000000000000..9b10336ede06
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
> @@ -0,0 +1,26 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2023 Google LLC
> + */
> +
> +#include "mt8186-corsola-tentacool-sku327681.dts"
> +
> +/ {
> + compatible = "google,tentacruel-sku327683", "google,tentacruel", "mediatek,mt8186";
> +};
> +
> +/* This variant replaces only the touchpad controller. */
> +&i2c2 {
> + /delete-node/ touchpad@15;
> +
> + touchpad@15 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&trackpad_pin>;
> + compatible = "hid-over-i2c";
> + reg = <0x15>;
> + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> + hid-descr-addr = <0x0001>;
> + vcc-supply = <&pp3300_s3>;
> + wakeup-source;
> + };
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
> new file mode 100644
> index 000000000000..26e9f19758cb
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
> @@ -0,0 +1,44 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2022 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola-krabby.dtsi"
> +
> +/ {
> + model = "Google Tentacruel board";
> + compatible = "google,tentacruel-sku262144", "google,tentacruel-sku262145",
> + "google,tentacruel-sku262146", "google,tentacruel-sku262147",
> + "google,tentacruel", "mediatek,mt8186";
> + chassis-type = "convertible";
> +};
> +
> +&keyboard_controller {
> + function-row-physmap = <
> + MATRIX_KEY(0x00, 0x02, 0) /* T1 */
> + MATRIX_KEY(0x03, 0x02, 0) /* T2 */
> + MATRIX_KEY(0x02, 0x02, 0) /* T3 */
> + MATRIX_KEY(0x01, 0x02, 0) /* T4 */
> + MATRIX_KEY(0x03, 0x04, 0) /* T5 */
> + MATRIX_KEY(0x02, 0x04, 0) /* T6 */
> + MATRIX_KEY(0x01, 0x04, 0) /* T7 */
> + MATRIX_KEY(0x02, 0x09, 0) /* T8 */
> + MATRIX_KEY(0x01, 0x09, 0) /* T9 */
> + MATRIX_KEY(0x00, 0x04, 0) /* T10 */
> + >;
> +
> + linux,keymap = <
> + MATRIX_KEY(0x00, 0x02, KEY_BACK)
> + MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
> + MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
> + MATRIX_KEY(0x01, 0x02, KEY_SCALE)
> + MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
> + MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
> + MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
> + MATRIX_KEY(0x02, 0x09, KEY_MUTE)
> + MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
> + MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
> + CROS_STD_MAIN_KEYMAP
> + >;
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
> new file mode 100644
> index 000000000000..59d4d21fc7d3
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
> @@ -0,0 +1,28 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2022 Google LLC
> + */
> +
> +#include "mt8186-corsola-tentacruel-sku262144.dts"
> +
> +/ {
> + compatible = "google,tentacruel-sku262144", "google,tentacruel-sku262145",
> + "google,tentacruel-sku262146", "google,tentacruel-sku262147",
> + "google,tentacruel", "mediatek,mt8186";
> +};
> +
> +/* This variant replaces only the touchpad controller. */
> +&i2c2 {
> + /delete-node/ touchpad@15;
> +
> + touchpad@15 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&trackpad_pin>;
> + compatible = "hid-over-i2c";
> + reg = <0x15>;
> + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> + hid-descr-addr = <0x0001>;
> + vcc-supply = <&pp3300_s3>;
> + wakeup-source;
> + };
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
> new file mode 100644
> index 000000000000..42ebab1bafeb
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
> @@ -0,0 +1,1704 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright (C) 2022 MediaTek Inc.
> + */
> +/dts-v1/;
> +#include "mt8186.dtsi"
> +#include <dt-bindings/pinctrl/mt8186-pinfunc.h>
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/input/gpio-keys.h>
> +
> +/ {
> + aliases {
> + i2c0 = &i2c0;
> + i2c1 = &i2c1;
> + i2c2 = &i2c2;
> + i2c3 = &i2c3;
> + i2c5 = &i2c5;
> + mmc0 = &mmc0;
> + mmc1 = &mmc1;
> + serial0 = &uart0;
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };
> +
> + memory@40000000 {
> + device_type = "memory";
> + /* The size should be filled in by the bootloader. */
> + reg = <0 0x40000000 0 0>;
> + };
> +
> + backlight_lcd0: backlight-lcd0 {
> + compatible = "pwm-backlight";
> + pwms = <&pwm0 0 500000>;
> + power-supply = <&ppvar_sys>;
> + enable-gpios = <&pio 152 0>;
> + brightness-levels = <0 1023>;
> + num-interpolated-steps = <1023>;
> + default-brightness-level = <576>;
> + };
> +
> + btsco: bt-sco {
> + compatible = "linux,bt-sco";
> + #sound-dai-cells = <0>;
> + };
> +
> + dmic_codec: dmic-codec {
> + compatible = "dmic-codec";
> + num-channels = <2>;
> + wakeup-delay-ms = <50>;
> + #sound-dai-cells = <0>;
> + };
> +
> + gpio_keys: gpio-keys {
> + compatible = "gpio-keys";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pen_eject>;
> +
> + pen_insert: pen-insert-switch {
> + label = "Pen Insert";
> + /* Insert = low, eject = high */
> + gpios = <&pio 18 GPIO_ACTIVE_LOW>;
> + linux,code = <SW_PEN_INSERTED>;
> + linux,input-type = <EV_SW>;
> + wakeup-event-action = <EV_ACT_DEASSERTED>;
> + wakeup-source;
> + };
> + };
> +
> + pp1800_dpbrdg_dx: regulator-pp1800-dpbrdg-dx {
> + compatible = "regulator-fixed";
> + pinctrl-names = "default";
> + pinctrl-0 = <&en_pp1800_dpbrdg>;
> + regulator-name = "pp1800_dpbrdg_dx";
> + enable-active-high;
> + gpio = <&pio 39 GPIO_ACTIVE_HIGH>;
> + vin-supply = <&mt6366_vio18_reg>;
> + };
> +
> + pp3300_disp_x: regulator-pp3300-disp-x {
> + compatible = "regulator-fixed";
> + regulator-name = "pp3300_disp_x";
> + pinctrl-names = "default";
> + pinctrl-0 = <&edp_panel_fixed_pins>;
> + enable-active-high;
> + regulator-boot-on;
> + gpio = <&pio 153 GPIO_ACTIVE_HIGH>;
> + vin-supply = <&pp3300_z2>;
> + };
> +
> + /* system wide LDO 3.3V power rail */
> + pp3300_z5: regulator-pp3300-ldo-z5 {
> + compatible = "regulator-fixed";
> + regulator-name = "pp3300_ldo_z5";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + vin-supply = <&ppvar_sys>;
> + };
> +
> + /* separately switched 3.3V power rail */
> + pp3300_s3: regulator-pp3300-s3 {
> + compatible = "regulator-fixed";
> + regulator-name = "pp3300_s3";
> + /* automatically sequenced by PMIC EXT_PMIC_EN2 */
> + regulator-always-on;
> + regulator-boot-on;
> + vin-supply = <&pp3300_z2>;
> + };
> +
> + /* system wide 3.3V power rail */
> + pp3300_z2: regulator-pp3300-z2 {
> + compatible = "regulator-fixed";
> + regulator-name = "pp3300_z2";
> + /* EN pin tied to pp4200_z2, which is controlled by EC */
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + vin-supply = <&ppvar_sys>;
> + };
> +
> + /* system wide 4.2V power rail */
> + pp4200_z2: regulator-pp4200-z2 {
> + compatible = "regulator-fixed";
> + regulator-name = "pp4200_z2";
> + /* controlled by EC */
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <4200000>;
> + regulator-max-microvolt = <4200000>;
> + vin-supply = <&ppvar_sys>;
> + };
> +
> + /* system wide switching 5.0V power rail */
> + pp5000_z2: regulator-pp5000-z2 {
> + compatible = "regulator-fixed";
> + regulator-name = "pp5000_z2";
> + /* controlled by EC */
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + vin-supply = <&ppvar_sys>;
> + };
> +
> + /* system wide semi-regulated power rail from battery or USB */
> + ppvar_sys: regulator-ppvar-sys {
> + compatible = "regulator-fixed";
> + regulator-name = "ppvar_sys";
> + regulator-always-on;
> + regulator-boot-on;
> + };
> +
> + reserved_memory: reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + adsp_dma_mem: memory@61000000 {
> + compatible = "shared-dma-pool";
> + reg = <0 0x61000000 0 0x100000>;
> + no-map;
> + };
> +
> + adsp_mem: memory@60000000 {
> + compatible = "shared-dma-pool";
> + reg = <0 0x60000000 0 0xA00000>;
> + no-map;
> + };
> +
> + scp_mem: memory@50000000 {
> + compatible = "shared-dma-pool";
> + reg = <0 0x50000000 0 0x10a0000>;
> + no-map;
> + };
> + };
> +
> + sound: sound {
> + compatible = "mediatek,mt8186-mt6366-rt1019-rt5682s-sound";
> + pinctrl-names = "aud_clk_mosi_off",
> + "aud_clk_mosi_on",
> + "aud_clk_miso_off",
> + "aud_clk_miso_on",
> + "aud_dat_miso_off",
> + "aud_dat_miso_on",
> + "aud_dat_mosi_off",
> + "aud_dat_mosi_on",
> + "aud_gpio_i2s0_off",
> + "aud_gpio_i2s0_on",
> + "aud_gpio_i2s1_off",
> + "aud_gpio_i2s1_on",
> + "aud_gpio_i2s2_off",
> + "aud_gpio_i2s2_on",
> + "aud_gpio_i2s3_off",
> + "aud_gpio_i2s3_on",
> + "aud_gpio_tdm_off",
> + "aud_gpio_tdm_on",
> + "aud_gpio_pcm_off",
> + "aud_gpio_pcm_on",
> + "aud_gpio_dmic_sec";
> + pinctrl-0 = <&aud_clk_mosi_off>;
> + pinctrl-1 = <&aud_clk_mosi_on>;
> + pinctrl-2 = <&aud_clk_miso_off>;
> + pinctrl-3 = <&aud_clk_miso_on>;
> + pinctrl-4 = <&aud_dat_miso_off>;
> + pinctrl-5 = <&aud_dat_miso_on>;
> + pinctrl-6 = <&aud_dat_mosi_off>;
> + pinctrl-7 = <&aud_dat_mosi_on>;
> + pinctrl-8 = <&aud_gpio_i2s0_off>;
> + pinctrl-9 = <&aud_gpio_i2s0_on>;
> + pinctrl-10 = <&aud_gpio_i2s1_off>;
> + pinctrl-11 = <&aud_gpio_i2s1_on>;
> + pinctrl-12 = <&aud_gpio_i2s2_off>;
> + pinctrl-13 = <&aud_gpio_i2s2_on>;
> + pinctrl-14 = <&aud_gpio_i2s3_off>;
> + pinctrl-15 = <&aud_gpio_i2s3_on>;
> + pinctrl-16 = <&aud_gpio_tdm_off>;
> + pinctrl-17 = <&aud_gpio_tdm_on>;
> + pinctrl-18 = <&aud_gpio_pcm_off>;
> + pinctrl-19 = <&aud_gpio_pcm_on>;
> + pinctrl-20 = <&aud_gpio_dmic_sec>;
> + mediatek,adsp = <&adsp>;
> + mediatek,platform = <&afe>;
> +
> + playback-codecs {
> + sound-dai = <&it6505dptx>, <&rt1019p>;
> + };
> +
> + headset-codec {
> + sound-dai = <&rt5682s 0>;
> + };
> + };
> +
> + rt1019p: speaker-codec {
> + compatible = "realtek,rt1019p";
> + pinctrl-names = "default";
> + pinctrl-0 = <&rt1019p_pins_default>;
> + sdb-gpios = <&pio 150 GPIO_ACTIVE_HIGH>;
> + #sound-dai-cells = <0>;
> + };
> +
> + usb_p1_vbus: regulator-usb-p1-vbus {
> + compatible = "regulator-fixed";
> + regulator-name = "vbus1";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + gpio = <&pio 148 GPIO_ACTIVE_HIGH>;
> + vin-supply = <&pp5000_z2>;
> + };
> +
> + wifi_pwrseq: wifi-pwrseq {
> + compatible = "mmc-pwrseq-simple";
> + pinctrl-names = "default";
> + pinctrl-0 = <&wifi_enable_pin>;
> + post-power-on-delay-ms = <50>;
> + reset-gpios = <&pio 54 GPIO_ACTIVE_LOW>;
> + };
> +
> + wifi_wakeup: wifi-wakeup {
> + compatible = "gpio-keys";
> + pinctrl-names = "default";
> + pinctrl-0 = <&wifi_wakeup_pin>;
> +
> + wowlan-event {
> + label = "Wake on WiFi";
> + gpios = <&pio 7 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_WAKEUP>;
> + wakeup-source;
> + };
> + };
> +};
> +
> +&adsp {
> + memory-region = <&adsp_dma_mem>, <&adsp_mem>;
> + status = "fail"; /* causes stall */
> +};
> +
> +&afe {
> + i2s0-share = "I2S1";
> + i2s3-share = "I2S2";
> + status = "okay";
> +};
> +
> +&cci {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu0 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu1 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu2 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu3 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu4 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu5 {
> + proc-supply = <&mt6366_vproc12_reg>;
> +};
> +
> +&cpu6 {
> + proc-supply = <&mt6366_vproc11_reg>;
> +};
> +
> +&cpu7 {
> + proc-supply = <&mt6366_vproc11_reg>;
> +};
> +
> +&dpi {
> + pinctrl-names = "default", "sleep";
> + pinctrl-0 = <&dpi_pins_default>;
> + pinctrl-1 = <&dpi_pins_sleep>;
> + status = "okay";
> +};
> +
> +&dpi_out {
> + remote-endpoint = <&it6505_in>;
> +};
> +
> +&dsi0 {
> + status = "okay";
> +};
> +
> +&gic {
> + mediatek,broken-save-restore-fw;
> +};
> +
> +&gpu {
> + mali-supply = <&mt6366_vgpu_reg>;
> + status = "okay";
> +};
> +
> +&i2c0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c0_pins>;
> + status = "okay";
> +};
> +
> +&i2c1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c1_pins>;
> + clock-frequency = <400000>;
> + i2c-scl-internal-delay-ns = <8000>;
> + status = "okay";
> +};
> +
> +&i2c2 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c2_pins>;
> + clock-frequency = <400000>;
> + i2c-scl-internal-delay-ns = <10000>;
> + status = "okay";
> +
> + touchpad@15 {
> + compatible = "elan,ekth3000";
> + reg = <0x15>;
> + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&trackpad_pin>;
> + vcc-supply = <&pp3300_s3>;
> + wakeup-source;
> + };
> +};
> +
> +&i2c3 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c3_pins>;
> + clock-frequency = <100000>;
> + status = "okay";
> +
> + it6505dptx: dp-bridge@5c {
> + pinctrl-names = "default";
> + pinctrl-0 = <&it6505_pins>;
> + compatible = "ite,it6505";
> + reg = <0x5c>;
> + interrupts-extended = <&pio 8 IRQ_TYPE_LEVEL_LOW>;
> + ovdd-supply = <&mt6366_vsim2_reg>;
> + pwr18-supply = <&pp1800_dpbrdg_dx>;
> + reset-gpios = <&pio 177 GPIO_ACTIVE_HIGH>;
> + no-laneswap;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> + #sound-dai-cells = <0>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> +
> + it6505_in: endpoint {
> + link-frequencies = /bits/ 64 <150000000>;
> + remote-endpoint = <&dpi_out>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + };
> + };
> + };
> +};
> +
> +&i2c5 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c5_pins>;
> + status = "okay";
> +
> + rt5682s: codec@1a {
> + compatible = "realtek,rt5682s";
> + reg = <0x1a>;
> + interrupts-extended = <&pio 17 IRQ_TYPE_EDGE_BOTH>;
> + realtek,jd-src = <1>;
> + AVDD-supply = <&mt6366_vio18_reg>;
> + DBVDD-supply = <&mt6366_vio18_reg>;
> + LDO1-IN-supply = <&mt6366_vio18_reg>;
> + MICVDD-supply = <&pp3300_z2>;
> + #sound-dai-cells = <1>;
> + };
> +};
> +
> +&mfg0 {
> + domain-supply = <&mt6366_vsram_gpu_reg>;
> +};
> +
> +&mfg1 {
> + domain-supply = <&mt6366_vgpu_reg>;
> +};
> +
> +&mipi_tx0 {
> + status = "okay";
> +};
> +
> +&mmc0 {
> + pinctrl-names = "default", "state_uhs";
> + pinctrl-0 = <&mmc0_pins_default>;
> + pinctrl-1 = <&mmc0_pins_uhs>;
> + bus-width = <8>;
> + max-frequency = <200000000>;
> + non-removable;
> + cap-mmc-highspeed;
> + mmc-hs200-1_8v;
> + mmc-hs400-1_8v;
> + supports-cqe;
> + no-sd;
> + no-sdio;
> + cap-mmc-hw-reset;
> + hs400-ds-delay = <0x11814>;
> + mediatek,hs400-ds-dly3 = <0x14>;
> + vmmc-supply = <&mt6366_vemc_reg>;
> + vqmmc-supply = <&mt6366_vio18_reg>;
> + status = "okay";
> +};
> +
> +&mmc1 {
> + pinctrl-names = "default", "state_uhs", "state_eint";
> + pinctrl-0 = <&mmc1_pins_default>;
> + pinctrl-1 = <&mmc1_pins_uhs>;
> + pinctrl-2 = <&mmc1_pins_eint>;
> + /delete-property/ interrupts;
> + interrupt-names = "msdc", "sdio_wakeup";
> + interrupts-extended = <&gic GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH 0>,
> + <&pio 87 IRQ_TYPE_LEVEL_LOW>;
> + bus-width = <4>;
> + max-frequency = <200000000>;
> + cap-sd-highspeed;
> + sd-uhs-sdr104;
> + sd-uhs-sdr50;
> + keep-power-in-suspend;
> + wakeup-source;
> + cap-sdio-irq;
> + no-mmc;
> + no-sd;
> + non-removable;
> + vmmc-supply = <&pp3300_s3>;
> + vqmmc-supply = <&mt6366_vio18_reg>;
> + mmc-pwrseq = <&wifi_pwrseq>;
> + status = "okay";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + bluetooth@2 {
> + compatible = "mediatek,mt7921s-bluetooth";
> + reg = <2>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&bt_pins_reset>;
> + reset-gpios = <&pio 155 GPIO_ACTIVE_LOW>;
> + };
> +};
> +
> +&nor_flash {
> + pinctrl-names = "default";
> + pinctrl-0 = <&nor_pins_default>;
> + assigned-clock-parents = <&topckgen CLK_TOP_MAINPLL_D7_D4>;
> + status = "okay";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <39000000>;
> + };
> +};
> +
> +&pio {
> + /* 185 lines */
> + gpio-line-names = "TP",
> + "TP",
> + "TP",
> + "I2S0_HP_DI",
> + "I2S3_DP_SPKR_DO",
> + "SAR_INT_ODL",
> + "BT_WAKE_AP_ODL",
> + "WIFI_INT_ODL",
> + "DPBRDG_INT_ODL",
> + "EDPBRDG_INT_ODL",
> + "EC_AP_HPD_OD",
> + "TCHPAD_INT_ODL",
> + "TCHSCR_INT_1V8_ODL",
> + "EC_AP_INT_ODL",
> + "EC_IN_RW_ODL",
> + "GSC_AP_INT_ODL",
> + /* AP_FLASH_WP_L is crossystem ABI. Rev1 schematics call it AP_WP_ODL. */
> + "AP_FLASH_WP_L",
> + "HP_INT_ODL",
> + "PEN_EJECT_OD",
> + "WCAM_PWDN_L",
> + "WCAM_RST_L",
> + "UCAM_SEN_EN",
> + "UCAM_RST_L",
> + "LTE_RESET_L",
> + "LTE_SAR_DETECT_L",
> + "I2S2_DP_SPK_MCK",
> + "I2S2_DP_SPKR_BCK",
> + "I2S2_DP_SPKR_LRCK",
> + "I2S2_DP_SPKR_DI (TP)",
> + "EN_PP1000_EDPBRDG",
> + "EN_PP1800_EDPBRDG",
> + "EN_PP3300_EDPBRDG",
> + "UART_GSC_TX_AP_RX",
> + "UART_AP_TX_GSC_RX",
> + "UART_DBGCON_TX_ADSP_RX",
> + "UART_ADSP_TX_DBGCON_RX",
> + "EN_PP1000_DPBRDG",
> + "TCHSCR_REPORT_DISABLE",
> + "EN_PP3300_DPBRDG",
> + "EN_PP1800_DPBRDG",
> + "SPI_AP_CLK_EC",
> + "SPI_AP_CS_EC_L",
> + "SPI_AP_DO_EC_DI",
> + "SPI_AP_DI_EC_DO",
> + "SPI_AP_CLK_GSC",
> + "SPI_AP_CS_GSC_L",
> + "SPI_AP_DO_GSC_DI",
> + "SPI_AP_DI_GSC_DO",
> + "UART_DBGCON_TX_SCP_RX",
> + "UART_SCP_TX_DBGCON_RX",
> + "EN_PP1200_CAM_X",
> + "EN_PP2800A_VCM_X",
> + "EN_PP2800A_UCAM_X",
> + "EN_PP2800A_WCAM_X",
> + "WLAN_MODULE_RST_L",
> + "EN_PP1200_UCAM_X",
> + "I2S1_HP_DO",
> + "I2S1_HP_BCK",
> + "I2S1_HP_LRCK",
> + "I2S1_HP_MCK",
> + "TCHSCR_RST_1V8_L",
> + "SPI_AP_CLK_ROM",
> + "SPI_AP_CS_ROM_L",
> + "SPI_AP_DO_ROM_DI",
> + "SPI_AP_DI_ROM_DO",
> + "NC",
> + "NC",
> + "EMMC_STRB",
> + "EMMC_CLK",
> + "EMMC_CMD",
> + "EMMC_RST_L",
> + "EMMC_DATA0",
> + "EMMC_DATA1",
> + "EMMC_DATA2",
> + "EMMC_DATA3",
> + "EMMC_DATA4",
> + "EMMC_DATA5",
> + "EMMC_DATA6",
> + "EMMC_DATA7",
> + "AP_KPCOL0",
> + "NC",
> + "NC",
> + "NC",
> + "TP",
> + "SDIO_CLK",
> + "SDIO_CMD",
> + "SDIO_DATA0",
> + "SDIO_DATA1",
> + "SDIO_DATA2",
> + "SDIO_DATA3",
> + "NC",
> + "NC",
> + "NC",
> + "NC",
> + "NC",
> + "NC",
> + "EDPBRDG_PWREN",
> + "BL_PWM_1V8",
> + "EDPBRDG_RST_L",
> + "MIPI_DPI_CLK",
> + "MIPI_DPI_VSYNC",
> + "MIPI_DPI_HSYNC",
> + "MIPI_DPI_DE",
> + "MIPI_DPI_D0",
> + "MIPI_DPI_D1",
> + "MIPI_DPI_D2",
> + "MIPI_DPI_D3",
> + "MIPI_DPI_D4",
> + "MIPI_DPI_D5",
> + "MIPI_DPI_D6",
> + "MIPI_DPI_DA7",
> + "MIPI_DPI_D8",
> + "MIPI_DPI_D9",
> + "MIPI_DPI_D10",
> + "MIPI_DPI_D11",
> + "PCM_BT_CLK",
> + "PCM_BT_SYNC",
> + "PCM_BT_DI",
> + "PCM_BT_DO",
> + "JTAG_TMS_TP",
> + "JTAG_TCK_TP",
> + "JTAG_TDI_TP",
> + "JTAG_TDO_TP",
> + "JTAG_TRSTN_TP",
> + "CLK_24M_WCAM",
> + "CLK_24M_UCAM",
> + "UCAM_DET_ODL",
> + "AP_I2C_EDPBRDG_SCL_1V8",
> + "AP_I2C_EDPBRDG_SDA_1V8",
> + "AP_I2C_TCHSCR_SCL_1V8",
> + "AP_I2C_TCHSCR_SDA_1V8",
> + "AP_I2C_TCHPAD_SCL_1V8",
> + "AP_I2C_TCHPAD_SDA_1V8",
> + "AP_I2C_DPBRDG_SCL_1V8",
> + "AP_I2C_DPBRDG_SDA_1V8",
> + "AP_I2C_WLAN_SCL_1V8",
> + "AP_I2C_WLAN_SDA_1V8",
> + "AP_I2C_AUD_SCL_1V8",
> + "AP_I2C_AUD_SDA_1V8",
> + "AP_I2C_TPM_SCL_1V8",
> + "AP_I2C_UCAM_SDA_1V8",
> + "AP_I2C_UCAM_SCL_1V8",
> + "AP_I2C_UCAM_SDA_1V8",
> + "AP_I2C_WCAM_SCL_1V8",
> + "AP_I2C_WCAM_SDA_1V8",
> + "SCP_I2C_SENSOR_SCL_1V8",
> + "SCP_I2C_SENSOR_SDA_1V8",
> + "AP_EC_WARM_RST_REQ",
> + "AP_XHCI_INIT_DONE",
> + "USB3_HUB_RST_L",
> + "EN_SPKR",
> + "BEEP_ON",
> + "AP_EDP_BKLTEN",
> + "EN_PP3300_DISP_X",
> + "EN_PP3300_SDBRDG_X",
> + "BT_KILL_1V8_L",
> + "WIFI_KILL_1V8_L",
> + "PWRAP_SPI0_CSN",
> + "PWRAP_SPI0_CK",
> + "PWRAP_SPI0_MO",
> + "PWRAP_SPI0_MI",
> + "SRCLKENA0",
> + "SRCLKENA1",
> + "SCP_VREQ_VAO",
> + "AP_RTC_CLK32K",
> + "AP_PMIC_WDTRST_L",
> + "AUD_CLK_MOSI",
> + "AUD_SYNC_MOSI",
> + "AUD_DAT_MOSI0",
> + "AUD_DAT_MOSI1",
> + "AUD_CLK_MISO",
> + "AUD_SYNC_MISO",
> + "AUD_DAT_MISO0",
> + "AUD_DAT_MISO1",
> + "NC",
> + "NC",
> + "DPBRDG_PWREN",
> + "DPBRDG_RST_L",
> + "LTE_W_DISABLE_L",
> + "LTE_SAR_DETECT_L",
> + "EN_PP3300_LTE_X",
> + "LTE_PWR_OFF_L",
> + "LTE_RESET_L",
> + "TP",
> + "TP";
> +
> + aud_clk_mosi_off: aud-clk-mosi-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO166__FUNC_GPIO166>,
> + <PINMUX_GPIO167__FUNC_GPIO167>;
> + input-enable;
> + bias-pull-down;
> + };
> + };
> +
> + aud_clk_mosi_on: aud-clk-mosi-on-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO166__FUNC_AUD_CLK_MOSI>,
> + <PINMUX_GPIO167__FUNC_AUD_SYNC_MOSI>;
> + };
> + };
> +
> + aud_clk_miso_off: aud-clk-miso-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO170__FUNC_GPIO170>,
> + <PINMUX_GPIO171__FUNC_GPIO171>;
> + input-enable;
> + bias-pull-down;
> + };
> + };
> +
> + aud_clk_miso_on: aud-clk-miso-on-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO170__FUNC_AUD_CLK_MISO>,
> + <PINMUX_GPIO171__FUNC_AUD_SYNC_MISO>;
> + };
> + };
> +
> + aud_dat_mosi_off: aud-dat-mosi-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO168__FUNC_GPIO168>,
> + <PINMUX_GPIO169__FUNC_GPIO169>;
> + input-enable;
> + bias-pull-down;
> + };
> + };
> +
> + aud_dat_mosi_on: aud-dat-mosi-on-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO168__FUNC_AUD_DAT_MOSI0>,
> + <PINMUX_GPIO169__FUNC_AUD_DAT_MOSI1>;
> + };
> + };
> +
> + aud_dat_miso_off: aud-dat-miso-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO172__FUNC_GPIO172>,
> + <PINMUX_GPIO173__FUNC_GPIO173>;
> + input-enable;
> + bias-pull-down;
> + };
> + };
> +
> + aud_dat_miso_on: aud-dat-miso-on-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO172__FUNC_AUD_DAT_MISO0>,
> + <PINMUX_GPIO173__FUNC_AUD_DAT_MISO1>;
> + input-schmitt-enable;
> + bias-disable;
> + };
> + };
> +
> + aud_gpio_i2s0_off: aud-gpio-i2s0-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO3__FUNC_GPIO3>;
> + };
> + };
> +
> + aud_gpio_i2s0_on: aud-gpio-i2s0-on-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO3__FUNC_I2S0_DI>;
> + };
> + };
> +
> + aud_gpio_i2s1_off: aud-gpio-i2s-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO56__FUNC_GPIO56>,
> + <PINMUX_GPIO57__FUNC_GPIO57>,
> + <PINMUX_GPIO58__FUNC_GPIO58>,
> + <PINMUX_GPIO59__FUNC_GPIO59>;
> + output-low;
> + };
> + };
> +
> + aud_gpio_i2s1_on: aud-gpio-i2s1-on-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO56__FUNC_I2S1_DO>,
> + <PINMUX_GPIO57__FUNC_I2S1_BCK>,
> + <PINMUX_GPIO58__FUNC_I2S1_LRCK>,
> + <PINMUX_GPIO59__FUNC_I2S1_MCK>;
> + };
> + };
> +
> + aud_gpio_i2s2_off: aud-gpio-i2s2-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO26__FUNC_GPIO26>,
> + <PINMUX_GPIO27__FUNC_GPIO27>;
> + output-low;
> + };
> + };
> +
> + aud_gpio_i2s2_on: aud-gpio-i2s2-on-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO26__FUNC_I2S2_BCK>,
> + <PINMUX_GPIO27__FUNC_I2S2_LRCK>;
> + drive-strength = <4>;
> + };
> + };
> +
> + aud_gpio_i2s3_off: aud-gpio-i2s3-off-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO4__FUNC_GPIO4>;
> + output-low;
> + };
> + };
> +
> + aud_gpio_i2s3_on: aud-gpio-i2s3-on-pins {
> + pins-cmd-dat {
> + pinmux = <PINMUX_GPIO4__FUNC_I2S3_DO>;
> + drive-strength = <4>;
> + };
> + };
> +
> + aud_gpio_tdm_off: aud-gpio-tdm-off-pins { };
> +
> + aud_gpio_tdm_on: aud-gpio-tdm-on-pins { };
Hi Chen-Yu,
These two aud_gpio_tdm empty entries cause this message to be printed:
[ 12.949519] mt8186_mt6366_rt1019_rt5682s sound: there is not valid
maps for state aud_gpio_tdm_off
[ 12.959025] mt8186_mt6366_rt1019_rt5682s sound: there is not valid
maps for state aud_gpio_tdm_on
Eugen
[...]
On Fri, Oct 13, 2023 at 07:02:28AM +0800, Chen-Yu Tsai wrote:
> Add entries for MT8186 based Tentacruel / Tentacool Chromebooks. The two
> are based on the same board design: the former is a convertible device
> with a touchscreen, stylus, and some extra buttons; the latter is a
> clamshell device and lacks these additional features.
>
> The two devices both have two variants. The difference is a second
> source touchpad controller that shares the same address as the original,
> but is incompatible.
>
> The extra SKU IDs for the Tentacruel devices map to different sensor
> components attached to the Embedded Controller. These are not visible
> to the main processor.
>
> Signed-off-by: Chen-Yu Tsai <[email protected]>
I had a chat with Doug at Plumbers about the limitations of your
firmware. As a result, I am fine with acking this if you switch the
order of the sku compatibles to be in descending order.
The firmware can handle that, right?
Cheers,
Conor.
> ---
> .../devicetree/bindings/arm/mediatek.yaml | 26 +++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> index 60337b439744..aa7e6734b336 100644
> --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> @@ -206,6 +206,32 @@ properties:
> - enum:
> - mediatek,mt8183-pumpkin
> - const: mediatek,mt8183
> + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> + items:
> + - const: google,tentacruel-sku262144
> + - const: google,tentacruel-sku262145
> + - const: google,tentacruel-sku262146
> + - const: google,tentacruel-sku262147
> + - const: google,tentacruel
> + - const: mediatek,mt8186
> + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> + items:
> + - const: google,tentacruel-sku262148
> + - const: google,tentacruel-sku262149
> + - const: google,tentacruel-sku262150
> + - const: google,tentacruel-sku262151
> + - const: google,tentacruel
> + - const: mediatek,mt8186
> + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> + items:
> + - const: google,tentacruel-sku327681
> + - const: google,tentacruel
> + - const: mediatek,mt8186
> + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> + items:
> + - const: google,tentacruel-sku327683
> + - const: google,tentacruel
> + - const: mediatek,mt8186
> - items:
> - enum:
> - mediatek,mt8186-evb
> --
> 2.42.0.655.g421f12c284-goog
>
On Fri, Nov 24, 2023 at 10:09 PM Conor Dooley <[email protected]> wrote:
>
> On Fri, Oct 13, 2023 at 07:02:28AM +0800, Chen-Yu Tsai wrote:
> > Add entries for MT8186 based Tentacruel / Tentacool Chromebooks. The two
> > are based on the same board design: the former is a convertible device
> > with a touchscreen, stylus, and some extra buttons; the latter is a
> > clamshell device and lacks these additional features.
> >
> > The two devices both have two variants. The difference is a second
> > source touchpad controller that shares the same address as the original,
> > but is incompatible.
> >
> > The extra SKU IDs for the Tentacruel devices map to different sensor
> > components attached to the Embedded Controller. These are not visible
> > to the main processor.
> >
> > Signed-off-by: Chen-Yu Tsai <[email protected]>
>
> I had a chat with Doug at Plumbers about the limitations of your
> firmware. As a result, I am fine with acking this if you switch the
> order of the sku compatibles to be in descending order.
Thank you for taking the effort to understand our weird firmware
implementation. And a thank you to Doug for discussing this. I'll
send out the next version shortly.
> The firmware can handle that, right?
Yes. The firmware basically takes a list of machine compatibles, and
runs them against all the DTs it has with of_machine_is_compatible().
Thanks
ChenYu
>
> Cheers,
> Conor.
>
> > ---
> > .../devicetree/bindings/arm/mediatek.yaml | 26 +++++++++++++++++++
> > 1 file changed, 26 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > index 60337b439744..aa7e6734b336 100644
> > --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> > +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > @@ -206,6 +206,32 @@ properties:
> > - enum:
> > - mediatek,mt8183-pumpkin
> > - const: mediatek,mt8183
> > + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> > + items:
> > + - const: google,tentacruel-sku262144
> > + - const: google,tentacruel-sku262145
> > + - const: google,tentacruel-sku262146
> > + - const: google,tentacruel-sku262147
> > + - const: google,tentacruel
> > + - const: mediatek,mt8186
> > + - description: Google Tentacruel (ASUS Chromebook CM14 Flip CM1402F)
> > + items:
> > + - const: google,tentacruel-sku262148
> > + - const: google,tentacruel-sku262149
> > + - const: google,tentacruel-sku262150
> > + - const: google,tentacruel-sku262151
> > + - const: google,tentacruel
> > + - const: mediatek,mt8186
> > + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> > + items:
> > + - const: google,tentacruel-sku327681
> > + - const: google,tentacruel
> > + - const: mediatek,mt8186
> > + - description: Google Tentacool (ASUS Chromebook CM14 CM1402C)
> > + items:
> > + - const: google,tentacruel-sku327683
> > + - const: google,tentacruel
> > + - const: mediatek,mt8186
> > - items:
> > - enum:
> > - mediatek,mt8186-evb
> > --
> > 2.42.0.655.g421f12c284-goog
> >
On Mon, Oct 16, 2023 at 4:36 PM Eugen Hristev
<[email protected]> wrote:
>
> On 10/13/23 02:02, Chen-Yu Tsai wrote:
> > The MT8186 Steelix, also known as the Lenovo 300e Yoga Chromebook Gen 4,
> > is a convertible device based on a common design of the same name. The
> > device comes in different variants. Of them, whether a world facing
> > camera is integrated is the only differentiating factor between the
> > two device trees added. The different SKU IDs describe this alone.
> >
> > The other device difference is the touchpad component used. This is
> > simply handled by having both possible components described in the
> > device tree, and letting the implementation figure out which one is
> > actually available. The system bootloader / firmware does not
> > differentiate this in that they share the same SKU IDs.
> >
> > Signed-off-by: Chen-Yu Tsai <[email protected]>
> > ---
> > arch/arm64/boot/dts/mediatek/Makefile | 2 +
> > .../mt8186-corsola-steelix-sku131072.dts | 18 ++
> > .../mt8186-corsola-steelix-sku131073.dts | 18 ++
> > .../dts/mediatek/mt8186-corsola-steelix.dtsi | 197 ++++++++++++++++++
> > 4 files changed, 235 insertions(+)
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131072.dts
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix-sku131073.dts
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi
> >
[...]
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi
> > new file mode 100644
> > index 000000000000..8488f2f9dc4d
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-steelix.dtsi
> > @@ -0,0 +1,197 @@
[...]
> > +&i2c2 {
> > + i2c-scl-internal-delay-ns = <22000>;
> > +
> > + /* second source component */
> > + touchpad@2c {
> > + compatible = "hid-over-i2c";
> > + reg = <0x2c>;
> > + hid-descr-addr = <0x20>;
> > + interrupts-extended = <&pio 11 IRQ_TYPE_LEVEL_LOW>;
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&trackpad_pin>;
> > + vdd-supply = <&pp3300_s3>;
> > + wakeup-source;
> > + };
>
> Hi Chen-Yu,
>
> This is not okay, the `trackpad_pin` is shared with touchpad@15 , and if
> drivers are probed in parallel , this can lead to a conflict on this pin
> (GPIO11)
You're right. I've moved it under i2c2 for now, as we do for other platforms
with second source components.
This should hopefully be cleaned up once we have a hardware prober.
ChenYu
On Mon, Oct 23, 2023 at 5:05 PM Eugen Hristev
<[email protected]> wrote:
>
> On 10/13/23 02:02, Chen-Yu Tsai wrote:
> > Tentacruel and Tentacool are MT8186 based Chromebooks based on the
> > Krabby design.
> >
> > Tentacruel, also known as the ASUS Chromebook CM14 Flip CM1402F, is a
> > convertible device with touchscreen and stylus.
> >
> > Tentacool, also known as the ASUS Chromebook CM14 CM1402C, is a laptop
> > device. It does not have a touchscreen or stylus.
> >
> > The two devices both have two variants. The difference is a second
> > source touchpad controller that shares the same address as the original,
> > but is incompatible.
> >
> > The extra SKU IDs for the Tentacruel devices map to different sensor
> > components attached to the Embedded Controller. These are not visible
> > to the main processor.
> >
> > Signed-off-by: Chen-Yu Tsai <[email protected]>
> > ---
> > arch/arm64/boot/dts/mediatek/Makefile | 4 +
> > .../dts/mediatek/mt8186-corsola-krabby.dtsi | 130 ++
> > .../mt8186-corsola-tentacool-sku327681.dts | 49 +
> > .../mt8186-corsola-tentacool-sku327683.dts | 26 +
> > .../mt8186-corsola-tentacruel-sku262144.dts | 44 +
> > .../mt8186-corsola-tentacruel-sku262148.dts | 28 +
> > .../boot/dts/mediatek/mt8186-corsola.dtsi | 1704 +++++++++++++++++
> > 7 files changed, 1985 insertions(+)
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
> > create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
> >
[...]
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
> > new file mode 100644
> > index 000000000000..42ebab1bafeb
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
> > @@ -0,0 +1,1704 @@
[...]
>
> Hi Chen-Yu,
>
> These two aud_gpio_tdm empty entries cause this message to be printed:
>
> [ 12.949519] mt8186_mt6366_rt1019_rt5682s sound: there is not valid
> maps for state aud_gpio_tdm_off
> [ 12.959025] mt8186_mt6366_rt1019_rt5682s sound: there is not valid
> maps for state aud_gpio_tdm_on
I guess we need to teach the sound driver to ignore empty pinmux states?
ChenYu
Il 27/11/23 05:00, Chen-Yu Tsai ha scritto:
> On Mon, Oct 23, 2023 at 5:05 PM Eugen Hristev
> <[email protected]> wrote:
>>
>> On 10/13/23 02:02, Chen-Yu Tsai wrote:
>>> Tentacruel and Tentacool are MT8186 based Chromebooks based on the
>>> Krabby design.
>>>
>>> Tentacruel, also known as the ASUS Chromebook CM14 Flip CM1402F, is a
>>> convertible device with touchscreen and stylus.
>>>
>>> Tentacool, also known as the ASUS Chromebook CM14 CM1402C, is a laptop
>>> device. It does not have a touchscreen or stylus.
>>>
>>> The two devices both have two variants. The difference is a second
>>> source touchpad controller that shares the same address as the original,
>>> but is incompatible.
>>>
>>> The extra SKU IDs for the Tentacruel devices map to different sensor
>>> components attached to the Embedded Controller. These are not visible
>>> to the main processor.
>>>
>>> Signed-off-by: Chen-Yu Tsai <[email protected]>
>>> ---
>>> arch/arm64/boot/dts/mediatek/Makefile | 4 +
>>> .../dts/mediatek/mt8186-corsola-krabby.dtsi | 130 ++
>>> .../mt8186-corsola-tentacool-sku327681.dts | 49 +
>>> .../mt8186-corsola-tentacool-sku327683.dts | 26 +
>>> .../mt8186-corsola-tentacruel-sku262144.dts | 44 +
>>> .../mt8186-corsola-tentacruel-sku262148.dts | 28 +
>>> .../boot/dts/mediatek/mt8186-corsola.dtsi | 1704 +++++++++++++++++
>>> 7 files changed, 1985 insertions(+)
>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
>>>
>
> [...]
>
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
>>> new file mode 100644
>>> index 000000000000..42ebab1bafeb
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
>>> @@ -0,0 +1,1704 @@
>
> [...]
>
>>
>> Hi Chen-Yu,
>>
>> These two aud_gpio_tdm empty entries cause this message to be printed:
>>
>> [ 12.949519] mt8186_mt6366_rt1019_rt5682s sound: there is not valid
>> maps for state aud_gpio_tdm_off
>> [ 12.959025] mt8186_mt6366_rt1019_rt5682s sound: there is not valid
>> maps for state aud_gpio_tdm_on
>
> I guess we need to teach the sound driver to ignore empty pinmux states?
...and we need to teach to the bindings that the aud_gpio_tdm_{off,on} are
optional states and can be omitted.
Cheers,
Angelo
>
> ChenYu
On 11/27/23 15:05, AngeloGioacchino Del Regno wrote:
> Il 27/11/23 05:00, Chen-Yu Tsai ha scritto:
>> On Mon, Oct 23, 2023 at 5:05 PM Eugen Hristev
>> <[email protected]> wrote:
>>>
>>> On 10/13/23 02:02, Chen-Yu Tsai wrote:
>>>> Tentacruel and Tentacool are MT8186 based Chromebooks based on the
>>>> Krabby design.
>>>>
>>>> Tentacruel, also known as the ASUS Chromebook CM14 Flip CM1402F, is a
>>>> convertible device with touchscreen and stylus.
>>>>
>>>> Tentacool, also known as the ASUS Chromebook CM14 CM1402C, is a laptop
>>>> device. It does not have a touchscreen or stylus.
>>>>
>>>> The two devices both have two variants. The difference is a second
>>>> source touchpad controller that shares the same address as the original,
>>>> but is incompatible.
>>>>
>>>> The extra SKU IDs for the Tentacruel devices map to different sensor
>>>> components attached to the Embedded Controller. These are not visible
>>>> to the main processor.
>>>>
>>>> Signed-off-by: Chen-Yu Tsai <[email protected]>
>>>> ---
>>>> arch/arm64/boot/dts/mediatek/Makefile | 4 +
>>>> .../dts/mediatek/mt8186-corsola-krabby.dtsi | 130 ++
>>>> .../mt8186-corsola-tentacool-sku327681.dts | 49 +
>>>> .../mt8186-corsola-tentacool-sku327683.dts | 26 +
>>>> .../mt8186-corsola-tentacruel-sku262144.dts | 44 +
>>>> .../mt8186-corsola-tentacruel-sku262148.dts | 28 +
>>>> .../boot/dts/mediatek/mt8186-corsola.dtsi | 1704 +++++++++++++++++
>>>> 7 files changed, 1985 insertions(+)
>>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-krabby.dtsi
>>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327681.dts
>>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacool-sku327683.dts
>>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262144.dts
>>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-tentacruel-sku262148.dts
>>>> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
>>>>
>>
>> [...]
>>
>>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
>>>> new file mode 100644
>>>> index 000000000000..42ebab1bafeb
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
>>>> @@ -0,0 +1,1704 @@
>>
>> [...]
>>
>>>
>>> Hi Chen-Yu,
>>>
>>> These two aud_gpio_tdm empty entries cause this message to be printed:
>>>
>>> [ 12.949519] mt8186_mt6366_rt1019_rt5682s sound: there is not valid
>>> maps for state aud_gpio_tdm_off
>>> [ 12.959025] mt8186_mt6366_rt1019_rt5682s sound: there is not valid
>>> maps for state aud_gpio_tdm_on
>>
>> I guess we need to teach the sound driver to ignore empty pinmux states?
>
> ...and we need to teach to the bindings that the aud_gpio_tdm_{off,on} are
> optional states and can be omitted.
Hello Angelo,
The binding does not appear to specify any required states. Am I getting this
wrong? Hence, we can just remove these states from the DT node.
Hello Chen-Yu,
The error message comes from the pinctrl, from dt_to_map_one_config() .
I believe we can safely just remove these two if corsola device does not use TDM.
From my perspective it is pointless to have two empty pinctrl states just for the
sake of it if there are no pins involved.
Please correct me if you have more knowledge about it.
Thanks,
Eugen
>
> Cheers,
> Angelo
>
>>
>> ChenYu
>
>
>