From patchwork Fri Mar 24 12:24:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jayesh Choudhary X-Patchwork-Id: 74508 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp588686vqo; Fri, 24 Mar 2023 05:33:41 -0700 (PDT) X-Google-Smtp-Source: AKy350a4pvmkqCgiEpH86MXtyZnn0EcaFZJHPnH7tsB5MTs4NYmjqD4Z4DUUreTPt8SYn5lFGJJi X-Received: by 2002:a05:6402:411:b0:502:251b:3a4c with SMTP id q17-20020a056402041100b00502251b3a4cmr757011edv.20.1679661221334; Fri, 24 Mar 2023 05:33:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679661221; cv=none; d=google.com; s=arc-20160816; b=ZJramz5fj8NOVriK7uXXu3gGOudSpLiMhGL2VmNOUTQcqoHq9PW1Vil4liYIh4WE2X gaOQwJWzTD8jlD2HnSNyKu5ibMlsFrf2F0gcdQdWKod0Of1/4JvV5IPrjsBnoRRxTwoJ p9b3/IkHjnLxMxoAJ5m/xhBDQk1rXCLcg7/YB7ocOg8yGsuPAEssJQtwonEqlXIrj3Sx 97B/8s53GAM1Tj8ldnh6syge/+6wQXitdeE94ijmGrlvCpHxZJ3TC0Kjeeaz+KeDdja6 74R1ifxMFa1XoGVGLOIhkcTOwfek05rytKKWN6pwPsVXpIytkz7+vvafyCVmFsKHIQLO jzwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=wkap2e6kzTTSvLw7zUfEUzfuLRCTlP03LJspERu3sD0=; b=N5O/sEcLj/X/Wetj4S4qrVfIc1NPRZooSrsSs/j/xlayOJs7EO2kY+EbVprGeAtZiM KRvu1YFTdSnK5j3igBj8EVEdijCakfJZlhg2iro+FVQhrTpLYZh4atyVbHoLmU4XnDh7 r+PASv7Uv+Ed1T/INjgGztIbzz1dMdGwWU+sSUQztY8U5K7JlBZ1NOSoxPeir0eIuw9v 1aB1sLOHznD9tJ6BVS5ybiHdjvhED7TjwqUCdwybiWBPuNTngMLK1KnuSAOJrMh1VSE9 WP6qAb5O9aybh+WkUY8FtQRwd9RMHiuXWxDTy5iROw2hmbUZVcrWXvnBrnKMe383Pbt0 Lt/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=U1iWKRQ6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d7-20020aa7c1c7000000b004fd2aaff404si22017906edp.644.2023.03.24.05.33.17; Fri, 24 Mar 2023 05:33:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=U1iWKRQ6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231893AbjCXMYh (ORCPT + 99 others); Fri, 24 Mar 2023 08:24:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231892AbjCXMYd (ORCPT ); Fri, 24 Mar 2023 08:24:33 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 106231CBD1; Fri, 24 Mar 2023 05:24:29 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32OCOIvG120757; Fri, 24 Mar 2023 07:24:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1679660658; bh=wkap2e6kzTTSvLw7zUfEUzfuLRCTlP03LJspERu3sD0=; h=From:To:CC:Subject:Date; b=U1iWKRQ60W+6AUfgcW3WBuk6R0YVDAWpZ3TpCSH2pCuYsK/Ywwyp9x4mf00AjMSH7 Ctyu+BAxYyIDpnf3FWdif9NNUb34MomJ4BoEi5wf5kQXTI41VoKOY1Y/asbKhvcaWn 3DXWz7Y5DrHALKZ3ENXfzz/SYk0Wdo6CjHO7djGo= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32OCOIp1005338 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 Mar 2023 07:24:18 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 24 Mar 2023 07:24:18 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Fri, 24 Mar 2023 07:24:18 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32OCOHkr097323; Fri, 24 Mar 2023 07:24:17 -0500 From: Jayesh Choudhary To: , CC: , , , , , , , , Subject: [PATCH] arm64: dts: ti: k3-am654: Add overlay for audio support Date: Fri, 24 Mar 2023 17:54:17 +0530 Message-ID: <20230324122417.252491-1-j-choudhary@ti.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761252444653713417?= X-GMAIL-MSGID: =?utf-8?q?1761252444653713417?= From: Peter Ujfalusi The GP application board has: ICSSG I2C0..3 connected to I2C EEPROMs ICSSG UART0..3 headers with level shifters ICSSG SPI0..3 connected to SPI Flash McASP0 connected to tlv320aic3106 codec with Headset out and Line In jack This patch adds support for the audio on the GP application board. Signed-off-by: Peter Ujfalusi [j-choudhary@ti.com: Makefile fixups, dtso file cleanups] Signed-off-by: Jayesh Choudhary --- Changes are made considering Andrew's comment on another overlay patch[1] related to Makefile and styling comments on the overlay file. [1]: arch/arm64/boot/dts/ti/Makefile | 3 +- arch/arm64/boot/dts/ti/k3-am654-gp.dtso | 124 ++++++++++++++++++++++++ 2 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/ti/k3-am654-gp.dtso diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index 541970a8ed0a..9b70a85fbc96 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -21,12 +21,13 @@ dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb # Boards with AM65x SoC +k3-am654-evm-dtbs := k3-am654-base-board.dtb k3-am654-gp.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic-pg2.dtb dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced-m2.dtb dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced-pg2.dtb -dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am654-evm.dtb # Boards with J7200 SoC k3-j7200-evm-dtbs := k3-j7200-common-proc-board.dtb k3-j7200-evm-quad-port-eth-exp.dtbo diff --git a/arch/arm64/boot/dts/ti/k3-am654-gp.dtso b/arch/arm64/boot/dts/ti/k3-am654-gp.dtso new file mode 100644 index 000000000000..14ceb2714677 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am654-gp.dtso @@ -0,0 +1,124 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * DT overlay for GP application board on AM654 EVM + * + * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include + +#include "k3-pinctrl.h" + +&{/} { + gp_vcc_5v0: fixedregulator-gp-vcc-5v0 { + compatible = "regulator-fixed"; + regulator-name = "gp_vcc_5v0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + }; + + codec_vcc_3v3: fixedregulator-codec-vcc-3v3 { + /* LP5912-3.3DRVT */ + compatible = "regulator-fixed"; + regulator-name = "codec_vcc_3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&gp_vcc_5v0>; + regulator-always-on; + regulator-boot-on; + }; + + gp_vcc_1v8: fixedregulator-gp-vcc-1v8 { + compatible = "regulator-fixed"; + regulator-name = "gp_vcc_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "AM65x-GPEVM"; + simple-audio-card,widgets = + "Headphone", "Headphone Jack", + "Line", "Line In"; + simple-audio-card,routing = + "Headphone Jack", "HPLOUT", + "Headphone Jack", "HPROUT", + "LINE1L", "Line In", + "LINE1R", "Line In"; + simple-audio-card,format = "dsp_b"; + simple-audio-card,bitclock-master = <&sound_master>; + simple-audio-card,frame-master = <&sound_master>; + simple-audio-card,bitclock-inversion; + + simple-audio-card,cpu { + sound-dai = <&mcasp0>; + }; + + sound_master: simple-audio-card,codec { + sound-dai = <&tlv320aic3106>; + system-clock-frequency = <12000000>; + }; + }; +}; + +&main_pmx0 { + mcasp0_pins: mcasp0-pins { + pinctrl-single,pins = < + AM65X_IOPAD(0x01f4, PIN_INPUT, 5) /* (V24) PRG0_PRU0_GPO0.MCASP0_ACLKX */ + AM65X_IOPAD(0x01f8, PIN_INPUT, 5) /* (W25) PRG0_PRU0_GPO1.MCASP0_AFSX */ + AM65X_IOPAD(0x0204, PIN_OUTPUT, 5) /* (Y24) PRG0_PRU0_GPO4.MCASP0_AXR0 */ + AM65X_IOPAD(0x0208, PIN_INPUT, 5) /* (V28) PRG0_PRU0_GPO5.MCASP0_AXR1 */ + >; + }; + + aic3106_pins: aic3106-pins { + pinctrl-single,pins = < + AM65X_IOPAD(0x011c, PIN_OUTPUT, 7) /* (AD19) PRG1_PRU0_GPO15.GPIO0_71 */ + >; + }; +}; + +&main_i2c0 { + #address-cells = <1>; + #size-cells = <0>; + + tlv320aic3106: tlv320aic3106@1b { + #sound-dai-cells = <0>; + compatible = "ti,tlv320aic3106"; + reg = <0x1b>; + pinctrl-names = "default"; + pinctrl-0 = <&aic3106_pins>; + gpio-reset = <&main_gpio0 71 GPIO_ACTIVE_LOW>; /* gpio0_71 */ + /* Regulators */ + AVDD-supply = <&codec_vcc_3v3>; + IOVDD-supply = <&gp_vcc_1v8>; + DRVDD-supply = <&codec_vcc_3v3>; + DVDD-supply = <&gp_vcc_1v8>; + }; +}; + +&mcasp0 { + status = "okay"; + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mcasp0_pins>; + op-mode = <0>; /* MCASP_IIS_MODE */ + tdm-slots = <2>; + /* 16 serializers */ + serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ + 1 2 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + >; + tx-num-evt = <32>; + rx-num-evt = <32>; +};