* Re: [PATCH v9 05/10] ARM: dts: bcm2835-rpi: Move duplicate firmware-clocks to bcm2835-rpi.dtsi
From: Florian Fainelli @ 2024-04-02 20:53 UTC (permalink / raw)
To: Laurent Pinchart, linux-media
Cc: Dave Stevenson, David Plowman, Jean-Michel Hautbois, Hans Verkuil,
Naushir Patuck, Sakari Ailus, kernel-list, linux-rpi-kernel,
Ray Jui, Scott Branden, bcm-kernel-feedback-list, Conor Dooley,
Krzysztof Kozlowski, Rob Herring, devicetree
In-Reply-To: <20240402000424.4650-6-laurent.pinchart@ideasonboard.com>
[-- Attachment #1: Type: text/plain, Size: 505 bytes --]
On 4/1/24 17:04, Laurent Pinchart wrote:
> The Raspberry Pi firmware handles clocks on all BCM2835-derived SoCs. It
> is currently defined identically in both bcm2711-rpi.dtsi and
> bcm2835-rpi-common.dtsi. Move the definitions to the common
> bcm2835-rpi.dtsi file.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next,
thanks!
--
Florian
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
^ permalink raw reply
* Re: [PATCH v9 00/10] media: Add driver for the Raspberry Pi <5 CSI-2 receiver
From: Laurent Pinchart @ 2024-04-02 20:53 UTC (permalink / raw)
To: Florian Fainelli
Cc: linux-media, Dave Stevenson, David Plowman, Jean-Michel Hautbois,
Hans Verkuil, Naushir Patuck, Sakari Ailus, kernel-list,
linux-rpi-kernel, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Conor Dooley, Krzysztof Kozlowski,
Rob Herring, devicetree
In-Reply-To: <0f5bc6e1-a8d8-4067-bd02-b3ec570f2936@broadcom.com>
On Tue, Apr 02, 2024 at 01:46:44PM -0700, Florian Fainelli wrote:
> Hello Laurent,
>
> On 4/1/24 17:11, Laurent Pinchart wrote:
> > Hi Florian,
> >
> > I think patches 05/10 ("ARM: dts: bcm2835-rpi: Move duplicate
> > firmware-clocks to bcm2835-rpi.dtsi"), 07/10 ("ARM: dts: bcm2711-rpi:
> > Add pinctrl-based multiplexing for I2C0"), 08/10 ("ARM: dts:
> > bcm2711-rpi-cm4-io: Add RTC on I2C0") and 09/10 ("ARM: dts:
> > bcm2711-rpi-4-b: Add CAM1 regulator") are ready for you to merge. This
> > would help reducing further iterations of this series.
>
> I could not locate the base commit this series was posted against
> (58abf3672a73558149fa567eafff8d5b1cc0446b), so patch 5 unfortunately did
> not apply cleanly due to v6.9-rc1 still having a "dma-ranges" property,
> fixed that up and the rest applied fine.
The base is in the rpi/v6.9/unicam/next branch of
https://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux.git.
This series applies on top of the 3 DT drive-by fixes I've sent
separately.
--
Regards,
Laurent Pinchart
^ permalink raw reply
* Re: [PATCH v2 0/3] dt-bindings: arm: bcm: raspberrypi,bcm2835-firmware: Drive-by fixes
From: Florian Fainelli @ 2024-04-02 20:52 UTC (permalink / raw)
To: Laurent Pinchart, Florian Fainelli
Cc: Stefan Wahren, Ivan T. Ivanov, Peter Robinson, Dave Stevenson,
Naushir Patuck, Bartosz Golaszewski,
Broadcom internal kernel review list, Conor Dooley,
Krzysztof Kozlowski, Linus Walleij, Nicolas Saenz Julienne,
Ray Jui, Rob Herring, Scott Branden, linux-arm-kernel, devicetree,
linux-rpi-kernel, u-boot
In-Reply-To: <20240402203255.GC32172@pendragon.ideasonboard.com>
[-- Attachment #1: Type: text/plain, Size: 2757 bytes --]
On 4/2/24 13:32, Laurent Pinchart wrote:
> Hi Florian,
>
> On Tue, Apr 02, 2024 at 01:18:35PM -0700, Florian Fainelli wrote:
>> On 4/2/24 13:08, Laurent Pinchart wrote:
>>> On Tue, Apr 02, 2024 at 09:52:06PM +0200, Stefan Wahren wrote:
>>>> Am 02.04.24 um 10:58 schrieb Ivan T. Ivanov:
>>>>> On 2024-03-28 01:37, Laurent Pinchart wrote:
>>>>>> On Wed, Mar 27, 2024 at 07:49:38AM +0100, Stefan Wahren wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> [add Peter and Ivan]
>>>>>>>
>>>>>>> Am 26.03.24 um 20:58 schrieb Laurent Pinchart:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> This small series includes a few drive-by fixes for DT validation
>>>>>>>> errors.
>>>>>>>>
>>>>>>>> The first patch has been posted previously in v1 ([1], and now addresses
>>>>>>>> a small review comment. I think it's good to go.
>>>>>>>>
>>>>>>>> The next two patches address the same issue as "[PATCH 1/2] dt-bindings:
>>>>>>>> arm: bcm: raspberrypi,bcm2835-firmware: Add missing properties" ([2]),
>>>>>>>> but this time with a (hopefully) correct approach. Patch 2/3 starts by
>>>>>>>> fixing the raspberrypi-bcm2835-firmware driver, removing the need for DT
>>>>>>>> properties that are specified in bcm2835-rpi.dtsi but not documented in
>>>>>>>> the corresponding bindings. Patch 3/3 can then drop those properties,
>>>>>>>> getting rid of the warnings.
>>>>>>>
>>>>>>> since this series drops properties from the device tree, does anyone
>>>>>>> have the chance to test it with a recent U-Boot?
>>>>>>
>>>>>> I don't have U-Boot running with my RPi, so I would appreciate if
>>>>>> someone could help :-)
>>>>>
>>>>> Sorry for taking me so long to verify this.
>>>>>
>>>>> I think on RPi U-Boot side we are fine. API used when accessing Mbox
>>>>> device do not follow DM model and do not use DMA, but just access
>>>>> device directly using this nice macros phys_to_bus/bus_to_phys.
>>>>>
>>>>> I build new DTB files with this patch included and U-Boot build
>>>>> from the latest sources. No obvious issues on RPi3 and RPi4.
>>>>> Devices boot fine.
>>>
>>> Thank you for testing Ivan.
>>>
>>>> Thanks you, Laurent and Ivan
>>>>
>>>> Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
>>>
>>> Stefan, I'm quite unfamiliar with the Raspberry Pi upstreaming process
>>> (despite having sent patches for ages :-)), do I understand correctly
>>> that this patch will go through your tree, or do I need to work with
>>> someone else to get it merged upstream ?
>>
>> I will be taking those via the Broadcom SoC tree.
>
> Thank you.
>
> If there's a chance to include patches 05/10, 07/10, 08/10 and 09/10
> from [1] at the same time, that would be great :-)
>
> [1] https://lore.kernel.org/linux-media/20240402000424.4650-1-laurent.pinchart@ideasonboard.com
>
Yes, now done, thanks!
--
Florian
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
^ permalink raw reply
* Re: [PATCH v9 07/10] ARM: dts: bcm2711-rpi: Add pinctrl-based multiplexing for I2C0
From: Florian Fainelli @ 2024-04-02 20:45 UTC (permalink / raw)
To: bcm-kernel-feedback-list, Laurent Pinchart, linux-media
Cc: Florian Fainelli, Uwe Kleine-König, Dave Stevenson,
David Plowman, Jean-Michel Hautbois, Hans Verkuil, Naushir Patuck,
Sakari Ailus, kernel-list, linux-rpi-kernel, Ray Jui,
Scott Branden, Conor Dooley, Krzysztof Kozlowski, Rob Herring,
devicetree
In-Reply-To: <20240402000424.4650-8-laurent.pinchart@ideasonboard.com>
From: Florian Fainelli <f.fainelli@gmail.com>
On Tue, 2 Apr 2024 03:04:14 +0300, Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote:
> From: Uwe Kleine-König <uwe@kleine-koenig.org>
>
> BCM2711-based Raspberry Pi boards (4B, CM4 and 400) multiplex the I2C0
> controller over two sets of pins, GPIO0+1 and GPIO44+45. The former is
> exposed on the 40-pin header, while the latter is used for the CSI and
> DSI connectors.
>
> Add a pinctrl-based I2C bus multiplexer to bcm2711-rpi.dtsi to model
> this multiplexing. The two child buses are named i2c0_0 and i2c0_1.
>
> Note that if you modified the dts before to add devices to the i2c bus
> appearing on pins gpio0 + gpio1 (either directly in the dts or using an
> overlay), you have to put these into the i2c0_0 node introduced here
> now.
>
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian
^ permalink raw reply
* Re: [PATCH v9 08/10] ARM: dts: bcm2711-rpi-cm4-io: Add RTC on I2C0
From: Florian Fainelli @ 2024-04-02 20:46 UTC (permalink / raw)
To: bcm-kernel-feedback-list, Laurent Pinchart, linux-media
Cc: Florian Fainelli, Uwe Kleine-König, Dave Stevenson,
David Plowman, Jean-Michel Hautbois, Hans Verkuil, Naushir Patuck,
Sakari Ailus, kernel-list, linux-rpi-kernel, Ray Jui,
Scott Branden, Conor Dooley, Krzysztof Kozlowski, Rob Herring,
devicetree
In-Reply-To: <20240402000424.4650-9-laurent.pinchart@ideasonboard.com>
From: Florian Fainelli <f.fainelli@gmail.com>
On Tue, 2 Apr 2024 03:04:15 +0300, Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote:
> From: Uwe Kleine-König <uwe@kleine-koenig.org>
>
> The cm4-io board comes with a PCF85063 on I2C0, connected to the GPIO44
> and GPIO45 pins. Add it to the device tree.
>
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian
^ permalink raw reply
* Re: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: set brcm,wp-not-connected
From: Florian Fainelli @ 2024-04-02 20:41 UTC (permalink / raw)
To: bcm-kernel-feedback-list, Rafał Miłecki,
Florian Fainelli
Cc: Florian Fainelli, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
William Zhang, Anand Gore, Kursad Oney, devicetree,
linux-arm-kernel, Rafał Miłecki
In-Reply-To: <20240328093710.28206-1-zajec5@gmail.com>
From: Florian Fainelli <f.fainelli@gmail.com>
On Thu, 28 Mar 2024 10:37:10 +0100, Rafał Miłecki <zajec5@gmail.com> wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> Every described BCM4908 board has WP pin not connected. This caused
> problems for drivers since day 0 but there was no property to describe
> that properly. Projects like OpenWrt were modifying Linux driver to deal
> with it.
>
> It's not clear if that is hardware limitation or just reference design
> being copied over and over but this applies to all known / supported
> BCM4908 boards. Handle it by marking WP as not connected by default.
>
> Fixes: 2961f69f151c ("arm64: dts: broadcom: add BCM4908 and Asus GT-AC5300 early DTS files")
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree-arm64/next, thanks!
--
Florian
^ permalink raw reply
* Re: [PATCH v9 00/10] media: Add driver for the Raspberry Pi <5 CSI-2 receiver
From: Florian Fainelli @ 2024-04-02 20:46 UTC (permalink / raw)
To: Laurent Pinchart
Cc: linux-media, Dave Stevenson, David Plowman, Jean-Michel Hautbois,
Hans Verkuil, Naushir Patuck, Sakari Ailus, kernel-list,
linux-rpi-kernel, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Conor Dooley, Krzysztof Kozlowski,
Rob Herring, devicetree
In-Reply-To: <20240402001111.GA4761@pendragon.ideasonboard.com>
[-- Attachment #1: Type: text/plain, Size: 743 bytes --]
Hello Laurent,
On 4/1/24 17:11, Laurent Pinchart wrote:
> Hi Florian,
>
> I think patches 05/10 ("ARM: dts: bcm2835-rpi: Move duplicate
> firmware-clocks to bcm2835-rpi.dtsi"), 07/10 ("ARM: dts: bcm2711-rpi:
> Add pinctrl-based multiplexing for I2C0"), 08/10 ("ARM: dts:
> bcm2711-rpi-cm4-io: Add RTC on I2C0") and 09/10 ("ARM: dts:
> bcm2711-rpi-4-b: Add CAM1 regulator") are ready for you to merge. This
> would help reducing further iterations of this series.
I could not locate the base commit this series was posted against
(58abf3672a73558149fa567eafff8d5b1cc0446b), so patch 5 unfortunately did
not apply cleanly due to v6.9-rc1 still having a "dma-ranges" property,
fixed that up and the rest applied fine.
Thanks!
--
Florian
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
^ permalink raw reply
* Re: [PATCH v9 09/10] ARM: dts: bcm2711-rpi-4-b: Add CAM1 regulator
From: Florian Fainelli @ 2024-04-02 20:46 UTC (permalink / raw)
To: bcm-kernel-feedback-list, Laurent Pinchart, linux-media
Cc: Florian Fainelli, Dave Stevenson, David Plowman,
Jean-Michel Hautbois, Hans Verkuil, Naushir Patuck, Sakari Ailus,
kernel-list, linux-rpi-kernel, Ray Jui, Scott Branden,
Conor Dooley, Krzysztof Kozlowski, Rob Herring, devicetree
In-Reply-To: <20240402000424.4650-10-laurent.pinchart@ideasonboard.com>
From: Florian Fainelli <f.fainelli@gmail.com>
On Tue, 2 Apr 2024 03:04:16 +0300, Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote:
> Add a fixed regulator to model the power supply to the camera connector.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
> ---
Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian
^ permalink raw reply
* [PATCH v1 1/2] dt-bindings: mtd: amlogic,meson-nand: support fields for boot ROM code
From: Arseniy Krasnov @ 2024-04-02 20:27 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl
Cc: linux-mtd, devicetree, linux-arm-kernel, linux-amlogic,
linux-kernel, oxffffaa, kernel, Arseniy Krasnov
In-Reply-To: <20240402202705.2355326-1-avkrasnov@salutedevices.com>
Boot ROM code on Meson requires that some pages on NAND must be written
in special mode: "short" ECC mode where each block is 384 bytes and
scrambling mode is on. Such pages located with the specified interval
within specified offset. Both interval and offset are located in the
device tree and used by driver if 'nand-is-boot-medium' is set for
NAND chip.
Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
---
.../bindings/mtd/amlogic,meson-nand.yaml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
index 57b6957c8415..f49819ee76b8 100644
--- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
@@ -64,11 +64,27 @@ patternProperties:
items:
maximum: 0
+ meson,boot-page-last:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ The NFC driver needs this information to select ECC
+ algorithms supported by the boot ROM.
+ Only used in combination with 'nand-is-boot-medium'.
+
+ meson,boot-page-step:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ The NFC driver needs this information to select ECC
+ algorithms supported by the boot ROM.
+ Only used in combination with 'nand-is-boot-medium'.
+
unevaluatedProperties: false
dependencies:
nand-ecc-strength: [nand-ecc-step-size]
nand-ecc-step-size: [nand-ecc-strength]
+ meson,boot-page-last: [nand-is-boot-medium]
+ meson,boot-page-step: [nand-is-boot-medium]
required:
--
2.35.0
^ permalink raw reply related
* [PATCH v1 2/2] mtd: rawnand: meson: support R/W mode for boot ROM
From: Arseniy Krasnov @ 2024-04-02 20:27 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl
Cc: linux-mtd, devicetree, linux-arm-kernel, linux-amlogic,
linux-kernel, oxffffaa, kernel, Arseniy Krasnov
In-Reply-To: <20240402202705.2355326-1-avkrasnov@salutedevices.com>
Boot ROM code on Meson requires that some pages on NAND must be written
in special mode: "short" ECC mode where each block is 384 bytes and
scrambling mode is on. Such pages located with the specified interval
within specified offset. Both interval and offset are located in the
device tree and used by driver if 'nand-is-boot-medium' is set for
NAND chip.
Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
---
drivers/mtd/nand/raw/meson_nand.c | 88 +++++++++++++++++++++----------
1 file changed, 59 insertions(+), 29 deletions(-)
diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
index 00ce0e5bb970..3f29dd28bd43 100644
--- a/drivers/mtd/nand/raw/meson_nand.c
+++ b/drivers/mtd/nand/raw/meson_nand.c
@@ -35,6 +35,7 @@
#define NFC_CMD_RB BIT(20)
#define NFC_CMD_SCRAMBLER_ENABLE BIT(19)
#define NFC_CMD_SCRAMBLER_DISABLE 0
+#define NFC_CMD_SHORTMODE_ENABLE 1
#define NFC_CMD_SHORTMODE_DISABLE 0
#define NFC_CMD_RB_INT BIT(14)
#define NFC_CMD_RB_INT_NO_PIN ((0xb << 10) | BIT(18) | BIT(16))
@@ -78,6 +79,8 @@
#define DMA_DIR(dir) ((dir) ? NFC_CMD_N2M : NFC_CMD_M2N)
#define DMA_ADDR_ALIGN 8
+#define NFC_SHORT_MODE_ECC_SZ 384
+
#define ECC_CHECK_RETURN_FF (-1)
#define NAND_CE0 (0xe << 10)
@@ -125,6 +128,8 @@ struct meson_nfc_nand_chip {
u32 twb;
u32 tadl;
u32 tbers_max;
+ u32 boot_page_last;
+ u32 boot_page_step;
u32 bch_mode;
u8 *data_buf;
@@ -298,28 +303,49 @@ static void meson_nfc_cmd_seed(struct meson_nfc *nfc, u32 seed)
nfc->reg_base + NFC_REG_CMD);
}
-static void meson_nfc_cmd_access(struct nand_chip *nand, int raw, bool dir,
- int scrambler)
+static int meson_nfc_page_is_boot(struct nand_chip *nand, int page)
+{
+ const struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand);
+
+ return (nand->options & NAND_IS_BOOT_MEDIUM) &&
+ !(page % meson_chip->boot_page_step) &&
+ (page < meson_chip->boot_page_last);
+}
+
+static void meson_nfc_cmd_access(struct nand_chip *nand, bool raw, bool dir, int page)
{
+ const struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand);
struct mtd_info *mtd = nand_to_mtd(nand);
struct meson_nfc *nfc = nand_get_controller_data(mtd_to_nand(mtd));
- struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand);
- u32 bch = meson_chip->bch_mode, cmd;
int len = mtd->writesize, pagesize, pages;
+ int scrambler;
+ u32 cmd;
- pagesize = nand->ecc.size;
+ if (nand->options & NAND_NEED_SCRAMBLING)
+ scrambler = NFC_CMD_SCRAMBLER_ENABLE;
+ else
+ scrambler = NFC_CMD_SCRAMBLER_DISABLE;
if (raw) {
len = mtd->writesize + mtd->oobsize;
cmd = len | scrambler | DMA_DIR(dir);
- writel(cmd, nfc->reg_base + NFC_REG_CMD);
- return;
- }
+ } else if (meson_nfc_page_is_boot(nand, page)) {
+ pagesize = NFC_SHORT_MODE_ECC_SZ >> 3;
+ pages = mtd->writesize / 512;
+
+ scrambler = NFC_CMD_SCRAMBLER_ENABLE;
+ cmd = CMDRWGEN(DMA_DIR(dir), scrambler, NFC_ECC_BCH8_1K,
+ NFC_CMD_SHORTMODE_ENABLE, pagesize, pages);
+ } else {
+ pagesize = nand->ecc.size >> 3;
+ pages = len / nand->ecc.size;
- pages = len / nand->ecc.size;
+ cmd = CMDRWGEN(DMA_DIR(dir), scrambler, meson_chip->bch_mode,
+ NFC_CMD_SHORTMODE_DISABLE, pagesize, pages);
+ }
- cmd = CMDRWGEN(DMA_DIR(dir), scrambler, bch,
- NFC_CMD_SHORTMODE_DISABLE, pagesize, pages);
+ if (scrambler == NFC_CMD_SCRAMBLER_ENABLE)
+ meson_nfc_cmd_seed(nfc, page);
writel(cmd, nfc->reg_base + NFC_REG_CMD);
}
@@ -743,15 +769,7 @@ static int meson_nfc_write_page_sub(struct nand_chip *nand,
if (ret)
return ret;
- if (nand->options & NAND_NEED_SCRAMBLING) {
- meson_nfc_cmd_seed(nfc, page);
- meson_nfc_cmd_access(nand, raw, DIRWRITE,
- NFC_CMD_SCRAMBLER_ENABLE);
- } else {
- meson_nfc_cmd_access(nand, raw, DIRWRITE,
- NFC_CMD_SCRAMBLER_DISABLE);
- }
-
+ meson_nfc_cmd_access(nand, raw, DIRWRITE, page);
cmd = nfc->param.chip_select | NFC_CMD_CLE | NAND_CMD_PAGEPROG;
writel(cmd, nfc->reg_base + NFC_REG_CMD);
meson_nfc_queue_rb(nand, PSEC_TO_MSEC(sdr->tPROG_max), false);
@@ -829,15 +847,7 @@ static int meson_nfc_read_page_sub(struct nand_chip *nand,
if (ret)
return ret;
- if (nand->options & NAND_NEED_SCRAMBLING) {
- meson_nfc_cmd_seed(nfc, page);
- meson_nfc_cmd_access(nand, raw, DIRREAD,
- NFC_CMD_SCRAMBLER_ENABLE);
- } else {
- meson_nfc_cmd_access(nand, raw, DIRREAD,
- NFC_CMD_SCRAMBLER_DISABLE);
- }
-
+ meson_nfc_cmd_access(nand, raw, DIRREAD, page);
ret = meson_nfc_wait_dma_finish(nfc);
meson_nfc_check_ecc_pages_valid(nfc, nand, raw);
@@ -1436,6 +1446,26 @@ meson_nfc_nand_chip_init(struct device *dev,
if (ret)
return ret;
+ if (nand->options & NAND_IS_BOOT_MEDIUM) {
+ ret = of_property_read_u32(np, "meson,boot-page-last",
+ &meson_chip->boot_page_last);
+ if (ret) {
+ dev_err(dev, "could not retrieve 'meson,boot-page-last' property: %d",
+ ret);
+ nand_cleanup(nand);
+ return ret;
+ }
+
+ ret = of_property_read_u32(np, "meson,boot-page-step",
+ &meson_chip->boot_page_step);
+ if (ret) {
+ dev_err(dev, "could not retrieve 'meson,boot-page-step' property: %d",
+ ret);
+ nand_cleanup(nand);
+ return ret;
+ }
+ }
+
ret = mtd_device_register(mtd, NULL, 0);
if (ret) {
dev_err(dev, "failed to register MTD device: %d\n", ret);
--
2.35.0
^ permalink raw reply related
* [PATCH v1 0/2] Meson: R/W support for pages used by boot ROM
From: Arseniy Krasnov @ 2024-04-02 20:27 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl
Cc: linux-mtd, devicetree, linux-arm-kernel, linux-amlogic,
linux-kernel, oxffffaa, kernel, Arseniy Krasnov
Amlogic's boot ROM code needs that some pages on NAND must be written
in special "short" ECC mode with scrambling enabled. Such pages:
1) Contain some metadata about hardware.
2) Located with some interval starting from 0 offset, until some
specified offset. Interval and second offset are set in the
device tree.
This patchset adds R/W support for such pages. To enable it we can setup
it in dts:
nand-is-boot-medium;
meson,boot-page-last = <1024>;
meson,boot-page-step = <128>;
It means that each 128th page in range 0 to 1024 pages will be accessed
in special mode ("short" ECC + scrambling). In practice this feature is
needed when we want to update first block of NAND - driver will enable
required mode by itself using value from device tree.
Arseniy Krasnov (2):
dt-bindings: mtd: amlogic,meson-nand: support fields for boot ROM code
mtd: rawnand: meson: support R/W mode for boot ROM
.../bindings/mtd/amlogic,meson-nand.yaml | 16 ++++
drivers/mtd/nand/raw/meson_nand.c | 88 +++++++++++++------
2 files changed, 75 insertions(+), 29 deletions(-)
--
2.35.0
^ permalink raw reply
* Re: [PATCH v2 0/3] dt-bindings: arm: bcm: raspberrypi,bcm2835-firmware: Drive-by fixes
From: Laurent Pinchart @ 2024-04-02 20:32 UTC (permalink / raw)
To: Florian Fainelli
Cc: Stefan Wahren, Ivan T. Ivanov, Peter Robinson, Dave Stevenson,
Naushir Patuck, Bartosz Golaszewski,
Broadcom internal kernel review list, Conor Dooley,
Florian Fainelli, Krzysztof Kozlowski, Linus Walleij,
Nicolas Saenz Julienne, Ray Jui, Rob Herring, Scott Branden,
linux-arm-kernel, devicetree, linux-rpi-kernel, u-boot
In-Reply-To: <8a64376d-f624-44c8-91bb-f6a95dc1c945@gmail.com>
Hi Florian,
On Tue, Apr 02, 2024 at 01:18:35PM -0700, Florian Fainelli wrote:
> On 4/2/24 13:08, Laurent Pinchart wrote:
> > On Tue, Apr 02, 2024 at 09:52:06PM +0200, Stefan Wahren wrote:
> >> Am 02.04.24 um 10:58 schrieb Ivan T. Ivanov:
> >>> On 2024-03-28 01:37, Laurent Pinchart wrote:
> >>>> On Wed, Mar 27, 2024 at 07:49:38AM +0100, Stefan Wahren wrote:
> >>>>> Hi,
> >>>>>
> >>>>> [add Peter and Ivan]
> >>>>>
> >>>>> Am 26.03.24 um 20:58 schrieb Laurent Pinchart:
> >>>>>> Hello,
> >>>>>>
> >>>>>> This small series includes a few drive-by fixes for DT validation
> >>>>>> errors.
> >>>>>>
> >>>>>> The first patch has been posted previously in v1 ([1], and now addresses
> >>>>>> a small review comment. I think it's good to go.
> >>>>>>
> >>>>>> The next two patches address the same issue as "[PATCH 1/2] dt-bindings:
> >>>>>> arm: bcm: raspberrypi,bcm2835-firmware: Add missing properties" ([2]),
> >>>>>> but this time with a (hopefully) correct approach. Patch 2/3 starts by
> >>>>>> fixing the raspberrypi-bcm2835-firmware driver, removing the need for DT
> >>>>>> properties that are specified in bcm2835-rpi.dtsi but not documented in
> >>>>>> the corresponding bindings. Patch 3/3 can then drop those properties,
> >>>>>> getting rid of the warnings.
> >>>>>
> >>>>> since this series drops properties from the device tree, does anyone
> >>>>> have the chance to test it with a recent U-Boot?
> >>>>
> >>>> I don't have U-Boot running with my RPi, so I would appreciate if
> >>>> someone could help :-)
> >>>
> >>> Sorry for taking me so long to verify this.
> >>>
> >>> I think on RPi U-Boot side we are fine. API used when accessing Mbox
> >>> device do not follow DM model and do not use DMA, but just access
> >>> device directly using this nice macros phys_to_bus/bus_to_phys.
> >>>
> >>> I build new DTB files with this patch included and U-Boot build
> >>> from the latest sources. No obvious issues on RPi3 and RPi4.
> >>> Devices boot fine.
> >
> > Thank you for testing Ivan.
> >
> >> Thanks you, Laurent and Ivan
> >>
> >> Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
> >
> > Stefan, I'm quite unfamiliar with the Raspberry Pi upstreaming process
> > (despite having sent patches for ages :-)), do I understand correctly
> > that this patch will go through your tree, or do I need to work with
> > someone else to get it merged upstream ?
>
> I will be taking those via the Broadcom SoC tree.
Thank you.
If there's a chance to include patches 05/10, 07/10, 08/10 and 09/10
from [1] at the same time, that would be great :-)
[1] https://lore.kernel.org/linux-media/20240402000424.4650-1-laurent.pinchart@ideasonboard.com
--
Regards,
Laurent Pinchart
^ permalink raw reply
* [PATCH] dt-bindings: mfd: syscon: Add missing simple syscon compatibles
From: Rob Herring @ 2024-04-02 20:24 UTC (permalink / raw)
To: Krzysztof Kozlowski, Conor Dooley, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Lee Jones, Ray Jui, Scott Branden,
Broadcom internal kernel review list, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek
Add various "simple" syscon compatibles which were undocumented or
still documented with old text bindings.
apm,xgene-csw, apm,xgene-efuse, apm,xgene-mcb, apm,xgene-rb,
fsl,ls1088a-reset, marvell,armada-3700-cpu-misc,
mediatek,mt2712-pctl-a-syscfg, mediatek,mt6397-pctl-pmic-syscfg, and
mediatek,mt8173-pctl-a-syscfg were all undocumented, but are in use
already. Remove the old text binding docs for the others.
Signed-off-by: Rob Herring <robh@kernel.org>
---
.../arm/altera/socfpga-sdram-controller.txt | 12 -------
.../devicetree/bindings/arm/apm/scu.txt | 17 ----------
.../bindings/arm/marvell/armada-37xx.txt | 32 -------------------
.../bindings/mfd/brcm,iproc-cdru.txt | 16 ----------
.../bindings/mfd/brcm,iproc-mhb.txt | 18 -----------
.../devicetree/bindings/mfd/syscon.yaml | 15 +++++++++
6 files changed, 15 insertions(+), 95 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/altera/socfpga-sdram-controller.txt
delete mode 100644 Documentation/devicetree/bindings/arm/apm/scu.txt
delete mode 100644 Documentation/devicetree/bindings/arm/marvell/armada-37xx.txt
delete mode 100644 Documentation/devicetree/bindings/mfd/brcm,iproc-cdru.txt
delete mode 100644 Documentation/devicetree/bindings/mfd/brcm,iproc-mhb.txt
diff --git a/Documentation/devicetree/bindings/arm/altera/socfpga-sdram-controller.txt b/Documentation/devicetree/bindings/arm/altera/socfpga-sdram-controller.txt
deleted file mode 100644
index 77ca635765e1..000000000000
--- a/Documentation/devicetree/bindings/arm/altera/socfpga-sdram-controller.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Altera SOCFPGA SDRAM Controller
-
-Required properties:
-- compatible : Should contain "altr,sdr-ctl" and "syscon".
- syscon is required by the Altera SOCFPGA SDRAM EDAC.
-- reg : Should contain 1 register range (address and length)
-
-Example:
- sdr: sdr@ffc25000 {
- compatible = "altr,sdr-ctl", "syscon";
- reg = <0xffc25000 0x1000>;
- };
diff --git a/Documentation/devicetree/bindings/arm/apm/scu.txt b/Documentation/devicetree/bindings/arm/apm/scu.txt
deleted file mode 100644
index b45be06625fd..000000000000
--- a/Documentation/devicetree/bindings/arm/apm/scu.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-APM X-GENE SoC series SCU Registers
-
-This system clock unit contain various register that control block resets,
-clock enable/disables, clock divisors and other deepsleep registers.
-
-Properties:
- - compatible : should contain two values. First value must be:
- - "apm,xgene-scu"
- second value must be always "syscon".
-
- - reg : offset and length of the register set.
-
-Example :
- scu: system-clk-controller@17000000 {
- compatible = "apm,xgene-scu","syscon";
- reg = <0x0 0x17000000 0x0 0x400>;
- };
diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.txt b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.txt
deleted file mode 100644
index 29fa93dad52b..000000000000
--- a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-Power management
-----------------
-
-For power management (particularly DVFS and AVS), the North Bridge
-Power Management component is needed:
-
-Required properties:
-- compatible : should contain "marvell,armada-3700-nb-pm", "syscon";
-- reg : the register start and length for the North Bridge
- Power Management
-
-Example:
-
-nb_pm: syscon@14000 {
- compatible = "marvell,armada-3700-nb-pm", "syscon";
- reg = <0x14000 0x60>;
-}
-
-AVS
----
-
-For AVS an other component is needed:
-
-Required properties:
-- compatible : should contain "marvell,armada-3700-avs", "syscon";
-- reg : the register start and length for the AVS
-
-Example:
-avs: avs@11500 {
- compatible = "marvell,armada-3700-avs", "syscon";
- reg = <0x11500 0x40>;
-}
diff --git a/Documentation/devicetree/bindings/mfd/brcm,iproc-cdru.txt b/Documentation/devicetree/bindings/mfd/brcm,iproc-cdru.txt
deleted file mode 100644
index 82f82e069563..000000000000
--- a/Documentation/devicetree/bindings/mfd/brcm,iproc-cdru.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Broadcom iProc Chip Device Resource Unit (CDRU)
-
-Various Broadcom iProc SoCs have a set of registers that provide various
-chip specific device and resource configurations. This node allows access to
-these CDRU registers via syscon.
-
-Required properties:
-- compatible: should contain:
- "brcm,sr-cdru", "syscon" for Stingray
-- reg: base address and range of the CDRU registers
-
-Example:
- cdru: syscon@6641d000 {
- compatible = "brcm,sr-cdru", "syscon";
- reg = <0 0x6641d000 0 0x400>;
- };
diff --git a/Documentation/devicetree/bindings/mfd/brcm,iproc-mhb.txt b/Documentation/devicetree/bindings/mfd/brcm,iproc-mhb.txt
deleted file mode 100644
index 4421e9771b8a..000000000000
--- a/Documentation/devicetree/bindings/mfd/brcm,iproc-mhb.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-Broadcom iProc Multi Host Bridge (MHB)
-
-Certain Broadcom iProc SoCs have a multi host bridge (MHB) block that controls
-the connection and configuration of 1) internal PCIe serdes; 2) PCIe endpoint
-interface; 3) access to the Nitro (network processing) engine
-
-This node allows access to these MHB registers via syscon.
-
-Required properties:
-- compatible: should contain:
- "brcm,sr-mhb", "syscon" for Stingray
-- reg: base address and range of the MHB registers
-
-Example:
- mhb: syscon@60401000 {
- compatible = "brcm,sr-mhb", "syscon";
- reg = <0 0x60401000 0 0x38c>;
- };
diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index 9d55bee155ce..0327e779e327 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -38,11 +38,20 @@ properties:
- allwinner,sun8i-h3-system-controller
- allwinner,sun8i-v3s-system-controller
- allwinner,sun50i-a64-system-controller
+ - altr,sdr-ctl
- amd,pensando-elba-syscon
+ - apm,xgene-csw
+ - apm,xgene-efuse
+ - apm,xgene-mcb
+ - apm,xgene-rb
+ - apm,xgene-scu
- brcm,cru-clkset
+ - brcm,sr-cdru
+ - brcm,sr-mhb
- freecom,fsg-cs2-system-controller
- fsl,imx93-aonmix-ns-syscfg
- fsl,imx93-wakeupmix-syscfg
+ - fsl,ls1088a-reset
- hisilicon,dsa-subctrl
- hisilicon,hi6220-sramctrl
- hisilicon,pcie-sas-subctrl
@@ -51,9 +60,15 @@ properties:
- intel,lgm-syscon
- loongson,ls1b-syscon
- loongson,ls1c-syscon
+ - marvell,armada-3700-cpu-misc
+ - marvell,armada-3700-nb-pm
+ - marvell,armada-3700-avs
- marvell,armada-3700-usb2-host-misc
+ - mediatek,mt2712-pctl-a-syscfg
+ - mediatek,mt6397-pctl-pmic-syscfg
- mediatek,mt8135-pctl-a-syscfg
- mediatek,mt8135-pctl-b-syscfg
+ - mediatek,mt8173-pctl-a-syscfg
- mediatek,mt8365-syscfg
- microchip,lan966x-cpu-syscon
- microchip,sparx5-cpu-syscon
--
2.43.0
^ permalink raw reply related
* Re: [PATCH v2 0/3] dt-bindings: arm: bcm: raspberrypi,bcm2835-firmware: Drive-by fixes
From: Florian Fainelli @ 2024-04-02 20:22 UTC (permalink / raw)
To: Ivan T. Ivanov, Laurent Pinchart
Cc: Stefan Wahren, Peter Robinson, Dave Stevenson, Naushir Patuck,
Bartosz Golaszewski, Broadcom internal kernel review list,
Conor Dooley, Krzysztof Kozlowski, Linus Walleij,
Nicolas Saenz Julienne, Ray Jui, Rob Herring, Scott Branden,
linux-arm-kernel, devicetree, linux-rpi-kernel, u-boot
In-Reply-To: <bcf8093ab0ea6f3738bf4a4623de700a@suse.de>
On 4/2/24 01:58, Ivan T. Ivanov wrote:
>
> Hi,
>
> On 2024-03-28 01:37, Laurent Pinchart wrote:
>> On Wed, Mar 27, 2024 at 07:49:38AM +0100, Stefan Wahren wrote:
>>> Hi,
>>>
>>> [add Peter and Ivan]
>>>
>>> Am 26.03.24 um 20:58 schrieb Laurent Pinchart:
>>> > Hello,
>>> >
>>> > This small series includes a few drive-by fixes for DT validation
>>> > errors.
>>> >
>>> > The first patch has been posted previously in v1 ([1], and now
>>> addresses
>>> > a small review comment. I think it's good to go.
>>> >
>>> > The next two patches address the same issue as "[PATCH 1/2]
>>> dt-bindings:
>>> > arm: bcm: raspberrypi,bcm2835-firmware: Add missing properties" ([2]),
>>> > but this time with a (hopefully) correct approach. Patch 2/3 starts by
>>> > fixing the raspberrypi-bcm2835-firmware driver, removing the need
>>> for DT
>>> > properties that are specified in bcm2835-rpi.dtsi but not
>>> documented in
>>> > the corresponding bindings. Patch 3/3 can then drop those properties,
>>> > getting rid of the warnings.
>>>
>>> since this series drops properties from the device tree, does anyone
>>> have the chance to test it with a recent U-Boot?
>>
>> I don't have U-Boot running with my RPi, so I would appreciate if
>> someone could help :-)
>
> Sorry for taking me so long to verify this.
>
> I think on RPi U-Boot side we are fine. API used when accessing Mbox
> device do not follow DM model and do not use DMA, but just access
> device directly using this nice macros phys_to_bus/bus_to_phys.
>
> I build new DTB files with this patch included and U-Boot build
> from the latest sources. No obvious issues on RPi3 and RPi4.
> Devices boot fine.
Can I add this as a Tested-by tag from you while applying then?
--
Florian
^ permalink raw reply
* Re: [PATCH v2 0/3] dt-bindings: arm: bcm: raspberrypi,bcm2835-firmware: Drive-by fixes
From: Stefan Wahren @ 2024-04-02 20:22 UTC (permalink / raw)
To: Laurent Pinchart, Florian Fainelli
Cc: Ivan T. Ivanov, Peter Robinson, Dave Stevenson, Naushir Patuck,
Bartosz Golaszewski, Broadcom internal kernel review list,
Conor Dooley, Krzysztof Kozlowski, Linus Walleij,
Nicolas Saenz Julienne, Ray Jui, Rob Herring, Scott Branden,
linux-arm-kernel, devicetree, linux-rpi-kernel, u-boot
In-Reply-To: <20240402200855.GA32172@pendragon.ideasonboard.com>
Hi Laurent,
Am 02.04.24 um 22:08 schrieb Laurent Pinchart:
> Hello,
>
...
> Stefan, I'm quite unfamiliar with the Raspberry Pi upstreaming process
> (despite having sent patches for ages :-)), do I understand correctly
> that this patch will go through your tree, or do I need to work with
> someone else to get it merged upstream ?
>
i'm not the maintainer, but i'm trying to help. Florian is the
maintainer, so i would expect this series goes through his tree. So
MAINTAINERS file is correct here.
^ permalink raw reply
* Re: [PATCH v2 0/3] dt-bindings: arm: bcm: raspberrypi,bcm2835-firmware: Drive-by fixes
From: Florian Fainelli @ 2024-04-02 20:18 UTC (permalink / raw)
To: Laurent Pinchart, Stefan Wahren
Cc: Ivan T. Ivanov, Peter Robinson, Dave Stevenson, Naushir Patuck,
Bartosz Golaszewski, Broadcom internal kernel review list,
Conor Dooley, Florian Fainelli, Krzysztof Kozlowski,
Linus Walleij, Nicolas Saenz Julienne, Ray Jui, Rob Herring,
Scott Branden, linux-arm-kernel, devicetree, linux-rpi-kernel,
u-boot
In-Reply-To: <20240402200855.GA32172@pendragon.ideasonboard.com>
On 4/2/24 13:08, Laurent Pinchart wrote:
> Hello,
>
> On Tue, Apr 02, 2024 at 09:52:06PM +0200, Stefan Wahren wrote:
>> Am 02.04.24 um 10:58 schrieb Ivan T. Ivanov:
>>> On 2024-03-28 01:37, Laurent Pinchart wrote:
>>>> On Wed, Mar 27, 2024 at 07:49:38AM +0100, Stefan Wahren wrote:
>>>>> Hi,
>>>>>
>>>>> [add Peter and Ivan]
>>>>>
>>>>> Am 26.03.24 um 20:58 schrieb Laurent Pinchart:
>>>>>> Hello,
>>>>>>
>>>>>> This small series includes a few drive-by fixes for DT validation
>>>>>> errors.
>>>>>>
>>>>>> The first patch has been posted previously in v1 ([1], and now addresses
>>>>>> a small review comment. I think it's good to go.
>>>>>>
>>>>>> The next two patches address the same issue as "[PATCH 1/2] dt-bindings:
>>>>>> arm: bcm: raspberrypi,bcm2835-firmware: Add missing properties" ([2]),
>>>>>> but this time with a (hopefully) correct approach. Patch 2/3 starts by
>>>>>> fixing the raspberrypi-bcm2835-firmware driver, removing the need for DT
>>>>>> properties that are specified in bcm2835-rpi.dtsi but not documented in
>>>>>> the corresponding bindings. Patch 3/3 can then drop those properties,
>>>>>> getting rid of the warnings.
>>>>>
>>>>> since this series drops properties from the device tree, does anyone
>>>>> have the chance to test it with a recent U-Boot?
>>>>
>>>> I don't have U-Boot running with my RPi, so I would appreciate if
>>>> someone could help :-)
>>>
>>> Sorry for taking me so long to verify this.
>>>
>>> I think on RPi U-Boot side we are fine. API used when accessing Mbox
>>> device do not follow DM model and do not use DMA, but just access
>>> device directly using this nice macros phys_to_bus/bus_to_phys.
>>>
>>> I build new DTB files with this patch included and U-Boot build
>>> from the latest sources. No obvious issues on RPi3 and RPi4.
>>> Devices boot fine.
>
> Thank you for testing Ivan.
>
>> Thanks you, Laurent and Ivan
>>
>> Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
>
> Stefan, I'm quite unfamiliar with the Raspberry Pi upstreaming process
> (despite having sent patches for ages :-)), do I understand correctly
> that this patch will go through your tree, or do I need to work with
> someone else to get it merged upstream ?
I will be taking those via the Broadcom SoC tree.
--
Florian
^ permalink raw reply
* Re: [PATCH 3/3] arm64: dts: marvell: espressobin-ultra: fix Ethernet Switch unit address
From: Krzysztof Kozlowski @ 2024-04-02 20:11 UTC (permalink / raw)
To: Andrew Lunn
Cc: Robert Marko, Gregory Clement, Sebastian Hesselbarth, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
In-Reply-To: <09201a97-7e7b-4d72-8ada-f58f85887349@lunn.ch>
On 02/04/2024 21:27, Andrew Lunn wrote:
> On Tue, Apr 02, 2024 at 08:32:40PM +0200, Krzysztof Kozlowski wrote:
>> The Espressobin Ultra DTS includes Espressobin DTSI which defines
>> ethernet-switch@1 node. The Ultra DTS overrides "reg" to 3, but that
>> leaves still old unit address which conflicts with the new phy@1 node
>> (W=1 dtc warning):
>>
>> armada-3720-espressobin.dtsi:148.29-203.4: Warning (unique_unit_address_if_enabled): /soc/internal-regs@d0000000/mdio@32004/ethernet-switch@1: duplicate unit-address (also used in node /soc/internal-regs@d0000000/mdio@32004/ethernet-phy@1)
>>
>> Fix this by deleting ethernet-switch@1 node and merging original node
>> with code from Ultra DTS into new ethernet-switch@3.
>
> That is a bit ugly, having the exact same code twice.
>
> Could the bulk of the switch node be put into a .dtsi file, and then
> included as needed
There are several overrides/new nodes in espresso ultra, so this is not
the same code.
>
> &mdio {
> switch0: ethernet-switch@1 {
> reg = <1>;
> include "armada-3720-espressobin-switch.dtsi"
And this DTSI would be with what? No device node? That's not readable.
>
> }
> }
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH v2 0/3] dt-bindings: arm: bcm: raspberrypi,bcm2835-firmware: Drive-by fixes
From: Laurent Pinchart @ 2024-04-02 20:08 UTC (permalink / raw)
To: Stefan Wahren
Cc: Ivan T. Ivanov, Peter Robinson, Dave Stevenson, Naushir Patuck,
Bartosz Golaszewski, Broadcom internal kernel review list,
Conor Dooley, Florian Fainelli, Krzysztof Kozlowski,
Linus Walleij, Nicolas Saenz Julienne, Ray Jui, Rob Herring,
Scott Branden, linux-arm-kernel, devicetree, linux-rpi-kernel,
u-boot
In-Reply-To: <2e15ab46-f29c-44ac-8a2a-8baa140ee1a3@gmx.net>
Hello,
On Tue, Apr 02, 2024 at 09:52:06PM +0200, Stefan Wahren wrote:
> Am 02.04.24 um 10:58 schrieb Ivan T. Ivanov:
> > On 2024-03-28 01:37, Laurent Pinchart wrote:
> >> On Wed, Mar 27, 2024 at 07:49:38AM +0100, Stefan Wahren wrote:
> >>> Hi,
> >>>
> >>> [add Peter and Ivan]
> >>>
> >>> Am 26.03.24 um 20:58 schrieb Laurent Pinchart:
> >>> > Hello,
> >>> >
> >>> > This small series includes a few drive-by fixes for DT validation
> >>> > errors.
> >>> >
> >>> > The first patch has been posted previously in v1 ([1], and now addresses
> >>> > a small review comment. I think it's good to go.
> >>> >
> >>> > The next two patches address the same issue as "[PATCH 1/2] dt-bindings:
> >>> > arm: bcm: raspberrypi,bcm2835-firmware: Add missing properties" ([2]),
> >>> > but this time with a (hopefully) correct approach. Patch 2/3 starts by
> >>> > fixing the raspberrypi-bcm2835-firmware driver, removing the need for DT
> >>> > properties that are specified in bcm2835-rpi.dtsi but not documented in
> >>> > the corresponding bindings. Patch 3/3 can then drop those properties,
> >>> > getting rid of the warnings.
> >>>
> >>> since this series drops properties from the device tree, does anyone
> >>> have the chance to test it with a recent U-Boot?
> >>
> >> I don't have U-Boot running with my RPi, so I would appreciate if
> >> someone could help :-)
> >
> > Sorry for taking me so long to verify this.
> >
> > I think on RPi U-Boot side we are fine. API used when accessing Mbox
> > device do not follow DM model and do not use DMA, but just access
> > device directly using this nice macros phys_to_bus/bus_to_phys.
> >
> > I build new DTB files with this patch included and U-Boot build
> > from the latest sources. No obvious issues on RPi3 and RPi4.
> > Devices boot fine.
Thank you for testing Ivan.
> Thanks you, Laurent and Ivan
>
> Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Stefan, I'm quite unfamiliar with the Raspberry Pi upstreaming process
(despite having sent patches for ages :-)), do I understand correctly
that this patch will go through your tree, or do I need to work with
someone else to get it merged upstream ?
--
Regards,
Laurent Pinchart
^ permalink raw reply
* [PATCH 2/2] arm64: dts: apm: shadowcat: move non-MMIO node out of soc
From: Krzysztof Kozlowski @ 2024-04-02 20:08 UTC (permalink / raw)
To: Khuong Dinh, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree, linux-kernel
Cc: Krzysztof Kozlowski
In-Reply-To: <20240402200818.79446-1-krzk@kernel.org>
Non-MMIO devices, like fixed-clocks, should not be within simple-bus.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi b/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi
index 65ebac3082e2..ea5721ea02f0 100644
--- a/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi
+++ b/arch/arm64/boot/dts/apm/apm-shadowcat.dtsi
@@ -211,6 +211,13 @@ v2m15: v2m@f0000 {
};
};
+ refclk: refclk {
+ compatible = "fixed-clock";
+ #clock-cells = <1>;
+ clock-frequency = <100000000>;
+ clock-output-names = "refclk";
+ };
+
pmu {
compatible = "arm,armv8-pmuv3";
interrupts = <1 12 0xff04>;
@@ -236,13 +243,6 @@ clocks {
#size-cells = <2>;
ranges;
- refclk: refclk {
- compatible = "fixed-clock";
- #clock-cells = <1>;
- clock-frequency = <100000000>;
- clock-output-names = "refclk";
- };
-
pmdpll: pmdpll@170000f0 {
compatible = "apm,xgene-pcppll-v2-clock";
#clock-cells = <1>;
--
2.34.1
^ permalink raw reply related
* [PATCH 1/2] arm64: dts: apm: storm: move non-MMIO node out of soc
From: Krzysztof Kozlowski @ 2024-04-02 20:08 UTC (permalink / raw)
To: Khuong Dinh, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree, linux-kernel
Cc: Krzysztof Kozlowski
Non-MMIO devices, like fixed-clocks, should not be within simple-bus.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm64/boot/dts/apm/apm-storm.dtsi | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/apm/apm-storm.dtsi b/arch/arm64/boot/dts/apm/apm-storm.dtsi
index 988928c60f15..633d8418f7cc 100644
--- a/arch/arm64/boot/dts/apm/apm-storm.dtsi
+++ b/arch/arm64/boot/dts/apm/apm-storm.dtsi
@@ -112,6 +112,13 @@ gic: interrupt-controller@78010000 {
interrupts = <1 9 0xf04>; /* GIC Maintenence IRQ */
};
+ refclk: refclk {
+ compatible = "fixed-clock";
+ #clock-cells = <1>;
+ clock-frequency = <100000000>;
+ clock-output-names = "refclk";
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <1 0 0xff08>, /* Secure Phys IRQ */
@@ -137,12 +144,6 @@ clocks {
#address-cells = <2>;
#size-cells = <2>;
ranges;
- refclk: refclk {
- compatible = "fixed-clock";
- #clock-cells = <1>;
- clock-frequency = <100000000>;
- clock-output-names = "refclk";
- };
pcppll: pcppll@17000100 {
compatible = "apm,xgene-pcppll-clock";
--
2.34.1
^ permalink raw reply related
* [PATCH 5/5] arm64: dts: amazon: alpine-v3: correct gic unit addresses
From: Krzysztof Kozlowski @ 2024-04-02 20:07 UTC (permalink / raw)
To: Tsahee Zidenberg, Antoine Tenart, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
Cc: Krzysztof Kozlowski
In-Reply-To: <20240402200744.79349-1-krzk@kernel.org>
Correct gic unit addresses to fix dtc W=1 warnings:
alpine-v3.dtsi:321.38-331.5: Warning (simple_bus_reg): /soc/interrupt-controller@f0000000: simple-bus unit address format error, expected "f0800000"
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm64/boot/dts/amazon/alpine-v3.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amazon/alpine-v3.dtsi b/arch/arm64/boot/dts/amazon/alpine-v3.dtsi
index 3099fdfa9520..8b6156b5af65 100644
--- a/arch/arm64/boot/dts/amazon/alpine-v3.dtsi
+++ b/arch/arm64/boot/dts/amazon/alpine-v3.dtsi
@@ -318,7 +318,7 @@ soc {
#size-cells = <2>;
ranges;
- gic: interrupt-controller@f0000000 {
+ gic: interrupt-controller@f0800000 {
compatible = "arm,gic-v3";
#interrupt-cells = <3>;
interrupt-controller;
--
2.34.1
^ permalink raw reply related
* [PATCH 4/5] arm64: dts: amazon: alpine-v3: drop cache nodes unit addresses
From: Krzysztof Kozlowski @ 2024-04-02 20:07 UTC (permalink / raw)
To: Tsahee Zidenberg, Antoine Tenart, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
Cc: Krzysztof Kozlowski
In-Reply-To: <20240402200744.79349-1-krzk@kernel.org>
Cache device nodes within cpus do not have "reg" property, so should not
have unit address, as reported by dtc W=1 warnings:
alpine-v3.dtsi:247.24-254.5: Warning (unit_address_vs_reg): /cpus/cache@0: node has a unit name, but no reg or ranges property
alpine-v3.dtsi:256.26-263.5: Warning (unit_address_vs_reg): /cpus/cache@100: node has a unit name, but no reg or ranges property
alpine-v3.dtsi:265.26-272.5: Warning (unit_address_vs_reg): /cpus/cache@200: node has a unit name, but no reg or ranges property
alpine-v3.dtsi:274.26-281.5: Warning (unit_address_vs_reg): /cpus/cache@300: node has a unit name, but no reg or ranges property
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm64/boot/dts/amazon/alpine-v3.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/amazon/alpine-v3.dtsi b/arch/arm64/boot/dts/amazon/alpine-v3.dtsi
index 0ab40741f697..3099fdfa9520 100644
--- a/arch/arm64/boot/dts/amazon/alpine-v3.dtsi
+++ b/arch/arm64/boot/dts/amazon/alpine-v3.dtsi
@@ -244,7 +244,7 @@ cpu@303 {
next-level-cache = <&cluster3_l2>;
};
- cluster0_l2: cache@0 {
+ cluster0_l2: cache-0 {
compatible = "cache";
cache-size = <0x200000>;
cache-line-size = <64>;
@@ -253,7 +253,7 @@ cluster0_l2: cache@0 {
cache-unified;
};
- cluster1_l2: cache@100 {
+ cluster1_l2: cache-100 {
compatible = "cache";
cache-size = <0x200000>;
cache-line-size = <64>;
@@ -262,7 +262,7 @@ cluster1_l2: cache@100 {
cache-unified;
};
- cluster2_l2: cache@200 {
+ cluster2_l2: cache-200 {
compatible = "cache";
cache-size = <0x200000>;
cache-line-size = <64>;
@@ -271,7 +271,7 @@ cluster2_l2: cache@200 {
cache-unified;
};
- cluster3_l2: cache@300 {
+ cluster3_l2: cache-300 {
compatible = "cache";
cache-size = <0x200000>;
cache-line-size = <64>;
--
2.34.1
^ permalink raw reply related
* [PATCH 3/5] arm64: dts: amazon: alpine-v3: add missing io-fabric unit addresses
From: Krzysztof Kozlowski @ 2024-04-02 20:07 UTC (permalink / raw)
To: Tsahee Zidenberg, Antoine Tenart, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
Cc: Krzysztof Kozlowski
In-Reply-To: <20240402200744.79349-1-krzk@kernel.org>
Add io-fabric unit address, because it has ranges property. This also
fixes dtc W=1 warnings:
alpine-v2.dtsi:153.13-229.5: Warning (simple_bus_reg): /soc/io-fabric: simple-bus unit address format error, expected "fc000000"
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm64/boot/dts/amazon/alpine-v3.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amazon/alpine-v3.dtsi b/arch/arm64/boot/dts/amazon/alpine-v3.dtsi
index 3ea178acdddf..0ab40741f697 100644
--- a/arch/arm64/boot/dts/amazon/alpine-v3.dtsi
+++ b/arch/arm64/boot/dts/amazon/alpine-v3.dtsi
@@ -361,7 +361,7 @@ msix: msix@fbe00000 {
interrupt-parent = <&gic>;
};
- io-fabric {
+ io-fabric@fc000000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
--
2.34.1
^ permalink raw reply related
* [PATCH 2/5] arm64: dts: amazon: alpine-v2: move non-MMIO node out of soc
From: Krzysztof Kozlowski @ 2024-04-02 20:07 UTC (permalink / raw)
To: Tsahee Zidenberg, Antoine Tenart, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
Cc: Krzysztof Kozlowski
In-Reply-To: <20240402200744.79349-1-krzk@kernel.org>
Non-MMIO devices should not be within simple-bus, as reported by dtc W=1
warning:
alpine-v2.dtsi:100.9-106.5: Warning (simple_bus_reg): /soc/timer: missing or empty reg/ranges property
alpine-v2.dtsi:108.7-114.5: Warning (simple_bus_reg): /soc/pmu: missing or empty reg/ranges property
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm64/boot/dts/amazon/alpine-v2.dtsi | 33 ++++++++++++-----------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/arch/arm64/boot/dts/amazon/alpine-v2.dtsi b/arch/arm64/boot/dts/amazon/alpine-v2.dtsi
index 32b6ac8a5352..5b6b58dd44cb 100644
--- a/arch/arm64/boot/dts/amazon/alpine-v2.dtsi
+++ b/arch/arm64/boot/dts/amazon/alpine-v2.dtsi
@@ -39,6 +39,7 @@
/ {
model = "Annapurna Labs Alpine v2";
compatible = "al,alpine-v2";
+ interrupt-parent = <&gic>;
#address-cells = <2>;
#size-cells = <2>;
@@ -89,6 +90,22 @@ sbclk: sbclk {
clock-frequency = <1000000>;
};
+ timer {
+ compatible = "arm,armv8-timer";
+ interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+ };
+
+ pmu {
+ compatible = "arm,armv8-pmuv3";
+ interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
soc {
compatible = "simple-bus";
#address-cells = <2>;
@@ -97,22 +114,6 @@ soc {
interrupt-parent = <&gic>;
ranges;
- timer {
- compatible = "arm,armv8-timer";
- interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
- <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
- <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
- <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
- };
-
- pmu {
- compatible = "arm,armv8-pmuv3";
- interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
- };
-
gic: interrupt-controller@f0200000 {
compatible = "arm,gic-v3";
reg = <0x0 0xf0200000 0x0 0x10000>, /* GIC Dist */
--
2.34.1
^ permalink raw reply related
* [PATCH 1/5] arm64: dts: amazon: alpine-v2: add missing io-fabric unit addresses
From: Krzysztof Kozlowski @ 2024-04-02 20:07 UTC (permalink / raw)
To: Tsahee Zidenberg, Antoine Tenart, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
Cc: Krzysztof Kozlowski
Add io-fabric unit address, because it has ranges property. This also
fixes dtc W=1 warnings:
alpine-v2.dtsi:153.13-229.5: Warning (simple_bus_reg): /soc/io-fabric: simple-bus unit address format error, expected "fc000000"
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm64/boot/dts/amazon/alpine-v2.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amazon/alpine-v2.dtsi b/arch/arm64/boot/dts/amazon/alpine-v2.dtsi
index dbf2dce8d1d6..32b6ac8a5352 100644
--- a/arch/arm64/boot/dts/amazon/alpine-v2.dtsi
+++ b/arch/arm64/boot/dts/amazon/alpine-v2.dtsi
@@ -150,7 +150,7 @@ msix: msix@fbe00000 {
al,msi-num-spis = <160>;
};
- io-fabric {
+ io-fabric@fc000000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
--
2.34.1
^ 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