From patchwork Sun Jun 9 12:58:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13691245 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 81635C27C53 for ; Sun, 9 Jun 2024 13:01:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PNlLyxxKLd1AnIJFnifT9IY/NoWSHbEEnf/z4YTMVOE=; b=XxPE3LmmmkiBm5 n1CpEJuNzW+by0VhWhYR33qSl0akBaPKbqEgtMxQJLJoc4Oq2Y0/alnotPXBcq3zTa0BWwo0lqzBf 1FeNJRq4fDm7u8h6fNMqqYNAt/SHfYHPJ6imuYja8ri3urLKURdRSzAfggBEUBsNemTgpomwKHhNQ 5GsP440PNt9ktv8Z5VV2X/JSi41MXZ2qvA5oiq9vjlJYq/uQHmb2QiodP2igclmxKx0TDpftbS5OR blONtoOlc3djitVnM4oohHJxOJx42nJun1uyx/VGLOThHGBIDzafHSX/4JPcjRvfgKdt1UHXS1tT/ kaVsY0rTeFmwiKtPl4tQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGIAc-00000002bvf-3Z4F; Sun, 09 Jun 2024 13:01:15 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGIAZ-00000002bv9-2ADn for linux-arm-kernel@lists.infradead.org; Sun, 09 Jun 2024 13:01:13 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a6e349c0f2bso263134066b.2 for ; Sun, 09 Jun 2024 06:01:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717938069; x=1718542869; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=REsRox1e0RuQ8D5QAaZjLhlhSVKgshVITv7B++1K8Ss=; b=ICwtjRVXylBawJJVlVsx7FHLMwihHv6/Jxd+8/Xk3NlkzSfmsOBLWTc2b0rsNFx7y6 IYMxTR2YmSB6yO+JWISGr5euPAUwd622/c1Ikt/cV6lbJhrFK3EzQPx31VspJ7dPlsHw BjjPM/t2T5oKNXIq7oSAxTwAZKG75ZhOuTymhJoQs81jA+IZo/U8S73AgIJJx5p19RVV LnPGrrIV33Y3ZtGnSFmu7zjjFrUJWIpTAyrqLVtgMTWwIqIutUmYrxBu3NTS6Jn31/oM d8PxodXNiU9CNLQJlGdaz052mc8/2UJwnrI53/cgKGcMgpYnl3Ap7YKKZVSQNKm/qLlV lN1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717938069; x=1718542869; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=REsRox1e0RuQ8D5QAaZjLhlhSVKgshVITv7B++1K8Ss=; b=MHpB491GvnMmbZ+FPZpbkEXCnsBeb7mDQqJsDuYYeiMTwYZds6b/GyPYPvezT0oVb5 TfPPvb3SnA1ayz+U0uQ+TDMWCSsNjMUv3bxEgg6Uf6g5MKMP4AY9cDBiuvelNGVvgFVi f36hGVbhM852q68dlqKvCh7VVDKNJ6790j2Ufso5vVnchhg+QEiRphPjFSG7jgTsh+6u YxRz0uNRd1SK7/e8lTA425KNdPB3Dpape7m1v0RP4SanM9gb9cVWewl2CQsHyv4q/oHn 1SLG/ywyv/PMDkb2eerLMdRAbzbe890AtvklOTgR4g6NzNm1Xa+Ysxsj6OgF/y9uU4Qn DqvA== X-Forwarded-Encrypted: i=1; AJvYcCWDcpAca0RtNVnMnX0koPqfUuWsK4MLqw7cxxjKJ6RfxAeMEef2KixAouXAF9RDEFUPIYbVl+0NnLvPcGBDC+J2MoJBU5NvS/G6W+EPB2ZlKzz4vsI= X-Gm-Message-State: AOJu0Yw+hzbkLJhhH78KLUGrvn2+eRDjjpNg3csmRuz5ZJj1DP5618gm oSGQWfQn5kKCIBXU/8IU9g13rQ6xW+dPyrRbLtE6hTfCDEB6uZq8 X-Google-Smtp-Source: AGHT+IHuwX9E4jd+uOP3g2E/VCQpCP2FwgjdCll+ONft/3eSl0lcdXlxqQ5XLFW8iIp/cysdKtueIQ== X-Received: by 2002:a17:906:4a4a:b0:a6f:74:d389 with SMTP id a640c23a62f3a-a6f0074d52fmr240671266b.14.1717938068825; Sun, 09 Jun 2024 06:01:08 -0700 (PDT) Received: from lmc-playground.localdomain ([188.25.209.252]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f1841fceasm85961266b.70.2024.06.09.06.01.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 06:01:08 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Philipp Zabel , Liu Ying , Sascha Hauer Cc: laurentiu.mihalcea@nxp.com, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] dt-bindings: reset: add schema for imx8ulp SIM reset Date: Sun, 9 Jun 2024 15:58:59 +0300 Message-Id: <20240609125901.76274-2-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240609125901.76274-1-laurentiumihalcea111@gmail.com> References: <20240609125901.76274-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240609_060111_590316_FAFFC5CE X-CRM114-Status: GOOD ( 13.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea Add schema for imx8ulp's SIM reset controller. Signed-off-by: Liu Ying Signed-off-by: Laurentiu Mihalcea --- .../bindings/reset/nxp,imx8ulp-sim-reset.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/nxp,imx8ulp-sim-reset.yaml diff --git a/Documentation/devicetree/bindings/reset/nxp,imx8ulp-sim-reset.yaml b/Documentation/devicetree/bindings/reset/nxp,imx8ulp-sim-reset.yaml new file mode 100644 index 000000000000..e7faec55ff36 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/nxp,imx8ulp-sim-reset.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/reset/nxp,imx8ulp-sim-reset.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX8ULP System Integration Module Reset Controller + +maintainers: + - Liu Ying + +description: | + Some instances of i.MX8ULP's SIM may offer control + over the reset of some components of a certain domain + (e.g: AVD-SIM). + +properties: + compatible: + items: + - enum: + - nxp,imx8ulp-avd-sim-reset + - const: syscon + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + '#reset-cells': + const: 1 + + mux-controller: + $ref: ../mux/reg-mux.yaml + +required: + - compatible + - reg + - '#reset-cells' + +allOf: + - if: + properties: + compatible: + contains: + const: nxp,imx8ulp-avd-sim-reset + then: + required: + - mux-controller + - clocks + +additionalProperties: false + +examples: + - | + #include + syscon@2da50000 { + compatible = "nxp,imx8ulp-avd-sim-reset", "syscon"; + reg = <0x2da50000 0x38>; + clocks = <&pcc5 IMX8ULP_CLK_AVD_SIM>; + #reset-cells = <1>; + + mux-controller { + compatible = "mmio-mux"; + #mux-control-cells = <1>; + mux-reg-masks = <0x8 0x00000200>; + }; + }; From patchwork Sun Jun 9 12:59:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13691247 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7ECFC27C53 for ; Sun, 9 Jun 2024 13:01:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1k5arhQcrwtROBT5kG0Swq7NpbgVeMNk+cqe7mTRiBA=; b=VXvolhCJTFRsYP WYwX2LMi8FuvgJRqF0zEwjJ5KmlK82ts61IBYTsvEuhFh5FYgLoy7XQFwa2TV25Y+RqLmtlySpCfZ biZGMPrDaUuiYGyFPs4UBM0UWamemJdGUsZT+IuUK3jbrGP0pCNhVkftHN1PKuVfQC1QWV2QUZ11+ IIuzqZ0K9ikPmghxZbWClkrD6jFPxdydrMtAUp2FLxQAHKNb5dzZzwWBugA6Caw+ehRGsODVplui/ GVP1eHCKESkYKd7pO+CtYg/BBum/0Znlsayi8yV4aKO1KYRbUznYC91qVAO52Se5F3XbluTZ5KAXO iB2lNkeWorl+xSbzm3mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGIAg-00000002bwe-0vTC; Sun, 09 Jun 2024 13:01:18 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGIAd-00000002bve-1at8 for linux-arm-kernel@lists.infradead.org; Sun, 09 Jun 2024 13:01:17 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a6ef793f4b8so187726766b.1 for ; Sun, 09 Jun 2024 06:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717938074; x=1718542874; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=roddXwv5d465/lxlFzMrZn0lrN/Jz4rrWHyGURYshMc=; b=ZkoViWuAYx7i33uhiuhwHCZoerhckTzjDdqY2kcL6LAdw5bZbNrZAAuSDTi6PoEtfE wv9hnnowmF4vbONPHgfeks5QkezD23kbvQNzCiFfFXs8Wd7Bpi3Z/4JXrXkHpUw/sDrG 3vuSAFvQlCJVfst8rmp74KMpo8Yiv7+k6mTeb0u6W1jQT4EyphMA1GQ/UOS9GY6a0VeK mrpdxJv1+9q6KIRzUszrNu2eHInuSM80J1zTfmb3CKTJYDH4ycni2IQN5o1CoE+xTZlD JrcGdbWW5sgjeOLyNHRilV/TgMr4RrZGsTLS1o9/IN7VQ7USuKhLTQepXSYRXJVh5VRj TdnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717938074; x=1718542874; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=roddXwv5d465/lxlFzMrZn0lrN/Jz4rrWHyGURYshMc=; b=lYttd+Xv9xF/48JIrcyVJAJKTWeIStICVFtGiPnJFFTaAh3ys8W6a9O8inZP2UBkyn iyg8l6W+OsZ0Ar/EWJVbDzGHV39Hf9HGnoWWK7BFVz5+O7qEkkxu+vOY/unE21V6QrLl TC1RAM8edgAAm2/5n2pDVZBpNrRon8zZwbW/d1Sd+zNGfkXQOBudiSnEOh/zZ/7nivdZ GrphAKJHbttXIrsRb5BfylmBrCRxA4ywZxskIK6HmQy5xTSa+JUM+pPv8iG0RlhtK0wE 5Lp5KlzrHrne+zixR8J5St8YLnzMQcwdzgKwrKdpmgBEwDfAOA3jzI8AnO0H5fmUrS7r 7GrA== X-Forwarded-Encrypted: i=1; AJvYcCXnl1I4Zv87L8qldTVCT0Nu6nmMTo/5vgAg3PvXVqPcKbTc7tUMHClxjCtV7l544UgUnILT2c+1FErS+MNC5wHte1zkkbkCvHoDDfUJ8KfGSqB1bxk= X-Gm-Message-State: AOJu0YyWzhliT93phfeJFQdZQNXtKCAz45HoLP5ZV+dkRxEQZGdv4TOq G5Gtf1hYq04txYSfB6PU1bepax9Pw9HZlBVYF/q9K86Ro1LVWf9X X-Google-Smtp-Source: AGHT+IGreRkBONukfacHwv3hN2S0XEX0TDLoo4NDkaB14N8SCtzAN4GtduaJrUVGiB3CjataKqHrAQ== X-Received: by 2002:a17:906:1752:b0:a6e:facf:f982 with SMTP id a640c23a62f3a-a6efacffa1emr277059466b.23.1717938073841; Sun, 09 Jun 2024 06:01:13 -0700 (PDT) Received: from lmc-playground.localdomain ([188.25.209.252]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f1841fceasm85961266b.70.2024.06.09.06.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 06:01:13 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Philipp Zabel , Liu Ying , Sascha Hauer Cc: laurentiu.mihalcea@nxp.com, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] reset: add driver for imx8ulp SIM reset controller Date: Sun, 9 Jun 2024 15:59:00 +0300 Message-Id: <20240609125901.76274-3-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240609125901.76274-1-laurentiumihalcea111@gmail.com> References: <20240609125901.76274-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240609_060115_558973_9A40AD31 X-CRM114-Status: GOOD ( 23.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea Certain components can be reset via the SIM module. Add reset controller driver for the SIM module to allow drivers for said components to control the reset signal(s). Signed-off-by: Liu Ying Signed-off-by: Laurentiu Mihalcea --- drivers/reset/Kconfig | 7 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-imx8ulp-sim.c | 103 ++++++++++++++++++ include/dt-bindings/reset/imx8ulp-sim-reset.h | 16 +++ 4 files changed, 127 insertions(+) create mode 100644 drivers/reset/reset-imx8ulp-sim.c create mode 100644 include/dt-bindings/reset/imx8ulp-sim-reset.h diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 7112f5932609..9b3574a4f1c6 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -91,6 +91,13 @@ config RESET_IMX7 help This enables the reset controller driver for i.MX7 SoCs. +config RESET_IMX8ULP_SIM + tristate "i.MX8ULP SIM Reset Driver" + depends on ARCH_MXC + help + This enables the SIM (System Integration Module) reset driver + for i.MX8ULP SoC. + config RESET_INTEL_GW bool "Intel Reset Controller Driver" depends on X86 || COMPILE_TEST diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile index fd8b49fa46fc..f257d6a41f1e 100644 --- a/drivers/reset/Makefile +++ b/drivers/reset/Makefile @@ -42,3 +42,4 @@ obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o obj-$(CONFIG_RESET_UNIPHIER_GLUE) += reset-uniphier-glue.o obj-$(CONFIG_RESET_ZYNQ) += reset-zynq.o obj-$(CONFIG_ARCH_ZYNQMP) += reset-zynqmp.o +obj-$(CONFIG_RESET_IMX8ULP_SIM) += reset-imx8ulp-sim.o diff --git a/drivers/reset/reset-imx8ulp-sim.c b/drivers/reset/reset-imx8ulp-sim.c new file mode 100644 index 000000000000..d1b9511a5c6a --- /dev/null +++ b/drivers/reset/reset-imx8ulp-sim.c @@ -0,0 +1,103 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define AVD_SIM_SYSCTRL0 0x8 + +struct imx8ulp_sim_reset { + struct reset_controller_dev rcdev; + struct regmap *regmap; +}; + +static const u32 imx8ulp_sim_reset_bits[IMX8ULP_SIM_RESET_NUM] = { + [IMX8ULP_SIM_RESET_MIPI_DSI_RST_DPI_N] = BIT(3), + [IMX8ULP_SIM_RESET_MIPI_DSI_RST_ESC_N] = BIT(4), + [IMX8ULP_SIM_RESET_MIPI_DSI_RST_BYTE_N] = BIT(5), +}; + +static inline struct imx8ulp_sim_reset * +to_imx8ulp_sim_reset(struct reset_controller_dev *rcdev) +{ + return container_of(rcdev, struct imx8ulp_sim_reset, rcdev); +} + +static int imx8ulp_sim_reset_assert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct imx8ulp_sim_reset *simr = to_imx8ulp_sim_reset(rcdev); + const u32 bit = imx8ulp_sim_reset_bits[id]; + + return regmap_update_bits(simr->regmap, AVD_SIM_SYSCTRL0, bit, 0); +} + +static int imx8ulp_sim_reset_deassert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct imx8ulp_sim_reset *simr = to_imx8ulp_sim_reset(rcdev); + const u32 bit = imx8ulp_sim_reset_bits[id]; + + return regmap_update_bits(simr->regmap, AVD_SIM_SYSCTRL0, bit, bit); +} + +static const struct reset_control_ops imx8ulp_sim_reset_ops = { + .assert = imx8ulp_sim_reset_assert, + .deassert = imx8ulp_sim_reset_deassert, +}; + +static const struct of_device_id imx8ulp_sim_reset_dt_ids[] = { + { .compatible = "nxp,imx8ulp-avd-sim-reset", }, + { /* sentinel */ }, +}; + +static int imx8ulp_sim_reset_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct imx8ulp_sim_reset *simr; + int ret; + + simr = devm_kzalloc(dev, sizeof(*simr), GFP_KERNEL); + if (!simr) + return -ENOMEM; + + simr->regmap = syscon_node_to_regmap(dev->of_node); + if (IS_ERR(simr->regmap)) { + ret = PTR_ERR(simr->regmap); + dev_err(dev, "failed to get regmap: %d\n", ret); + return ret; + } + + simr->rcdev.owner = THIS_MODULE; + simr->rcdev.nr_resets = IMX8ULP_SIM_RESET_NUM; + simr->rcdev.ops = &imx8ulp_sim_reset_ops; + simr->rcdev.of_node = dev->of_node; + + ret = devm_of_platform_populate(dev); + if (ret) + return ret; + + return devm_reset_controller_register(dev, &simr->rcdev); +} + +static struct platform_driver imx8ulp_sim_reset_driver = { + .probe = imx8ulp_sim_reset_probe, + .driver = { + .name = KBUILD_MODNAME, + .of_match_table = imx8ulp_sim_reset_dt_ids, + }, +}; +module_platform_driver(imx8ulp_sim_reset_driver); + +MODULE_AUTHOR("Liu Ying "); +MODULE_DESCRIPTION("NXP i.MX8ULP System Integration Module Reset driver"); +MODULE_LICENSE("GPL"); diff --git a/include/dt-bindings/reset/imx8ulp-sim-reset.h b/include/dt-bindings/reset/imx8ulp-sim-reset.h new file mode 100644 index 000000000000..9f8fb8680a5e --- /dev/null +++ b/include/dt-bindings/reset/imx8ulp-sim-reset.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */ + +/* + * Copyright 2024 NXP + */ + +#ifndef DT_BINDINGS_RESET_IMX8ULP_SIM_H +#define DT_BINDINGS_RESET_IMX8ULP_SIM_H + +#define IMX8ULP_SIM_RESET_MIPI_DSI_RST_DPI_N 0 +#define IMX8ULP_SIM_RESET_MIPI_DSI_RST_ESC_N 1 +#define IMX8ULP_SIM_RESET_MIPI_DSI_RST_BYTE_N 2 + +#define IMX8ULP_SIM_RESET_NUM 3 + +#endif /* DT_BINDINGS_RESET_IMX8ULP_SIM_H */ From patchwork Sun Jun 9 12:59:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13691248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DEE09C27C53 for ; Sun, 9 Jun 2024 13:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RQ7vFtOb+WsZ4cEX9N8UT0B6gLit+uCLY49s9vcRXLI=; b=hREc5hhwAdAT+p ujr+x6uwpWCDpX6YzsM8bs0UQicnmrqIqzT8EuQHCq7Sgck/72QGSq4SA61Ins5wv+wHOpd/JkRyv pOvZZfFjpBKTaE9m9G9MA1IikhYDaTfYmcHyqQJxTn1dQTJzZGOyPDUHVFz0QcATWmenRWwJz8gMJ z7LfMJjlYRK9S6tRdAYU9hIYp8t9g8i0MntPTdZzEY1osjjrbMI0/CrGl2BBp3oqGWST5wUaZGYkh NvXNlBWdQQ2PKkoZ5kIjLHVYcIcwide9oQcI4IQOd5vw0k0VdKVGCLqxKW9y26yFI7bNwiwqTJxPa cIxCZaFVlJcPdI3RBI/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGIAm-00000002c01-1kYw; Sun, 09 Jun 2024 13:01:24 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGIAi-00000002bwj-0gJY for linux-arm-kernel@lists.infradead.org; Sun, 09 Jun 2024 13:01:22 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-57c6afa1839so600422a12.2 for ; Sun, 09 Jun 2024 06:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717938078; x=1718542878; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wXLPtmmwbw0kH9maBt8kI0QUZhZ3U60BovT7L6yY3xs=; b=gjTzKEH5ivKK1zN7LcyuIa/2aG6fnQPPH1S0O/WPL0QhH3xb3XxVsLAGnDATYnD5mo AxVF/kEgFoB2KutDronBAHzom2ot/81bqmygsWa9S8LxxNHIwgx6JLJ1lI37YBujYIJC nE9yJrKMk3Da6FOKShdon+yhp58vUA3pcxgwBj5tIWfTLhOaY2QYHCaCH6V7q8CRTFso 7qo8dR/d87I4oGunpargmh6+6gwPhlqSQ60rzAJsBpOhhf5HplZS22o/Q3wken+2770B uKEAOVj5aJAhHrXEmNT5xJ3Cv7Tj2FlASkVk8GFkqklyJTVIqQ66g+SW/2Sjs2NHcQtO JZCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717938078; x=1718542878; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wXLPtmmwbw0kH9maBt8kI0QUZhZ3U60BovT7L6yY3xs=; b=OYWJu8ZZbdnI/BZ1hfalrdv5PBLYCw/9kjrfRhZmj36GW43pxfcGu4vBpH32SDQQOG HPVN78CS2nRFkDJLbSloWoviN4ovbWmdN7mIPeR8H7V2t34hzOw4dAPnaiMc0MfNd4bG lvGQ8pRLa92zPek27vJoVH87ICt0UnRPi+K83q7rTtLMYki1LH/FyRxKgXHgMGhRUU7G C9cMuGN/gYquklDHrKJRUbUWavCR2rI/HPcQQAKE6xx5vZT4mSu14mQ7hnK+XSP9RAzd Pcb7oOGKS+Oj4WC8XzgufxsLZe0/bfCg+wrppJ2gHlBBscgh6HRuRpJw+hljT7ZfFQW1 1EBA== X-Forwarded-Encrypted: i=1; AJvYcCUmaKwickfBhpXWmYmCebsbfNkSGMlVKeHzycYD57dS3oX1fKYje+dc8kA4buCadk/TAvyuSL0sXxsSAiCj2dk+8Reqv4mSu6o9ojW6JXlYY/2HT+0= X-Gm-Message-State: AOJu0Ywe6iH5ykB2NK3+0GzIQfw6AmlFxRRcti+N4+CH0gkFhS/cDv1y KCnGDE7n89/Nm0z1lU1LEjOxKAfDSKt7cZdkARdikHGJo1n4XZ53ZmHkEhpc X-Google-Smtp-Source: AGHT+IE9cuXF727TvRThgldcemuwA9M4zGggMb69uY2vp+iF779s8nKt7+bEy+hu202ctfIWzJUajQ== X-Received: by 2002:a50:c308:0:b0:57c:6d89:eaef with SMTP id 4fb4d7f45d1cf-57c6d89f0damr2532005a12.18.1717938077578; Sun, 09 Jun 2024 06:01:17 -0700 (PDT) Received: from lmc-playground.localdomain ([188.25.209.252]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f1841fceasm85961266b.70.2024.06.09.06.01.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 06:01:17 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Philipp Zabel , Liu Ying , Sascha Hauer Cc: laurentiu.mihalcea@nxp.com, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] arm64: dts: imx8ulp: add AVD-SIM node Date: Sun, 9 Jun 2024 15:59:01 +0300 Message-Id: <20240609125901.76274-4-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240609125901.76274-1-laurentiumihalcea111@gmail.com> References: <20240609125901.76274-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240609_060120_501711_51A003FC X-CRM114-Status: GOOD ( 10.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea Add node for imx8ulp's AVD-SIM module. This also includes its children. Signed-off-by: Liu Ying Signed-off-by: Laurentiu Mihalcea --- arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi index e32d5afcf4a9..1ffa4da23042 100644 --- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi @@ -614,6 +614,19 @@ per_bridge5: bus@2d800000 { #size-cells = <1>; ranges; + avd_sim: syscon@2da50000 { + compatible = "nxp,imx8ulp-avd-sim-reset", "syscon"; + reg = <0x2da50000 0x38>; + clocks = <&pcc5 IMX8ULP_CLK_AVD_SIM>; + #reset-cells = <1>; + + mux: mux-controller { + compatible = "mmio-mux"; + #mux-control-cells = <1>; + mux-reg-masks = <0x8 0x00000200>; + }; + }; + cgc2: clock-controller@2da60000 { compatible = "fsl,imx8ulp-cgc2"; reg = <0x2da60000 0x10000>;