On 4/30/20 4:36 PM, Stephen Warren wrote:
> On 4/30/20 4:36 AM, David Wu wrote:
>> It can be seen that most of the Socs using STM mac, "snps,reset-gpio"
>> gpio is used, adding this option makes reset function more general.
> 
>> diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
> 
>> @@ -1712,11 +1724,29 @@ static int eqos_probe_resources_stm32(struct udevice 
>> *dev)
>>              if (ret)
>>                      pr_warn("gpio_request_by_name(phy reset) not provided 
>> %d",
>>                              ret);
>> +            else
>> +                    eqos->reset_delays[1] = 2;
>>  
>>              eqos->phyaddr = ofnode_read_u32_default(phandle_args.node,
>>                                                      "reg", -1);
>>      }
>>  
>> +    if (!dm_gpio_is_valid(&eqos->phy_reset_gpio)) {
>> +            int reset_flags = GPIOD_IS_OUT;
>> +
>> +            if (dev_read_bool(dev, "snps,reset-active-low"))
>> +                    reset_flags |= GPIOD_ACTIVE_LOW;
>> +
>> +            ret = gpio_request_by_name(dev, "snps,reset-gpio", 0,
>> +                                       &eqos->phy_reset_gpio, reset_flags);
> 
> 
> The kernel's bindings/net/snps,dwmac.yaml does not mention any
> reset-gpios property (which is what the existing code parses just above
> the portion that is quoted by this patch as context). I suspect that
> this patch should simply change the name of the property that this
> function parses to align with the binding, and fix any DTs in U-Boot
> that also don't match the binding?

Oops, the relevant YAML file is probably
./bindings/net/rockchip-dwmac.txt, although this makes no difference to
my statement luckily.

Reply via email to