15def4c47SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 25def4c47SEmmanuel Vadot%YAML 1.2 35def4c47SEmmanuel Vadot--- 45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/microchip,sparx5-sgpio.yaml# 55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65def4c47SEmmanuel Vadot 75def4c47SEmmanuel Vadottitle: Microsemi/Microchip Serial GPIO controller 85def4c47SEmmanuel Vadot 95def4c47SEmmanuel Vadotmaintainers: 105def4c47SEmmanuel Vadot - Lars Povlsen <lars.povlsen@microchip.com> 115def4c47SEmmanuel Vadot 125def4c47SEmmanuel Vadotdescription: | 135def4c47SEmmanuel Vadot By using a serial interface, the SIO controller significantly extend 145def4c47SEmmanuel Vadot the number of available GPIOs with a minimum number of additional 155def4c47SEmmanuel Vadot pins on the device. The primary purpose of the SIO controllers is to 165def4c47SEmmanuel Vadot connect control signals from SFP modules and to act as an LED 175def4c47SEmmanuel Vadot controller. 185def4c47SEmmanuel Vadot 195def4c47SEmmanuel Vadotproperties: 205def4c47SEmmanuel Vadot $nodename: 215def4c47SEmmanuel Vadot pattern: "^gpio@[0-9a-f]+$" 225def4c47SEmmanuel Vadot 235def4c47SEmmanuel Vadot compatible: 245def4c47SEmmanuel Vadot enum: 255def4c47SEmmanuel Vadot - microchip,sparx5-sgpio 265def4c47SEmmanuel Vadot - mscc,ocelot-sgpio 275def4c47SEmmanuel Vadot - mscc,luton-sgpio 285def4c47SEmmanuel Vadot 295def4c47SEmmanuel Vadot "#address-cells": 305def4c47SEmmanuel Vadot const: 1 315def4c47SEmmanuel Vadot 325def4c47SEmmanuel Vadot "#size-cells": 335def4c47SEmmanuel Vadot const: 0 345def4c47SEmmanuel Vadot 355def4c47SEmmanuel Vadot reg: 365def4c47SEmmanuel Vadot maxItems: 1 375def4c47SEmmanuel Vadot 385def4c47SEmmanuel Vadot clocks: 395def4c47SEmmanuel Vadot maxItems: 1 405def4c47SEmmanuel Vadot 415def4c47SEmmanuel Vadot microchip,sgpio-port-ranges: 425def4c47SEmmanuel Vadot description: This is a sequence of tuples, defining intervals of 435def4c47SEmmanuel Vadot enabled ports in the serial input stream. The enabled ports must 445def4c47SEmmanuel Vadot match the hardware configuration in order for signals to be 455def4c47SEmmanuel Vadot properly written/read to/from the controller holding 465def4c47SEmmanuel Vadot registers. Being tuples, then number of arguments must be 475def4c47SEmmanuel Vadot even. The tuples mast be ordered (low, high) and are 485def4c47SEmmanuel Vadot inclusive. 495def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-matrix 505def4c47SEmmanuel Vadot items: 515def4c47SEmmanuel Vadot items: 525def4c47SEmmanuel Vadot - description: | 535def4c47SEmmanuel Vadot "low" indicates start bit number of range 545def4c47SEmmanuel Vadot minimum: 0 555def4c47SEmmanuel Vadot maximum: 31 565def4c47SEmmanuel Vadot - description: | 575def4c47SEmmanuel Vadot "high" indicates end bit number of range 585def4c47SEmmanuel Vadot minimum: 0 595def4c47SEmmanuel Vadot maximum: 31 605def4c47SEmmanuel Vadot minItems: 1 615def4c47SEmmanuel Vadot maxItems: 32 625def4c47SEmmanuel Vadot 635def4c47SEmmanuel Vadot bus-frequency: 645def4c47SEmmanuel Vadot description: The sgpio controller frequency (Hz). This dictates 655def4c47SEmmanuel Vadot the serial bitstream speed, which again affects the latency in 665def4c47SEmmanuel Vadot getting control signals back and forth between external shift 675def4c47SEmmanuel Vadot registers. The speed must be no larger than half the system 685def4c47SEmmanuel Vadot clock, and larger than zero. 695def4c47SEmmanuel Vadot default: 12500000 705def4c47SEmmanuel Vadot 718cc087a1SEmmanuel Vadot resets: 728cc087a1SEmmanuel Vadot maxItems: 1 738cc087a1SEmmanuel Vadot 748cc087a1SEmmanuel Vadot reset-names: 758cc087a1SEmmanuel Vadot items: 768cc087a1SEmmanuel Vadot - const: switch 778cc087a1SEmmanuel Vadot 785def4c47SEmmanuel VadotpatternProperties: 795def4c47SEmmanuel Vadot "^gpio@[0-1]$": 805def4c47SEmmanuel Vadot type: object 815def4c47SEmmanuel Vadot properties: 825def4c47SEmmanuel Vadot compatible: 835def4c47SEmmanuel Vadot const: microchip,sparx5-sgpio-bank 845def4c47SEmmanuel Vadot 855def4c47SEmmanuel Vadot reg: 865def4c47SEmmanuel Vadot description: | 875def4c47SEmmanuel Vadot The GPIO bank number. "0" is designates the input pin bank, 885def4c47SEmmanuel Vadot "1" the output bank. 895def4c47SEmmanuel Vadot maxItems: 1 905def4c47SEmmanuel Vadot 915def4c47SEmmanuel Vadot gpio-controller: true 925def4c47SEmmanuel Vadot 935def4c47SEmmanuel Vadot '#gpio-cells': 945def4c47SEmmanuel Vadot description: | 955def4c47SEmmanuel Vadot Specifies the pin (port and bit) and flags. Note that the 965def4c47SEmmanuel Vadot SGIO pin is defined by *2* numbers, a port number between 0 975def4c47SEmmanuel Vadot and 31, and a bit index, 0 to 3. The maximum bit number is 985def4c47SEmmanuel Vadot controlled indirectly by the "ngpios" property: (ngpios/32). 995def4c47SEmmanuel Vadot const: 3 1005def4c47SEmmanuel Vadot 1015def4c47SEmmanuel Vadot interrupts: 1025def4c47SEmmanuel Vadot description: Specifies the sgpio IRQ (in parent controller) 1035def4c47SEmmanuel Vadot maxItems: 1 1045def4c47SEmmanuel Vadot 1055def4c47SEmmanuel Vadot interrupt-controller: true 1065def4c47SEmmanuel Vadot 1075def4c47SEmmanuel Vadot '#interrupt-cells': 1085def4c47SEmmanuel Vadot description: 1095def4c47SEmmanuel Vadot Specifies the pin (port and bit) and flags, as defined in 1105def4c47SEmmanuel Vadot defined in include/dt-bindings/interrupt-controller/irq.h 1115def4c47SEmmanuel Vadot const: 3 1125def4c47SEmmanuel Vadot 1135def4c47SEmmanuel Vadot ngpios: 1145def4c47SEmmanuel Vadot description: The numbers of GPIO's exposed. This must be a 1155def4c47SEmmanuel Vadot multiple of 32. 1165def4c47SEmmanuel Vadot minimum: 32 1175def4c47SEmmanuel Vadot maximum: 128 1185def4c47SEmmanuel Vadot 1195def4c47SEmmanuel Vadot required: 1205def4c47SEmmanuel Vadot - compatible 1215def4c47SEmmanuel Vadot - reg 1225def4c47SEmmanuel Vadot - gpio-controller 1235def4c47SEmmanuel Vadot - '#gpio-cells' 1245def4c47SEmmanuel Vadot - ngpios 1255def4c47SEmmanuel Vadot 1265def4c47SEmmanuel Vadot additionalProperties: false 1275def4c47SEmmanuel Vadot 1285def4c47SEmmanuel VadotadditionalProperties: false 1295def4c47SEmmanuel Vadot 1305def4c47SEmmanuel Vadotrequired: 1315def4c47SEmmanuel Vadot - compatible 1325def4c47SEmmanuel Vadot - reg 1335def4c47SEmmanuel Vadot - clocks 1345def4c47SEmmanuel Vadot - microchip,sgpio-port-ranges 1355def4c47SEmmanuel Vadot - "#address-cells" 1365def4c47SEmmanuel Vadot - "#size-cells" 1375def4c47SEmmanuel Vadot 1385def4c47SEmmanuel Vadotexamples: 1395def4c47SEmmanuel Vadot - | 1405def4c47SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 1415def4c47SEmmanuel Vadot sgpio2: gpio@1101059c { 1425def4c47SEmmanuel Vadot #address-cells = <1>; 1435def4c47SEmmanuel Vadot #size-cells = <0>; 1445def4c47SEmmanuel Vadot compatible = "microchip,sparx5-sgpio"; 1455def4c47SEmmanuel Vadot clocks = <&sys_clk>; 1465def4c47SEmmanuel Vadot pinctrl-0 = <&sgpio2_pins>; 1475def4c47SEmmanuel Vadot pinctrl-names = "default"; 148*c9ccf3a3SEmmanuel Vadot reg = <0x1101059c 0x118>; 1495def4c47SEmmanuel Vadot microchip,sgpio-port-ranges = <0 0>, <16 18>, <28 31>; 1505def4c47SEmmanuel Vadot bus-frequency = <25000000>; 1515def4c47SEmmanuel Vadot sgpio_in2: gpio@0 { 1525def4c47SEmmanuel Vadot reg = <0>; 1535def4c47SEmmanuel Vadot compatible = "microchip,sparx5-sgpio-bank"; 1545def4c47SEmmanuel Vadot gpio-controller; 1555def4c47SEmmanuel Vadot #gpio-cells = <3>; 1565def4c47SEmmanuel Vadot ngpios = <96>; 1575def4c47SEmmanuel Vadot interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 1585def4c47SEmmanuel Vadot interrupt-controller; 1595def4c47SEmmanuel Vadot #interrupt-cells = <3>; 1605def4c47SEmmanuel Vadot }; 1615def4c47SEmmanuel Vadot sgpio_out2: gpio@1 { 1625def4c47SEmmanuel Vadot compatible = "microchip,sparx5-sgpio-bank"; 1635def4c47SEmmanuel Vadot reg = <1>; 1645def4c47SEmmanuel Vadot gpio-controller; 1655def4c47SEmmanuel Vadot #gpio-cells = <3>; 1665def4c47SEmmanuel Vadot ngpios = <96>; 1675def4c47SEmmanuel Vadot }; 1685def4c47SEmmanuel Vadot }; 169