Re: [PATCH v2 1/2] dt-bindings: gpio: Add Axiado SGPIO controller
Petar Stepanovic <[email protected]> Wed, 5 Aug 2026 12:23:32 +0200
| Newsgroups | org.kernel.vger.linux-gpio,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 7/29/2026 10:03 AM, Krzysztof Kozlowski wrote: > On 29/07/2026 09:02, Petar Stepanovic wrote: >> ... >> >> + >> + bus-frequency: >> + description: SGPIO shift clock frequency in Hz >> + minimum: 1 > Such property is not allowed. Why you cannot calculate it automatically? |bus-frequency| specifies the required SGPIO shift-clock frequency, not the input APB clock frequency. Although the divider can be calculated automatically, the desired output frequency cannot be determined from the APB clock alone. Similar to the I2C bus frequency, the SGPIO communication speed is a board-level parameter that must be selected to meet the timing requirements of the connected target devices. Different external SGPIO devices and board designs may require different shift-clock frequencies because of device timing limits and signal-integrity constraints. The upstream ASPEED SGPIO binding uses the same approach: it provides the APB clock through |clocks| and uses |bus-frequency| to select the required SGPIO communication rate. The driver then calculates the corresponding divider. Is there a preferred generic property or another mechanism that should be used for selecting the SGPIO shift-clock frequency? >> ... >> >> + >> + ngpios: >> + description: >> + Number of SGPIO positions. Each position provides one input GPIO and >> + one output GPIO. >> + enum: [128, 512] >> + >> +allOf: >> + - if: >> + properties: >> + compatible: >> + const: axiado,ax3000-sgpio >> + then: >> + properties: >> + ngpios: >> + const: 128 > else what? 3005 has 512? Then these are implied by compatible, no? No, the exact number of GPIOs is not implied by the compatible string. AX3000 supports any valid number of GPIOs up to 128, while AX3005 supports any valid number up to 512, depending on the target configuration. The current binding and driver incorrectly restrict |ngpios| to the fixed values 128 and 512. I will remove this restriction and update the next version to enforce the appropriate maximum for each compatible. Best regards, Petar