From patchwork Thu May 16 20:40:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13666515 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D205139F for ; Thu, 16 May 2024 20:41:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715892091; cv=none; b=SxeLmRP5dQFUubovdPc5ROm6M4soohd9OfO/ezwhxISvLf13+8ySPmcbPuNh2gyTN0DTtAVrdO4+6KQ/zxhg8E4PnOjVIq5sq90d2bw2NFKi/uLTmlac9F1eStPGmfASaagmG+E/DPly4WcVoR1SjG8uhoRquBQ9ydqC6UEzDIk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715892091; c=relaxed/simple; bh=gvMfQjhb/VOFUmjKkAioFSe9h2iL6RMf6plv37DH/ME=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jQ3LTMt4/p4Pfp6G4Wb4tLGq+DckFzV0r74AAUkQKez6k7c182AfRvKV/FMx6x4yYwMIGUdRuajo0udRoOxdgOvqPax0PVLAqXdjUc357K0LFOiLISEW8HX/lj18yGfRW05oMrdZ4cPP0neK5u+vsWtJRlxt12zYmc3NBp8/SQc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QezEXevP; arc=none smtp.client-ip=209.85.208.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QezEXevP" Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2e271acb015so16611271fa.1 for ; Thu, 16 May 2024 13:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715892088; x=1716496888; darn=lists.linux.dev; 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=X9bzG+7WWN+HDoYVZdX4V+PH6WrIzda8p1Pj5+2jjMc=; b=QezEXevPhjH5zJQlUB/Wr0TeSPsgx8G0H1jsafG5cXQIQLKJps9vBjXTk+BinTPcav hzC5Bx0M8BEJhdPbZ6i5qKcFP/SGdDBkMZJn43geBcPurnSvBmmAa3WQbKvGrlFCZ56J CNP9Quw67HPFrLvBHR7nVm7daNP7PnjdDNvmt4G+QxHMGrag0orq6LeocezdpyjUTsHZ XWUS0TxgWYQ6N4NGei3rZCs6M3Uvv2elmvYJ4yRpwcQEEFaXXS0wsf6AhAlM1xrL80pj Q+zmdENKFEIPIXQx7wQ3dyoVNr95lR9y0gs4I6F8EukeeHvSk2Pn2zIyw+B0AV78DagE Li4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715892088; x=1716496888; 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=X9bzG+7WWN+HDoYVZdX4V+PH6WrIzda8p1Pj5+2jjMc=; b=IX9X2wVlNa/xUNNR6X9gsYkw1aCpUZQnHN+rCed0q5G7RpPeB6kJ6klG73TDUWUOlN 3YpzfkRNDMaA16UrhTW28C4U7iTbGwZZvKvXI0wTcg7SvgUrP+XHmehrGzMOp9LkyFMc gnRtgZh6DonlattEp9XAmbGEzyDjY7/WJhEEQjS2cSwSODIBBaOOV1p9K/S6viOmM9FY AbpPTFYG6HYUb57PL37RcTZ2+fJcS8vamyl8Qys4q2Wh0aZ6v6SOWULTQGesmj3cV7nv ix7Cjh4Dzh9BV7Vy0jFS35WeZr6+hWUiCxJBUwfrbGRKeOqEr3cyKi9PXB48BacmHyTP jtyw== X-Forwarded-Encrypted: i=1; AJvYcCUBdusx4jHlbRjeDvkGBLgmR2JiV0QWNfblBPUM4ShQzHCf+JpeDUrHwBMnm80yrm8ll/KkgZYXF+ikmXFR0BCEUKcN X-Gm-Message-State: AOJu0YxZLLruL94Y49pkd0jnDY2D1N78cZnSVA9V2YDeuBazOh7y+6Dv x+1Pz3fitzEhxLmM/JHAYfHxDfOVsokvP4eNethA0aTU/Hqx+ao5 X-Google-Smtp-Source: AGHT+IEFGSc0CnG+tYsSSgCwy/77Qt99fprI3mfIXypzGxDG0oSuL8FcWOgmKGZrcZQIDfuZ2cY+0A== X-Received: by 2002:a2e:97c3:0:b0:2e1:f253:152a with SMTP id 38308e7fff4ca-2e5204aef69mr137733531fa.51.1715892088228; Thu, 16 May 2024 13:41:28 -0700 (PDT) Received: from localhost.localdomain ([188.25.209.252]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733c2b8f7fsm10859828a12.66.2024.05.16.13.41.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 13:41:27 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , 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 1/4] dt-bindings: reset: add schema for imx8ulp SIM reset Date: Thu, 16 May 2024 23:40:28 +0300 Message-Id: <20240516204031.171920-2-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240516204031.171920-1-laurentiumihalcea111@gmail.com> References: <20240516204031.171920-1-laurentiumihalcea111@gmail.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 | 43 +++++++++++++++++++ 1 file changed, 43 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..ec9a5c73e83c --- /dev/null +++ b/Documentation/devicetree/bindings/reset/nxp,imx8ulp-sim-reset.yaml @@ -0,0 +1,43 @@ +# 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). + As far as the DT is concerned, this means that the reset + controller needs to be a child of the SIM node. + +properties: + compatible: + const: nxp,imx8ulp-avd-sim-reset + + '#reset-cells': + const: 1 + +required: + - compatible + - '#reset-cells' + +additionalProperties: false + +examples: + - | + #include + syscon@2da50000 { + compatible = "nxp,imx8ulp-avd-sim", "syscon"; + reg = <0x2da50000 0x38>; + clocks = <&pcc5 IMX8ULP_CLK_AVD_SIM>; + + reset-controller { + compatible = "nxp,imx8ulp-avd-sim-reset"; + #reset-cells = <1>; + }; + }; From patchwork Thu May 16 20:40:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13666516 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C2BA157A58 for ; Thu, 16 May 2024 20:41:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715892094; cv=none; b=NNgpTEn/wNUUdDjjUSQPXEHhnoBFOA7lEAvPLgVBMoXD9y9+B+P5vnBDmPoWN+MkQYNjUKBqfi8ZOTsGrlDvdVD85yKKnRkOyuZWTK3lBdemK1h4NLmr03VI8BuGfDI8iXhu5wCafNjimjuZ7JOZf7udDzu3mhDf7RCDMvuZ0NM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715892094; c=relaxed/simple; bh=Fm8UmZPGCcL7w4efTvhgE4GkAB+5OARyNMPff6mb6Yo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VFMZwkv4TMsX2MJyUO00G+8t/rNXAuy633bS947oLf6C5ms0D5Eq9SdM194+16JCtzfrec68r29hLev8T4A/P9nHEWQeKHx9B5rwnZpsx0aidIiG2jRMup/tZXc79vd9WBljq2I9y8ueG837R5gx4RvKapgQbDDdD4JvNO1uP3k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FNthuEz1; arc=none smtp.client-ip=209.85.208.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FNthuEz1" Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-574f7c0bab4so4250701a12.0 for ; Thu, 16 May 2024 13:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715892091; x=1716496891; darn=lists.linux.dev; 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=kWpEEFOjXdoKUDHUMaULzp8ujAfsObhxpkb6Hovmxkg=; b=FNthuEz11XwJjKryf0LIcu/u0eqa7MJvu5xMPHcQ9kb0/lv0unTFiWk9rULxFCjcFK W4afm0iKrsFPALh22uDTkhsCtQXGKchJq6syJbikx6087uhFgx1sQOobI7ZPfvx3Kh/V ynR3/8/1olm7c0S31AQZuFOT2w3tXA5qWfHXKrGYBcf6/em/tKLOYR8HIyMPw6Sb6hCx du9DwbY5W56LGPM2l+ZFsxqf5ytZs6ebNg/j9c6kO0UCAufgS3qa4dYHZcAqPff3NEhR GPzyt9qsehQzYfSdj++m2hR5eEsZImJNzLM0MQHaqM6Pz/uEYrq0R/HPLCyBVMh5wpjN ZTWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715892091; x=1716496891; 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=kWpEEFOjXdoKUDHUMaULzp8ujAfsObhxpkb6Hovmxkg=; b=fOYDCzXDjVTn1Zm/gM70SfhMNGGypc8N7KKVa9PGJJZ4xEhWlR5kK/DC9fv7N1lEEW xZUcidkxnCbBtETIExNCfipdlT4gRKVFUmcV5uXcg8+WCRdLYd4MexjzHAREtCIp3eXu 3QOAwAEmx7GUTp6PPl5qvy1NE8JeqUmF98rDH289ix+dQ3uXdKQCsmEG+S9DEaH/gTXs 9c6kv7Mk2u/ILmlEUkDM+exygwyKxOel1QnZCtD1hUvvtcTerYbCoVc9ErJK6d6P5vRu 9/QJYoUJePFjduqV/WGTpHTbBgJOB+gn+qs+jTtCee9TR9c5gA4pLJDwfC9FjrwfQkQf 0wsg== X-Forwarded-Encrypted: i=1; AJvYcCV/WGJdRrDCZWpD1DHTjeHNQ5ufiwfg+89TukLVoy0myNPItgMZpYi0swsSDzPktdDXFCvtdcu1BxTl6oI7elTEr79A X-Gm-Message-State: AOJu0YxNZOJaYZQmEUfRF5A+9804KfWsEfbweyo4GLUZ8Vb9Zf6rrBk7 JIyjfMWVtIlwT5r5noiNzkLGERjSTSxBjAbr5nJJNUnoUbvAYaxN X-Google-Smtp-Source: AGHT+IEQ9m7qotqrl3gagHyAMaFy47efeLvj+SXsKvIDBZoMlPip0ftICcEzfAI56MHtjIFGjuDv3g== X-Received: by 2002:a05:6402:17d0:b0:574:d009:cb3c with SMTP id 4fb4d7f45d1cf-574d009ce2fmr9388979a12.18.1715892090707; Thu, 16 May 2024 13:41:30 -0700 (PDT) Received: from localhost.localdomain ([188.25.209.252]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733c2b8f7fsm10859828a12.66.2024.05.16.13.41.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 13:41:30 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , 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 2/4] reset: add driver for imx8ulp SIM reset controller Date: Thu, 16 May 2024 23:40:29 +0300 Message-Id: <20240516204031.171920-3-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240516204031.171920-1-laurentiumihalcea111@gmail.com> References: <20240516204031.171920-1-laurentiumihalcea111@gmail.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 | 98 +++++++++++++++++++ include/dt-bindings/reset/imx8ulp-sim-reset.h | 16 +++ 4 files changed, 122 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 85b27c42cf65..c1f4d9ebd0fd 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 the 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..27923b9cd454 --- /dev/null +++ b/drivers/reset/reset-imx8ulp-sim.c @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/* + * Copyright 2024 NXP + */ + +#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->parent); + 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; + + 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..a3cee0d60773 --- /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_RESET_H +#define DT_BINDINGS_RESET_IMX8ULP_SIM_RESET_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_RESET_H */ From patchwork Thu May 16 20:40:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13666517 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B57431586FE for ; Thu, 16 May 2024 20:41:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715892096; cv=none; b=CQCU87ltyM/jk0IH9Jh2KJm/xAbqH/nHqX21RSh8tVqJYKcmGtGM4+lFhDEMKdFfoFCpvivHW6t4lu6a3WDB2c79xxfmgWlYFfwzH1KkKqLEWkZVO8aMupJBmtE6X9iZNqL9NjFH6y6HNedEF2g/1p7cFacbby7x0WApO35M1Us= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715892096; c=relaxed/simple; bh=YG6Irvok/llj/JOUak/E8yE3D7cWV/e/rGxYwg0Av88=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GJD7Cf3FhTmUMT0WHOW4uYhPemHmuFMTObFitPfbnDEYbg+qhfb1lG6cELNCIZfCDAJm8s6wy4GnDsUIf6T/rDWfelGao2Y4dfCAJvHUvePmhiwJempR/zxJqQKNQz2jersTa6GyG6O3s4IeZUWmSIaGLm1qf234pkqg+/YW9FM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gbTwDDuq; arc=none smtp.client-ip=209.85.208.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gbTwDDuq" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2e576057c06so15749671fa.0 for ; Thu, 16 May 2024 13:41:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715892093; x=1716496893; darn=lists.linux.dev; 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=Opo8rK0GjT1pcxD/DdT5h2EA1MA57S7z8/+NMoMMi8Y=; b=gbTwDDuq6NLDxExTWkV2yylF0PQBaPzk9R6TbfP8HXOBCx1+LVsfszReWF+WmtQk8f Op4FsCUJzjggsCzBAT/I7J/QFhaLQkfg9wjDeDOIE8/BEchUghX0rXlodZpAor1IwYVA MRInPb7NfxMpZJasIcoYin9cDkgFvB6gbgj/zN6I4vEi+WejBMFHvmjzlVme3Nmr7SCz 63jWqERlM6lVo1Hss5ERH7yqa9kHaCMxhEOlE5nPWA02/X7PRYMl6sESRb5g5HGgSDTo jA2QTD8YuQprNFnrv2LMQXkrOGQTfo6Uyb+BH+RhhXiRNMG7R/z7rx/bhYy7czZM/8ta MzXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715892093; x=1716496893; 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=Opo8rK0GjT1pcxD/DdT5h2EA1MA57S7z8/+NMoMMi8Y=; b=MFiwZRzwP2voBw5l1FrO+6Kne60wO9CWXaZSFNUTypIHERx2UD+NNtyfnXbzH8GwDG uTtE05D8CcBJKKOLjjEzHJz6pm/1CvsuzbavajKgCzwmaMio0+YEbZru6ifZP98u/SYS RN4TNqasRePR0/cPHLqYpSDiCtPzrZr8sLqlwW2YyIALeF8sRELpen88j1H6WPO9X5nf JD632QWgb598X3o6XjkIi6TQOGjCUBFF9T3kVVXPPcHr+OJbqIqzLoyrUuYcW+ECB/3p 2QnUZO8ZMYhm4bYDJBltqYo9KdBwbJQA+Mz7Pufn6Tj7dUtOpWlC0gD630AZyFoQrzXN 61Sg== X-Forwarded-Encrypted: i=1; AJvYcCVbxB1xbxgKLP/i0GC/JtRsa7bzq7m0zemqv/4ri1dt2x57FOdC5PV3Io85CjmoniKJCq4Th0tCAVxH6aj5mM2jQb1u X-Gm-Message-State: AOJu0Yy2jTGX7PxRFcNRaUdkzRRKQcyv6GBsblfzfErKdqkOAclVDSju S6Kf9nbCMF3+6kUTnwTiMhoEopTYJex2FMWGWSXbbKXvmVZSgIua X-Google-Smtp-Source: AGHT+IFkZ7z3jVZAtbsPTlP+QbCw2nX9bvAx9eVFbzWe4AfgwJu6Me5+ek3irY+a0N8SYp2fo3MWDA== X-Received: by 2002:a2e:7405:0:b0:2da:c37f:655e with SMTP id 38308e7fff4ca-2e51fd4a7a6mr124569501fa.16.1715892092957; Thu, 16 May 2024 13:41:32 -0700 (PDT) Received: from localhost.localdomain ([188.25.209.252]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733c2b8f7fsm10859828a12.66.2024.05.16.13.41.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 13:41:32 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , 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 3/4] dt-bindings: mfd: add schema for 8ulp's SIM Date: Thu, 16 May 2024 23:40:30 +0300 Message-Id: <20240516204031.171920-4-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240516204031.171920-1-laurentiumihalcea111@gmail.com> References: <20240516204031.171920-1-laurentiumihalcea111@gmail.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Laurentiu Mihalcea Add schema for i.MX8ULP's SIM. Signed-off-by: Liu Ying Signed-off-by: Laurentiu Mihalcea --- .../bindings/mfd/nxp,imx8ulp-sim.yaml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/nxp,imx8ulp-sim.yaml diff --git a/Documentation/devicetree/bindings/mfd/nxp,imx8ulp-sim.yaml b/Documentation/devicetree/bindings/mfd/nxp,imx8ulp-sim.yaml new file mode 100644 index 000000000000..fbb17c06e3c0 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/nxp,imx8ulp-sim.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/nxp,imx8ulp-sim.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX8ULP System Integration Module + +maintainers: + - Liu Ying + +description: | + 8ULP's SIM provides control and configuration options for + some of the chip's components. + +properties: + compatible: + items: + - enum: + - nxp,imx8ulp-avd-sim + - const: syscon + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + mux-controller: + $ref: ../mux/reg-mux.yaml + + reset-controller: + $ref: ../reset/nxp,imx8ulp-sim-reset.yaml + +required: + - compatible + - reg + - clocks + +allOf: + - if: + properties: + compatible: + contains: + const: nxp,imx8ulp-avd-sim + then: + required: + - reset-controller + - mux-controller + +additionalProperties: false + +examples: + - | + #include + syscon@2da50000 { + compatible = "nxp,imx8ulp-avd-sim", "syscon"; + reg = <0x2da50000 0x38>; + clocks = <&pcc5 IMX8ULP_CLK_AVD_SIM>; + + mux-controller { + compatible = "mmio-mux"; + #mux-control-cells = <1>; + mux-reg-masks = <0x8 0x00000200>; + }; + + reset-controller { + compatible = "nxp,imx8ulp-avd-sim-reset"; + #reset-cells = <1>; + }; + }; From patchwork Thu May 16 20:40:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13666518 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8461158A20 for ; Thu, 16 May 2024 20:41:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715892099; cv=none; b=PFTZbC9iHUw35T+AFT8lkvuD7luXoamkMufBTpBw7M+VdiEKjwSlofxAkqag0awP4Y+xAJzbcMgiiZG6WvacNuSof5nCtESZsZM7iR25u6rn3675RUMzyUJQ/xlgW3GsQBS6uzvcvfTRbEF1BXHaYyoTe2YITZ9OBrCGQdCDZdE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715892099; c=relaxed/simple; bh=4oadGygxYA7bjkv7TT+WWegMW5gp9hz2kjni4oNe4jQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mE8NHeUWaRwWYxs8esYIvCVL2GMy0uQh5zevvkdES/n6S3nC6ydDFm126jvmI4knWbhB4KVFEC9JATInmbvTY4mp8VZsMcBoSRq60J1InjrbEsQIWfXgxqitTuKScQXCCoL0vxV7Y7Y6reQ+QOurs2mCPotyaTf6COh6WIXzJBg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=K/QV4LwE; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K/QV4LwE" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-41fd5dc0439so59543715e9.0 for ; Thu, 16 May 2024 13:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715892095; x=1716496895; darn=lists.linux.dev; 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=1Kwo/PJKWqwFR8G1QKaJWay+TAo/b1R/praQRuQi8t8=; b=K/QV4LwEaqq/Nt1hw6iuySkjJxPdb0DS2wLlqtkQCwlmxP0ElMPYhA/v1wvUALtn8X lbZDGlBEjBudBXaBYxI6tNmdeYG081TDVtP8ABQdQs4nX12aid4RruJ8DULEecI48nx6 zdvVmB8CZ/1QGhvXQwgeue2ZtLq3qFZPapSRi4uPcYWxFytynsjdInIjC6gIMUrXbeQ4 5/IM9hc8aqBUB8w7w3m0X/d7lF597+sSPdk8sRPv3VyEUORCLo4it1vY+ljBNbZk42FG kg/c8rFDtKaq2yWWmEGNyW2C8LxcCuHJMv/kz33JUBYyN0jjrR4KSZZps78R+LEAFoy7 jYLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715892095; x=1716496895; 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=1Kwo/PJKWqwFR8G1QKaJWay+TAo/b1R/praQRuQi8t8=; b=eyhuf1wVYEaNtEGHGUSGoMRvyiLTJfai2NBw4nSyCM5ag5KQBAFm6OiT5UoOJYVYZf 2CCbeFYzvQvNn+HUjN+obZ1Sa/ElnHxDjlpVwmnJayhoT0BB3dB3i7xc2JsjGU1G42aJ YvEJXg3oOuD5pKSXR9xaYPaWpVyV7ZOOinsDi6WVFW3KivTLhvgy6fUNbBGZ+5YJl1hk /jJBMtwe0ABSiFGADr+OkHECa0kZEApTJC66sb3lfKULPGsXUKznimQLrSrj0/0Z1N0c fgZNSggz98qVpeAxW5CJmOJUWhK19HcO1lsmz6LvuFT/OyfmL0f1/ORq5QEMatB/gC0k aXmw== X-Forwarded-Encrypted: i=1; AJvYcCX6XwEd9EONg1KslBnpLaj6wA9h/sYHbCejFJupFp/+wa5Cwnc8U3PRzuawKIpWbZMSV6Yna0oXRe8tIQ6kWCyorGEX X-Gm-Message-State: AOJu0Yx+ccT+plDQTwn5Lxw1PL2y7oYM1TPz9jetMm62AbBogFgSqQvJ lhvm+cESGFF+rZvlKVG0CBvgBPcV861eVWDgZPwOgPnnXBo7wt2k X-Google-Smtp-Source: AGHT+IFNas3/3kPAsfpD5yX3BBvTnf6Ycfw16x5JhHOqISi3MwmXqWdKiNWT3OlLuArijC+XTR2qiw== X-Received: by 2002:a05:600c:198a:b0:41b:fc3a:f1ef with SMTP id 5b1f17b1804b1-41feac5a3damr136908115e9.33.1715892095152; Thu, 16 May 2024 13:41:35 -0700 (PDT) Received: from localhost.localdomain ([188.25.209.252]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733c2b8f7fsm10859828a12.66.2024.05.16.13.41.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 13:41:34 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , 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 4/4] arm64: dts: imx8ulp: add AVD-SIM node Date: Thu, 16 May 2024 23:40:31 +0300 Message-Id: <20240516204031.171920-5-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240516204031.171920-1-laurentiumihalcea111@gmail.com> References: <20240516204031.171920-1-laurentiumihalcea111@gmail.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Laurentiu Mihalcea Add node for imx8ulp's AVD-SIM. This also includes its children. Signed-off-by: Liu Ying Signed-off-by: Laurentiu Mihalcea --- arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi index c4a0082f30d3..5135d98dc6f2 100644 --- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi @@ -520,6 +520,23 @@ per_bridge5: bus@2d800000 { #size-cells = <1>; ranges; + avd_sim: syscon@2da50000 { + compatible = "nxp,imx8ulp-avd-sim", "syscon"; + reg = <0x2da50000 0x38>; + clocks = <&pcc5 IMX8ULP_CLK_AVD_SIM>; + + mux: mux-controller { + compatible = "mmio-mux"; + #mux-control-cells = <1>; + mux-reg-masks = <0x8 0x00000200>; + }; + + avd_sim_rst: reset-controller { + compatible = "nxp,imx8ulp-avd-sim-reset"; + #reset-cells = <1>; + }; + }; + cgc2: clock-controller@2da60000 { compatible = "fsl,imx8ulp-cgc2"; reg = <0x2da60000 0x10000>;