Skip to content
Snippets Groups Projects
Commit 3b06167d authored by Dmitry Petrov's avatar Dmitry Petrov
Browse files

Add support of Myon 2 i.MX8MM module + ConXM

Ported from seco-ne/kernel/linux-imx-kuk!442
parent 1e670589
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_MXC) += seco-imx8mq-c12.dtb\
seco-imx8mp-d18.dtb\
seco-imx8qxp-c57.dtb\
seco-imx8mm-c72.dtb\
seconorth-myon2-conxm-hdmi.dtb\
dts-dirs += overlays
subdir-y := $(dts-dirs)
......
/*
* Copyright 2024 SECO NE GmbH
*
*/
#ifndef NOBACKLIGHT_PWM
#define NOBACKLIGHT_PWM 0
#endif
#if USB1_OTG_FUNC != OTG_SLAVE
#define PADTYPE_USB_SW_SEL PAD_GPIO_PD
//#define RSRVD_USB_SWSEL KK_RSRVD_OUT_HI
#else
#define PADTYPE_USB_SW_SEL PAD_GPIO_PU
//#define RSRVD_USB_SWSEL KK_RSRVD_OUT_LO
#endif
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog>;
pinctrl_hog: hoggrp {
fsl,pins = <
MYON2_HOGGRP_COMMON
PIN1_73_GPIO PAD_GPIO_PU /* CAM Pwdn */
PIN1_71_GPIO PAD_GPIO_PU /* CAM nRST */
PIN1_20_GPIO PADTYPE_USB_SW_SEL /* USB SW SEL */
#if NOBACKLIGHT_PWM
PIN0_74_GPIO PAD_GPIO_PU /* GPIO BL PWM */
#endif
>;
};
pinctrl_gpio_keys: gpio_keys {
fsl,pins = < PIN1_6_GPIO PAD_GPIO_PU >; /* PowerButton SODIMM Pin 122 */
};
pinctrl_mipi_dsi_en: mipi_dsi_en {
fsl,pins = < PIN1_62_GPIO PAD_GPIO_PU >;
};
pinctrl_display_enable: display-enable {
fsl,pins = < PIN1_62_GPIO PAD_GPIO >; /* DISPLAY_ENABLE */
};
#if ! NOBACKLIGHT_PWM
pinctrl_backlight_pwm1: pwm-backlight {
fsl,pins = < PIN0_74_PWM1_OUT PAD_GPIO >; /* BACKLIGHT_PWM */
};
#endif
pinctrl_hdmi_int: hdmi-int {
fsl,pins = < PIN1_5_GPIO PAD_GPIO >; /* HDMI_INT */
};
};
/ {
reg_vin_fused: vin_fused {
compatible = "regulator-fixed";
regulator-name = "VIN_FUSED";
regulator-min-microvolt = <12000000>;
/* max should be 24V but the fixed regulator driver does
not allow a range here */
regulator-max-microvolt = <12000000>;
regulator-always-on;
};
reg_board_5v: 5v {
compatible = "regulator-fixed";
regulator-name = "+5V";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
vin-supply = <&reg_vin_fused>;
};
reg_3v3: 3v3 {
compatible = "regulator-fixed";
regulator-name = "+3V3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
vin-supply = <&reg_vin_fused>;
};
reg_display_pwr: display-pwr {
compatible = "regulator-fixed";
regulator-name = "DISPLAY PWCTRL";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_display_enable>;
gpio = <pin1_62_gpio 0>;
enable-active-high;
regulator-always-on;
vin-supply = <&reg_3v3>;
};
reg_usbhost_pwr: usbhost-pwr {
compatible = "regulator-fixed";
regulator-name = "USBHOST PWR";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
vin-supply = <&reg_board_5v>;
};
reg_usbotg_pwr: usbotg-pwr {
compatible = "regulator-fixed";
regulator-name = "USBOTG PWR";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
vin-supply = <&reg_board_5v>;
};
#if 0
reserved@board {
compatible = "kk,trizeps7-reserved";
#if NOBACKLIGHT_PWM
kk,gpio-names = "Cam-nRST","Cam-PWDN","nRESET_OUT", "USB_SWSEL-HOST", "PWM-PIN", "BACKLIGHT";
#else
kk,gpio-names = "Cam-nRST","Cam-PWDN","nRESET_OUT", "USB_SWSEL-HOST";
#endif
kk,os-gpios = <
pin1_71_gpio (KK_RSRVD_OUT_HI) /* Cam-nRST gpio1 6 */
pin1_73_gpio (KK_RSRVD_OUT_HI) /* Cam-PWDN gpio1 3 */
pin0_32_gpio (KK_RSRVD_OUT_HI|KK_RSRVD_EXPORT|KK_RSRVD_REQUEST(0)) /* nRESET_OUT */
pin1_20_gpio (RSRVD_USB_SWSEL|KK_RSRVD_EXPORT|KK_RSRVD_REQUEST(1)) /* USB SW SEL */
#if NOBACKLIGHT_PWM
pin0_74_gpio (KK_RSRVD_OUT_HI|KK_RSRVD_EXPORT|KK_RSRVD_REQUEST(2)) /* BL PWM GPIO1 1 */
pin0_76_gpio (KK_RSRVD_OUT_HI|KK_RSRVD_EXPORT|KK_RSRVD_REQUEST(2)) /* BACKLIGHT_ENABLE gpio3 22 */
#endif
>;
};
#endif
gpio-keys {
compatible = "gpio-keys1";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_keys>;
power { /* Reconfig to power key in Android*/
label = "Power Button";
gpios = <pin1_6_gpio GPIO_ACTIVE_LOW>;
linux,code = <116>; /* KEY_POWER */
gpio-key,wakeup;
};
};
};
&gpio1 {
#if NOBACKLIGHT_PWM
gpio-1 {
gpio-hog;
gpios = <1 0>;
line-name = "PWM-PIN";
output-high;
};
#endif
gpio-3 {
gpio-hog;
gpios = <3 0>;
line-name = "Cam-PWDN";
output-high;
};
gpio-6 {
gpio-hog;
gpios = <6 0>;
line-name = "Cam-nRST";
output-high;
};
};
&gpio3 {
gpio-14 {
gpio-hog;
gpios = <14 0>;
line-name = "nRESET_OUT";
output-high;
};
gpio-15 {
gpio-hog;
gpios = <15 0>;
line-name = "USB_SWSEL-HOST";
#if USB1_OTG_FUNC != OTG_SLAVE
output-high;
#else
output-low;
#endif
};
#if NOBACKLIGHT_PWM
gpio-22 {
gpio-hog;
gpios = <22 0>;
line-name = "BACKLIGHT";
output-high;
};
#endif
};
#if ! NOBACKLIGHT_PWM
&pwm1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_backlight_pwm1>;
status = "okay";
};
#endif
&backlight {
status = "okay";
};
&i2c2 {
};
&usbotg1 {
disable-over-current;
#if USB1_OTG_FUNC == OTG_HOST
//#warning "Set USB1 to HOST"
dr_mode = "host";
#else
#if USB1_OTG_FUNC == OTG_OTG
//#warning "Set USB1 to OTG"
dr_mode = "otg";
#else
//#warning "Set USB1 to peripheral"
dr_mode = "peripheral";
#endif
#endif
};
#if !defined (__DTS_IMX8MN_PINFUNC_H)
&usbotg2 {
disable-over-current;
disabled;
};
#endif
/************************************************************************/
#if defined (__DTS_MYON2_PINFUNC_H) || defined (__DTS_MYON2NANO_PINFUNC_H)
&mipi_dsi {
status = "okay";
port@1 {
mipi_dsi_bridge_out: endpoint {
remote-endpoint = <&adv7533_in>;
attach-bridge;
};
};
};
&i2c2 {
adv_bridge: adv7533@39 {
compatible = "adi,adv7533";
reg = <0x39>;
interrupt-parent = <pin1_5_gpio_parent>;
interrupts = <pin1_5_gpio_pin IRQ_TYPE_LEVEL_LOW>;
adi,ignore-edid;
adi,dsi-lanes = <4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hdmi_int>;
status = "okay";
port {
adv7533_in: endpoint {
remote-endpoint = <&mipi_dsi_bridge_out>;
};
};
};
};
#endif
/************************************************************************/
This diff is collapsed.
This diff is collapsed.
/*
* Copyright 2024 SECO NE GmbH
*
*/
/dts-v1/;
// Add defines here, which control behaviour of .dtsi:
#define OTG_HOST 0
#define OTG_SLAVE 1
#define OTG_OTG 2
#define USB1_OTG_ID_PIN_PD 1
//#define USB1_OTG_FUNC OTG_OTG
#define USB1_OTG_FUNC OTG_HOST
#include "include/myon2.dtsi"
#include "include/conxm.dtsi"
/* #include "adv7533.dtsi" */
/ {
model = "SECO NE GmbH ConXM-HDMI i.MX8MM Myon2";
compatible = "kk,myon2","kk,trizeps8", "kk,trizeps8mini", "fsl,imx8mm-evk", "fsl,imx8mm";
chosen {
stdout-path = &uart1;
};
};
&uart2 {
status = "okay";
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment