* Re: [PATCH v3 2/6] dt-bindings: misc: google,android-pipe: Convert to DT schema
From: Krzysztof Kozlowski @ 2026-01-13 8:00 UTC (permalink / raw)
To: Kuan-Wei Chiu
Cc: airlied, simona, maarten.lankhorst, mripard, tzimmermann, robh,
krzk+dt, conor+dt, dmitry.torokhov, sre, gregkh, jirislaby,
lgirdwood, broonie, jserv, eleanor15x, dri-devel, devicetree,
linux-kernel, linux-input, linux-pm, linux-serial, linux-sound
In-Reply-To: <20260112185044.1865605-3-visitorckw@gmail.com>
On Mon, Jan 12, 2026 at 06:50:40PM +0000, Kuan-Wei Chiu wrote:
> +examples:
> + - |
> + pipe@ff018000 {
> + compatible = "google,android-pipe";
> + reg = <0xff018000 0x2000>;
> + interrupts = <0x12>;
Still not improved. I asked twice already. This is a nit, but I do not
understand why I need to ask for it three times.
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH v2 12/16] serial: pic32_uart: update include to use pic32.h from platform_data
From: Jiri Slaby @ 2026-01-13 6:38 UTC (permalink / raw)
To: Brian Masney, Thomas Bogendoerfer, Claudiu Beznea
Cc: linux-mips, linux-kernel, Greg Kroah-Hartman, linux-serial
In-Reply-To: <20260112-mips-pic32-header-move-v2-12-927d516b1ff9@redhat.com>
On 12. 01. 26, 23:48, Brian Masney wrote:
> Use the linux/platform_data/pic32.h include instead of
> asm/mach-pic32/pic32.h so that the asm variant can be dropped. This
> is in preparation for allowing some drivers to be compiled on other
> architectures with COMPILE_TEST enabled.
LGTM. Will you also enable the driver to be compiled?
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
> Signed-off-by: Brian Masney <bmasney@redhat.com>
>
> ---
> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> To: Jiri Slaby <jirislaby@kernel.org>
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-serial@vger.kernel.org
> ---
> drivers/tty/serial/pic32_uart.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c
> index 14d50bd7f1bd3575e60e51783bf5b2d821f9168d..8407f85776c07a7495688fc4f95b8672b1543bd0 100644
> --- a/drivers/tty/serial/pic32_uart.c
> +++ b/drivers/tty/serial/pic32_uart.c
> @@ -22,8 +22,7 @@
> #include <linux/tty_flip.h>
> #include <linux/serial_core.h>
> #include <linux/delay.h>
> -
> -#include <asm/mach-pic32/pic32.h>
> +#include <linux/platform_data/pic32.h>
>
> /* UART name and device definitions */
> #define PIC32_DEV_NAME "pic32-uart"
>
--
js
suse labs
^ permalink raw reply
* Re: [PATCH v4 00/11] riscv: spacemit: Add SpacemiT K3 SoC and K3 Pico-ITX board
From: Guodong Xu @ 2026-01-13 2:51 UTC (permalink / raw)
To: Conor Dooley
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan,
Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel,
Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, Yangyu Chen,
Paul Walmsley, Heinrich Schuchardt, Kevin Meng Zhang,
Andrew Jones, devicetree, linux-riscv, linux-kernel, spacemit,
linux-serial, Krzysztof Kozlowski, Heinrich Schuchardt,
Conor Dooley
In-Reply-To: <20260112-shrivel-sarcastic-36d9acd2d96a@spud>
On Tue, Jan 13, 2026 at 5:46 AM Conor Dooley <conor@kernel.org> wrote:
>
> On Sat, Jan 10, 2026 at 01:18:12PM +0800, Guodong Xu wrote:
>
> > Hi, Conor
> >
> > For the binding riscv/extensions.ymal, here's what changed in v3 (no
> > change in v4):
> >
> > 1. Dropped the patch of adding "supm" into extensions.yaml. At the same
> > time, I will start another patchset which implements the strategy
> > outlined by Conor in Link [2] and by Samuel in Link [3].
>
> Okay, that seems reasonable to separate out.
>
> >
> > 2. Dropped the dependency checks for "sha" on "h", "shcounterenw", and
> > 6 others. "sha" implies these extensions, and it should be allowed
> > to be declared independently. Like "a" implies "zaamo" and "zalrsc".
> >
> > 3. Enchanced the dependency check of "ziccamoa" on "a". Specifically,
> > - added the dependency check of "ziccamoa" on "zaamo" or on "a".
> > - added the dependency check of "za64rs" on "zalrsc" or on "a".
> > - added the dependency check of "ziccrse" on "zalrsc" or "a".
> > The commit message of this patch is updated too, to better explain the
> > relationship between "ziccamoa", "za64rs", "ziccrse" and "a".
> >
> > 4. Enhanced checking dependency of "b" and "zba", "zbb", "zbs", making the
> > dependency check in both directions, as discussed in [4]. Since "b"
> > was ratified much later than its component extensions (zba/zbb/zbs),
> > existing software and kernels expect these explicit strings. This
> > bidirectional check ensures cores declaring "b" remain compatible
> > with older software that only recognizes zba/zbb/zbs.
>
> This I asked about in the relevant patch, I would like to know what your
> plan for adding the "b"s is.
Thanks for confirming the above. Yes, I will start a follow up patch to update
the dtsi files related to the "b" extension.
Best regards,
Guodong Xu
>
> Spacemit folks, I assume you weren't planning on taking the
> extensions.yaml stuff via your tree? If you weren't, I'll grab it once
> the question about b is answered.
^ permalink raw reply
* Re: [PATCH v4 06/11] dt-bindings: riscv: Add B ISA extension description
From: Guodong Xu @ 2026-01-13 2:44 UTC (permalink / raw)
To: Conor Dooley
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan,
Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel,
Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, Yangyu Chen,
Paul Walmsley, Heinrich Schuchardt, Kevin Meng Zhang,
Andrew Jones, devicetree, linux-riscv, linux-kernel, spacemit,
linux-serial
In-Reply-To: <20260112-veal-retaliate-7cf9a2981aaf@spud>
Hi, Conor
On Tue, Jan 13, 2026 at 5:41 AM Conor Dooley <conor@kernel.org> wrote:
>
> On Sat, Jan 10, 2026 at 01:18:18PM +0800, Guodong Xu wrote:
> > Add description of the single-letter B extension for Bit Manipulation.
> > B is mandatory for RVA23U64.
> >
> > The B extension is ratified in the 20240411 version of the unprivileged
> > ISA specification. According to the ratified spec, the B standard
> > extension comprises instructions provided by the Zba, Zbb, and Zbs
> > extensions.
> >
> > Add two-way dependency check to enforce that B implies Zba/Zbb/Zbs; and
> > when Zba/Zbb/Zbs (all of them) are specified, then B must be added too.
> >
> > The reason why B/Zba/Zbb/Zbs must coexist at the same time is that
> > unlike other single-letter extensions, B was ratified (Apr/2024) much
> > later than its component extensions Zba/Zbb/Zbs (Jun/2021).
> >
> > When "b" is specified, zba/zbb/zbs must be present to ensure
> > backward compatibility with existing software and kernels that only
> > look for the explicit component strings.
> >
> > When all three components zba/zbb/zbs are specified, "b" should also be
> > present. Making "b" mandatory when all three components are present.
>
> > Existing devicetrees with zba/zbb/zbs but without "b" will generate
> > warnings that can be fixed in follow-up patches.
>
> Are you going to send these fixup patches for other devicetrees? The
> majority appear to be other spacemit devices.
Yes, I will. My check shows that these three dtsi files need to be updated to
include the newly ratified "b" extension:
arch/riscv/boot/dts/anlogic/dr1v90.dtsi
arch/riscv/boot/dts/sophgo/sg2044-cpus.dtsi
arch/riscv/boot/dts/spacemit/k1.dtsi
I will start a follow up patch to update these dtsi files. Basically, adding
"b" into both the "riscv,isa-extensions" and "riscv,isa" (when available)
fields.
Thank you for your review.
Best regards,
Guodong Xu
^ permalink raw reply
* Re: [PATCH v4 00/11] riscv: spacemit: Add SpacemiT K3 SoC and K3 Pico-ITX board
From: Yixun Lan @ 2026-01-13 0:21 UTC (permalink / raw)
To: Conor Dooley
Cc: Guodong Xu, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel,
Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, Yangyu Chen,
Paul Walmsley, Heinrich Schuchardt, Kevin Meng Zhang,
Andrew Jones, devicetree, linux-riscv, linux-kernel, spacemit,
linux-serial, Krzysztof Kozlowski, Heinrich Schuchardt,
Conor Dooley
In-Reply-To: <20260112-shrivel-sarcastic-36d9acd2d96a@spud>
Hi Conor,
On 21:45 Mon 12 Jan , Conor Dooley wrote:
> On Sat, Jan 10, 2026 at 01:18:12PM +0800, Guodong Xu wrote:
>
> > Hi, Conor
> >
> > For the binding riscv/extensions.ymal, here's what changed in v3 (no
> > change in v4):
> >
> > 1. Dropped the patch of adding "supm" into extensions.yaml. At the same
> > time, I will start another patchset which implements the strategy
> > outlined by Conor in Link [2] and by Samuel in Link [3].
>
> Okay, that seems reasonable to separate out.
>
> >
> > 2. Dropped the dependency checks for "sha" on "h", "shcounterenw", and
> > 6 others. "sha" implies these extensions, and it should be allowed
> > to be declared independently. Like "a" implies "zaamo" and "zalrsc".
> >
> > 3. Enchanced the dependency check of "ziccamoa" on "a". Specifically,
> > - added the dependency check of "ziccamoa" on "zaamo" or on "a".
> > - added the dependency check of "za64rs" on "zalrsc" or on "a".
> > - added the dependency check of "ziccrse" on "zalrsc" or "a".
> > The commit message of this patch is updated too, to better explain the
> > relationship between "ziccamoa", "za64rs", "ziccrse" and "a".
> >
> > 4. Enhanced checking dependency of "b" and "zba", "zbb", "zbs", making the
> > dependency check in both directions, as discussed in [4]. Since "b"
> > was ratified much later than its component extensions (zba/zbb/zbs),
> > existing software and kernels expect these explicit strings. This
> > bidirectional check ensures cores declaring "b" remain compatible
> > with older software that only recognizes zba/zbb/zbs.
>
> This I asked about in the relevant patch, I would like to know what your
> plan for adding the "b"s is.
>
..
> Spacemit folks, I assume you weren't planning on taking the
> extensions.yaml stuff via your tree? If you weren't, I'll grab it once
> the question about b is answered.
sure, please take extension stuff which are patches 6-9, for 1-5, it's
all about adding support for SpacemiT K3 SoC, to avoid petential conflicts,
I wouldn't mind if you also taking them? then I can handle the rest 10,11 for DT
--
Yixun Lan (dlan)
^ permalink raw reply
* [PATCH v2 12/16] serial: pic32_uart: update include to use pic32.h from platform_data
From: Brian Masney @ 2026-01-12 22:48 UTC (permalink / raw)
To: Thomas Bogendoerfer, Claudiu Beznea
Cc: linux-mips, linux-kernel, Brian Masney, Greg Kroah-Hartman,
Jiri Slaby, linux-serial
In-Reply-To: <20260112-mips-pic32-header-move-v2-0-927d516b1ff9@redhat.com>
Use the linux/platform_data/pic32.h include instead of
asm/mach-pic32/pic32.h so that the asm variant can be dropped. This
is in preparation for allowing some drivers to be compiled on other
architectures with COMPILE_TEST enabled.
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-serial@vger.kernel.org
---
| 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c
index 14d50bd7f1bd3575e60e51783bf5b2d821f9168d..8407f85776c07a7495688fc4f95b8672b1543bd0 100644
--- a/drivers/tty/serial/pic32_uart.c
+++ b/drivers/tty/serial/pic32_uart.c
@@ -22,8 +22,7 @@
#include <linux/tty_flip.h>
#include <linux/serial_core.h>
#include <linux/delay.h>
-
-#include <asm/mach-pic32/pic32.h>
+#include <linux/platform_data/pic32.h>
/* UART name and device definitions */
#define PIC32_DEV_NAME "pic32-uart"
--
2.52.0
^ permalink raw reply related
* [PATCH v2 00/16] MIPS: move pic32.h header file from asm to platform_data
From: Brian Masney @ 2026-01-12 22:47 UTC (permalink / raw)
To: Thomas Bogendoerfer, Claudiu Beznea
Cc: linux-mips, linux-kernel, Brian Masney, Michael Turquette,
Stephen Boyd, linux-clk, Thomas Gleixner, Adrian Hunter,
Ulf Hansson, linux-mmc, Linus Walleij, linux-gpio,
Alexandre Belloni, linux-rtc, Greg Kroah-Hartman, Jiri Slaby,
linux-serial, Guenter Roeck, Wim Van Sebroeck, linux-watchdog
There are currently some pic32 MIPS drivers that are in tree, and are
only configured to be compiled on the MIPS pic32 platform. There's a
risk of breaking some of these drivers when migrating drivers away from
legacy APIs. It happened to me with a pic32 clk driver.
Let's go ahead and move the pic32.h from the asm to the platform_data
include directory in the tree. This will make it easier, and cleaner to
enable COMPILE_TEST for some of these pic32 drivers. To do this requires
updating some includes, which I do at the beginning of this series.
This series was compile tested on a centos-stream-10 arm64 host in two
different configurations:
- native arm64 build with COMPILE_TEST (via make allmodconfig)
- MIPS cross compile on arm64 with:
ARCH=mips CROSS_COMPILE=mips64-linux-gnu- make pic32mzda_defconfig
Note that there is a separate MIPS compile error in linux-next, and I
reported it at https://lore.kernel.org/all/aWVs2gVB418WiMVa@redhat.com/
I included a patch at the end that shows enabling COMPILE_TEST for a
pic32 clk driver.
Merge Strategy
==============
- Patches 1-15 can go through the MIPS tree.
- Patch 16 I can repost to Claudiu after patches 1-15 are in Linus's
tree after the next merge window. There is a separate patch set that
fixes a compiler error I unintentionally introduced via the clk tree.
https://lore.kernel.org/linux-clk/CABx5tq+eOocJ41X-GSgkGy6S+s+Am1yCS099wqP695NtwALTmg@mail.gmail.com/T/
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
Changes in v2:
- Fix native MIPS build by updating include files
- Link to v1: https://lore.kernel.org/r/20260109-mips-pic32-header-move-v1-0-99859c55783d@redhat.com
---
Brian Masney (16):
MIPS: pic32: include linux/io.h header on several files
MIPS: pic32: include linux/types.h on pic32.h
MIPS: pic32: drop unused include linux/io.h from pic32.h
MIPS: copy pic32.h header file from asm/mach-pic32/ to include/platform-data/
MAINTAINERS: add include/linux/platform_data/pic32.h to MIPS entry
MIPS: update include to use pic32.h from platform_data
clk: microchip: core: update include to use pic32.h from platform_data
irqchip/irq-pic32-evic: update include to use pic32.h from platform_data
mmc: sdhci-pic32: update include to use pic32.h from platform_data
pinctrl: pic32: update include to use pic32.h from platform_data
rtc: pic32: update include to use pic32.h from platform_data
serial: pic32_uart: update include to use pic32.h from platform_data
watchdog: pic32-dmt: update include to use pic32.h from platform_data
watchdog: pic32-wdt: update include to use pic32.h from platform_data
MIPS: drop unused pic32.h header
clk: microchip: core: allow driver to be compiled with COMPILE_TEST
MAINTAINERS | 1 +
arch/mips/pic32/common/reset.c | 3 ++-
arch/mips/pic32/pic32mzda/config.c | 3 +--
arch/mips/pic32/pic32mzda/early_clk.c | 3 ++-
arch/mips/pic32/pic32mzda/early_console.c | 3 ++-
drivers/clk/microchip/Kconfig | 2 +-
drivers/clk/microchip/clk-core.c | 6 +++++-
drivers/irqchip/irq-pic32-evic.c | 2 +-
drivers/mmc/host/sdhci-pic32.c | 2 +-
drivers/pinctrl/pinctrl-pic32.c | 3 +--
drivers/rtc/rtc-pic32.c | 3 +--
drivers/tty/serial/pic32_uart.c | 3 +--
drivers/watchdog/pic32-dmt.c | 3 +--
drivers/watchdog/pic32-wdt.c | 3 +--
.../mach-pic32 => include/linux/platform_data}/pic32.h | 17 ++++++++++-------
15 files changed, 31 insertions(+), 26 deletions(-)
---
base-commit: f417b7ffcbef7d76b0d8860518f50dae0e7e5eda
change-id: 20260109-mips-pic32-header-move-6ac9965aa70a
Best regards,
--
Brian Masney <bmasney@redhat.com>
^ permalink raw reply
* Re: [PATCH v4 00/11] riscv: spacemit: Add SpacemiT K3 SoC and K3 Pico-ITX board
From: Conor Dooley @ 2026-01-12 21:45 UTC (permalink / raw)
To: Guodong Xu
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan,
Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel,
Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, Yangyu Chen,
Paul Walmsley, Heinrich Schuchardt, Kevin Meng Zhang,
Andrew Jones, devicetree, linux-riscv, linux-kernel, spacemit,
linux-serial, Krzysztof Kozlowski, Heinrich Schuchardt,
Conor Dooley
In-Reply-To: <20260110-k3-basic-dt-v4-0-d492f3a30ffa@riscstar.com>
[-- Attachment #1: Type: text/plain, Size: 1824 bytes --]
On Sat, Jan 10, 2026 at 01:18:12PM +0800, Guodong Xu wrote:
> Hi, Conor
>
> For the binding riscv/extensions.ymal, here's what changed in v3 (no
> change in v4):
>
> 1. Dropped the patch of adding "supm" into extensions.yaml. At the same
> time, I will start another patchset which implements the strategy
> outlined by Conor in Link [2] and by Samuel in Link [3].
Okay, that seems reasonable to separate out.
>
> 2. Dropped the dependency checks for "sha" on "h", "shcounterenw", and
> 6 others. "sha" implies these extensions, and it should be allowed
> to be declared independently. Like "a" implies "zaamo" and "zalrsc".
>
> 3. Enchanced the dependency check of "ziccamoa" on "a". Specifically,
> - added the dependency check of "ziccamoa" on "zaamo" or on "a".
> - added the dependency check of "za64rs" on "zalrsc" or on "a".
> - added the dependency check of "ziccrse" on "zalrsc" or "a".
> The commit message of this patch is updated too, to better explain the
> relationship between "ziccamoa", "za64rs", "ziccrse" and "a".
>
> 4. Enhanced checking dependency of "b" and "zba", "zbb", "zbs", making the
> dependency check in both directions, as discussed in [4]. Since "b"
> was ratified much later than its component extensions (zba/zbb/zbs),
> existing software and kernels expect these explicit strings. This
> bidirectional check ensures cores declaring "b" remain compatible
> with older software that only recognizes zba/zbb/zbs.
This I asked about in the relevant patch, I would like to know what your
plan for adding the "b"s is.
Spacemit folks, I assume you weren't planning on taking the
extensions.yaml stuff via your tree? If you weren't, I'll grab it once
the question about b is answered.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH v4 06/11] dt-bindings: riscv: Add B ISA extension description
From: Conor Dooley @ 2026-01-12 21:41 UTC (permalink / raw)
To: Guodong Xu
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan,
Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel,
Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, Yangyu Chen,
Paul Walmsley, Heinrich Schuchardt, Kevin Meng Zhang,
Andrew Jones, devicetree, linux-riscv, linux-kernel, spacemit,
linux-serial
In-Reply-To: <20260110-k3-basic-dt-v4-6-d492f3a30ffa@riscstar.com>
[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]
On Sat, Jan 10, 2026 at 01:18:18PM +0800, Guodong Xu wrote:
> Add description of the single-letter B extension for Bit Manipulation.
> B is mandatory for RVA23U64.
>
> The B extension is ratified in the 20240411 version of the unprivileged
> ISA specification. According to the ratified spec, the B standard
> extension comprises instructions provided by the Zba, Zbb, and Zbs
> extensions.
>
> Add two-way dependency check to enforce that B implies Zba/Zbb/Zbs; and
> when Zba/Zbb/Zbs (all of them) are specified, then B must be added too.
>
> The reason why B/Zba/Zbb/Zbs must coexist at the same time is that
> unlike other single-letter extensions, B was ratified (Apr/2024) much
> later than its component extensions Zba/Zbb/Zbs (Jun/2021).
>
> When "b" is specified, zba/zbb/zbs must be present to ensure
> backward compatibility with existing software and kernels that only
> look for the explicit component strings.
>
> When all three components zba/zbb/zbs are specified, "b" should also be
> present. Making "b" mandatory when all three components are present.
> Existing devicetrees with zba/zbb/zbs but without "b" will generate
> warnings that can be fixed in follow-up patches.
Are you going to send these fixup patches for other devicetrees? The
majority appear to be other spacemit devices.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH v4 09/11] dt-bindings: riscv: Add Sha and its comprised extensions
From: Conor Dooley @ 2026-01-12 21:40 UTC (permalink / raw)
To: Guodong Xu
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan,
Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel,
Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, Yangyu Chen,
Paul Walmsley, Heinrich Schuchardt, Kevin Meng Zhang,
Andrew Jones, devicetree, linux-riscv, linux-kernel, spacemit,
linux-serial
In-Reply-To: <20260110-k3-basic-dt-v4-9-d492f3a30ffa@riscstar.com>
[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]
On Sat, Jan 10, 2026 at 01:18:21PM +0800, Guodong Xu wrote:
> Add descriptions for the Sha extension and the seven extensions it
> comprises: Shcounterenw, Shgatpa, Shtvala, Shvsatpa, Shvstvala, Shvstvecd,
> and Ssstateen.
>
> Sha is ratified in the RVA23 Profiles Version 1.0 (commit 0273f3c921b6
> "rva23/rvb23 ratified") as a new profile-defined extension that captures
> the full set of features that are mandated to be supported along with
> the H extension.
>
> Extensions Shcounterenw, Shgatpa, Shtvala, Shvsatpa, Shvstvala, Shvstvecd,
> and Ssstateen are ratified in the RISC-V Profiles Version 1.0 (commit
> b1d806605f87 "Updated to ratified state").
>
> The requirement status for Sha and its comprised extension in RISC-V
> Profiles are:
> - Sha: Mandatory in RVA23S64
> - H: Optional in RVA22S64; Mandatory in RVA23S64
> - Shcounterenw: Optional in RVA22S64; Mandatory in RVA23S64
> - Shgatpa: Optional in RVA22S64; Mandatory in RVA23S64
> - Shtvala: Optional in RVA22S64; Mandatory in RVA23S64
> - Shvsatpa: Optional in RVA22S64; Mandatory in RVA23S64
> - Shvstvala: Optional in RVA22S64; Mandatory in RVA23S64
> - Shvstvecd: Optional in RVA22S64; Mandatory in RVA23S64
> - Ssstateen: Optional in RVA22S64; Mandatory in RVA23S64
>
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH v4 08/11] dt-bindings: riscv: Add Ssccptr, Sscounterenw, Sstvala, Sstvecd, Ssu64xl
From: Conor Dooley @ 2026-01-12 21:39 UTC (permalink / raw)
To: Guodong Xu
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan,
Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel,
Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, Yangyu Chen,
Paul Walmsley, Heinrich Schuchardt, Kevin Meng Zhang,
Andrew Jones, devicetree, linux-riscv, linux-kernel, spacemit,
linux-serial
In-Reply-To: <20260110-k3-basic-dt-v4-8-d492f3a30ffa@riscstar.com>
[-- Attachment #1: Type: text/plain, Size: 52 bytes --]
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH v4 07/11] dt-bindings: riscv: Add descriptions for Za64rs, Ziccamoa, Ziccif, and Zicclsm
From: Conor Dooley @ 2026-01-12 21:38 UTC (permalink / raw)
To: Guodong Xu
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan,
Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel,
Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, Yangyu Chen,
Paul Walmsley, Heinrich Schuchardt, Kevin Meng Zhang,
Andrew Jones, devicetree, linux-riscv, linux-kernel, spacemit,
linux-serial
In-Reply-To: <20260110-k3-basic-dt-v4-7-d492f3a30ffa@riscstar.com>
[-- Attachment #1: Type: text/plain, Size: 52 bytes --]
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH v4 05/11] dt-bindings: riscv: spacemit: add K3 and Pico-ITX board bindings
From: Conor Dooley @ 2026-01-12 21:37 UTC (permalink / raw)
To: Guodong Xu
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yixun Lan,
Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel,
Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, Yangyu Chen,
Paul Walmsley, Heinrich Schuchardt, Kevin Meng Zhang,
Andrew Jones, devicetree, linux-riscv, linux-kernel, spacemit,
linux-serial
In-Reply-To: <20260110-k3-basic-dt-v4-5-d492f3a30ffa@riscstar.com>
[-- Attachment #1: Type: text/plain, Size: 297 bytes --]
On Sat, Jan 10, 2026 at 01:18:17PM +0800, Guodong Xu wrote:
> Add DT binding documentation for the SpacemiT K3 SoC and the board Pico-ITX
> which is a 2.5-inch single-board computer.
>
> Signed-off-by: Guodong Xu <guodong@riscstar.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* [PATCH v3 1/6] dt-bindings: serial: google,goldfish-tty: Convert to DT schema
From: Kuan-Wei Chiu @ 2026-01-12 18:50 UTC (permalink / raw)
To: airlied, simona, maarten.lankhorst, mripard, tzimmermann, robh,
krzk+dt, conor+dt, dmitry.torokhov, sre, gregkh, jirislaby,
lgirdwood, broonie
Cc: jserv, eleanor15x, dri-devel, devicetree, linux-kernel,
linux-input, linux-pm, linux-serial, linux-sound, Kuan-Wei Chiu,
Krzysztof Kozlowski
In-Reply-To: <20260112185044.1865605-1-visitorckw@gmail.com>
Convert the Google Goldfish TTY binding to DT schema format.
Move the file to the serial directory to match the subsystem.
Update the example node name to 'serial' to comply with generic node
naming standards.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
Changes in v3:
- None.
.../devicetree/bindings/goldfish/tty.txt | 17 --------
.../bindings/serial/google,goldfish-tty.yaml | 41 +++++++++++++++++++
2 files changed, 41 insertions(+), 17 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/goldfish/tty.txt
create mode 100644 Documentation/devicetree/bindings/serial/google,goldfish-tty.yaml
diff --git a/Documentation/devicetree/bindings/goldfish/tty.txt b/Documentation/devicetree/bindings/goldfish/tty.txt
deleted file mode 100644
index 82648278da77..000000000000
--- a/Documentation/devicetree/bindings/goldfish/tty.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Android Goldfish TTY
-
-Android goldfish tty device generated by android emulator.
-
-Required properties:
-
-- compatible : should contain "google,goldfish-tty" to match emulator
-- reg : <registers mapping>
-- interrupts : <interrupt mapping>
-
-Example:
-
- goldfish_tty@1f004000 {
- compatible = "google,goldfish-tty";
- reg = <0x1f004000 0x1000>;
- interrupts = <0xc>;
- };
diff --git a/Documentation/devicetree/bindings/serial/google,goldfish-tty.yaml b/Documentation/devicetree/bindings/serial/google,goldfish-tty.yaml
new file mode 100644
index 000000000000..0b702c8657c2
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/google,goldfish-tty.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/google,goldfish-tty.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Google Goldfish TTY
+
+maintainers:
+ - Kuan-Wei Chiu <visitorckw@gmail.com>
+
+allOf:
+ - $ref: /schemas/serial/serial.yaml#
+
+description:
+ Android goldfish TTY device generated by Android emulator.
+
+properties:
+ compatible:
+ const: google,goldfish-tty
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ serial@1f004000 {
+ compatible = "google,goldfish-tty";
+ reg = <0x1f004000 0x1000>;
+ interrupts = <0xc>;
+ };
--
2.52.0.457.g6b5491de43-goog
^ permalink raw reply related
* [PATCH v3 4/6] dt-bindings: power: supply: google,goldfish-battery: Convert to DT schema
From: Kuan-Wei Chiu @ 2026-01-12 18:50 UTC (permalink / raw)
To: airlied, simona, maarten.lankhorst, mripard, tzimmermann, robh,
krzk+dt, conor+dt, dmitry.torokhov, sre, gregkh, jirislaby,
lgirdwood, broonie
Cc: jserv, eleanor15x, dri-devel, devicetree, linux-kernel,
linux-input, linux-pm, linux-serial, linux-sound, Kuan-Wei Chiu
In-Reply-To: <20260112185044.1865605-1-visitorckw@gmail.com>
Convert the Android Goldfish Battery binding to DT schema format.
Move the file to the power/supply directory to match the subsystem.
Update the example node name to 'battery' to comply with generic node
naming standards.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
---
Changes in v3:
- Use decimal format for interrupts in the example.
.../devicetree/bindings/goldfish/battery.txt | 17 --------
.../power/supply/google,goldfish-battery.yaml | 41 +++++++++++++++++++
2 files changed, 41 insertions(+), 17 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/goldfish/battery.txt
create mode 100644 Documentation/devicetree/bindings/power/supply/google,goldfish-battery.yaml
diff --git a/Documentation/devicetree/bindings/goldfish/battery.txt b/Documentation/devicetree/bindings/goldfish/battery.txt
deleted file mode 100644
index 4fb613933214..000000000000
--- a/Documentation/devicetree/bindings/goldfish/battery.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Android Goldfish Battery
-
-Android goldfish battery device generated by android emulator.
-
-Required properties:
-
-- compatible : should contain "google,goldfish-battery" to match emulator
-- reg : <registers mapping>
-- interrupts : <interrupt mapping>
-
-Example:
-
- goldfish_battery@9020000 {
- compatible = "google,goldfish-battery";
- reg = <0x9020000 0x1000>;
- interrupts = <0x3>;
- };
diff --git a/Documentation/devicetree/bindings/power/supply/google,goldfish-battery.yaml b/Documentation/devicetree/bindings/power/supply/google,goldfish-battery.yaml
new file mode 100644
index 000000000000..634327c89c88
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/google,goldfish-battery.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/google,goldfish-battery.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Android Goldfish Battery
+
+maintainers:
+ - Kuan-Wei Chiu <visitorckw@gmail.com>
+
+allOf:
+ - $ref: power-supply.yaml#
+
+description:
+ Android goldfish battery device generated by Android emulator.
+
+properties:
+ compatible:
+ const: google,goldfish-battery
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ battery@9020000 {
+ compatible = "google,goldfish-battery";
+ reg = <0x9020000 0x1000>;
+ interrupts = <3>;
+ };
--
2.52.0.457.g6b5491de43-goog
^ permalink raw reply related
* [PATCH v3 6/6] dt-bindings: display: google,goldfish-fb: Convert to DT schema
From: Kuan-Wei Chiu @ 2026-01-12 18:50 UTC (permalink / raw)
To: airlied, simona, maarten.lankhorst, mripard, tzimmermann, robh,
krzk+dt, conor+dt, dmitry.torokhov, sre, gregkh, jirislaby,
lgirdwood, broonie
Cc: jserv, eleanor15x, dri-devel, devicetree, linux-kernel,
linux-input, linux-pm, linux-serial, linux-sound, Kuan-Wei Chiu
In-Reply-To: <20260112185044.1865605-1-visitorckw@gmail.com>
Convert the Android Goldfish Framebuffer binding to DT schema format.
Update the example node name to 'display' to comply with generic node
naming standards.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
---
Changes in v3:
- Use decimal format for interrupts in the example.
.../bindings/display/google,goldfish-fb.txt | 17 ---------
.../bindings/display/google,goldfish-fb.yaml | 38 +++++++++++++++++++
2 files changed, 38 insertions(+), 17 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/display/google,goldfish-fb.txt
create mode 100644 Documentation/devicetree/bindings/display/google,goldfish-fb.yaml
diff --git a/Documentation/devicetree/bindings/display/google,goldfish-fb.txt b/Documentation/devicetree/bindings/display/google,goldfish-fb.txt
deleted file mode 100644
index 751fa9f51e5d..000000000000
--- a/Documentation/devicetree/bindings/display/google,goldfish-fb.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Android Goldfish framebuffer
-
-Android Goldfish framebuffer device used by Android emulator.
-
-Required properties:
-
-- compatible : should contain "google,goldfish-fb"
-- reg : <registers mapping>
-- interrupts : <interrupt mapping>
-
-Example:
-
- display-controller@1f008000 {
- compatible = "google,goldfish-fb";
- interrupts = <0x10>;
- reg = <0x1f008000 0x100>;
- };
diff --git a/Documentation/devicetree/bindings/display/google,goldfish-fb.yaml b/Documentation/devicetree/bindings/display/google,goldfish-fb.yaml
new file mode 100644
index 000000000000..36ed77cbbcd7
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/google,goldfish-fb.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/google,goldfish-fb.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Android Goldfish Framebuffer
+
+maintainers:
+ - Kuan-Wei Chiu <visitorckw@gmail.com>
+
+description:
+ Android Goldfish framebuffer device used by Android emulator.
+
+properties:
+ compatible:
+ const: google,goldfish-fb
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ display@1f008000 {
+ compatible = "google,goldfish-fb";
+ reg = <0x1f008000 0x100>;
+ interrupts = <16>;
+ };
--
2.52.0.457.g6b5491de43-goog
^ permalink raw reply related
* [PATCH v3 0/6] dt-bindings: goldfish: Convert to DT schema
From: Kuan-Wei Chiu @ 2026-01-12 18:50 UTC (permalink / raw)
To: airlied, simona, maarten.lankhorst, mripard, tzimmermann, robh,
krzk+dt, conor+dt, dmitry.torokhov, sre, gregkh, jirislaby,
lgirdwood, broonie
Cc: jserv, eleanor15x, dri-devel, devicetree, linux-kernel,
linux-input, linux-pm, linux-serial, linux-sound, Kuan-Wei Chiu
Convert the Android Goldfish emulator platform bindings from text
format to DT schema.
Most of these bindings are currently located in
Documentation/devicetree/bindings/goldfish/. Move them to the
appropriate subsystem directories (serial, input, power, sound, misc)
to align with the kernel directory structure.
Update the examples to use generic node names (e.g., 'serial' instead
of 'goldfish_tty') and fix minor inconsistencies in the original
documentation to comply with current DT specifications.
---
Changes in v3:
- Update 'interrupts' property in examples to use decimal values where
appropriate, replacing hex values.
Changes in v2:
- Add references to generic subsystem schemas (serial, input,
power-supply) where applicable.
- Update property validation to use 'unevaluatedProperties: false' for
schemas referencing generic bindings.
v2: https://lore.kernel.org/lkml/20260108080836.3777829-1-visitorckw@gmail.com/
v1: https://lore.kernel.org/lkml/20251230181031.3191565-1-visitorckw@gmail.com/
Kuan-Wei Chiu (6):
dt-bindings: serial: google,goldfish-tty: Convert to DT schema
dt-bindings: misc: google,android-pipe: Convert to DT schema
dt-bindings: input: google,goldfish-events-keypad: Convert to DT
schema
dt-bindings: power: supply: google,goldfish-battery: Convert to DT
schema
dt-bindings: sound: google,goldfish-audio: Convert to DT schema
dt-bindings: display: google,goldfish-fb: Convert to DT schema
.../bindings/display/google,goldfish-fb.txt | 17 --------
.../bindings/display/google,goldfish-fb.yaml | 38 +++++++++++++++++
.../devicetree/bindings/goldfish/audio.txt | 17 --------
.../devicetree/bindings/goldfish/battery.txt | 17 --------
.../devicetree/bindings/goldfish/events.txt | 17 --------
.../devicetree/bindings/goldfish/pipe.txt | 17 --------
.../devicetree/bindings/goldfish/tty.txt | 17 --------
.../input/google,goldfish-events-keypad.yaml | 41 +++++++++++++++++++
.../bindings/misc/google,android-pipe.yaml | 38 +++++++++++++++++
.../power/supply/google,goldfish-battery.yaml | 41 +++++++++++++++++++
.../bindings/serial/google,goldfish-tty.yaml | 41 +++++++++++++++++++
.../bindings/sound/google,goldfish-audio.yaml | 38 +++++++++++++++++
12 files changed, 237 insertions(+), 102 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/display/google,goldfish-fb.txt
create mode 100644 Documentation/devicetree/bindings/display/google,goldfish-fb.yaml
delete mode 100644 Documentation/devicetree/bindings/goldfish/audio.txt
delete mode 100644 Documentation/devicetree/bindings/goldfish/battery.txt
delete mode 100644 Documentation/devicetree/bindings/goldfish/events.txt
delete mode 100644 Documentation/devicetree/bindings/goldfish/pipe.txt
delete mode 100644 Documentation/devicetree/bindings/goldfish/tty.txt
create mode 100644 Documentation/devicetree/bindings/input/google,goldfish-events-keypad.yaml
create mode 100644 Documentation/devicetree/bindings/misc/google,android-pipe.yaml
create mode 100644 Documentation/devicetree/bindings/power/supply/google,goldfish-battery.yaml
create mode 100644 Documentation/devicetree/bindings/serial/google,goldfish-tty.yaml
create mode 100644 Documentation/devicetree/bindings/sound/google,goldfish-audio.yaml
--
2.52.0.457.g6b5491de43-goog
^ permalink raw reply
* [PATCH v3 2/6] dt-bindings: misc: google,android-pipe: Convert to DT schema
From: Kuan-Wei Chiu @ 2026-01-12 18:50 UTC (permalink / raw)
To: airlied, simona, maarten.lankhorst, mripard, tzimmermann, robh,
krzk+dt, conor+dt, dmitry.torokhov, sre, gregkh, jirislaby,
lgirdwood, broonie
Cc: jserv, eleanor15x, dri-devel, devicetree, linux-kernel,
linux-input, linux-pm, linux-serial, linux-sound, Kuan-Wei Chiu,
Krzysztof Kozlowski
In-Reply-To: <20260112185044.1865605-1-visitorckw@gmail.com>
Convert the Android Goldfish QEMU Pipe binding to DT schema format.
Move the file to the misc directory as it represents a miscellaneous
communication device.
Update the example node name to 'pipe' to comply with generic node
naming standards and fix the mismatch between unit address and reg
property in the original example.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
Changes in v3:
- None.
.../devicetree/bindings/goldfish/pipe.txt | 17 ---------
.../bindings/misc/google,android-pipe.yaml | 38 +++++++++++++++++++
2 files changed, 38 insertions(+), 17 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/goldfish/pipe.txt
create mode 100644 Documentation/devicetree/bindings/misc/google,android-pipe.yaml
diff --git a/Documentation/devicetree/bindings/goldfish/pipe.txt b/Documentation/devicetree/bindings/goldfish/pipe.txt
deleted file mode 100644
index 5637ce701788..000000000000
--- a/Documentation/devicetree/bindings/goldfish/pipe.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Android Goldfish QEMU Pipe
-
-Android pipe virtual device generated by android emulator.
-
-Required properties:
-
-- compatible : should contain "google,android-pipe" to match emulator
-- reg : <registers mapping>
-- interrupts : <interrupt mapping>
-
-Example:
-
- android_pipe@a010000 {
- compatible = "google,android-pipe";
- reg = <ff018000 0x2000>;
- interrupts = <0x12>;
- };
diff --git a/Documentation/devicetree/bindings/misc/google,android-pipe.yaml b/Documentation/devicetree/bindings/misc/google,android-pipe.yaml
new file mode 100644
index 000000000000..12b0cfc815e4
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/google,android-pipe.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/google,android-pipe.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Android Goldfish QEMU Pipe
+
+maintainers:
+ - Kuan-Wei Chiu <visitorckw@gmail.com>
+
+description:
+ Android QEMU pipe virtual device generated by Android emulator.
+
+properties:
+ compatible:
+ const: google,android-pipe
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ pipe@ff018000 {
+ compatible = "google,android-pipe";
+ reg = <0xff018000 0x2000>;
+ interrupts = <0x12>;
+ };
--
2.52.0.457.g6b5491de43-goog
^ permalink raw reply related
* [PATCH v3 3/6] dt-bindings: input: google,goldfish-events-keypad: Convert to DT schema
From: Kuan-Wei Chiu @ 2026-01-12 18:50 UTC (permalink / raw)
To: airlied, simona, maarten.lankhorst, mripard, tzimmermann, robh,
krzk+dt, conor+dt, dmitry.torokhov, sre, gregkh, jirislaby,
lgirdwood, broonie
Cc: jserv, eleanor15x, dri-devel, devicetree, linux-kernel,
linux-input, linux-pm, linux-serial, linux-sound, Kuan-Wei Chiu
In-Reply-To: <20260112185044.1865605-1-visitorckw@gmail.com>
Convert the Android Goldfish Events Keypad binding to DT schema format.
Move the file to the input directory to match the subsystem.
Update the example node name to 'keypad' to comply with generic node
naming standards.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
---
Changes in v3:
- Use decimal format for interrupts in the example.
.../devicetree/bindings/goldfish/events.txt | 17 --------
.../input/google,goldfish-events-keypad.yaml | 41 +++++++++++++++++++
2 files changed, 41 insertions(+), 17 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/goldfish/events.txt
create mode 100644 Documentation/devicetree/bindings/input/google,goldfish-events-keypad.yaml
diff --git a/Documentation/devicetree/bindings/goldfish/events.txt b/Documentation/devicetree/bindings/goldfish/events.txt
deleted file mode 100644
index 5babf46317a4..000000000000
--- a/Documentation/devicetree/bindings/goldfish/events.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Android Goldfish Events Keypad
-
-Android goldfish events keypad device generated by android emulator.
-
-Required properties:
-
-- compatible : should contain "google,goldfish-events-keypad" to match emulator
-- reg : <registers mapping>
-- interrupts : <interrupt mapping>
-
-Example:
-
- goldfish-events@9040000 {
- compatible = "google,goldfish-events-keypad";
- reg = <0x9040000 0x1000>;
- interrupts = <0x5>;
- };
diff --git a/Documentation/devicetree/bindings/input/google,goldfish-events-keypad.yaml b/Documentation/devicetree/bindings/input/google,goldfish-events-keypad.yaml
new file mode 100644
index 000000000000..4e3a010a70c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/google,goldfish-events-keypad.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/google,goldfish-events-keypad.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Android Goldfish Events Keypad
+
+maintainers:
+ - Kuan-Wei Chiu <visitorckw@gmail.com>
+
+allOf:
+ - $ref: input.yaml#
+
+description:
+ Android goldfish events keypad device generated by android emulator.
+
+properties:
+ compatible:
+ const: google,goldfish-events-keypad
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ keypad@9040000 {
+ compatible = "google,goldfish-events-keypad";
+ reg = <0x9040000 0x1000>;
+ interrupts = <5>;
+ };
--
2.52.0.457.g6b5491de43-goog
^ permalink raw reply related
* [PATCH v3 5/6] dt-bindings: sound: google,goldfish-audio: Convert to DT schema
From: Kuan-Wei Chiu @ 2026-01-12 18:50 UTC (permalink / raw)
To: airlied, simona, maarten.lankhorst, mripard, tzimmermann, robh,
krzk+dt, conor+dt, dmitry.torokhov, sre, gregkh, jirislaby,
lgirdwood, broonie
Cc: jserv, eleanor15x, dri-devel, devicetree, linux-kernel,
linux-input, linux-pm, linux-serial, linux-sound, Kuan-Wei Chiu
In-Reply-To: <20260112185044.1865605-1-visitorckw@gmail.com>
Convert the Android Goldfish Audio binding to DT schema format.
Move the file to the sound directory to match the subsystem.
Update the example node name to 'sound' to comply with generic node
naming standards.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
---
Changes in v3:
- Use decimal format for interrupts in the example.
.../devicetree/bindings/goldfish/audio.txt | 17 ---------
.../bindings/sound/google,goldfish-audio.yaml | 38 +++++++++++++++++++
2 files changed, 38 insertions(+), 17 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/goldfish/audio.txt
create mode 100644 Documentation/devicetree/bindings/sound/google,goldfish-audio.yaml
diff --git a/Documentation/devicetree/bindings/goldfish/audio.txt b/Documentation/devicetree/bindings/goldfish/audio.txt
deleted file mode 100644
index d043fda433ba..000000000000
--- a/Documentation/devicetree/bindings/goldfish/audio.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Android Goldfish Audio
-
-Android goldfish audio device generated by android emulator.
-
-Required properties:
-
-- compatible : should contain "google,goldfish-audio" to match emulator
-- reg : <registers mapping>
-- interrupts : <interrupt mapping>
-
-Example:
-
- goldfish_audio@9030000 {
- compatible = "google,goldfish-audio";
- reg = <0x9030000 0x100>;
- interrupts = <0x4>;
- };
diff --git a/Documentation/devicetree/bindings/sound/google,goldfish-audio.yaml b/Documentation/devicetree/bindings/sound/google,goldfish-audio.yaml
new file mode 100644
index 000000000000..d395a5cbc945
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/google,goldfish-audio.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/google,goldfish-audio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Android Goldfish Audio
+
+maintainers:
+ - Kuan-Wei Chiu <visitorckw@gmail.com>
+
+description:
+ Android goldfish audio device generated by Android emulator.
+
+properties:
+ compatible:
+ const: google,goldfish-audio
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ sound@9030000 {
+ compatible = "google,goldfish-audio";
+ reg = <0x9030000 0x100>;
+ interrupts = <4>;
+ };
--
2.52.0.457.g6b5491de43-goog
^ permalink raw reply related
* Re: [PATCH v4 0/9] Add support for handling PCIe M.2 Key E connectors in devicetree
From: Andy Shevchenko @ 2026-01-12 19:29 UTC (permalink / raw)
To: manivannan.sadhasivam
Cc: Rob Herring, Greg Kroah-Hartman, Jiri Slaby, Nathan Chancellor,
Nicolas Schier, Hans de Goede, Ilpo Järvinen, Mark Pearson,
Derek J. Clark, Manivannan Sadhasivam, Krzysztof Kozlowski,
Conor Dooley, Marcel Holtmann, Luiz Augusto von Dentz,
Bartosz Golaszewski, Bartosz Golaszewski, linux-serial,
linux-kernel, linux-kbuild, platform-driver-x86, linux-pci,
devicetree, linux-arm-msm, linux-bluetooth, linux-pm,
Stephan Gerhold, Dmitry Baryshkov, linux-acpi,
Bartosz Golaszewski
In-Reply-To: <20260112-pci-m2-e-v4-0-eff84d2c6d26@oss.qualcomm.com>
On Mon, Jan 12, 2026 at 09:55:59PM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> This series is the continuation of the series [1] that added the initial support
> for the PCIe M.2 connectors. This series extends it by adding support for Key E
> connectors. These connectors are used to connect the Wireless Connectivity
> devices such as WiFi, BT, NFC and GNSS devices to the host machine over
> interfaces such as PCIe/SDIO, USB/UART and NFC. This series adds support for
> connectors that expose PCIe interface for WiFi and UART interface for BT. Other
> interfaces are left for future improvements.
>
> Serdev device support for BT
> ============================
>
> Adding support for the PCIe interface was mostly straightforward and a lot
> similar to the previous Key M connector. But adding UART interface has proved to
> be tricky. This is mostly because of the fact UART is a non-discoverable bus,
> unlike PCIe which is discoverable. So this series relied on the PCI notifier to
> create the serdev device for UART/BT. This means the PCIe interface will be
> brought up first and after the PCIe device enumeration, the serdev device will
> be created by the pwrseq driver. This logic is necessary since the connector
> driver and DT node don't describe the device, but just the connector. So to make
> the connector interface Plug and Play, the connector driver uses the PCIe device
> ID to identify the card and creates the serdev device. This logic could be
> extended in the future to support more M.2 cards. Even if the M.2 card uses SDIO
> interface for connecting WLAN, a SDIO notifier could be added to create the
> serdev device.
>
> Open questions
> ==============
>
> Though this series adds the relevant functionality for handling the M.2 Key M
> connectors, there are still a few open questions exists on the design.
>
> 1. Created a dynamic 'bluetooth' node with the compatible property matching the
> WCN7850 device and attached it to the serdev device. This allowed reusing the
> existing OF based BT driver without much modifications.
And now I like the solution, thanks!
> 2. PCIe client drivers of some M.2 WLAN cards like the Qcom QCA6390, rely on
> the PCIe device DT node to extract properties such as
> 'qcom,calibration-variant', 'firmware-name', etc... For those drivers, should we
> add the PCIe DT node in the Root Port in conjunction with the Port node as
> below?
>
> pcie@0 {
> wifi@0 {
> compatible = "pci17cb,1103";
> ...
> qcom,calibration-variant = "LE_X13S";
> };
>
> port {
> pcie4_port0_ep: endpoint {
> remote-endpoint = <&m2_e_pcie_ep>;
> };
> };
> };
>
> This will also require marking the PMU supplies optional in the relevant ath
> bindings for M.2 cards.
>
> 3. Some M.2 cards require specific power up sequence like delays between
> regulator/GPIO and such. For instance, the WCN7850 card supported in this series
> requires 50ms delay between powering up an interface and driving it. I've just
> hardcoded the delay in the driver, but it is a pure hack. Since the pwrseq
> driver doesn't know anything about the device it is dealing with before powering
> it ON, how should it handle the device specific power requirements? Should we
> hardcode the device specific property in the connector node? But then, it will
> no longer become a generic M.2 connector and sort of defeats the purpose of the
> connector binding.
>
> I hope to address these questions with the help of the relevant subsystem
> maintainers and the community.
>
> Testing
> =======
>
> This series, together with the devicetree changes [2] was tested on the
> Qualcomm X1e based Lenovo Thinkpad T14s Laptop which has the WCN7850 WLAN/BT
> 1620 LGA card connected over PCIe and UART.
>
> Dependency
> ==========
>
> This series is dependent on the M.2 Key M series [1] on top of v6.19-rc1.
>
> [1] https://lore.kernel.org/linux-pci/20260107-pci-m2-v5-0-8173d8a72641@oss.qualcomm.com
> [2] https://github.com/Mani-Sadhasivam/linux/commit/753033861360171f2af1fdd56e8985ff916e1ac2
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> ---
> Changes in v4:
> - Switched to dynamic OF node for serdev instead of swnode and dropped all
> swnode related patches
Yep, and I even won't insist on fwnode API in serdev as now OF one makes more
sense. OTOH, most of the handling on pwrseq and serdev can be rewritten using
fwnode in principle.
> - Link to v3: https://lore.kernel.org/r/20260110-pci-m2-e-v3-0-4faee7d0d5ae@oss.qualcomm.com
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v4 3/9] serdev: Do not return -ENODEV from of_serdev_register_devices() if external connector is used
From: Andy Shevchenko @ 2026-01-12 19:23 UTC (permalink / raw)
To: manivannan.sadhasivam
Cc: Rob Herring, Greg Kroah-Hartman, Jiri Slaby, Nathan Chancellor,
Nicolas Schier, Hans de Goede, Ilpo Järvinen, Mark Pearson,
Derek J. Clark, Manivannan Sadhasivam, Krzysztof Kozlowski,
Conor Dooley, Marcel Holtmann, Luiz Augusto von Dentz,
Bartosz Golaszewski, Bartosz Golaszewski, linux-serial,
linux-kernel, linux-kbuild, platform-driver-x86, linux-pci,
devicetree, linux-arm-msm, linux-bluetooth, linux-pm,
Stephan Gerhold, Dmitry Baryshkov, linux-acpi,
Bartosz Golaszewski
In-Reply-To: <20260112-pci-m2-e-v4-3-eff84d2c6d26@oss.qualcomm.com>
On Mon, Jan 12, 2026 at 09:56:02PM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> If an external connector like M.2 is connected to the serdev controller
> in DT, then the serdev devices may be created dynamically by the connector
> driver. So do not return -ENODEV from of_serdev_register_devices() if the
> static nodes are not found and the graph node is used.
...
> + if (!found && !of_graph_is_present(ctrl->dev.of_node))
dev_of_node()
> return -ENODEV;
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v4 9/9] power: sequencing: pcie-m2: Create serdev device for WCN7850 bluetooth
From: Andy Shevchenko @ 2026-01-12 19:22 UTC (permalink / raw)
To: manivannan.sadhasivam
Cc: Rob Herring, Greg Kroah-Hartman, Jiri Slaby, Nathan Chancellor,
Nicolas Schier, Hans de Goede, Ilpo Järvinen, Mark Pearson,
Derek J. Clark, Manivannan Sadhasivam, Krzysztof Kozlowski,
Conor Dooley, Marcel Holtmann, Luiz Augusto von Dentz,
Bartosz Golaszewski, Bartosz Golaszewski, linux-serial,
linux-kernel, linux-kbuild, platform-driver-x86, linux-pci,
devicetree, linux-arm-msm, linux-bluetooth, linux-pm,
Stephan Gerhold, Dmitry Baryshkov, linux-acpi
In-Reply-To: <20260112-pci-m2-e-v4-9-eff84d2c6d26@oss.qualcomm.com>
On Mon, Jan 12, 2026 at 09:56:08PM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> For supporting bluetooth over the non-discoverable UART interface of
> WCN7850, create the serdev device after enumerating the PCIe interface.
> This is mandatory since the device ID is only known after the PCIe
> enumeration and the ID is used for creating the serdev device.
>
> Since by default there is no OF or ACPI node for the created serdev,
> create a dynamic OF 'bluetooth' node with the 'compatible' property and
> attach it to the serdev device. This will allow the serdev device to bind
> to the existing bluetooth driver.
...
> +static int pwrseq_m2_pcie_notify(struct notifier_block *nb, unsigned long action,
> + void *data)
> +{
> + struct pwrseq_pcie_m2_ctx *ctx = container_of(nb, struct pwrseq_pcie_m2_ctx, nb);
> + struct pci_dev *pdev = to_pci_dev(data);
> + struct serdev_controller *serdev_ctrl;
> + struct device *dev = ctx->dev;
> + struct device_node *pci_parent;
> + int ret;
> +
> + /*
> + * Check whether the PCI device is associated with this M.2 connector or
> + * not, by comparing the OF node of the PCI device parent and the Port 0
> + * (PCIe) remote node parent OF node.
> + */
> + pci_parent = of_graph_get_remote_node(dev_of_node(ctx->dev), 0, 0);
> + if (!pci_parent || (pci_parent != pdev->dev.parent->of_node)) {
!device_match_of_node()
> + of_node_put(pci_parent);
> + return NOTIFY_DONE;
> + }
> + of_node_put(pci_parent);
> +
> + switch (action) {
> + case BUS_NOTIFY_ADD_DEVICE:
> + /* Create serdev device for WCN7850 */
> + if (pdev->vendor == PCI_VENDOR_ID_QCOM && pdev->device == 0x1107) {
> + struct device_node *serdev_parent __free(device_node) =
> + of_graph_get_remote_node(dev_of_node(ctx->dev), 1, 1);
> + if (!serdev_parent)
> + return NOTIFY_DONE;
> +
> + serdev_ctrl = of_find_serdev_controller_by_node(serdev_parent);
> + if (!serdev_ctrl)
> + return NOTIFY_DONE;
> +
> + ctx->serdev = serdev_device_alloc(serdev_ctrl);
> + if (!ctx->serdev)
> + return NOTIFY_BAD;
> +
> + ret = pwrseq_m2_pcie_create_bt_node(ctx, serdev_parent);
> + if (ret) {
> + serdev_device_put(ctx->serdev);
> + return notifier_from_errno(ret);
> + }
> +
> + ret = serdev_device_add(ctx->serdev);
> + if (ret) {
> + dev_err(dev, "Failed to add serdev for WCN7850: %d\n", ret);
> + of_changeset_revert(ctx->ocs);
> + of_changeset_destroy(ctx->ocs);
> + serdev_device_put(ctx->serdev);
> + return notifier_from_errno(ret);
> + }
> + }
> + break;
> + case BUS_NOTIFY_REMOVED_DEVICE:
> + /* Destroy serdev device for WCN7850 */
> + if (pdev->vendor == PCI_VENDOR_ID_QCOM && pdev->device == 0x1107) {
> + serdev_device_remove(ctx->serdev);
> + of_changeset_revert(ctx->ocs);
> + of_changeset_destroy(ctx->ocs);
> + }
> + break;
> + }
> +
> + return NOTIFY_OK;
> +}
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH 00/19] printk cleanup - part 3
From: Marcos Paulo de Souza @ 2026-01-12 17:53 UTC (permalink / raw)
To: Andreas Larsson, Richard Weinberger, Anton Ivanov, Johannes Berg,
Greg Kroah-Hartman, Jason Wessel, Daniel Thompson,
Douglas Anderson, Petr Mladek, Steven Rostedt, John Ogness,
Sergey Senozhatsky, Jiri Slaby, Breno Leitao, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Geert Uytterhoeven, Kees Cook, Tony Luck, Guilherme G. Piccoli,
Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, Alexander Shishkin, Maxime Coquelin,
Alexandre Torgue, Jacky Huang, Shan-Chun Hung, Laurentiu Tudor
Cc: linux-um, linux-kernel, kgdb-bugreport, linux-serial, netdev,
linux-m68k, linux-hardening, linuxppc-dev, sparclinux,
linux-stm32, linux-arm-kernel, linux-fsdevel
In-Reply-To: <836139d1-1425-4381-bb84-6c2654a4d239@gaisler.com>
On Wed, 2026-01-07 at 11:22 +0100, Andreas Larsson wrote:
> On 2025-12-27 13:16, Marcos Paulo de Souza wrote:
> > The parts 1 and 2 can be found here [1] and here[2].
> >
> > The changes proposed in this part 3 are mostly to clarify the usage
> > of
> > the interfaces for NBCON, and use the printk helpers more broadly.
> > Besides it, it also introduces a new way to register consoles
> > and drop thes the CON_ENABLED flag. It seems too much, but in
> > reality
> > the changes are not complex, and as the title says, it's basically
> > a
> > cleanup without changing the functional changes.
>
> Hi,
>
> Patches 7-17 all say "replacing the CON_ENABLE flag" in their
> descriptions, which should rather be "replacing the CON_ENABLED
> flag".
That's true, thanks for spotting!
>
> Cheers,
> Andreas
^ permalink raw reply
* Re: [PATCH v3 03/14] software node: Implement device_get_match_data fwnode callback
From: Manivannan Sadhasivam @ 2026-01-12 16:43 UTC (permalink / raw)
To: manivannan.sadhasivam
Cc: Rob Herring, Greg Kroah-Hartman, Jiri Slaby, Nathan Chancellor,
Nicolas Schier, Hans de Goede, Ilpo Järvinen, Mark Pearson,
Derek J. Clark, Krzysztof Kozlowski, Conor Dooley,
Marcel Holtmann, Luiz Augusto von Dentz, Bartosz Golaszewski,
Andy Shevchenko, Bartosz Golaszewski, linux-serial, linux-kernel,
linux-kbuild, platform-driver-x86, linux-pci, devicetree,
linux-arm-msm, linux-bluetooth, linux-pm, Stephan Gerhold,
Dmitry Baryshkov, linux-acpi
In-Reply-To: <20260112-pci-m2-e-v4-9-eff84d2c6d26@oss.qualcomm.com>
On Mon, Jan 12, 2026 at 09:56:08PM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
>
> For supporting bluetooth over the non-discoverable UART interface of
> WCN7850, create the serdev device after enumerating the PCIe interface.
> This is mandatory since the device ID is only known after the PCIe
> enumeration and the ID is used for creating the serdev device.
>
> Since by default there is no OF or ACPI node for the created serdev,
> create a dynamic OF 'bluetooth' node with the 'compatible' property and
> attach it to the serdev device. This will allow the serdev device to bind
> to the existing bluetooth driver.
>
Missed "select OF_DYNAMIC" in Kconfig...
- Mani
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
> ---
> drivers/power/sequencing/pwrseq-pcie-m2.c | 170 +++++++++++++++++++++++++++++-
> 1 file changed, 169 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/power/sequencing/pwrseq-pcie-m2.c b/drivers/power/sequencing/pwrseq-pcie-m2.c
> index 4b85a40d7692..5f9232e6c700 100644
> --- a/drivers/power/sequencing/pwrseq-pcie-m2.c
> +++ b/drivers/power/sequencing/pwrseq-pcie-m2.c
> @@ -17,6 +17,7 @@
> #include <linux/platform_device.h>
> #include <linux/pwrseq/provider.h>
> #include <linux/regulator/consumer.h>
> +#include <linux/serdev.h>
> #include <linux/slab.h>
>
> struct pwrseq_pcie_m2_pdata {
> @@ -32,6 +33,9 @@ struct pwrseq_pcie_m2_ctx {
> struct gpio_desc *w_disable1_gpio;
> struct gpio_desc *w_disable2_gpio;
> struct device *dev;
> + struct serdev_device *serdev;
> + struct notifier_block nb;
> + struct of_changeset *ocs;
> };
>
> static int pwrseq_pcie_m2_vregs_enable(struct pwrseq_device *pwrseq)
> @@ -178,9 +182,169 @@ static void pwrseq_pcie_free_resources(void *data)
> {
> struct pwrseq_pcie_m2_ctx *ctx = data;
>
> + serdev_device_remove(ctx->serdev);
> + of_changeset_revert(ctx->ocs);
> + of_changeset_destroy(ctx->ocs);
> + bus_unregister_notifier(&pci_bus_type, &ctx->nb);
> regulator_bulk_free(ctx->num_vregs, ctx->regs);
> }
>
> +static int pwrseq_m2_pcie_create_bt_node(struct pwrseq_pcie_m2_ctx *ctx,
> + struct device_node *parent)
> +{
> + struct device *dev = ctx->dev;
> + struct device_node *np;
> + int ret;
> +
> + ctx->ocs = devm_kzalloc(dev, sizeof(*ctx->ocs), GFP_KERNEL);
> + if (!ctx->ocs)
> + return -ENOMEM;
> +
> + of_changeset_init(ctx->ocs);
> +
> + np = of_changeset_create_node(ctx->ocs, parent, "bluetooth");
> + if (!np) {
> + dev_err(dev, "Failed to create bluetooth node\n");
> + ret = -ENODEV;
> + goto err_destroy_changeset;
> + }
> +
> + ret = of_changeset_add_prop_string(ctx->ocs, np, "compatible", "qcom,wcn7850-bt");
> + if (ret) {
> + dev_err(dev, "Failed to add bluetooth compatible: %d\n", ret);
> + goto err_destroy_changeset;
> + }
> +
> + ret = of_changeset_apply(ctx->ocs);
> + if (ret) {
> + dev_err(dev, "Failed to apply changeset: %d\n", ret);
> + goto err_destroy_changeset;
> + }
> +
> + ret = device_add_of_node(&ctx->serdev->dev, np);
> + if (ret) {
> + dev_err(dev, "Failed to add OF node: %d\n", ret);
> + goto err_revert_changeset;
> + }
> +
> + return 0;
> +
> +err_revert_changeset:
> + of_changeset_revert(ctx->ocs);
> +err_destroy_changeset:
> + of_changeset_destroy(ctx->ocs);
> +
> + return ret;
> +}
> +
> +static int pwrseq_m2_pcie_notify(struct notifier_block *nb, unsigned long action,
> + void *data)
> +{
> + struct pwrseq_pcie_m2_ctx *ctx = container_of(nb, struct pwrseq_pcie_m2_ctx, nb);
> + struct pci_dev *pdev = to_pci_dev(data);
> + struct serdev_controller *serdev_ctrl;
> + struct device *dev = ctx->dev;
> + struct device_node *pci_parent;
> + int ret;
> +
> + /*
> + * Check whether the PCI device is associated with this M.2 connector or
> + * not, by comparing the OF node of the PCI device parent and the Port 0
> + * (PCIe) remote node parent OF node.
> + */
> + pci_parent = of_graph_get_remote_node(dev_of_node(ctx->dev), 0, 0);
> + if (!pci_parent || (pci_parent != pdev->dev.parent->of_node)) {
> + of_node_put(pci_parent);
> + return NOTIFY_DONE;
> + }
> + of_node_put(pci_parent);
> +
> + switch (action) {
> + case BUS_NOTIFY_ADD_DEVICE:
> + /* Create serdev device for WCN7850 */
> + if (pdev->vendor == PCI_VENDOR_ID_QCOM && pdev->device == 0x1107) {
> + struct device_node *serdev_parent __free(device_node) =
> + of_graph_get_remote_node(dev_of_node(ctx->dev), 1, 1);
> + if (!serdev_parent)
> + return NOTIFY_DONE;
> +
> + serdev_ctrl = of_find_serdev_controller_by_node(serdev_parent);
> + if (!serdev_ctrl)
> + return NOTIFY_DONE;
> +
> + ctx->serdev = serdev_device_alloc(serdev_ctrl);
> + if (!ctx->serdev)
> + return NOTIFY_BAD;
> +
> + ret = pwrseq_m2_pcie_create_bt_node(ctx, serdev_parent);
> + if (ret) {
> + serdev_device_put(ctx->serdev);
> + return notifier_from_errno(ret);
> + }
> +
> + ret = serdev_device_add(ctx->serdev);
> + if (ret) {
> + dev_err(dev, "Failed to add serdev for WCN7850: %d\n", ret);
> + of_changeset_revert(ctx->ocs);
> + of_changeset_destroy(ctx->ocs);
> + serdev_device_put(ctx->serdev);
> + return notifier_from_errno(ret);
> + }
> + }
> + break;
> + case BUS_NOTIFY_REMOVED_DEVICE:
> + /* Destroy serdev device for WCN7850 */
> + if (pdev->vendor == PCI_VENDOR_ID_QCOM && pdev->device == 0x1107) {
> + serdev_device_remove(ctx->serdev);
> + of_changeset_revert(ctx->ocs);
> + of_changeset_destroy(ctx->ocs);
> + }
> + break;
> + }
> +
> + return NOTIFY_OK;
> +}
> +
> +static bool pwrseq_pcie_m2_check_remote_node(struct device *dev, u8 port, u8 endpoint,
> + const char *node)
> +{
> + struct device_node *remote __free(device_node) =
> + of_graph_get_remote_node(dev_of_node(dev), port, endpoint);
> +
> + if (remote && of_node_name_eq(remote, node))
> + return true;
> +
> + return false;
> +}
> +
> +/*
> + * If the connector exposes a non-discoverable bus like UART, the respective
> + * protocol device needs to be created manually with the help of the notifier
> + * of the discoverable bus like PCIe.
> + */
> +static int pwrseq_pcie_m2_register_notifier(struct pwrseq_pcie_m2_ctx *ctx, struct device *dev)
> +{
> + int ret;
> +
> + /*
> + * Register a PCI notifier for Key E connector that has PCIe as Port
> + * 0/Endpoint 0 interface and Serial as Port 1/Endpoint 1 interface.
> + */
> + if (pwrseq_pcie_m2_check_remote_node(dev, 1, 1, "serial")) {
> + if (pwrseq_pcie_m2_check_remote_node(dev, 0, 0, "pcie")) {
> + ctx->dev = dev;
> + ctx->nb.notifier_call = pwrseq_m2_pcie_notify;
> + ret = bus_register_notifier(&pci_bus_type, &ctx->nb);
> + if (ret) {
> + dev_err_probe(dev, ret, "Failed to register notifier for serdev\n");
> + return ret;
> + }
> + }
> + }
> +
> + return 0;
> +}
> +
> static int pwrseq_pcie_m2_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -235,7 +399,11 @@ static int pwrseq_pcie_m2_probe(struct platform_device *pdev)
> return dev_err_probe(dev, PTR_ERR(ctx->pwrseq),
> "Failed to register the power sequencer\n");
>
> - return 0;
> + /*
> + * Register a notifier for creating protocol devices for
> + * non-discoverable busses like UART.
> + */
> + return pwrseq_pcie_m2_register_notifier(ctx, dev);
> }
>
> static const struct of_device_id pwrseq_pcie_m2_of_match[] = {
>
> --
> 2.48.1
>
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply
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