mtd: spi-nor-ids: Add XMC XM25QH128C
Subsystems (3)
PATCH v6 1/4 mtd: spi-nor-ids: Add XMC XM25QH128C
From: Fabio Estevam <[email protected]>
Add the JEDEC ID for the XMC XM25QH128C SPI NOR flash.
This is a 128Mbit device using 64KiB sectors and supporting 4KiB erase, dual read and quad read, matching the other XM25QH128 variants.
---
Changes since v5:
- None.
drivers/mtd/spi/spi-nor-ids.c | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/spi/spi-nor-ids.c +1 -0
@@ -673,6 +673,7 @@ const struct flash_info spi_nor_ids[] = { { INFO("XM25QH64A", 0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { INFO("XM25QH64C", 0x204017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { INFO("XM25QH128A", 0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { INFO("XM25QH128C", 0x204018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { INFO("XM25QU128C", 0x204118, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { INFO("XM25QH256C", 0x204019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, { INFO("XM25QU256C", 0x204119, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
Signature · 1 line
2.43.0
PATCH v6 2/4 rockchip: rk3399: Remove ROC-PC regulator overrides
From: Fabio Estevam <[email protected]>
The upstream devicetree already describes dc_12v as the output of the MP8859 regulator and drives the USB hub reset through the vcc5v0_host regulator pinctrl state.
Remove the legacy fixed-regulator overrides and rely on the upstream regulator descriptions.
---
Changes since v5:
- None.
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 24 ------------------------ 1 file changed, 24 deletions(-)
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +0 -24
@@ -10,30 +10,6 @@ config { sysreset-gpio = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>; }; - - vcc_hub_en: vcc_hub_en-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&hub_rst>; - regulator-name = "vcc_hub_en"; - regulator-always-on; - }; -}; - -/* - * should be placed inside mp8859, but not until mp8859 has - * its own dt-binding. - */ -&dc_12v { - compatible = "regulator-fixed"; - regulator-name = "dc_12v"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <12000000>; - regulator-max-microvolt = <12000000>; - vin-supply = <&vcc_vbus_typec0>; }; &gpio4 {
Signature · 1 line
2.43.0
PATCH v6 3/4 rockchip: rk3399: Add ROC-PC-PLUS board detection
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
The ROC-RK3399-PC has an MP8859 regulator on I2C7 at address 0x66, while the ROC-RK3399-PC-PLUS does not. Probe for the regulator in SPL and use the result to select the matching devicetree from the U-Boot FIT. Fall back to the original board if the I2C bus cannot be probed.
Build both devicetrees from the existing roc-pc-rk3399_defconfig and enable the XMC SPI NOR driver used by the Plus variant. Set fdtfile from the selected U-Boot devicetree so the matching Linux devicetree is used as well.
---
Changes since v5:
- Fixed inadvertent inversion of dm_i2c_probe().
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 8 ++++ board/firefly/roc-pc-rk3399/roc-pc-rk3399.c | 42 +++++++++++++++++++++ configs/roc-pc-rk3399_defconfig | 3 ++ doc/board/rockchip/rockchip.rst | 2 +- 4 files changed, 54 insertions(+), 1 deletion(-)
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +8 -0
@@ -12,6 +12,14 @@ }; }; +&i2c7 { + bootph-pre-ram; +}; + +&i2c7_xfer { + bootph-pre-ram; +}; + &gpio4 { bootph-pre-ram; };
board/firefly/roc-pc-rk3399/roc-pc-rk3399.c +42 -0
60 lines not on this page · raw message
configs/roc-pc-rk3399_defconfig +3 -0
@@ -26,6 +26,7 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x40000 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_ENV_SUPPORT=y +CONFIG_SPL_I2C=y CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
@@ -37,6 +38,7 @@ CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TIME=y CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_LIST="rockchip/rk3399-roc-pc rockchip/rk3399-roc-pc-plus" CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_RELOC_GD_ENV_ADDR=y
@@ -49,6 +51,7 @@ CONFIG_MMC_SDHCI_SDMA=y CONFIG_MMC_SDHCI_ROCKCHIP=y CONFIG_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPI_FLASH_WINBOND=y +CONFIG_SPI_FLASH_XMC=y CONFIG_DM_ETH_PHY=y CONFIG_ETH_DESIGNWARE=y CONFIG_GMAC_ROCKCHIP=y
doc/board/rockchip/rockchip.rst +1 -1
@@ -81,7 +81,7 @@ List of mainline supported Rockchip boards: - 96boards RK3399 Ficus (ficus-rk3399) - 96boards Rock960 (rock960-rk3399) - Firefly-RK3399 (firefly_rk3399) - - Firefly ROC-RK3399-PC + - Firefly ROC-RK3399-PC/ROC-RK3399-PC-PLUS (roc-pc-rk3399) - FriendlyElec NanoPC-T4 (nanopc-t4-rk3399) - FriendlyElec NanoPi M4 (nanopi-m4-rk3399) - FriendlyElec NanoPi M4B (nanopi-m4b-rk3399)
Signature · 1 line
2.43.0
PATCH v6 4/4 rockchip: roc-pc-rk3399: Enable redundant environment
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Keep the primary U-Boot environment at its existing 0x3f8000 offset and use the preceding 32 KiB region at 0x3f0000 for the redundant copy.
Both copies are aligned to the 4 KiB erase size and together occupy 0x3f0000 through 0x3fffff. Redundancy protects the environment against power loss or an interrupted update.
---
Changes since v5:
- None.
configs/roc-pc-rk3399_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/roc-pc-rk3399_defconfig +2 -0
@@ -17,6 +17,7 @@ CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_SF_DEFAULT_BUS=1 CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_ENV_OFFSET_REDUND=0x3F0000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_DEBUG_UART=y
@@ -41,6 +42,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_OF_LIST="rockchip/rk3399-roc-pc rockchip/rk3399-roc-pc-plus" CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_ENV_REDUNDANT=y CONFIG_ENV_RELOC_GD_ENV_ADDR=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y
Signature · 1 line
2.43.0
Quoted 8 lines · Fabio Estevam
Add the JEDEC ID for the XMC XM25QH128C SPI NOR flash.
This is a 128Mbit device using 64KiB sectors and supporting 4KiB erase, dual read and quad read, matching the other XM25QH128 variants.
[...]
Applied to https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip (u-boot-rockchip-2027.01), thanks!
[1/4] mtd: spi-nor-ids: Add XMC XM25QH128C
https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip/-/commit/5c7449b185a58fe8e9e290a31401908adefc2f2a [2/4] rockchip: rk3399: Remove ROC-PC regulator overrides https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip/-/commit/042b5d91747405f6d15bf32f8aa9432acc37b355 [3/4] rockchip: rk3399: Add ROC-PC-PLUS board detection https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip/-/commit/66ecacc5e4a3afa547244ce9c68937023188340a [4/4] rockchip: roc-pc-rk3399: Enable redundant environment https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip/-/commit/bd9fe520badd5314558084d86e01afba34e4ef31
Best regards,
Signature · 1 line
Quentin Schulz <[email protected]>