Created
November 22, 2023 19:44
-
-
Save openedev/0b0accfc1bd16f3a4ebd983e382444c4 to your computer and use it in GitHub Desktop.
SPI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-2.0 OR X11 | |
/* | |
* Copyright (C) 2016 Amarula Solutions | |
*/ | |
/dts-v1/; | |
#include "imx6dl.dtsi" | |
#include <dt-bindings/gpio/gpio.h> | |
/ { | |
model = "LTTS i.MX6DL/SOLO Dev. KIT"; | |
compatible = "ltts,imx6-icore", "fsl,imx6dl"; | |
chosen { | |
stdout-path = &uart2; | |
}; | |
clk25m: clock-25m { | |
compatible = "fixed-clock"; | |
#clock-cells = <0>; | |
clock-frequency = <25000000>; | |
clock-output-names = "clk25m"; | |
}; | |
reg_24v: regulator-24v { | |
compatible = "regulator-fixed"; | |
regulator-name = "24V"; | |
regulator-min-microvolt = <24000000>; | |
regulator-max-microvolt = <24000000>; | |
regulator-boot-on; | |
regulator-always-on; | |
}; | |
/* +3V3_DELAYED */ | |
reg_3v3: regulator-3v3 { | |
compatible = "regulator-fixed"; | |
regulator-name = "3V3"; | |
regulator-min-microvolt = <3300000>; | |
regulator-max-microvolt = <3300000>; | |
regulator-boot-on; | |
regulator-always-on; | |
vin-supply = <®_24v>; | |
}; | |
spi { | |
compatible = "spi-gpio"; | |
pinctrl-names = "default"; | |
pinctrl-0 = <&pinctrl_ecspi2>; | |
miso-gpios = <&gpio2 25 1>; | |
mosi-gpios = <&gpio5 27 1>; | |
sck-gpios = <&gpio5 26 1>; | |
cs-gpios = <&gpio2 27 GPIO_ACTIVE_LOW>; | |
num-chipselects = <1>; | |
#address-cells = <1>; | |
#size-cells = <0>; | |
status = "okay"; | |
switch@0 { | |
compatible = "nxp,sja1105q"; | |
reg = <0>; | |
spi-max-frequency = <16000000>; | |
spi-rx-delay-us = <1000>; | |
spi-tx-delay-us = <1000>; | |
spi-cpha; | |
clocks = <&clk25m>; | |
pinctrl-0 = <&pinctrl_sja1105_rst>; | |
pinctrl-names = "default"; | |
reset-gpios = <&gpio6 5 GPIO_ACTIVE_LOW>; | |
}; | |
}; | |
}; | |
&i2c2 { | |
clock-frequency = <100000>; | |
pinctrl-names = "default"; | |
pinctrl-0 = <&pinctrl_i2c2>; | |
status = "okay"; | |
pmic: pf0100@8 { | |
compatible = "fsl,pfuze100"; | |
reg = <0x08>; | |
interrupt-parent = <&gpio5>; | |
interrupts = <17 IRQ_TYPE_LEVEL_LOW>; | |
regulators { | |
reg_vddcore: sw1ab { | |
regulator-min-microvolt = <300000>; | |
regulator-max-microvolt = <1875000>; | |
regulator-boot-on; | |
regulator-always-on; | |
regulator-ramp-delay = <6250>; | |
}; | |
reg_vddsoc: sw1c { | |
regulator-min-microvolt = <300000>; | |
regulator-max-microvolt = <1875000>; | |
regulator-boot-on; | |
regulator-always-on; | |
regulator-ramp-delay = <6250>; | |
}; | |
reg_vddarm: sw2 { | |
regulator-min-microvolt = <300000>; | |
regulator-max-microvolt = <1375000>; | |
regulator-boot-on; | |
regulator-always-on; | |
regulator-ramp-delay = <6250>; | |
}; | |
reg_ddr_1v5a: sw3a { | |
regulator-min-microvolt = <400000>; | |
regulator-max-microvolt = <1975000>; | |
regulator-boot-on; | |
regulator-always-on; | |
}; | |
reg_ddr_1v5b: sw3b { | |
regulator-min-microvolt = <400000>; | |
regulator-max-microvolt = <1975000>; | |
regulator-boot-on; | |
regulator-always-on; | |
}; | |
reg_ddr_vtt: sw4 { | |
regulator-min-microvolt = <400000>; | |
regulator-max-microvolt = <3000000>; | |
regulator-always-on; | |
}; | |
reg_5v_600mA: swbst { | |
regulator-min-microvolt = <5000000>; | |
regulator-max-microvolt = <5150000>; | |
}; | |
reg_snvs_3v: vsnvs { | |
regulator-min-microvolt = <1500000>; | |
regulator-max-microvolt = <3000000>; | |
regulator-boot-on; | |
regulator-always-on; | |
}; | |
vref_reg: vrefddr { | |
regulator-boot-on; | |
regulator-always-on; | |
}; | |
vgen1_reg: vgen1 { | |
regulator-min-microvolt = <800000>; | |
regulator-max-microvolt = <1550000>; | |
}; | |
vgen2_reg: vgen2 { | |
regulator-min-microvolt = <800000>; | |
regulator-max-microvolt = <1550000>; | |
}; | |
vgen3_reg: vgen3 { | |
regulator-min-microvolt = <1800000>; | |
regulator-max-microvolt = <3300000>; | |
}; | |
vgen4_reg: vgen4 { | |
regulator-min-microvolt = <1800000>; | |
regulator-max-microvolt = <3300000>; | |
regulator-always-on; | |
}; | |
vgen5_reg: vgen5 { | |
regulator-min-microvolt = <1800000>; | |
regulator-max-microvolt = <3300000>; | |
regulator-always-on; | |
}; | |
vgen6_reg: vgen6 { | |
regulator-min-microvolt = <1800000>; | |
regulator-max-microvolt = <3300000>; | |
regulator-always-on; | |
}; | |
}; | |
}; | |
}; | |
&iomuxc { | |
/* pinctrl_ecspi2: ecspi2grp { | |
fsl,pins = < | |
MX6QDL_PAD_CSI0_DAT8__ECSPI2_SCLK 0x100b1 | |
MX6QDL_PAD_CSI0_DAT9__ECSPI2_MOSI 0x100b1 | |
MX6QDL_PAD_EIM_OE__ECSPI2_MISO 0x100b1 | |
MX6QDL_PAD_EIM_LBA__GPIO2_IO27 0x000b1 | |
>; | |
}; | |
*/ | |
pinctrl_ecspi2: ecspi2grp { | |
fsl,pins = < | |
MX6QDL_PAD_CSI0_DAT9__GPIO5_IO27 0x1b0b0 /* MISO */ | |
MX6QDL_PAD_EIM_OE__GPIO2_IO25 0x1b0b0 /* MOSI */ | |
MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26 0x1b0b0 /* SCLK */ | |
MX6QDL_PAD_EIM_LBA__GPIO2_IO27 0x1b0b0 | |
>; | |
}; | |
pinctrl_i2c2: i2c2grp { | |
fsl,pins = < | |
MX6QDL_PAD_EIM_D16__I2C2_SDA 0x4001b8b1 | |
MX6QDL_PAD_EIM_EB2__I2C2_SCL 0x4001b8b1 | |
>; | |
}; | |
pinctrl_uart2: uart2grp { | |
fsl,pins = < | |
MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1 | |
MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1 | |
>; | |
}; | |
pinctrl_usdhc1: usdhc1grp { | |
fsl,pins = < | |
MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17070 | |
MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10070 | |
MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17070 | |
MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17070 | |
MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17070 | |
MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17070 | |
MX6QDL_PAD_EIM_BCLK__GPIO6_IO31 0xb0b1 | |
>; | |
}; | |
pinctrl_sja1105_rst: sja1105rstgrp { | |
fsl,pins = < | |
MX6QDL_PAD_CSI0_DAT19__GPIO6_IO05 0x10030 | |
>; | |
}; | |
}; | |
/* | |
&ecspi2 { | |
cs-gpios = <&gpio2 27 GPIO_ACTIVE_LOW>; | |
pinctrl-0 = <&pinctrl_ecspi2>; | |
pinctrl-names = "default"; | |
status = "okay"; | |
switch@1 { | |
compatible = "nxp,sja1105q"; | |
reg = <1>; | |
spi-max-frequency = <16000000>; | |
spi-rx-delay-us = <1000>; | |
spi-tx-delay-us = <1000>; | |
spi-cpha; | |
clocks = <&clk25m>; | |
pinctrl-0 = <&pinctrl_sja1105_rst>; | |
pinctrl-names = "default"; | |
reset-gpios = <&gpio6 5 GPIO_ACTIVE_LOW>; | |
}; | |
}; | |
*/ | |
&gpio2 { | |
status = "okay"; | |
}; | |
&gpio5 { | |
status = "okay"; | |
}; | |
&gpio6 { | |
status = "okay"; | |
}; | |
&gpio7 { | |
status = "okay"; | |
}; | |
&uart2 { | |
pinctrl-names = "default"; | |
pinctrl-0 = <&pinctrl_uart2>; | |
status = "okay"; | |
}; | |
&usdhc1 { | |
pinctrl-names = "default"; | |
pinctrl-0 = <&pinctrl_usdhc1>; | |
cd-gpios = <&gpio7 31 GPIO_ACTIVE_LOW>; | |
no-1-8-v; | |
status = "okay"; | |
}; | |
&sdma { | |
status = "okay"; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment