Compare commits

...

7 Commits

10 changed files with 2281 additions and 3 deletions

View File

@ -1075,7 +1075,8 @@ dtb-$(CONFIG_ASPEED_AST2600) += ast2600-evb.dtb
dtb-$(CONFIG_ARCH_STI) += stih410-b2260.dtb
dtb-$(CONFIG_STM32MP13x) += \
stm32mp135f-dk.dtb
stm32mp135f-dk.dtb \
stm32mp135d-gateway.dtb
dtb-$(CONFIG_STM32MP15x) += \
stm32mp157a-dk1.dtb \
@ -1098,7 +1099,8 @@ dtb-$(CONFIG_STM32MP15x) += \
stm32mp157f-ev1.dtb \
stm32mp15xx-dhcom-pdk2.dtb \
stm32mp15xx-dhcom-picoitx.dtb \
stm32mp15xx-dhcor-avenger96.dtb
stm32mp15xx-dhcor-avenger96.dtb \
stm32mp157a-panguboard.dtb
dtb-$(CONFIG_SOC_K3_AM6) += k3-am654-base-board.dtb k3-am654-r5-base-board.dtb
dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \

View File

@ -0,0 +1,662 @@
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
* Copyright (C) i2SOM 2023 - All Rights Reserved
* Author: Steve Chen <steve.chen@i2som.com>
*/
#include <dt-bindings/pinctrl/stm32-pinfunc.h>
&pinctrl {
adc1_usb_cc_pins_a: adc1-usb-cc-pins-0 {
pins {
pinmux = <STM32_PINMUX('F', 11, ANALOG)>, /* ADC1 in12 */
<STM32_PINMUX('A', 5, ANALOG)>; /* ADC1 in6 */
};
};
eth1_rgmii_pins_a: eth1_mx-0 {
pins1 {
pinmux = <STM32_PINMUX('D', 7, AF10)>, /* ETH1_RX_CLK */
<STM32_PINMUX('A', 7, AF11)>, /* ETH1_RX_CTL */
<STM32_PINMUX('B', 0, AF11)>, /* ETH1_RXD2 */
<STM32_PINMUX('B', 1, AF11)>, /* ETH1_RXD3 */
<STM32_PINMUX('C', 4, AF11)>, /* ETH1_RXD0 */
<STM32_PINMUX('C', 5, AF11)>; /* ETH1_RXD1 */
bias-disable;
};
pins2 {
pinmux = <STM32_PINMUX('A', 2, AF11)>; /* ETH1_MDIO */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
pins3 {
pinmux = <STM32_PINMUX('B', 11, AF11)>, /* ETH1_TX_CTL */
<STM32_PINMUX('C', 1, AF11)>, /* ETH1_GTX_CLK */
<STM32_PINMUX('C', 2, AF11)>, /* ETH1_TXD2 */
<STM32_PINMUX('E', 5, AF10)>, /* ETH1_TXD3 */
<STM32_PINMUX('F', 12, AF11)>, /* ETH1_CLK125 */
<STM32_PINMUX('G', 2, AF11)>, /* ETH1_MDC */
<STM32_PINMUX('G', 13, AF11)>, /* ETH1_TXD0 */
<STM32_PINMUX('G', 14, AF11)>; /* ETH1_TXD1 */
bias-disable;
drive-push-pull;
slew-rate = <2>;
};
};
eth1_rgmii_sleep_pins_a: eth1_sleep_mx-0 {
pins {
pinmux = <STM32_PINMUX('D', 7, ANALOG)>, /* ETH1_RX_CLK */
<STM32_PINMUX('A', 2, ANALOG)>, /* ETH1_MDIO */
<STM32_PINMUX('A', 7, ANALOG)>, /* ETH1_RX_CTL */
<STM32_PINMUX('B', 0, ANALOG)>, /* ETH1_RXD2 */
<STM32_PINMUX('B', 1, ANALOG)>, /* ETH1_RXD3 */
<STM32_PINMUX('B', 11, ANALOG)>, /* ETH1_TX_CTL */
<STM32_PINMUX('C', 1, ANALOG)>, /* ETH1_GTX_CLK */
<STM32_PINMUX('C', 2, ANALOG)>, /* ETH1_TXD2 */
<STM32_PINMUX('C', 4, ANALOG)>, /* ETH1_RXD0 */
<STM32_PINMUX('C', 5, ANALOG)>, /* ETH1_RXD1 */
<STM32_PINMUX('E', 5, ANALOG)>, /* ETH1_TXD3 */
<STM32_PINMUX('F', 12, ANALOG)>, /* ETH1_CLK125 */
<STM32_PINMUX('G', 2, ANALOG)>, /* ETH1_MDC */
<STM32_PINMUX('G', 13, ANALOG)>, /* ETH1_TXD0 */
<STM32_PINMUX('G', 14, ANALOG)>; /* ETH1_TXD1 */
};
};
eth2_rgmii_pins_a: eth2_mx-0 {
pins1 {
pinmux =
<STM32_PINMUX('F', 7, AF11)>, /* ETH2_TXD0 */
<STM32_PINMUX('G', 11, AF10)>, /* ETH2_TXD1 */
<STM32_PINMUX('G', 1, AF10)>, /* ETH2_TXD2 */
<STM32_PINMUX('E', 6, AF11)>, /* ETH2_TXD3 */
<STM32_PINMUX('F', 6, AF11)>, /* ETH2_TX_CTL */
<STM32_PINMUX('G', 3, AF10)>, /* ETH2_GTX_CLK */
<STM32_PINMUX('G', 5, AF10)>, /* ETH2_MDC */
<STM32_PINMUX('B', 6, AF11)>, /* ETH2_MDIO */
<STM32_PINMUX('H', 2, AF13)>; /* ETH2_CLK125 */
bias-disable;
drive-push-pull;
slew-rate = <1>;
};
pins2 {
pinmux =
<STM32_PINMUX('A', 12, AF11)>, /* ETH2_RX_CTL */
<STM32_PINMUX('F', 4, AF11)>, /* ETH2_RXD0 */
<STM32_PINMUX('E', 2, AF10)>, /* ETH2_RXD1 */
<STM32_PINMUX('H', 6, AF12)>, /* ETH2_RXD2 */
<STM32_PINMUX('A', 8, AF11)>, /* ETH2_RXD3 */
<STM32_PINMUX('H', 11, AF11)>; /* ETH2_RX_CLK */
bias-disable;
};
};
eth2_rgmii_sleep_pins_a: eth2_sleep_mx-0 {
pins {
pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* ETH2_RXD3 */
<STM32_PINMUX('A', 12, ANALOG)>, /* ETH2_RX_CTL */
<STM32_PINMUX('B', 6, ANALOG)>, /* ETH2_MDIO */
<STM32_PINMUX('E', 2, ANALOG)>, /* ETH2_RXD1 */
<STM32_PINMUX('E', 6, ANALOG)>, /* ETH2_TXD3 */
<STM32_PINMUX('F', 4, ANALOG)>, /* ETH2_RXD0 */
<STM32_PINMUX('F', 6, ANALOG)>, /* ETH2_TX_CTL */
<STM32_PINMUX('F', 7, ANALOG)>, /* ETH2_TXD0 */
<STM32_PINMUX('G', 1, ANALOG)>, /* ETH2_TXD2 */
<STM32_PINMUX('G', 3, ANALOG)>, /* ETH2_GTX_CLK */
<STM32_PINMUX('G', 5, ANALOG)>, /* ETH2_MDC */
<STM32_PINMUX('G', 11, ANALOG)>, /* ETH2_TXD1 */
<STM32_PINMUX('H', 2, ANALOG)>, /* ETH2_CLK125 */
<STM32_PINMUX('H', 6, ANALOG)>, /* ETH2_RXD2 */
<STM32_PINMUX('H', 11, ANALOG)>; /* ETH2_RX_CLK */
};
};
goodix_pins_a: goodix-0 {
pins {
pinmux = <STM32_PINMUX('F', 5, GPIO)>;
bias-pull-down;
};
};
i2c1_pins_a: i2c1-0 {
pins {
pinmux = <STM32_PINMUX('D', 12, AF5)>, /* I2C1_SCL */
<STM32_PINMUX('E', 8, AF5)>; /* I2C1_SDA */
bias-disable;
drive-open-drain;
slew-rate = <0>;
};
};
i2c1_sleep_pins_a: i2c1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('D', 12, ANALOG)>, /* I2C1_SCL */
<STM32_PINMUX('E', 8, ANALOG)>; /* I2C1_SDA */
};
};
i2c3_pins_test_b: i2c3-test-1 {
pins {
pinmux = <STM32_PINMUX('H', 3, AF4)>, /* i2c3_SCL */
<STM32_PINMUX('H', 7, AF5)>; /* i2c3_SDA */
bias-disable;
drive-open-drain;
slew-rate = <0>;
};
};
i2c3_sleep_pins_test_b: i2c3-test-sleep-1 {
pins {
pinmux = <STM32_PINMUX('H', 3, ANALOG)>, /* i2c3_SCL */
<STM32_PINMUX('H', 7, ANALOG)>; /* i2c3_SDA */
};
};
i2c5_pins_a: i2c5-0 {
pins {
pinmux = <STM32_PINMUX('D', 1, AF4)>, /* I2C5_SCL */
<STM32_PINMUX('H', 6, AF4)>; /* I2C5_SDA */
bias-disable;
drive-open-drain;
slew-rate = <0>;
};
};
i2c5_sleep_pins_a: i2c5-sleep-0 {
pins {
pinmux = <STM32_PINMUX('D', 1, ANALOG)>, /* I2C5_SCL */
<STM32_PINMUX('H', 6, ANALOG)>; /* I2C5_SDA */
};
};
ltdc_pins_a: ltdc-0 {
pins {
pinmux = <STM32_PINMUX('D', 9, AF13)>, /* LCD_CLK */
<STM32_PINMUX('C', 6, AF14)>, /* LCD_HSYNC */
<STM32_PINMUX('G', 4, AF11)>, /* LCD_VSYNC */
<STM32_PINMUX('H', 9, AF11)>, /* LCD_DE */
<STM32_PINMUX('G', 7, AF14)>, /* LCD_R2 */
<STM32_PINMUX('B', 12, AF13)>, /* LCD_R3 */
<STM32_PINMUX('D', 14, AF14)>, /* LCD_R4 */
<STM32_PINMUX('E', 7, AF14)>, /* LCD_R5 */
<STM32_PINMUX('E', 13, AF14)>, /* LCD_R6 */
<STM32_PINMUX('E', 9, AF14)>, /* LCD_R7 */
<STM32_PINMUX('H', 13, AF14)>, /* LCD_G2 */
<STM32_PINMUX('F', 3, AF14)>, /* LCD_G3 */
<STM32_PINMUX('D', 5, AF14)>, /* LCD_G4 */
<STM32_PINMUX('G', 0, AF14)>, /* LCD_G5 */
<STM32_PINMUX('C', 7, AF14)>, /* LCD_G6 */
<STM32_PINMUX('A', 15, AF11)>, /* LCD_G7 */
<STM32_PINMUX('D', 10, AF14)>, /* LCD_B2 */
<STM32_PINMUX('F', 2, AF14)>, /* LCD_B3 */
<STM32_PINMUX('H', 14, AF11)>, /* LCD_B4 */
<STM32_PINMUX('E', 0, AF14)>, /* LCD_B5 */
<STM32_PINMUX('B', 6, AF7)>, /* LCD_B6 */
<STM32_PINMUX('F', 1, AF13)>; /* LCD_B7 */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
};
ltdc_sleep_pins_a: ltdc-sleep-0 {
pins {
pinmux = <STM32_PINMUX('D', 9, ANALOG)>, /* LCD_CLK */
<STM32_PINMUX('C', 6, ANALOG)>, /* LCD_HSYNC */
<STM32_PINMUX('G', 4, ANALOG)>, /* LCD_VSYNC */
<STM32_PINMUX('H', 9, ANALOG)>, /* LCD_DE */
<STM32_PINMUX('G', 7, ANALOG)>, /* LCD_R2 */
<STM32_PINMUX('B', 12, ANALOG)>, /* LCD_R3 */
<STM32_PINMUX('D', 14, ANALOG)>, /* LCD_R4 */
<STM32_PINMUX('E', 7, ANALOG)>, /* LCD_R5 */
<STM32_PINMUX('E', 13, ANALOG)>, /* LCD_R6 */
<STM32_PINMUX('E', 9, ANALOG)>, /* LCD_R7 */
<STM32_PINMUX('H', 13, ANALOG)>, /* LCD_G2 */
<STM32_PINMUX('F', 3, ANALOG)>, /* LCD_G3 */
<STM32_PINMUX('D', 5, ANALOG)>, /* LCD_G4 */
<STM32_PINMUX('G', 0, ANALOG)>, /* LCD_G5 */
<STM32_PINMUX('C', 7, ANALOG)>, /* LCD_G6 */
<STM32_PINMUX('A', 15, ANALOG)>, /* LCD_G7 */
<STM32_PINMUX('D', 10, ANALOG)>, /* LCD_B2 */
<STM32_PINMUX('F', 2, ANALOG)>, /* LCD_B3 */
<STM32_PINMUX('H', 14, ANALOG)>, /* LCD_B4 */
<STM32_PINMUX('E', 0, ANALOG)>, /* LCD_B5 */
<STM32_PINMUX('B', 6, ANALOG)>, /* LCD_B6 */
<STM32_PINMUX('F', 1, ANALOG)>; /* LCD_B7 */
};
};
m_can2_pins_a: m-can2-0 {
pins1 {
pinmux = <STM32_PINMUX('G', 1, AF9)>; /* CAN2_TX */
slew-rate = <1>;
drive-push-pull;
bias-disable;
};
pins2 {
pinmux = <STM32_PINMUX('G', 3, AF9)>; /* CAN2_RX */
bias-disable;
};
};
m_can2_sleep_pins_a: m_can2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('G', 1, ANALOG)>, /* CAN2_TX */
<STM32_PINMUX('G', 3, ANALOG)>; /* CAN2_RX */
};
};
pwm3_pins_a: pwm3-0 {
pins {
pinmux = <STM32_PINMUX('B', 1, AF2)>; /* TIM3_CH4 */
bias-pull-down;
drive-push-pull;
slew-rate = <0>;
};
};
pwm3_sleep_pins_a: pwm3-sleep-0 {
pins {
pinmux = <STM32_PINMUX('B', 1, ANALOG)>; /* TIM3_CH4 */
};
};
pwm4_pins_a: pwm4-0 {
pins {
pinmux = <STM32_PINMUX('D', 13, AF2)>; /* TIM4_CH2 */
bias-pull-down;
drive-push-pull;
slew-rate = <0>;
};
};
pwm4_sleep_pins_a: pwm4-sleep-0 {
pins {
pinmux = <STM32_PINMUX('D', 13, ANALOG)>; /* TIM4_CH2 */
};
};
pwm8_pins_a: pwm8-0 {
pins {
pinmux = <STM32_PINMUX('E', 5, AF3)>; /* TIM8_CH3 */
bias-pull-down;
drive-push-pull;
slew-rate = <0>;
};
};
pwm8_sleep_pins_a: pwm8-sleep-0 {
pins {
pinmux = <STM32_PINMUX('E', 5, ANALOG)>; /* TIM8_CH3 */
};
};
pwm14_pins_a: pwm12-0 {
pins {
pinmux = <STM32_PINMUX('F', 9, AF9)>; /* TIM14_CH1 */
bias-pull-down;
drive-push-pull;
slew-rate = <0>;
};
};
pwm14_sleep_pins_a: pwm12-sleep-0 {
pins {
pinmux = <STM32_PINMUX('F', 9, ANALOG)>; /* TIM14_CH1 */
};
};
rtc_out2_rmp_pins_a: rtc-out2-rmp-pins-0 {
pins {
pinmux = <STM32_PINMUX('I', 1, ANALOG)>; /* RTC_OUT2_RMP */
};
};
sai1_pins_a: sai1-0 {
pins {
pinmux = <STM32_PINMUX('A', 4, AF12)>, /* SAI1_SCK_A */
<STM32_PINMUX('A', 0, AF6)>, /* SAI1_SD_B */
<STM32_PINMUX('A', 5, AF6)>, /* SAI1_SD_A */
<STM32_PINMUX('F', 11, AF6)>; /* SAI1_FS_A */
slew-rate = <0>;
drive-push-pull;
bias-disable;
};
};
sai1_sleep_pins_a: sai1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('A', 4, ANALOG)>, /* SAI1_SCK_A */
<STM32_PINMUX('A', 0, ANALOG)>, /* SAI1_SD_B */
<STM32_PINMUX('A', 5, ANALOG)>, /* SAI1_SD_A */
<STM32_PINMUX('F', 11, ANALOG)>; /* SAI1_FS_A */
};
};
sdmmc1_b4_pins_a: sdmmc1-b4-0 {
pins {
pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
<STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */
<STM32_PINMUX('C', 10, AF12)>, /* SDMMC1_D2 */
<STM32_PINMUX('C', 11, AF12)>, /* SDMMC1_D3 */
<STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */
slew-rate = <1>;
drive-push-pull;
bias-disable;
};
};
sdmmc1_b4_od_pins_a: sdmmc1-b4-od-0 {
pins1 {
pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
<STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */
<STM32_PINMUX('C', 10, AF12)>, /* SDMMC1_D2 */
<STM32_PINMUX('C', 11, AF12)>; /* SDMMC1_D3 */
slew-rate = <1>;
drive-push-pull;
bias-disable;
};
pins2 {
pinmux = <STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */
slew-rate = <1>;
drive-open-drain;
bias-disable;
};
};
sdmmc1_b4_sleep_pins_a: sdmmc1-b4-sleep-0 {
pins {
pinmux = <STM32_PINMUX('C', 8, ANALOG)>, /* SDMMC1_D0 */
<STM32_PINMUX('C', 9, ANALOG)>, /* SDMMC1_D1 */
<STM32_PINMUX('C', 10, ANALOG)>, /* SDMMC1_D2 */
<STM32_PINMUX('C', 11, ANALOG)>, /* SDMMC1_D3 */
<STM32_PINMUX('C', 12, ANALOG)>, /* SDMMC1_CK */
<STM32_PINMUX('D', 2, ANALOG)>; /* SDMMC1_CMD */
};
};
sdmmc1_clk_pins_a: sdmmc1-clk-0 {
pins {
pinmux = <STM32_PINMUX('C', 12, AF12)>; /* SDMMC1_CK */
slew-rate = <1>;
drive-push-pull;
bias-disable;
};
};
sdmmc2_b4_pins_a: sdmmc2-b4-0 {
pins {
pinmux = <STM32_PINMUX('B', 14, AF10)>, /* SDMMC2_D0 */
<STM32_PINMUX('B', 15, AF10)>, /* SDMMC2_D1 */
<STM32_PINMUX('B', 3, AF10)>, /* SDMMC2_D2 */
<STM32_PINMUX('B', 4, AF10)>, /* SDMMC2_D3 */
<STM32_PINMUX('F', 0, AF10)>, /* SDMMC2_D4 */
<STM32_PINMUX('B', 9, AF10)>, /* SDMMC2_D5 */
<STM32_PINMUX('C', 6, AF10)>, /* SDMMC2_D6 */
<STM32_PINMUX('C', 7, AF10)>, /* SDMMC2_D7 */
<STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
slew-rate = <1>;
drive-push-pull;
bias-pull-up;
};
};
sdmmc2_b4_od_pins_a: sdmmc2-b4-od-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 14, AF10)>, /* SDMMC2_D0 */
<STM32_PINMUX('B', 15, AF10)>, /* SDMMC2_D1 */
<STM32_PINMUX('B', 3, AF10)>, /* SDMMC2_D2 */
<STM32_PINMUX('B', 4, AF10)>, /* SDMMC2_D3 */
<STM32_PINMUX('F', 0, AF10)>, /* SDMMC2_D4 */
<STM32_PINMUX('B', 9, AF10)>, /* SDMMC2_D5 */
<STM32_PINMUX('C', 6, AF10)>, /* SDMMC2_D6 */
<STM32_PINMUX('C', 7, AF10)>; /* SDMMC2_D7 */
slew-rate = <1>;
drive-push-pull;
bias-pull-up;
};
pins2 {
pinmux = <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
slew-rate = <1>;
drive-open-drain;
bias-pull-up;
};
};
sdmmc2_b4_sleep_pins_a: sdmmc2-b4-sleep-0 {
pins {
pinmux = <STM32_PINMUX('B', 14, ANALOG)>, /* SDMMC2_D0 */
<STM32_PINMUX('B', 15, ANALOG)>, /* SDMMC2_D1 */
<STM32_PINMUX('B', 3, ANALOG)>, /* SDMMC2_D2 */
<STM32_PINMUX('B', 4, ANALOG)>, /* SDMMC2_D3 */
<STM32_PINMUX('F', 0, ANALOG)>, /* SDMMC2_D4 */
<STM32_PINMUX('B', 9, ANALOG)>, /* SDMMC2_D5 */
<STM32_PINMUX('C', 6, ANALOG)>, /* SDMMC2_D6 */
<STM32_PINMUX('C', 7, ANALOG)>, /* SDMMC2_D7 */
<STM32_PINMUX('G', 6, ANALOG)>; /* SDMMC2_CMD */
slew-rate = <1>;
drive-push-pull;
bias-pull-up;
};
};
sdmmc2_clk_pins_a: sdmmc2-clk-0 {
pins {
pinmux = <STM32_PINMUX('E', 3, AF10)>; /* SDMMC2_CK */
slew-rate = <1>;
drive-push-pull;
bias-pull-up;
};
};
spi5_pins_a: spi5-0 {
pins1 {
pinmux = <STM32_PINMUX('H', 7, AF6)>, /* SPI5_SCK */
<STM32_PINMUX('H', 3, AF5)>; /* SPI5_MOSI */
bias-disable;
drive-push-pull;
slew-rate = <1>;
};
pins2 {
pinmux = <STM32_PINMUX('A', 8, AF5)>; /* SPI5_MISO */
bias-disable;
};
};
spi5_sleep_pins_a: spi5-sleep-0 {
pins {
pinmux = <STM32_PINMUX('H', 7, ANALOG)>, /* SPI5_SCK */
<STM32_PINMUX('A', 8, ANALOG)>, /* SPI5_MISO */
<STM32_PINMUX('H', 3, ANALOG)>; /* SPI5_MOSI */
};
};
stm32g0_intn_pins_a: stm32g0-intn-0 {
pins {
pinmux = <STM32_PINMUX('I', 2, GPIO)>;
bias-pull-up;
};
};
uart4_pins_a: uart4-0 {
pins1 {
pinmux = <STM32_PINMUX('D', 6, AF8)>; /* UART4_TX */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
pins2 {
pinmux = <STM32_PINMUX('D', 8, AF8)>; /* UART4_RX */
bias-disable;
};
};
uart4_idle_pins_a: uart4-idle-0 {
pins1 {
pinmux = <STM32_PINMUX('D', 6, ANALOG)>; /* UART4_TX */
};
pins2 {
pinmux = <STM32_PINMUX('D', 8, AF8)>; /* UART4_RX */
bias-disable;
};
};
uart4_sleep_pins_a: uart4-sleep-0 {
pins {
pinmux = <STM32_PINMUX('D', 6, ANALOG)>, /* UART4_TX */
<STM32_PINMUX('D', 8, ANALOG)>; /* UART4_RX */
};
};
uart8_pins_a: uart8-0 {
pins1 {
pinmux = <STM32_PINMUX('E', 1, AF8)>; /* UART8_TX */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
pins2 {
pinmux = <STM32_PINMUX('F', 9, AF8)>; /* UART8_RX */
bias-pull-up;
};
};
uart8_idle_pins_a: uart8-idle-0 {
pins1 {
pinmux = <STM32_PINMUX('E', 1, ANALOG)>; /* UART8_TX */
};
pins2 {
pinmux = <STM32_PINMUX('F', 9, AF8)>; /* UART8_RX */
bias-pull-up;
};
};
uart8_sleep_pins_a: uart8-sleep-0 {
pins {
pinmux = <STM32_PINMUX('E', 1, ANALOG)>, /* UART8_TX */
<STM32_PINMUX('F', 9, ANALOG)>; /* UART8_RX */
};
};
usart1_idle_pins_a: usart1-idle-0 {
pins1 {
pinmux = <STM32_PINMUX('C', 0, ANALOG)>, /* USART1_TX */
<STM32_PINMUX('A', 7, ANALOG)>; /* USART1_CTS_NSS */
};
pins2 {
pinmux = <STM32_PINMUX('C', 2, AF7)>; /* USART1_RTS */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
pins3 {
pinmux = <STM32_PINMUX('B', 0, AF4)>; /* USART1_RX */
bias-pull-up;
};
};
usart1_sleep_pins_a: usart1-sleep-0 {
pins {
pinmux = <STM32_PINMUX('C', 0, ANALOG)>, /* USART1_TX */
<STM32_PINMUX('C', 2, ANALOG)>, /* USART1_RTS */
<STM32_PINMUX('A', 7, ANALOG)>, /* USART1_CTS_NSS */
<STM32_PINMUX('B', 0, ANALOG)>; /* USART1_RX */
};
};
usart2_pins_a: usart2-0 {
pins1 {
pinmux = <STM32_PINMUX('H', 12, AF1)>, /* USART2_TX */
<STM32_PINMUX('D', 4, AF3)>; /* USART2_RTS */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
pins2 {
pinmux = <STM32_PINMUX('D', 15, AF1)>, /* USART2_RX */
<STM32_PINMUX('E', 11, AF2)>; /* USART2_CTS_NSS */
bias-disable;
};
};
usart2_idle_pins_a: usart2-idle-0 {
pins1 {
pinmux = <STM32_PINMUX('H', 12, ANALOG)>, /* USART2_TX */
<STM32_PINMUX('E', 11, ANALOG)>; /* USART2_CTS_NSS */
};
pins2 {
pinmux = <STM32_PINMUX('D', 4, AF3)>; /* USART2_RTS */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
pins3 {
pinmux = <STM32_PINMUX('D', 15, AF1)>; /* USART2_RX */
bias-disable;
};
};
usart2_sleep_pins_a: usart2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('H', 12, ANALOG)>, /* USART2_TX */
<STM32_PINMUX('D', 4, ANALOG)>, /* USART2_RTS */
<STM32_PINMUX('D', 15, ANALOG)>, /* USART2_RX */
<STM32_PINMUX('E', 11, ANALOG)>; /* USART2_CTS_NSS */
};
};
m_can2_pins_a: m-can2-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 13, AF9)>; /* CAN2_TX */
slew-rate = <1>;
drive-push-pull;
bias-disable;
};
pins2 {
pinmux = <STM32_PINMUX('B', 5, AF9)>; /* CAN2_RX */
bias-disable;
};
};
m_can2_sleep_pins_a: m_can2-sleep-0 {
pins {
pinmux = <STM32_PINMUX('B', 13, ANALOG)>, /* CAN2_TX */
<STM32_PINMUX('B', 5, ANALOG)>; /* CAN2_RX */
};
};
quadspi_pins_mx: quadspi_mx-0 {
pins1 {
pinmux = <STM32_PINMUX('B', 2, AF9)>, /* QUADSPI_BK1_NCS */
<STM32_PINMUX('D', 7, AF11)>, /* QUADSPI_BK1_IO2 */
<STM32_PINMUX('D', 13, AF9)>, /* QUADSPI_BK1_IO3 */
<STM32_PINMUX('F', 8, AF10)>, /* QUADSPI_BK1_IO0 */
<STM32_PINMUX('F', 9, AF10)>; /* QUADSPI_BK1_IO1 */
bias-disable;
drive-push-pull;
slew-rate = <1>;
};
pins2 {
pinmux = <STM32_PINMUX('F', 10, AF9)>; /* QUADSPI_CLK */
bias-disable;
drive-push-pull;
slew-rate = <2>;
};
};
quadspi_sleep_pins_mx: quadspi_sleep_mx-0 {
pins {
pinmux = <STM32_PINMUX('B', 2, ANALOG)>, /* QUADSPI_BK1_NCS */
<STM32_PINMUX('D', 7, ANALOG)>, /* QUADSPI_BK1_IO2 */
<STM32_PINMUX('D', 13, ANALOG)>, /* QUADSPI_BK1_IO3 */
<STM32_PINMUX('F', 8, ANALOG)>, /* QUADSPI_BK1_IO0 */
<STM32_PINMUX('F', 9, ANALOG)>, /* QUADSPI_BK1_IO1 */
<STM32_PINMUX('F', 10, ANALOG)>; /* QUADSPI_CLK */
};
};
};

View File

@ -0,0 +1,411 @@
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
* Copyright (C) STMicroelectronics 2021 - All Rights Reserved
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/rtc/rtc-stm32.h>
#include "stm32mp135.dtsi"
#include "stm32mp13xf.dtsi"
#include "stm32mp13-gateway-pinctrl.dtsi"
/ {
model = "STMicroelectronics STM32MP135F-DK Discovery Board";
compatible = "st,stm32mp135f-dk", "st,stm32mp135";
aliases {
ethernet0 = &eth1;
ethernet1 = &eth2;
serial0 = &uart4;
serial1 = &usart1;
serial2 = &uart8;
serial3 = &usart2;
};
chosen {
#address-cells = <1>;
#size-cells = <1>;
ranges;
stdout-path = "serial0:115200n8";
framebuffer {
compatible = "simple-framebuffer";
clocks = <&rcc LTDC_PX>;
status = "disabled";
};
};
clocks {
clk_ext_camera: clk-ext-camera {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24000000>;
};
clk_mco1: clk-mco1 {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24000000>;
};
};
/*
leds {
compatible = "gpio-leds";
led-blue {
function = LED_FUNCTION_HEARTBEAT;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
linux,default-trigger = "heartbeat";
default-state = "off";
};
};
*/
v3v3_ao: v3v3_ao {
compatible = "regulator-fixed";
regulator-name = "v3v3_ao";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
vdd_usb: vdd_usb {
compatible = "regulator-fixed";
regulator-name = "vdd_usb";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
};
&crc1 {
status = "okay";
};
&cryp {
status = "okay";
};
&dcmipp {
status = "disabled";
};
&dma1 {
sram = <&dma_pool>;
};
&dma2 {
sram = <&dma_pool>;
};
&dts {
status = "okay";
};
&i2c3 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c3_pins_test_b>;
pinctrl-1 = <&i2c3_sleep_pins_test_b>;
i2c-scl-rising-time-ns = <285>;
i2c-scl-falling-time-ns = <9>;
clock-frequency = <400000>;
status = "okay";
/* spare dmas for other usage */
/delete-property/dmas;
/delete-property/dma-names;
};
&eth1 {
status = "okay";
pinctrl-0 = <&eth1_rgmii_pins_a>;
pinctrl-1 = <&eth1_rgmii_sleep_pins_a>;
pinctrl-names = "default", "sleep";
phy-mode = "rgmii-id";
max-speed = <1000>;
phy-handle = <&phy0_eth1>;
// st,ext-phyclk;
// st,eth-clk-sel;
st,phy-reset-gpios = <&gpiob 10 GPIO_ACTIVE_HIGH>;
mdio1 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy0_eth1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};
};
};
&eth2 {
status = "okay";
pinctrl-0 = <&eth2_rgmii_pins_a>;
pinctrl-1 = <&eth2_rgmii_sleep_pins_a>;
pinctrl-names = "default", "sleep";
phy-mode = "rgmii-id";
max-speed = <1000>;
phy-handle = <&phy0_eth2>;
// st,ext-phyclk;
// st,eth-clk-sel;
phy-supply = <&v3v3_ao>;
st,phy-reset-gpios = <&gpioh 5 GPIO_ACTIVE_HIGH>;
// reset-deassert-us = <1000>;
// reset-assert-us = <1000>;
mdio1 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy0_eth2: ethernet-phy@2 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <2>;
};
};
};
&i2c1 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c1_pins_a>;
pinctrl-1 = <&i2c1_sleep_pins_a>;
i2c-scl-rising-time-ns = <96>;
i2c-scl-falling-time-ns = <3>;
clock-frequency = <1000000>;
status = "disabled";
/* spare dmas for other usage */
/delete-property/dmas;
/delete-property/dma-names;
};
&i2c5 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c5_pins_a>;
pinctrl-1 = <&i2c5_sleep_pins_a>;
i2c-scl-rising-time-ns = <170>;
i2c-scl-falling-time-ns = <5>;
clock-frequency = <400000>;
status = "disabled";
/* spare dmas for other usage */
/delete-property/dmas;
/delete-property/dma-names;
};
&iwdg2 {
timeout-sec = <32>;
status = "okay";
};
&ltdc {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&ltdc_pins_a>;
pinctrl-1 = <&ltdc_sleep_pins_a>;
status = "disabled";
};
&rtc {
st,lsco = <RTC_OUT2_RMP>;
pinctrl-0 = <&rtc_out2_rmp_pins_a>;
pinctrl-names = "default";
status = "okay";
};
/* TF */
&sdmmc1 {
pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_clk_pins_a>;
pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_clk_pins_a>;
pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
cd-gpios = <&gpioh 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
disable-wp;
st,neg-edge;
bus-width = <4>;
vmmc-supply = <&v3v3_ao>;
status = "okay";
};
/* eMMC */
&sdmmc2 {
pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_clk_pins_a>;
pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_clk_pins_a>;
pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
non-removable;
no-sd;
no-sdio;
// st,neg-edge;
bus-width = <8>;
vmmc-supply = <&v3v3_ao>;
vqmmc-supply = <&v3v3_ao>;
// mmc-pwrseq = <&wifi_pwrseq>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
};
&spi5 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi5_pins_a>;
pinctrl-1 = <&spi5_sleep_pins_a>;
status = "disabled";
};
&sram {
dma_pool: dma-sram@0 {
reg = <0x0 0x4000>;
pool;
};
};
&timers3 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
pwm {
pinctrl-0 = <&pwm3_pins_a>;
pinctrl-1 = <&pwm3_sleep_pins_a>;
pinctrl-names = "default", "sleep";
status = "okay";
};
timer@2 {
status = "okay";
};
};
&timers4 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
pwm {
pinctrl-0 = <&pwm4_pins_a>;
pinctrl-1 = <&pwm4_sleep_pins_a>;
pinctrl-names = "default", "sleep";
status = "okay";
};
timer@3 {
status = "okay";
};
};
&timers8 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
pwm {
pinctrl-0 = <&pwm8_pins_a>;
pinctrl-1 = <&pwm8_sleep_pins_a>;
pinctrl-names = "default", "sleep";
status = "okay";
};
timer@7 {
status = "okay";
};
};
&timers14 {
status = "disabled";
pwm {
pinctrl-0 = <&pwm14_pins_a>;
pinctrl-1 = <&pwm14_sleep_pins_a>;
pinctrl-names = "default", "sleep";
status = "okay";
};
timer@13 {
status = "okay";
};
};
&uart4 {
pinctrl-names = "default", "sleep", "idle";
pinctrl-0 = <&uart4_pins_a>;
pinctrl-1 = <&uart4_sleep_pins_a>;
pinctrl-2 = <&uart4_idle_pins_a>;
/delete-property/dmas;
/delete-property/dma-names;
status = "okay";
};
&uart8 {
pinctrl-names = "default", "sleep", "idle";
// pinctrl-0 = <&uart8_pins_a>;
// pinctrl-1 = <&uart8_sleep_pins_a>;
// pinctrl-2 = <&uart8_idle_pins_a>;
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
};
&usart1 {
pinctrl-names = "default", "sleep", "idle";
// pinctrl-0 = <&usart1_pins_a>;
// pinctrl-1 = <&usart1_sleep_pins_a>;
// pinctrl-2 = <&usart1_idle_pins_a>;
// uart-has-rtscts;
status = "disabled";
};
&usart2 {
pinctrl-names = "default", "sleep", "idle";
// pinctrl-0 = <&usart2_pins_a>;
// pinctrl-1 = <&usart2_sleep_pins_a>;
// pinctrl-2 = <&usart2_idle_pins_a>;
// uart-has-rtscts;
status = "disabled";
};
&usbh_ehci {
phys = <&usbphyc_port0>;
status = "okay";
};
&usbotg_hs {
phys = <&usbphyc_port1 0>;
phy-names = "usb2-phy";
u-boot,force-b-session-valid;
u-boot,force-vbus-detection;
dr_mode = "peripheral";
usb-role-switch;
role-switch-default-mode = "peripheral";
status = "okay";
};
&usbphyc {
status = "okay";
};
&usbphyc_port0 {
phy-supply = <&vdd_usb>;
};
&usbphyc_port1 {
phy-supply = <&vdd_usb>;
};
&vdd_usb {
u-boot,dm-pre-reloc;
};
/*
&qspi {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&quadspi_pins_mx>;
pinctrl-1 = <&quadspi_sleep_pins_mx>;
reg = <0x58003000 0x1000>,
<0x70000000 0x4000000>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
flash0: MT29F2G01AB@0 {
compatible = "spi-nand";
reg = <0>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
spi-max-frequency = <64000000>;
#address-cells = <1>;
#size-cells = <1>;
};
};
*/

View File

@ -0,0 +1,50 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause
/*
* Copyright (C) STMicroelectronics 2021 - All Rights Reserved
*/
#include "stm32mp13-u-boot.dtsi"
/ {
aliases {
mmc0 = &sdmmc1;
usb0 = &usbotg_hs;
};
config {
//u-boot,boot-led = "led-blue";
//u-boot,error-led = "led-red";
u-boot,mmc-env-partition = "u-boot-env";
st,adc_usb_pd = <&adc1 6>, <&adc1 12>;
//st,fastboot-gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
//st,stm32prog-gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
watchdog-gpios = <&gpiod 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
watchdog-wdi-gpios = <&gpiod 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
};
//leds {
// led-red {
// color = <LED_COLOR_ID_RED>;
// gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
// default-state = "off";
// };
//};
};
&adc_1 {
status = "okay";
};
&uart4 {
u-boot,dm-pre-reloc;
};
&uart4_pins_a {
u-boot,dm-pre-reloc;
pins1 {
u-boot,dm-pre-reloc;
};
pins2 {
u-boot,dm-pre-reloc;
};
};

View File

@ -0,0 +1,56 @@
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
* Copyright (C) STMicroelectronics 2021 - All Rights Reserved
* Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
*/
#include "stm32mp135-gwbase.dts"
/ {
model = "i2SOM STM32MP135 GW103 Board";
compatible = "stm32mp135-gw103", "st,stm32mp135";
aliases {
ethernet0 = &eth1;
ethernet1 = &eth2;
serial0 = &uart4;
serial1 = &usart1;
serial2 = &uart8;
serial3 = &usart2;
};
chosen {
#address-cells = <1>;
#size-cells = <1>;
ranges;
stdout-path = "serial0:115200n8";
framebuffer {
compatible = "simple-framebuffer";
clocks = <&rcc LTDC_PX>;
status = "disabled";
};
};
memory@c0000000 {
device_type = "memory";
reg = <0xc0000000 0x20000000>;
};
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
optee_framebuffer@dd000000 {
reg = <0xdd000000 0x1000000>;
no-map;
};
optee@de000000 {
reg = <0xde000000 0x2000000>;
no-map;
};
};
};

View File

@ -0,0 +1,202 @@
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
/*
* Copyright : STMicroelectronics 2018
*/
#include <dt-bindings/clock/stm32mp1-clksrc.h>
#include "stm32mp15-u-boot.dtsi"
#include "stm32mp15-ddr3-1x4Gb-1066-binG.dtsi"
/ {
aliases {
i2c3 = &i2c4;
usb0 = &usbotg_hs;
};
config {
u-boot,boot-led = "heartbeat";
u-boot,error-led = "error";
u-boot,mmc-env-partition = "u-boot-env";
st,adc_usb_pd = <&adc1 18>, <&adc1 19>;
st,fastboot-gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
st,stm32prog-gpios = <&gpioa 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
};
#if defined(CONFIG_STM32MP15x_STM32IMAGE) || defined(CONFIG_SPL)
config {
u-boot,mmc-env-partition = "ssbl";
};
#endif
reserved-memory {
u-boot,dm-spl;
optee@de000000 {
u-boot,dm-spl;
};
};
led {
led-red {
label = "error";
gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
default-state = "off";
status = "okay";
};
};
};
&adc {
status = "okay";
};
#ifndef CONFIG_TFABOOT
&clk_hse {
st,digbypass;
};
&i2c4 {
u-boot,dm-pre-reloc;
};
&i2c4_pins_a {
u-boot,dm-pre-reloc;
pins {
u-boot,dm-pre-reloc;
};
};
&i2s2 {
clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
};
&pmic {
u-boot,dm-pre-reloc;
};
&rcc {
st,clksrc = <
CLK_MPU_PLL1P
CLK_AXI_PLL2P
CLK_MCU_PLL3P
CLK_PLL12_HSE
CLK_PLL3_HSE
CLK_PLL4_HSE
CLK_RTC_LSE
CLK_MCO1_DISABLED
CLK_MCO2_DISABLED
>;
st,clkdiv = <
1 /*MPU*/
0 /*AXI*/
0 /*MCU*/
1 /*APB1*/
1 /*APB2*/
1 /*APB3*/
1 /*APB4*/
2 /*APB5*/
23 /*RTC*/
0 /*MCO1*/
0 /*MCO2*/
>;
st,pkcs = <
CLK_CKPER_HSE
CLK_FMC_ACLK
CLK_QSPI_ACLK
CLK_ETH_DISABLED
CLK_SDMMC12_PLL4P
CLK_DSI_DSIPLL
CLK_STGEN_HSE
CLK_USBPHY_HSE
CLK_SPI2S1_PLL3Q
CLK_SPI2S23_PLL3Q
CLK_SPI45_HSI
CLK_SPI6_HSI
CLK_I2C46_HSI
CLK_SDMMC3_PLL4P
CLK_USBO_USBPHY
CLK_ADC_CKPER
CLK_CEC_LSE
CLK_I2C12_HSI
CLK_I2C35_HSI
CLK_UART1_HSI
CLK_UART24_HSI
CLK_UART35_HSI
CLK_UART6_HSI
CLK_UART78_HSI
CLK_SPDIF_PLL4P
CLK_FDCAN_PLL4R
CLK_SAI1_PLL3Q
CLK_SAI2_PLL3Q
CLK_SAI3_PLL3Q
CLK_SAI4_PLL3Q
CLK_RNG1_LSI
CLK_RNG2_LSI
CLK_LPTIM1_PCLK1
CLK_LPTIM23_PCLK3
CLK_LPTIM45_LSE
>;
/* VCO = 1066.0 MHz => P = 266 (AXI), Q = 533 (GPU), R = 533 (DDR) */
pll2: st,pll@1 {
compatible = "st,stm32mp1-pll";
reg = <1>;
cfg = < 2 65 1 0 0 PQR(1,1,1) >;
frac = < 0x1400 >;
u-boot,dm-pre-reloc;
};
/* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
pll3: st,pll@2 {
compatible = "st,stm32mp1-pll";
reg = <2>;
cfg = < 1 33 1 16 36 PQR(1,1,1) >;
frac = < 0x1a04 >;
u-boot,dm-pre-reloc;
};
/* VCO = 594.0 MHz => P = 99, Q = 74, R = 74 */
pll4: st,pll@3 {
compatible = "st,stm32mp1-pll";
reg = <3>;
cfg = < 3 98 5 7 7 PQR(1,1,1) >;
u-boot,dm-pre-reloc;
};
};
&sai2 {
clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
};
&sdmmc1 {
u-boot,dm-spl;
};
&sdmmc1_b4_pins_a {
u-boot,dm-spl;
pins1 {
u-boot,dm-spl;
};
pins2 {
u-boot,dm-spl;
};
};
#endif
&uart4 {
u-boot,dm-pre-reloc;
};
&uart4_pins_a {
u-boot,dm-pre-reloc;
pins1 {
u-boot,dm-pre-reloc;
};
pins2 {
u-boot,dm-pre-reloc;
/* pull-up on rx to avoid floating level */
bias-pull-up;
};
};

View File

@ -0,0 +1,22 @@
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
*/
/dts-v1/;
#include "stm32mp157.dtsi"
#include "stm32mp15xa.dtsi"
#include "stm32mp15-pinctrl.dtsi"
#include "stm32mp15xxac-pinctrl.dtsi"
#include "stm32mp15xx-panguboard.dtsi"
/ {
model = "STMicroelectronics STM32MP157A-DK1 Discovery Board";
compatible = "st,stm32mp157a-dk1", "st,stm32mp157";
chosen {
stdout-path = "serial0:115200n8";
};
};

View File

@ -0,0 +1,723 @@
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
*/
#include "stm32mp15-m4-srm.dtsi"
#include "stm32mp15-m4-srm-pinctrl.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/mfd/st,stpmic1.h>
/ {
aliases {
ethernet0 = &ethernet0;
serial0 = &uart4;
serial1 = &usart3;
serial2 = &uart7;
};
memory@c0000000 {
device_type = "memory";
reg = <0xc0000000 0x20000000>;
};
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
mcuram2: mcuram2@10000000 {
compatible = "shared-dma-pool";
reg = <0x10000000 0x40000>;
no-map;
};
vdev0vring0: vdev0vring0@10040000 {
compatible = "shared-dma-pool";
reg = <0x10040000 0x1000>;
no-map;
};
vdev0vring1: vdev0vring1@10041000 {
compatible = "shared-dma-pool";
reg = <0x10041000 0x1000>;
no-map;
};
vdev0buffer: vdev0buffer@10042000 {
compatible = "shared-dma-pool";
reg = <0x10042000 0x4000>;
no-map;
};
mcu_rsc_table: mcu_rsc_table@10048000 {
compatible = "shared-dma-pool";
reg = <0x10048000 0x8000>;
no-map;
};
mcuram: mcuram@30000000 {
compatible = "shared-dma-pool";
reg = <0x30000000 0x40000>;
no-map;
};
retram: retram@38000000 {
compatible = "shared-dma-pool";
reg = <0x38000000 0x10000>;
no-map;
};
gpu_reserved: gpu@d4000000 {
reg = <0xd4000000 0x4000000>;
no-map;
};
optee@de000000 {
reg = <0xde000000 0x2000000>;
no-map;
};
};
led {
compatible = "gpio-leds";
led-blue {
label = "heartbeat";
gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "off";
};
};
/*
sound: sound {
compatible = "audio-graph-card";
label = "STM32MP15-DK";
routing =
"Playback" , "MCLK",
"Capture" , "MCLK",
"MICL" , "Mic Bias";
dais = <&sai2a_port &sai2b_port &i2s2_port>;
status = "okay";
};
*/
/*
vin: vin {
compatible = "regulator-fixed";
regulator-name = "vin";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
};
*/
vddcore: regulator-vddcore {
compatible = "regulator-fixed";
regulator-name = "vddcore";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1350000>;
regulator-off-in-suspend;
regulator-always-on;
};
v3v3: regulator-3p3v {
compatible = "regulator-fixed";
regulator-name = "v3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-off-in-suspend;
regulator-always-on;
};
vdd: regulator-vdd {
compatible = "regulator-fixed";
regulator-name = "vdd";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-off-in-suspend;
regulator-always-on;
};
vdd_usb: regulator-vdd-usb {
compatible = "regulator-fixed";
regulator-name = "vdd_usb";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-off-in-suspend;
regulator-always-on;
};
wifi-module {
power-gpios = <&gpiof 12 GPIO_ACTIVE_LOW>;
wifi-reg-gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
bt-reg-gpios = <&gpiod 14 GPIO_ACTIVE_HIGH>;
};
};
&adc {
pinctrl-names = "default";
pinctrl-0 = <&adc12_usb_cc_pins_a>;
vdd-supply = <&vdd>;
vdda-supply = <&vdd>;
vref-supply = <&vrefbuf>;
status = "disabled";
adc1: adc@0 {
status = "okay";
/*
* Type-C USB_PWR_CC1 & USB_PWR_CC2 on in18 & in19.
* Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
* 5 * (56 + 47kOhms) * 5pF => 2.5us.
* Use arbitrary margin here (e.g. 5us).
*/
channel@18 {
reg = <18>;
st,min-sample-time-ns = <5000>;
};
channel@19 {
reg = <19>;
st,min-sample-time-ns = <5000>;
};
};
adc2: adc@100 {
status = "okay";
/* USB Type-C CC1 & CC2 */
channel@18 {
reg = <18>;
st,min-sample-time-ns = <5000>;
};
channel@19 {
reg = <19>;
st,min-sample-time-ns = <5000>;
};
};
};
&cec {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cec_pins_b>;
pinctrl-1 = <&cec_sleep_pins_b>;
status = "okay";
};
&cpu0{
cpu-supply = <&vddcore>;
};
&cpu1{
cpu-supply = <&vddcore>;
};
&crc1 {
status = "okay";
};
&dma1 {
sram = <&dma_pool>;
};
&dma2 {
sram = <&dma_pool>;
};
&dts {
status = "okay";
};
&ethernet0 {
status = "okay";
pinctrl-0 = <&ethernet0_rgmii_pins_a>;
pinctrl-1 = <&ethernet0_rgmii_sleep_pins_a>;
pinctrl-names = "default", "sleep";
phy-mode = "rgmii-id";
max-speed = <1000>;
phy-handle = <&phy0>;
nvmem-cells = <&ethernet_mac_address>;
nvmem-cell-names = "mac-address";
snps,reset-gpio = <&gpioh 2 GPIO_ACTIVE_LOW>;
mdio0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy0: ethernet-phy@0 {
reg = <0>;
};
};
};
&gpu {
contiguous-area = <&gpu_reserved>;
};
&hash1 {
status = "okay";
};
&i2c1 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c1_pins_a>;
pinctrl-1 = <&i2c1_sleep_pins_a>;
i2c-scl-rising-time-ns = <100>;
i2c-scl-falling-time-ns = <7>;
status = "okay";
/delete-property/dmas;
/delete-property/dma-names;
/*
hdmi-transmitter@39 {
compatible = "sil,sii9022";
reg = <0x39>;
iovcc-supply = <&v3v3_hdmi>;
cvcc12-supply = <&v1v2_hdmi>;
reset-gpios = <&gpioa 10 GPIO_ACTIVE_LOW>;
interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
interrupt-parent = <&gpiog>;
#sound-dai-cells = <0>;
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
sii9022_in: endpoint {
remote-endpoint = <&ltdc_ep0_out>;
};
};
port@3 {
reg = <3>;
sii9022_tx_endpoint: endpoint {
remote-endpoint = <&i2s2_endpoint>;
};
};
};
};
cs42l51: cs42l51@4a {
compatible = "cirrus,cs42l51";
reg = <0x4a>;
#sound-dai-cells = <0>;
VL-supply = <&v3v3>;
VD-supply = <&v1v8_audio>;
VA-supply = <&v1v8_audio>;
VAHP-supply = <&v1v8_audio>;
reset-gpios = <&gpiog 9 GPIO_ACTIVE_LOW>;
clocks = <&sai2a>;
clock-names = "MCLK";
status = "okay";
cs42l51_port: port {
#address-cells = <1>;
#size-cells = <0>;
cs42l51_tx_endpoint: endpoint@0 {
reg = <0>;
remote-endpoint = <&sai2a_endpoint>;
frame-master = <&cs42l51_tx_endpoint>;
bitclock-master = <&cs42l51_tx_endpoint>;
};
cs42l51_rx_endpoint: endpoint@1 {
reg = <1>;
remote-endpoint = <&sai2b_endpoint>;
frame-master = <&cs42l51_rx_endpoint>;
bitclock-master = <&cs42l51_rx_endpoint>;
};
};
};
*/
};
&i2c4 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c4_pins_a>;
pinctrl-1 = <&i2c4_sleep_pins_a>;
i2c-scl-rising-time-ns = <185>;
i2c-scl-falling-time-ns = <20>;
clock-frequency = <400000>;
status = "okay";
/* spare dmas for other usage */
/delete-property/dmas;
/delete-property/dma-names;
/*
stusb1600@28 {
compatible = "st,stusb1600";
reg = <0x28>;
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
interrupt-parent = <&gpioi>;
pinctrl-names = "default";
pinctrl-0 = <&stusb1600_pins_a>;
status = "okay";
vdd-supply = <&vin>;
connector {
compatible = "usb-c-connector";
label = "USB-C";
power-role = "dual";
typec-power-opmode = "default";
port {
con_usbotg_hs_ep: endpoint {
remote-endpoint = <&usbotg_hs_ep>;
};
};
};
};
*/
};
&i2c5 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c5_pins_a>;
pinctrl-1 = <&i2c5_sleep_pins_a>;
i2c-scl-rising-time-ns = <185>;
i2c-scl-falling-time-ns = <20>;
clock-frequency = <400000>;
/* spare dmas for other usage */
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
};
&i2s2 {
clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
clock-names = "pclk", "i2sclk", "x8k", "x11k";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2s2_pins_a>;
pinctrl-1 = <&i2s2_sleep_pins_a>;
status = "okay";
/*
i2s2_port: port {
i2s2_endpoint: endpoint {
remote-endpoint = <&sii9022_tx_endpoint>;
format = "i2s";
mclk-fs = <256>;
};
};
*/
};
&ipcc {
status = "okay";
};
&iwdg2 {
timeout-sec = <32>;
status = "okay";
};
&ltdc {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&ltdc_pins_a>;
pinctrl-1 = <&ltdc_sleep_pins_a>;
status = "okay";
/*
port {
ltdc_ep0_out: endpoint@0 {
reg = <0>;
remote-endpoint = <&sii9022_in>;
};
};
*/
};
&m4_rproc {
memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
<&vdev0vring1>, <&vdev0buffer>, <&mcu_rsc_table>;
mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
mbox-names = "vq0", "vq1", "shutdown", "detach";
interrupt-parent = <&exti>;
interrupts = <68 1>;
wakeup-source;
status = "okay";
};
&pwr_regulators {
vdd-supply = <&vdd>;
vdd_3v3_usbfs-supply = <&vdd_usb>;
};
&rtc {
status = "okay";
};
&sai2 {
clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
clock-names = "pclk", "x8k", "x11k";
/*pinctrl-names = "default", "sleep";
pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>;
pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>;*/
status = "okay";
/*
sai2a: audio-controller@4400b004 {
#clock-cells = <0>;
dma-names = "tx";
status = "okay";
sai2a_port: port {
sai2a_endpoint: endpoint {
remote-endpoint = <&cs42l51_tx_endpoint>;
format = "i2s";
mclk-fs = <256>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
};
};
};
sai2b: audio-controller@4400b024 {
dma-names = "rx";
st,sync = <&sai2a 2>;
clocks = <&rcc SAI2_K>, <&sai2a>;
clock-names = "sai_ck", "MCLK";
status = "okay";
sai2b_port: port {
sai2b_endpoint: endpoint {
remote-endpoint = <&cs42l51_rx_endpoint>;
format = "i2s";
mclk-fs = <256>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
};
};
};
*/
};
&sdmmc1 {
pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdmmc1_b4_pins_a>;
pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
cd-gpios = <&gpioh 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
disable-wp;
st,neg-edge;
bus-width = <4>;
vmmc-supply = <&v3v3>;
status = "okay";
};
&sdmmc2 {
pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
pinctrl-1 = <&sdmmc2_b4_od_pins_a>;
pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
non-removable;
st,neg-edge;
bus-width = <8>;
vmmc-supply = <&v3v3>;
vqmmc-supply = <&v3v3>;
status = "okay";
};
&sdmmc3 {
pinctrl-names = "default", "opendrain", "sleep";
pinctrl-0 = <&sdmmc3_b4_pins_a>;
pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
broken-cd;
st,neg-edge;
bus-width = <4>;
vmmc-supply = <&v3v3>;
status = "disabled";
};
&spi4 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi4_pins_b>;
pinctrl-1 = <&spi4_sleep_pins_b>;
status = "disabled";
};
&spi5 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi5_pins_a>;
pinctrl-1 = <&spi5_sleep_pins_a>;
status = "disabled";
};
&sram {
dma_pool: dma_pool@0 {
reg = <0x50000 0x10000>;
pool;
};
};
&timers1 {
/* spare dmas for other usage */
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
pwm {
pinctrl-0 = <&pwm1_pins_a>;
pinctrl-1 = <&pwm1_sleep_pins_a>;
pinctrl-names = "default", "sleep";
status = "okay";
};
timer@0 {
status = "okay";
};
};
&timers3 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
pwm {
pinctrl-0 = <&pwm3_pins_a>;
pinctrl-1 = <&pwm3_sleep_pins_a>;
pinctrl-names = "default", "sleep";
status = "okay";
};
timer@2 {
status = "okay";
};
};
&timers4 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
pwm {
pinctrl-0 = <&pwm4_pins_a &pwm4_pins_b>;
pinctrl-1 = <&pwm4_sleep_pins_a &pwm4_sleep_pins_b>;
pinctrl-names = "default", "sleep";
status = "okay";
};
timer@3 {
status = "okay";
};
};
&timers5 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
pwm {
pinctrl-0 = <&pwm5_pins_a>;
pinctrl-1 = <&pwm5_sleep_pins_a>;
pinctrl-names = "default", "sleep";
status = "okay";
};
timer@4 {
status = "okay";
};
};
&timers6 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
timer@5 {
status = "okay";
};
};
&timers12 {
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
pwm {
pinctrl-0 = <&pwm12_pins_a>;
pinctrl-1 = <&pwm12_sleep_pins_a>;
pinctrl-names = "default", "sleep";
status = "okay";
};
timer@11 {
status = "okay";
};
};
&uart4 {
pinctrl-names = "default", "sleep", "idle";
pinctrl-0 = <&uart4_pins_a>;
pinctrl-1 = <&uart4_sleep_pins_a>;
pinctrl-2 = <&uart4_idle_pins_a>;
/delete-property/dmas;
/delete-property/dma-names;
status = "okay";
};
&uart7 {
pinctrl-names = "default", "sleep", "idle";
pinctrl-0 = <&uart7_pins_c>;
pinctrl-1 = <&uart7_sleep_pins_c>;
pinctrl-2 = <&uart7_idle_pins_c>;
/delete-property/dmas;
/delete-property/dma-names;
status = "disabled";
};
&usart3 {
pinctrl-names = "default", "sleep", "idle";
pinctrl-0 = <&usart3_pins_c>;
pinctrl-1 = <&usart3_sleep_pins_c>;
pinctrl-2 = <&usart3_idle_pins_c>;
uart-has-rtscts;
status = "disabled";
};
&usbh_ehci {
phys = <&usbphyc_port0>;
status = "okay";
};
&usbotg_hs {
phys = <&usbphyc_port1 0>;
phy-names = "usb2-phy";
usb-role-switch;
status = "okay";
/*
port {
usbotg_hs_ep: endpoint {
remote-endpoint = <&con_usbotg_hs_ep>;
};
};
*/
};
&usbphyc {
status = "okay";
};
&usbphyc_port0 {
phy-supply = <&vdd_usb>;
st,tune-hs-dc-level = <2>;
st,enable-fs-rftime-tuning;
st,enable-hs-rftime-reduction;
st,trim-hs-current = <15>;
st,trim-hs-impedance = <1>;
st,tune-squelch-level = <3>;
st,tune-hs-rx-offset = <2>;
st,no-lsfs-sc;
/*
* Hack to keep hub active until all connected devices are suspended
* otherwise the hub will be powered off as soon as the v3v3 is disabled
* and it can disturb connected devices.
*/
connector {
compatible = "usb-a-connector";
vbus-supply = <&v3v3>;
};
};
&usbphyc_port1 {
phy-supply = <&vdd_usb>;
st,tune-hs-dc-level = <2>;
st,enable-fs-rftime-tuning;
st,enable-hs-rftime-reduction;
st,trim-hs-current = <15>;
st,trim-hs-impedance = <1>;
st,tune-squelch-level = <3>;
st,tune-hs-rx-offset = <2>;
st,no-lsfs-sc;
};
&vrefbuf {
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <2500000>;
vdda-supply = <&vdd>;
status = "okay";
};

View File

@ -564,7 +564,7 @@ static void sysconf_init(void)
static int board_stm32mp15x_dk2_init(void)
{
ofnode node;
struct gpio_desc hdmi, audio;
struct gpio_desc hdmi, audio, eth_rst;
int ret = 0;
/* Fix to make I2C1 usable on DK2 for touchscreen usage in kernel */
@ -611,6 +611,7 @@ static int board_stm32mp15x_dk2_init(void)
regulator_autoset_by_name("v1v2_hdmi", NULL);
regulator_autoset_by_name("v3v3_hdmi", NULL);
error:
return ret;
}
@ -848,6 +849,9 @@ int board_init(void)
struct udevice *dev;
int ret;
hw_watchdog_init();
hw_watchdog_reset();
/* probe RCC to avoid circular access with usbphyc probe as clk provider */
if (IS_ENABLED(CONFIG_CLK_STM32MP13)) {
ret = uclass_get_device_by_driver(UCLASS_CLK, DM_DRIVER_GET(stm32mp1_clock), &dev);
@ -873,6 +877,56 @@ int board_init(void)
return 0;
}
// #ifdef CONFIG_HW_WATCHDOG
static struct gpio_desc watchdog_en, watchdog_wdi;
static bool hw_watchdog_init_done = false;
void hw_watchdog_init(void)
{
ofnode node;
struct udevice *dev;
if (hw_watchdog_init_done)
return;
node = ofnode_path("/config");
if (!ofnode_valid(node)) {
log_err("no /config node?\n");
return;
}
if (gpio_request_by_name_nodev(node, "watchdog-gpios", 0,
&watchdog_en, GPIOD_IS_OUT)) {
log_warning("could not find a /config/watchdog-gpios\n");
} else {
dm_gpio_set_value(&watchdog_en, 0);
}
if (gpio_request_by_name_nodev(node, "watchdog-wdi-gpios", 0,
&watchdog_wdi, GPIOD_IS_OUT)) {
log_warning("could not find a /config/watchdog-wdi-gpios\n");
} else {
dm_gpio_set_value(&watchdog_wdi, 0);
}
hw_watchdog_init_done = true;
hw_watchdog_reset();
}
void hw_watchdog_reset(void)
{
if (!hw_watchdog_init_done)
return;
dm_gpio_set_value(&watchdog_wdi, 0);
udelay(5);
dm_gpio_set_value(&watchdog_wdi, 1);
}
// #endif
int board_late_init(void)
{
const void *fdt_compat;
@ -883,6 +937,9 @@ int board_late_init(void)
char buf[10];
char dtb_name[256];
int buf_len;
struct gpio_desc eth_rst, wifi;
struct gpio_desc watchdog_en, watchdog_wdi;
ofnode node;
if (board_is_stm32mp13x_dk())
board_stm32mp13x_dk_init();
@ -935,6 +992,95 @@ int board_late_init(void)
board_check_usb_power();
}
node = ofnode_path("/config");
if (!ofnode_valid(node)) {
log_err("no /config node?\n");
return;
}
node = ofnode_path("/soc/ethernet@5800a000");
if (!ofnode_valid(node)) {
pr_err("%s: no ethernet ?\n", __func__);
}else{
pr_err("ethernet reset phy\n");
if (gpio_request_by_name_nodev(node, "snps,reset-gpio", 0,
&eth_rst, GPIOD_IS_OUT)) {
pr_err("%s: could not find ethernet reset-gpios\n",
__func__);
return -ENOENT;
}
if(dm_gpio_is_valid(&eth_rst)){
ret = dm_gpio_set_value(&eth_rst, 1);
if (ret) {
pr_err("%s: can't set_value for ethernet reset gpio", __func__);
goto error;
}
mdelay(20);
ret = dm_gpio_set_value(&eth_rst, 0);
if (ret) {
pr_err("%s: can't set_value for ethernet reset gpio", __func__);
goto error;
}
mdelay(10);
ret = dm_gpio_set_value(&eth_rst, 1);
if (ret) {
pr_err("%s: can't set_value for ethernet reset gpio", __func__);
goto error;
}
mdelay(50);
}
}
node = ofnode_path("/wifi-module");
if (!ofnode_valid(node)) {
pr_err("%s: no wifi-module node ?\n", __func__);
}else{
if (gpio_request_by_name_nodev(node, "power-gpios", 0,
&wifi, GPIOD_IS_OUT)) {
pr_err("%s: could not find wifi-module reset-gpios\n",
__func__);
//return -ENOENT;
}else if(dm_gpio_is_valid(&wifi)){
ret = dm_gpio_set_value(&wifi, 1);
if (ret) {
pr_err("%s: can't set_value for ethernet reset gpio", __func__);
goto error;
}
}
if (gpio_request_by_name_nodev(node, "wifi-reg-gpios", 0,
&wifi, GPIOD_IS_OUT)) {
pr_err("%s: could not find wifi-module wifi-reg-gpios\n",
__func__);
//return -ENOENT;
}else if(dm_gpio_is_valid(&wifi)){
ret = dm_gpio_set_value(&wifi, 1);
if (ret) {
pr_err("%s: can't set_value for ethernet reset gpio", __func__);
goto error;
}
}
if (gpio_request_by_name_nodev(node, "bt-reg-gpios", 0,
&wifi, GPIOD_IS_OUT)) {
pr_err("%s: could not find wifi-module bt-reg-gpios\n",
__func__);
//return -ENOENT;
}else if(dm_gpio_is_valid(&wifi)){
ret = dm_gpio_set_value(&wifi, 1);
if (ret) {
pr_err("%s: can't set_value for ethernet reset gpio", __func__);
goto error;
}
}
}
error:
return 0;
}
@ -1377,6 +1523,7 @@ void stm32mp13x_dk_fdt_update(void *new_blob)
*/
phandle_stmipi_ep = fdt_get_phandle(new_blob, nodeoff_stmipi_ep);
fdt_setprop_u32(new_blob, nodeoff_ov5640_ep, "remote-endpoint", phandle_stmipi_ep);
}
void stm32mp15x_dk2_fdt_update(void *new_blob)

View File

@ -17,6 +17,9 @@ CONFIG_CMD_STM32PROG=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_BOOTDELAY=1
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT=""
CONFIG_AUTOBOOT_DELAY_STR="db"
CONFIG_BOOTCOMMAND="run bootcmd_stm32mp"
CONFIG_FDT_SIMPLEFB=y
CONFIG_SYS_PROMPT="STM32MP> "