Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux-seco-qcom
Manage
Activity
Members
Labels
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Clea OS
bsp
qualcomm
linux-seco-qcom
Commits
93496d0c
Commit
93496d0c
authored
3 months ago
by
Dietmar Muscholik
Committed by
Oleksii Kutuzov
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[NONFUNC] Add documentation for stm32 driver
parent
6be0955b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!13
Merge E81 development branch into trunk
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Documentation/devicetree/bindings/mfd/seco,stm32.txt
+123
-0
123 additions, 0 deletions
Documentation/devicetree/bindings/mfd/seco,stm32.txt
with
123 additions
and
0 deletions
Documentation/devicetree/bindings/mfd/seco,stm32.txt
0 → 100644
+
123
−
0
View file @
93496d0c
Device tree bindings for the seco stm32 embedded controller
***********************************************************
The stm32 embedded controller acts as a GPIO- and PWM-controller
and also handles system-reboot and -halt, by sending an appropriate
command to the controller.
Properties
----------
- compatible = "seco,stm32"
- reg = <0x40>: The address on the i2c-bus.
- pinctrl-names = "default"
- pinctrl-0 = <phandle>: Phandle of the pincontrol, only required for the
interrupt-pin.
- interrupt-parent = <phandle>: Where interrupts have to be send to.
- interrupts = <phandle>: Number and flags of the interrupt-pin.
GPIO
- gpio-controller: This is a gpio-controller, all standard-properties of
a gpio-controller will automaticaly be available.
- #gpio-cells = <2>: Number of parameters for a GPIO-definition,
pin-number and flags.
- ngpios =/bits/ 16 <16-bit-int>: Number of GPIOs to handle.
Interrupt
- interrupt-controller: This is an interrupt-controller, all
standard-properties of an interrupt-controller will automaticaly be
available.
- #interrupt-cells = <2>: Number of parameters for an
interrupt-definition, pin-number and flags.
- cpu-irq = <int>: Interrupt that can be triggered by a GPIO.
PWM
- #pwm-cells = <2>: Number of parameters for a PWM-definition. These are
period and duty-cyle. This is only for the kernel. The periods of the
PWMs are hardcodes in the stm32-firmware and can not be changed.
- pwm-pins = <array of int>: Pins that are used as PWM-pins.
Reboot-notifier
- reboot-delay-ms = <int>: Number of ms the embedded controller should
wait before actualy reboot of power-off.
Examples
--------
&lpi2c5 {
stm32: stm32@40 {
reg = <0x40>;
compatible = "seco,stm32";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_stm32>;
interrupt-parent = <&gpio2>;
interrupts = <EC_IRQ_PIN IRQ_TYPE_EDGE_FALLING>;
gpio-controller;
#gpio-cells = <2>;
ngpios =/bits/ 16 <STM32_NGPIOS>;
interrupt-controller;
#interrupt-cells = <2>;
cpu-irq = <CPU_IRQ>;
#pwm-cells = <2>;
pwm-pins = <LCD0_BKLT_PWM_PIN LCD1_BKLT_PWM_PIN I2S0_MCLK_PIN>;
reboot-delay-ms = <500>;
status = "okay";
};
};
Using pin 10 as enable-gpio
---------------------------
some_node {
...
enable-gpio = <&stm32 10 GPIO_ACTIVE_HIGH>;
...
};
Using pin 11 as interrupt-source
--------------------------------
some_node {
...
interrupt-parent = <&stm32>;
interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
...
};
Using pin 12 as PWM
-------------------
&stm32 {
pwm-pins = <12>; // pin 12 will act as pwm #0
};
some_node {
...
pwms = <&stm32 0 4000000 0>;
...
};
Using pin 13 as hog-gpio
------------------------
Sometimes you will need to switch a GPIO that is not handled by any driver,
e.g. to enable an USB-hub or switch on a clock for a WiFi-interface.
&stm32 {
some-gpio {
gpio-hog;
gpios = <13 (GPIO_PUSH_PULL | GPIO_ACTIVE_HIGH)>;
output-high:
line-name = "some-gpio";
};
};
Sysfs
-----
Some information is available in /sys/bus/i2c/devices/<bus>-<address>.
These are:
- chip_id
- fw_ver
- seco_code
- boot_mode
Writing to boot_mode will change the boot_mode for the next reboot.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment