[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250121-mature-marigold-ammonite-b379d2@krzk-bin>
Date: Tue, 21 Jan 2025 11:02:44 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Michal Wilczynski <m.wilczynski@...sung.com>
Cc: mturquette@...libre.com, sboyd@...nel.org, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org, drew@...7.com, guoren@...nel.org,
wefu@...hat.com, jassisinghbrar@...il.com, paul.walmsley@...ive.com,
palmer@...belt.com, aou@...s.berkeley.edu, frank.binns@...tec.com,
matt.coster@...tec.com, maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
tzimmermann@...e.de, airlied@...il.com, simona@...ll.ch, ulf.hansson@...aro.org,
jszhang@...nel.org, p.zabel@...gutronix.de, m.szyprowski@...sung.com,
linux-clk@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, dri-devel@...ts.freedesktop.org, linux-pm@...r.kernel.org
Subject: Re: [RFC v3 05/18] pmdomain: thead: Add power-domain driver for
TH1520
On Mon, Jan 20, 2025 at 06:20:58PM +0100, Michal Wilczynski wrote:
> The T-Head TH1520 SoC contains multiple power islands that can be
> programmatically turned on and off using the AON (Always-On) protocol
> and a hardware mailbox [1]. The relevant mailbox driver has already been
> merged into the mainline kernel in commit 5d4d263e1c6b ("mailbox:
> Introduce support for T-head TH1520 Mailbox driver");
>
> This commit introduces a power-domain driver for the TH1520 SoC, which
Please do not use "This commit/patch/change", but imperative mood. See
longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
> is using AON firmware protocol to communicate with E902 core through the
> hardware mailbox. This way it can send power on/off commands to the E902
> core.
...
> diff --git a/drivers/pmdomain/thead/Makefile b/drivers/pmdomain/thead/Makefile
> new file mode 100644
> index 000000000000..adfdf5479c68
> --- /dev/null
> +++ b/drivers/pmdomain/thead/Makefile
> @@ -0,0 +1,2 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +obj-$(CONFIG_TH1520_PM_DOMAINS) += th1520-pm-domains.o
> diff --git a/drivers/pmdomain/thead/th1520-pm-domains.c b/drivers/pmdomain/thead/th1520-pm-domains.c
> new file mode 100644
> index 000000000000..d913ad40fb76
> --- /dev/null
> +++ b/drivers/pmdomain/thead/th1520-pm-domains.c
> @@ -0,0 +1,174 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2021 Alibaba Group Holding Limited.
> + * Copyright (c) 2024 Samsung Electronics Co., Ltd.
> + * Author: Michal Wilczynski <m.wilczynski@...sung.com>
> + */
> +
> +#include <linux/firmware/thead/thead,th1520-aon.h>
> +#include <linux/slab.h>
> +#include <linux/platform_device.h>
> +#include <linux/pm_domain.h>
> +
> +#include <dt-bindings/firmware/thead,th1520-aon.h>
So here it is used... I don't understand why power domain is under
firmware. Please move it to proper directory and name the file exactly
the same as bindings doc which this belongs to.
> +
> +struct th1520_power_domain {
> + struct th1520_aon_chan *aon_chan;
> + struct generic_pm_domain genpd;
> + u32 rsrc;
> +};
> +
> +struct th1520_power_info {
> + const char *name;
> + u32 rsrc;
> +};
> +
> +static const struct th1520_power_info th1520_pd_ranges[] = {
> + { "vdec", TH1520_AON_VDEC_PD },
Why TH1520_AON_XXX aren't the indices?
> + { "npu", TH1520_AON_NPU_PD },
> + { "venc", TH1520_AON_VENC_PD },
> + { "gpu", TH1520_AON_GPU_PD },
> + { "dsp0", TH1520_AON_DSP0_PD },
> + { "dsp1", TH1520_AON_DSP1_PD }
> +};
Best regards,
Krzysztof
Powered by blists - more mailing lists