Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp385575rdb; Mon, 29 Jan 2024 05:29:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFT5U29zU6MheRnpHqDrwLmcvswrrtYgNMBVWh8RGIbQH/cIn2df805E7iZclGRKqEfS4Oo X-Received: by 2002:a05:690c:3603:b0:5ff:8409:f468 with SMTP id ft3-20020a05690c360300b005ff8409f468mr6252470ywb.35.1706534978115; Mon, 29 Jan 2024 05:29:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706534978; cv=pass; d=google.com; s=arc-20160816; b=zTaINuQjwJ3VfypxTw6wHnBgGimxNxtkLuyMTBA7I1XVMO41xa7JM1QTm5r2rCmRC5 MogRNIqfkE4BLjsXqqjF0TiTfSk9m0IumTvX9KsUEpzSX3KNKqBvyGI6/I3wMk6zZ0z+ qOlFI/+QwQMZ5RHBzFZNW75Ln5cXyBe4xWPsW+bXKWpAlRdu2H5ABHwLl4XjFQHnEwDP JOx3klmB/A8zNiX8rSzbTHuPeTCJAIPFKkChyKJOZh+CSTYgGWt1bOOvsSykmmHiUgB2 oCII7Jo5J5vzDMxpywU/DhoYnXFJezJybon5S5PSyXS4N25PeuKFo/EfahkwOVApIeeS JC3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=7lg6JADhiC+BWWuPnp29RpEE1mZymN3Vkfl3gxptk28=; fh=XT/CBWmVHm+7hSmT/rWeCa52mY0XRRHWnGkd9Vtyt2Y=; b=L20p9dDrJYl4YU/aFol+Xn6WCdTdVMR4NiKYlEKH56skFuSbfNdpI3s2fKGpgRdjga OYd0AmFJKmvAvHjAoAoe6/nwAA6FXhukZPYehJAHT7SGh0jlDcAI2A7XNG0Wj5WMX6qp ClTYnQPgQ64/6lKv2iZKwl1/hVMxooIZYbjTh3TbWNEq6pvzcW+ML7oT/cPoUqWQBiP5 TsKiwVATg+2hvIsDtIS4GU4NAsRaILidvWit3e9pri6syIBNBg98I2tkPEUuYiJ3I4cb TiUzEY8UMQnn3/y3MnQPszk7SKWw/xG8mOZ+BufWrDzewDbt/5oExi/OpNcRyZ0RgeVf 4ZcQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kRbdIMPH; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-42799-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42799-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v17-20020a05622a189100b0042a8618d2b5si6493851qtc.596.2024.01.29.05.29.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 05:29:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42799-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kRbdIMPH; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-42799-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42799-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D91031C218C7 for ; Mon, 29 Jan 2024 13:29:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B3EC657DB; Mon, 29 Jan 2024 13:28:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="kRbdIMPH" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7E1A657C5; Mon, 29 Jan 2024 13:28:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706534893; cv=none; b=X1tkXq2iVGk/C17lmUUamOL0M2moUSujD3xXouD1oGdQ+rms8z88uHQKLICBTMPwwpjRCzGJpTlU6wI9HjeOn4x6yFWCWHLBmSNCGsTbzd31uJO/imJzWb6lPwZSn8/spnQlgpYQdODMpkocol6Z4/5IixTIRj/bKOrKPB7cvWw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706534893; c=relaxed/simple; bh=qewCpaXffFxCxdP0bZ6WMukSbP9GmgB7/+OOOMqMxUA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=G5DUmCi4YG5hrhDu3ocTS8tZyBr75RULcyS8h1OAYgI02VpJyG/2nNZerYgObbsncLgMoYBbq0CIMYmcVUZL2Ckm+p3URGlcRN5vP6GePPzz5xxfoECQ2AgAEWIu1ihZCdXGNMQiMA5bQJPa3uYJt/w65zogrUOu/2QgsOzqvD8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=kRbdIMPH; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40TDS2qH121864; Mon, 29 Jan 2024 07:28:02 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706534882; bh=7lg6JADhiC+BWWuPnp29RpEE1mZymN3Vkfl3gxptk28=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=kRbdIMPH8sfYJkCK5Mo60R8nZRXzk4FPLugFXzye/pNhbgiI/X5SH9M4plZ4udGXe Buis8SGVW/F9ttC7go4j0GtkKZqXcLZ7Mc40AL0atGAeZIOSsH9WBVQqIKmDii4hIH /osU10szsM/Y50A5oQPm2KbQhtTmF7tW1cDIsJQo= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40TDS25J030505 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 29 Jan 2024 07:28:02 -0600 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 29 Jan 2024 07:28:02 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 29 Jan 2024 07:28:02 -0600 Received: from uda0490681.dhcp.ti.com ([10.24.69.142]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40TDRg9E036720; Mon, 29 Jan 2024 07:27:59 -0600 From: Vaishnav Achath To: , , , , , CC: , , , , , , , Subject: [PATCH 4/9] arm64: dts: ti: k3-am69-sk: Enable camera peripherals Date: Mon, 29 Jan 2024 18:57:37 +0530 Message-ID: <20240129132742.1189783-5-vaishnav.a@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129132742.1189783-1-vaishnav.a@ti.com> References: <20240129132742.1189783-1-vaishnav.a@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 CSI cameras are controlled using I2C. On AM69 Starter Kit, this is routed to I2C-1, so enable the instance, TCA9543 I2C switch and the TCA6408 GPIO expander on the bus. AM69 SK has the CSI2RX routed to a MIPI CSI connector and to 22-pin RPi camera connector through an analog mux with GPIO control, model that so that an overlay can control the mux state according to connected cameras. Signed-off-by: Vaishnav Achath --- arch/arm64/boot/dts/ti/k3-am69-sk.dts | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am69-sk.dts b/arch/arm64/boot/dts/ti/k3-am69-sk.dts index 8da591579868..9ede9c8de25a 100644 --- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts @@ -321,6 +321,14 @@ tfp410_out: endpoint { }; }; }; + + csi_mux: mux-controller { + compatible = "gpio-mux"; + #mux-state-cells = <1>; + mux-gpios = <&exp2 1 GPIO_ACTIVE_HIGH>; + idle-state = <0>; + }; + }; &main_pmx0 { @@ -340,6 +348,13 @@ J784S4_IOPAD(0x0e4, PIN_INPUT_PULLUP, 0) /* (AP37) I2C0_SDA */ >; }; + main_i2c1_pins_default: main-i2c1-default-pins { + pinctrl-single,pins = < + J784S4_IOPAD(0x0ac, PIN_INPUT_PULLUP, 13) /* (AE34) MCASP0_AXR15.I2C1_SCL */ + J784S4_IOPAD(0x0b0, PIN_INPUT_PULLUP, 13) /* (AL33) MCASP1_AXR3.I2C1_SDA */ + >; + }; + main_mmc1_pins_default: main-mmc1-default-pins { bootph-all; pinctrl-single,pins = < @@ -774,6 +789,42 @@ exp1: gpio@21 { }; }; +&main_i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&main_i2c1_pins_default>; + clock-frequency = <400000>; + status = "okay"; + + exp2: gpio@21 { + compatible = "ti,tca6408"; + reg = <0x21>; + gpio-controller; + #gpio-cells = <2>; + gpio-line-names = "CSI_VIO_SEL", "CSI_MUX_SEL_2", "CSI2_RSTz", + "IO_EXP_CAM0_GPIO1", "IO_EXP_CAM1_GPIO1"; + }; + + i2c-mux@70 { + compatible = "nxp,pca9543"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x70>; + + cam0_i2c: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + cam1_i2c: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + + }; +}; + &main_sdhci0 { bootph-all; /* eMMC */ -- 2.34.1