From patchwork Mon Jul 15 16:45:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13733659 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 B12EFC3DA4A for ; Mon, 15 Jul 2024 16:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BE107BcHqsNE5dZ7htAOIriFiMS47OFGE7QlqBRD04Y=; b=i+j4KSbI2Wn8XJWkogcUCVEfuv 4JjqTCBaTz1R/Gzhpkgs2+FG04Ge9iSbkN7pA8nS0NdWvHKp4jn7ZgfsYq7h0pzNxDbRNWN3ibeHS 4I4phLB5npGRBO17/RkV4vT5m/9PPy5an5qTbukux/bCwCrdCuUL7BC1oZWM1ETASgurwrXb6MLMW qP3rNYjQMIvmDEilUNgi7+Qz8WrqJhaPUsJA4uEp/De+YFdX65qHB35qSOGv3bY8DrGQRW+ctD+ue 4+LwyY9ausAmL4+qapAtaUGLGDfCTcV10YJuF74Kvix/ap9f65GZ9gyehCdaqhrnPKWScRfiY4Rq8 k661hukw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTOr5-00000007mOr-3mtQ; Mon, 15 Jul 2024 16:47:15 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTOqZ-00000007mCP-03hR for linux-arm-kernel@lists.infradead.org; Mon, 15 Jul 2024 16:46:45 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4279ca8af51so26631155e9.3 for ; Mon, 15 Jul 2024 09:46:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721062001; x=1721666801; 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=BE107BcHqsNE5dZ7htAOIriFiMS47OFGE7QlqBRD04Y=; b=YTUEJIOvJeMgTZH/qhgwe7/MEeByvSdGnoGxDm1ozadtw9/fRKAUl6DPMcenB+Dp1z erDFRZ9s76e2d6A2sCbZBYR5VNWwCPblMjpTI7WbNbh2eHk2y9y2Z4gCPpJDMyin5ScK jLnAs2+CzpXLL6yrtuf9Q+zZzDUpNoVajBWsJqEBZoR9YohyvP1PWCr1U1LUWfm6zjvC KxrEPQ1wCdsF7Zzr9pSw9yrrmhlLby6pEfgLzY60H//zpGgQag/xbzimEF3KJKCwFFHd MmSCvBLWjlB+3TLJTLnYYzqaT8rbRhxp4sAzSZ9ab7PWyuz3tt6eIXnuq9+1TP2qe1Kw SeXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721062001; x=1721666801; 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=BE107BcHqsNE5dZ7htAOIriFiMS47OFGE7QlqBRD04Y=; b=qantydSinTA4M0L9XA4forTdeFWtHKv/qGjlXNCbRwphC+FZw38gmGD3Qyn2vfYp1y 7RtD3bBw5Llrd0atnuiK8Yw2ZyHnXpaUGtDnIYR5qaSYyLKeJmYhI6TASpwfVNb+wyuN jw7mTvZgZveqx+ucBofOiTFeEOsx3ZOrMw2iWLgtrZrDOnQKANEv3rW3en1hJ4kARqzk jELvJXNauZfvdKimeElzQgAF3iNuFJoTMwy1nqXZCG650s2srrFdGJElmqCL4xokeXhU cWKPcfkUTjbTEhE843rnCZqLO2Um1b4HIO+VpRJoksEtCRvVoN8PAl4D6tWILsgZrQF9 OlUA== X-Forwarded-Encrypted: i=1; AJvYcCUVDgo/Qde2qt9SBI/iyB4vF3zypwoYIn9Bfxm0l+mBiPJGuaxBJB3EfSUNhyfEjQtwZZALMbO25ujkZrylkJr/Mj9ed5Ir9nxQ2etBlGBExXTq4TA= X-Gm-Message-State: AOJu0YwqN0h3phP6LUcL1zi17RsAQGfo2uQfBVp9PXlIEoIZbmn1ORPX 088ytWKJqIREGrtK0/CMCfCjnIWcfchhpHoNxtlHw59S9K49lL9X X-Google-Smtp-Source: AGHT+IHIy6chjAutKf/iJIZQURe9szXYTSWbYLQqamzyq1p7dzNS2ZlGs2F6yEGiZtrsigYIbUcOnQ== X-Received: by 2002:a05:600c:4e90:b0:426:5d0d:a2c9 with SMTP id 5b1f17b1804b1-427b8893008mr1417175e9.10.1721062001372; Mon, 15 Jul 2024 09:46:41 -0700 (PDT) Received: from playground.localdomain ([188.25.209.252]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a5e7749esm94316975e9.2.2024.07.15.09.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 09:46:40 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Philipp Zabel , Liu Ying , Sascha Hauer , Conor Dooley Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/3] dt-bindings: reset: add schema for imx8ulp SIM reset Date: Mon, 15 Jul 2024 12:45:12 -0400 Message-Id: <20240715164514.8718-2-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240715164514.8718-1-laurentiumihalcea111@gmail.com> References: <20240715164514.8718-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240715_094643_088594_1970097E X-CRM114-Status: GOOD ( 13.49 ) 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 --- .../reset/nxp,imx8ulp-avd-sim-reset.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml diff --git a/Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml b/Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml new file mode 100644 index 000000000000..ae03c5750fa7 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/reset/nxp,imx8ulp-avd-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: /schemas/mux/reg-mux.yaml# + +required: + - compatible + - reg + - '#reset-cells' + - 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 Mon Jul 15 16:45:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13733660 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 F138BC3DA59 for ; Mon, 15 Jul 2024 16:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Jh6JZ+1LYv7M2Ni3seuv4GEQ7MYtjKnioH0Jix8Ipz0=; b=cpBnOEZSCy45i2VixNGbS1W9n2 pSVPlVcfFjWL/gONh5GNrhju4ndH7ni8xvsqvqibtQehEK7bWkjBB4jlD8XvnEzFsRLd7LY9Bnwhe /E4s0dziew2smsPnWz/8KYFzEBRO9ApYOLNZAVNriBhqjPDfqTmq2ZwOB58ddIvTMejo71SxScESa 9TdLCt6VlCuItkOfRJ5Z7GLIZWSP7jiQ0mf3luaUKJRSYLThD5EWTlC615ozysY4ZaOkzMpwwtw22 6Uc6HFwmqov2naK9+XR0l3A0KOqQ+dZWPXE9qowxBnvVtP4c01edwlEbtMAhdv9QLgTXiMHxXWKWG HlsW41Ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTOrN-00000007mW5-2Hwo; Mon, 15 Jul 2024 16:47:33 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTOqb-00000007mDf-1vin for linux-arm-kernel@lists.infradead.org; Mon, 15 Jul 2024 16:46:47 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4266182a9d7so28687135e9.0 for ; Mon, 15 Jul 2024 09:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721062003; x=1721666803; 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=Jh6JZ+1LYv7M2Ni3seuv4GEQ7MYtjKnioH0Jix8Ipz0=; b=ZD17uspgt7L+qfNuYfslR+BW9UNx4yDp3X9wAqe5o9EWfnk1i8JJiVflInFuY8xQkU oOIjOa4ZdP0UDMgo6oY0V6RfvVARHdAPk+9hwDoIajGAm6zTwzGe7k9N9kdGmtGHTnR+ tW9U9eYLPTcCn49GIOS94e+50OPKyoC9Sru9RsUC/clZt1+w30o4JT58jaFE8zD8NExw FmMhF6ppKYKk4/VB9wDDITvY41CatpJ23Pt/ZkIkbvAuYtFS6PLYEDQfKsSaxvj02hvX VA2DvR7a/fJsb2NtFEGsEtoTz0dpiKmx9s1qvXbc625yERWudMuRSsrEqZYJRtC2mm/E P3+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721062003; x=1721666803; 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=Jh6JZ+1LYv7M2Ni3seuv4GEQ7MYtjKnioH0Jix8Ipz0=; b=fwCSonrSugPq4zAK9fz6SEVL85J/0KpPcPg0hjiahtfENE/KIEpttGO3mTBYE8SBEM +eVTFzcwEzHyUMsoF8gIuInnwXtWQCVbqFPjHa3XRi1VNtaXJegzPPS90qF0wkp+Tng8 aJHuD6wx+S6xb35vOYUss76DWLvRUHTuN43ksDgvu72XyvTF8h7zMm17ZCvckAR1am21 54LDpqgmmL9zlkuFuwxp4WaQKkOf9yyGeaya23XpyVpQlhUSxBdV2AuyfqAs9Xkye6tY CNJ6gZ3T6jk6nsBCaoK5A7adk3dLEhJaH0EBD1GgRbt/an/lVzNSPpAVH9fF4jJA4rQr OzAA== X-Forwarded-Encrypted: i=1; AJvYcCXk5nt1OLFcBt2ytFFFp3sish7wQG5p/0Br+JIo/eRkjY2WujjE1XqEs42eIvpVUM+0klboiKuDlLGaBwg4AxSENH2yXjvOWp436WYXLsno2/+gxpM= X-Gm-Message-State: AOJu0YwgcVlYZILQ2vhUyZ0Zq08KKWPcqPSqzeAyGBqmgSDfrUPFhtob XqMFd1SvivCNK6JSWm0ShgNJ8zoTLmrZvzh+CDywpNH+EXpwE2ja X-Google-Smtp-Source: AGHT+IEr6cCHa9wTd0C+ds1nssosgD28+7x4wtLWpAatjKXHXE7WHF1w1QpLnGh9WYZlFn6Fb/QL9g== X-Received: by 2002:a05:600c:1911:b0:426:5dd0:a1fc with SMTP id 5b1f17b1804b1-427b88d00f5mr1337135e9.34.1721062003548; Mon, 15 Jul 2024 09:46:43 -0700 (PDT) Received: from playground.localdomain ([188.25.209.252]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a5e7749esm94316975e9.2.2024.07.15.09.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 09:46:43 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Philipp Zabel , Liu Ying , Sascha Hauer , Conor Dooley Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/3] reset: add driver for imx8ulp SIM reset controller Date: Mon, 15 Jul 2024 12:45:13 -0400 Message-Id: <20240715164514.8718-3-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240715164514.8718-1-laurentiumihalcea111@gmail.com> References: <20240715164514.8718-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240715_094645_638624_AED75E9E X-CRM114-Status: GOOD ( 21.92 ) 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 | 106 ++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 drivers/reset/reset-imx8ulp-sim.c diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 67bce340a87e..8e9cbf2859d6 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -100,6 +100,13 @@ config RESET_IMX8MP_AUDIOMIX help This enables the reset controller driver for i.MX8MP AudioMix +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 27b0bbdfcc04..685e08982283 100644 --- a/drivers/reset/Makefile +++ b/drivers/reset/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_RESET_GPIO) += reset-gpio.o obj-$(CONFIG_RESET_HSDK) += reset-hsdk.o obj-$(CONFIG_RESET_IMX7) += reset-imx7.o obj-$(CONFIG_RESET_IMX8MP_AUDIOMIX) += reset-imx8mp-audiomix.o +obj-$(CONFIG_RESET_IMX8ULP_SIM) += reset-imx8ulp-sim.o obj-$(CONFIG_RESET_INTEL_GW) += reset-intel-gw.o obj-$(CONFIG_RESET_K210) += reset-k210.o obj-$(CONFIG_RESET_LANTIQ) += reset-lantiq.o diff --git a/drivers/reset/reset-imx8ulp-sim.c b/drivers/reset/reset-imx8ulp-sim.c new file mode 100644 index 000000000000..04ff11d41e10 --- /dev/null +++ b/drivers/reset/reset-imx8ulp-sim.c @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include + +#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 + +#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)) + return dev_err_probe(&pdev->dev, PTR_ERR(simr->regmap), + "failed to get regmap\n"); + + 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"); From patchwork Mon Jul 15 16:45:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13733661 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 11F2CC3DA4A for ; Mon, 15 Jul 2024 16:48:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wXLPtmmwbw0kH9maBt8kI0QUZhZ3U60BovT7L6yY3xs=; b=ql6bhDQmsM+wjiul/lbVEeFUYW Q5kGXl2m9mUZXpSdch7QcQ/u4XnQsD0onu+OrgIQ5xwo5tqrjFKAVh/P2dLLdyLm/sFTViQjMFJQa Dwb41bJAv/P9TD+V39nRJrYZOlrPbU+3Ob5shRSeOfJw40xF/GLC6rA+eV11KugGCrRuBCOmsk8OH UjP39ZYDBV/MZ7W2oJndCVfYrrMA4OymapM8ITb23hNVwV+LQiXGRDFqrEHo3ebYOGoTFwdC37PxK 6ErJsH+imPoaYynku9jCQ7gN7XTJ3fBdow0gJsfuhWOCgZuc4RNDIB+NioetjfC5Q6vlNK3XAYVXi 1gEkPULg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTOrf-00000007mct-3CSj; Mon, 15 Jul 2024 16:47:52 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTOqe-00000007mFW-1jIz for linux-arm-kernel@lists.infradead.org; Mon, 15 Jul 2024 16:46:49 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-52ea33671ffso4588975e87.3 for ; Mon, 15 Jul 2024 09:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721062007; x=1721666807; 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=VdrZRt5ypFp9y43XH1qmWrR9TnXoJwGNneIiSKuhYOJ0CglhVlwftpraks/ROIeX5y +E3BdPa495rlRu94KJQfUb3Kbi2KbLwZ7ggofB8Yd9kXAFSVm03GvXuO3ymtJb2R2atj Wosj+vHqfg/vmvNVFslmOEV4avlwF/qGMqGHEimvddXEsd4QI42vFU1Nhe5YH36LEygl tYzzM9IS3VtNkYwm8MQm2HY2YzahQSSNwFn+JmZI6yQtizgH3vBHZPE8kx8GXKXPpElH NKhfydMei/gfHPqt0QX37uMAMiXJK4FaJEFvXQOBqqncQic+8r454h67h6f9RYsLUlq7 pF3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721062007; x=1721666807; 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=FM9YhXalKuIjNCzut2K/jN+QYiUKJ3x3oti+mfUkFoJ/BBHfOEjVxwmtorCUEDVcby wtMbTzq9ctdOxvDOTHkGuxxuPetjHwnM5yXduqn4UUimi/EyGMPqowRUvv5fgJhA+fFm ikC47Eu5y7UZm2ILub1PIOutDx6kPRvhFSP0p4psZWKUkr1FU4yexu41fktAsm+Tp92U DP7iS0F/aMgolk5I9GLwa5+ZeJ47x5g5849RBAlwrNwHqaWBv5lw2lCG+8nbYQ48fYq3 JTKH7LB30Y1OWCPhe5L/5tkrGnvZWopD554LxNQmPYuTF8AToXMw/i2aPaAW9ujxeGjw UVow== X-Forwarded-Encrypted: i=1; AJvYcCUNa8vysDW9m/jDEOhOcAtTL6UCjS4IYg3zGYOxMhHu+KP85AC0d58VI2of3tJlphUsxHrxCsaHOYnXSLE8xYovj3Zuw6T/pI75hpHM+EDqEMAa5vc= X-Gm-Message-State: AOJu0Yyg6zG/Kgh4H/zywMlYJH7Oz+DDiiFclpV23ezqJTwGzIGrFbDD f9/MRopNmYFLpWZBeVyHkTDQzmmFrLMMJTbWFxodSDK1iFRvtuZGd9LpUmvI1Ls= X-Google-Smtp-Source: AGHT+IG72IQ0ziiaJH2CaciU0vlZKlLL8khi4i7uyxWcd0QoI/uPAG9YPE4h/aM4tCxzi/2HTELIUg== X-Received: by 2002:a05:6512:e9b:b0:52c:dfa0:dca0 with SMTP id 2adb3069b0e04-52ede1c782amr51714e87.43.1721062006412; Mon, 15 Jul 2024 09:46:46 -0700 (PDT) Received: from playground.localdomain ([188.25.209.252]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a5e7749esm94316975e9.2.2024.07.15.09.46.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 09:46:45 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Philipp Zabel , Liu Ying , Sascha Hauer , Conor Dooley Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/3] arm64: dts: imx8ulp: add AVD-SIM node Date: Mon, 15 Jul 2024 12:45:14 -0400 Message-Id: <20240715164514.8718-4-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240715164514.8718-1-laurentiumihalcea111@gmail.com> References: <20240715164514.8718-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240715_094648_482319_3065560A X-CRM114-Status: GOOD ( 11.30 ) 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>;