lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bbf023c7-f08b-4f9d-8770-08e63074fb4c@collabora.com>
Date: Thu, 26 Sep 2024 11:27:30 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Albert Jakieła <jakiela@...gle.com>, robh@...nel.org,
 krzk+dt@...nel.org, conor+dt@...nel.org, matthias.bgg@...il.com,
 wenst@...omium.org, rafal@...ecki.pl, hsinyi@...omium.org,
 nfraprado@...labora.com, macpaul.lin@...iatek.com, sean.wang@...iatek.com
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH 2/2] arm64: dts: mediate: Introduce MT8186
 Chinchou/Chinchou360 Chromebooks

Il 25/09/24 10:03, Albert Jakieła ha scritto:
> The MT8186 Chinchou/Chinchou360, also known as the Asus Chromebook
> CZ12/CZ11 Flip, is a clamshell or convertible device with touchscreen,
> stylus and extra buttons.
> 
> Signed-off-by: Albert Jakieła <jakiela@...gle.com>
> ---
>   arch/arm64/boot/dts/mediatek/Makefile         |   3 +
>   .../mediatek/mt8186-corsola-chinchou-sku0.dts |  18 +
>   .../mediatek/mt8186-corsola-chinchou-sku1.dts |  34 ++
>   .../mt8186-corsola-chinchou-sku16.dts         |  28 ++
>   .../dts/mediatek/mt8186-corsola-chinchou.dtsi | 445 ++++++++++++++++++
>   5 files changed, 528 insertions(+)
>   create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku0.dts
>   create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku1.dts
>   create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku16.dts
>   create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou.dtsi
> 
> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
> index 8fd7b2bb7a15..0db7770e8907 100644
> --- a/arch/arm64/boot/dts/mediatek/Makefile
> +++ b/arch/arm64/boot/dts/mediatek/Makefile
> @@ -55,6 +55,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-chinchou-sku0.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-chinchou-sku1.dtb
> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-corsola-chinchou-sku16.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
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku0.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku0.dts
> new file mode 100644
> index 000000000000..29dd92318da1
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku0.dts
> @@ -0,0 +1,18 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2023 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola-chinchou.dtsi"
> +
> +/ {
> +	model = "Google chinchou sku0 board";
> +	compatible = "google,chinchou-sku0", "google,chinchou-sku2",
> +			"google,chinchou-sku4", "google,chinchou-sku5",
> +			"google,chinchou", "mediatek,mt8186";
> +};
> +
> +&gpio_keys {
> +	status = "disabled";
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku1.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku1.dts
> new file mode 100644
> index 000000000000..8ba31f81d9ad
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku1.dts
> @@ -0,0 +1,34 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2023 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola-chinchou.dtsi"
> +
> +/ {
> +	model = "Google chinchou sku1/sku17 board";
> +	compatible = "google,chinchou-sku1", "google,chinchou-sku17",
> +			"google,chinchou-sku3", "google,chinchou-sku6",
> +			"google,chinchou-sku7", "google,chinchou-sku20",
> +			"google,chinchou-sku22", "google,chinchou-sku23",
> +			"mediatek,mt8186";
> +};
> +
> +&i2c1 {
> +	i2c-scl-internal-delay-ns = <10000>;
> +
> +	touchscreen: touchscreen@41 {
> +		compatible = "ilitek,ili2901";
> +		reg = <0x41>;
> +		interrupts-extended = <&pio 12 IRQ_TYPE_LEVEL_LOW>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&touchscreen_pins>;
> +		reset-gpios = <&pio 60 GPIO_ACTIVE_LOW>;
> +		vccio-supply = <&pp1800_tchscr_report_disable>;
> +	};
> +};
> +
> +&gpio_keys {
> +	status = "disabled";
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku16.dts b/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku16.dts
> new file mode 100644
> index 000000000000..d3378d7ad096
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou-sku16.dts
> @@ -0,0 +1,28 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright 2023 Google LLC
> + */
> +
> +/dts-v1/;
> +#include "mt8186-corsola-chinchou.dtsi"
> +
> +/ {
> +	model = "Google chinchou sku16/sku2147483647 board";
> +	compatible = "google,chinchou-sku16", "google,chinchou-sku18",
> +			"google,chinchou-sku19", "google,chinchou-sku21",
> +			"google,chinchou-sku2147483647", "mediatek,mt8186";
> +};
> +
> +&i2c1 {
> +	i2c-scl-internal-delay-ns = <10000>;
> +
> +	touchscreen: touchscreen@41 {
> +		compatible = "ilitek,ili2901";
> +		reg = <0x41>;
> +		interrupts-extended = <&pio 12 IRQ_TYPE_LEVEL_LOW>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&touchscreen_pins>;
> +		reset-gpios = <&pio 60 GPIO_ACTIVE_LOW>;
> +		vccio-supply = <&pp1800_tchscr_report_disable>;
> +	};
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou.dtsi
> new file mode 100644
> index 000000000000..c77cc43f8442
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola-chinchou.dtsi

..snip..

> +
> +&mmc1_pins_default {
> +	pins-clk {
> +		drive-strength = <MTK_DRIVE_8mA>;

Please stop using the meaningless MTK_DRIVE_(x)mA macro.

drive-strength = <8>; is enough :-)

Cheers,
Angelo

> +	};
> +
> +	pins-cmd-dat {
> +		drive-strength = <MTK_DRIVE_8mA>;
> +	};
> +};
> +
> +&mmc1_pins_uhs {
> +	pins-clk {
> +		drive-strength = <MTK_DRIVE_8mA>;
> +	};
> +
> +	pins-cmd-dat {
> +		drive-strength = <MTK_DRIVE_8mA>;
> +	};
> +};
> +
> +&sound {
> +	status = "okay";
> +
> +	compatible = "mediatek,mt8186-mt6366-rt5650-sound";

You don't need to change this compatible, as the only thing that changes in the
actual driver are the dapm_routes. I implemented support for that nice dai-link
(standard, kind of) graph so that we stop getting a thousand compatibles for no
reason other than routing :-)

This should work with (99.9% confident it will, but please test):

	model = "mt8186_rt5650";
	status = "okay";

> +	mediatek,adsp = <&adsp>;

This property is already set in the node that you're inheriting from
mt8186-corsola.dtsi, please drop.

> +
> +	audio-routing =
> +		"Headphone", "HPOL",
> +		"Headphone", "HPOR",
> +		"HDMI1", "TX";
> +
> +	hs-playback-dai-link {
> +		codec {
> +			sound-dai = <&rt5650>;
> +		};
> +	};
> +
> +	hs-capture-dai-link {
> +		codec {
> +			sound-dai = <&rt5650>;
> +		};
> +	};
> +
> +	spk-share-dai-link {
> +	};

Empty nodes are meaningless (and you're inheriting this dai link from
mt8186-corsola.dtsi as well). Drop.

> +
> +	spk-hdmi-playback-dai-link {
> +		codec {
> +			sound-dai = <&it6505dptx>;
> +		};
> +	};
> +};
> +
> +&wifi_enable_pin {
> +	pins-wifi-enable {
> +		pinmux = <PINMUX_GPIO51__FUNC_GPIO51>;
> +	};
> +};
> +
> +&wifi_pwrseq {
> +	reset-gpios = <&pio 51 GPIO_ACTIVE_LOW>;
> +};
> +

..snip..

> +
> +&pen_insert {
> +	wakeup-event-action = <EV_ACT_ANY>;

Why is this set to EV_ACT_ANY on Chinchou but not on the other Corsola devices?
Is there any specific reason?

Cheers,
Angelo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ