* [PATCH 1/7] staging: octeon: convert cvmx_spi_mode_t from typedef to plain enum
From: Eric Wu @ 2026-04-27 15:54 UTC (permalink / raw)
To: Thomas Bogendoerfer, Greg Kroah-Hartman
Cc: linux-mips, linux-staging, linux-kernel, Eric Wu
In-Reply-To: <20260427155427.668540-1-kunjinkao.jp@gmail.com>
The Linux kernel coding style discourages the use of typedefs for
enums. Convert cvmx_spi_mode_t to a plain 'enum cvmx_spi_mode' and
update all users across the MIPS Octeon architecture code and the
staging driver stubs.
This is part of a series converting all remaining enum typedefs in
the octeon subsystem to plain enums, improving compliance with the
kernel coding style.
No functional change.
Signed-off-by: Eric Wu <kunjinkao.jp@gmail.com>
---
arch/mips/cavium-octeon/executive/cvmx-spi.c | 16 ++++-----
arch/mips/include/asm/octeon/cvmx-spi.h | 38 ++++++++++----------
drivers/staging/octeon/octeon-stubs.h | 6 ++--
3 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/arch/mips/cavium-octeon/executive/cvmx-spi.c b/arch/mips/cavium-octeon/executive/cvmx-spi.c
index eb9333e84a6b..b6c0b3fa73ad 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-spi.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-spi.c
@@ -102,7 +102,7 @@ void cvmx_spi_set_callbacks(cvmx_spi_callbacks_t *new_callbacks)
*
* Returns Zero on success, negative of failure.
*/
-int cvmx_spi_start_interface(int interface, cvmx_spi_mode_t mode, int timeout,
+int cvmx_spi_start_interface(int interface, enum cvmx_spi_mode mode, int timeout,
int num_ports)
{
int res = -1;
@@ -147,7 +147,7 @@ int cvmx_spi_start_interface(int interface, cvmx_spi_mode_t mode, int timeout,
*
* Returns Zero on success, negative of failure.
*/
-int cvmx_spi_restart_interface(int interface, cvmx_spi_mode_t mode, int timeout)
+int cvmx_spi_restart_interface(int interface, enum cvmx_spi_mode mode, int timeout)
{
int res = -1;
@@ -192,7 +192,7 @@ EXPORT_SYMBOL_GPL(cvmx_spi_restart_interface);
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-int cvmx_spi_reset_cb(int interface, cvmx_spi_mode_t mode)
+int cvmx_spi_reset_cb(int interface, enum cvmx_spi_mode mode)
{
union cvmx_spxx_dbg_deskew_ctl spxx_dbg_deskew_ctl;
union cvmx_spxx_clk_ctl spxx_clk_ctl;
@@ -308,7 +308,7 @@ int cvmx_spi_reset_cb(int interface, cvmx_spi_mode_t mode)
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-int cvmx_spi_calendar_setup_cb(int interface, cvmx_spi_mode_t mode,
+int cvmx_spi_calendar_setup_cb(int interface, enum cvmx_spi_mode mode,
int num_ports)
{
int port;
@@ -427,7 +427,7 @@ int cvmx_spi_calendar_setup_cb(int interface, cvmx_spi_mode_t mode,
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-int cvmx_spi_clock_detect_cb(int interface, cvmx_spi_mode_t mode, int timeout)
+int cvmx_spi_clock_detect_cb(int interface, enum cvmx_spi_mode mode, int timeout)
{
int clock_transitions;
union cvmx_spxx_clk_stat stat;
@@ -505,7 +505,7 @@ int cvmx_spi_clock_detect_cb(int interface, cvmx_spi_mode_t mode, int timeout)
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-int cvmx_spi_training_cb(int interface, cvmx_spi_mode_t mode, int timeout)
+int cvmx_spi_training_cb(int interface, enum cvmx_spi_mode mode, int timeout)
{
union cvmx_spxx_trn4_ctl spxx_trn4_ctl;
union cvmx_spxx_clk_stat stat;
@@ -574,7 +574,7 @@ int cvmx_spi_training_cb(int interface, cvmx_spi_mode_t mode, int timeout)
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-int cvmx_spi_calendar_sync_cb(int interface, cvmx_spi_mode_t mode, int timeout)
+int cvmx_spi_calendar_sync_cb(int interface, enum cvmx_spi_mode mode, int timeout)
{
uint64_t MS = cvmx_sysinfo_get()->cpu_clock_hz / 1000;
if (mode & CVMX_SPI_MODE_RX_HALFPLEX) {
@@ -630,7 +630,7 @@ int cvmx_spi_calendar_sync_cb(int interface, cvmx_spi_mode_t mode, int timeout)
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-int cvmx_spi_interface_up_cb(int interface, cvmx_spi_mode_t mode)
+int cvmx_spi_interface_up_cb(int interface, enum cvmx_spi_mode mode)
{
union cvmx_gmxx_rxx_frm_min gmxx_rxx_frm_min;
union cvmx_gmxx_rxx_frm_max gmxx_rxx_frm_max;
diff --git a/arch/mips/include/asm/octeon/cvmx-spi.h b/arch/mips/include/asm/octeon/cvmx-spi.h
index d5038cc4b475..88f7e59a396b 100644
--- a/arch/mips/include/asm/octeon/cvmx-spi.h
+++ b/arch/mips/include/asm/octeon/cvmx-spi.h
@@ -36,35 +36,35 @@
/* CSR typedefs have been moved to cvmx-csr-*.h */
-typedef enum {
+enum cvmx_spi_mode {
CVMX_SPI_MODE_UNKNOWN = 0,
CVMX_SPI_MODE_TX_HALFPLEX = 1,
CVMX_SPI_MODE_RX_HALFPLEX = 2,
CVMX_SPI_MODE_DUPLEX = 3
-} cvmx_spi_mode_t;
+};
/** Callbacks structure to customize SPI4 initialization sequence */
typedef struct {
/** Called to reset SPI4 DLL */
- int (*reset_cb) (int interface, cvmx_spi_mode_t mode);
+ int (*reset_cb)(int interface, enum cvmx_spi_mode mode);
/** Called to setup calendar */
- int (*calendar_setup_cb) (int interface, cvmx_spi_mode_t mode,
- int num_ports);
+ int (*calendar_setup_cb)(int interface, enum cvmx_spi_mode mode,
+ int num_ports);
/** Called for Tx and Rx clock detection */
- int (*clock_detect_cb) (int interface, cvmx_spi_mode_t mode,
- int timeout);
+ int (*clock_detect_cb)(int interface, enum cvmx_spi_mode mode,
+ int timeout);
/** Called to perform link training */
- int (*training_cb) (int interface, cvmx_spi_mode_t mode, int timeout);
+ int (*training_cb)(int interface, enum cvmx_spi_mode mode, int timeout);
/** Called for calendar data synchronization */
- int (*calendar_sync_cb) (int interface, cvmx_spi_mode_t mode,
- int timeout);
+ int (*calendar_sync_cb)(int interface, enum cvmx_spi_mode mode,
+ int timeout);
/** Called when interface is up */
- int (*interface_up_cb) (int interface, cvmx_spi_mode_t mode);
+ int (*interface_up_cb)(int interface, enum cvmx_spi_mode mode);
} cvmx_spi_callbacks_t;
@@ -94,7 +94,7 @@ static inline int cvmx_spi_is_spi_interface(int interface)
*
* Returns Zero on success, negative of failure.
*/
-extern int cvmx_spi_start_interface(int interface, cvmx_spi_mode_t mode,
+extern int cvmx_spi_start_interface(int interface, enum cvmx_spi_mode mode,
int timeout, int num_ports);
/**
@@ -110,7 +110,7 @@ extern int cvmx_spi_start_interface(int interface, cvmx_spi_mode_t mode,
* @timeout: Timeout to wait for clock synchronization in seconds
* Returns Zero on success, negative of failure.
*/
-extern int cvmx_spi_restart_interface(int interface, cvmx_spi_mode_t mode,
+extern int cvmx_spi_restart_interface(int interface, enum cvmx_spi_mode mode,
int timeout);
/**
@@ -180,7 +180,7 @@ extern void cvmx_spi_set_callbacks(cvmx_spi_callbacks_t *new_callbacks);
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-extern int cvmx_spi_reset_cb(int interface, cvmx_spi_mode_t mode);
+extern int cvmx_spi_reset_cb(int interface, enum cvmx_spi_mode mode);
/**
* Callback to setup calendar and miscellaneous settings before clock
@@ -197,7 +197,7 @@ extern int cvmx_spi_reset_cb(int interface, cvmx_spi_mode_t mode);
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-extern int cvmx_spi_calendar_setup_cb(int interface, cvmx_spi_mode_t mode,
+extern int cvmx_spi_calendar_setup_cb(int interface, enum cvmx_spi_mode mode,
int num_ports);
/**
@@ -214,7 +214,7 @@ extern int cvmx_spi_calendar_setup_cb(int interface, cvmx_spi_mode_t mode,
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-extern int cvmx_spi_clock_detect_cb(int interface, cvmx_spi_mode_t mode,
+extern int cvmx_spi_clock_detect_cb(int interface, enum cvmx_spi_mode mode,
int timeout);
/**
@@ -231,7 +231,7 @@ extern int cvmx_spi_clock_detect_cb(int interface, cvmx_spi_mode_t mode,
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-extern int cvmx_spi_training_cb(int interface, cvmx_spi_mode_t mode,
+extern int cvmx_spi_training_cb(int interface, enum cvmx_spi_mode mode,
int timeout);
/**
@@ -248,7 +248,7 @@ extern int cvmx_spi_training_cb(int interface, cvmx_spi_mode_t mode,
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-extern int cvmx_spi_calendar_sync_cb(int interface, cvmx_spi_mode_t mode,
+extern int cvmx_spi_calendar_sync_cb(int interface, enum cvmx_spi_mode mode,
int timeout);
/**
@@ -264,6 +264,6 @@ extern int cvmx_spi_calendar_sync_cb(int interface, cvmx_spi_mode_t mode,
* Returns Zero on success, non-zero error code on failure (will cause
* SPI initialization to abort)
*/
-extern int cvmx_spi_interface_up_cb(int interface, cvmx_spi_mode_t mode);
+extern int cvmx_spi_interface_up_cb(int interface, enum cvmx_spi_mode mode);
#endif /* __CVMX_SPI_H__ */
diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
index 291eaffd2543..289a2d41fdc5 100644
--- a/drivers/staging/octeon/octeon-stubs.h
+++ b/drivers/staging/octeon/octeon-stubs.h
@@ -215,12 +215,12 @@ enum cvmx_fau_op_size {
CVMX_FAU_OP_SIZE_64 = 3
};
-typedef enum {
+enum cvmx_spi_mode {
CVMX_SPI_MODE_UNKNOWN = 0,
CVMX_SPI_MODE_TX_HALFPLEX = 1,
CVMX_SPI_MODE_RX_HALFPLEX = 2,
CVMX_SPI_MODE_DUPLEX = 3
-} cvmx_spi_mode_t;
+};
typedef enum {
CVMX_HELPER_INTERFACE_MODE_DISABLED,
@@ -1364,7 +1364,7 @@ static inline struct cvmx_wqe *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait)
}
static inline int cvmx_spi_restart_interface(int interface,
- cvmx_spi_mode_t mode, int timeout)
+ enum cvmx_spi_mode mode, int timeout)
{
return 0;
}
--
2.43.0
^ permalink raw reply related
* [PATCH 0/7] staging: octeon: remove typedefs for enums and structs
From: Eric Wu @ 2026-04-27 15:54 UTC (permalink / raw)
To: Thomas Bogendoerfer, Greg Kroah-Hartman
Cc: linux-mips, linux-staging, linux-kernel, Eric Wu
The staging octeon driver's TODO list includes "general code review and
clean up". This series addresses that by removing unnecessary typedefs
for enums and structs, converting them to plain types as required by the
Linux kernel coding style (Documentation/process/coding-style.rst,
section 5).
All typedefs ending in _t have been removed from the staging driver
stubs (drivers/staging/octeon/octeon-stubs.h) and correspondingly updated
in the arch/mips/ implementation headers and source files.
The series converts:
- 5 enum typedefs to plain enums:
cvmx_spi_mode_t, cvmx_helper_interface_mode_t, cvmx_pow_wait_t,
cvmx_pko_lock_t, cvmx_pko_status_t
- 2 struct typedefs to plain structs:
cvmx_pko_port_status_t, cvmx_pip_port_status_t
No functional change intended. All patches have been compile-tested
for both MIPS (cavium_octeon_defconfig) and x86_64 (with
CONFIG_STAGING=y, CONFIG_OCTEON_ETHERNET=y, CONFIG_COMPILE_TEST=y).
Eric Wu (7):
staging: octeon: convert cvmx_spi_mode_t from typedef to plain enum
staging: octeon: convert cvmx_helper_interface_mode_t from typedef to
plain enum
staging: octeon: convert cvmx_pow_wait_t from typedef to plain enum
staging: octeon: convert cvmx_pko_lock_t from typedef to plain enum
staging: octeon: convert cvmx_pko_status_t from typedef to plain enum
staging: octeon: convert cvmx_pko_port_status_t from typedef to plain
struct
staging: octeon: convert cvmx_pip_port_status_t from typedef to plain
struct
.../executive/cvmx-helper-util.c | 2 +-
.../cavium-octeon/executive/cvmx-helper.c | 8 ++--
arch/mips/cavium-octeon/executive/cvmx-pko.c | 6 +--
arch/mips/cavium-octeon/executive/cvmx-spi.c | 16 +++----
.../include/asm/octeon/cvmx-helper-util.h | 2 +-
arch/mips/include/asm/octeon/cvmx-helper.h | 6 +--
arch/mips/include/asm/octeon/cvmx-pip.h | 6 +--
arch/mips/include/asm/octeon/cvmx-pko.h | 26 +++++-----
arch/mips/include/asm/octeon/cvmx-pow.h | 12 ++---
arch/mips/include/asm/octeon/cvmx-spi.h | 38 +++++++--------
drivers/staging/octeon/ethernet.c | 6 +--
drivers/staging/octeon/octeon-stubs.h | 48 +++++++++----------
12 files changed, 88 insertions(+), 88 deletions(-)
--
2.43.0
^ permalink raw reply
* Re: [PATCH 4/4] Revert "drivers: convert sbd_duart.map_guard from atomic_t to refcount_t"
From: Maciej W. Rozycki @ 2026-04-27 14:13 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Thomas Bogendoerfer, Jiri Slaby, Elena Reshetova, David Windsor,
Kees Cook, Hans Liljestrand, linux-mips, linux-serial,
linux-kernel
In-Reply-To: <2026042630-diaphragm-reactor-7cfe@gregkh>
On Sun, 26 Apr 2026, Greg Kroah-Hartman wrote:
> > Revert commit 22a33651a56f ("drivers: convert sbd_duart.map_guard from
> > atomic_t to refcount_t"), which broke perfectly valid code:
> >
> > ------------[ cut here ]------------
> > WARNING: CPU: 1 PID: 1 at lib/refcount.c:114 sbd_request_port+0x54/0x140
> > refcount_t: increment on 0; use-after-free.
> > CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc2+ #34
> > Stack : 0000000014001fe0 0000000000000000 ffffffff80830000 0000000000000000
> > ffffffff8127bc7a ffffffff8016fe08 ffffffff808d0000 ffffffff808d0000
> > ffffffff807aa828 ffffffff80822337 ffffffff808ce188 a8000001860b0000
> > 0000000000000001 0000000000000001 00000000000001c8 ffffffff808a3090
> > 00000000000000bb ffffffff801b09d4 a80000018609bb68 ffffffff801231cc
> > ffffffff812a0000 ffffffff80171388 0000000000001000 ffffffff807aa828
> > 0000000000000001 0000000000000001 0000000000000000 0000000000000000
> > 0000000000000000 a80000018609bab0 0000000000000000 ffffffff803c47cc
> > 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> > ffffffff807cb648 ffffffff8010bff8 0000000014001fe1 ffffffff803c47cc
> > ...
> > Call Trace:
> > [<ffffffff8010bff8>] show_stack+0x28/0x88
> > [<ffffffff803c47cc>] dump_stack+0x8c/0xc0
> > [<ffffffff801aff5c>] __warn+0xe0/0x114
> > [<ffffffff801233f0>] warn_slowpath_fmt+0x40/0x50
> > [<ffffffff80455bcc>] sbd_request_port+0x54/0x140
> > [<ffffffff804563a4>] sbd_config_port+0x2c/0x68
> > ---[ end trace f666d696412caa3e ]---
> >
> > (report at the offending commit) -- sbd_request_port() is called twice
> > per DUART instance, to reserve a resource holding the control register
> > block shared between the two channels, so there's no slightest chance
> > for an overflow. Also this doesn't stop the driver from working and
> > it's just the reservation that is missing as a result, i.e.:
> >
> > 10060100-100601ff : sb1250-duart
> > 10060200-100602ff : sb1250-duart
> >
> > as from the offending change, vs:
> >
> > 10060100-100601ff : sb1250-duart
> > 10060200-100602ff : sb1250-duart
> > 10060300-100603ff : sb1250-duart
> >
> > beforehand, which is surely why the breakage has gone so long unnoticed.
> >
> > "If it ain't broke, don't fix it," so just revert the broken commit.
>
> How about fix this up to work properly with a refcount? having "open
> coded" atomic variables like this is ripe for problems, like it seems
> this driver is abusing.
Clearly refcount has odd semantics for this use case, as the failed
attempt to "fix" this code has shown.
The natural values for `map_guard' are 0 and 1 (FALSE and TRUE), for the
resource not taken and taken respectively, however refcount code complains
about this arrangement as indicated by the report quoted.
I suppose I can bend backwards and adopt other values, which I'll have to
figure out from the API somehow, but it's not clear to me how it would
cause less confusion than original straightforward code, the whole point
of which is to prevent the resource from being requested again for the
second port in a DUART.
Or I could use an ordinary variable, possibly of the `bool' type, guarded
by a spinlock, but that would be even more of an overkill IMO.
Maciej
^ permalink raw reply
* Re: [PATCH v4] staging: octeon: remove SPI, POW, and PKO typedef enums
From: Dan Carpenter @ 2026-04-27 9:00 UTC (permalink / raw)
To: Maxwell Doose
Cc: Greg KH, tsbogend, len.bao, yoelvisoliveros, linux-mips,
linux-kernel, linux-staging
In-Reply-To: <CAKqfh0HJtz+hjJGMcDGQDQeUQDP2u5JdPh8YVwV=Q0MWhs2tTw@mail.gmail.com>
On Sun, Apr 26, 2026 at 11:46:27PM -0500, Maxwell Doose wrote:
> Hi Greg,
>
> On Sun, Apr 26, 2026 at 10:50 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > How was this tested given that the previous ones all were not?
> >
>
> What ended up happening was when I did my test compilation, I'd
> forgotten to compile the arch/mips half of the driver. The test bot
> obviously then caught that and it ended up being fixed. It's also
> important to keep in mind that this is (or was, rather) my first
> *ever* patch, I hadn't learned all of the tools of the kernel yet. I'm
> almost certain that this revision is sound, as the test bot hasn't
> reported any errors or warnings, and Dan Carpenter hasn't asked for
> any naming changes.
I don't care about the naming so long as you don't have two enums
with the same name where one ends in _e (which stands for enum).
But I also haven't looked at this code at all.
regards,
dan carpenter
^ permalink raw reply
* Re: [PATCH v2 06/41] drm/imx/dcss: remove now-redundant call to drm_connector_attach_encoder()
From: Laurentiu Palcu @ 2026-04-27 7:20 UTC (permalink / raw)
To: Luca Ceresoli
Cc: Dmitry Baryshkov, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Sasha Finkelstein, Janne Grunau, Liu Ying,
Douglas Anderson, Lucas Stach, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Philipp Zabel,
Paul Cercueil, Anitha Chrisanthus, Chun-Kuang Hu,
Matthias Brugger, AngeloGioacchino Del Regno, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
Tomi Valkeinen, Sandy Huang, Heiko Stübner, Andy Yan,
Thierry Reding, Mikko Perttunen, Jonathan Hunter, Icenowy Zheng,
Jingoo Han, Inki Dae, Seung-Woo Kim, Kyungmin Park,
Krzysztof Kozlowski, Alim Akhtar, Laurent Pinchart,
Tomi Valkeinen, Kieran Bingham, Geert Uytterhoeven, Magnus Damm,
Biju Das, Marek Vasut, Stefan Agner, Jyri Sarha, Michal Simek,
Hui Pu, Ian Ray, Thomas Petazzoni, dri-devel, linux-kernel, asahi,
imx, linux-arm-kernel, linux-mips, linux-mediatek, linux-amlogic,
linux-arm-msm, freedreno, linux-rockchip, linux-tegra,
linux-samsung-soc, linux-renesas-soc
In-Reply-To: <20260423-drm-bridge-connector-attach_encoder-v2-6-2ae6ca69b390@bootlin.com>
Hi Luca,
On Thu, Apr 23, 2026 at 11:17:00AM +0200, Luca Ceresoli wrote:
> drm_connector_attach_encoder() is now called by
> drm_bridge_connector_init().
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
--
Thanks,
Laurentiu
^ permalink raw reply
* Re: [PATCH v2 39/41] drm/imx: remove now-redundant call to drm_connector_attach_encoder()
From: Liu Ying @ 2026-04-27 7:20 UTC (permalink / raw)
To: Luca Ceresoli
Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Sasha Finkelstein,
Janne Grunau, Douglas Anderson, Laurentiu Palcu, Lucas Stach,
Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Philipp Zabel, Paul Cercueil, Anitha Chrisanthus, Chun-Kuang Hu,
Matthias Brugger, AngeloGioacchino Del Regno, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
Tomi Valkeinen, Sandy Huang, Heiko Stübner, Andy Yan,
Thierry Reding, Mikko Perttunen, Jonathan Hunter, Icenowy Zheng,
Jingoo Han, Inki Dae, Seung-Woo Kim, Kyungmin Park,
Krzysztof Kozlowski, Alim Akhtar, Laurent Pinchart,
Tomi Valkeinen, Kieran Bingham, Geert Uytterhoeven, Magnus Damm,
Biju Das, Marek Vasut, Stefan Agner, Jyri Sarha, Michal Simek,
Hui Pu, Ian Ray, Thomas Petazzoni, dri-devel, linux-kernel, asahi,
imx, linux-arm-kernel, linux-mips, linux-mediatek, linux-amlogic,
linux-arm-msm, freedreno, linux-rockchip, linux-tegra,
linux-samsung-soc, linux-renesas-soc
In-Reply-To: <20260423115550.444930-5-luca.ceresoli@bootlin.com>
On Thu, Apr 23, 2026 at 01:55:48PM +0200, Luca Ceresoli wrote:
> drm_connector_attach_encoder() is now called by
> drm_bridge_connector_init().
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> ---
> drivers/gpu/drm/imx/dc/dc-kms.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
Subject prefix should be 'drm/imx: dc:'.
With this fixed:
Reviewed-by: Liu Ying <victor.liu@nxp.com>
--
Regards,
Liu Ying
^ permalink raw reply
* Re: [PATCH v2 34/41] drm/mxsfb/lcdif: remove now-redundant call to drm_connector_attach_encoder()
From: Liu Ying @ 2026-04-27 7:17 UTC (permalink / raw)
To: Luca Ceresoli
Cc: Dmitry Baryshkov, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Sasha Finkelstein, Janne Grunau, Douglas Anderson,
Laurentiu Palcu, Lucas Stach, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Philipp Zabel,
Paul Cercueil, Anitha Chrisanthus, Chun-Kuang Hu,
Matthias Brugger, AngeloGioacchino Del Regno, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
Tomi Valkeinen, Sandy Huang, Heiko Stübner, Andy Yan,
Thierry Reding, Mikko Perttunen, Jonathan Hunter, Icenowy Zheng,
Jingoo Han, Inki Dae, Seung-Woo Kim, Kyungmin Park,
Krzysztof Kozlowski, Alim Akhtar, Laurent Pinchart,
Tomi Valkeinen, Kieran Bingham, Geert Uytterhoeven, Magnus Damm,
Biju Das, Marek Vasut, Stefan Agner, Jyri Sarha, Michal Simek,
Hui Pu, Ian Ray, Thomas Petazzoni, dri-devel, linux-kernel, asahi,
imx, linux-arm-kernel, linux-mips, linux-mediatek, linux-amlogic,
linux-arm-msm, freedreno, linux-rockchip, linux-tegra,
linux-samsung-soc, linux-renesas-soc
In-Reply-To: <20260423-drm-bridge-connector-attach_encoder-v2-34-2ae6ca69b390@bootlin.com>
On Thu, Apr 23, 2026 at 11:17:28AM +0200, Luca Ceresoli wrote:
> drm_connector_attach_encoder() is now called by
> drm_bridge_connector_init().
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> ---
> drivers/gpu/drm/mxsfb/lcdif_drv.c | 6 ------
> 1 file changed, 6 deletions(-)
Reviewed-by: Liu Ying <victor.liu@nxp.com>
--
Regards,
Liu Ying
^ permalink raw reply
* Re: [PATCH v2 04/41] drm/bridge: ite-it6263: remove now-redundant call to drm_connector_attach_encoder()
From: Liu Ying @ 2026-04-27 7:14 UTC (permalink / raw)
To: Luca Ceresoli
Cc: Dmitry Baryshkov, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Sasha Finkelstein, Janne Grunau, Douglas Anderson,
Laurentiu Palcu, Lucas Stach, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Philipp Zabel,
Paul Cercueil, Anitha Chrisanthus, Chun-Kuang Hu,
Matthias Brugger, AngeloGioacchino Del Regno, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
Tomi Valkeinen, Sandy Huang, Heiko Stübner, Andy Yan,
Thierry Reding, Mikko Perttunen, Jonathan Hunter, Icenowy Zheng,
Jingoo Han, Inki Dae, Seung-Woo Kim, Kyungmin Park,
Krzysztof Kozlowski, Alim Akhtar, Laurent Pinchart,
Tomi Valkeinen, Kieran Bingham, Geert Uytterhoeven, Magnus Damm,
Biju Das, Marek Vasut, Stefan Agner, Jyri Sarha, Michal Simek,
Hui Pu, Ian Ray, Thomas Petazzoni, dri-devel, linux-kernel, asahi,
imx, linux-arm-kernel, linux-mips, linux-mediatek, linux-amlogic,
linux-arm-msm, freedreno, linux-rockchip, linux-tegra,
linux-samsung-soc, linux-renesas-soc
In-Reply-To: <20260423-drm-bridge-connector-attach_encoder-v2-4-2ae6ca69b390@bootlin.com>
On Thu, Apr 23, 2026 at 11:16:58AM +0200, Luca Ceresoli wrote:
> drm_connector_attach_encoder() is now called by
> drm_bridge_connector_init().
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> ---
> drivers/gpu/drm/bridge/ite-it6263.c | 2 --
> 1 file changed, 2 deletions(-)
Reviewed-by: Liu Ying <victor.liu@nxp.com>
--
Regards,
Liu Ying
^ permalink raw reply
* Re: [PATCH v4] staging: octeon: remove SPI, POW, and PKO typedef enums
From: Maxwell Doose @ 2026-04-27 4:46 UTC (permalink / raw)
To: Greg KH
Cc: tsbogend, len.bao, yoelvisoliveros, error27, linux-mips,
linux-kernel, linux-staging
In-Reply-To: <2026042615-ambulance-upright-3041@gregkh>
Hi Greg,
On Sun, Apr 26, 2026 at 10:50 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> How was this tested given that the previous ones all were not?
>
What ended up happening was when I did my test compilation, I'd
forgotten to compile the arch/mips half of the driver. The test bot
obviously then caught that and it ended up being fixed. It's also
important to keep in mind that this is (or was, rather) my first
*ever* patch, I hadn't learned all of the tools of the kernel yet. I'm
almost certain that this revision is sound, as the test bot hasn't
reported any errors or warnings, and Dan Carpenter hasn't asked for
any naming changes.
> Also, this should be one commit per enum, right? Why not make this a
> patch series?
It /should/, but again, this was my first patch. Obviously for the
future that won't be my excuse again, but I agree now that this should
be a patch series.
Also, I think this v4 will be my last revision of this patch. The
integration between arch/mips and drivers/staging has some serious
friction and I think I need to go focus on the subsystems that I can
actually make positive change in.
best regards,
maxwell
^ permalink raw reply
* Re: [PATCH 4/4] Revert "drivers: convert sbd_duart.map_guard from atomic_t to refcount_t"
From: Greg Kroah-Hartman @ 2026-04-26 20:45 UTC (permalink / raw)
To: Maciej W. Rozycki
Cc: Thomas Bogendoerfer, Jiri Slaby, Elena Reshetova, David Windsor,
Kees Cook, Hans Liljestrand, linux-mips, linux-serial,
linux-kernel
In-Reply-To: <alpine.DEB.2.21.2604130416440.29980@angie.orcam.me.uk>
On Mon, Apr 13, 2026 at 04:28:53AM +0100, Maciej W. Rozycki wrote:
> Revert commit 22a33651a56f ("drivers: convert sbd_duart.map_guard from
> atomic_t to refcount_t"), which broke perfectly valid code:
>
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 1 at lib/refcount.c:114 sbd_request_port+0x54/0x140
> refcount_t: increment on 0; use-after-free.
> CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.11.0-rc2+ #34
> Stack : 0000000014001fe0 0000000000000000 ffffffff80830000 0000000000000000
> ffffffff8127bc7a ffffffff8016fe08 ffffffff808d0000 ffffffff808d0000
> ffffffff807aa828 ffffffff80822337 ffffffff808ce188 a8000001860b0000
> 0000000000000001 0000000000000001 00000000000001c8 ffffffff808a3090
> 00000000000000bb ffffffff801b09d4 a80000018609bb68 ffffffff801231cc
> ffffffff812a0000 ffffffff80171388 0000000000001000 ffffffff807aa828
> 0000000000000001 0000000000000001 0000000000000000 0000000000000000
> 0000000000000000 a80000018609bab0 0000000000000000 ffffffff803c47cc
> 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> ffffffff807cb648 ffffffff8010bff8 0000000014001fe1 ffffffff803c47cc
> ...
> Call Trace:
> [<ffffffff8010bff8>] show_stack+0x28/0x88
> [<ffffffff803c47cc>] dump_stack+0x8c/0xc0
> [<ffffffff801aff5c>] __warn+0xe0/0x114
> [<ffffffff801233f0>] warn_slowpath_fmt+0x40/0x50
> [<ffffffff80455bcc>] sbd_request_port+0x54/0x140
> [<ffffffff804563a4>] sbd_config_port+0x2c/0x68
> ---[ end trace f666d696412caa3e ]---
>
> (report at the offending commit) -- sbd_request_port() is called twice
> per DUART instance, to reserve a resource holding the control register
> block shared between the two channels, so there's no slightest chance
> for an overflow. Also this doesn't stop the driver from working and
> it's just the reservation that is missing as a result, i.e.:
>
> 10060100-100601ff : sb1250-duart
> 10060200-100602ff : sb1250-duart
>
> as from the offending change, vs:
>
> 10060100-100601ff : sb1250-duart
> 10060200-100602ff : sb1250-duart
> 10060300-100603ff : sb1250-duart
>
> beforehand, which is surely why the breakage has gone so long unnoticed.
>
> "If it ain't broke, don't fix it," so just revert the broken commit.
How about fix this up to work properly with a refcount? having "open
coded" atomic variables like this is ripe for problems, like it seems
this driver is abusing.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH v4] staging: octeon: remove SPI, POW, and PKO typedef enums
From: Greg KH @ 2026-04-26 18:55 UTC (permalink / raw)
To: Maxwell Doose
Cc: tsbogend, len.bao, yoelvisoliveros, error27, linux-mips,
linux-kernel, linux-staging
In-Reply-To: <20260418230344.44242-1-m32285159@gmail.com>
On Sat, Apr 18, 2026 at 06:03:44PM -0500, Maxwell Doose wrote:
> This patch removes custom typedef enums and replaces them with standard
> enums to address the "General code review and cleanup" task in TODO.
>
> The following enums are affected:
>
> - cvmx_spi_mode_t (now enum cvmx_spi_mode)
> - cvmx_pow_wait_t (now enum cvmx_pow_wait)
> - cvmx_pko_lock_t (now enum cvmx_pko_lock)
> - cvmx_pko_status_t (now enum cvmx_pko_status)
>
> This patch aligns the octeon codebase more closely with the Linux kernel
> code style, and will address the "cleanup" task in TODO.
>
> Signed-off-by: Maxwell Doose <m32285159@gmail.com>
> ---
> v2:
> - Appended "_e" to enum cvmx_helper_interface_mode to prevent namespace
> collisions with a struct of the same name
> - Fixed errors that were indirect results of the namespace collisions
How was this tested given that the previous ones all were not?
Also, this should be one commit per enum, right? Why not make this a
patch series?
thanks,
greg k-h
^ permalink raw reply
* [PATCH 3/3] wifi: mt76: remove mt76_get_of_data_from_mtd
From: Rosen Penev @ 2026-04-27 3:44 UTC (permalink / raw)
To: devicetree
Cc: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
Sean Wang, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Thomas Bogendoerfer, open list:MEDIATEK MT76 WIRELESS LAN DRIVER,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support, open list:MIPS
In-Reply-To: <20260427034427.881389-1-rosenp@gmail.com>
mt76_get_of_data_from_mtd has been replaced by
mt76_get_of_data_from_nvmem in all usages.
Remove it to prevent people from using the deprecated
mediatek,mtd-eeprom binding.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/net/wireless/mediatek/mt76/eeprom.c | 87 -------------------
drivers/net/wireless/mediatek/mt76/mt76.h | 1 -
.../wireless/mediatek/mt76/mt7915/eeprom.c | 4 -
3 files changed, 92 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c
index afdb73661866..092804323d81 100644
--- a/drivers/net/wireless/mediatek/mt76/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/eeprom.c
@@ -35,89 +35,6 @@ static int mt76_get_of_eeprom_data(struct mt76_dev *dev, void *eep, int len)
return 0;
}
-int mt76_get_of_data_from_mtd(struct mt76_dev *dev, void *eep, int offset, int len)
-{
-#ifdef CONFIG_MTD
- struct device_node *np = dev->dev->of_node;
- struct mtd_info *mtd;
- const __be32 *list;
- const char *part;
- phandle phandle;
- size_t retlen;
- int size;
- int ret;
-
- list = of_get_property(np, "mediatek,mtd-eeprom", &size);
- if (!list)
- return -ENOENT;
-
- phandle = be32_to_cpup(list++);
- if (!phandle)
- return -ENOENT;
-
- np = of_find_node_by_phandle(phandle);
- if (!np)
- return -EINVAL;
-
- part = of_get_property(np, "label", NULL);
- if (!part)
- part = np->name;
-
- mtd = get_mtd_device_nm(part);
- if (IS_ERR(mtd)) {
- ret = PTR_ERR(mtd);
- goto out_put_node;
- }
-
- if (size <= sizeof(*list)) {
- ret = -EINVAL;
- goto out_put_node;
- }
-
- offset += be32_to_cpup(list);
- ret = mtd_read(mtd, offset, len, &retlen, eep);
- put_mtd_device(mtd);
- if (mtd_is_bitflip(ret))
- ret = 0;
- if (ret) {
- dev_err(dev->dev, "reading EEPROM from mtd %s failed: %i\n",
- part, ret);
- goto out_put_node;
- }
-
- if (retlen < len) {
- ret = -EINVAL;
- goto out_put_node;
- }
-
- if (of_property_read_bool(dev->dev->of_node, "big-endian")) {
- u8 *data = (u8 *)eep;
- int i;
-
- /* convert eeprom data in Little Endian */
- for (i = 0; i < round_down(len, 2); i += 2)
- put_unaligned_le16(get_unaligned_be16(&data[i]),
- &data[i]);
- }
-
-#ifdef CONFIG_NL80211_TESTMODE
- dev->test_mtd.name = devm_kstrdup(dev->dev, part, GFP_KERNEL);
- if (!dev->test_mtd.name) {
- ret = -ENOMEM;
- goto out_put_node;
- }
- dev->test_mtd.offset = offset;
-#endif
-
-out_put_node:
- of_node_put(np);
- return ret;
-#else
- return -ENOENT;
-#endif
-}
-EXPORT_SYMBOL_GPL(mt76_get_of_data_from_mtd);
-
int mt76_get_of_data_from_nvmem(struct mt76_dev *dev, void *eep,
const char *cell_name, int len)
{
@@ -163,10 +80,6 @@ static int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int len)
if (!ret)
return 0;
- ret = mt76_get_of_data_from_mtd(dev, eep, 0, len);
- if (!ret)
- return 0;
-
return mt76_get_of_data_from_nvmem(dev, eep, "eeprom", len);
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 527bef97e122..f447ecac664d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -1339,7 +1339,6 @@ void mt76_seq_puts_array(struct seq_file *file, const char *str,
int mt76_eeprom_init(struct mt76_dev *dev, int len);
int mt76_eeprom_override(struct mt76_phy *phy);
-int mt76_get_of_data_from_mtd(struct mt76_dev *dev, void *eep, int offset, int len);
int mt76_get_of_data_from_nvmem(struct mt76_dev *dev, void *eep,
const char *cell_name, int len);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c
index eb92cbf1a284..c24e1276700b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c
@@ -29,10 +29,6 @@ static int mt7915_eeprom_load_precal(struct mt7915_dev *dev)
offs = is_mt7915(&dev->mt76) ? MT_EE_PRECAL : MT_EE_PRECAL_V2;
- ret = mt76_get_of_data_from_mtd(mdev, dev->cal, offs, size);
- if (!ret)
- return ret;
-
ret = mt76_get_of_data_from_nvmem(mdev, dev->cal, "precal", size);
if (!ret)
return ret;
--
2.54.0
^ permalink raw reply related
* [PATCH 2/3] dt-bindings: net: wireless: mt76: remove mediatek,mtd-eeprom
From: Rosen Penev @ 2026-04-27 3:44 UTC (permalink / raw)
To: devicetree
Cc: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
Sean Wang, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Thomas Bogendoerfer, open list:MEDIATEK MT76 WIRELESS LAN DRIVER,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support, open list:MIPS
In-Reply-To: <20260427034427.881389-1-rosenp@gmail.com>
mediatek,mtd-eeprom is a widely unused binding that predates and has
been replaced by NVMEM. As there are no users, remove it.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
.../bindings/net/wireless/mediatek,mt76.yaml | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
index ae6b97cdc44b..482c22cd6627 100644
--- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
@@ -87,21 +87,6 @@ properties:
description:
EEPROM data embedded as array.
- mediatek,mtd-eeprom:
- $ref: /schemas/types.yaml#/definitions/phandle-array
- items:
- - items:
- - description: phandle to MTD partition
- - description: offset containing EEPROM data
- description:
- Phandle to a MTD partition + offset containing EEPROM data
- deprecated: true
-
- big-endian:
- $ref: /schemas/types.yaml#/definitions/flag
- description:
- Specify if the radio eeprom partition is written in big-endian
-
mediatek,eeprom-merge-otp:
type: boolean
description:
@@ -314,8 +299,8 @@ examples:
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
- mediatek,mtd-eeprom = <&factory 0x8000>;
- big-endian;
+ nvmem-cells = <&eeprom>;
+ nvmem-cell-names = "eeprom";
led {
led-sources = <2>;
--
2.54.0
^ permalink raw reply related
* [PATCH 1/3] MIPS: dts: ralink: gardena_smart_gateway_mt7688: use nvmem for EEPROM
From: Rosen Penev @ 2026-04-27 3:44 UTC (permalink / raw)
To: devicetree
Cc: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
Sean Wang, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Thomas Bogendoerfer, open list:MEDIATEK MT76 WIRELESS LAN DRIVER,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support, open list:MIPS
In-Reply-To: <20260427034427.881389-1-rosenp@gmail.com>
mediatek,mtd-eeprom is a deprecated binding for extracting data on MTD
devices which has been replaced by NVMEM.
The latter is already in wide use with mt76. As this is the only user,
transition to NVMEM.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
.../dts/ralink/gardena_smart_gateway_mt7688.dts | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts b/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts
index 0bfb1dde9764..a8a8efbaf527 100644
--- a/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts
+++ b/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts
@@ -155,10 +155,20 @@ partition@b0000 {
reg = <0xb0000 0x10000>;
};
- factory: partition@c0000 {
+ partition@c0000 {
label = "factory";
reg = <0xc0000 0x10000>;
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #nvmem-cell-cells = <1>;
+
+ eeprom_factory_0: eeprom@0 {
+ reg = <0x0 0x400>;
+ };
+ };
};
};
};
@@ -201,5 +211,8 @@ &watchdog {
&wmac {
status = "okay";
- mediatek,mtd-eeprom = <&factory 0x0000>;
+
+ nvmem-cells = <&eeprom_factory_0>;
+ nvmem-cell-names = "eeprom"
+
};
--
2.54.0
^ permalink raw reply related
* [PATCH 0/3] wifi: mt76: remove mediatek,mtd-eeprom
From: Rosen Penev @ 2026-04-27 3:44 UTC (permalink / raw)
To: devicetree
Cc: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
Sean Wang, Johannes Berg, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Thomas Bogendoerfer, open list:MEDIATEK MT76 WIRELESS LAN DRIVER,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support, open list:MIPS
mediatek,mtd-eeprom predates nvmem which is used everywhere to grab
eeprom and mac-address data from MTD devices.
Transition the one place to nvmem and remove the binding to discourage
use.
Rosen Penev (3):
MIPS: dts: ralink: gardena_smart_gateway_mt7688: use nvmem for EEPROM
dt-bindings: net: wireless: mt76: remove mediatek,mtd-eeprom
wifi: mt76: remove mt76_get_of_data_from_mtd
.../bindings/net/wireless/mediatek,mt76.yaml | 19 +---
.../ralink/gardena_smart_gateway_mt7688.dts | 17 +++-
drivers/net/wireless/mediatek/mt76/eeprom.c | 87 -------------------
drivers/net/wireless/mediatek/mt76/mt76.h | 1 -
.../wireless/mediatek/mt76/mt7915/eeprom.c | 4 -
5 files changed, 17 insertions(+), 111 deletions(-)
--
2.54.0
^ permalink raw reply
* Re: [PATCH net-deletions v2] net: remove unused ATM protocols and legacy ATM device drivers
From: patchwork-bot+netdevbpf @ 2026-04-27 0:36 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, corbet,
skhan, linux, tsbogend, maddy, mpe, npiggin, chleroy, 3chas3,
razor, idosch, jani.nikula, mchehab+huawei, tytso, herbert, geert,
ebiggers, johannes.berg, jonathan.cameron, kees, kuniyu,
fourier.thomas, andriy.shevchenko, rdunlap, akpm, linux-doc,
linux-mips, linuxppc-dev, bridge, dwmw2
In-Reply-To: <20260422041846.2035118-1-kuba@kernel.org>
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 21 Apr 2026 21:18:44 -0700 you wrote:
> Remove the ATM protocol modules and PCI/SBUS ATM device drivers
> that are no longer in active use.
>
> The ATM core protocol stack, PPPoATM, BR2684, and USB DSL modem
> drivers (drivers/usb/atm/) are retained in-tree to maintain PPP
> over ATM (PPPoA) and PPPoE-over-BR2684 support for DSL connections.
>
> [...]
Here is the summary with links:
- [net-deletions,v2] net: remove unused ATM protocols and legacy ATM device drivers
https://git.kernel.org/netdev/net/c/6deb53595092
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply
* [PATCH] MIPS: mobileye: Remove duplicate FIT_IMAGE_FDT_EPM5 from main Kconfig
From: Sasha Levin @ 2026-04-26 0:03 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel
kconfiglint reports:
K008: config FIT_IMAGE_FDT_EPM5 has prompts in 2 separate definitions
The FIT_IMAGE_FDT_EPM5 Kconfig symbol is defined identically in two places:
arch/mips/Kconfig:1052
arch/mips/mobileye/Kconfig:17
Both have the same prompt, depends, default, and help text. Since
arch/mips/mobileye/Kconfig is sourced from arch/mips/Kconfig, both
definitions are parsed and the symbol ends up with two prompts.
The symbol was first introduced in commit 101bd58fde10 ("MIPS: Add
support for Mobileye EyeQ5") directly in
arch/mips/Kconfig. Three months later, commit fbe0fae601b7 ("MIPS:
mobileye: Add EyeQ6H support") created the
arch/mips/mobileye/Kconfig sub-file to organize the growing Mobileye
platform code and added the MACH_EYEQ5/MACH_EYEQ6H choice along with
a copy of FIT_IMAGE_FDT_EPM5. However, the original definition in
arch/mips/Kconfig was not removed at that time, leaving a duplicate.
Remove the definition from arch/mips/Kconfig, keeping the one in
arch/mips/mobileye/Kconfig where it belongs alongside the related
MACH_EYEQ5 machine type definition that it depends on.
Assisted-by: Claude:claude-opus-4-6 kconfiglint
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/mips/Kconfig | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 4364f3dba688f..1cd8fc9033876 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1049,15 +1049,6 @@ config CAVIUM_OCTEON_SOC
endchoice
-config FIT_IMAGE_FDT_EPM5
- bool "Include FDT for Mobileye EyeQ5 development platforms"
- depends on MACH_EYEQ5
- default n
- help
- Enable this to include the FDT for the EyeQ5 development platforms
- from Mobileye in the FIT kernel image.
- This requires u-boot on the platform.
-
source "arch/mips/alchemy/Kconfig"
source "arch/mips/ath25/Kconfig"
source "arch/mips/ath79/Kconfig"
--
2.53.0
^ permalink raw reply related
* [PATCH v3 2/2] phy: econet: Add PCIe PHY driver for EcoNet EN751221 and EN7528 SoCs.
From: Caleb James DeLisle @ 2026-04-25 17:36 UTC (permalink / raw)
To: linux-phy
Cc: naseefkm, vkoul, neil.armstrong, robh, krzk+dt, conor+dt,
linux-mips, devicetree, linux-kernel, Caleb James DeLisle
In-Reply-To: <20260425173642.406089-1-cjd@cjdns.fr>
Introduce support for EcoNet PCIe PHY controllers found in EN751221
and EN7528 SoCs, these SoCs are not identical but are similar, each
having one Gen1 port, and one Gen1/Gen2 port.
Co-developed-by: Ahmed Naseef <naseefkm@gmail.com>
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
[cjd@cjdns.fr: add EN751221 support and refactor for clarity]
Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
---
MAINTAINERS | 1 +
drivers/phy/Kconfig | 12 +++
drivers/phy/Makefile | 1 +
drivers/phy/phy-econet-pcie.c | 182 ++++++++++++++++++++++++++++++++++
4 files changed, 196 insertions(+)
create mode 100644 drivers/phy/phy-econet-pcie.c
diff --git a/MAINTAINERS b/MAINTAINERS
index 6fc1f54c31d2..e7d7672c8ab3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9190,6 +9190,7 @@ M: Caleb James DeLisle <cjd@cjdns.fr>
L: linux-mips@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/phy/econet,en751221-pcie-phy.yaml
+F: drivers/phy/phy-econet-pcie.c
ECRYPT FILE SYSTEM
M: Tyler Hicks <code@tyhicks.com>
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 227b9a4c612e..9aad68829d72 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -66,6 +66,18 @@ config PHY_CAN_TRANSCEIVER
functional modes using gpios and sets the attribute max link
rate, for CAN drivers.
+config PHY_ECONET_PCIE
+ tristate "EcoNet PCIe-PHY Driver"
+ depends on ECONET || COMPILE_TEST
+ depends on OF
+ select GENERIC_PHY
+ select REGMAP_MMIO
+ help
+ Say Y here to add support for EcoNet PCIe PHY driver.
+ This driver create the basic PHY instance and provides initialize
+ callback for PCIe GEN1 and GEN2 ports. This PHY is found on
+ EcoNet SoCs including EN751221 and EN7528.
+
config PHY_GOOGLE_USB
tristate "Google Tensor SoC USB PHY driver"
select GENERIC_PHY
diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
index f49d83f00a3d..42959ed383fd 100644
--- a/drivers/phy/Makefile
+++ b/drivers/phy/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_GENERIC_PHY) += phy-core.o
obj-$(CONFIG_GENERIC_PHY_MIPI_DPHY) += phy-core-mipi-dphy.o
obj-$(CONFIG_PHY_AIROHA_PCIE) += phy-airoha-pcie.o
obj-$(CONFIG_PHY_CAN_TRANSCEIVER) += phy-can-transceiver.o
+obj-$(CONFIG_PHY_ECONET_PCIE) += phy-econet-pcie.o
obj-$(CONFIG_PHY_GOOGLE_USB) += phy-google-usb.o
obj-$(CONFIG_USB_LGM_PHY) += phy-lgm-usb.o
obj-$(CONFIG_PHY_LPC18XX_USB_OTG) += phy-lpc18xx-usb-otg.o
diff --git a/drivers/phy/phy-econet-pcie.c b/drivers/phy/phy-econet-pcie.c
new file mode 100644
index 000000000000..96be69d1ffeb
--- /dev/null
+++ b/drivers/phy/phy-econet-pcie.c
@@ -0,0 +1,182 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Author: Caleb James DeLisle <cjd@cjdns.fr>
+ * Ahmed Naseef <naseefkm@gmail.com>
+ */
+
+#include <linux/bitfield.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/phy/phy.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/bits.h>
+#include <linux/delay.h>
+
+/* Rx detection timing for EN751221: 16*8 clock cycles */
+#define EN751221_RXDET_VAL 16
+
+/* Rx detection timing when in power mode 3 */
+#define EN75_RXDET_P3_REG 0xa28
+#define EN75_RXDET_P3_MASK GENMASK(17, 9)
+
+/* Rx detection timing when in power mode 2 */
+#define EN75_RXDET_P2_REG 0xa2c
+#define EN75_RXDET_P2_MASK GENMASK(8, 0)
+
+/* Rx impedance */
+#define EN75_RX_IMPEDANCE_REG 0xb2c
+#define EN75_RX_IMPEDANCE_MASK GENMASK(13, 12)
+enum en75_rx_impedance {
+ EN75_RX_IMPEDANCE_100_OHM = 0,
+ EN75_RX_IMPEDANCE_95_OHM = 1,
+ EN75_RX_IMPEDANCE_90_OHM = 2,
+};
+
+/* PLL Invert clock */
+#define EN75_PLL_PH_INV_REG 0x4a0
+#define EN75_PLL_PH_INV_MASK BIT(5)
+
+struct en75_phy_op {
+ u32 reg;
+ u32 mask;
+ u32 val;
+};
+
+struct en7528_pcie_phy {
+ struct regmap *regmap;
+ const struct en75_phy_op *data;
+};
+
+/* Port 0 PHY: set LCDDS_CLK_PH_INV for PLL operation */
+static const struct en75_phy_op en7528_phy_gen1[] = {
+ {
+ .reg = EN75_PLL_PH_INV_REG,
+ .mask = EN75_PLL_PH_INV_MASK,
+ .val = 1,
+ },
+ { /* sentinel */ }
+};
+
+/* EN7528 Port 1 PHY: Rx impedance tuning, target R -5 Ohm */
+static const struct en75_phy_op en7528_phy_gen2[] = {
+ {
+ .reg = EN75_RX_IMPEDANCE_REG,
+ .mask = EN75_RX_IMPEDANCE_MASK,
+ .val = EN75_RX_IMPEDANCE_95_OHM,
+ },
+ { /* sentinel */ }
+};
+
+/* EN751221 Port 1 PHY, set RX detect to 16*8 clock cycles */
+static const struct en75_phy_op en751221_phy_gen2[] = {
+ {
+ .reg = EN75_RXDET_P3_REG,
+ .mask = EN75_RXDET_P3_MASK,
+ .val = EN751221_RXDET_VAL,
+ },
+ {
+ .reg = EN75_RXDET_P2_REG,
+ .mask = EN75_RXDET_P2_MASK,
+ .val = EN751221_RXDET_VAL,
+ },
+ { /* sentinel */ }
+};
+
+static int en75_pcie_phy_init(struct phy *phy)
+{
+ struct en7528_pcie_phy *ephy = phy_get_drvdata(phy);
+ const struct en75_phy_op *data = ephy->data;
+ int i, ret;
+ u32 val;
+
+ for (i = 0; data[i].mask || data[i].val; i++) {
+ if (i)
+ usleep_range(1000, 2000);
+
+ val = field_prep(data[i].mask, data[i].val);
+
+ ret = regmap_update_bits(ephy->regmap, data[i].reg,
+ data[i].mask, val);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
+static const struct phy_ops en75_pcie_phy_ops = {
+ .init = en75_pcie_phy_init,
+ .owner = THIS_MODULE,
+};
+
+static int en75_pcie_phy_probe(struct platform_device *pdev)
+{
+ struct regmap_config regmap_config = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+ };
+ struct device *dev = &pdev->dev;
+ const struct en75_phy_op *data;
+ struct phy_provider *provider;
+ struct en7528_pcie_phy *ephy;
+ void __iomem *base;
+ struct phy *phy;
+ int i;
+
+ data = of_device_get_match_data(dev);
+ if (!data)
+ return -EINVAL;
+
+ ephy = devm_kzalloc(dev, sizeof(*ephy), GFP_KERNEL);
+ if (!ephy)
+ return -ENOMEM;
+
+ ephy->data = data;
+
+ base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
+
+ /* Set max_register to highest used register */
+ for (i = 0; data[i].mask || data[i].val; i++)
+ if (data[i].reg > regmap_config.max_register)
+ regmap_config.max_register = data[i].reg;
+
+ ephy->regmap = devm_regmap_init_mmio(dev, base, ®map_config);
+ if (IS_ERR(ephy->regmap))
+ return PTR_ERR(ephy->regmap);
+
+ phy = devm_phy_create(dev, dev->of_node, &en75_pcie_phy_ops);
+ if (IS_ERR(phy))
+ return PTR_ERR(phy);
+
+ phy_set_drvdata(phy, ephy);
+
+ provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
+
+ return PTR_ERR_OR_ZERO(provider);
+}
+
+static const struct of_device_id en75_pcie_phy_ids[] = {
+ { .compatible = "econet,en7528-pcie-gen1", .data = en7528_phy_gen1 },
+ { .compatible = "econet,en7528-pcie-gen2", .data = en7528_phy_gen2 },
+ { .compatible = "econet,en751221-pcie-gen1", .data = en7528_phy_gen1 },
+ { .compatible = "econet,en751221-pcie-gen2", .data = en751221_phy_gen2 },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, en75_pcie_phy_ids);
+
+static struct platform_driver en75_pcie_phy_driver = {
+ .probe = en75_pcie_phy_probe,
+ .driver = {
+ .name = "econet-pcie-phy",
+ .of_match_table = en75_pcie_phy_ids,
+ },
+};
+module_platform_driver(en75_pcie_phy_driver);
+
+MODULE_AUTHOR("Caleb James DeLisle <cjd@cjdns.fr>");
+MODULE_DESCRIPTION("EcoNet PCIe PHY driver");
+MODULE_LICENSE("GPL");
--
2.39.5
^ permalink raw reply related
* [PATCH v3 1/2] dt-bindings: phy: Document PCIe PHY in EcoNet EN751221 and EN7528
From: Caleb James DeLisle @ 2026-04-25 17:36 UTC (permalink / raw)
To: linux-phy
Cc: naseefkm, vkoul, neil.armstrong, robh, krzk+dt, conor+dt,
linux-mips, devicetree, linux-kernel, Caleb James DeLisle,
Krzysztof Kozlowski
In-Reply-To: <20260425173642.406089-1-cjd@cjdns.fr>
EN751221 and EN7528 SoCs have two PCIe slots, and each one has a PHY
which behaves slightly differently because one slot is Gen1/Gen2 while
the other is Gen1 only.
Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
.../phy/econet,en751221-pcie-phy.yaml | 50 +++++++++++++++++++
MAINTAINERS | 6 +++
2 files changed, 56 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/econet,en751221-pcie-phy.yaml
diff --git a/Documentation/devicetree/bindings/phy/econet,en751221-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/econet,en751221-pcie-phy.yaml
new file mode 100644
index 000000000000..987d396c1c64
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/econet,en751221-pcie-phy.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/econet,en751221-pcie-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: EcoNet PCI-Express PHY for EcoNet EN751221 and EN7528
+
+maintainers:
+ - Caleb James DeLisle <cjd@cjdns.fr>
+
+description:
+ The PCIe PHY supports physical layer functionality for PCIe Gen1 and
+ Gen1/Gen2 ports. On these SoCs, port 0 is a Gen1-only port while
+ port 1 is Gen1/Gen2 capable.
+
+properties:
+ compatible:
+ enum:
+ - econet,en751221-pcie-gen1
+ - econet,en751221-pcie-gen2
+ - econet,en7528-pcie-gen1
+ - econet,en7528-pcie-gen2
+
+ reg:
+ maxItems: 1
+
+ "#phy-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ soc {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ pcie-phy@1faf2000 {
+ compatible = "econet,en7528-pcie-gen1";
+ reg = <0x1faf2000 0x1000>;
+ #phy-cells = <0>;
+ };
+ };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 62b89d0013d2..6fc1f54c31d2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9185,6 +9185,12 @@ F: drivers/irqchip/irq-econet-en751221.c
F: include/dt-bindings/clock/econet,en751221-scu.h
F: include/dt-bindings/reset/econet,en751221-scu.h
+ECONET PCIE PHY DRIVER
+M: Caleb James DeLisle <cjd@cjdns.fr>
+L: linux-mips@vger.kernel.org
+S: Maintained
+F: Documentation/devicetree/bindings/phy/econet,en751221-pcie-phy.yaml
+
ECRYPT FILE SYSTEM
M: Tyler Hicks <code@tyhicks.com>
L: ecryptfs@vger.kernel.org
--
2.39.5
^ permalink raw reply related
* [PATCH v3 0/2] phy: econet: Add PCIe PHY driver for EcoNet SoCs
From: Caleb James DeLisle @ 2026-04-25 17:36 UTC (permalink / raw)
To: linux-phy
Cc: naseefkm, vkoul, neil.armstrong, robh, krzk+dt, conor+dt,
linux-mips, devicetree, linux-kernel, Caleb James DeLisle
I just added explicit includes per the recommendation of
vladimiroltean/sashiko
See https://sashiko.dev/#/patchset/20260404184918.2184070-1-cjd@cjdns.fr
Changes from v2:
* Added includes per recommendation of vladimiroltean/sashiko
* Rebased on commit 7080e32d3f09 ("Add linux-next specific files for 20260424")
* v2: https://lore.kernel.org/linux-mips/20260404184918.2184070-1-cjd@cjdns.fr/
Changes from v1:
* Rebased on commit 2febe6e6ee6e ("Add linux-next specific files for 20260403")
* v1: https://lore.kernel.org/linux-mips/20260312164432.569566-1-cjd@cjdns.fr/
This is split from a larger PCIe patchset which crossed multiple
subsystems. I'm not labeling this a v3 because it's a new patchset, but
I'm keeping the historical record anyway.
Changes from econet-pcie v2: none relevant to this patch set
* econet-pcie v2: https://lore.kernel.org/linux-mips/20260309131818.74467-1-cjd@cjdns.fr
Changes from econet-pcie v1:
* econet,en751221-pcie-phy.yaml Refer to PHYs as "gen1" and "gen2"
* econet-pcie v1: https://lore.kernel.org/linux-mips/20260303190948.694783-1-cjd@cjdns.fr/
Caleb James DeLisle (2):
dt-bindings: phy: Document PCIe PHY in EcoNet EN751221 and EN7528
phy: econet: Add PCIe PHY driver for EcoNet EN751221 and EN7528 SoCs.
.../phy/econet,en751221-pcie-phy.yaml | 50 +++++
MAINTAINERS | 7 +
drivers/phy/Kconfig | 12 ++
drivers/phy/Makefile | 1 +
drivers/phy/phy-econet-pcie.c | 182 ++++++++++++++++++
5 files changed, 252 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/econet,en751221-pcie-phy.yaml
create mode 100644 drivers/phy/phy-econet-pcie.c
base-commit: 7080e32d3f09d8688c4a87d81bdcc71f7f606b16
--
2.39.5
^ permalink raw reply
* Re: [PATCH 1/2] dt-bindings: interrupt-controller: econet: Add CPU interrupt mapping
From: Caleb James DeLisle @ 2026-04-25 17:03 UTC (permalink / raw)
To: Rob Herring (Arm)
Cc: tglx, conor+dt, linux-mips, krzk+dt, linux-kernel, devicetree
In-Reply-To: <177712370148.1527749.7565214035200790095.robh@kernel.org>
> My bot found errors running 'make dt_binding_check' on your patch:
>
Gonna blame this on not doing `pip3 install dtschema --upgrade` often
enough.
Fixed but will re-send in a couple of days so in case of other notes,
all can be addressed together.
Thanks,
Caleb
^ permalink raw reply
* Re: [PATCH v2 00/41] drm/display: bridge-connector: attach encoder to the connector
From: Icenowy Zheng @ 2026-04-25 15:22 UTC (permalink / raw)
To: Luca Ceresoli, Dmitry Baryshkov, Andrzej Hajda, Neil Armstrong,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Sasha Finkelstein, Janne Grunau, Liu Ying,
Douglas Anderson, Laurentiu Palcu, Lucas Stach, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Philipp Zabel, Paul Cercueil, Anitha Chrisanthus, Chun-Kuang Hu,
Matthias Brugger, AngeloGioacchino Del Regno, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
Tomi Valkeinen, Sandy Huang, Heiko Stübner, Andy Yan,
Thierry Reding, Mikko Perttunen, Jonathan Hunter, Jingoo Han,
Inki Dae, Seung-Woo Kim, Kyungmin Park, Krzysztof Kozlowski,
Alim Akhtar, Laurent Pinchart, Tomi Valkeinen, Kieran Bingham,
Geert Uytterhoeven, Magnus Damm, Biju Das, Marek Vasut,
Stefan Agner, Jyri Sarha, Michal Simek
Cc: Hui Pu, Ian Ray, Thomas Petazzoni, dri-devel, linux-kernel, asahi,
imx, linux-arm-kernel, linux-mips, linux-mediatek, linux-amlogic,
linux-arm-msm, freedreno, linux-rockchip, linux-tegra,
linux-samsung-soc, linux-renesas-soc
In-Reply-To: <20260423-drm-bridge-connector-attach_encoder-v2-0-2ae6ca69b390@bootlin.com>
在 2026-04-23四的 11:16 +0200,Luca Ceresoli写道:
> This series simplifies using the bridge-connector by removing the
> need to
> attach the newly created connector to the encoder.
>
> == Series description
>
> Currently all users of the bridge-connector must call
> drm_connector_attach_encoder() immediately after a successful
> drm_bridge_connector_init().
>
> This is an unnecessary burden for users. Move the call to the end of
> drm_bridge_connector_init() so all callers can be simplified.
>
> * Patch 1 adds a drm_connector_attach_encoder() call at the end of
> drm_bridge_connector_init()
> * The other patches remove drm_connector_attach_encoder() after all
> drm_bridge_connector_init() calls, ordered from the simplest ones
> (only the last one is somewhat non-obvious)
>
> The Cc list is huge due to the many drivers touched. I sent v1 to a
> reduced
> Cc list to ensure there is an agreement about the overall idea. That
> seems
> to be the case, so now it's time to copy all drivers maintainers.
>
> It would be nice to apply all of this series at once to avoid
> duplicated
> calls to drm_connector_attach_encoder() in the interim. That would be
> harmless beacuse drm_connector_attach_encoder() is idempotent, but
> unpleasant.
>
> == Additional rationale (for the curious)
>
> Besides making the usage of the bridge-connector a bit simpler, this
> series
> is in preparation for DRM bridge hotplug. Here's why, feel free to
> skip if
> you don't care.
>
> The old bridge hotplug proposals I have sent in the past [1] were
> based on
> a hotplug-bridge driver to sit between the last fixed bridge and the
> first
> hotplugged bridge. Discussion with the community led to the need of
> removing the hotplug-bridge and let common DRM code handle hotplug.
> The
> common place of code that appears the most suitable for hotplug
> handling is
> the bridge-connector, which is by now the recommended way to handle
> connector instantiation after a bridge chain.
>
> So I'm in the process of extending the bridge-connector to be the
> central
> point to handle bridge hotplug. Turns out the need to call
> drm_connector_attach_encoder() after drm_bridge_connector_init() has
> returned is adding big headaches to such work. So I'm send this long
> but
> simple series to both simplify bridge-connector usage and remove one
> obstacle from the bridge hotplug work. This series is relevant by
> itself
> anyway.
>
> [1]
> https://lore.kernel.org/lkml/20250206-hotplug-drm-bridge-v6-26-9d6f2c9c3058@bootlin.com/
>
> == Grand plan
>
> This is part of the work to support hotplug of DRM bridges. The grand
> plan
> was discussed in [0].
Just see the bridge hotplugging thing, is it possible for DRM drivers
to declare bridges attached to themselves after this?
Loongson 7A1000 PCH can only output DPI signals, so nearly all products
with it are shipping with some kind of external bridges, but currently
drm/loongson does not support them (all display connectors are now seen
as DPI ones, and connectors behind non-transparent bridges won't work).
The bridges are going to be accessed by the DDC I2C busses of 7A1000,
and are not declared with device tree (systems with 7A1000 never ship
with device trees, and Linux currently matches a built-in device tree).
(Bridges being on the DDC I2C also introduces some dependency for them
to depend on the drm/loongson driver.)
Loongson have defined some kind of VBIOS declaring what bridge is
behind, and their non-mainline driver just contains driver codes for
all possible bridges. (Sui Jingfeng previously tried to mainline such
practice, and of course it's rejected because of code duplicity.)
Thanks,
Icenowy
>
> Here's the work breakdown (➜ marks the current series):
>
> 1. … add refcounting to DRM bridges struct drm_bridge,
> based on devm_drm_bridge_alloc()
> A. ✔ add new alloc API and refcounting (v6.16)
> B. ✔ convert all bridge drivers to new API (v6.17)
> C. ✔ kunit tests (v6.17)
> D. ✔ add get/put to drm_bridge_add/remove() + attach/detach()
> and warn on old allocation pattern (v6.17)
> E. … add get/put on drm_bridge accessors
> 1. ✔ drm_bridge_chain_get_first_bridge(), add cleanup action
> (v6.18)
> 2. ✔ drm_bridge_get_prev_bridge() (v6.18)
> 3. ✔ drm_bridge_get_next_bridge() (v6.19)
> 4. ✔ drm_for_each_bridge_in_chain() (v6.19)
> 5. ✔ drm_bridge_connector_init (v6.19)
> 6. ✔ protect encoder bridge chain with a mutex (v7.2)
> 7. … of_drm_find_bridge
> a. ✔ add of_drm_get_bridge() (v7.0),
> convert basic direct users (v7.0-v7.1)
> b. ✔ convert direct of_drm_get_bridge() users, part 2
> (v7.0)
> c. ✔ convert direct of_drm_get_bridge() users, part 3
> (v7.0)
> d. ✔ convert direct of_drm_get_bridge() users, part 4
> (v7.1-v7.2)
> e. … convert bridge-only drm_of_find_panel_or_bridge()
> users
> 8. drm_of_find_panel_or_bridge, *_of_get_bridge
> 9. ✔ enforce drm_bridge_add before drm_bridge_attach (v6.19)
> F. ✔ debugfs improvements
> 1. ✔ add top-level 'bridges' file (v6.16)
> 2. ✔ show refcount and list lingering bridges (v6.19)
> 2. … handle gracefully atomic updates during bridge removal
> A. ✔ Add drm_bridge_enter/exit() to protect device resources
> (v7.0)
> B. … protect private_obj removal from list
> C. ✔ Add drm_bridge_clear_and_put() (v7.1)
> 3. … DSI host-device driver interaction
> 4. ✔ removing the need for the "always-disconnected" connector
> 5. ✔ Migrate i.MX LCDIF driver to bridge-connector (v7.2)
> 6. ➜ DRM bridge hotplug
> A. ➜ Bridge hotplug management in the DRM core
> 1. ➜ bridge-connector: attach encoder to the connector
> B. Device tree description
>
> [0]
> https://lore.kernel.org/lkml/20250206-hotplug-drm-bridge-v6-0-9d6f2c9c3058@bootlin.com/#t
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> ---
> Changes in v2:
> - patch 1: update kdoc
> - patch 41: fix by rewriting it fully
> - update cover letter
> - Link to v1:
> https://patch.msgid.link/20260417-drm-bridge-connector-attach_encoder-v1-0-67b8b8fb872a@bootlin.com
>
> To: Andrzej Hajda <andrzej.hajda@intel.com>
> To: Neil Armstrong <neil.armstrong@linaro.org>
> To: Robert Foss <rfoss@kernel.org>
> To: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> To: Jonas Karlman <jonas@kwiboo.se>
> To: Jernej Skrabec <jernej.skrabec@gmail.com>
> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> To: Maxime Ripard <mripard@kernel.org>
> To: Thomas Zimmermann <tzimmermann@suse.de>
> To: David Airlie <airlied@gmail.com>
> To: Simona Vetter <simona@ffwll.ch>
> To: Sasha Finkelstein <fnkl.kernel@gmail.com>
> To: Janne Grunau <j@jannau.net>
> To: Liu Ying <victor.liu@nxp.com>
> To: Douglas Anderson <dianders@chromium.org>
> To: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
> To: Lucas Stach <l.stach@pengutronix.de>
> To: Frank Li <Frank.Li@nxp.com>
> To: Sascha Hauer <s.hauer@pengutronix.de>
> To: Pengutronix Kernel Team <kernel@pengutronix.de>
> To: Fabio Estevam <festevam@gmail.com>
> To: Philipp Zabel <p.zabel@pengutronix.de>
> To: Paul Cercueil <paul@crapouillou.net>
> To: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
> To: Chun-Kuang Hu <chunkuang.hu@kernel.org>
> To: Matthias Brugger <matthias.bgg@gmail.com>
> To: AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com>
> To: Kevin Hilman <khilman@baylibre.com>
> To: Jerome Brunet <jbrunet@baylibre.com>
> To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> To: Rob Clark <robin.clark@oss.qualcomm.com>
> To: Dmitry Baryshkov <lumag@kernel.org>
> To: Abhinav Kumar <abhinav.kumar@linux.dev>
> To: Jessica Zhang <jesszhan0024@gmail.com>
> To: Sean Paul <sean@poorly.run>
> To: Marijn Suijten <marijn.suijten@somainline.org>
> To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> To: Sandy Huang <hjc@rock-chips.com>
> To: Heiko Stübner <heiko@sntech.de>
> To: Andy Yan <andy.yan@rock-chips.com>
> To: Thierry Reding <thierry.reding@gmail.com>
> To: Mikko Perttunen <mperttunen@nvidia.com>
> To: Jonathan Hunter <jonathanh@nvidia.com>
> To: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> To: Jingoo Han <jingoohan1@gmail.com>
> To: Inki Dae <inki.dae@samsung.com>
> To: Seung-Woo Kim <sw0312.kim@samsung.com>
> To: Kyungmin Park <kyungmin.park@samsung.com>
> To: Krzysztof Kozlowski <krzk@kernel.org>
> To: Alim Akhtar <alim.akhtar@samsung.com>
> To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> To: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
> To: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> To: Geert Uytterhoeven <geert+renesas@glider.be>
> To: Magnus Damm <magnus.damm@gmail.com>
> To: Biju Das <biju.das.jz@bp.renesas.com>
> To: Marek Vasut <marex@denx.de>
> To: Stefan Agner <stefan@agner.ch>
> To: Jyri Sarha <jyri.sarha@iki.fi>
> To: Michal Simek <michal.simek@amd.com>
> Cc: Hui Pu <Hui.Pu@gehealthcare.com>
> Cc: Ian Ray <ian.ray@gehealthcare.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-kernel@vger.kernel.org
> Cc: asahi@lists.linux.dev
> Cc: imx@lists.linux.dev
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-mips@vger.kernel.org
> Cc: linux-mediatek@lists.infradead.org
> Cc: linux-amlogic@lists.infradead.org
> Cc: linux-arm-msm@vger.kernel.org
> Cc: freedreno@lists.freedesktop.org
> Cc: linux-rockchip@lists.infradead.org
> Cc: linux-tegra@vger.kernel.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-renesas-soc@vger.kernel.org
>
> ---
> Luca Ceresoli (41):
> drm/display: bridge-connector: attach the encoder to the
> created connector
> drm: adp: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/bridge: adv7511: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/bridge: ite-it6263: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/bridge: ti-sn65dsi86: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/imx/dcss: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/imx: ldb: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/imx: parallel-display: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/imx/lcdc: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/ingenic: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/kmb/dsi: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/mediatek: mtk_dpi: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/mediatek: mtk_dsi: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/meson: encoder_cvbs: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/meson: encoder_hdmi: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/msm/dp: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/msm/hdmi: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/omapdrm: remove now-redundant call to
> drm_connector_attach_encoder()
> rm/rockchip: cdn-dp: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/rockchip: rk3066_hdmi: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/tegra: hdmi: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/tegra: rgb: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/tests: bridge: remove now-redundant call to
> drm_connector_attach_encoder()
> drm: verisilicon: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/exynos: exynos_dp: remove now-redundant call to
> drm_connector_attach_encoder()
> drm: rcar-du: encoder: remove now-redundant call to
> drm_connector_attach_encoder()
> drm: renesas: rz-du: rzg2l_du_encoder: remove now-redundant
> call to drm_connector_attach_encoder()
> drm/rockchip: analogix_dp: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/rockchip: dw_dp: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/rockchip: dw_hdmi_qp: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/rockchip: inno-hdmi: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/msm/mdp4: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/msm/dsi: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/mxsfb/lcdif: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/rockchip: lvds: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/tidss: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/tilcdc: remove now-redundant call to
> drm_connector_attach_encoder()
> drm: zynqmp_kms: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/imx: remove now-redundant call to
> drm_connector_attach_encoder()
> drm/rockchip: rgb: remove now-redundant call to
> drm_connector_attach_encoder()
> drm: renesas: shmobile: remove now-redundant call to
> drm_connector_attach_encoder()
>
> drivers/gpu/drm/adp/adp_drv.c | 2 --
> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 --
> drivers/gpu/drm/bridge/ite-it6263.c | 2 --
> drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 --
> drivers/gpu/drm/display/drm_bridge_connector.c | 11 +++++++++--
> drivers/gpu/drm/exynos/exynos_dp.c | 2 +-
> drivers/gpu/drm/imx/dc/dc-kms.c | 8 +-------
> drivers/gpu/drm/imx/dcss/dcss-kms.c | 2 --
> drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 2 --
> drivers/gpu/drm/imx/ipuv3/parallel-display.c | 2 --
> drivers/gpu/drm/imx/lcdc/imx-lcdc.c | 2 --
> drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 2 --
> drivers/gpu/drm/kmb/kmb_dsi.c | 2 +-
> drivers/gpu/drm/mediatek/mtk_dpi.c | 1 -
> drivers/gpu/drm/mediatek/mtk_dsi.c | 1 -
> drivers/gpu/drm/meson/meson_encoder_cvbs.c | 2 --
> drivers/gpu/drm/meson/meson_encoder_hdmi.c | 2 --
> drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 7 -------
> drivers/gpu/drm/msm/dp/dp_drm.c | 2 --
> drivers/gpu/drm/msm/dsi/dsi_manager.c | 4 ----
> drivers/gpu/drm/msm/hdmi/hdmi.c | 2 --
> drivers/gpu/drm/mxsfb/lcdif_drv.c | 6 ------
> drivers/gpu/drm/omapdrm/omap_drv.c | 2 --
> drivers/gpu/drm/renesas/rcar-du/rcar_du_encoder.c | 2 +-
> drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c | 2 +-
> drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 16 +++++++------
> ---
> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +-
> drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 --
> drivers/gpu/drm/rockchip/dw_dp-rockchip.c | 2 +-
> drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 2 +-
> drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c | 2 +-
> drivers/gpu/drm/rockchip/rk3066_hdmi.c | 2 --
> drivers/gpu/drm/rockchip/rockchip_lvds.c | 6 ------
> drivers/gpu/drm/rockchip/rockchip_rgb.c | 9 ---------
> drivers/gpu/drm/tegra/hdmi.c | 2 --
> drivers/gpu/drm/tegra/rgb.c | 2 --
> drivers/gpu/drm/tests/drm_bridge_test.c | 2 --
> drivers/gpu/drm/tidss/tidss_encoder.c | 6 ------
> drivers/gpu/drm/tilcdc/tilcdc_encoder.c | 6 ------
> drivers/gpu/drm/verisilicon/vs_bridge.c | 1 -
> drivers/gpu/drm/xlnx/zynqmp_kms.c | 6 ------
> 41 files changed, 25 insertions(+), 117 deletions(-)
> ---
> base-commit: 77fec37c895fcbdefbcec97cefd6d1f5cfdf1e3a
> change-id: 20260416-drm-bridge-connector-attach_encoder-c651ac05705f
>
> Best regards,
> --
> Luca Ceresoli <luca.ceresoli@bootlin.com>
^ permalink raw reply
* Re: [PATCH v2 24/41] drm: verisilicon: remove now-redundant call to drm_connector_attach_encoder()
From: Icenowy Zheng @ 2026-04-25 15:15 UTC (permalink / raw)
To: Luca Ceresoli, Dmitry Baryshkov, Andrzej Hajda, Neil Armstrong,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Sasha Finkelstein, Janne Grunau, Liu Ying,
Douglas Anderson, Laurentiu Palcu, Lucas Stach, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Philipp Zabel, Paul Cercueil, Anitha Chrisanthus, Chun-Kuang Hu,
Matthias Brugger, AngeloGioacchino Del Regno, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
Tomi Valkeinen, Sandy Huang, Heiko Stübner, Andy Yan,
Thierry Reding, Mikko Perttunen, Jonathan Hunter, Jingoo Han,
Inki Dae, Seung-Woo Kim, Kyungmin Park, Krzysztof Kozlowski,
Alim Akhtar, Laurent Pinchart, Tomi Valkeinen, Kieran Bingham,
Geert Uytterhoeven, Magnus Damm, Biju Das, Marek Vasut,
Stefan Agner, Jyri Sarha, Michal Simek
Cc: Hui Pu, Ian Ray, Thomas Petazzoni, dri-devel, linux-kernel, asahi,
imx, linux-arm-kernel, linux-mips, linux-mediatek, linux-amlogic,
linux-arm-msm, freedreno, linux-rockchip, linux-tegra,
linux-samsung-soc, linux-renesas-soc
In-Reply-To: <20260423-drm-bridge-connector-attach_encoder-v2-24-2ae6ca69b390@bootlin.com>
在 2026-04-23四的 11:17 +0200,Luca Ceresoli写道:
> drm_connector_attach_encoder() is now called by
> drm_bridge_connector_init().
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> ---
> drivers/gpu/drm/verisilicon/vs_bridge.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/verisilicon/vs_bridge.c
> b/drivers/gpu/drm/verisilicon/vs_bridge.c
> index 2a0ad00a94d6..83c91d5ce397 100644
> --- a/drivers/gpu/drm/verisilicon/vs_bridge.c
> +++ b/drivers/gpu/drm/verisilicon/vs_bridge.c
> @@ -365,7 +365,6 @@ struct vs_bridge *vs_bridge_init(struct
> drm_device *drm_dev,
> ret = PTR_ERR(bridge->conn);
> return ERR_PTR(ret);
> }
> - drm_connector_attach_encoder(bridge->conn, bridge->enc);
Checked the source of this function and it looks idempotent.
Acked-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
>
> return bridge;
> }
^ permalink raw reply
* Re: [PATCH 1/2] dt-bindings: interrupt-controller: econet: Add CPU interrupt mapping
From: Rob Herring (Arm) @ 2026-04-25 13:28 UTC (permalink / raw)
To: Caleb James DeLisle
Cc: tglx, conor+dt, linux-mips, krzk+dt, linux-kernel, devicetree
In-Reply-To: <20260425123531.270548-2-cjd@cjdns.fr>
On Sat, 25 Apr 2026 12:35:30 +0000, Caleb James DeLisle wrote:
> In MIPS VEIC mode (Vectored External Interrupt Controller), the
> hardware stops directly dispatching CPU interrupts such as IPIs or CPU
> performance counters, and instead it communicates them to the external
> interrupt controller (the hardware described here) which prioritizes,
> renumbers, and integrates them with its own hardware interrupt pins.
> Interrupts from the external controller are then dispatched through a
> different method via a dispatch table. In effect, the external
> controller subsumes the CPU controller and becomes the root.
>
> 34K Manual (MD00534) Section 6.3.1.3 rev 1.13 page 136
>
> Since there are interrupts which ought to be controlled by the CPU
> controller driver - particularly the IPI interrupts - we create a
> reverse mapping where those interrupts may be sent back to the CPU
> intc when they are received. This maintains the fiction that there is
> still a hierarchy, and keeps the DT the same no matter whether the
> processor is in VEIC mode or not. The econet,cpu-interrupt-map is
> optional and if omitted, it's assumed that no interrupts need to be
> mapped.
>
> Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
> ---
> .../econet,en751221-intc.yaml | 20 +++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/econet,en751221-intc.yaml: ignoring, error in schema: properties: econet,cpu-interrupt-map: items
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/econet,en751221-intc.yaml: properties:econet,cpu-interrupt-map:items: 'anyOf' conditional failed, one must be fixed:
{'items': ['The interrupt number which will be received in this controller', 'The interrupt number which must then be dispatched on the CPU intc']} is not of type 'array'
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/econet,en751221-intc.yaml: properties:econet,cpu-interrupt-map:items:items: 'anyOf' conditional failed, one must be fixed:
['The interrupt number which will be received in this controller', 'The interrupt number which must then be dispatched on the CPU intc'] is not of type 'object', 'boolean'
'The interrupt number which will be received in this controller' is not of type 'object', 'boolean'
'The interrupt number which must then be dispatched on the CPU intc' is not of type 'object', 'boolean'
Traceback (most recent call last):
File "/usr/local/bin/dt-doc-validate", line 8, in <module>
sys.exit(main())
~~~~^^
File "/usr/local/lib/python3.13/dist-packages/dtschema/doc_validate.py", line 66, in main
ret |= check_doc(f)
~~~~~~~~~^^^
File "/usr/local/lib/python3.13/dist-packages/dtschema/doc_validate.py", line 37, in check_doc
dtsch.check_schema_refs()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 241, in check_schema_refs
self._check_schema_refs(resolver, self)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 212, in _check_schema_refs
self._check_schema_refs(resolver, v, parent=k, is_common=is_common,
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
has_constraint=has_constraint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 216, in _check_schema_refs
self._check_schema_refs(resolver, schema[i], parent=parent, is_common=is_common,
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
has_constraint=has_constraint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 203, in _check_schema_refs
ref_sch = resolver.lookup(schema['$ref']).contents
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 682, in lookup
retrieved = self._registry.get_or_retrieve(uri)
File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 422, in get_or_retrieve
registry = self.crawl()
File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 500, in crawl
id = resource.id()
File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 231, in id
id = self._specification.id_of(self.contents)
File "/usr/local/lib/python3.13/dist-packages/referencing/jsonschema.py", line 50, in _dollar_id
return contents.get("$id")
^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'
Documentation/devicetree/bindings/interrupt-controller/econet,en751221-intc.example.dtb: /example-0/interrupt-controller@1fb40000: failed to match any schema with compatible: ['econet,en751221-intc']
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260425123531.270548-2-cjd@cjdns.fr
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply
* [PATCH 2/2] irqchip/econet-en751221: Support MIPS 34Kc VEIC mode
From: Caleb James DeLisle @ 2026-04-25 12:35 UTC (permalink / raw)
To: linux-mips
Cc: tglx, robh, krzk+dt, conor+dt, linux-kernel, devicetree,
Caleb James DeLisle
In-Reply-To: <20260425123531.270548-1-cjd@cjdns.fr>
The Vectored External Interrupt Controller mode present in the MIPS
34Kc and 1004Kc causes the CPU to stop dispatching interrupts by the
normal code path and instead it sends those interrupts to the external
interrupt controller to be prioritized, renumbered, and sent back.
When they come back, they are handled through a different path using a
dispatch table, so plat_irq_dispatch never sees action.
This of course subverts the traditional intc hierarchy, and on the
1004Kc the interrupt controller is standardized (IRQ_GIC) so it can be
reasonably considered part of the CPU itself - and tighter coupling
between IRQ_GIC and arch/mips/* is tolerable. However on the 34Kc
the intc is defined by each SoC vendor, so we have the task of making a
reasonably modular driver - but for a device which in fact ends up
taking over the entire interrupt system.
We let the DT describe which IRQs which come from the CPU and should be
routed back and handled by the CPU intc. These particularly include the
two IPI interrupts which would otherwise necessitate duplication of all
the IPI supporting infrastructure from the CPU intc.
Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
---
drivers/irqchip/irq-econet-en751221.c | 176 +++++++++++++++++++++++++-
1 file changed, 173 insertions(+), 3 deletions(-)
diff --git a/drivers/irqchip/irq-econet-en751221.c b/drivers/irqchip/irq-econet-en751221.c
index d83d5eb12795..98c109fe053b 100644
--- a/drivers/irqchip/irq-econet-en751221.c
+++ b/drivers/irqchip/irq-econet-en751221.c
@@ -30,6 +30,8 @@
#include <linux/irqchip.h>
#include <linux/irqchip/chained_irq.h>
+#include <asm/setup.h>
+
#define IRQ_COUNT 40
#define NOT_PERCPU 0xff
@@ -42,14 +44,18 @@
/**
* @membase: Base address of the interrupt controller registers
+ * @domain: The irq_domain for direct dispatch
+ * @ipi_domain: The irq_domain for inter-process dispatch
* @interrupt_shadows: Array of all interrupts, for each value,
* - NOT_PERCPU: This interrupt is not per-cpu, so it has no shadow
* - IS_SHADOW: This interrupt is a shadow of another per-cpu interrupt
* - else: This is a per-cpu interrupt whose shadow is the value
*/
static struct {
- void __iomem *membase;
- u8 interrupt_shadows[IRQ_COUNT];
+ void __iomem *membase;
+ struct irq_domain *domain;
+ struct irq_domain *ipi_domain;
+ u8 interrupt_shadows[IRQ_COUNT];
} econet_intc __ro_after_init;
static DEFINE_RAW_SPINLOCK(irq_lock);
@@ -150,6 +156,55 @@ static void econet_intc_from_parent(struct irq_desc *desc)
chained_irq_exit(chip, desc);
}
+/* When in VEIC mode, the CPU jumps to a handler in the vector table.
+ * The only way to know which interrupt is being triggered is from the vector table offset that
+ * has been jumped to. Reading REG_PENDING(0|1) will tell you which interrupts are currently
+ * pending in the intc, but that will not tell you which one the intc wants you to process
+ * right now. And if you are not processing the exact interrupt that the intc wants you to be
+ * processing, you might be on the wrong VPE. You can't tell which VPE any given REG_PENDING
+ * interrupt is intended for (shadow IRQ numbers are for masking only, they never flag as
+ * pending).
+ *
+ * Consequently, this little ritual of generating n handler functions and registering one per
+ * interrupt is unavoidable.
+ */
+#define X(irq) \
+ static void econet_irq_dispatch ## irq (void) \
+ { \
+ do_domain_IRQ(econet_intc.domain, irq); \
+ }
+
+ X(0) X(1) X(2) X(3) X(4) X(5) X(6) X(7) X(8) X(9)
+X(10) X(11) X(12) X(13) X(14) X(15) X(16) X(17) X(18) X(19)
+X(20) X(21) X(22) X(23) X(24) X(25) X(26) X(27) X(28) X(29)
+X(30) X(31) X(32) X(33) X(34) X(35) X(36) X(37) X(38) X(39)
+
+#undef X
+#define X(irq) econet_irq_dispatch ## irq,
+
+static void (* const econet_irq_dispatchers[])(void) = {
+ X(0) X(1) X(2) X(3) X(4) X(5) X(6) X(7) X(8) X(9)
+ X(10) X(11) X(12) X(13) X(14) X(15) X(16) X(17) X(18) X(19)
+ X(20) X(21) X(22) X(23) X(24) X(25) X(26) X(27) X(28) X(29)
+ X(30) X(31) X(32) X(33) X(34) X(35) X(36) X(37) X(38) X(39)
+};
+
+/* Likewise, we do the same for the 2 IPI IRQs so that we can route them back */
+static void econet_cpu_dispatch0(void)
+{
+ do_domain_IRQ(econet_intc.ipi_domain, 0);
+}
+
+static void econet_cpu_dispatch1(void)
+{
+ do_domain_IRQ(econet_intc.ipi_domain, 1);
+}
+
+static void (* const econet_cpu_dispatchers[])(void) = {
+ econet_cpu_dispatch0,
+ econet_cpu_dispatch1,
+};
+
static const struct irq_chip econet_irq_chip;
static int econet_intc_map(struct irq_domain *d, u32 irq, irq_hw_number_t hwirq)
@@ -174,6 +229,10 @@ static int econet_intc_map(struct irq_domain *d, u32 irq, irq_hw_number_t hwirq)
}
irq_set_chip_data(irq, NULL);
+
+ if (cpu_has_veic)
+ set_vi_handler(hwirq + 1, econet_irq_dispatchers[hwirq]);
+
return 0;
}
@@ -249,6 +308,101 @@ static int __init get_shadow_interrupts(struct device_node *node)
return 0;
}
+/**
+ * econet_cpu_init() - configure routing of CPU interrupts to the correct domain.
+ * @node: The devicetree node of this interrupt controller.
+ *
+ * Interrupts that originate from the CPU are unconditionally unmasked here and are re-routed back
+ * to the IPI irq_domain in the CPU intc. Masking still takes place but the CPU intc is in charge
+ * of it, using the mask bits of the c0_status register.
+ *
+ * Note that because IP2 ... IP7 are repurposed as Interrupt Priority Level, only the two IPI
+ * interrupts are actually supported.
+ */
+static int __init econet_cpu_init(struct device_node *node)
+{
+ const char *field = "econet,cpu-interrupt-map";
+ struct device_node *parent_intc;
+ int map_size;
+ u32 mask;
+
+ map_size = of_property_count_u32_elems(node, field);
+
+ if (map_size <= 0) {
+ return 0;
+ } else if (map_size % 2) {
+ pr_err("%pOF: %s count is odd, ignoring\n", node, field);
+ return 0;
+ }
+
+ u32 *maps __free(kfree) = kmalloc_array(map_size, sizeof(u32), GFP_KERNEL);
+ if (!maps)
+ return -ENOMEM;
+
+ if (of_property_read_u32_array(node, field, maps, map_size)) {
+ pr_err("%pOF: Failed to read %s\n", node, field);
+ return -EINVAL;
+ }
+
+ /* Validation */
+ for (int i = 0; i < map_size; i += 2) {
+ u32 receive = maps[i];
+ u32 dispatch = maps[i + 1];
+ u8 shadow;
+
+ if (receive >= IRQ_COUNT) {
+ pr_err("%pOF: Entry %d:%d in %s (%u) %s\n",
+ node, i, 0, field, receive, "is out of bounds");
+ return -EINVAL;
+ }
+
+ shadow = econet_intc.interrupt_shadows[receive];
+ if (shadow != NOT_PERCPU && shadow >= IRQ_COUNT) {
+ pr_err("%pOF: Entry %d:%d in %s (%u) %s\n",
+ node, i, 0, field, receive, "has invalid shadow");
+ return -EINVAL;
+ }
+
+ if (dispatch >= ARRAY_SIZE(econet_cpu_dispatchers)) {
+ pr_err("%pOF: Entry %d:%d in %s (%u) %s\n",
+ node, i, 1, field, dispatch,
+ "is out of bounds, only IPI interrupts are supported");
+ return -EINVAL;
+ }
+ }
+
+ parent_intc = of_irq_find_parent(node);
+ if (!parent_intc) {
+ pr_err("%pOF: Failed to find parent %s\n", node, "IRQ device");
+ return -ENODEV;
+ }
+
+ econet_intc.ipi_domain = irq_find_matching_host(parent_intc, DOMAIN_BUS_IPI);
+ if (!econet_intc.ipi_domain) {
+ pr_err("%pOF: Failed to find parent %s\n", node, "IPI domain");
+ return -ENODEV;
+ }
+
+ mask = 0;
+ for (int i = 0; i < map_size; i += 2) {
+ u32 receive = maps[i];
+ u32 dispatch = maps[i + 1];
+ u8 shadow;
+
+ set_vi_handler(receive + 1, econet_cpu_dispatchers[dispatch]);
+
+ mask |= BIT(receive);
+
+ shadow = econet_intc.interrupt_shadows[receive];
+ if (shadow != NOT_PERCPU)
+ mask |= BIT(shadow);
+ }
+
+ econet_wreg(REG_MASK0, mask, mask);
+
+ return 0;
+}
+
static int __init econet_intc_of_init(struct device_node *node, struct device_node *parent)
{
struct irq_domain *domain;
@@ -294,7 +448,23 @@ static int __init econet_intc_of_init(struct device_node *node, struct device_no
goto err_unmap;
}
- irq_set_chained_handler_and_data(irq, econet_intc_from_parent, domain);
+ /*
+ * 34K Manual (MD00534) Section 6.3.1.3 rev 1.13 page 136:
+ * In VEIC mode, IP2 ... IP7 are repurposed as Interrupt Priority Level. The controller
+ * will filter incoming interrupts whose priority is lower than the IPL number. Therefore
+ * we must not set any of these bits. We avoid setting IP2 by not actually chaining this
+ * intc to the CPU intc.
+ */
+ if (cpu_has_veic) {
+ ret = econet_cpu_init(node);
+
+ if (ret)
+ return ret;
+ } else {
+ irq_set_chained_handler_and_data(irq, econet_intc_from_parent, domain);
+ }
+
+ econet_intc.domain = domain;
return 0;
--
2.39.5
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox