From patchwork Mon Aug 26 22:15:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13778581 Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D375D143757 for ; Mon, 26 Aug 2024 22:15:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724710550; cv=none; b=DmqvRZ241bEGp4hRpdY0Qo+LLwfD+yfTHtll4nrYuAIb6WbpelRpzGfZrUGwzq4haxSohH1KHllV2/P4hVc1JiaFXezzwhpCodcieUmgQCXGO5UHOAHZtRCPooWGAUO53XZpRvJrTD1Ji+ZoOborr6pkCXHujuLxs4lD7jBbiEM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724710550; c=relaxed/simple; bh=8zc6eTLgDJTETrIfUkURRl0Y/PHxa9+uwpqhEyvE8CE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BHkOh4Dblj0oCrIph/8uy/L+JaTshcmXCxOaAVTDJniA+hObYcOCA5MNH7by7kL4FworyYYruE+3PfwRThoaHnLlvhq8Gb1OO1loaDhtjF9eTSszB/B6P5oZF2Zg6eFyh0mAzufTgwK+NIBhQKzxJHNYanNnHvRt5UWSw00b2tA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=lD+g1uvp; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="lD+g1uvp" Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id ACE7F1FAC7; Tue, 27 Aug 2024 00:15:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1724710547; bh=Z79WcgwrkaS4O3mbowHc85Qc5rTcXPBV1a1hHicu+jw=; h=From:To:Subject; b=lD+g1uvpNNXIgZ0FsvZzUseq8KXPFM/GCbWx+ZRPe8A98XYuiuwAMuhRiiwOEbbuI OU7YWzBETzTfhG9hB01Xj/HwCmw5pOE/jMbZZduEot3PiS65hUxjzQSGTxZQSC6SNd FmgdUiDoO8RfOfa3NXXD+qJz0nWzw7Ds2LfNB1P5NZUDq5KUhgLATOTzo7mGPko4xM wBpmRhG0ykDSQQQrwRLaMfJUmOwH9++unBFXiTVyNrWqPgCDII0njyg0mcKhorKoIz 6lTaaQWK61EbvsvoogZWHsB4808WXLj9aLeRSOTgPH3qumoQQlF997+2ytnhdVgDmq N/1tYib7UEiEA== From: Francesco Dolcini To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Andrejs Cainikovs , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v1 1/5] arm: dts: imx8qm: Remove adma pwm Date: Tue, 27 Aug 2024 00:15:37 +0200 Message-Id: <20240826221541.15669-2-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240826221541.15669-1-francesco@dolcini.it> References: <20240826221541.15669-1-francesco@dolcini.it> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andrejs Cainikovs There is no adma pwm on iMX8QM, so remove it from the DT. When enabled, this cause warnings on resource partition ownership check by U-Boot that receives messages from SCU firmware saying that these resources are not owned: Booting using the fdt blob at 0x9d400000 Loading Device Tree to 00000000fd622000, end 00000000fd66efff ... OK Disable pwm@5a190000 rsrc 188 not owned Disable clock-controller@5a590000 rsrc 188 not owned Signed-off-by: Andrejs Cainikovs Signed-off-by: Francesco Dolcini --- arch/arm64/boot/dts/freescale/imx8qm-ss-dma.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qm-ss-dma.dtsi b/arch/arm64/boot/dts/freescale/imx8qm-ss-dma.dtsi index aa9f28c4431d..d4856b8590e0 100644 --- a/arch/arm64/boot/dts/freescale/imx8qm-ss-dma.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qm-ss-dma.dtsi @@ -4,6 +4,9 @@ * Dong Aisheng */ +/delete-node/ &adma_pwm; +/delete-node/ &adma_pwm_lpcg; + &dma_subsys { uart4_lpcg: clock-controller@5a4a0000 { compatible = "fsl,imx8qxp-lpcg"; From patchwork Mon Aug 26 22:15:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13778582 Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9ED1219D06A for ; Mon, 26 Aug 2024 22:15:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724710551; cv=none; b=ffjLjJJgicmZeRocVGAVx5YSB+sDcphf13ZNhcTolnxOvCKZRvZHWcC41qBBVQ8Gpqd2C2qYkMSGVpc8RjHGMYRjZ2sfJa8E7N3dyJpVWu9wkq8D1rFe3KswdAT9a7iXDc6Pw+BiSVrKgMSGI3VQhUBfzaGAJEnJWmpZ4pzToRY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724710551; c=relaxed/simple; bh=rfzqc55zCdpfzcYny2wFiR0kjfUF+JfoU3QQxX0h6dI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZspyjUUBPdSahfaznA9uZjkSDXkyPCIqVR2/FUhASM2VRVO7D8We1YKOjjJISjD1YpQlhPMtGp2mIeTyFajY019xxybbVAmTK4c42AQhc5BxdBDEFkF0Jst8MpuIlNBNnLW+TQLtoIghlzgl6Cjzsf/miMxtraCVoaEyTiNsSjE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=T571HiBw; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="T571HiBw" Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 67B391FB25; Tue, 27 Aug 2024 00:15:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1724710547; bh=y5t2Q9VHKe5OHr6FJPldfu/x63AecBEgBtfvue7SvJU=; h=From:To:Subject; b=T571HiBwl1OMA0XBX15tuCfyDKJnrnn1ZM+hIbqQC0NLV1W+4mj7ITmyStc87c+IH AJFa9Gs57aLIJKqx44MYOxyKF56LjFMU6J8uqPVAIDPt60WrcZiKfpzmX4rb3r3b7q 5NBimdY4mk+GmT4enBrjufjvMzT3L8HXoOTV5xbBmBdewy91mmN6o3qCtSEsCfmCM8 +KPBKnJi7J9vPATcyYMLFUeWVgzEuyYSmjY2W47HeiFocCWo6S7LbtlefbdxjLFbl1 WBGomGTU8mLvJ6KOWfaSOsCbS61+TKTrezoHK5LWMjhPCcJHngMCEOTmdcqWoP+A/f QElho1ACDSXCg== From: Francesco Dolcini To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Andrejs Cainikovs , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v1 2/5] arm64: dts: imx8-apalis: Set thermal thresholds Date: Tue, 27 Aug 2024 00:15:38 +0200 Message-Id: <20240826221541.15669-3-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240826221541.15669-1-francesco@dolcini.it> References: <20240826221541.15669-1-francesco@dolcini.it> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Andrejs Cainikovs Set critical/alert thermal thresholds for all relevant SOC temperature trips to the IT value (max T_junction 105 degree Celsius) in accordance with the IT grade of the SOM. Signed-off-by: Andrejs Cainikovs Signed-off-by: Francesco Dolcini --- .../boot/dts/freescale/imx8-apalis-v1.1.dtsi | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi b/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi index 160153853b68..e53683e49e03 100644 --- a/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi @@ -239,6 +239,30 @@ &adc1 { /* TODO: Asynchronous Sample Rate Converter (ASRC) */ +&cpu_alert0 { + temperature = <95000>; +}; + +&cpu_alert1 { + temperature = <95000>; +}; + +&cpu_crit0 { + temperature = <105000>; +}; + +&cpu_crit1 { + temperature = <105000>; +}; + +&drc_alert0 { + temperature = <95000>; +}; + +&drc_crit0 { + temperature = <105000>; +}; + /* Apalis ETH1 */ &fec1 { pinctrl-names = "default", "sleep"; @@ -285,6 +309,22 @@ &flexcan3 { /* TODO: Apalis HDMI1 */ +&gpu_alert0 { + temperature = <95000>; +}; + +&gpu_alert1 { + temperature = <95000>; +}; + +&gpu_crit0 { + temperature = <105000>; +}; + +&gpu_crit1 { + temperature = <105000>; +}; + /* On-module I2C */ &i2c1 { pinctrl-names = "default"; From patchwork Mon Aug 26 22:15:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13778583 Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5205F19D09E for ; Mon, 26 Aug 2024 22:15:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724710552; cv=none; b=ezBK7vCsU7VwIWZWQqBJ+3GYYjkU7SsApJV68TTgfwh4q74x/nQ9It5d1FlkRLyYCWZh8dOzuqHGutcaKWJ4d6ceRs3HMWZCoeBY6eaay80+B8UmBj1dZEX7HU/MwMpWhYKiLxDSz+EIaoSHfDLAwa5c8mNq8YDslZkwPmJFj04= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724710552; c=relaxed/simple; bh=qyK5NkFVXK1BEFnRomHaUtbr+6Ra6z8Iia55bU63S2k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=YSAzQdRd21Lh3tWl6BYGwy7EQ8zYSZlg/DhULm8p7nY5pySj4aYjj+FF78GJ8vA+TTrzAxDQvBGwiYp5fI4EL+1lypJlp6HDHxsANx8Ey703bhD9iPPb8zjNQdgRWUq56NekLciAj51guRUk999U8CSmPC712Pv2/IRyp9tp7v8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=bA198KmG; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="bA198KmG" Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 22DAA1FB32; Tue, 27 Aug 2024 00:15:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1724710548; bh=DkVycQN7gL9DLGIpvZam7zsKP66vaTuFkt2lFhh/8bc=; h=From:To:Subject; b=bA198KmGGdM96QJtGMLAbOGilFOcfgeKJJs/ueFbTsuCgLzvabl5h83Ra+wj3lnAI SA3MLCBWwAneeS1Sp3dYLbt42TJikvtoFpJaggDacfqLvnjs50Vcfywe3FakDhCCMM /aiehRlNgf8CZpeIOG5a7ofheNXWGN65GD6YN9DgaPbdjIWK11kB4RdGVPc/MtoaTA 1T1oeiDwNUw6wxfVv691VtnI1FJCxB0uIX/gMfkcE1Rx9D5NhK9fLtaMVL78L8mpjp BUQGdagGbiaqkTg6lvEB29cx5DLR6y3p5Rxw5ZbxbphGCvODCWV9PYzFrKd9IfUiSR PN9mTieWNyyZA== From: Francesco Dolcini To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: =?utf-8?q?Jo=C3=A3o_Paulo_Gon=C3=A7alves?= , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v1 3/5] arm64: dts: imx8-apalis: Add audio support Date: Tue, 27 Aug 2024 00:15:39 +0200 Message-Id: <20240826221541.15669-4-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240826221541.15669-1-francesco@dolcini.it> References: <20240826221541.15669-1-francesco@dolcini.it> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: João Paulo Gonçalves Add audio support to Apalis-iMX8QM and its carrier boards. These includes: * On SOM i2s sound card * On SOM spdif sound card * Enabling Audiomix and Asynchronous Sample Rate Converter Signed-off-by: João Paulo Gonçalves Signed-off-by: Francesco Dolcini --- .../boot/dts/freescale/imx8-apalis-eval.dtsi | 26 ++++-- .../dts/freescale/imx8-apalis-ixora-v1.1.dtsi | 26 ++++-- .../dts/freescale/imx8-apalis-ixora-v1.2.dtsi | 26 ++++-- .../boot/dts/freescale/imx8-apalis-v1.1.dtsi | 80 +++++++++++++++++-- 4 files changed, 136 insertions(+), 22 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi b/arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi index deecb96a1596..5f24356ad4e2 100644 --- a/arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi @@ -22,9 +22,13 @@ &adc1 { status = "okay"; }; -/* TODO: Audio Mixer */ +&amix { + status = "okay"; +}; -/* TODO: Asynchronous Sample Rate Converter (ASRC) */ +&asrc0 { + status = "okay"; +}; /* TODO: Display Controller */ @@ -104,13 +108,25 @@ &lsio_pwm3 { /* TODO: Apalis BKL1_PWM */ -/* TODO: Apalis DAP1 */ +/* Apalis DAP1 */ +&sai1 { + status = "okay"; +}; -/* TODO: Apalis Analogue Audio */ +&sai5 { + status = "okay"; +}; + +&sai5_lpcg { + status = "okay"; +}; /* TODO: Apalis SATA1 */ -/* TODO: Apalis SPDIF1 */ +/* Apalis SPDIF1 */ +&spdif0 { + status = "okay"; +}; /* TODO: Apalis USBH2, Apalis USBH3 and on-module Wi-Fi via on-module HSIC Hub */ diff --git a/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi b/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi index 5438923a905c..4ec2227750f4 100644 --- a/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi @@ -62,9 +62,13 @@ &adc1 { status = "okay"; }; -/* TODO: Audio Mixer */ +&amix { + status = "okay"; +}; -/* TODO: Asynchronous Sample Rate Converter (ASRC) */ +&asrc0 { + status = "okay"; +}; /* TODO: Display Controller */ @@ -191,13 +195,25 @@ &lsio_pwm3 { /* TODO: Apalis BKL1_PWM */ -/* TODO: Apalis DAP1 */ +/* Apalis DAP1 */ +&sai1 { + status = "okay"; +}; -/* TODO: Apalis Analogue Audio */ +&sai5 { + status = "okay"; +}; + +&sai5_lpcg { + status = "okay"; +}; /* TODO: Apalis SATA1 */ -/* TODO: Apalis SPDIF1 */ +/* Apalis SPDIF1 */ +&spdif0 { + status = "okay"; +}; /* TODO: Apalis USBH2, Apalis USBH3 and on-module Wi-Fi via on-module HSIC Hub */ diff --git a/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi b/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi index f6654fdcb147..606d9328ac99 100644 --- a/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi @@ -94,9 +94,13 @@ &adc1 { status = "okay"; }; -/* TODO: Audio Mixer */ +&amix { + status = "okay"; +}; -/* TODO: Asynchronous Sample Rate Converter (ASRC) */ +&asrc0 { + status = "okay"; +}; /* TODO: Display Controller */ @@ -240,13 +244,25 @@ &lsio_pwm3 { /* TODO: Apalis BKL1_PWM */ -/* TODO: Apalis DAP1 */ +/* Apalis DAP1 */ +&sai1 { + status = "okay"; +}; -/* TODO: Apalis Analogue Audio */ +&sai5 { + status = "okay"; +}; + +&sai5_lpcg { + status = "okay"; +}; /* TODO: Apalis SATA1 */ -/* TODO: Apalis SPDIF1 */ +/* Apalis SPDIF1 */ +&spdif0 { + status = "okay"; +}; /* TODO: Apalis USBH2, Apalis USBH3 and on-module Wi-Fi via on-module HSIC Hub */ diff --git a/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi b/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi index e53683e49e03..0f334c268a99 100644 --- a/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi @@ -126,6 +126,13 @@ reg_usb_phy: regulator-usb-hsic1 { regulator-name = "usb-phy-dummy"; }; + reg_vref_1v8: regulator-vref-1v8 { + compatible = "regulator-fixed"; + regulator-name = "+V1.8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -198,11 +205,32 @@ linux,cma { }; }; - /* TODO: Apalis Analogue Audio */ + sound { + compatible = "simple-audio-card"; + simple-audio-card,bitclock-master = <&dailink_master>; + simple-audio-card,format = "i2s"; + simple-audio-card,frame-master = <&dailink_master>; + simple-audio-card,name = "apalis-imx8qm"; + + simple-audio-card,cpu { + sound-dai = <&sai1>; + }; + + dailink_master: simple-audio-card,codec { + sound-dai = <&sgtl5000>; + }; + }; /* TODO: HDMI Audio */ - /* TODO: Apalis SPDIF1 */ + /* Apalis SPDIF1 */ + sound-spdif { + compatible = "fsl,imx-audio-spdif"; + model = "imx-spdif"; + spdif-controller = <&spdif0>; + spdif-in; + spdif-out; + }; touchscreen: touchscreen { compatible = "toradex,vf50-touchscreen"; @@ -227,6 +255,10 @@ touchscreen: touchscreen { }; +&asrc0 { + fsl,asrc-rate = <48000>; +}; + &adc0 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_adc0>; @@ -334,7 +366,23 @@ &i2c1 { clock-frequency = <100000>; status = "okay"; - /* TODO: Audio Codec */ + /* On Module Audio Codec */ + sgtl5000: audio-codec@a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + assigned-clocks = <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_SLV_BUS>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_MST_BUS>, + <&mclkout0_lpcg IMX_LPCG_CLK_0>; + assigned-clock-rates = <786432000>, <49152000>, <12288000>, <12288000>; + clocks = <&mclkout0_lpcg IMX_LPCG_CLK_0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sgtl5000>; + #sound-dai-cells = <0>; + VDDA-supply = <®_module_3v3_avdd>; + VDDD-supply = <®_vref_1v8>; + VDDIO-supply = <®_module_3v3>; + }; /* USB3503A */ usb-hub@8 { @@ -729,13 +777,31 @@ &mu2_m0 { /* TODO: Apalis BKL1_PWM */ -/* TODO: Apalis DAP1 */ - -/* TODO: Analogue Audio */ +/* Apalis DAP1 */ +&sai1 { + assigned-clocks = <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_SLV_BUS>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_MST_BUS>, + <&sai1_lpcg IMX_LPCG_CLK_0>; + assigned-clock-rates = <786432000>, <49152000>, <12288000>, <49152000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai1>; + #sound-dai-cells = <0>; + status = "okay"; +}; /* TODO: Apalis SATA1 */ -/* TODO: Apalis SPDIF1 */ +/* Apalis SPDIF1 */ +&spdif0 { + assigned-clocks = <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_SLV_BUS>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_MST_BUS>; + assigned-clock-rates = <786432000>, <49152000>, <12288000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spdif0>; + status = "okay"; +}; /* TODO: Thermal Zones */ From patchwork Mon Aug 26 22:18:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13778593 Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52AB3811E2 for ; Mon, 26 Aug 2024 22:18:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724710731; cv=none; b=GledC9QgxpwwF+AgjPIuLPU1HvU86NY3qcvxfg4dh7Yrki3NrYX2HAQb+KZh2o/qR/7JT9frOwzjhkFBlzvZl21Sfn98VXs34MpmCt2PXj+JLcuP3iAdII6fa3+oRYEXhXnORfchzQJDvykJIjyzvWTml/VW/OtsPunA3PaKAXY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724710731; c=relaxed/simple; bh=EvfZTqBJL12t6mFgZb86TwqIKRWH7UJBX/legWWlWHc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Y07PsN7PfN5LA1Gj9kc0fFm3/3CF2w+lb7hs8HWIXpoeudFuPuW+rMIjcKwn3dwxpQzMgXvfOAKsTsfbeXjCUwKPGI4Y+GZwvNTNHseGo1wHZYdq7XNR+Z/LJurC+oYRLZdAjXASsMf/iaS7Qs6fG4q+x91rlajwjUiVXrRPN1c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=sA7ykRwb; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="sA7ykRwb" Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 30AE620AB8; Tue, 27 Aug 2024 00:18:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1724710728; bh=w9FOpP0smQQETF357GYaHfHvRLm2uvOxgYwdEM8b1XY=; h=From:To:Subject; b=sA7ykRwbOOhXKwa9exJywSAVs3uRoX3XQnBBrOwqqbwLEbOB7JUTspkTKF8DA2xFI SaRnyPa7Wz1d7zCIu/B81/y/c6KJeTjDqHY9ePLEHDMKpKTmnoMr8W3akPwpXe749D 4r34/WO4T+BH+SjeYcpRAath8qln7ZJFfdExWqGZ5FPPDVsq9fPcoswHvLBKl6u5vp UweOOmSek6FQYNxbDl+3H0CloCLXnMQkJAUpytmD8YaK4+vCNmV+uTbquvFcK2+JY/ VccZUyS992HKdiHKNIR9k4AV2ksMWgtyzcXv9goiLBlzZFlpkqTUiaeyuz1nncbry8 /uhKn8rHOVj1A== From: Francesco Dolcini To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Hiago De Franco , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v1 4/5] arm64: dts: imx8-apalis: Add nau8822 audio-codec to apalis eval v1.2 Date: Tue, 27 Aug 2024 00:18:42 +0200 Message-Id: <20240826221842.16010-1-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240826221541.15669-1-francesco@dolcini.it> References: <20240826221541.15669-1-francesco@dolcini.it> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Hiago De Franco Add support for audio-codec NAU88C22 present on the Apalis Evaluation Board v1.2 carrier board. Signed-off-by: Hiago De Franco Signed-off-by: Francesco Dolcini --- .../dts/freescale/imx8-apalis-eval-v1.2.dtsi | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8-apalis-eval-v1.2.dtsi b/arch/arm64/boot/dts/freescale/imx8-apalis-eval-v1.2.dtsi index f5c6a0164f36..5862b24fb764 100644 --- a/arch/arm64/boot/dts/freescale/imx8-apalis-eval-v1.2.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-apalis-eval-v1.2.dtsi @@ -51,6 +51,40 @@ reg_can2: regulator-can2 { regulator-name = "5V_SW_CAN2"; startup-delay-us = <10000>; }; + + sound-carrier { + compatible = "simple-audio-card"; + simple-audio-card,bitclock-master = <&codec_dai>; + simple-audio-card,format = "i2s"; + simple-audio-card,frame-master = <&codec_dai>; + simple-audio-card,name = "apalis-nau8822"; + simple-audio-card,routing = + "Headphones", "LHP", + "Headphones", "RHP", + "Speaker", "LSPK", + "Speaker", "RSPK", + "Line Out", "AUXOUT1", + "Line Out", "AUXOUT2", + "LAUX", "Line In", + "RAUX", "Line In", + "LMICP", "Mic In", + "RMICP", "Mic In"; + simple-audio-card,widgets = + "Headphones", "Headphones", + "Line Out", "Line Out", + "Speaker", "Speaker", + "Microphone", "Mic In", + "Line", "Line In"; + + codec_dai: simple-audio-card,codec { + sound-dai = <&nau8822_1a>; + system-clock-frequency = <12288000>; + }; + + simple-audio-card,cpu { + sound-dai = <&sai0>; + }; + }; }; /* Apalis CAN1 */ @@ -69,6 +103,13 @@ &flexcan2 { &i2c2 { status = "okay"; + /* Audio Codec */ + nau8822_1a: audio-codec@1a { + compatible = "nuvoton,nau8822"; + reg = <0x1a>; + #sound-dai-cells = <0>; + }; + /* Power/Current Measurement Sensor */ hwmon@40 { compatible = "ti,ina219"; @@ -87,6 +128,18 @@ eeprom@57 { }; }; +&sai0 { + assigned-clocks = <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_SLV_BUS>, + <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_MST_BUS>, + <&sai0_lpcg IMX_LPCG_CLK_0>; + assigned-clock-rates = <786432000>, <49152000>, <12288000>, <49152000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai0>; + #sound-dai-cells = <0>; + status = "okay"; +}; + /* Apalis MMC1 */ &usdhc2 { pinctrl-0 = <&pinctrl_usdhc2_4bit>, <&pinctrl_mmc1_cd>; @@ -105,6 +158,15 @@ &usdhc3 { }; &iomuxc { + pinctrl-0 = <&pinctrl_cam1_gpios>, + <&pinctrl_esai0_gpios>, <&pinctrl_fec2_gpios>, + <&pinctrl_gpio3>, <&pinctrl_gpio4>, <&pinctrl_gpio_keys>, + <&pinctrl_gpio_usbh_oc_n>, <&pinctrl_lpuart1ctrl>, + <&pinctrl_lvds0_i2c0_gpio>, <&pinctrl_lvds1_i2c0_gpios>, + <&pinctrl_mipi_dsi_0_1_en>, <&pinctrl_mipi_dsi1_gpios>, + <&pinctrl_mlb_gpios>, <&pinctrl_qspi1a_gpios>, + <&pinctrl_sata1_act>, <&pinctrl_sim0_gpios>, + <&pinctrl_usdhc1_gpios>; pinctrl_enable_3v3_mmc: enable3v3mmcgrp { fsl,pins = ; /* MXM3_148 */ @@ -121,4 +183,11 @@ pinctrl_enable_can1_power: enablecan1powergrp { pinctrl_enable_can2_power: enablecan2powergrp { fsl,pins = ; /* MXM3_156 */ }; + + pinctrl_sai0: sai0grp { + fsl,pins = , /* MXM3_196 */ + , /* MXM3_200 */ + , /* MXM3_202 */ + ; /* MXM3_204 */ + }; }; From patchwork Mon Aug 26 22:18:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13778594 Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F9FD143757 for ; Mon, 26 Aug 2024 22:19:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724710743; cv=none; b=VOqFxg8ucZKYXMEhfpfBDeD/ITv2MNjO+/ygual1cDqRizuyfwOn+GEeJzds2ccjOvLQhTcvMd9erZWV/AZW1fYtsnwF3Vh/qT/JEFOVhi/uTf+uRarkw755hH5FM7vPVpr54AGRbCEFCYrgPIokQQRje7bzA4xb0eSEAgesqpY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724710743; c=relaxed/simple; bh=oiR1Fld9b770SKJdNvZawoU6zRfAeEpH73HRGqhu4Wg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=HRvdsl2K8wBdQ192OapCGEacdDv6FYn7gvlTnL7Mr7H/yEPv+r2m3+VMPqR4LBc7UnFrjOz51ijku7lnzEM3wXU2jbsCHVgwnW4PuZtwU+BJejtEp/TgqK6LLaYL7EDFtES/+g+r6Sbp47AAWsrn0fX/8Sa88+d+TRKbZNbp+Ac= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=h4367pYa; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="h4367pYa" Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 7432A20AB8; Tue, 27 Aug 2024 00:18:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1724710740; bh=OLHcXUX5ld590VkhJksYhwouQQmCELfT4laFDokDThE=; h=From:To:Subject; b=h4367pYaDAO4MkkzKCXNmtiUU/ikzMSrhoUNea31fJiU4zwVYDWI5K0i2q4HNzsn/ /SX4ptYYPt6NsVO1k799X8Cz+1zf7krTsRp+c3Oc+7edzU/0WIfucuym0SnuRrhZ96 FPSiKTstBipJm55EJYvyLsyHmtF0+mWHak5547qjFM7E2BBH6cMj2bQOWoB84NZ0Wm uU+XUB8snzY3JJDDNqtVXLSig2oIrLpIR2zNqUVuBDhq01bA7DFTS6Gxc+xKSB3PbP 6B2/rTFdm3nNYoZy9ygPvQyLC/14JQ6LQ08uLPTGtrDLgTB+uUV9AhXRwx1waGwNsz Ctjb+1THiqFGw== From: Francesco Dolcini To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: =?utf-8?q?Jo=C3=A3o_Paulo_Gon=C3=A7alves?= , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v1 5/5] arm64: dts: imx8-apalis: Add usb4 host support Date: Tue, 27 Aug 2024 00:18:55 +0200 Message-Id: <20240826221855.16061-1-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240826221541.15669-1-francesco@dolcini.it> References: <20240826221541.15669-1-francesco@dolcini.it> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: João Paulo Gonçalves Add USB4 HOST to Apalis-iMX8QM SOM and its carrier boards. Signed-off-by: João Paulo Gonçalves Signed-off-by: Francesco Dolcini --- arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi | 5 ++++- .../boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi | 5 ++++- .../boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi | 5 ++++- arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi | 13 ++++++++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi b/arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi index 5f24356ad4e2..dc127298715b 100644 --- a/arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-apalis-eval.dtsi @@ -135,4 +135,7 @@ &usbotg1 { status = "okay"; }; -/* TODO: Apalis USBH4 SuperSpeed */ +/* Apalis USBH4 SuperSpeed */ +&usbotg3_cdns3 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi b/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi index 4ec2227750f4..d4a1ad528f65 100644 --- a/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.1.dtsi @@ -222,7 +222,10 @@ &usbotg1 { status = "okay"; }; -/* TODO: Apalis USBH4 SuperSpeed */ +/* Apalis USBH4 SuperSpeed */ +&usbotg3_cdns3 { + status = "okay"; +}; /* Apalis MMC1 */ &usdhc2 { diff --git a/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi b/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi index 606d9328ac99..5e132c83e1b2 100644 --- a/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-apalis-ixora-v1.2.dtsi @@ -271,7 +271,10 @@ &usbotg1 { status = "okay"; }; -/* TODO: Apalis USBH4 SuperSpeed */ +/* Apalis USBH4 SuperSpeed */ +&usbotg3_cdns3 { + status = "okay"; +}; /* Apalis MMC1 */ &usdhc2 { diff --git a/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi b/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi index 0f334c268a99..0523bd0e8cd2 100644 --- a/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi @@ -807,7 +807,18 @@ &spdif0 { /* TODO: Apalis USBH2, Apalis USBH3 and on-module Wi-Fi via on-module HSIC Hub */ -/* TODO: Apalis USBH4 */ +/* Apalis USBH4 */ +&usb3_phy { + status = "okay"; +}; + +&usbotg3 { + status = "okay"; +}; + +&usbotg3_cdns3 { + dr_mode = "host"; +}; /* Apalis USBO1 */ &usbphy1 {