Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: stm: arduino_portenta_h7: support onboard ethernet + pf1550 driver #76542

Merged
merged 4 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions boards/arduino/portenta_h7/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ if BOARD_ARDUINO_PORTENTA_H7

if NETWORKING

config REGULATOR
default y

config NET_L2_ETHERNET
default y

Expand Down
19 changes: 17 additions & 2 deletions boards/arduino/portenta_h7/arduino_portenta_h7-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,32 @@
};
};

&rng {
status = "okay";
};

&mac {
pinctrl-0 = < &eth_ref_clk_pa1
&eth_mdio_pa2
&eth_crs_dv_pa7
&eth_mdc_pc1
&eth_rxd0_pc4
&eth_rxd1_pc5
&eth_tx_en_pg11
&eth_txd1_pg12
&eth_txd0_pg13 >;
pinctrl-names = "default";
status = "okay";
};

&mdio {
status = "okay";
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
pinctrl-names = "default";

ethernet-phy@0 {
compatible = "ethernet-phy";
reg = <0x00>;
status = "okay";
};
};

zephyr_udc0: &usbotg_hs {
Expand Down
48 changes: 48 additions & 0 deletions boards/arduino/portenta_h7/arduino_portenta_h7_stm32h747xx_m7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,54 @@

&i2c1 {
status = "okay";

pf1550: pmic@8 {
status = "okay";
reg = <0x8>;
compatible = "nxp,pf1550";

pmic_regulators: regulators {
status = "okay";
compatible = "nxp,pf1550-regulator";
pf1550_sw1: BUCK1 {
regulator-init-microvolt = <3000000>;
regulator-boot-on;
};
pf1550_sw2: BUCK2 {
regulator-init-microvolt = <3300000>;
regulator-boot-on;
};
pf1550_sw3: BUCK3 {
regulator-init-microvolt = <3300000>;
regulator-init-microamp = <2000000>;
regulator-boot-on;
};
pf1550_ldo1: LDO1 {
regulator-init-microvolt = <1000000>;
regulator-boot-on;
};
pf1550_ldo2: LDO2 {
regulator-init-microvolt = <1800000>;
regulator-boot-on;
};
pf1550_ldo3: LDO3 {
regulator-init-microvolt = <1200000>;
regulator-boot-on;
};
};

pmic_charger: charger {
status = "okay";
compatible = "nxp,pf1550-charger";
constant-charge-current-max-microamp = <100000>;
constant-charge-voltage-max-microvolt = <4200000>;
pf1550,int-gpios = <&gpiok 0 0>;
pf1550,led-behaviour = "manual-off";
pf1550,system-voltage-min-threshold-microvolt = <3500000>;
pf1550,thermistor-monitoring-mode = "thermistor";
pf1550,vbus-current-limit-microamp = <1500000>;
};
};
};

/* Only one should be enabled */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ ram: 512
flash: 1024
supported:
- gpio
- netif:eth
- i2c
- spi
- qspi
- memc
- usb_cdc
- usb_device
vendor: arduino
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

# Enable the internal SMPS regulator
CONFIG_POWER_SUPPLY_DIRECT_SMPS=y
CONFIG_POWER_SUPPLY_SMPS_1V8_SUPPLIES_LDO=y

# Enable GPIO
CONFIG_GPIO=y
Expand All @@ -25,3 +25,6 @@ CONFIG_UART_LINE_CTRL=y
# Enable regulator
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED=y

# Enable USB Stack
CONFIG_USB_DEVICE_STACK=y
1 change: 1 addition & 0 deletions drivers/charger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/charger.h)
zephyr_library_sources_ifdef(CONFIG_CHARGER_BQ24190 charger_bq24190.c)
zephyr_library_sources_ifdef(CONFIG_CHARGER_BQ25180 charger_bq25180.c)
zephyr_library_sources_ifdef(CONFIG_CHARGER_MAX20335 charger_max20335.c)
zephyr_library_sources_ifdef(CONFIG_CHARGER_PF1550 charger_pf1550.c)
zephyr_library_sources_ifdef(CONFIG_SBS_CHARGER sbs_charger.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE charger_handlers.c)
zephyr_library_sources_ifdef(CONFIG_EMUL_SBS_CHARGER emul_sbs_charger.c)
1 change: 1 addition & 0 deletions drivers/charger/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ source "drivers/charger/Kconfig.sbs_charger"
source "drivers/charger/Kconfig.bq24190"
source "drivers/charger/Kconfig.bq25180"
source "drivers/charger/Kconfig.max20335"
source "drivers/charger/Kconfig.pf1550"

endif # CHARGER
12 changes: 12 additions & 0 deletions drivers/charger/Kconfig.pf1550
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2024 Arduino SA
# SPDX-License-Identifier: Apache-2.0

config CHARGER_PF1550
bool "NXP PF1550 battery charger driver"
default y
depends on DT_HAS_NXP_PF1550_CHARGER_ENABLED
select GPIO
select I2C
select MFD
help
Enable the NXP PF1550 battery charger driver.
Loading
Loading