linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] MT8192 Asurada devicetree - Part 2
@ 2022-10-06 21:25 Nícolas F. R. A. Prado
  2022-10-06 21:25 ` [PATCH v2 1/5] arm64: dts: mediatek: asurada: Add display regulators Nícolas F. R. A. Prado
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-10-06 21:25 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: kernel, Chen-Yu Tsai, AngeloGioacchino Del Regno,
	Nícolas F. R. A. Prado, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-mediatek


This series improves some more the support for MT8192 Asurada-based
Chromebooks, by enabling some missing functionality, namely the internal
display and audio.

In addition to that, aliases are also added for the i2c and mmc nodes,
which should've been done while adding the devices in the previous
series.

Some notable components that are still missing support are:
- external display/HDMI audio (waiting for [1])
- GPU (waiting for [2])

As part of testing the audio, an UCM file was used, which has already
been submitted upstream [3] (note that while that UCM configures HDMI,
kernel support for HDMI audio will be added in a future series).

[1] https://lore.kernel.org/all/20220622173605.1168416-1-pmalani@chromium.org/
[2] https://lore.kernel.org/all/20221006115816.66853-1-angelogioacchino.delregno@collabora.com
[3] https://github.com/alsa-project/alsa-ucm-conf/pull/217

v1: https://lore.kernel.org/all/20220908171153.670762-1-nfraprado@collabora.com/

Changes in v2:
- Extended series to also include patches 4 and 5 enabling audio and
  adding aliases
- Adjusted display regulator hierarchy and voltages to reflect the
  hardware

Nícolas F. R. A. Prado (5):
  arm64: dts: mediatek: asurada: Add display regulators
  arm64: dts: mediatek: asurada: Add display backlight
  arm64: dts: mediatek: asurada: Enable internal display
  arm64: dts: mediatek: asurada: Enable audio support
  arm64: dts: mediatek: asurada: Add aliases for i2c and mmc

 .../boot/dts/mediatek/mt8192-asurada.dtsi     | 507 ++++++++++++++++++
 1 file changed, 507 insertions(+)

-- 
2.37.3


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 1/5] arm64: dts: mediatek: asurada: Add display regulators
  2022-10-06 21:25 [PATCH v2 0/5] MT8192 Asurada devicetree - Part 2 Nícolas F. R. A. Prado
@ 2022-10-06 21:25 ` Nícolas F. R. A. Prado
  2022-10-07  8:56   ` AngeloGioacchino Del Regno
  2022-10-06 21:25 ` [PATCH v2 2/5] arm64: dts: mediatek: asurada: Add display backlight Nícolas F. R. A. Prado
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 17+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-10-06 21:25 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: kernel, Chen-Yu Tsai, AngeloGioacchino Del Regno,
	Nícolas F. R. A. Prado, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-mediatek

Add the regulators present on the Asurada platform that are used to
power the internal and external displays.

Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

---

Changes in v2:
- Added missing vin-supply to regulators
- Removed min/max-microvolt from regulators that are simple switches

 .../boot/dts/mediatek/mt8192-asurada.dtsi     | 112 ++++++++++++++++++
 1 file changed, 112 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
index 4b314435f8fd..fafca7428539 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
@@ -23,6 +23,43 @@ memory@40000000 {
 		reg = <0 0x40000000 0 0x80000000>;
 	};
 
+	pp1000_dpbrdg: regulator-1v0-dpbrdg {
+		compatible = "regulator-fixed";
+		regulator-name = "pp1000_dpbrdg";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pp1000_dpbrdg_en_pins>;
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1000000>;
+		enable-active-high;
+		regulator-boot-on;
+		gpio = <&pio 19 GPIO_ACTIVE_HIGH>;
+		vin-supply = <&mt6359_vs2_buck_reg>;
+	};
+
+	pp1000_mipibrdg: regulator-1v0-mipibrdg {
+		compatible = "regulator-fixed";
+		regulator-name = "pp1000_mipibrdg";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pp1000_mipibrdg_en_pins>;
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1000000>;
+		enable-active-high;
+		regulator-boot-on;
+		gpio = <&pio 129 GPIO_ACTIVE_HIGH>;
+		vin-supply = <&mt6359_vs2_buck_reg>;
+	};
+
+	pp1800_dpbrdg: regulator-1v8-dpbrdg {
+		compatible = "regulator-fixed";
+		regulator-name = "pp1800_dpbrdg";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pp1800_dpbrdg_en_pins>;
+		enable-active-high;
+		regulator-boot-on;
+		gpio = <&pio 126 GPIO_ACTIVE_HIGH>;
+		vin-supply = <&mt6359_vio18_ldo_reg>;
+	};
+
 	/* system wide LDO 1.8V power rail */
 	pp1800_ldo_g: regulator-1v8-g {
 		compatible = "regulator-fixed";
@@ -34,6 +71,28 @@ pp1800_ldo_g: regulator-1v8-g {
 		vin-supply = <&pp3300_g>;
 	};
 
+	pp1800_mipibrdg: regulator-1v8-mipibrdg {
+		compatible = "regulator-fixed";
+		regulator-name = "pp1800_mipibrdg";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pp1800_mipibrdg_en_pins>;
+		enable-active-high;
+		regulator-boot-on;
+		gpio = <&pio 128 GPIO_ACTIVE_HIGH>;
+		vin-supply = <&mt6359_vio18_ldo_reg>;
+	};
+
+	pp3300_dpbrdg: regulator-3v3-dpbrdg {
+		compatible = "regulator-fixed";
+		regulator-name = "pp3300_dpbrdg";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pp3300_dpbrdg_en_pins>;
+		enable-active-high;
+		regulator-boot-on;
+		gpio = <&pio 26 GPIO_ACTIVE_HIGH>;
+		vin-supply = <&pp3300_g>;
+	};
+
 	/* system wide switching 3.3V power rail */
 	pp3300_g: regulator-3v3-g {
 		compatible = "regulator-fixed";
@@ -56,6 +115,17 @@ pp3300_ldo_z: regulator-3v3-z {
 		vin-supply = <&ppvar_sys>;
 	};
 
+	pp3300_mipibrdg: regulator-3v3-mipibrdg {
+		compatible = "regulator-fixed";
+		regulator-name = "pp3300_mipibrdg";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pp3300_mipibrdg_en_pins>;
+		enable-active-high;
+		regulator-boot-on;
+		gpio = <&pio 127 GPIO_ACTIVE_HIGH>;
+		vin-supply = <&pp3300_g>;
+	};
+
 	/* separately switched 3.3V power rail */
 	pp3300_u: regulator-3v3-u {
 		compatible = "regulator-fixed";
@@ -719,6 +789,48 @@ pins-wifi-kill {
 		};
 	};
 
+	pp1000_dpbrdg_en_pins: pp1000-dpbrdg-en-pins {
+		pins-en {
+			pinmux = <PINMUX_GPIO19__FUNC_GPIO19>;
+			output-low;
+		};
+	};
+
+	pp1000_mipibrdg_en_pins: pp1000-mipibrdg-en-pins {
+		pins-en {
+			pinmux = <PINMUX_GPIO129__FUNC_GPIO129>;
+			output-low;
+		};
+	};
+
+	pp1800_dpbrdg_en_pins: pp1800-dpbrdg-en-pins {
+		pins-en {
+			pinmux = <PINMUX_GPIO126__FUNC_GPIO126>;
+			output-low;
+		};
+	};
+
+	pp1800_mipibrdg_en_pins: pp1800-mipibrd-en-pins {
+		pins-en {
+			pinmux = <PINMUX_GPIO128__FUNC_GPIO128>;
+			output-low;
+		};
+	};
+
+	pp3300_dpbrdg_en_pins: pp3300-dpbrdg-en-pins {
+		pins-en {
+			pinmux = <PINMUX_GPIO26__FUNC_GPIO26>;
+			output-low;
+		};
+	};
+
+	pp3300_mipibrdg_en_pins: pp3300-mipibrdg-en-pins {
+		pins-en {
+			pinmux = <PINMUX_GPIO127__FUNC_GPIO127>;
+			output-low;
+		};
+	};
+
 	pp3300_wlan_pins: pp3300-wlan-pins {
 		pins-pcie-en-pp3300-wlan {
 			pinmux = <PINMUX_GPIO143__FUNC_GPIO143>;
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 2/5] arm64: dts: mediatek: asurada: Add display backlight
  2022-10-06 21:25 [PATCH v2 0/5] MT8192 Asurada devicetree - Part 2 Nícolas F. R. A. Prado
  2022-10-06 21:25 ` [PATCH v2 1/5] arm64: dts: mediatek: asurada: Add display regulators Nícolas F. R. A. Prado
@ 2022-10-06 21:25 ` Nícolas F. R. A. Prado
  2022-10-06 21:25 ` [PATCH v2 3/5] arm64: dts: mediatek: asurada: Enable internal display Nícolas F. R. A. Prado
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 17+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-10-06 21:25 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: kernel, Chen-Yu Tsai, AngeloGioacchino Del Regno,
	Nícolas F. R. A. Prado, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-mediatek

Add the display backlight for the Asurada platform. It relies on the
display PWM controller, so also enable and configure this component.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---

(no changes since v1)

 .../boot/dts/mediatek/mt8192-asurada.dtsi     | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
index fafca7428539..666021ca4d4f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
@@ -23,6 +23,16 @@ memory@40000000 {
 		reg = <0 0x40000000 0 0x80000000>;
 	};
 
+	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>;
+	};
+
 	pp1000_dpbrdg: regulator-1v0-dpbrdg {
 		compatible = "regulator-fixed";
 		regulator-name = "pp1000_dpbrdg";
@@ -838,6 +848,17 @@ pins-pcie-en-pp3300-wlan {
 		};
 	};
 
+	pwm0_pins: pwm0-default-pins {
+		pins-pwm {
+			pinmux = <PINMUX_GPIO40__FUNC_DISP_PWM>;
+		};
+
+		pins-inhibit {
+			pinmux = <PINMUX_GPIO152__FUNC_GPIO152>;
+			output-high;
+		};
+	};
+
 	scp_pins: scp-pins {
 		pins-vreq-vao {
 			pinmux = <PINMUX_GPIO195__FUNC_SCP_VREQ_VAO>;
@@ -899,6 +920,13 @@ &pmic {
 	interrupts-extended = <&pio 214 IRQ_TYPE_LEVEL_HIGH>;
 };
 
+&pwm0 {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm0_pins>;
+};
+
 &scp {
 	status = "okay";
 
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 3/5] arm64: dts: mediatek: asurada: Enable internal display
  2022-10-06 21:25 [PATCH v2 0/5] MT8192 Asurada devicetree - Part 2 Nícolas F. R. A. Prado
  2022-10-06 21:25 ` [PATCH v2 1/5] arm64: dts: mediatek: asurada: Add display regulators Nícolas F. R. A. Prado
  2022-10-06 21:25 ` [PATCH v2 2/5] arm64: dts: mediatek: asurada: Add display backlight Nícolas F. R. A. Prado
@ 2022-10-06 21:25 ` Nícolas F. R. A. Prado
  2022-10-07  8:56   ` AngeloGioacchino Del Regno
  2022-10-06 21:25 ` [PATCH v2 4/5] arm64: dts: mediatek: asurada: Enable audio support Nícolas F. R. A. Prado
  2022-10-06 21:25 ` [PATCH v2 5/5] arm64: dts: mediatek: asurada: Add aliases for i2c and mmc Nícolas F. R. A. Prado
  4 siblings, 1 reply; 17+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-10-06 21:25 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: kernel, Chen-Yu Tsai, AngeloGioacchino Del Regno,
	Nícolas F. R. A. Prado, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-mediatek

The asurada platform has an ANX7625 bridge connecting the DSI's output
to the internal eDP panel. Add and enable these devices in order to get
a usable internal display.

Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---

(no changes since v1)

 .../boot/dts/mediatek/mt8192-asurada.dtsi     | 73 +++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
index 666021ca4d4f..ace44827de17 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
@@ -198,6 +198,14 @@ wifi_restricted_dma_region: wifi@c0000000 {
 	};
 };
 
+&dsi0 {
+	status = "okay";
+};
+
+&dsi_out {
+	remote-endpoint = <&anx7625_in>;
+};
+
 &i2c0 {
 	status = "okay";
 
@@ -246,6 +254,53 @@ &i2c3 {
 	clock-frequency = <400000>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c3_pins>;
+
+	anx_bridge: anx7625@58 {
+		compatible = "analogix,anx7625";
+		reg = <0x58>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&anx7625_pins>;
+		enable-gpios = <&pio 41 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&pio 42 GPIO_ACTIVE_HIGH>;
+		vdd10-supply = <&pp1000_mipibrdg>;
+		vdd18-supply = <&pp1800_mipibrdg>;
+		vdd33-supply = <&pp3300_mipibrdg>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				anx7625_in: endpoint {
+					remote-endpoint = <&dsi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				anx7625_out: endpoint {
+					remote-endpoint = <&panel_in>;
+				};
+			};
+		};
+
+		aux-bus {
+			panel: panel {
+				compatible = "edp-panel";
+				power-supply = <&pp3300_mipibrdg>;
+				backlight = <&backlight_lcd0>;
+
+				port {
+					panel_in: endpoint {
+						remote-endpoint = <&anx7625_out>;
+					};
+				};
+			};
+		};
+	};
 };
 
 &i2c7 {
@@ -256,6 +311,10 @@ &i2c7 {
 	pinctrl-0 = <&i2c7_pins>;
 };
 
+&mipi_tx0 {
+	status = "okay";
+};
+
 &mmc0 {
 	status = "okay";
 
@@ -587,6 +646,20 @@ &pio {
 			  "AUD_DAT_MISO0",
 			  "AUD_DAT_MISO1";
 
+	anx7625_pins: anx7625-default-pins {
+		pins-out {
+			pinmux = <PINMUX_GPIO41__FUNC_GPIO41>,
+				 <PINMUX_GPIO42__FUNC_GPIO42>;
+			output-low;
+		};
+
+		pins-in {
+			pinmux = <PINMUX_GPIO6__FUNC_GPIO6>;
+			input-enable;
+			bias-pull-up;
+		};
+	};
+
 	cr50_int: cr50-irq-default-pins {
 		pins-gsc-ap-int-odl {
 			pinmux = <PINMUX_GPIO171__FUNC_GPIO171>;
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 4/5] arm64: dts: mediatek: asurada: Enable audio support
  2022-10-06 21:25 [PATCH v2 0/5] MT8192 Asurada devicetree - Part 2 Nícolas F. R. A. Prado
                   ` (2 preceding siblings ...)
  2022-10-06 21:25 ` [PATCH v2 3/5] arm64: dts: mediatek: asurada: Enable internal display Nícolas F. R. A. Prado
@ 2022-10-06 21:25 ` Nícolas F. R. A. Prado
  2022-10-07  5:31   ` Chen-Yu Tsai
  2022-10-07  6:53   ` Chen-Yu Tsai
  2022-10-06 21:25 ` [PATCH v2 5/5] arm64: dts: mediatek: asurada: Add aliases for i2c and mmc Nícolas F. R. A. Prado
  4 siblings, 2 replies; 17+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-10-06 21:25 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: kernel, Chen-Yu Tsai, AngeloGioacchino Del Regno,
	Nícolas F. R. A. Prado, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-mediatek

Enable audio support for the Asurada platform. This consists of the
machine sound card, the rt1015p codec for the speakers, the rt5682 codec
for the headset, and the dmic codec for the internal microphone.

HDMI audio support is left out for now since the DisplayPort chip
required isn't enabled yet.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

---

Changes in v2:
- Added this commit

 .../boot/dts/mediatek/mt8192-asurada.dtsi     | 282 ++++++++++++++++++
 1 file changed, 282 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
index ace44827de17..dac2d4f5e670 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
@@ -33,6 +33,12 @@ backlight_lcd0: backlight-lcd0 {
 		default-brightness-level = <576>;
 	};
 
+	dmic_codec: dmic-codec {
+		compatible = "dmic-codec";
+		num-channels = <2>;
+		wakeup-delay-ms = <50>;
+	};
+
 	pp1000_dpbrdg: regulator-1v0-dpbrdg {
 		compatible = "regulator-fixed";
 		regulator-name = "pp1000_dpbrdg";
@@ -196,6 +202,79 @@ wifi_restricted_dma_region: wifi@c0000000 {
 			reg = <0 0xc0000000 0 0x4000000>;
 		};
 	};
+
+	rt1015p: rt1015p {
+		compatible = "realtek,rt1015p";
+		pinctrl-names = "default";
+		pinctrl-0 = <&rt1015p_pins>;
+		sdb-gpios = <&pio 147 GPIO_ACTIVE_HIGH>;
+		#sound-dai-cells = <0>;
+	};
+
+	sound: mt8192-sound {
+		compatible = "mediatek,mt8192_mt6359_rt1015p_rt5682";
+		mediatek,platform = <&afe>;
+		pinctrl-names = "aud_clk_mosi_off",
+				"aud_clk_mosi_on",
+				"aud_dat_mosi_off",
+				"aud_dat_mosi_on",
+				"aud_dat_miso_off",
+				"aud_dat_miso_on",
+				"vow_dat_miso_off",
+				"vow_dat_miso_on",
+				"vow_clk_miso_off",
+				"vow_clk_miso_on",
+				"aud_nle_mosi_off",
+				"aud_nle_mosi_on",
+				"aud_dat_miso2_off",
+				"aud_dat_miso2_on",
+				"aud_gpio_i2s3_off",
+				"aud_gpio_i2s3_on",
+				"aud_gpio_i2s8_off",
+				"aud_gpio_i2s8_on",
+				"aud_gpio_i2s9_off",
+				"aud_gpio_i2s9_on",
+				"aud_dat_mosi_ch34_off",
+				"aud_dat_mosi_ch34_on",
+				"aud_dat_miso_ch34_off",
+				"aud_dat_miso_ch34_on",
+				"aud_gpio_tdm_off",
+				"aud_gpio_tdm_on";
+		pinctrl-0 = <&aud_clk_mosi_off_pins>;
+		pinctrl-1 = <&aud_clk_mosi_on_pins>;
+		pinctrl-2 = <&aud_dat_mosi_off_pins>;
+		pinctrl-3 = <&aud_dat_mosi_on_pins>;
+		pinctrl-4 = <&aud_dat_miso_off_pins>;
+		pinctrl-5 = <&aud_dat_miso_on_pins>;
+		pinctrl-6 = <&vow_dat_miso_off_pins>;
+		pinctrl-7 = <&vow_dat_miso_on_pins>;
+		pinctrl-8 = <&vow_clk_miso_off_pins>;
+		pinctrl-9 = <&vow_clk_miso_on_pins>;
+		pinctrl-10 = <&aud_nle_mosi_off_pins>;
+		pinctrl-11 = <&aud_nle_mosi_on_pins>;
+		pinctrl-12 = <&aud_dat_miso2_off_pins>;
+		pinctrl-13 = <&aud_dat_miso2_on_pins>;
+		pinctrl-14 = <&aud_gpio_i2s3_off_pins>;
+		pinctrl-15 = <&aud_gpio_i2s3_on_pins>;
+		pinctrl-16 = <&aud_gpio_i2s8_off_pins>;
+		pinctrl-17 = <&aud_gpio_i2s8_on_pins>;
+		pinctrl-18 = <&aud_gpio_i2s9_off_pins>;
+		pinctrl-19 = <&aud_gpio_i2s9_on_pins>;
+		pinctrl-20 = <&aud_dat_mosi_ch34_off_pins>;
+		pinctrl-21 = <&aud_dat_mosi_ch34_on_pins>;
+		pinctrl-22 = <&aud_dat_miso_ch34_off_pins>;
+		pinctrl-23 = <&aud_dat_miso_ch34_on_pins>;
+		pinctrl-24 = <&aud_gpio_tdm_off_pins>;
+		pinctrl-25 = <&aud_gpio_tdm_on_pins>;
+
+		headset-codec {
+		    sound-dai = <&rt5682>;
+		};
+
+		speaker-codecs {
+		    sound-dai = <&rt1015p>;
+		};
+	};
 };
 
 &dsi0 {
@@ -227,6 +306,19 @@ &i2c1 {
 	clock-frequency = <400000>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c1_pins>;
+
+	rt5682: rt5682@1a {
+		compatible = "realtek,rt5682i";
+		reg = <0x1a>;
+		interrupts-extended = <&pio 18 IRQ_TYPE_LEVEL_LOW>;
+		realtek,jd-src = <1>;
+		realtek,btndet-delay = <16>;
+		#sound-dai-cells = <0>;
+
+		AVDD-supply = <&mt6359_vio18_ldo_reg>;
+		MICVDD-supply = <&pp3300_g>;
+		VBAT-supply = <&pp3300_ldo_z>;
+	};
 };
 
 &i2c2 {
@@ -660,6 +752,165 @@ pins-in {
 		};
 	};
 
+	aud_clk_mosi_off_pins: aud-clk-mosi-off-pins {
+		pins-mosi-off {
+			pinmux = <PINMUX_GPIO214__FUNC_GPIO214>,
+				 <PINMUX_GPIO215__FUNC_GPIO215>;
+		};
+	};
+
+	aud_clk_mosi_on_pins: aud-clk-mosi-on-pins {
+		pins-mosi-on {
+			pinmux = <PINMUX_GPIO214__FUNC_AUD_CLK_MOSI>,
+				 <PINMUX_GPIO215__FUNC_AUD_SYNC_MOSI>;
+			drive-strength = <10>;
+		};
+	};
+
+	aud_dat_miso_ch34_off_pins: aud-dat-miso-ch34-off-pins {
+		pins-miso-off {
+			pinmux = <PINMUX_GPIO199__FUNC_GPIO199>;
+		};
+	};
+
+	aud_dat_miso_ch34_on_pins: aud-dat-miso-ch34-on-pins {
+		pins-miso-on {
+			pinmux = <PINMUX_GPIO199__FUNC_AUD_DAT_MISO2>;
+		};
+	};
+
+	aud_dat_miso_off_pins: aud-dat-miso-off-pins {
+		pins-miso-off {
+			pinmux = <PINMUX_GPIO218__FUNC_GPIO218>,
+				 <PINMUX_GPIO219__FUNC_GPIO219>;
+		};
+	};
+
+	aud_dat_miso_on_pins: aud-dat-miso-on-pins {
+		pins-miso-on {
+			pinmux = <PINMUX_GPIO218__FUNC_AUD_DAT_MISO0>,
+				 <PINMUX_GPIO219__FUNC_AUD_DAT_MISO1>;
+			drive-strength = <10>;
+		};
+	};
+
+	aud_dat_miso2_off_pins: aud-dat-miso2-off-pins {
+		pins-miso-off {
+			pinmux = <PINMUX_GPIO199__FUNC_GPIO199>;
+		};
+	};
+
+	aud_dat_miso2_on_pins: aud-dat-miso2-on-pins {
+		pins-miso-on {
+			pinmux = <PINMUX_GPIO199__FUNC_AUD_DAT_MISO2>;
+		};
+	};
+
+	aud_dat_mosi_ch34_off_pins: aud-dat-mosi-ch34-off-pins {
+		pins-mosi-off {
+			pinmux = <PINMUX_GPIO196__FUNC_GPIO196>;
+		};
+	};
+
+	aud_dat_mosi_ch34_on_pins: aud-dat-mosi-ch34-on-pins {
+		pins-mosi-on {
+			pinmux = <PINMUX_GPIO196__FUNC_AUD_DAT_MOSI2>;
+		};
+	};
+
+	aud_dat_mosi_off_pins: aud-dat-mosi-off-pins {
+		pins-mosi-off {
+			pinmux = <PINMUX_GPIO216__FUNC_GPIO216>,
+				 <PINMUX_GPIO217__FUNC_GPIO217>;
+		};
+	};
+
+	aud_dat_mosi_on_pins: aud-dat-mosi-on-pins {
+		pins-mosi-on {
+			pinmux = <PINMUX_GPIO216__FUNC_AUD_DAT_MOSI0>,
+				 <PINMUX_GPIO217__FUNC_AUD_DAT_MOSI1>;
+			drive-strength = <10>;
+		};
+	};
+
+	aud_gpio_i2s3_off_pins: aud-gpio-i2s3-off-pins {
+		pins-i2s3-off {
+			pinmux = <PINMUX_GPIO32__FUNC_GPIO32>,
+				 <PINMUX_GPIO33__FUNC_GPIO33>,
+				 <PINMUX_GPIO35__FUNC_GPIO35>;
+		};
+	};
+
+	aud_gpio_i2s3_on_pins: aud-gpio-i2s3-on-pins {
+		pins-i2s3-on {
+			pinmux = <PINMUX_GPIO32__FUNC_I2S3_BCK>,
+				 <PINMUX_GPIO33__FUNC_I2S3_LRCK>,
+				 <PINMUX_GPIO35__FUNC_I2S3_DO>;
+		};
+	};
+
+	aud_gpio_i2s8_off_pins: aud-gpio-i2s8-off-pins {
+		pins-i2s8-off {
+			pinmux = <PINMUX_GPIO10__FUNC_GPIO10>,
+				 <PINMUX_GPIO11__FUNC_GPIO11>,
+				 <PINMUX_GPIO12__FUNC_GPIO12>,
+				 <PINMUX_GPIO13__FUNC_GPIO13>;
+		};
+	};
+
+	aud_gpio_i2s8_on_pins: aud-gpio-i2s8-on-pins {
+		pins-i2s8-on {
+			pinmux = <PINMUX_GPIO10__FUNC_I2S8_MCK>,
+				 <PINMUX_GPIO11__FUNC_I2S8_BCK>,
+				 <PINMUX_GPIO12__FUNC_I2S8_LRCK>,
+				 <PINMUX_GPIO13__FUNC_I2S8_DI>;
+		};
+	};
+
+	aud_gpio_i2s9_off_pins: aud-gpio-i2s9-off-pins {
+		pins-i2s9-off {
+			pinmux = <PINMUX_GPIO29__FUNC_GPIO29>;
+		};
+	};
+
+	aud_gpio_i2s9_on_pins: aud-gpio-i2s9-on-pins {
+		pins-i2s9-on {
+			pinmux = <PINMUX_GPIO29__FUNC_I2S9_DO>;
+		};
+	};
+
+	aud_gpio_tdm_off_pins: aud-gpio-tdm-off-pins {
+		pins-tdm-off {
+			pinmux = <PINMUX_GPIO0__FUNC_GPIO0>,
+				 <PINMUX_GPIO1__FUNC_GPIO1>,
+				 <PINMUX_GPIO2__FUNC_GPIO2>,
+				 <PINMUX_GPIO3__FUNC_GPIO3>;
+		};
+	};
+
+	aud_gpio_tdm_on_pins: aud-gpio-tdm-on-pins {
+		pins-tdm-on {
+			pinmux = <PINMUX_GPIO0__FUNC_TDM_LRCK>,
+				 <PINMUX_GPIO1__FUNC_TDM_BCK>,
+				 <PINMUX_GPIO2__FUNC_TDM_MCK>,
+				 <PINMUX_GPIO3__FUNC_TDM_DATA0>;
+		};
+	};
+
+	aud_nle_mosi_off_pins: aud-nle-mosi-off-pins {
+		pins-nle-mosi-off {
+			pinmux = <PINMUX_GPIO197__FUNC_GPIO197>,
+				 <PINMUX_GPIO198__FUNC_GPIO198>;
+		};
+	};
+
+	aud_nle_mosi_on_pins: aud-nle-mosi-on-pins {
+		pins-nle-mosi-on {
+			pinmux = <PINMUX_GPIO197__FUNC_AUD_NLE_MOSI1>,
+				 <PINMUX_GPIO198__FUNC_AUD_NLE_MOSI0>;
+		};
+	};
+
 	cr50_int: cr50-irq-default-pins {
 		pins-gsc-ap-int-odl {
 			pinmux = <PINMUX_GPIO171__FUNC_GPIO171>;
@@ -932,6 +1183,13 @@ pins-inhibit {
 		};
 	};
 
+	rt1015p_pins: rt1015p-default-pins {
+		pins {
+			pinmux = <PINMUX_GPIO147__FUNC_GPIO147>;
+			output-low;
+		};
+	};
+
 	scp_pins: scp-pins {
 		pins-vreq-vao {
 			pinmux = <PINMUX_GPIO195__FUNC_SCP_VREQ_VAO>;
@@ -987,6 +1245,30 @@ pins-report-sw {
 			output-low;
 		};
 	};
+
+	vow_clk_miso_off_pins: vow-clk-miso-off-pins {
+		pins-miso-off {
+			pinmux = <PINMUX_GPIO219__FUNC_GPIO219>;
+		};
+	};
+
+	vow_clk_miso_on_pins: vow-clk-miso-on-pins {
+		pins-miso-on {
+			pinmux = <PINMUX_GPIO219__FUNC_VOW_CLK_MISO>;
+		};
+	};
+
+	vow_dat_miso_off_pins: vow-dat-miso-off-pins {
+		pins-miso-off {
+			pinmux = <PINMUX_GPIO218__FUNC_GPIO218>;
+		};
+	};
+
+	vow_dat_miso_on_pins: vow-dat-miso-on-pins {
+		pins-miso-on {
+			pinmux = <PINMUX_GPIO218__FUNC_VOW_DAT_MISO>;
+		};
+	};
 };
 
 &pmic {
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 5/5] arm64: dts: mediatek: asurada: Add aliases for i2c and mmc
  2022-10-06 21:25 [PATCH v2 0/5] MT8192 Asurada devicetree - Part 2 Nícolas F. R. A. Prado
                   ` (3 preceding siblings ...)
  2022-10-06 21:25 ` [PATCH v2 4/5] arm64: dts: mediatek: asurada: Enable audio support Nícolas F. R. A. Prado
@ 2022-10-06 21:25 ` Nícolas F. R. A. Prado
  2022-10-07  3:51   ` Chen-Yu Tsai
  2022-10-07  8:55   ` AngeloGioacchino Del Regno
  4 siblings, 2 replies; 17+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-10-06 21:25 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: kernel, Chen-Yu Tsai, AngeloGioacchino Del Regno,
	Nícolas F. R. A. Prado, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-mediatek

Add aliases for the i2c and mmc nodes on the Asurada platform DT to
ensure that we get stable ids for those devices on userspace.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

---

Changes in v2:
- Added this commit

 arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
index dac2d4f5e670..758ca42a6156 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
@@ -11,6 +11,18 @@
 
 / {
 	aliases {
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
+		i2c2 = &i2c2;
+		i2c3 = &i2c3;
+		i2c4 = &i2c4;
+		i2c5 = &i2c5;
+		i2c6 = &i2c6;
+		i2c7 = &i2c7;
+		i2c8 = &i2c8;
+		i2c9 = &i2c9;
+		mmc0 = &mmc0;
+		mmc1 = &mmc1;
 		serial0 = &uart0;
 	};
 
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 5/5] arm64: dts: mediatek: asurada: Add aliases for i2c and mmc
  2022-10-06 21:25 ` [PATCH v2 5/5] arm64: dts: mediatek: asurada: Add aliases for i2c and mmc Nícolas F. R. A. Prado
@ 2022-10-07  3:51   ` Chen-Yu Tsai
  2022-10-07  4:02     ` Chen-Yu Tsai
  2022-10-07  8:55   ` AngeloGioacchino Del Regno
  1 sibling, 1 reply; 17+ messages in thread
From: Chen-Yu Tsai @ 2022-10-07  3:51 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: Matthias Brugger, kernel, AngeloGioacchino Del Regno,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek

On Fri, Oct 7, 2022 at 5:25 AM Nícolas F. R. A. Prado
<nfraprado@collabora.com> wrote:
>
> Add aliases for the i2c and mmc nodes on the Asurada platform DT to
> ensure that we get stable ids for those devices on userspace.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>
> ---
>
> Changes in v2:
> - Added this commit
>
>  arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> index dac2d4f5e670..758ca42a6156 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> @@ -11,6 +11,18 @@
>
>  / {
>         aliases {
> +               i2c0 = &i2c0;
> +               i2c1 = &i2c1;
> +               i2c2 = &i2c2;
> +               i2c3 = &i2c3;
> +               i2c4 = &i2c4;
> +               i2c5 = &i2c5;
> +               i2c6 = &i2c6;
> +               i2c7 = &i2c7;
> +               i2c8 = &i2c8;
> +               i2c9 = &i2c9;

You should only add aliases for interfaces that are actually enabled.

Also, I think we can disable i2c6. None of the current products use it.

ChenYu

> +               mmc0 = &mmc0;
> +               mmc1 = &mmc1;
>                 serial0 = &uart0;
>         };
>
> --
> 2.37.3
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 5/5] arm64: dts: mediatek: asurada: Add aliases for i2c and mmc
  2022-10-07  3:51   ` Chen-Yu Tsai
@ 2022-10-07  4:02     ` Chen-Yu Tsai
  2022-10-13 20:24       ` Nícolas F. R. A. Prado
  0 siblings, 1 reply; 17+ messages in thread
From: Chen-Yu Tsai @ 2022-10-07  4:02 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: Matthias Brugger, kernel, AngeloGioacchino Del Regno,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek

On Fri, Oct 7, 2022 at 11:51 AM Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> On Fri, Oct 7, 2022 at 5:25 AM Nícolas F. R. A. Prado
> <nfraprado@collabora.com> wrote:
> >
> > Add aliases for the i2c and mmc nodes on the Asurada platform DT to
> > ensure that we get stable ids for those devices on userspace.
> >
> > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> >
> > ---
> >
> > Changes in v2:
> > - Added this commit
> >
> >  arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> > index dac2d4f5e670..758ca42a6156 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> > +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> > @@ -11,6 +11,18 @@
> >
> >  / {
> >         aliases {
> > +               i2c0 = &i2c0;
> > +               i2c1 = &i2c1;
> > +               i2c2 = &i2c2;
> > +               i2c3 = &i2c3;
> > +               i2c4 = &i2c4;
> > +               i2c5 = &i2c5;
> > +               i2c6 = &i2c6;
> > +               i2c7 = &i2c7;
> > +               i2c8 = &i2c8;
> > +               i2c9 = &i2c9;
>
> You should only add aliases for interfaces that are actually enabled.
>
> Also, I think we can disable i2c6. None of the current products use it.
>
> ChenYu
>
> > +               mmc0 = &mmc0;
> > +               mmc1 = &mmc1;

Also, Spherion does not have an SD card slot. It might be better to move
the mmc aliases to the end .dts files.

ChenYu

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 4/5] arm64: dts: mediatek: asurada: Enable audio support
  2022-10-06 21:25 ` [PATCH v2 4/5] arm64: dts: mediatek: asurada: Enable audio support Nícolas F. R. A. Prado
@ 2022-10-07  5:31   ` Chen-Yu Tsai
  2022-10-13 18:59     ` Nícolas F. R. A. Prado
  2022-10-07  6:53   ` Chen-Yu Tsai
  1 sibling, 1 reply; 17+ messages in thread
From: Chen-Yu Tsai @ 2022-10-07  5:31 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: Matthias Brugger, kernel, AngeloGioacchino Del Regno,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek

On Fri, Oct 7, 2022 at 5:25 AM Nícolas F. R. A. Prado
<nfraprado@collabora.com> wrote:
>
> Enable audio support for the Asurada platform. This consists of the
> machine sound card, the rt1015p codec for the speakers, the rt5682 codec
> for the headset, and the dmic codec for the internal microphone.

It should be noted that there's a new revision of Hayato and Spherion
that switch to using the RT5682S codec. These are mt8192-hayato-rev5-sku2.dts
and mt8192-spherion-rev4.dts in the downstream kernel.

ChenYu


> HDMI audio support is left out for now since the DisplayPort chip
> required isn't enabled yet.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>
> ---
>
> Changes in v2:
> - Added this commit
>
>  .../boot/dts/mediatek/mt8192-asurada.dtsi     | 282 ++++++++++++++++++
>  1 file changed, 282 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> index ace44827de17..dac2d4f5e670 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> @@ -33,6 +33,12 @@ backlight_lcd0: backlight-lcd0 {
>                 default-brightness-level = <576>;
>         };
>
> +       dmic_codec: dmic-codec {
> +               compatible = "dmic-codec";
> +               num-channels = <2>;
> +               wakeup-delay-ms = <50>;
> +       };
> +
>         pp1000_dpbrdg: regulator-1v0-dpbrdg {
>                 compatible = "regulator-fixed";
>                 regulator-name = "pp1000_dpbrdg";
> @@ -196,6 +202,79 @@ wifi_restricted_dma_region: wifi@c0000000 {
>                         reg = <0 0xc0000000 0 0x4000000>;
>                 };
>         };
> +
> +       rt1015p: rt1015p {
> +               compatible = "realtek,rt1015p";
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&rt1015p_pins>;
> +               sdb-gpios = <&pio 147 GPIO_ACTIVE_HIGH>;
> +               #sound-dai-cells = <0>;
> +       };
> +
> +       sound: mt8192-sound {
> +               compatible = "mediatek,mt8192_mt6359_rt1015p_rt5682";
> +               mediatek,platform = <&afe>;
> +               pinctrl-names = "aud_clk_mosi_off",
> +                               "aud_clk_mosi_on",
> +                               "aud_dat_mosi_off",
> +                               "aud_dat_mosi_on",
> +                               "aud_dat_miso_off",
> +                               "aud_dat_miso_on",
> +                               "vow_dat_miso_off",
> +                               "vow_dat_miso_on",
> +                               "vow_clk_miso_off",
> +                               "vow_clk_miso_on",
> +                               "aud_nle_mosi_off",
> +                               "aud_nle_mosi_on",
> +                               "aud_dat_miso2_off",
> +                               "aud_dat_miso2_on",
> +                               "aud_gpio_i2s3_off",
> +                               "aud_gpio_i2s3_on",
> +                               "aud_gpio_i2s8_off",
> +                               "aud_gpio_i2s8_on",
> +                               "aud_gpio_i2s9_off",
> +                               "aud_gpio_i2s9_on",
> +                               "aud_dat_mosi_ch34_off",
> +                               "aud_dat_mosi_ch34_on",
> +                               "aud_dat_miso_ch34_off",
> +                               "aud_dat_miso_ch34_on",
> +                               "aud_gpio_tdm_off",
> +                               "aud_gpio_tdm_on";
> +               pinctrl-0 = <&aud_clk_mosi_off_pins>;
> +               pinctrl-1 = <&aud_clk_mosi_on_pins>;
> +               pinctrl-2 = <&aud_dat_mosi_off_pins>;
> +               pinctrl-3 = <&aud_dat_mosi_on_pins>;
> +               pinctrl-4 = <&aud_dat_miso_off_pins>;
> +               pinctrl-5 = <&aud_dat_miso_on_pins>;
> +               pinctrl-6 = <&vow_dat_miso_off_pins>;
> +               pinctrl-7 = <&vow_dat_miso_on_pins>;
> +               pinctrl-8 = <&vow_clk_miso_off_pins>;
> +               pinctrl-9 = <&vow_clk_miso_on_pins>;
> +               pinctrl-10 = <&aud_nle_mosi_off_pins>;
> +               pinctrl-11 = <&aud_nle_mosi_on_pins>;
> +               pinctrl-12 = <&aud_dat_miso2_off_pins>;
> +               pinctrl-13 = <&aud_dat_miso2_on_pins>;
> +               pinctrl-14 = <&aud_gpio_i2s3_off_pins>;
> +               pinctrl-15 = <&aud_gpio_i2s3_on_pins>;
> +               pinctrl-16 = <&aud_gpio_i2s8_off_pins>;
> +               pinctrl-17 = <&aud_gpio_i2s8_on_pins>;
> +               pinctrl-18 = <&aud_gpio_i2s9_off_pins>;
> +               pinctrl-19 = <&aud_gpio_i2s9_on_pins>;
> +               pinctrl-20 = <&aud_dat_mosi_ch34_off_pins>;
> +               pinctrl-21 = <&aud_dat_mosi_ch34_on_pins>;
> +               pinctrl-22 = <&aud_dat_miso_ch34_off_pins>;
> +               pinctrl-23 = <&aud_dat_miso_ch34_on_pins>;
> +               pinctrl-24 = <&aud_gpio_tdm_off_pins>;
> +               pinctrl-25 = <&aud_gpio_tdm_on_pins>;
> +
> +               headset-codec {
> +                   sound-dai = <&rt5682>;
> +               };
> +
> +               speaker-codecs {
> +                   sound-dai = <&rt1015p>;
> +               };
> +       };
>  };
>
>  &dsi0 {
> @@ -227,6 +306,19 @@ &i2c1 {
>         clock-frequency = <400000>;
>         pinctrl-names = "default";
>         pinctrl-0 = <&i2c1_pins>;
> +
> +       rt5682: rt5682@1a {
> +               compatible = "realtek,rt5682i";
> +               reg = <0x1a>;
> +               interrupts-extended = <&pio 18 IRQ_TYPE_LEVEL_LOW>;
> +               realtek,jd-src = <1>;
> +               realtek,btndet-delay = <16>;
> +               #sound-dai-cells = <0>;
> +
> +               AVDD-supply = <&mt6359_vio18_ldo_reg>;
> +               MICVDD-supply = <&pp3300_g>;
> +               VBAT-supply = <&pp3300_ldo_z>;
> +       };
>  };
>
>  &i2c2 {
> @@ -660,6 +752,165 @@ pins-in {
>                 };
>         };
>
> +       aud_clk_mosi_off_pins: aud-clk-mosi-off-pins {
> +               pins-mosi-off {
> +                       pinmux = <PINMUX_GPIO214__FUNC_GPIO214>,
> +                                <PINMUX_GPIO215__FUNC_GPIO215>;
> +               };
> +       };
> +
> +       aud_clk_mosi_on_pins: aud-clk-mosi-on-pins {
> +               pins-mosi-on {
> +                       pinmux = <PINMUX_GPIO214__FUNC_AUD_CLK_MOSI>,
> +                                <PINMUX_GPIO215__FUNC_AUD_SYNC_MOSI>;
> +                       drive-strength = <10>;
> +               };
> +       };
> +
> +       aud_dat_miso_ch34_off_pins: aud-dat-miso-ch34-off-pins {
> +               pins-miso-off {
> +                       pinmux = <PINMUX_GPIO199__FUNC_GPIO199>;
> +               };
> +       };
> +
> +       aud_dat_miso_ch34_on_pins: aud-dat-miso-ch34-on-pins {
> +               pins-miso-on {
> +                       pinmux = <PINMUX_GPIO199__FUNC_AUD_DAT_MISO2>;
> +               };
> +       };
> +
> +       aud_dat_miso_off_pins: aud-dat-miso-off-pins {
> +               pins-miso-off {
> +                       pinmux = <PINMUX_GPIO218__FUNC_GPIO218>,
> +                                <PINMUX_GPIO219__FUNC_GPIO219>;
> +               };
> +       };
> +
> +       aud_dat_miso_on_pins: aud-dat-miso-on-pins {
> +               pins-miso-on {
> +                       pinmux = <PINMUX_GPIO218__FUNC_AUD_DAT_MISO0>,
> +                                <PINMUX_GPIO219__FUNC_AUD_DAT_MISO1>;
> +                       drive-strength = <10>;
> +               };
> +       };
> +
> +       aud_dat_miso2_off_pins: aud-dat-miso2-off-pins {
> +               pins-miso-off {
> +                       pinmux = <PINMUX_GPIO199__FUNC_GPIO199>;
> +               };
> +       };
> +
> +       aud_dat_miso2_on_pins: aud-dat-miso2-on-pins {
> +               pins-miso-on {
> +                       pinmux = <PINMUX_GPIO199__FUNC_AUD_DAT_MISO2>;
> +               };
> +       };
> +
> +       aud_dat_mosi_ch34_off_pins: aud-dat-mosi-ch34-off-pins {
> +               pins-mosi-off {
> +                       pinmux = <PINMUX_GPIO196__FUNC_GPIO196>;
> +               };
> +       };
> +
> +       aud_dat_mosi_ch34_on_pins: aud-dat-mosi-ch34-on-pins {
> +               pins-mosi-on {
> +                       pinmux = <PINMUX_GPIO196__FUNC_AUD_DAT_MOSI2>;
> +               };
> +       };
> +
> +       aud_dat_mosi_off_pins: aud-dat-mosi-off-pins {
> +               pins-mosi-off {
> +                       pinmux = <PINMUX_GPIO216__FUNC_GPIO216>,
> +                                <PINMUX_GPIO217__FUNC_GPIO217>;
> +               };
> +       };
> +
> +       aud_dat_mosi_on_pins: aud-dat-mosi-on-pins {
> +               pins-mosi-on {
> +                       pinmux = <PINMUX_GPIO216__FUNC_AUD_DAT_MOSI0>,
> +                                <PINMUX_GPIO217__FUNC_AUD_DAT_MOSI1>;
> +                       drive-strength = <10>;
> +               };
> +       };
> +
> +       aud_gpio_i2s3_off_pins: aud-gpio-i2s3-off-pins {
> +               pins-i2s3-off {
> +                       pinmux = <PINMUX_GPIO32__FUNC_GPIO32>,
> +                                <PINMUX_GPIO33__FUNC_GPIO33>,
> +                                <PINMUX_GPIO35__FUNC_GPIO35>;
> +               };
> +       };
> +
> +       aud_gpio_i2s3_on_pins: aud-gpio-i2s3-on-pins {
> +               pins-i2s3-on {
> +                       pinmux = <PINMUX_GPIO32__FUNC_I2S3_BCK>,
> +                                <PINMUX_GPIO33__FUNC_I2S3_LRCK>,
> +                                <PINMUX_GPIO35__FUNC_I2S3_DO>;
> +               };
> +       };
> +
> +       aud_gpio_i2s8_off_pins: aud-gpio-i2s8-off-pins {
> +               pins-i2s8-off {
> +                       pinmux = <PINMUX_GPIO10__FUNC_GPIO10>,
> +                                <PINMUX_GPIO11__FUNC_GPIO11>,
> +                                <PINMUX_GPIO12__FUNC_GPIO12>,
> +                                <PINMUX_GPIO13__FUNC_GPIO13>;
> +               };
> +       };
> +
> +       aud_gpio_i2s8_on_pins: aud-gpio-i2s8-on-pins {
> +               pins-i2s8-on {
> +                       pinmux = <PINMUX_GPIO10__FUNC_I2S8_MCK>,
> +                                <PINMUX_GPIO11__FUNC_I2S8_BCK>,
> +                                <PINMUX_GPIO12__FUNC_I2S8_LRCK>,
> +                                <PINMUX_GPIO13__FUNC_I2S8_DI>;
> +               };
> +       };
> +
> +       aud_gpio_i2s9_off_pins: aud-gpio-i2s9-off-pins {
> +               pins-i2s9-off {
> +                       pinmux = <PINMUX_GPIO29__FUNC_GPIO29>;
> +               };
> +       };
> +
> +       aud_gpio_i2s9_on_pins: aud-gpio-i2s9-on-pins {
> +               pins-i2s9-on {
> +                       pinmux = <PINMUX_GPIO29__FUNC_I2S9_DO>;
> +               };
> +       };
> +
> +       aud_gpio_tdm_off_pins: aud-gpio-tdm-off-pins {
> +               pins-tdm-off {
> +                       pinmux = <PINMUX_GPIO0__FUNC_GPIO0>,
> +                                <PINMUX_GPIO1__FUNC_GPIO1>,
> +                                <PINMUX_GPIO2__FUNC_GPIO2>,
> +                                <PINMUX_GPIO3__FUNC_GPIO3>;
> +               };
> +       };
> +
> +       aud_gpio_tdm_on_pins: aud-gpio-tdm-on-pins {
> +               pins-tdm-on {
> +                       pinmux = <PINMUX_GPIO0__FUNC_TDM_LRCK>,
> +                                <PINMUX_GPIO1__FUNC_TDM_BCK>,
> +                                <PINMUX_GPIO2__FUNC_TDM_MCK>,
> +                                <PINMUX_GPIO3__FUNC_TDM_DATA0>;
> +               };
> +       };
> +
> +       aud_nle_mosi_off_pins: aud-nle-mosi-off-pins {
> +               pins-nle-mosi-off {
> +                       pinmux = <PINMUX_GPIO197__FUNC_GPIO197>,
> +                                <PINMUX_GPIO198__FUNC_GPIO198>;
> +               };
> +       };
> +
> +       aud_nle_mosi_on_pins: aud-nle-mosi-on-pins {
> +               pins-nle-mosi-on {
> +                       pinmux = <PINMUX_GPIO197__FUNC_AUD_NLE_MOSI1>,
> +                                <PINMUX_GPIO198__FUNC_AUD_NLE_MOSI0>;
> +               };
> +       };
> +
>         cr50_int: cr50-irq-default-pins {
>                 pins-gsc-ap-int-odl {
>                         pinmux = <PINMUX_GPIO171__FUNC_GPIO171>;
> @@ -932,6 +1183,13 @@ pins-inhibit {
>                 };
>         };
>
> +       rt1015p_pins: rt1015p-default-pins {
> +               pins {
> +                       pinmux = <PINMUX_GPIO147__FUNC_GPIO147>;
> +                       output-low;
> +               };
> +       };
> +
>         scp_pins: scp-pins {
>                 pins-vreq-vao {
>                         pinmux = <PINMUX_GPIO195__FUNC_SCP_VREQ_VAO>;
> @@ -987,6 +1245,30 @@ pins-report-sw {
>                         output-low;
>                 };
>         };
> +
> +       vow_clk_miso_off_pins: vow-clk-miso-off-pins {
> +               pins-miso-off {
> +                       pinmux = <PINMUX_GPIO219__FUNC_GPIO219>;
> +               };
> +       };
> +
> +       vow_clk_miso_on_pins: vow-clk-miso-on-pins {
> +               pins-miso-on {
> +                       pinmux = <PINMUX_GPIO219__FUNC_VOW_CLK_MISO>;
> +               };
> +       };
> +
> +       vow_dat_miso_off_pins: vow-dat-miso-off-pins {
> +               pins-miso-off {
> +                       pinmux = <PINMUX_GPIO218__FUNC_GPIO218>;
> +               };
> +       };
> +
> +       vow_dat_miso_on_pins: vow-dat-miso-on-pins {
> +               pins-miso-on {
> +                       pinmux = <PINMUX_GPIO218__FUNC_VOW_DAT_MISO>;
> +               };
> +       };
>  };
>
>  &pmic {
> --
> 2.37.3
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 4/5] arm64: dts: mediatek: asurada: Enable audio support
  2022-10-06 21:25 ` [PATCH v2 4/5] arm64: dts: mediatek: asurada: Enable audio support Nícolas F. R. A. Prado
  2022-10-07  5:31   ` Chen-Yu Tsai
@ 2022-10-07  6:53   ` Chen-Yu Tsai
  2022-10-13 19:17     ` Nícolas F. R. A. Prado
  1 sibling, 1 reply; 17+ messages in thread
From: Chen-Yu Tsai @ 2022-10-07  6:53 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: Matthias Brugger, kernel, AngeloGioacchino Del Regno,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek

On Fri, Oct 7, 2022 at 5:25 AM Nícolas F. R. A. Prado
<nfraprado@collabora.com> wrote:
>
> Enable audio support for the Asurada platform. This consists of the
> machine sound card, the rt1015p codec for the speakers, the rt5682 codec
> for the headset, and the dmic codec for the internal microphone.
>
> HDMI audio support is left out for now since the DisplayPort chip
> required isn't enabled yet.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Tested-by: Chen-Yu Tsai <wenst@chromium.org>

However the UCM you linked to in the cover letter didn't seem to work
correctly.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 5/5] arm64: dts: mediatek: asurada: Add aliases for i2c and mmc
  2022-10-06 21:25 ` [PATCH v2 5/5] arm64: dts: mediatek: asurada: Add aliases for i2c and mmc Nícolas F. R. A. Prado
  2022-10-07  3:51   ` Chen-Yu Tsai
@ 2022-10-07  8:55   ` AngeloGioacchino Del Regno
  1 sibling, 0 replies; 17+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-07  8:55 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, Matthias Brugger
  Cc: kernel, Chen-Yu Tsai, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-mediatek

Il 06/10/22 23:25, Nícolas F. R. A. Prado ha scritto:
> Add aliases for the i2c and mmc nodes on the Asurada platform DT to
> ensure that we get stable ids for those devices on userspace.
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> 

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 3/5] arm64: dts: mediatek: asurada: Enable internal display
  2022-10-06 21:25 ` [PATCH v2 3/5] arm64: dts: mediatek: asurada: Enable internal display Nícolas F. R. A. Prado
@ 2022-10-07  8:56   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 17+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-07  8:56 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, Matthias Brugger
  Cc: kernel, Chen-Yu Tsai, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-mediatek

Il 06/10/22 23:25, Nícolas F. R. A. Prado ha scritto:
> The asurada platform has an ANX7625 bridge connecting the DSI's output
> to the internal eDP panel. Add and enable these devices in order to get
> a usable internal display.
> 
> Tested-by: Chen-Yu Tsai <wenst@chromium.org>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 1/5] arm64: dts: mediatek: asurada: Add display regulators
  2022-10-06 21:25 ` [PATCH v2 1/5] arm64: dts: mediatek: asurada: Add display regulators Nícolas F. R. A. Prado
@ 2022-10-07  8:56   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 17+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-07  8:56 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, Matthias Brugger
  Cc: kernel, Chen-Yu Tsai, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-mediatek

Il 06/10/22 23:25, Nícolas F. R. A. Prado ha scritto:
> Add the regulators present on the Asurada platform that are used to
> power the internal and external displays.
> 
> Tested-by: Chen-Yu Tsai <wenst@chromium.org>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> 

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

> ---
> 
> Changes in v2:
> - Added missing vin-supply to regulators
> - Removed min/max-microvolt from regulators that are simple switches
> 


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 4/5] arm64: dts: mediatek: asurada: Enable audio support
  2022-10-07  5:31   ` Chen-Yu Tsai
@ 2022-10-13 18:59     ` Nícolas F. R. A. Prado
  0 siblings, 0 replies; 17+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-10-13 18:59 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Matthias Brugger, kernel, AngeloGioacchino Del Regno,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek

On Fri, Oct 07, 2022 at 01:31:43PM +0800, Chen-Yu Tsai wrote:
> On Fri, Oct 7, 2022 at 5:25 AM Nícolas F. R. A. Prado
> <nfraprado@collabora.com> wrote:
> >
> > Enable audio support for the Asurada platform. This consists of the
> > machine sound card, the rt1015p codec for the speakers, the rt5682 codec
> > for the headset, and the dmic codec for the internal microphone.
> 
> It should be noted that there's a new revision of Hayato and Spherion
> that switch to using the RT5682S codec. These are mt8192-hayato-rev5-sku2.dts
> and mt8192-spherion-rev4.dts in the downstream kernel.

Thanks for the heads up. I'll move the variable codecs out of the common asurada
dtsi for next version.

Thanks,
Nícolas

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 4/5] arm64: dts: mediatek: asurada: Enable audio support
  2022-10-07  6:53   ` Chen-Yu Tsai
@ 2022-10-13 19:17     ` Nícolas F. R. A. Prado
  0 siblings, 0 replies; 17+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-10-13 19:17 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Matthias Brugger, kernel, AngeloGioacchino Del Regno,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek

On Fri, Oct 07, 2022 at 02:53:24PM +0800, Chen-Yu Tsai wrote:
> On Fri, Oct 7, 2022 at 5:25 AM Nícolas F. R. A. Prado
> <nfraprado@collabora.com> wrote:
> >
> > Enable audio support for the Asurada platform. This consists of the
> > machine sound card, the rt1015p codec for the speakers, the rt5682 codec
> > for the headset, and the dmic codec for the internal microphone.
> >
> > HDMI audio support is left out for now since the DisplayPort chip
> > required isn't enabled yet.
> >
> > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> 
> Tested-by: Chen-Yu Tsai <wenst@chromium.org>
> 
> However the UCM you linked to in the cover letter didn't seem to work
> correctly.

Did you comment out the HDMI section in the UCM? This series doesn't add support
for HDMI but the UCM already configures it.

I sent the UCM with HDMI support since I have it working locally and was hoping
that the HDMI support would be merged shortly on the kernel side, but on second
thought it makes more sense to have a working though incomplete UCM merged for
now and add the HDMI support later when it's ready on the kernel side, so I'll
update the UCM to go this route.

Thanks,
Nícolas

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 5/5] arm64: dts: mediatek: asurada: Add aliases for i2c and mmc
  2022-10-07  4:02     ` Chen-Yu Tsai
@ 2022-10-13 20:24       ` Nícolas F. R. A. Prado
  2022-10-18  6:28         ` Chen-Yu Tsai
  0 siblings, 1 reply; 17+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-10-13 20:24 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Matthias Brugger, kernel, AngeloGioacchino Del Regno,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek

On Fri, Oct 07, 2022 at 12:02:03PM +0800, Chen-Yu Tsai wrote:
> On Fri, Oct 7, 2022 at 11:51 AM Chen-Yu Tsai <wenst@chromium.org> wrote:
> >
> > On Fri, Oct 7, 2022 at 5:25 AM Nícolas F. R. A. Prado
> > <nfraprado@collabora.com> wrote:
> > >
> > > Add aliases for the i2c and mmc nodes on the Asurada platform DT to
> > > ensure that we get stable ids for those devices on userspace.
> > >
> > > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> > >
> > > ---
> > >
> > > Changes in v2:
> > > - Added this commit
> > >
> > >  arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 12 ++++++++++++
> > >  1 file changed, 12 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> > > index dac2d4f5e670..758ca42a6156 100644
> > > --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> > > +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> > > @@ -11,6 +11,18 @@
> > >
> > >  / {
> > >         aliases {
> > > +               i2c0 = &i2c0;
> > > +               i2c1 = &i2c1;
> > > +               i2c2 = &i2c2;
> > > +               i2c3 = &i2c3;
> > > +               i2c4 = &i2c4;
> > > +               i2c5 = &i2c5;
> > > +               i2c6 = &i2c6;
> > > +               i2c7 = &i2c7;
> > > +               i2c8 = &i2c8;
> > > +               i2c9 = &i2c9;
> >
> > You should only add aliases for interfaces that are actually enabled.

Ok, will drop the extra ones.

> >
> > Also, I think we can disable i2c6. None of the current products use it.

It's already disabled upstream.

> >
> > ChenYu
> >
> > > +               mmc0 = &mmc0;
> > > +               mmc1 = &mmc1;
> 
> Also, Spherion does not have an SD card slot. It might be better to move
> the mmc aliases to the end .dts files.

Based on the downstream dts, rev0 and rev1 do have SD card slot (or at least the
mmc1 controller isn't disabled on those). However upstream we have a single dts
(asurada-spherion-r0) shared by those two and rev2 and rev3 (which don't have
the SD card slot), given that this way we can have a single dts and there's no
disadvantage to keeping the mmc1 node enabled because the CD IRQ will never be
triggered. With this in mind, I think it makes more sense to keep the mmc
aliases in the asurada dtsi, as there's no harm in having them, and will ensure
fixed ids for the rev0 and rev1 spherion boards.

Thanks,
Nícolas

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 5/5] arm64: dts: mediatek: asurada: Add aliases for i2c and mmc
  2022-10-13 20:24       ` Nícolas F. R. A. Prado
@ 2022-10-18  6:28         ` Chen-Yu Tsai
  0 siblings, 0 replies; 17+ messages in thread
From: Chen-Yu Tsai @ 2022-10-18  6:28 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: Matthias Brugger, kernel, AngeloGioacchino Del Regno,
	Krzysztof Kozlowski, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek

On Fri, Oct 14, 2022 at 4:24 AM Nícolas F. R. A. Prado
<nfraprado@collabora.com> wrote:
>
> On Fri, Oct 07, 2022 at 12:02:03PM +0800, Chen-Yu Tsai wrote:
> > On Fri, Oct 7, 2022 at 11:51 AM Chen-Yu Tsai <wenst@chromium.org> wrote:
> > >
> > > On Fri, Oct 7, 2022 at 5:25 AM Nícolas F. R. A. Prado
> > > <nfraprado@collabora.com> wrote:
> > > >
> > > > Add aliases for the i2c and mmc nodes on the Asurada platform DT to
> > > > ensure that we get stable ids for those devices on userspace.
> > > >
> > > > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> > > >
> > > > ---
> > > >
> > > > Changes in v2:
> > > > - Added this commit
> > > >
> > > >  arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 12 ++++++++++++
> > > >  1 file changed, 12 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> > > > index dac2d4f5e670..758ca42a6156 100644
> > > > --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> > > > +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
> > > > @@ -11,6 +11,18 @@
> > > >
> > > >  / {
> > > >         aliases {
> > > > +               i2c0 = &i2c0;
> > > > +               i2c1 = &i2c1;
> > > > +               i2c2 = &i2c2;
> > > > +               i2c3 = &i2c3;
> > > > +               i2c4 = &i2c4;
> > > > +               i2c5 = &i2c5;
> > > > +               i2c6 = &i2c6;
> > > > +               i2c7 = &i2c7;
> > > > +               i2c8 = &i2c8;
> > > > +               i2c9 = &i2c9;
> > >
> > > You should only add aliases for interfaces that are actually enabled.
>
> Ok, will drop the extra ones.
>
> > >
> > > Also, I think we can disable i2c6. None of the current products use it.
>
> It's already disabled upstream.
>
> > >
> > > ChenYu
> > >
> > > > +               mmc0 = &mmc0;
> > > > +               mmc1 = &mmc1;
> >
> > Also, Spherion does not have an SD card slot. It might be better to move
> > the mmc aliases to the end .dts files.
>
> Based on the downstream dts, rev0 and rev1 do have SD card slot (or at least the
> mmc1 controller isn't disabled on those). However upstream we have a single dts
> (asurada-spherion-r0) shared by those two and rev2 and rev3 (which don't have
> the SD card slot), given that this way we can have a single dts and there's no
> disadvantage to keeping the mmc1 node enabled because the CD IRQ will never be
> triggered. With this in mind, I think it makes more sense to keep the mmc
> aliases in the asurada dtsi, as there's no harm in having them, and will ensure
> fixed ids for the rev0 and rev1 spherion boards.

Sounds good to me.

ChenYu

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-10-18  6:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06 21:25 [PATCH v2 0/5] MT8192 Asurada devicetree - Part 2 Nícolas F. R. A. Prado
2022-10-06 21:25 ` [PATCH v2 1/5] arm64: dts: mediatek: asurada: Add display regulators Nícolas F. R. A. Prado
2022-10-07  8:56   ` AngeloGioacchino Del Regno
2022-10-06 21:25 ` [PATCH v2 2/5] arm64: dts: mediatek: asurada: Add display backlight Nícolas F. R. A. Prado
2022-10-06 21:25 ` [PATCH v2 3/5] arm64: dts: mediatek: asurada: Enable internal display Nícolas F. R. A. Prado
2022-10-07  8:56   ` AngeloGioacchino Del Regno
2022-10-06 21:25 ` [PATCH v2 4/5] arm64: dts: mediatek: asurada: Enable audio support Nícolas F. R. A. Prado
2022-10-07  5:31   ` Chen-Yu Tsai
2022-10-13 18:59     ` Nícolas F. R. A. Prado
2022-10-07  6:53   ` Chen-Yu Tsai
2022-10-13 19:17     ` Nícolas F. R. A. Prado
2022-10-06 21:25 ` [PATCH v2 5/5] arm64: dts: mediatek: asurada: Add aliases for i2c and mmc Nícolas F. R. A. Prado
2022-10-07  3:51   ` Chen-Yu Tsai
2022-10-07  4:02     ` Chen-Yu Tsai
2022-10-13 20:24       ` Nícolas F. R. A. Prado
2022-10-18  6:28         ` Chen-Yu Tsai
2022-10-07  8:55   ` AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).