Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp901122pxb; Tue, 1 Feb 2022 12:47:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyk+uXKJ0ALzkp/WlC73/wiHhckpoVxhiYDqkhfrNzp4L0QdfrUUMSNqLz6cX/rVDoommS8 X-Received: by 2002:a17:902:c9c2:: with SMTP id q2mr28755276pld.18.1643748427054; Tue, 01 Feb 2022 12:47:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748427; cv=none; d=google.com; s=arc-20160816; b=hqq8mbUtjBRqcBdflFWcvdoB/R2V+9kfQBY0Pp6u61fcJCrzPg/DKwv8Fe9ewmB8UR Q2+k4GMVmfanKaKjNJ00ITFATF5SZh44Sc/JzI3A/JkWWbkMO9+APJgTlxEfD7PyMDSQ jRZjlNtThbvcefKDnnDFe9SacudoeQbDSpvuidhH0e+VNVmozhTc/rD/2ih1XxpbTLYq W5YvVPLy7s/fhvFw653v2bglAar7FkV7ImjKjJ7l294pgHW2JSgfSNsroFt6Py0qV9mq PlIdYVfLzcXblM5Y/b8psOxBJgDCRQcTUgso1IbT6ayxBASGjDQFmuaG2TsWwbnxYsyC FZ/A== 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=VLMIB5di9I0VDIL5H5UUP/jwNEAc7V0txtDjq9XRoXQ=; b=0EzxVEm7wgPZ3jiG7Pa67CZUMh5JnEN94PWNlZbJvluDPBWx1MCebAVX0FD/6nDspx mlfL7yIC/tPJTf82QvIb8gLQ62SzhBREa0Q3WITUy6Bm6JJcCNFBY0S83At2rBWkEjWL iKdDBe81T8f8vGNO4D6V+m/CjQRbqFSyupd8rQInrwIgBQ6JtJklGJw601Jnuibs7mpz 0tSTqHCVDdVFX8w5Nft6MSXgrgj/Q0kF7FjYWT651VOqWfGkFys25t3OCIE+/IoLHxmr nn3/Z7tYmehj3RDdOMfAaOnSk2Wq/gWL9f/WhifQQyBTDec66lKi4LS4kssQ/QSzL0jr CPNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GjeAI5OD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j72si10969724pge.589.2022.02.01.12.46.55; Tue, 01 Feb 2022 12:47:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GjeAI5OD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1380511AbiAaRdn (ORCPT + 99 others); Mon, 31 Jan 2022 12:33:43 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:47310 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381011AbiAaRdd (ORCPT ); Mon, 31 Jan 2022 12:33:33 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 20VHXJ9g127080; Mon, 31 Jan 2022 11:33:19 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1643650399; bh=VLMIB5di9I0VDIL5H5UUP/jwNEAc7V0txtDjq9XRoXQ=; h=From:To:CC:Subject:Date; b=GjeAI5ODYE0dAOmKoWI3kMmg/MEhdoZqFXTiEYXfdJU3kN2G+h7ArAWG1rJL7N8Eb WJB+5RlkeLqD8n36WrKAfX4MUIUdPg+DNKkJyyBCwgKv0fsSmvhnr5OLVc4XiUqeIB kUK+u+tTGSbhplp/HKJChtl2TmueH9MkWO0jCOiM= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 20VHXJeZ069338 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 31 Jan 2022 11:33:19 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Mon, 31 Jan 2022 11:33:19 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Mon, 31 Jan 2022 11:33:19 -0600 Received: from pratyush-4F-325.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 20VHXFpd034468; Mon, 31 Jan 2022 11:33:16 -0600 From: Pratyush Yadav To: Vinod Koul CC: Pratyush Yadav , Laurent Pinchart , Paul Kocialkowski , Tomi Valkeinen , Vignesh Raghavendra , Kishon Vijay Abraham I , Rob Herring , Swapnil Jakhade , , , Subject: [PATCH v9 0/4] Rx mode support for Cadence DPHY Date: Mon, 31 Jan 2022 23:03:10 +0530 Message-ID: <20220131173314.2073641-1-p.yadav@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series adds support for Cadence DPHY Rx driver. It has been split off from [0] to facilitate easier merging. I have still kept the version number to maintain continuity with the previous patches. The earlier version used the same binding for Tx and Rx DPHY. With the separate driver, I have added a separate binding. But I am still keeping the old conversion patch in this series since I have already done the work in converting the binding to yaml, might as well get it merged. Tested on TI's J721E with OV5640 sensor. [0] https://patchwork.linuxtv.org/project/linux-media/list/?series=5526&state=%2A&archive=both Changes in v9: - Use %ld instead of %d for printing PTR_ERR(). Changes in v8: - Move lanes check to start of configure sequence. - Change MODULE_LICENSE() to "GPL". Changes in v7: - Add spaces after { and before } in the bands table. - Drop the wrapping around the for loop on cdns_dphy_rx_get_band_ctrl(). - Make cdns_dphy_rx_wait_for_bit() inline. - Print an error message if registering PHY provider fails. Changes in v6: - Add a new binding for DPHY Rx. - Move the DPHY Rx part to a separate driver. - Drop Rx specific changes from the cdns,dphy.yaml binding. Keep those in cdns,dphy-rx.yaml Changes in v5: - Use the new cdns_dphy_info to specify PHY ops. - Re-order include in alphabetical order. - Make bands const. - Drop num_bands. - Make i, lanes unsigned. - Drop the maximum check in cdns_dphy_rx_get_band_ctrl(). Let the loop complete and return -EOPNOTSUPP when we reach the end. - Drop the "rate < bands[i].min_rate" check since the bands are in ascending order. - Move data_lane_ctrl to start of function and make it static const. Changes in v4: - Drop the submode parts. Use a different compatible for the Rx ops. - Make bands and num_bands static. - Drop the submode patches. Use a different compatible for Rx mode DPHY instead. Changes in v3: - Use a table to select the band. - Use a table to poll the data lane ready bits. - Multiply the DPHY HS clock rate by 2 to get the bit rate since the clock is DDR. - Add Rob's R-by. Changes in v2: - Drop reg description. - Add a description for each DPHY clock. - Rename dphy@... to phy@... in example. - Add Laurent's R-by. - Re-order subject prefixes. - Add power-domain to the example. - Add Laurent's R-by. - Re-order subject prefixes. Pratyush Yadav (4): phy: cadence: Add Cadence D-PHY Rx driver phy: dt-bindings: Convert Cadence DPHY binding to YAML phy: dt-bindings: cdns,dphy: add power-domains property phy: dt-bindings: Add Cadence D-PHY Rx bindings .../devicetree/bindings/phy/cdns,dphy-rx.yaml | 42 +++ .../devicetree/bindings/phy/cdns,dphy.txt | 20 -- .../devicetree/bindings/phy/cdns,dphy.yaml | 56 ++++ drivers/phy/cadence/Kconfig | 8 + drivers/phy/cadence/Makefile | 1 + drivers/phy/cadence/cdns-dphy-rx.c | 255 ++++++++++++++++++ 6 files changed, 362 insertions(+), 20 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/cdns,dphy-rx.yaml delete mode 100644 Documentation/devicetree/bindings/phy/cdns,dphy.txt create mode 100644 Documentation/devicetree/bindings/phy/cdns,dphy.yaml create mode 100644 drivers/phy/cadence/cdns-dphy-rx.c -- 2.34.1