Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/include/dt-bindings/pinctrl/renesas,r9a09g077-pinctrl.h
121811 views
1
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2
/*
3
* This header provides constants for Renesas RZ/T2H family pinctrl bindings.
4
*
5
* Copyright (C) 2025 Renesas Electronics Corp.
6
*/
7
8
#ifndef __DT_BINDINGS_PINCTRL_RENESAS_R9A09G077_PINCTRL_H__
9
#define __DT_BINDINGS_PINCTRL_RENESAS_R9A09G077_PINCTRL_H__
10
11
#define RZT2H_PINS_PER_PORT 8
12
13
/*
14
* Create the pin index from its bank and position numbers and store in
15
* the upper 16 bits the alternate function identifier
16
*/
17
#define RZT2H_PORT_PINMUX(b, p, f) ((b) * RZT2H_PINS_PER_PORT + (p) | ((f) << 16))
18
19
/* Convert a port and pin label to its global pin index */
20
#define RZT2H_GPIO(port, pin) ((port) * RZT2H_PINS_PER_PORT + (pin))
21
22
#endif /* __DT_BINDINGS_PINCTRL_RENESAS_R9A09G077_PINCTRL_H__ */
23
24