From patchwork Thu Feb 15 08:55:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaishnav Achath X-Patchwork-Id: 201280 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp260141dyb; Thu, 15 Feb 2024 00:59:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVCpaiDPZfETyO5/tf4kcs/A6BEqzCJj4wdDQFivD45I0VuDVXmfOhyDOM6MRfKBUAeXE9WS9acZp8Y8MEx04XZmcJhzw== X-Google-Smtp-Source: AGHT+IEcoquXrDbmuSRMrmYpKkupap4CYdx8k6oE/AAro32cUpUK0gsWBaJve2LL0jxzplVdiV/l X-Received: by 2002:a17:903:58d:b0:1d9:4282:4be8 with SMTP id jv13-20020a170903058d00b001d942824be8mr971524plb.25.1707987549659; Thu, 15 Feb 2024 00:59:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707987549; cv=pass; d=google.com; s=arc-20160816; b=GsbMya22Zy7uHoZs2Ep3MRCJEh9n2DpXjVyBHx+Js10WhJsTABwW31ws7hSResQspC DSwvtlzTvLXNEbBOXVgWj0JToLvj9XmGedEQ0ChxlvhUBTVZfByHJdcqDDriv2vKJZB+ vQDwu7c8o7zShOVtuXCECnCR6FD3LwAm+V3awSOl4sMUbtZjHMhbMegJjJw1JXk4miYw qBrb73tpLtXycDFOkq+8uug+ktBULCm3GjIGHtCxR2Roq1sb6qNcplHHY/oYZPfRmFIL Mj3DbmvnFT7G6s0kwZJwtb3G5uTAetPBP2SWujNCuvsw8oGXU96+bZCvzRc1pjPs2h6I Cw6g== 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=5f06S+zYcwCeq2tvXJVvkkRoi5yjPpWJZR1EyBYAnic=; fh=Q0qfAugDSiRH+GkuTIKfokhNWAVNOIduw9aJ54bFjbE=; b=bZy592Ch6qCkhymyci8HSKrdJfHhG4aqDlcfYSvW+AJs1vF7JR7VIVcjffHXkaKD2c 0gCvlwZXloP5PUiGG1KOAFS+jb0WsJlHW3gOctPBO26p7hP5MmgYKQ/PLhupFAAozqXT 5788bUss7Ob4kmX4+CzlN1lH8RoIfciXNGESOlWpuaICFBagy1ozjpSUEmXW+i/w2vcc 6hCyQSVnjP3xkFjgCJrYEjzqA3l1jkZjUgcoEchrU/Un8cU/Q30QmcL9nrVfmMpyvw9p vPHi6oZP/7weU84e6NcLq5lJH+oyAPt+54DTsn+UilMI3KRKky7rCcWq+NGSXbgMxvZq oVAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Ar/c+M6e"; 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-66459-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66459-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w12-20020a170902e88c00b001d71eac3499si830457plg.6.2024.02.15.00.59.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 00:59:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66459-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Ar/c+M6e"; 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-66459-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66459-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F223328393B for ; Thu, 15 Feb 2024 08:57:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 638BD1B952; Thu, 15 Feb 2024 08:55:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Ar/c+M6e" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 2CB8617BA7; Thu, 15 Feb 2024 08:55:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707987349; cv=none; b=gj56u51qEPg7nvVgvVuL9dXpuuNPwHooiTY2dCNz8SEbvjYrnM6q8icgZzf6Lc2i2up420tHsuO4G0tzWarH//1ghb1CYF2OxeKIlVmnL11ZYlvGPvv69v0scCe9vtWnJofTWG9GerbfuDh5Ur5EDSrS/8D6tr+nFtXb8xUvS8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707987349; c=relaxed/simple; bh=KC2c1YczNYz0dqqBXE+kxiEBxIAtI4xTHfr1LBwVRKs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=McH45ZI8mlBiBZqSPD6gc8jKRb7dK3eGqE77MaRHa8anlePqA/W8JWmzh6QlyI8pzO34y3XktqJLO2NVyHgVEMDyTORjHctel/9Tjoziy99boUHukWQA7JLy21wPo34C8kiJE1C/1aBt3cdvmdBg4gjK845MHxVeCkYKPjFfY34= 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=Ar/c+M6e; arc=none smtp.client-ip=198.47.19.141 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 lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 41F8teon090518; Thu, 15 Feb 2024 02:55:40 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1707987340; bh=5f06S+zYcwCeq2tvXJVvkkRoi5yjPpWJZR1EyBYAnic=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Ar/c+M6eDPK0g2XxckEmAojlja85ulb4yU2eHpEICfhHmDBA9UbxVV9HEqhkx5kPV whZoldPQvwqMKZORklikSrhNcqven6MBD7d6OSBd8iABSMC98c1QDB6nKoqvpKIf1k y5AfEcKHPx+gd6PW1vfu1ogH09lZCXKvcQ4/KlKo= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 41F8teK3005008 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Feb 2024 02:55:40 -0600 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 15 Feb 2024 02:55:40 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) 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.23 via Frontend Transport; Thu, 15 Feb 2024 02:55:40 -0600 Received: from uda0490681.. ([10.24.69.142]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 41F8tJ7n008333; Thu, 15 Feb 2024 02:55:36 -0600 From: Vaishnav Achath To: , , , , , CC: , , , , , , , , Subject: [PATCH v4 4/9] arm64: dts: ti: k3-am69-sk: Enable camera peripherals Date: Thu, 15 Feb 2024 14:25:13 +0530 Message-ID: <20240215085518.552692-5-vaishnav.a@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240215085518.552692-1-vaishnav.a@ti.com> References: <20240215085518.552692-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 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790954752404931707 X-GMAIL-MSGID: 1790954752404931707 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. AM69 SK schematics: https://www.ti.com/lit/zip/sprr466 Signed-off-by: Vaishnav Achath Reviewed-by: Jai Luthra --- V1->V2: Update commit message with schematics. 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 5f0a43a69333..46cf90bb3eb8 100644 --- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts @@ -322,6 +322,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 { @@ -341,6 +349,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 = < @@ -775,6 +790,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 */