Re: [PATCH 0/5] mtd: core: OTP nvmem provider support

2021-04-20 Thread Michael Walle
Hi Rob, Am 2021-04-20 16:08, schrieb Rob Herring: On Fri, Apr 16, 2021 at 09:26:03PM +0200, Michael Walle wrote: Am 2021-04-16 20:44, schrieb Rob Herring: > On Fri, Apr 16, 2021 at 01:49:23PM +0200, Michael Walle wrote: > > The goal is to fetch a (base) MAC address from the O

[PATCH net-next] net: enetc: automatically select IERB module

2021-04-20 Thread Michael Walle
: e7d48e5fbf30 ("net: enetc: add a mini driver for the Integrated Endpoint Register Block") Signed-off-by: Michael Walle --- drivers/net/ethernet/freescale/enetc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/enetc/Kconfig b/d

[PATCH net-next v2] net: phy: at803x: fix probe error if copper page is selected

2021-04-20 Thread Michael Walle
ard to see, that the parse_dt() actually enables the regulator. Thus move the regulator_enable() to the probe function and undo it in case of an error. Fixes: c329e5afb42f ("net: phy: at803x: select correct page on config init") Signed-off-by: Michael Walle --- Changes since v1: - take the bus lo

[PATCH net-next] net: phy: at803x: fix probe error if copper page is selected

2021-04-20 Thread Michael Walle
ard to see, that the parse_dt() actually enables the regulator. Thus move the regulator_enable() to the probe function and undo it in case of an error. Fixes: c329e5afb42f ("net: phy: at803x: select correct page on config init") Signed-off-by: Michael Walle --- drivers/net/phy/at803x.c | 21 +

Re: [PATCH 0/5] mtd: core: OTP nvmem provider support

2021-04-16 Thread Michael Walle
Hi Rob, Am 2021-04-16 20:44, schrieb Rob Herring: On Fri, Apr 16, 2021 at 01:49:23PM +0200, Michael Walle wrote: The goal is to fetch a (base) MAC address from the OTP region of a SPI NOR flash. This is the first part, where I try to add the nvmem provider support to the MTD core. I'm

[PATCH 5/5] mtd: core: add OTP nvmem provider support

2021-04-16 Thread Michael Walle
there are up to two different providers. Signed-off-by: Michael Walle --- Changes since RFC: - none drivers/mtd/mtdcore.c | 149 include/linux/mtd/mtd.h | 2 + 2 files changed, 151 insertions(+) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd

[PATCH 2/5] dt-bindings: mtd: add YAML schema for the generic MTD bindings

2021-04-16 Thread Michael Walle
Convert MTD's common.txt to mtd.yaml. Signed-off-by: Michael Walle Reviewed-by: Rob Herring --- Changes since RFC: - use real device compatibles .../devicetree/bindings/mtd/common.txt| 16 +--- .../devicetree/bindings/mtd/mtd.yaml | 39 +++ 2 files

[PATCH 4/5] dt-bindings: mtd: spi-nor: add otp property

2021-04-16 Thread Michael Walle
SPI-NOR flashes may have OTP regions and have a nvmem binding. This binding is described in mtd.yaml. Signed-off-by: Michael Walle --- Changes since RFC: - new patch Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH 3/5] dt-bindings: mtd: add OTP bindings

2021-04-16 Thread Michael Walle
Flash devices can have one-time-programmable regions. Add a nvmem binding so they can be used as a nvmem provider. Signed-off-by: Michael Walle --- Changes since RFC: - added missing "$" - dropped first example - use real device compatibles Please note, that this will lead t

[PATCH 1/5] nvmem: core: allow specifying of_node

2021-04-16 Thread Michael Walle
new config->of_node parameter, which if set, will be used instead of the parent's of_node. Signed-off-by: Michael Walle Acked-by: Srinivas Kandagatla --- Changes since RFC: - none drivers/nvmem/core.c | 4 +++- include/linux/nvmem-provider.h | 2 ++ 2 files changed, 5 insertions(+), 1 deleti

[PATCH 0/5] mtd: core: OTP nvmem provider support

2021-04-16 Thread Michael Walle
are just children of the parent node. (2) seem to be more natural, because there might also be other properties inside the otp subnode and might be more future-proof. At the moment this patch implements (1). Michael Walle (5): nvmem: core: allow specifying of_node dt-bindings: mtd: add YAML s

Re: [PATCH net-next v4 2/2] of: net: fix of_get_mac_addr_nvmem() for non-platform devices

2021-04-16 Thread Michael Walle
Am 2021-04-16 05:24, schrieb Benjamin Herrenschmidt: On Mon, 2021-04-12 at 19:47 +0200, Michael Walle wrote: /** * of_get_phy_mode - Get phy mode for given device_node @@ -59,15 +60,39 @@ static int of_get_mac_addr(struct device_node *np, const char *name, u8 *addr) static int

Re: [PATCH net-next 1/3] dt-bindings: net: add nvmem-mac-address-offset property

2021-04-15 Thread Michael Walle
Am 2021-04-15 23:59, schrieb Rob Herring: On Wed, Apr 14, 2021 at 05:43:49PM +0200, Andrew Lunn wrote: On Wed, Apr 14, 2021 at 05:26:55PM +0200, Michael Walle wrote: > It is already possible to read the MAC address via a NVMEM provider. But > there are boards, esp. with many ports, whic

[PATCH net-next 3/3] net: implement nvmem-mac-address-offset DT property

2021-04-14 Thread Michael Walle
The MAC address fetched by an NVMEM provider might have an offset to it. Add the support for it in nvmem_get_mac_address(). Signed-off-by: Michael Walle --- drivers/of/of_net.c | 4 net/ethernet/eth.c | 5 + 2 files changed, 9 insertions(+) diff --git a/drivers/of/of_net.c b/drivers

[PATCH net-next 1/3] dt-bindings: net: add nvmem-mac-address-offset property

2021-04-14 Thread Michael Walle
It is already possible to read the MAC address via a NVMEM provider. But there are boards, esp. with many ports, which only have a base MAC address stored. Thus we need to have a way to provide an offset per network device. Signed-off-by: Michael Walle --- .../devicetree/bindings/net/ethernet

[PATCH net-next 2/3] net: add helper eth_addr_add()

2021-04-14 Thread Michael Walle
Sometimes you need to add an offset to a base ethernet address. Add a helper for that. Signed-off-by: Michael Walle --- include/linux/etherdevice.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 330345b1be54

[PATCH net-next 0/3] net: add support for an offset of a nvmem provided MAC address

2021-04-14 Thread Michael Walle
Boards with multiple ethernet ports might store their MAC addresses not individually per port but just store one base MAC address. To get the MAC address of a specific network port we have to add an offset. This series adds a new device tree property "nvmem-mac-address-offset". Michae

[PATCH net-next] net: enetc: fetch MAC address from device tree

2021-04-14 Thread Michael Walle
for these, this is a no-op. Signed-off-by: Michael Walle --- .../net/ethernet/freescale/enetc/enetc_pf.c | 65 ++- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/ethernet/freescale/enetc/enetc_pf.c index f61fedf462e5

Re: [PATCH net-next v2 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-14 Thread Michael Walle
Hi Dan, Am 2021-04-14 07:33, schrieb Dan Carpenter: url: https://github.com/0day-ci/linux/commits/Michael-Walle/of-net-support-non-platform-devices-in-of_get_mac_address/20210406-234030 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git

Re: [PATCH] mtd: spi-nor: macronix: Add block protection support to mx25u6435f

2021-04-14 Thread Michael Walle
Hi, Am 2021-04-14 08:53, schrieb Ikjoon Jang: On Tue, Apr 13, 2021 at 8:26 PM Michael Walle wrote: Am 2021-04-13 14:02, schrieb Ikjoon Jang: > This patch adds block protection support to Macronix mx25u6432f and > mx25u6435f. Two different chips share the same JEDEC ID while only > m

[PATCH] rtc: fsl-ftm-alarm: add MODULE_TABLE()

2021-04-14 Thread Michael Walle
The module doesn't load automatically. Fix it by adding the missing MODULE_TABLE(). Fixes: 7b0b551dbc1e ("rtc: fsl-ftm-alarm: add FTM alarm driver") Signed-off-by: Michael Walle --- drivers/rtc/rtc-fsl-ftm-alarm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/rtc/r

[PATCH 2/2] arm64: dts: freescale: sl28: fix RGMII clock and voltage

2021-04-13 Thread Michael Walle
: add variant 1") Signed-off-by: Michael Walle --- .../arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-ko

[PATCH 1/2] arm64: dts: freescale: sl28: fix RGMII clock and voltage

2021-04-13 Thread Michael Walle
ntron sl28 support") Signed-off-by: Michael Walle --- .../boot/dts/freescale/fsl-ls1028a-kontron-sl28-var4.dts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var4.dts b/arch/arm64/boot/dts/freescale/fsl-ls102

[PATCH 0/2] arm64: dts: freescale: sl28: fix RGMII

2021-04-13 Thread Michael Walle
This fixes the RGMII on the sl28 boards. While the network port was actually working it is still out-of-spec. Please note, that this is split into two patches because each one fixes a different commit. Michael Walle (2): arm64: dts: freescale: sl28: fix RGMII clock and voltage arm64: dts

Re: [PATCH] mtd: spi-nor: macronix: Add block protection support to mx25u6435f

2021-04-13 Thread Michael Walle
Hi Ikjoon, Am 2021-04-13 14:02, schrieb Ikjoon Jang: This patch adds block protection support to Macronix mx25u6432f and mx25u6435f. Two different chips share the same JEDEC ID while only mx25u6423f support section protections. And two chips have slightly different definitions of BP bits than

[PATCH net-next v4 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-12 Thread Michael Walle
x ...+>@e) - {} - else + if (!(e)) {...} @@ expression x, y, z; @@ - x = of_get_mac_address(y, z); + of_get_mac_address(y, z); ... when != x All drivers, except drivers/net/ethernet/aeroflex/greth.c, were compile-time tested. Suggested-by: Andrew Lunn Signed-off-by: Michael Walle --- arch/arm/m

[PATCH net-next v4 2/2] of: net: fix of_get_mac_addr_nvmem() for non-platform devices

2021-04-12 Thread Michael Walle
complexes. Use the nvmem of_* binding to fetch the nvmem cells by a struct device_node. We still have to try to read the cell by device first because there might be a nvmem_cell_lookup associated with that device. Signed-off-by: Michael Walle --- drivers/of/of_net.c | 35

[PATCH net-next v4 0/2] of: net: support non-platform devices in of_get_mac_address()

2021-04-12 Thread Michael Walle
Carpenter - changed subject of patch 2/2, as suggested by Florian Fainelli changes since v2: - fixed of_get_mac_addr_nvmem() signature, which was accidentially fixed in patch 2/2 again changes since v1: - fixed stmmac_probe_config_dt() for !CONFIG_OF - added missing queue in patch subje

Re: [RFC PATCH 2/6] mtd: spi-nor: core: consolidate read op creation

2021-04-08 Thread Michael Walle
that returns a template of the read op. The callers can then fill in the details like address, data length, data buffer location. Signed-off-by: Pratyush Yadav Reviewed-by: Michael Walle

Re: [PATCH] mtd: add OTP (one-time-programmable) erase ioctl

2021-04-08 Thread Michael Walle
Hi Tudor, Am 2021-04-08 07:51, schrieb tudor.amba...@microchip.com: Would you please resend this patch, together with the mtd-utils and the SPI NOR patch in a single patch set? You'll help us all having all in a single place. This has already been picked-up:

[PATCH] mtd: spi-nor: implement OTP erase for Winbond and similar flashes

2021-04-07 Thread Michael Walle
Winbond flashes with OTP support provide a command to erase the OTP data. This might come in handy during development. This was tested with a Winbond W25Q32JW on a LS1028A SoC with the NXP FSPI controller. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/core.c| 4 +- drivers/mtd/spi

Re: [PATCH net-next v3 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-07 Thread Michael Walle
Am 2021-04-07 00:09, schrieb Michael Walle: [..] diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c index bc0a27de69d4..2d5d5e59aea5 100644 --- a/drivers/of/of_net.c +++ b/drivers/of/of_net.c @@ -45,42 +45,35 @@ int of_get_phy_mode(struct device_node *np, phy_interface_t *interface

[PATCH net-next v3 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-06 Thread Michael Walle
x ...+>@e) - {} - else + if (!(e)) {...} @@ expression x, y, z; @@ - x = of_get_mac_address(y, z); + of_get_mac_address(y, z); ... when != x All drivers, except drivers/net/ethernet/aeroflex/greth.c, were compile-time tested. Suggested-by: Andrew Lunn Signed-off-by: Michael Walle --- arch/arm/m

[PATCH net-next v3 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-06 Thread Michael Walle
complexes. Use the nvmem of_* binding to fetch the nvmem cells by a struct device_node. We still have to try to read the cell by device first because there might be a nvmem_cell_lookup associated with that device. Signed-off-by: Michael Walle --- Please note, that I've kept

[PATCH net-next v3 0/2] of: net: support non-platform devices in of_get_mac_address()

2021-04-06 Thread Michael Walle
led before of_get_mac_address(). No driver does it this way. changes since v2: - fixed of_get_mac_addr_nvmem() signature, which was accidentially fixed in patch 2/2 again changes since v1: - fixed stmmac_probe_config_dt() for !CONFIG_OF - added missing queue in patch subject Michael Walle (2):

[PATCH net-next v2 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-06 Thread Michael Walle
complexes. Use the nvmem of_* binding to fetch the nvmem cells by a struct device_node. We still have to try to read the cell by device first because there might be a nvmem_cell_lookup associated with that device. Signed-off-by: Michael Walle --- Please note, that I've kept

[PATCH net-next v2 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-06 Thread Michael Walle
x ...+>@e) - {} - else + if (!(e)) {...} @@ expression x, y, z; @@ - x = of_get_mac_address(y, z); + of_get_mac_address(y, z); ... when != x All drivers, except drivers/net/ethernet/aeroflex/greth.c, were compile-time tested. Suggested-by: Andrew Lunn Signed-off-by: Michael Walle --- arch/arm/m

[PATCH net-next v2 0/2] of: net: support non-platform devices in of_get_mac_address()

2021-04-06 Thread Michael Walle
led before of_get_mac_address(). No driver does it this way. changes since v1: - fixed stmmac_probe_config_dt() for !CONFIG_OF - added missing queue in patch subject Michael Walle (2): of: net: pass the dst buffer to of_get_mac_address() of: net: fix of_get_mac_addr_nvmem() for PCI and DSA no

Re: [PATCH 2/2] mtd: spi-nor: add initial sysfs support

2021-04-06 Thread Michael Walle
Hi, Am 2021-04-06 09:56, schrieb Vignesh Raghavendra: Hi, On 3/18/21 2:54 PM, Michael Walle wrote: Add support to show the name and JEDEC identifier as well as to dump the SFDP table. Not all flashes list their SFDP table contents in their datasheet. So having that is useful. It might also

[PATCH 2/2] of: net: fix of_get_mac_addr_nvmem() for PCI and DSA nodes

2021-04-05 Thread Michael Walle
complexes. Use the nvmem of_* binding to fetch the nvmem cells by a struct device_node. We still have to try to read the cell by device first because there might be a nvmem_cell_lookup associated with that device. Signed-off-by: Michael Walle --- Please note, that I've kept

[PATCH 1/2] of: net: pass the dst buffer to of_get_mac_address()

2021-04-05 Thread Michael Walle
x ...+>@e) - {} - else + if (!(e)) {...} @@ expression x, y, z; @@ - x = of_get_mac_address(y, z); + of_get_mac_address(y, z); ... when != x All drivers, except drivers/net/ethernet/aeroflex/greth.c, were compile-time tested. Suggested-by: Andrew Lunn Signed-off-by: Michael Walle --- arch/arm/m

[PATCH 0/2] of: net: support non-platform devices in of_get_mac_address()

2021-04-05 Thread Michael Walle
led before of_get_mac_address(). No driver does it this way. Michael Walle (2): of: of_net: pass the dst buffer to of_get_mac_address() of: net: fix of_get_mac_address_nvmem() for PCI and DSA nodes arch/arm/mach-mvebu/kirkwood.c| 3 +- arch/powerpc/sysdev/tsi108_dev.c

Re: [PATCH 1/2] mtd: spi-nor: sfdp: save a copy of the SFDP data

2021-04-05 Thread Michael Walle
Am 2021-04-05 17:42, schrieb tudor.amba...@microchip.com: On 4/5/21 6:07 PM, Michael Walle wrote: EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe Hi, Am 2021-04-05 15:11, schrieb tudor.amba...@microchip.com: On 3/18/21 11:24 AM, Michael Walle wrote

Re: [PATCH 1/2] mtd: spi-nor: sfdp: save a copy of the SFDP data

2021-04-05 Thread Michael Walle
Hi, Am 2021-04-05 15:11, schrieb tudor.amba...@microchip.com: On 3/18/21 11:24 AM, Michael Walle wrote: EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe Due to possible mode switching to 8D-8D-8D, it might not be possible to read the SFDP after

Re: next/master bisection: baseline.login on kontron-kbox-a-230-ls

2021-03-30 Thread Michael Walle
Hi Sahil, Am 2021-03-30 16:42, schrieb Sahil Malhotra: I tried the same on LS1028A-RDB board with 5.11 kernel and my submitted patch applied. Board booted up successfully: https://pastebin.com/15D91K5k I used OP-TEE from OP-TEE github repo: https://github.com/OP-TEE/optee_os with commit

Re: [RFC PATCH 3/4] dt-bindings: mtd: add OTP bindings

2021-03-30 Thread Michael Walle
Hi Rob, Am 2021-03-27 18:09, schrieb Rob Herring: +spi { +#address-cells = <1>; +#size-cells = <0>; + +flash@0 { +reg = <0>; +compatible = "some,flash"; Soon (in linux-next, but off by default) this will be a warning for undocumented

Re: [RFC PATCH 0/4] mtd: core: OTP nvmem provider support

2021-03-30 Thread Michael Walle
Hi Srinivas, Am 2021-03-30 11:42, schrieb Srinivas Kandagatla: On 22/03/2021 18:19, Michael Walle wrote: The goal is to fetch a (base) MAC address from the OTP region of a SPI NOR flash. This is the first part, where I try to add the nvmem provider support to the MTD core. I'm not sure

Re: [RFC PATCH 2/6] mtd: spi-nor: core: consolidate read op creation

2021-03-23 Thread Michael Walle
Am 2021-03-11 20:12, schrieb Pratyush Yadav: Currently the spi_mem_op to read from the flash is used in two places: spi_nor_create_read_dirmap() and spi_nor_spimem_read_data(). In a later commit this number will increase to three. Instead of repeating the same code thrice, add a function that

Re: [RFC PATCH 1/6] spi: spi-mem: Tell controller when device is ready for calibration

2021-03-23 Thread Michael Walle
Hi Pratyush, Am 2021-03-11 20:12, schrieb Pratyush Yadav: Some controllers like the Cadence OSPI controller need to perform a calibration sequence to operate at high clock speeds. This calibration should happen after the flash is fully initialized otherwise the calibration might happen in a

Re: [PATCH v2 1/2] mtd: spi-nor: sfdp: save a copy of the SFDP data

2021-03-23 Thread Michael Walle
Am 23. März 2021 18:37:17 MEZ schrieb Pratyush Yadav : >On 23/03/21 03:31PM, Michael Walle wrote: >> Due to possible mode switching to 8D-8D-8D, it might not be possible >to >> read the SFDP after the initial probe. To be able to dump the SFDP >via >> sysfs after

[PATCH 1/2] arm64: dts: ls1028a: move rtc alias to individual boards

2021-03-23 Thread Michael Walle
The aliases are board-specific and shouldn't be included in the common SoC dtsi. Move them over to the boards. Signed-off-by: Michael Walle --- arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts | 1 + arch/arm64/boot/dts

[PATCH 2/2] arm64: dts: fsl-ls1028a-kontron-sl28: add rtc0 alias

2021-03-23 Thread Michael Walle
For completeness, add the rtc0 alias. Signed-off-by: Michael Walle --- arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts b/arch/arm64/boot/dts/freescale/fsl

[PATCH v2 2/2] mtd: spi-nor: add initial sysfs support

2021-03-23 Thread Michael Walle
Add support to show the name and JEDEC identifier as well as to dump the SFDP table. Not all flashes list their SFDP table contents in their datasheet. So having that is useful. It might also be helpful in bug reports from users. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/Makefile

[PATCH v2 0/2] mtd: spi-nor: support dumping sfdp tables

2021-03-23 Thread Michael Walle
: jedec-id and name - change the file mode of the sfdp file from 0400 to 0444. There is no hardware access anymore. Michael Walle (2): mtd: spi-nor: sfdp: save a copy of the SFDP data mtd: spi-nor: add initial sysfs support drivers/mtd/spi-nor/Makefile | 2 +- drivers/mtd/spi-nor/core.c

[PATCH v2 1/2] mtd: spi-nor: sfdp: save a copy of the SFDP data

2021-03-23 Thread Michael Walle
Due to possible mode switching to 8D-8D-8D, it might not be possible to read the SFDP after the initial probe. To be able to dump the SFDP via sysfs afterwards, make a complete copy of it. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/core.h | 10 +++ drivers/mtd/spi-nor/sfdp.c

Re: [PATCH 1/2] mtd: spi-nor: sfdp: save a copy of the SFDP data

2021-03-22 Thread Michael Walle
Am 2021-03-22 19:42, schrieb Pratyush Yadav: On 22/03/21 04:32PM, Michael Walle wrote: Am 2021-03-22 15:21, schrieb Pratyush Yadav: > On 18/03/21 10:24AM, Michael Walle wrote: > > + > > + sfdp->num_dwords = DIV_ROUND_UP(sfdp_size, sizeof(*sfdp->dwords)); &

[RFC PATCH 4/4] mtd: core: add OTP nvmem provider support

2021-03-22 Thread Michael Walle
there are up to two different providers. Signed-off-by: Michael Walle --- drivers/mtd/mtdcore.c | 149 include/linux/mtd/mtd.h | 2 + 2 files changed, 151 insertions(+) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 432769caae04

[RFC PATCH 3/4] dt-bindings: mtd: add OTP bindings

2021-03-22 Thread Michael Walle
Flash devices can have one-time-programmable regions. Add a nvmem binding so they can be used as a nvmem provider. Signed-off-by: Michael Walle --- .../devicetree/bindings/mtd/mtd.yaml | 71 +++ 1 file changed, 71 insertions(+) diff --git a/Documentation/devicetree

[RFC PATCH 0/4] mtd: core: OTP nvmem provider support

2021-03-22 Thread Michael Walle
are just children of the parent node. (2) seem to be more natural, because there might also be other properties inside the otp subnode and might be more future-proof. At the moment this patch implements (1). Michael Walle (4): nvmem: core: allow specifying of_node dt-bindings: mtd: add YAML sc

[RFC PATCH 2/4] dt-bindings: mtd: add YAML schema for the generic MTD bindings

2021-03-22 Thread Michael Walle
Convert MTD's common.txt to mtd.yaml. Signed-off-by: Michael Walle --- Btw, I've asked Miquel if I can add it as the maintainer. .../devicetree/bindings/mtd/common.txt| 16 +--- .../devicetree/bindings/mtd/mtd.yaml | 39 +++ 2 files changed, 40 insertions

[RFC PATCH 1/4] nvmem: core: allow specifying of_node

2021-03-22 Thread Michael Walle
new config->of_node parameter, which if set, will be used instead of the parent's of_node. Signed-off-by: Michael Walle --- drivers/nvmem/core.c | 4 +++- include/linux/nvmem-provider.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/nvmem/core.c b/drivers/nvm

Re: [PATCH 1/2] mtd: spi-nor: sfdp: save a copy of the SFDP data

2021-03-22 Thread Michael Walle
Am 2021-03-22 16:32, schrieb Michael Walle: + + sfdp->num_dwords = DIV_ROUND_UP(sfdp_size, sizeof(*sfdp->dwords)); The SFDP spec says that Parameter Table Pointer should be DWORD aligned and Parameter Table length is specified in number of DWORDs. So, sfdp_size should

Re: [PATCH 1/2] mtd: spi-nor: sfdp: save a copy of the SFDP data

2021-03-22 Thread Michael Walle
Am 2021-03-22 15:21, schrieb Pratyush Yadav: On 18/03/21 10:24AM, Michael Walle wrote: Due to possible mode switching to 8D-8D-8D, it might not be possible to read the SFDP after the initial probe. To be able to dump the SFDP via sysfs afterwards, make a complete copy of it. Signed-off

Re: [PATCH 2/2] mtd: spi-nor: add initial sysfs support

2021-03-22 Thread Michael Walle
Hi Pratyush, Am 2021-03-22 15:43, schrieb Pratyush Yadav: I have not worked with sysfs much so only giving this patch a quick overview. On 18/03/21 10:24AM, Michael Walle wrote: Add support to show the name and JEDEC identifier as well as to dump the SFDP table. Not all flashes list

Re: [PATCH] arm64: dts: ls1028a: fix optee node

2021-03-22 Thread Michael Walle
Am 2021-03-22 14:04, schrieb Sahil Malhotra: Sahil, if you like you can pick it up to enable the nodes for your ls1028a boards. Michael, If we enable the optee node like this, will this gets resolved ? I don't know what you mean. This was a fix for the initial patch. So, I guess the answer is

Re: [PATCH] arm64: dts: ls1028a: fix optee node

2021-03-22 Thread Michael Walle
Hi Sahil, Am 2021-03-22 12:33, schrieb Sahil Malhotra: Thanks for the fix, and currently we support optee only on ls1028a-rdb boards. Does enabling the optee node this way, solves the issue ? What do you mean? Please note, that Shawn already reverted your commit. Therefore, I suggest you

Re: [PATCH v3 1/2] mtd: spi-nor: Move Software Write Protection logic out of the core

2021-03-22 Thread Michael Walle
. Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle -michael

Re: [PATCH v3 2/2] mtd: spi-nor: swp: Improve code around spi_nor_check_lock_status_sr()

2021-03-22 Thread Michael Walle
Am 2021-03-22 08:51, schrieb Tudor Ambarus: - bool return value for spi_nor_check_lock_status_sr(), gets rid of the return 1, - introduce temporary variables for better readability. Suggested-by: Joe Perches Signed-off-by: Tudor Ambarus --- Reviewed-by: Michael Walle -michael

[PATCH v5 2/3] mtd: spi-nor: implement OTP support for Winbond and similar flashes

2021-03-21 Thread Michael Walle
documented) first OTP area of the newer flashes is the actual SFDP table. On a side note, Winbond devices also allow erasing the OTP regions as long as the area isn't locked down. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/core.c | 2 +- drivers/mtd/spi-nor/core.h | 6 ++ drivers/m

[PATCH v5 3/3] mtd: spi-nor: winbond: add OTP support to w25q32fw/jw

2021-03-21 Thread Michael Walle
With all the helper functions in place, add OTP support for the Winbond W25Q32JW and W25Q32FW. Both were tested on a LS1028A SoC with a NXP FSPI controller. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/winbond.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions

[PATCH v5 1/3] mtd: spi-nor: add OTP support

2021-03-21 Thread Michael Walle
write ops will be given an address offset to operate on while the locking ops use regions because locking always affects a whole region. It is up to the flash driver to implement these ops. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/Makefile | 2 +- drivers/mtd/spi-nor/core.c | 5 + drive

[PATCH v5 0/3] mtd: spi-nor: OTP support

2021-03-21 Thread Michael Walle
e sure, the buffer is hardcoded to 4k by the mtd subsys - moved all code to otp.c - dropped the patches introduced in v2 Changes since v1: - added methods for Macronix and similar flashes - added patch to cleanup/consolidate code in core.c Michael Walle (3): mtd: spi-nor: add OTP support mt

Re: [PATCH 2/2] mtd: spi-nor: add initial sysfs support

2021-03-20 Thread Michael Walle
Hi Yicong, Am 2021-03-20 05:16, schrieb Yicong Yang: On 2021/3/18 17:24, Michael Walle wrote: Add support to show the name and JEDEC identifier as well as to dump the SFDP table. Not all flashes list their SFDP table contents in their datasheet. So having that is useful. It might also

[PATCH] arm64: configs: enable FlexTimer alarm timer

2021-03-20 Thread Michael Walle
This driver is used on Layerscape SoCs to wake up the system from standby. It works in conjunction with the RCPM driver. The latter is only available as a builtin. Signed-off-by: Michael Walle --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64

Re: [PATCH v2] gpio: mpc8xxx: Add ACPI support

2021-03-19 Thread Michael Walle
Am 2021-03-19 03:53, schrieb Ran Wang: Current implementation only supports DT, now add ACPI support. Note that compared to device of 'fsl,qoriq-gpio', LS1028A and LS1088A's GPIO have no extra programming, so simplify related checking. Signed-off-by: Ran Wang --- Change in v2: - Initialize

Re: [PATCH v2 net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Michael Walle
Am 2021-03-18 20:44, schrieb Michael Walle: Here is what Vladimir says about it: at803x_aneg_done() keeps the aneg reporting as "not done" even when the copper-side link was reported as up, but the in-band autoneg has not finished. That was the _intended_ behavior when

[PATCH v2 net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Michael Walle
also the fallback. Thus we can just remove at803x_aneg_done() altogether. [1] https://lore.kernel.org/netdev/fdf0074a-2572-5914-6f3e-77202cbf9...@gmail.com/ Suggested-by: Vladimir Oltean Signed-off-by: Michael Walle --- drivers/net/phy/at803x.c | 31 --- 1 file

[PATCH 1/2] arm64: dts: fsl-ls1028a-kontron-sl28: move MTD partitions

2021-03-18 Thread Michael Walle
Move the MTD partitions to the partitions subnode. This is the new way to specify the partitions, see Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml Signed-off-by: Michael Walle --- .../freescale/fsl-ls1028a-kontron-sl28.dts| 94 ++- 1 file changed, 49 insertions

[PATCH 2/2] arm64: dts: fsl-ls1028a-kontron-sl28: combine unused partitions

2021-03-18 Thread Michael Walle
the reserved partition. It served no purpose other than having no hole in the map. Signed-off-by: Michael Walle --- .../freescale/fsl-ls1028a-kontron-sl28.dts| 20 +-- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron

Re: [PATCH net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Michael Walle
Am 2021-03-18 17:21, schrieb Heiner Kallweit: On 18.03.2021 16:17, Vladimir Oltean wrote: On Thu, Mar 18, 2021 at 03:54:00PM +0100, Heiner Kallweit wrote: On 18.03.2021 15:23, Michael Walle wrote: at803x_aneg_done() is pretty much dead code since the patch series "net: phy: im

[PATCH net-next] net: phy: at803x: remove at803x_aneg_done()

2021-03-18 Thread Michael Walle
at803x_aneg_done() is pretty much dead code since the patch series "net: phy: improve and simplify phylib state machine" [1]. Remove it. [1] https://lore.kernel.org/netdev/922c223b-7bc0-e0ec-345d-2034b796a...@gmail.com/ Suggested-by: Vladimir Oltean Signed-off-by: Michael Walle --

[PATCH 2/2] mtd: spi-nor: add initial sysfs support

2021-03-18 Thread Michael Walle
to the SPI NOR flash device registers, which can also be useful for debugging. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/Makefile | 2 +- drivers/mtd/spi-nor/core.c | 5 +++ drivers/mtd/spi-nor/core.h | 3 ++ drivers/mtd/spi-nor/sysfs.c | 86 4

[PATCH 1/2] mtd: spi-nor: sfdp: save a copy of the SFDP data

2021-03-18 Thread Michael Walle
Due to possible mode switching to 8D-8D-8D, it might not be possible to read the SFDP after the initial probe. To be able to dump the SFDP via sysfs afterwards, make a complete copy of it. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/core.h | 10 drivers/mtd/spi-nor/sfdp.c

[PATCH 0/2] mtd: spi-nor: support dumping sfdp tables

2021-03-18 Thread Michael Walle
probe. The flash might already be switched to 8D-8D-8D mode. Instead, cache the SFDP data - add two sysfs files: jedec-id and name - change the file mode of the sfdp file from 0400 to 0444. There is no hardware access anymore. Michael Walle (2): mtd: spi-nor: sfdp: save a copy of the SFDP

Re: [PATCH] arm64: dts: ls1028a: fix optee node

2021-03-18 Thread Michael Walle
Am 2021-03-18 09:34, schrieb Michael Walle: Don't enable the optee node in the SoC include. It is an optional component and actually, if enabled, breaks boards which doesn't have it. This reverts commit 48787485f8de ("arm64: dts: ls1028a: enable optee node") and enables the node

[PATCH] arm64: dts: ls1028a: fix optee node

2021-03-18 Thread Michael Walle
nal author was to enable OPTEE for the LS1028A-RDB and the LS1028A-QDS. Fixes: 48787485f8de ("arm64: dts: ls1028a: enable optee node") Reported-by: Guillaume Tucker Reported-by: "kernelci.org bot" Tested-by: Michael Walle Signed-off-by: Michael Walle --- arch/arm64/boot/dts/fre

Re: [PATCH v2 4/5] mtd: spi-nor: Move Software Write Protection logic out of the core

2021-03-17 Thread Michael Walle
Am 2021-03-17 10:30, schrieb tudor.amba...@microchip.com: soft-wr-protect.c or software-write-protect.c ? Having in mind that we have the SWP configs, I think I prefer swp.c. But let's see what majority thinks, we'll do as majority prefers. Michael, Pratyush? It's just an internal name, thus

Re: [PATCH v2 4/5] mtd: spi-nor: Move Software Write Protection logic out of the core

2021-03-17 Thread Michael Walle
Am 2021-03-17 07:09, schrieb tudor.amba...@microchip.com: On 3/15/21 8:23 AM, Vignesh Raghavendra wrote: EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe On 3/9/21 12:58 PM, tudor.amba...@microchip.com wrote: On 3/8/21 7:28 PM, Vignesh Raghavendra

Re: next/master bisection: baseline.login on kontron-kbox-a-230-ls

2021-03-16 Thread Michael Walle
Am 2021-03-16 19:33, schrieb Guillaume Tucker: Hi Sahil, Please see the bisection report below about a boot failure on kontron-kbox-a-230-ls on linux-next. Reports aren't automatically sent to the public while we're trialing new bisection features on kernelci.org but this one looks valid.

Re: [PATCH] dt-bindings: spi: Convert Freescale DSPI to json schema

2021-03-16 Thread Michael Walle
Am 2021-03-16 19:06, schrieb Pratyush Yadav: On 16/03/21 06:45PM, Michael Walle wrote: Am 2021-03-15 19:30, schrieb Pratyush Yadav: .. > > +patternProperties: > > + "@[0-9a-f]+": Shouldn't this be "^.*@[0-9a-f]+$"? The pattern has to match _anywhere_ in

Re: [PATCH] dt-bindings: spi: Convert Freescale DSPI to json schema

2021-03-16 Thread Michael Walle
Am 2021-03-15 19:30, schrieb Pratyush Yadav: .. +patternProperties: + "@[0-9a-f]+": Shouldn't this be "^.*@[0-9a-f]+$"? +type: object + +properties: + fsl,spi-cs-sck-delay: +description: + Delay in nanoseconds between activating chip select and the start of

Re: [RFC PATCH 1/3] mtd: spi-nor: sfdp: remember sfdp_size

2021-03-16 Thread Michael Walle
Am 2021-03-16 12:06, schrieb Pratyush Yadav: On 16/03/21 12:01PM, Michael Walle wrote: Hi Pratyush, Am 2021-03-16 11:42, schrieb Pratyush Yadav: > On 12/03/21 08:05PM, Michael Walle wrote: > > Save the sftp_size in the spi_nor struct so we can use it to dump the > > SFDP table

Re: [RFC PATCH 2/3] mtd: spi-nor: sfdp: fix spi_nor_read_sfdp()

2021-03-16 Thread Michael Walle
Am 2021-03-16 12:04, schrieb Pratyush Yadav: On 12/03/21 08:05PM, Michael Walle wrote: If spi_nor_read_sfdp() is used after probe, we have to set read_proto and the read dirmap. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/sfdp.c | 8 1 file changed, 8 insertions(+) diff

Re: [RFC PATCH 1/3] mtd: spi-nor: sfdp: remember sfdp_size

2021-03-16 Thread Michael Walle
Hi Pratyush, Am 2021-03-16 11:42, schrieb Pratyush Yadav: On 12/03/21 08:05PM, Michael Walle wrote: Save the sftp_size in the spi_nor struct so we can use it to dump the SFDP table without parsing the headers again. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/sfdp.c | 12

Re: [PATCH v2] PCI: Fix Intel i210 by avoiding overlapping of BARs

2021-03-15 Thread Michael Walle
Am 2021-02-01 23:20, schrieb Bjorn Helgaas: On Mon, Feb 01, 2021 at 08:49:16PM +0100, Michael Walle wrote: Am 2021-01-17 20:27, schrieb Michael Walle: > Am 2021-01-16 00:57, schrieb Bjorn Helgaas: > > On Wed, Jan 13, 2021 at 12:32:32AM +0100, Michael Walle wrote: > > > A

Re: [PATCH 1/2] ASoC: simple-card-utils: Do not handle device clock

2021-03-15 Thread Michael Walle
card-utils to not update the MCLK rate. - "arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var3-ads2.dts" It would be best if codec takes care of setting MCLK clock via DAI set_sysclk() callback. Reported-by: Michael Walle Suggested-by: Mark Brown Suggested-by: Michael Walle

Re: [PATCH 1/3] ASoC: simple-card-utils: Fix device module clock

2021-03-15 Thread Michael Walle
Am 2021-03-15 18:10, schrieb Sameer Pujar: Yes this is a problem, unfortunately I missed checking some of the simple-card examples. I wonder we should be specifically looking for "mclk" clock here. That would definitely help mitigate the problem but I really think it's cleaner and safer to

Re: [PATCH 1/3] ASoC: simple-card-utils: Fix device module clock

2021-03-15 Thread Michael Walle
Am 2021-03-15 16:19, schrieb Sameer Pujar: On 3/15/2021 5:35 PM, Michael Walle wrote: External email: Use caution opening links or attachments Am 2021-03-12 14:46, schrieb Mark Brown: On Fri, Mar 12, 2021 at 01:30:02PM +0100, Michael Walle wrote: The card calls set_sysclk(), which

Re: [PATCH 1/3] ASoC: simple-card-utils: Fix device module clock

2021-03-15 Thread Michael Walle
Am 2021-03-12 14:46, schrieb Mark Brown: On Fri, Mar 12, 2021 at 01:30:02PM +0100, Michael Walle wrote: The card calls set_sysclk(), which eventually ends up in the codec. The codec therefore, could figure out if it needs to configure the clock or if it can use its internal FLL. Is that what

Re: [PATCH v4 2/4] mtd: spi-nor: implement OTP support for Winbond and similar flashes

2021-03-15 Thread Michael Walle
Am 2021-03-15 09:31, schrieb tudor.amba...@microchip.com: On 3/6/21 2:05 AM, Michael Walle wrote: + nor->dirmap.rdesc = NULL; why can't we use dirmap? Dirmap is used if the controller supports (transparent) memory mapped access, right? As you see I'm not familiar with that, nor d

  1   2   3   4   5   6   7   8   >