Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
NXP LPC18xx/43xx GPIO controller Device Tree Bindings
|
|
-----------------------------------------------------
|
|
|
|
Required properties:
|
|
- compatible : Should be "nxp,lpc1850-gpio"
|
|
- reg : Address and length of the register set for the device
|
|
- clocks : Clock specifier (see clock bindings for details)
|
|
- gpio-controller : Marks the device node as a GPIO controller.
|
|
- #gpio-cells : Should be two
|
|
- First cell is the GPIO line number
|
|
- Second cell is used to specify polarity
|
|
|
|
Optional properties:
|
|
- gpio-ranges : Mapping between GPIO and pinctrl
|
|
|
|
Example:
|
|
#define LPC_GPIO(port, pin) (port * 32 + pin)
|
|
#define LPC_PIN(port, pin) (0x##port * 32 + pin)
|
|
|
|
gpio: gpio@400f4000 {
|
|
compatible = "nxp,lpc1850-gpio";
|
|
reg = <0x400f4000 0x4000>;
|
|
clocks = <&ccu1 CLK_CPU_GPIO>;
|
|
gpio-controller;
|
|
#gpio-cells = <2>;
|
|
gpio-ranges = <&pinctrl LPC_GPIO(0,0) LPC_PIN(0,0) 2>,
|
|
...
|
|
<&pinctrl LPC_GPIO(7,19) LPC_PIN(f,5) 7>;
|
|
};
|
|
|
|
gpio_joystick {
|
|
compatible = "gpio-keys-polled";
|
|
...
|
|
|
|
button@0 {
|
|
...
|
|
gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>;
|
|
};
|
|
};
|