dt-bindings: omap: add kamstrup am335x emperor platforms
Subsystems (3)
PATCH v2 1/3 dt-bindings: omap: add kamstrup am335x emperor platforms
Document the kam,am335x-emperor and kam,am335x-emperor-mini compatible strings.
---
Changes in v2:
- Reorder the series so the binding comes before its user. (Conor)
- Add the kam,am335x-emperor-mini compatible and name the product behind each compatible in a trailing comment. Conor's Acked-by was given for kam,am335x-emperor alone, kept here since the change is additive.
--- Documentation/devicetree/bindings/arm/ti/omap.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/ti/omap.yaml +2 -0
@@ -105,6 +105,8 @@ properties: items: - enum: - compulab,cm-t335 + - kam,am335x-emperor # Kamstrup READy Concentrator 1M/2M/2C + - kam,am335x-emperor-mini # Kamstrup connectIQ IoT Gateway 500 - moxa,uc-8100-me-t - novatech,am335x-lxm - seeed,am335x-bone-green-eco
base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
Signature · 1 line
2.53.0
PATCH v2 2/3 ARM: dts: ti/omap: am335x: add kamstrup emperor platforms
Device trees can be used on the following 4 products:
- Kamstrup READy Concentrator 1M (RC1M)
- Kamstrup READy Concentrator 2M (RC2M)
- Kamstrup READy Concentrator 2C (RC2C)
- Kamstrup connectIQ IoT Gateway 500 (CIG500)
Concentrators are used as 868MHz gateway for heat, cooling and water meters using wM-Bus, Kamstrup LinkIQ or OMS LPWAN communication protocols.
RC1M only support one way communication (Rx only) where RC2M, RC2C and CIG500 support full two way communication (Rx/Tx) with meters.
Product pages:
https://www.kamstrup.com/en-en/product-centre/ready-concentrator-2m
https://www.kamstrup.com/en-en/product-centre/ready-concentrator-2c
https://www.kamstrup.com/en-en/product-centre/connectiq-iot-gateway-500
---
Changes in v2:
- Add Kamstrup connectIQ IoT Gateway 500 (CIG500) in am335x-emperor-mini
- Move common platform configuration into am335x-emperor-common.dtsi.
- Fix pinmux typo: AM335X_PIN_GPMC_A6 was listed twice, so gpmc_a7 (T15) was never muxed. The second entry is now AM335X_PIN_GPMC_A7.
- Drop phy_id from &cpsw_emac0. phy-handle is parsed first, so it was never used, and it triggers a dtc property_name_chars_strict warning.
- Merge the temperature-pins group into pinctrl_board_pins_default. It was never referenced by any pinctrl-0, so the /T_CRIT pin was not muxed.
- Mux the sensor /ALERT pin (uart1_rtsn, gpio0[13]) alongside /T_CRIT.
- Drop the sdr-radio-control node. It used gpio-leds to expose four radio control lines (power, reset, flash mux, flash reset) that are not LEDs; they are reached from user space by GPIO line name instead. Their pad configuration moves into sdr_radio_pins_default.
- LEDs: replace the deprecated label property with color and function (plus function-enumerator where they would otherwise collide) on the gpio-leds nodes, and rename them led0..led3 to led-1..led-4. The lp5812 multi-led nodes keep label, as the driver derives the LED name from it and ignores function.
- Move the fixed regulators out of the simple-bus "regulators" container to the root node, and give them generic node names.
- Drop vmmc_aux-supply from mmc1 and mmc2.
- Remove device tree labels that were never referenced.
- Use /* */ comments instead of //, except for the SPDX identifier.
- Reorder the sign-off trailers so the author's Signed-off-by comes last.
Note 1: AM33XX_PADCONF lines are longer then 100 columns but it's a common warning for in-tree am335x DTS.
Note 2: am335x-emperor-mini names its temperature channels with channel nodes, which the ti,tmp401 binding does not yet describe. Until that lands dtbs_check reports:
am335x-emperor-mini.dtb: temperature-sensor@4c (ti,tmp431):
'#address-cells', '#size-cells', 'channel@0', 'channel@1' do not match any of the regexes: '^pinctrl-[0-9]+$'
The binding and driver change is added by a separate patch series (v2):
https://lore.kernel.org/linux-hwmon/[email protected]/
--- arch/arm/boot/dts/ti/omap/Makefile | 2 + .../dts/ti/omap/am335x-emperor-common.dtsi | 414 ++++++++++++++++++ .../boot/dts/ti/omap/am335x-emperor-mini.dts | 408 +++++++++++++++++ arch/arm/boot/dts/ti/omap/am335x-emperor.dts | 262 +++++++++++ 4 files changed, 1086 insertions(+) create mode 100644 arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi create mode 100644 arch/arm/boot/dts/ti/omap/am335x-emperor-mini.dts create mode 100644 arch/arm/boot/dts/ti/omap/am335x-emperor.dts
arch/arm/boot/dts/ti/omap/Makefile +2 -0
@@ -105,6 +105,8 @@ dtb-$(CONFIG_SOC_AM33XX) += \ am335x-bonegreen-hdmi-00a0.dtb \ am335x-chiliboard.dtb \ am335x-cm-t335.dtb \ + am335x-emperor.dtb \ + am335x-emperor-mini.dtb \ am335x-evm.dtb \ am335x-evmsk.dtb \ am335x-guardian.dtb \
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi new file +414 -0
414 lines not on this page · raw message
arch/arm/boot/dts/ti/omap/am335x-emperor-mini.dts new file +408 -0
408 lines not on this page · raw message
arch/arm/boot/dts/ti/omap/am335x-emperor.dts new file +262 -0
262 lines not on this page · raw message
Signature · 1 line
2.53.0
[email protected]
AI reviewRe: [PATCH v2 2/3] ARM: dts: ti/omap: am335x: add kamstrup emperor platforms
Thank you for your contribution! Sashiko AI review found 7 potential issues to consider: - [High] ARM: dts: am335x-emperor: swapped mmc1 and mmc2 nodes and pinmux - [Medium] ARM: dts…
Thank you for your contribution! Sashiko AI review found 7 potential issues to consider:
- [High] ARM: dts: am335x-emperor: swapped mmc1 and mmc2 nodes and pinmux
- [Medium] ARM: dts: am335x-emperor: legacy CPSW nodes break ethernet0 alias
- [Medium] ARM: dts: am335x-emperor: RADIO_GPIO5 mapped to eMMC clk gpio1[30]
- [Medium] ARM: dts: am335x-emperor: output GPIOs led-5 and eeprom-wp-hog pulldown
- [Low] ARM: dts: am335x-emperor: 32 MB SPI flash comment vs 16 MB partitions
- [Low] ARM: dts: am335x-emperor: invalid ti,no-init property on rtc node
- [Low] ARM: dts: am335x-emperor-mini: undocumented channel nodes on tmp431
--
commit 90cccbd7e5a8919fd05823f58d75b5f677a542c9
Author: Bruno Thomsen <[email protected]>
ARM: dts: ti/omap: am335x: add kamstrup emperor platforms
This commit adds device tree files and common configuration for the Kamstrup READy Concentrator 1M/2M/2C and connectIQ IoT Gateway 500 AM335x-based platforms.
Quoted 6 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi new file +0
-0@@ -0,0 +1,414 @@
[ ... ]
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi line 247
Quoted 10 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi new file +10
-0+ leds_pins_default: leds-pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT, MUX_MODE7) /* (U5) lcd_vsync.gpio2[22] */ + AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_OUTPUT, MUX_MODE7) /* (R5) lcd_hsync.gpio2[23] */ + AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_OUTPUT, MUX_MODE7) /* (V5) lcd_pclk.gpio2[24] */ + AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_OUTPUT, MUX_MODE7) /* (R6) lcd_ac_bias_en.gpio2[25] */ + /* led-5 on emperor-mini, NC on emperor */ + AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT_PULLDOWN, MUX_MODE7) /* (T12) gpmc_ad12.gpio1[12] */ + >; + };
[Severity: Medium]
Should AM335X_PIN_GPMC_AD12 be configured as PIN_OUTPUT on am335x-emperor-mini instead of PIN_INPUT_PULLDOWN?
am335x-emperor-mini defines led-5 on <&gpio1 12 GPIO_ACTIVE_HIGH> as an output LED without overriding this pad configuration, leaving the input receiver and internal pull-down resistor enabled against the high output drive when led-5 is turned on.
[ ... ]
Quoted 11 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi new file +11
-0+ /* Radio flash is 32 MBytes in size. + * 64 KB blocks of configurations are located in the + * last part of the storage. + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + partition@0 { + reg = <0x0 0xfe0000>; + label = "radio-program";
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi line 312
Quoted 10 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi new file +10
-0+ }; + partition@fe0000 { + reg = <0xfe0000 0x10000>; + label = "radio-config"; + }; + partition@ff0000 { + reg = <0xff0000 0x10000>; + label = "baseband-config"; + }; + };
[Severity: Low]
Does the partition table match the flash size described in the comment?
The partitions span 0x1000000 bytes (16 MiB), whereas the comment says the flash is 32 MBytes with the 64 KB configuration blocks in the last part of storage (which would be 0x1fe0000 and 0x1ff0000 on a 32 MiB flash).
[ ... ]
Quoted 12 lines
+&cpsw_emac0 {
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi new file +11
-0+ phy-mode = "mii"; + phy-handle = <ðernetphy7>; +}; + +&mac { + pinctrl-names = "default"; + pinctrl-0 = <&mii1_pins_default>; + status = "okay"; + slaves = <1>; +}; +
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi line 377
Quoted 10 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi new file +10
-0+&davinci_mdio { + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins_default>; + status = "okay"; + + ethernetphy7: ethernet-phy@7 { + reg = <7>; + smsc,disable-energy-detect; + }; +};
[Severity: Medium]
Should this enable &mac_sw, &cpsw_port1, and &davinci_mdio_sw (with &cpsw_port2 disabled) instead of the deprecated legacy &mac, &cpsw_emac0, and &davinci_mdio nodes?
In arch/arm/boot/dts/ti/omap/am33xx.dtsi, /aliases/ethernet0 points to &cpsw_port1 under &mac_sw. Leaving &mac_sw and &cpsw_port1 disabled while enabling &mac causes bootloaders that populate mac-address via the
ethernet0 alias to patch the disabled node, and binds to the deprecated ti,am335x-cpsw binding rather than Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml.
Quoted 14 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi new file +14
-0+ +/* eMMC disk */ +&mmc1 { + status = "okay"; + bus-width = <8>; + vmmc-supply = <&vmmcsd_fixed>; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_pins_default>; + + /* + * am335x doesn't support DDR, so make sure the data signal is set + * early in the clock cycle + */ + /delete-property/ ti,needs-special-hs-handling;
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi line 401
Quoted 10 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi new file +10
-0+}; + +/* microSD card, used during manufacturing */ +&mmc2 { + status = "okay"; + bus-width = <4>; + vmmc-supply = <&vmmcsd_fixed>; + pinctrl-names = "default"; + pinctrl-0 = <&sdcard_pins_default>; +};
[Severity: High]
Are &mmc1 and &mmc2 swapped here?
In arch/arm/boot/dts/ti/omap/am33xx.dtsi and am33xx-l4.dtsi, the DT labels are 1-indexed relative to the hardware module names: &mmc1 (0x48060000, aliased as mmc0) is the 4-bit MMC0 controller wired to AM335X_PIN_MMC0_* (sdcard_pins_default), while &mmc2 (0x481d8000, aliased as mmc1) is the 8-bit MMC1 controller wired to AM335X_PIN_GPMC_* (emmc_pins_default). As written, each controller claims the other controller's pinmux pads, the 4-bit MMC0 controller is configured with bus-width = <8>, and the 8-bit MMC1 controller is restricted to bus-width = <4>.
Also, ti,needs-special-hs-handling is a legacy omap_hsmmc property that is not present on the ti,am335-sdhci nodes in am33xx-l4.dtsi, so the /delete-property/ directive is a no-op.
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi line 406
Quoted 5 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-common.dtsi new file +5
-0+ +&rtc { + ti,no-init; + status = "disabled"; +};
[Severity: Low]
Is ti,no-init valid on &rtc?
ti,no-init is a ti,sysc interconnect property rather than an OMAP RTC property, so it is not permitted by Documentation/devicetree/bindings/rtc/ti,omap-rtc.yaml and is ignored by the RTC driver.
[ ... ]
Quoted 6 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-mini.dts new file +0
-0@@ -0,0 +1,408 @@
[ ... ]
Quoted 11 lines
+&gpio0 {
arch/arm/boot/dts/ti/omap/am335x-emperor-mini.dts new file +10
-0+ gpio-line-names = + "MDIO_DATA", + "MDIO_CLK", + "SPI0_CLK", + "SPI0_MOSI", + "SPI0_MISO", + "SPI0_CS0", + "POWER_FAILURE", + "SPI1_CLK", + "SYS_BOOT12",
[ ... ]
Quoted 25 lines
+&gpio1 {
arch/arm/boot/dts/ti/omap/am335x-emperor-mini.dts new file +24
-0+ gpio-line-names = + "MMC1_DAT0", + "MMC1_DAT1", + "MMC1_DAT2", + "MMC1_DAT3", + "MMC1_DAT4", + "MMC1_DAT5", + "MMC1_DAT6", + "MMC1_DAT7", + "UART4_RX", + "UART4_TX", + "UART0_RX", + "UART0_TX", + "HMI_POWERCTRL", + "PCI_W_DIS_N", + "NC", + "NC", + "NC", + "NC", + "NC", + "NC", + "NC", + "NC", + "NC",
arch/arm/boot/dts/ti/omap/am335x-emperor-mini.dts line 90
Quoted 10 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-mini.dts new file +10
-0+ "NC", + "NC", + "NC", + "NC", + "NC", + "TEST_MODE", + "POE_DETECT_N", + "RADIO_GPIO5", + "MMC1_CMD"; +};
[Severity: Medium]
Is RADIO_GPIO5 placed on the wrong GPIO line in both am335x-emperor-mini.dts and am335x-emperor.dts?
In am335x-emperor-common.dtsi, sdr_radio_pins_default muxes the six radio GPIOs on gpio2[2..5], gpio0[7] (AM335X_PIN_ECAP0_IN_PWM0_OUT), and gpio0[19] (AM335X_PIN_XDMA_EVENT_INTR0). Here, gpio0[7] is named "SPI1_CLK", while "RADIO_GPIO5" is assigned to gpio1[30], which is AM335X_PIN_GPMC_CSN1 (muxed as mmc1_clk in emmc_pins_default). User-space lookups for RADIO_GPIO5 by line name will resolve to the eMMC clock pin instead of gpio0[7].
[ ... ]
Quoted 6 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-mini.dts new file +6
-0+ temperature-sensor@4c { + compatible = "ti,tmp431"; + reg = <0x4c>; + #address-cells = <1>; + #size-cells = <0>; +
arch/arm/boot/dts/ti/omap/am335x-emperor-mini.dts line 230
Quoted 10 lines
arch/arm/boot/dts/ti/omap/am335x-emperor-mini.dts new file +10
-0+ channel@0 { + reg = <0x0>; + label = "baseboard"; + }; + + channel@1 { + reg = <0x1>; + label = "fpga"; + }; + };
[Severity: Low]
As noted in the patch commentary, Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml sets
additionalProperties: false and does not yet define #address-cells, #size-cells, or channel@[0-9]+ child nodes, so this node causes dtbs_check validation failures until the binding change lands.
[ ... ]
Quoted 6 lines
arch/arm/boot/dts/ti/omap/am335x-emperor.dts new file +0
-0@@ -0,0 +1,262 @@
[ ... ]
Quoted 41 lines
+&gpio3 {
arch/arm/boot/dts/ti/omap/am335x-emperor.dts new file +40
-0+ gpio-line-names = + "MII1_COL", + "MII1_CRS_DV", + "MII1_RXERR", + "MII1_TXEN", + "MII1_RXDV", + "I2C0_SDA", + "I2C0_SCL", + "NC", + "NC", + "MII1_TXCLK", + "MII1_RXCLK", + "NC", + "NC", + "NC", + "RTC_IRQ", + "RTC_TAMPER", + "RADIO_INIT_B", + "RADIO_PRG_DONE", + "RADIO_POWER", + "RADIO_FLASH_MUX", + "RADIO_RESET", + "RADIO_FLASH_RESET", + "NC", + "NC", + "NC", + "NC", + "NC", + "NC", + "NC", + "NC", + "NC", + "NC"; + + eeprom-wp-hog { + gpio-hog; + gpios = <13 GPIO_ACTIVE_HIGH>; + output-low; + }; +};
[ ... ]
arch/arm/boot/dts/ti/omap/am335x-emperor.dts line 194
Quoted 7 lines
arch/arm/boot/dts/ti/omap/am335x-emperor.dts new file +7
-0+ AM33XX_PADCONF(AM335X_PIN_GPMC_CSN0, PIN_INPUT_PULLDOWN, MUX_MODE7) /* (V6) gpmc_csn0.gpio1[29] */ + AM33XX_PADCONF(AM335X_PIN_GPMC_CSN3, PIN_INPUT_PULLDOWN, MUX_MODE7) /* (T13) gpmc_csn3.gpio2[0] */ + AM33XX_PADCONF(AM335X_PIN_GPMC_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) /* (V12) gpmc_clk.gpio2[1] */ + AM33XX_PADCONF(AM335X_PIN_USB1_DRVVBUS, PIN_INPUT_PULLDOWN, MUX_MODE7) /* (F15) USB1_DRVVBUS.gpio3[13] */ + >; + }; +};
[Severity: Medium]
Should AM335X_PIN_USB1_DRVVBUS (gpio3[13]) be configured as PIN_OUTPUT and named in &gpio3 gpio-line-names instead of being listed under unused GPIO pins as PIN_INPUT_PULLDOWN and "NC"?
eeprom-wp-hog hogs gpio3[13] as an output driven low, so configuring the pad as PIN_INPUT_PULLDOWN leaves the input receiver and pull-down enabled on an output line.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
PATCH v2 3/3 MAINTAINERS: add entry for Kamstrup boards
In reply to Bruno ThomsenAdd an entry covering the Kamstrup i.MX7D and AM335x board families.
These boards are used in long-lived products that are upgraded to new kernel versions regularly, so keep the device trees maintained.
---
New patch in v2:
- Add a MAINTAINERS entry for the Kamstrup boards.
--- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
@@ -14357,6 +14357,12 @@ S: Maintained F: Documentation/hwmon/k8temp.rst F: drivers/hwmon/k8temp.c +KAMSTRUP BOARD SUPPORT +M: Bruno Thomsen <[email protected]> +S: Maintained +F: arch/arm/boot/dts/nxp/imx/imx7d-flex-concentrator*.dts* +F: arch/arm/boot/dts/ti/omap/am335x-emperor*.dts* + KANDOU KB9002 PCIE RETIMER HWMON DRIVER M: Andy Chung <[email protected]> L: [email protected]
Signature · 1 line
2.53.0