From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 D459B286884 for ; Mon, 16 Jun 2025 20:14:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750104864; cv=none; b=frwLL6qvkjTVKAgWktBRLclEjBw2SIcVeOXNSfxx0hqO2OIBTbiXyzp8HaoAwzcGYBsH7wwvrpFA3rGrEDvVyWzVkKr2tF9QJL6DFPNmaS3TPx2bEEia5eZbOKK++z3A/EWIOX11f6VtJLJ3bHi8JHRtNOY1BUvY5pfljpPJ5K0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750104864; c=relaxed/simple; bh=TwP2O71xNX5KZBAcekuLe3rjLWvw+dJPP0fdo82f4Wo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dJQDYDP3da5eFzkkq53SReYtwDVrjFKuQIg/LZtLHOhqHCKwJRvG+VUzzyhwCUeJ6RFROTWvPdYoC09Fj8RF7WHDI2YTV6B6I2cMQBhHJNCtljWjmH1H0+cnRV7wSxImcRx9AogUV7j/Rzrxkk3CAQkhyCsf2SDjL631MmFj068= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=J3eCdQ6w; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="J3eCdQ6w" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1750104861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Aad9Gkf4CPYgn7WvQvhOXyC5N0TDYkAraLsrfuZwf9I=; b=J3eCdQ6wtL52yfgqPPszaMz5Ui7s1A42UpbvU/7oulFl9fpVEeNMvmSd9FfbNjdWiXqNqX wFJgb2jrx4yS3Zixrwv0kw7PAPv0kfgiEdkvCwt0hHR0ggUmHHigNc23xest0DSTfEmG7G qbXmhVfvX7ztIdKoaFyNHi6VhbbFZrw= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-592-FGeS-c9YOQuieXqBPEq_vA-1; Mon, 16 Jun 2025 16:14:17 -0400 X-MC-Unique: FGeS-c9YOQuieXqBPEq_vA-1 X-Mimecast-MFC-AGG-ID: FGeS-c9YOQuieXqBPEq_vA_1750104854 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 05F3D19560B2; Mon, 16 Jun 2025 20:14:14 +0000 (UTC) Received: from p16v.luc.cera.cz (unknown [10.45.224.53]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BEB1330001B1; Mon, 16 Jun 2025 20:14:05 +0000 (UTC) From: Ivan Vecera To: netdev@vger.kernel.org Cc: Vadim Fedorenko , Arkadiusz Kubalewski , Jiri Pirko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Prathosh Satish , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Jonathan Corbet , Jason Gunthorpe , Shannon Nelson , Dave Jiang , Jonathan Cameron , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Michal Schmidt , Petr Oros Subject: [PATCH net-next v11 00/14] Add Microchip ZL3073x support (part 1) Date: Mon, 16 Jun 2025 22:13:50 +0200 Message-ID: <20250616201404.1412341-1-ivecera@redhat.com> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Add support for Microchip Azurite DPLL/PTP/SyncE chip family that provides DPLL and PTP functionality. This series bring first part that adds the core functionality and basic DPLL support. The next part of the series will bring additional DPLL functionality like eSync support, phase offset and frequency offset reporting and phase adjustments. Testing was done by myself and by Prathosh Satish on Microchip EDS2 development board with ZL30732 DPLL chip connected over I2C bus. --- Changelog: v11: Fixed uninitialized 'rc' in error-path in patch 9 v10: Usage of str_enabled_disabled() where possible. v9: After discussion with Jakub Kicinski we agreed that it would be better to implement whole functionality in a single driver without touching MFD sub-system. Besides touching multiple sub-systems by single device there are also some technical issues that are easier resolvable in a single driver. Additionally the firmware flashing functionality would bring more than 1000 lines of code with previous approach to the MFD driver - it is not something the MFD maintainers would like to see. Ivan Vecera (14): dt-bindings: dpll: Add DPLL device and pin dt-bindings: dpll: Add support for Microchip Azurite chip family dpll: Add basic Microchip ZL3073x support dpll: zl3073x: Add support for devlink device info dpll: zl3073x: Protect operations requiring multiple register accesses dpll: zl3073x: Fetch invariants during probe dpll: zl3073x: Add clock_id field dpll: zl3073x: Read DPLL types and pin properties from system firmware dpll: zl3073x: Register DPLL devices and pins dpll: zl3073x: Implement input pin selection in manual mode dpll: zl3073x: Add support to get/set priority on input pins dpll: zl3073x: Implement input pin state setting in automatic mode dpll: zl3073x: Add support to get/set frequency on input pins dpll: zl3073x: Add support to get/set frequency on output pins .../devicetree/bindings/dpll/dpll-device.yaml | 76 + .../devicetree/bindings/dpll/dpll-pin.yaml | 45 + .../bindings/dpll/microchip,zl30731.yaml | 115 ++ Documentation/networking/devlink/index.rst | 1 + Documentation/networking/devlink/zl3073x.rst | 37 + MAINTAINERS | 10 + drivers/Kconfig | 4 +- drivers/dpll/Kconfig | 6 + drivers/dpll/Makefile | 2 + drivers/dpll/zl3073x/Kconfig | 36 + drivers/dpll/zl3073x/Makefile | 10 + drivers/dpll/zl3073x/core.c | 968 +++++++++++ drivers/dpll/zl3073x/core.h | 371 ++++ drivers/dpll/zl3073x/dpll.c | 1494 +++++++++++++++++ drivers/dpll/zl3073x/dpll.h | 42 + drivers/dpll/zl3073x/i2c.c | 95 ++ drivers/dpll/zl3073x/prop.c | 358 ++++ drivers/dpll/zl3073x/prop.h | 34 + drivers/dpll/zl3073x/regs.h | 206 +++ drivers/dpll/zl3073x/spi.c | 95 ++ 20 files changed, 4003 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/dpll/dpll-device.yaml create mode 100644 Documentation/devicetree/bindings/dpll/dpll-pin.yaml create mode 100644 Documentation/devicetree/bindings/dpll/microchip,zl30731.yaml create mode 100644 Documentation/networking/devlink/zl3073x.rst create mode 100644 drivers/dpll/zl3073x/Kconfig create mode 100644 drivers/dpll/zl3073x/Makefile create mode 100644 drivers/dpll/zl3073x/core.c create mode 100644 drivers/dpll/zl3073x/core.h create mode 100644 drivers/dpll/zl3073x/dpll.c create mode 100644 drivers/dpll/zl3073x/dpll.h create mode 100644 drivers/dpll/zl3073x/i2c.c create mode 100644 drivers/dpll/zl3073x/prop.c create mode 100644 drivers/dpll/zl3073x/prop.h create mode 100644 drivers/dpll/zl3073x/regs.h create mode 100644 drivers/dpll/zl3073x/spi.c -- 2.49.0