Skip to contentSkip to conversation

Add overlays to disable optional hardware in k3-am6xx-phycore-som boards

PATCH Applied Nathan Morrisson 3 participants 7 messages Jun 13, 2024 – Jun 21, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover Add overlays to disable optional hardware in k3-am6xx-phycore-som boards

Add three overlays to disable the eth phy, rtc, and spi nor. These overlays will be used to disable device tree nodes for components that are optionally not populated.

v3:
- Explain the logic behind adding the overlays in commit messages

v2:
- Add build time tests in makefile

Nathan Morrisson (4):
arm64: dts: ti: k3-am64-phycore-som: Add serial_flash label
arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable eth phy
arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable rtc
arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable spi nor

 arch/arm64/boot/dts/ti/Makefile               | 17 +++++++++++++++++
 .../boot/dts/ti/k3-am64-phycore-som.dtsi      |  2 +-
 .../ti/k3-am6xx-phycore-disable-eth-phy.dtso  | 19 +++++++++++++++++++
 .../dts/ti/k3-am6xx-phycore-disable-rtc.dtso  | 15 +++++++++++++++
 .../ti/k3-am6xx-phycore-disable-spi-nor.dtso  | 15 +++++++++++++++
 5 files changed, 67 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-eth-phy.dtso
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-rtc.dtso
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-spi-nor.dtso
Signature · 1 line
2.25.1
#1 lore raw

PATCH v3 1/4 arm64: dts: ti: k3-am64-phycore-som: Add serial_flash label

Label the spi nor as serial_flash. This allows us to disable the flash with an overlay common to all am6xx-phycore-som boards.

---
v3: No change

v2: No change

 arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am64-phycore-som.dtsi +1 -1
index 125e507966fb..ca0bbf21f7fe 100644
@@ -296,7 +296,7 @@ &ospi0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&ospi0_pins_default>;
 
-	flash@0 {
+	serial_flash: flash@0 {
 		compatible = "jedec,spi-nor";
 		reg = <0x0>;
 		spi-tx-bus-width = <8>;
Signature · 1 line
2.25.1
#2 lore raw

PATCH v3 2/4 arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable eth phy

In reply to Nathan Morrisson

Add an overlay to disable the eth phy for all am6xx-phycore-som boards.
The EEPROM on am6xx-phycore-soms contains information about the configuration of the SOM. The standard configuration of the SOM has an ethernet phy, but if no ethernet phy is populated, the EEPROM will indicate that change and we can use this overlay to cleanly disable the ethernet phy.

---
v3:
- Explain why we are adding the overlay in the commit message

v2:
- Add build time tests in makefile

 arch/arm64/boot/dts/ti/Makefile               |  7 +++++++
 .../ti/k3-am6xx-phycore-disable-eth-phy.dtso  | 19 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-eth-phy.dtso
arch/arm64/boot/dts/ti/Makefile +7 -0
index 2c327cc320cf..320da5ea38e0 100644
@@ -54,6 +54,9 @@ dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am64-tqma64xxl-mbax4xxl-sdcard.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am64-tqma64xxl-mbax4xxl-wlan.dtbo
 
+# Common overlays for the phyCORE-AM6* family of boards
+dtb-$(CONFIG_ARCH_K3) += k3-am6xx-phycore-disable-eth-phy.dtbo
+
 # Boards with AM65x SoC
 k3-am654-gp-evm-dtbs := k3-am654-base-board.dtb \
 	k3-am654-base-board-rocktech-rk101-panel.dtbo \
@@ -107,6 +110,8 @@ k3-am625-beagleplay-csi2-ov5640-dtbs := k3-am625-beagleplay.dtb \
 	k3-am625-beagleplay-csi2-ov5640.dtbo
 k3-am625-beagleplay-csi2-tevi-ov5640-dtbs := k3-am625-beagleplay.dtb \
 	k3-am625-beagleplay-csi2-tevi-ov5640.dtbo
+k3-am625-phyboard-lyra-disable-eth-phy-dtbs := k3-am625-phyboard-lyra-rdk.dtb \
+	k3-am6xx-phycore-disable-eth-phy.dtbo
 k3-am625-phyboard-lyra-gpio-fan-dtbs := k3-am625-phyboard-lyra-rdk.dtb \
 	k3-am62x-phyboard-lyra-gpio-fan.dtbo
 k3-am625-sk-csi2-imx219-dtbs := k3-am625-sk.dtb \
@@ -132,6 +137,8 @@ k3-am62p5-sk-csi2-tevi-ov5640-dtbs := k3-am62p5-sk.dtb \
 	k3-am62x-sk-csi2-tevi-ov5640.dtbo
 k3-am642-evm-icssg1-dualemac-dtbs := \
 	k3-am642-evm.dtb k3-am642-evm-icssg1-dualemac.dtbo
+k3-am642-phyboard-electra-disable-eth-phy-dtbs := \
+	k3-am642-phyboard-electra-rdk.dtb k3-am6xx-phycore-disable-eth-phy.dtbo
 k3-am642-phyboard-electra-gpio-fan-dtbs := \
 	k3-am642-phyboard-electra-rdk.dtb k3-am642-phyboard-electra-gpio-fan.dtbo
 k3-am642-tqma64xxl-mbax4xxl-sdcard-dtbs := \
arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-eth-phy.dtso new file +19 -0
new file mode 100644
index 000000000000..356c82bbe143
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+/*
+ * Copyright (C) 2023 PHYTEC America, LLC
+ * Author: Garrett Giordano <[email protected]>
+ *
+ * Copyright (C) 2024 PHYTEC America, LLC
+ * Author: Nathan Morrisson <[email protected]>
+ */
+
+/dts-v1/;
+/plugin/;
+
+&cpsw3g_phy1 {
+	status = "disabled";
+};
+
+&cpsw_port1 {
+	status = "disabled";
+};
Signature · 1 line
2.25.1
#3 lore raw

PATCH v3 3/4 arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable rtc

In reply to Nathan Morrisson

Add an overlay to disable the rtc for all am6xx-phycore-som boards. The EEPROM on am6xx-phycore-soms contains information about the configuration of the SOM. The standard configuration of the SOM has an rtc, but if no rtc is populated, the EEPROM will indicate that change and we can use this overlay to cleanly disable the rtc.

---
v3:
- Explain why we are adding the overlay in the commit message

v2:
- Add build time tests in makefile

 arch/arm64/boot/dts/ti/Makefile                   |  5 +++++
 .../boot/dts/ti/k3-am6xx-phycore-disable-rtc.dtso | 15 +++++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-rtc.dtso
arch/arm64/boot/dts/ti/Makefile +5 -0
index 320da5ea38e0..3d0e87a78e09 100644
@@ -56,6 +56,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am64-tqma64xxl-mbax4xxl-wlan.dtbo
 
 # Common overlays for the phyCORE-AM6* family of boards
 dtb-$(CONFIG_ARCH_K3) += k3-am6xx-phycore-disable-eth-phy.dtbo
+dtb-$(CONFIG_ARCH_K3) += k3-am6xx-phycore-disable-rtc.dtbo
 
 # Boards with AM65x SoC
 k3-am654-gp-evm-dtbs := k3-am654-base-board.dtb \
@@ -112,6 +113,8 @@ k3-am625-beagleplay-csi2-tevi-ov5640-dtbs := k3-am625-beagleplay.dtb \
 	k3-am625-beagleplay-csi2-tevi-ov5640.dtbo
 k3-am625-phyboard-lyra-disable-eth-phy-dtbs := k3-am625-phyboard-lyra-rdk.dtb \
 	k3-am6xx-phycore-disable-eth-phy.dtbo
+k3-am625-phyboard-lyra-disable-rtc-dtbs := k3-am625-phyboard-lyra-rdk.dtb \
+	k3-am6xx-phycore-disable-rtc.dtbo
 k3-am625-phyboard-lyra-gpio-fan-dtbs := k3-am625-phyboard-lyra-rdk.dtb \
 	k3-am62x-phyboard-lyra-gpio-fan.dtbo
 k3-am625-sk-csi2-imx219-dtbs := k3-am625-sk.dtb \
@@ -139,6 +142,8 @@ k3-am642-evm-icssg1-dualemac-dtbs := \
 	k3-am642-evm.dtb k3-am642-evm-icssg1-dualemac.dtbo
 k3-am642-phyboard-electra-disable-eth-phy-dtbs := \
 	k3-am642-phyboard-electra-rdk.dtb k3-am6xx-phycore-disable-eth-phy.dtbo
+k3-am642-phyboard-electra-disable-rtc-dtbs := \
+	k3-am642-phyboard-electra-rdk.dtb k3-am6xx-phycore-disable-rtc.dtbo
 k3-am642-phyboard-electra-gpio-fan-dtbs := \
 	k3-am642-phyboard-electra-rdk.dtb k3-am642-phyboard-electra-gpio-fan.dtbo
 k3-am642-tqma64xxl-mbax4xxl-sdcard-dtbs := \
arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-rtc.dtso new file +15 -0
new file mode 100644
index 000000000000..8b24191f5948
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+/*
+ * Copyright (C) 2023 PHYTEC America, LLC
+ * Author: Garrett Giordano <[email protected]>
+ *
+ * Copyright (C) 2024 PHYTEC America, LLC
+ * Author: Nathan Morrisson <[email protected]>
+ */
+
+/dts-v1/;
+/plugin/;
+
+&i2c_som_rtc {
+	status = "disabled";
+};
Signature · 1 line
2.25.1
#4 lore raw

PATCH v3 4/4 arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable spi nor

In reply to Nathan Morrisson

Add an overlay to disable the spi nor for all am6xx-phycore-som boards.
The EEPROM on am6xx-phycore-soms contains information about the configuration of the SOM. The standard configuration of the SOM has an ospi nor, but if no nor is populated, the EEPROM will indicate that change and we can use this overlay to cleanly disable the spi nor.

---
v3:
- Explain why we are adding the overlay in the commit message

v2:
- Add build time tests in makefile

 arch/arm64/boot/dts/ti/Makefile                   |  5 +++++
 .../dts/ti/k3-am6xx-phycore-disable-spi-nor.dtso  | 15 +++++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-spi-nor.dtso
arch/arm64/boot/dts/ti/Makefile +5 -0
index 3d0e87a78e09..8d8fc8bfaf7e 100644
@@ -57,6 +57,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am64-tqma64xxl-mbax4xxl-wlan.dtbo
 # Common overlays for the phyCORE-AM6* family of boards
 dtb-$(CONFIG_ARCH_K3) += k3-am6xx-phycore-disable-eth-phy.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am6xx-phycore-disable-rtc.dtbo
+dtb-$(CONFIG_ARCH_K3) += k3-am6xx-phycore-disable-spi-nor.dtbo
 
 # Boards with AM65x SoC
 k3-am654-gp-evm-dtbs := k3-am654-base-board.dtb \
@@ -115,6 +116,8 @@ k3-am625-phyboard-lyra-disable-eth-phy-dtbs := k3-am625-phyboard-lyra-rdk.dtb \
 	k3-am6xx-phycore-disable-eth-phy.dtbo
 k3-am625-phyboard-lyra-disable-rtc-dtbs := k3-am625-phyboard-lyra-rdk.dtb \
 	k3-am6xx-phycore-disable-rtc.dtbo
+k3-am625-phyboard-lyra-disable-spi-nor-dtbs := k3-am625-phyboard-lyra-rdk.dtb \
+	k3-am6xx-phycore-disable-spi-nor.dtbo
 k3-am625-phyboard-lyra-gpio-fan-dtbs := k3-am625-phyboard-lyra-rdk.dtb \
 	k3-am62x-phyboard-lyra-gpio-fan.dtbo
 k3-am625-sk-csi2-imx219-dtbs := k3-am625-sk.dtb \
@@ -144,6 +147,8 @@ k3-am642-phyboard-electra-disable-eth-phy-dtbs := \
 	k3-am642-phyboard-electra-rdk.dtb k3-am6xx-phycore-disable-eth-phy.dtbo
 k3-am642-phyboard-electra-disable-rtc-dtbs := \
 	k3-am642-phyboard-electra-rdk.dtb k3-am6xx-phycore-disable-rtc.dtbo
+k3-am642-phyboard-electra-disable-spi-nor-dtbs := \
+	k3-am642-phyboard-electra-rdk.dtb k3-am6xx-phycore-disable-spi-nor.dtbo
 k3-am642-phyboard-electra-gpio-fan-dtbs := \
 	k3-am642-phyboard-electra-rdk.dtb k3-am642-phyboard-electra-gpio-fan.dtbo
 k3-am642-tqma64xxl-mbax4xxl-sdcard-dtbs := \
arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-spi-nor.dtso new file +15 -0
new file mode 100644
index 000000000000..cc0cf269b6e4
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+/*
+ * Copyright (C) 2023 PHYTEC America, LLC
+ * Author: Garrett Giordano <[email protected]>
+ *
+ * Copyright (C) 2024 PHYTEC America, LLC
+ * Author: Nathan Morrisson <[email protected]>
+ */
+
+/dts-v1/;
+/plugin/;
+
+&serial_flash {
+	status = "disabled";
+};
Signature · 1 line
2.25.1
#5 lore raw
In reply to Nathan Morrisson

Am 14.06.24 um 01:07 schrieb Nathan Morrisson:

Quoted 6 lines

Add three overlays to disable the eth phy, rtc, and spi nor. These overlays will be used to disable device tree nodes for components that are optionally not populated.

v3:
- Explain the logic behind adding the overlays in commit messages

Looks like you forgot to pick up my Reviewed-by

https://lore.kernel.org/linux-arm-kernel/[email protected]/T/#me4ddd3a713c4ff65e36fad333d59979ef1a92e8f

Quoted 20 lines

v2:
- Add build time tests in makefile

Nathan Morrisson (4):
arm64: dts: ti: k3-am64-phycore-som: Add serial_flash label
arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable eth phy
arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable rtc
arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable spi nor

  arch/arm64/boot/dts/ti/Makefile               | 17 +++++++++++++++++
  .../boot/dts/ti/k3-am64-phycore-som.dtsi      |  2 +-
  .../ti/k3-am6xx-phycore-disable-eth-phy.dtso  | 19 +++++++++++++++++++
  .../dts/ti/k3-am6xx-phycore-disable-rtc.dtso  | 15 +++++++++++++++
  .../ti/k3-am6xx-phycore-disable-spi-nor.dtso  | 15 +++++++++++++++
  5 files changed, 67 insertions(+), 1 deletion(-)

create mode 100644 arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-eth-phy.dtso create mode 100644 arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-rtc.dtso create mode 100644 arch/arm64/boot/dts/ti/k3-am6xx-phycore-disable-spi-nor.dtso

maintainer Applied
#6 lore raw
In reply to Nathan Morrisson

Hi Nathan Morrisson,

Quoted 8 lines · Nathan Morrisson

Add three overlays to disable the eth phy, rtc, and spi nor. These overlays will be used to disable device tree nodes for components that are optionally not populated.

v3:
- Explain the logic behind adding the overlays in commit messages

[...]

I have applied the following to branch ti-k3-dts-next on [1]. Thank you!

[1/4] arm64: dts: ti: k3-am64-phycore-som: Add serial_flash label

      commit: 1fc3858a906bf3e8c48a14587106bb61c2f8d7c5
[2/4] arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable eth phy
      commit: 1322b1796d7143dfa75e10e036c6099927ef510d
[3/4] arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable rtc
      commit: a0b552605f8c588fdd9ea062886fb90d50534a8d
[4/4] arm64: dts: ti: k3-am6xx-phycore-som: Add overlay to disable spi nor
      commit: 9a32378884931d8f66d0d7122873156199fa422f

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh